Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
On Sa, 05.09.20 09:49, Andrei Borzenkov (arvidj...@gmail.com) wrote: > 05.09.2020 01:05, Lennart Poettering пишет: > > > > I explained this already. DNS server data today is much less config > > than state, acquired dynamically via DHCP, hence most distros don#t > > configure it in /etc so much anymore, but manage it in /run (where > > transient state is generally kept), and only keep a compat symlink in > > /etc. If you try to convince people though that the local timezone > > should just be transient state and not persistent config you'll have a > > hard time. I for one am certainly not convinced that the timezones are > > state... > > > > Sorry? glibc has absolutely no problems with /etc/localtime being link > into /run, /var or whatever else (nor has it problems with this file > being normal file and not a link) as long as content of this file is > valid time zone definition. The only piece of software that has problem > with it is systemd. So may be you should stop finger pointing and simply > explain why *systemd* demands that /etc/localtime be specific > symlink. systemd is fine with with it being a bind mount, a regular file or a symlink to whatever as well. But we'll write it out as a symlink to the tz data files in /usr/share/. Also, when we read the data back we can only derive the tz location string from the setting if its a symlink to the tz data files, since the information about the location is only encoded in the path not in the data files themselves. i.e. "Europe/Berlin" is nothing you can derive from the data files, so we derive it from the symlink contents. glibc doesn't ever do that, we do however, since people typicall want to know what the current setting is. For all our tools that write stuff to /etc, i.e. *write* configuration, we can do so only if /etc is writable. That's true for the locale settings, the vconsole settings, for timezones settings and hostname settings. It's also true for seat assignments by logind, for service enablement by systemctl, for portable services hook-ups and so on and so on and so on. We write to /etc because that it is generally where people on Linux accepted that persistent config should be placed. I seriously doubt that that is news to you. If you make that read-only that's entirely fine, but then systemd's tools cannot change config for you, but I think that's totally OK, by making it read-only you explicitly want to disallow changes to the settings, so systemd should accept that and also refuse it to clients. If you want to manage a file in /etc/ in a completely different way, then that's entirely OK. You could use git, or ansible, your private shell script or whatever else floats your boat. There's no need to involve the systemd tools for managing any of them, and systemd will honour what you put there regardless how you write it there. But systemd's own tools assume that /etc read-only means "config read-only" and we honour that, and I think htat's not surprising and most in line with what people would expect. > And yes, in current world this is state and not persistent config. When > I travel into another time zone I change state of my system for this > timezone. Just like DNS server address. Guess what? There is DHCP option > for time zone ... so how is it different from DNS server address? For starters DNS info is per network connection and usually remains valid exactly as long as the network it is associated with is connected to. resolved for example manages DNS info like that: nothing is persisted, and servers are added and dropped as ifaces come and go. Timezone info might receive updates from automatic detection every now and then, as you move around, but it's a lot more sticky: once the timezone is updated it stays that way even for the next boot. And yes, I am pretty sure some people disagree with this, or implement stuff differently, but that doesn't change the fact that in general tz info is persistent and DNS info not so much, though the lines are blurry. Lennart -- Lennart Poettering, Berlin ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
05.09.2020 01:05, Lennart Poettering пишет: > > I explained this already. DNS server data today is much less config > than state, acquired dynamically via DHCP, hence most distros don#t > configure it in /etc so much anymore, but manage it in /run (where > transient state is generally kept), and only keep a compat symlink in > /etc. If you try to convince people though that the local timezone > should just be transient state and not persistent config you'll have a > hard time. I for one am certainly not convinced that the timezones are > state... > Sorry? glibc has absolutely no problems with /etc/localtime being link into /run, /var or whatever else (nor has it problems with this file being normal file and not a link) as long as content of this file is valid time zone definition. The only piece of software that has problem with it is systemd. So may be you should stop finger pointing and simply explain why *systemd* demands that /etc/localtime be specific symlink. And yes, in current world this is state and not persistent config. When I travel into another time zone I change state of my system for this timezone. Just like DNS server address. Guess what? There is DHCP option for time zone ... so how is it different from DNS server address? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
Could you please stop signing mails sent to this publicly accessible, archived, and indexed/searchable mailing list with this impossible boilerplate: > IMPORTANT: The contents of this email and any attachments are confidential. > They are intended for the named recipient(s) only. If you have received > this email by mistake, please notify the sender immediately and do not > disclose the contents to anyone or make copies thereof. Thank you. On Fri, Sep 04, 2020 at 06:16:06PM -0400, Shravan Singh wrote: > What constitutes a configuration? > And please read my email subject. I can't have writable /etc, mender > dosen't allow that. > > In today's mobile computing age you really think users shouldn't change > timezone? > You keep saying " I for one am certainly not convinced that the timezones" > but you don't explain why? > Are you looking at this system as a static machine? That can never change > timezone? > > And please don't use profanity. I have not and you shouldn't either. > > Regards, > Shravan Singh > (239) 243-0838 > > Blue Sparq, Inc. > 928 NE 24th Lane unit 4 and 5. > Cape Coral, FL 33993 > > IMPORTANT: The contents of this email and any attachments are confidential. > They are intended for the named recipient(s) only. If you have received > this email by mistake, please notify the sender immediately and do not > disclose the contents to anyone or make copies thereof. > > > On Fri, Sep 4, 2020 at 6:05 PM Lennart Poettering > wrote: > > > On Fr, 04.09.20 15:54, Shravan Singh (shra...@bluesparq.com) wrote: > > > > > Yes, But help me understand. > > > I think you said that you are not convinced as to why that has to done. > > > > > > My argument is very simple shouldn't a Linux environment allow change in > > > timezone easily? > > > > Oh we do. But if your want configuration to be changable, then mount > > /etc writable. > > > > You have two contradicting goals: you want immutable config, but then > > you want to change config. So how's that gonna work? > > > > If you want your persistent config changable then make it changable, > > i.e. mount /etc/ writable. > > > > > Now I am not an expert in Linux kernel development. But I see that some > > of > > > the files, even though they reside in /etc are linked to file in /run > > > Like *resolv.conf. *Which allows dynamic changes. > > > > I explained this already. DNS server data today is much less config > > than state, acquired dynamically via DHCP, hence most distros don#t > > configure it in /etc so much anymore, but manage it in /run (where > > transient state is generally kept), and only keep a compat symlink in > > /etc. If you try to convince people though that the local timezone > > should just be transient state and not persistent config you'll have a > > hard time. I for one am certainly not convinced that the timezones are > > state... > > > > I mean, the line between persistent configuration and transient state > > is blurry, but in the case of DNS settings and timezone settings I > > certainly can draw a line easily. > > > > > timezone activity change is a very basic change one that needs to be > > > supported by the system. Why guard it with so much. > > > > We don't do that. Just make /etc/ writable ffs, if you want stuff in > > /etc to be changable. > > > > Lennart > > > > -- > > Lennart Poettering, Berlin > > > ___ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/systemd-devel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
"is automatically acquire and automatically released and automatically manage" And this is just what a timezone. "I think this discussion kinda lost its usefulness, I am just repeating myself" Ohh I knew that you narcissist Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. On Fri, Sep 4, 2020 at 6:30 PM Lennart Poettering wrote: > On Fr, 04.09.20 18:16, Shravan Singh (shra...@bluesparq.com) wrote: > > > What constitutes a configuration? > > And please read my email subject. I can't have writable /etc, mender > > dosen't allow that. > > Well, then that's sad, and something to bring up with mender? if they > do not allow local config, then obviously your goals and their > offerings apparently do not match given you want to cnfigure timezones > locally, as I understand. > > > In today's mobile computing age you really think users shouldn't change > > timezone? > > I don't think that. Do you? > > I am just saying: config is config, if you want writable config then > make /etc writable. /etc is for local config. timezones are config, > hence if you want changable timezones then make /etc writable. pretty > logic, pretty easy. > > > You keep saying " I for one am certainly not convinced that the > timezones" > > but you don't explain why? > > transient state is when something only has validity during the > current boot in the current context, is automatically acquire and > automatically released and automatically managed. > > Config otoh is generally persistent, ultimately configured by some > human or so and has is more of static nature. > > Timezone settings are usually man made, and assumed to be > persistent. They aren't part of network params acquired via DHCP > (well, DHCP actually has a field for that, but it's typically not > used, at least I didn't find a single network in the wild that uses > that) or a similar dynamic protocol. > > > Are you looking at this system as a static machine? That can never change > > timezone? > > It's you who insists that /etc (and thus configuration) should be > read-only, not me. It's you who's then upset that you cannot change > configuration if /etc (and thus configuration) is read-only. > > I think this discussion kinda lost its usefulness, I am just repeating > myself, and will thus refrain from further input on this thread. If my > explanations aren't enough, aren't acceptable I think we both have to > live with that. > > Lennart > > -- > Lennart Poettering, Berlin > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
On Fr, 04.09.20 18:16, Shravan Singh (shra...@bluesparq.com) wrote: > What constitutes a configuration? > And please read my email subject. I can't have writable /etc, mender > dosen't allow that. Well, then that's sad, and something to bring up with mender? if they do not allow local config, then obviously your goals and their offerings apparently do not match given you want to cnfigure timezones locally, as I understand. > In today's mobile computing age you really think users shouldn't change > timezone? I don't think that. Do you? I am just saying: config is config, if you want writable config then make /etc writable. /etc is for local config. timezones are config, hence if you want changable timezones then make /etc writable. pretty logic, pretty easy. > You keep saying " I for one am certainly not convinced that the timezones" > but you don't explain why? transient state is when something only has validity during the current boot in the current context, is automatically acquire and automatically released and automatically managed. Config otoh is generally persistent, ultimately configured by some human or so and has is more of static nature. Timezone settings are usually man made, and assumed to be persistent. They aren't part of network params acquired via DHCP (well, DHCP actually has a field for that, but it's typically not used, at least I didn't find a single network in the wild that uses that) or a similar dynamic protocol. > Are you looking at this system as a static machine? That can never change > timezone? It's you who insists that /etc (and thus configuration) should be read-only, not me. It's you who's then upset that you cannot change configuration if /etc (and thus configuration) is read-only. I think this discussion kinda lost its usefulness, I am just repeating myself, and will thus refrain from further input on this thread. If my explanations aren't enough, aren't acceptable I think we both have to live with that. Lennart -- Lennart Poettering, Berlin ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
And this is a major problem for any one running raspberry pi, NXP or any other embedded processor that uses mender and embedded linux. A machine with embedded linux running on it goes to San Francisco and then transported to Chicago. And you are saying that we shouldn't be allowed to change the timezone? Just because you are not "convinced" Does this group have a poll system? Let's put this to poll and see? I have tried having a rational explanation with you but your attitude is just appalling I have tried this solution and it works https://github.com/systemd/systemd/pull/8277. I just don't understand why you are not willing to accept this. And provide a solution to all the people using raspberry pi and or embedded processors? Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. On Fri, Sep 4, 2020 at 6:16 PM Shravan Singh wrote: > What constitutes a configuration? > And please read my email subject. I can't have writable /etc, mender > dosen't allow that. > > In today's mobile computing age you really think users shouldn't change > timezone? > You keep saying " I for one am certainly not convinced that the timezones" > but you don't explain why? > Are you looking at this system as a static machine? That can never change > timezone? > > And please don't use profanity. I have not and you shouldn't either. > > Regards, > Shravan Singh > (239) 243-0838 > > Blue Sparq, Inc. > 928 NE 24th Lane unit 4 and 5. > Cape Coral, FL 33993 > > IMPORTANT: The contents of this email and any attachments are > confidential. They are intended for the named recipient(s) only. If you > have received this email by mistake, please notify the sender immediately > and do not disclose the contents to anyone or make copies thereof. > > > On Fri, Sep 4, 2020 at 6:05 PM Lennart Poettering > wrote: > >> On Fr, 04.09.20 15:54, Shravan Singh (shra...@bluesparq.com) wrote: >> >> > Yes, But help me understand. >> > I think you said that you are not convinced as to why that has to done. >> > >> > My argument is very simple shouldn't a Linux environment allow change in >> > timezone easily? >> >> Oh we do. But if your want configuration to be changable, then mount >> /etc writable. >> >> You have two contradicting goals: you want immutable config, but then >> you want to change config. So how's that gonna work? >> >> If you want your persistent config changable then make it changable, >> i.e. mount /etc/ writable. >> >> > Now I am not an expert in Linux kernel development. But I see that some >> of >> > the files, even though they reside in /etc are linked to file in /run >> > Like *resolv.conf. *Which allows dynamic changes. >> >> I explained this already. DNS server data today is much less config >> than state, acquired dynamically via DHCP, hence most distros don#t >> configure it in /etc so much anymore, but manage it in /run (where >> transient state is generally kept), and only keep a compat symlink in >> /etc. If you try to convince people though that the local timezone >> should just be transient state and not persistent config you'll have a >> hard time. I for one am certainly not convinced that the timezones are >> state... >> >> I mean, the line between persistent configuration and transient state >> is blurry, but in the case of DNS settings and timezone settings I >> certainly can draw a line easily. >> >> > timezone activity change is a very basic change one that needs to be >> > supported by the system. Why guard it with so much. >> >> We don't do that. Just make /etc/ writable ffs, if you want stuff in >> /etc to be changable. >> >> Lennart >> >> -- >> Lennart Poettering, Berlin >> > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
What constitutes a configuration? And please read my email subject. I can't have writable /etc, mender dosen't allow that. In today's mobile computing age you really think users shouldn't change timezone? You keep saying " I for one am certainly not convinced that the timezones" but you don't explain why? Are you looking at this system as a static machine? That can never change timezone? And please don't use profanity. I have not and you shouldn't either. Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. On Fri, Sep 4, 2020 at 6:05 PM Lennart Poettering wrote: > On Fr, 04.09.20 15:54, Shravan Singh (shra...@bluesparq.com) wrote: > > > Yes, But help me understand. > > I think you said that you are not convinced as to why that has to done. > > > > My argument is very simple shouldn't a Linux environment allow change in > > timezone easily? > > Oh we do. But if your want configuration to be changable, then mount > /etc writable. > > You have two contradicting goals: you want immutable config, but then > you want to change config. So how's that gonna work? > > If you want your persistent config changable then make it changable, > i.e. mount /etc/ writable. > > > Now I am not an expert in Linux kernel development. But I see that some > of > > the files, even though they reside in /etc are linked to file in /run > > Like *resolv.conf. *Which allows dynamic changes. > > I explained this already. DNS server data today is much less config > than state, acquired dynamically via DHCP, hence most distros don#t > configure it in /etc so much anymore, but manage it in /run (where > transient state is generally kept), and only keep a compat symlink in > /etc. If you try to convince people though that the local timezone > should just be transient state and not persistent config you'll have a > hard time. I for one am certainly not convinced that the timezones are > state... > > I mean, the line between persistent configuration and transient state > is blurry, but in the case of DNS settings and timezone settings I > certainly can draw a line easily. > > > timezone activity change is a very basic change one that needs to be > > supported by the system. Why guard it with so much. > > We don't do that. Just make /etc/ writable ffs, if you want stuff in > /etc to be changable. > > Lennart > > -- > Lennart Poettering, Berlin > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
On Fr, 04.09.20 21:51, Dave Howorth (syst...@howorth.org.uk) wrote: > On Fri, 4 Sep 2020 21:32:19 +0200 > Lennart Poettering wrote: > > On Fr, 04.09.20 14:10, Shravan Singh (shra...@bluesparq.com) wrote: > > > > > Hello Lennart, > > > > > > Can you help me in understanding why this push was rejected? > > > *Make timedatectl nicely work with read-only filesystems #8277 * > > > > The explanation is in the PR comments. > > Would either of you care to provide a link to the actual text you're > referring to, for people reading who are not intimately associated with > the code? https://github.com/systemd/systemd/pull/8277 Lennart -- Lennart Poettering, Berlin ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
This is the link: https://github.com/systemd/systemd/pull/8277 Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. On Fri, Sep 4, 2020 at 6:00 PM Dave Howorth wrote: > On Fri, 4 Sep 2020 21:32:19 +0200 > Lennart Poettering wrote: > > On Fr, 04.09.20 14:10, Shravan Singh (shra...@bluesparq.com) wrote: > > > > > Hello Lennart, > > > > > > Can you help me in understanding why this push was rejected? > > > *Make timedatectl nicely work with read-only filesystems #8277 * > > > > The explanation is in the PR comments. > > Would either of you care to provide a link to the actual text you're > referring to, for people reading who are not intimately associated with > the code? > > I can see why read-only rootfs might be desirable, and in an age of > mobile computing I can see why mutable timezones might also be > desirable. > > > Lennart > ___ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/systemd-devel > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
On Fr, 04.09.20 15:54, Shravan Singh (shra...@bluesparq.com) wrote: > Yes, But help me understand. > I think you said that you are not convinced as to why that has to done. > > My argument is very simple shouldn't a Linux environment allow change in > timezone easily? Oh we do. But if your want configuration to be changable, then mount /etc writable. You have two contradicting goals: you want immutable config, but then you want to change config. So how's that gonna work? If you want your persistent config changable then make it changable, i.e. mount /etc/ writable. > Now I am not an expert in Linux kernel development. But I see that some of > the files, even though they reside in /etc are linked to file in /run > Like *resolv.conf. *Which allows dynamic changes. I explained this already. DNS server data today is much less config than state, acquired dynamically via DHCP, hence most distros don#t configure it in /etc so much anymore, but manage it in /run (where transient state is generally kept), and only keep a compat symlink in /etc. If you try to convince people though that the local timezone should just be transient state and not persistent config you'll have a hard time. I for one am certainly not convinced that the timezones are state... I mean, the line between persistent configuration and transient state is blurry, but in the case of DNS settings and timezone settings I certainly can draw a line easily. > timezone activity change is a very basic change one that needs to be > supported by the system. Why guard it with so much. We don't do that. Just make /etc/ writable ffs, if you want stuff in /etc to be changable. Lennart -- Lennart Poettering, Berlin ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
On Fri, 4 Sep 2020 21:32:19 +0200 Lennart Poettering wrote: > On Fr, 04.09.20 14:10, Shravan Singh (shra...@bluesparq.com) wrote: > > > Hello Lennart, > > > > Can you help me in understanding why this push was rejected? > > *Make timedatectl nicely work with read-only filesystems #8277 * > > The explanation is in the PR comments. Would either of you care to provide a link to the actual text you're referring to, for people reading who are not intimately associated with the code? I can see why read-only rootfs might be desirable, and in an age of mobile computing I can see why mutable timezones might also be desirable. > Lennart ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
Yes, But help me understand. I think you said that you are not convinced as to why that has to done. My argument is very simple shouldn't a Linux environment allow change in timezone easily? Now I am not an expert in Linux kernel development. But I see that some of the files, even though they reside in /etc are linked to file in /run Like *resolv.conf. *Which allows dynamic changes. timezone activity change is a very basic change one that needs to be supported by the system. Why guard it with so much. Again I am asking if there is something else that you would want instead of the method suggested in the ticket. I guess, your main concern is that this might open the flood gates where now everyone is changing /etc files according to their own whim and now read-only fs is not really a read-only fs But then again I would argue that timezone changes has little effect and it should be customizable according to the user. I am happy to spend my time doing that and submitting it again for review. Like I said I just want to know the root issue with that approach . Because there are plenty other people who might be facing the same issue. I am happy to invest my time in doing this Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. On Fri, Sep 4, 2020 at 3:32 PM Lennart Poettering wrote: > On Fr, 04.09.20 14:10, Shravan Singh (shra...@bluesparq.com) wrote: > > > Hello Lennart, > > > > Can you help me in understanding why this push was rejected? > > *Make timedatectl nicely work with read-only filesystems #8277 * > > The explanation is in the PR comments. > > Lennart > > -- > Lennart Poettering, Berlin > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
On Fr, 04.09.20 14:10, Shravan Singh (shra...@bluesparq.com) wrote: > Hello Lennart, > > Can you help me in understanding why this push was rejected? > *Make timedatectl nicely work with read-only filesystems #8277 * The explanation is in the PR comments. Lennart -- Lennart Poettering, Berlin ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
Hello Lennart, Can you help me in understanding why this push was rejected? *Make timedatectl nicely work with read-only filesystems #8277 * If there is some major issue. I would like to take this opportunity to make it right and submit it again Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. On Fri, Sep 4, 2020 at 11:27 AM Lennart Poettering wrote: > On Do, 20.08.20 14:22, Shravan Singh (shra...@bluesparq.com) wrote: > > > But no one is telling how to resolve my issue with a read-only > > rootfs. > > There's no concept for having some files in /etc writable and others > not. And you cannot use symlinking for this, nor bind mounts, since > config files in /etc are usually updated atomically, i.e. new versions > written in full into temporary files and then moved into place > atomically so that you either see the old or the new but never > anything half-written. This means that the dir of the file to update > needs to be writable and that the old inode goes away entirely on > update instead of being updated. > > I must say I see little point in having "etc mostly read-only" > though. I mean, either your config is entirely read-only or it > isn't. If it is read-only /etc being read-only is not a problem. If it > can be modified then make /etc the source of truth for it and > writable, and drop everything else from it, so that it only contains > the writable data you care about. A lot of software these days falls > back to fallback settings below /usr somewhere if their config files > in /etc don#t exist, and for the stuff that doesn't work like this, > move it over and symlink it from /etc (you can create those symlinks > with tmpfiles.d factory options). > > > There are other files which can be overwritten in /etc that are linked > to a > > file in /run directory for eg /etc/resolv.conf file. > > Well, that file is quite different, resolve.conf is historically was > configuraiton but today is more state than configuraiton, i.e. it is > usually configured dynamically via DHCP or so. Hence people started to > manage it in /run and leave /etc/resolv.conf only as a compat symlink > in place, if you so will. > > > Then why not /etc/localtime. Why is localtime guarded so much > > I refuse to believe that I am the only person facing this problem. But I > > did find some leads now. Will keep you posted > > /etc/localtime is generally considered to be configuration and not > state, hence people are typically fine with leaving it in /etc, since > that's where persistant configuration is supposed to be. > > I am sorry, but /etc on Linux is a single directory, and you can only > cleanly choose between all configuration read only or none, there's no > nice way for a middle ground. Sorry. > > Lennart > > -- > Lennart Poettering, Berlin > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
On Do, 20.08.20 14:22, Shravan Singh (shra...@bluesparq.com) wrote: > But no one is telling how to resolve my issue with a read-only > rootfs. There's no concept for having some files in /etc writable and others not. And you cannot use symlinking for this, nor bind mounts, since config files in /etc are usually updated atomically, i.e. new versions written in full into temporary files and then moved into place atomically so that you either see the old or the new but never anything half-written. This means that the dir of the file to update needs to be writable and that the old inode goes away entirely on update instead of being updated. I must say I see little point in having "etc mostly read-only" though. I mean, either your config is entirely read-only or it isn't. If it is read-only /etc being read-only is not a problem. If it can be modified then make /etc the source of truth for it and writable, and drop everything else from it, so that it only contains the writable data you care about. A lot of software these days falls back to fallback settings below /usr somewhere if their config files in /etc don#t exist, and for the stuff that doesn't work like this, move it over and symlink it from /etc (you can create those symlinks with tmpfiles.d factory options). > There are other files which can be overwritten in /etc that are linked to a > file in /run directory for eg /etc/resolv.conf file. Well, that file is quite different, resolve.conf is historically was configuraiton but today is more state than configuraiton, i.e. it is usually configured dynamically via DHCP or so. Hence people started to manage it in /run and leave /etc/resolv.conf only as a compat symlink in place, if you so will. > Then why not /etc/localtime. Why is localtime guarded so much > I refuse to believe that I am the only person facing this problem. But I > did find some leads now. Will keep you posted /etc/localtime is generally considered to be configuration and not state, hence people are typically fine with leaving it in /etc, since that's where persistant configuration is supposed to be. I am sorry, but /etc on Linux is a single directory, and you can only cleanly choose between all configuration read only or none, there's no nice way for a middle ground. Sorry. Lennart -- Lennart Poettering, Berlin ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
Hello Andrei, Thank you for your email. Yes, People have been telling me this: *Changing timezone globally requires changing /etc/localtime link which requires writable /etc. * But no one is telling how to resolve my issue with a read-only rootfs. There are other files which can be overwritten in /etc that are linked to a file in /run directory for eg /etc/resolv.conf file. Then why not /etc/localtime. Why is localtime guarded so much I refuse to believe that I am the only person facing this problem. But I did find some leads now. Will keep you posted But thank you so much for your response Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. On Thu, Aug 20, 2020 at 2:00 PM Andrei Borzenkov wrote: > 20.08.2020 18:55, Shravan Singh пишет: > > Hello, > > I have raspberry-pi cm3 which is running an embedded yocto poky linux > > warrior branch with mender. > > > > I have made my rootfs as read-only because of which I am not able to use > > timedatectl to change the system time zone. > > > > I was looking through the c code which makes me think that even if I did > > create and change symlink to point to a file in a read and write location > > of the memory. It won't make any difference. > > > > Changing timezone globally requires changing /etc/localtime link which > requires writable /etc. > > > I looked into the file timedated.c and here is where I wanted some help. > I > > see the line > > * r= get_timzeone()* in the function *context_read_data* all I want to > know > > is where is *get_timezone* defined and how is it calling */etc/localtime* > > > > src/basic/time-util.c > > grep is wonderful tool. > > > Any help will be appreciated. I have raised questions everywhere and I am > > not getting any help at all. > > > > And I am not an embedded developer. This place is my last cry for help > > Regards, > > Shravan Singh > > (239) 243-0838 > > > > Blue Sparq, Inc. > > 928 NE 24th Lane unit 4 and 5. > > Cape Coral, FL 33993 > > > > IMPORTANT: The contents of this email and any attachments are > confidential. > > They are intended for the named recipient(s) only. If you have received > > this email by mistake, please notify the sender immediately and do not > > disclose the contents to anyone or make copies thereof. > > > > > > ___ > > systemd-devel mailing list > > systemd-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/systemd-devel > > > > ___ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/systemd-devel > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Using timedatectl on a readonly rootfile system using mender
20.08.2020 18:55, Shravan Singh пишет: > Hello, > I have raspberry-pi cm3 which is running an embedded yocto poky linux > warrior branch with mender. > > I have made my rootfs as read-only because of which I am not able to use > timedatectl to change the system time zone. > > I was looking through the c code which makes me think that even if I did > create and change symlink to point to a file in a read and write location > of the memory. It won't make any difference. > Changing timezone globally requires changing /etc/localtime link which requires writable /etc. > I looked into the file timedated.c and here is where I wanted some help. I > see the line > * r= get_timzeone()* in the function *context_read_data* all I want to know > is where is *get_timezone* defined and how is it calling */etc/localtime* > src/basic/time-util.c grep is wonderful tool. > Any help will be appreciated. I have raised questions everywhere and I am > not getting any help at all. > > And I am not an embedded developer. This place is my last cry for help > Regards, > Shravan Singh > (239) 243-0838 > > Blue Sparq, Inc. > 928 NE 24th Lane unit 4 and 5. > Cape Coral, FL 33993 > > IMPORTANT: The contents of this email and any attachments are confidential. > They are intended for the named recipient(s) only. If you have received > this email by mistake, please notify the sender immediately and do not > disclose the contents to anyone or make copies thereof. > > > ___ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/systemd-devel > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Using timedatectl on a readonly rootfile system using mender
Hello, I have raspberry-pi cm3 which is running an embedded yocto poky linux warrior branch with mender. I have made my rootfs as read-only because of which I am not able to use timedatectl to change the system time zone. I was looking through the c code which makes me think that even if I did create and change symlink to point to a file in a read and write location of the memory. It won't make any difference. I looked into the file timedated.c and here is where I wanted some help. I see the line * r= get_timzeone()* in the function *context_read_data* all I want to know is where is *get_timezone* defined and how is it calling */etc/localtime* Any help will be appreciated. I have raised questions everywhere and I am not getting any help at all. And I am not an embedded developer. This place is my last cry for help Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel