• [gentoo-user] config file '/etc/mtab' needs updating

    From thelma@sys-concept.com@21:1/5 to All on Tue Apr 11 07:50:01 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to thelma@sys-concept.com on Tue Apr 11 12:40:01 2023
    thelma@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

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to thelma@sys-concept.com on Tue Apr 11 12:20:01 2023
    On Tuesday, 11 April 2023 06:44:03 BST thelma@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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr Rainer Woitok@21:1/5 to you on Tue Apr 11 13:10:01 2023
    Peter,

    On Tuesday, 2023-04-11 11:19:31 +0100, you wrote:

    On Tuesday, 11 April 2023 06:44:03 BST thelma@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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Tue Apr 11 13:20:02 2023
    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 thelma@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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nikos Chantziaras@21:1/5 to Dale on Tue Apr 11 14:40:01 2023
    On 11/04/2023 13:38, Dale wrote:
    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?

    Because the file belongs to the sys-apps/baselayout package.


    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.

    fstab is a config file. mtab is not ;-) It doesn't even belong in /etc,
    but it's kept there for backwards compatibility.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Connell@21:1/5 to Rich Freeman on Tue Apr 11 16:00:02 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Connell@21:1/5 to thelma@sys-concept.com on Tue Apr 11 15:20:01 2023
    On Mon, 2023-04-10 at 23:44 -0600, thelma@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).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Freeman@21:1/5 to matt@connell.tech on Tue Apr 11 15:40:01 2023
    On Tue, Apr 11, 2023 at 9:14 AM Matt Connell <matt@connell.tech> wrote:

    On Mon, 2023-04-10 at 23:44 -0600, thelma@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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Freeman@21:1/5 to matt@connell.tech on Tue Apr 11 16:20:01 2023
    On Tue, Apr 11, 2023 at 9:47 AM Matt Connell <matt@connell.tech> 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jack@21:1/5 to Matt Connell on Tue Apr 11 17:40:01 2023
    On 2023.04.11 09:14, Matt Connell wrote:
    On Mon, 2023-04-10 at 23:44 -0600, thelma@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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)