Re: [gentoo-user] config file '/etc/mtab' needs updating
On 2023.04.11 09:14, Matt Connell wrote: On Mon, 2023-04-10 at 23:44 -0600, the...@sys-concept.com wrote: > After update I get: > * IMPORTANT: config file '/etc/mtab' needs updating. > > What is this, don't remember seeing it before. > > cfg-update -u > doesn't give me an option to view it. > > dispatch-conf will show you what is being changed and give you the option to use/zap the change. I never even knew cfg-update existed (I've always used dispatch-conf). I've been using etc-update. It has an interactive merge feature (only two-way, not three) and I sometimes do the merge manually in emacs, which has a three-way merge, although I have not used it.
Re: [gentoo-user] config file '/etc/mtab' needs updating
On Tue, Apr 11, 2023 at 9:47 AM Matt Connell wrote: > > I usually try not to edit any files that are 'managed' by packages, but > sometimes it is unavoidable (eg. no thing.conf.d directory support), so > I wind up having to either accept the change and then re-edit it, or > zap the change and allow the file to get stale as the package is > updated, leading back to the first scenario regardless. > Yeah, conf.d is a much better paradigm, but cfg-update dates back to when that wasn't popular, and of course there are still plenty of packages that don't support it today. Plus when you do need to manually edit a file you can do it in meld with 3-way diffs. -- Rich
Re: [gentoo-user] config file '/etc/mtab' needs updating
On Tue, 2023-04-11 at 09:34 -0400, Rich Freeman wrote: > cfg-update is a bit crufty, but its main advantage is support for > 3-way merges, which are usually automated. So if you change one line > in the middle of a config file you won't have to manually go through > diffs to re-apply the change every time it is updated. If the section > immediately around the line you edited didn't change, then it will > just accept the upstream changes while maintaining your customization. Neat. Thanks for the explanation. I might make use of cfg-update from time to time after all. I usually try not to edit any files that are 'managed' by packages, but sometimes it is unavoidable (eg. no thing.conf.d directory support), so I wind up having to either accept the change and then re-edit it, or zap the change and allow the file to get stale as the package is updated, leading back to the first scenario regardless.
Re: [gentoo-user] config file '/etc/mtab' needs updating
On Tue, Apr 11, 2023 at 9:14 AM Matt Connell wrote: > > On Mon, 2023-04-10 at 23:44 -0600, the...@sys-concept.com wrote: > > After update I get: > > * IMPORTANT: config file '/etc/mtab' needs updating. > > > > What is this, don't remember seeing it before. > > > > cfg-update -u > > doesn't give me an option to view it. > > > > > > dispatch-conf will show you what is being changed and give you the > option to use/zap the change. > > I never even knew cfg-update existed (I've always used dispatch-conf). > I'm guessing cfg-update doesn't understand symlinks, and obviously they can't be conventionally edited. cfg-update is a bit crufty, but its main advantage is support for 3-way merges, which are usually automated. So if you change one line in the middle of a config file you won't have to manually go through diffs to re-apply the change every time it is updated. If the section immediately around the line you edited didn't change, then it will just accept the upstream changes while maintaining your customization. It uses RCS, which is obviously dated. I'm maintaining it, so patches are welcome, but I'm not really putting any effort into it. As others have pointed out, it should be a symlink to /proc/self/mounts, as with the increasingly more popular use of mount namespaces there is no system-wide concept of what is/isn't mounted where. With the symlink each process will see what is actually mounted in its own namespace, avoiding leaking info from the host namespace, and also avoiding providing information that is incorrect from the process's perspective. -- Rich
Re: [gentoo-user] config file '/etc/mtab' needs updating
On Mon, 2023-04-10 at 23:44 -0600, the...@sys-concept.com wrote: > After update I get: > * IMPORTANT: config file '/etc/mtab' needs updating. > > What is this, don't remember seeing it before. > > cfg-update -u > doesn't give me an option to view it. > > dispatch-conf will show you what is being changed and give you the option to use/zap the change. I never even knew cfg-update existed (I've always used dispatch-conf).
Re: [gentoo-user] config file '/etc/mtab' needs updating
On Tuesday, 11 April 2023 12:03:57 BST Dr Rainer Woitok wrote: > Peter, > > On Tuesday, 2023-04-11 11:19:31 +0100, you wrote: > > On Tuesday, 11 April 2023 06:44:03 BST the...@sys-concept.com wrote: > > > After update I get: > > > * IMPORTANT: config file '/etc/mtab' needs updating. > > > ... > > > > /etc/mtab should be a symlink to /proc/self/mounts, so it ought to be kept > > up to date by the kernel as required. > > If I remember correctly, recently the symlink target was subtly changed > from "/proc/self/mounts" to "../proc/self/mounts", thus unconditionally > referring to a target on the same volume. Yes, I saw that, but is it even possible for /etc and /proc to be on different volumes? I thought not, but I'm always happy to be corrected. -- Regards, Peter.
Re: [gentoo-user] config file '/etc/mtab' needs updating
Peter, On Tuesday, 2023-04-11 11:19:31 +0100, you wrote: > On Tuesday, 11 April 2023 06:44:03 BST the...@sys-concept.com wrote: > > After update I get: > > * IMPORTANT: config file '/etc/mtab' needs updating. > > ... > /etc/mtab should be a symlink to /proc/self/mounts, so it ought to be kept up > to date by the kernel as required. If I remember correctly, recently the symlink target was subtly changed from "/proc/self/mounts" to "../proc/self/mounts", thus unconditionally referring to a target on the same volume. That's probably the reason for the warning thelma got. Sincerely, Rainer
Re: [gentoo-user] config file '/etc/mtab' needs updating
the...@sys-concept.com wrote: > After update I get: > * IMPORTANT: config file '/etc/mtab' needs updating. > > What is this, don't remember seeing it before. > > cfg-update -u > doesn't give me an option to view it. > > > I saw this the other day as well. I just skipped it. Still, it made me wonder, given what it does and what should update the file, why should emerge touch that file? It's like fstab. I doubt I'd ever let any config update touch fstab. I don't think I'd ever try to touch mtab myself. I'm curious, is this a bug or is something touching something it shouldn't? Dale :-) :-)
Re: [gentoo-user] config file '/etc/mtab' needs updating
On Tuesday, 11 April 2023 06:44:03 BST the...@sys-concept.com wrote: > After update I get: > * IMPORTANT: config file '/etc/mtab' needs updating. > > What is this, don't remember seeing it before. > > cfg-update -u > doesn't give me an option to view it. /etc/mtab should be a symlink to /proc/self/mounts, so it ought to be kept up to date by the kernel as required. -- Regards, Peter.
[gentoo-user] config file '/etc/mtab' needs updating
After update I get: * IMPORTANT: config file '/etc/mtab' needs updating. What is this, don't remember seeing it before. cfg-update -u doesn't give me an option to view it.