[MacPorts] #52381: neomutt install fails because not in group mail
#52381: neomutt install fails because not in group mail --------------------+-------------------------------- Reporter: jhi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: neomutt --------------------+-------------------------------- Log snippet (whole log will be attached): ... :info:destroot { echo "Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \ :info:destroot fi :info:destroot chgrp: you are not a member of group mail :info:destroot Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory. :info:destroot make[4]: *** [install-exec-hook] Error 1 I am not planning to have a local mail spool, FWIW, just IMAP from gmail. -- Ticket URL: <https://trac.macports.org/ticket/52381> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Changes (by larryv@…): * owner: macports-tickets@… => leonardo@… Old description:
Log snippet (whole log will be attached):
... :info:destroot { echo "Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \ :info:destroot fi :info:destroot chgrp: you are not a member of group mail :info:destroot Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory. :info:destroot make[4]: *** [install-exec-hook] Error 1
I am not planning to have a local mail spool, FWIW, just IMAP from gmail.
New description: Log snippet (whole log will be attached): {{{ ... :info:destroot { echo "Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \ :info:destroot fi :info:destroot chgrp: you are not a member of group mail :info:destroot Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory. :info:destroot make[4]: *** [install-exec-hook] Error 1 }}} I am not planning to have a local mail spool, FWIW, just IMAP from gmail. -- Comment: It looks like you aren’t running MacPorts as root. Is this accurate? -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:1> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by jhi@…): Replying to [comment:1 larryv@…]:
It looks like you aren’t running MacPorts as root. Is this accurate?
This is correct. I prefer to minimize root activity. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:2> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by leonardo.schenkel@…): I have attached a fix. When not building as root the port will assume you don't want to read mail from the system spool at `/var/mail` and it will build with `--with-homespool`, which turns off the `dotlock` functionality and allows the port to finish building. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:3> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by jhi@…): Replying to [comment:3 leonardo.schenkel@…]:
I have attached a fix. When not building as root the port will assume you don't want to read mail from the system spool at `/var/mail` and it will build with `--with-homespool`, which turns off the `dotlock` functionality and allows the port to finish building.
Can I test this patch somehow locally? (without an updated port from macports.org, that is) -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:4> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by leonardo.schenkel@…): Yes, you can manually run `port edit neomutt` and add manually enter my changes as described the diff. Then just run a `port install`. On next `port update` or `selfupdate` your changes to the Portfile will be lost (but the package will remain installed). -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:5> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by leonardo.schenkel@…): One more thing: I suggest that you do *not* change the revision even though it is in my patch, so when the Portfile is updated on MacPorts it will automatically upgrade to the "official" build. If you do bump the revision then MacPorts will consider the package already up-to-date when that happens. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:6> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by jhi@…): Replying to [comment:5 leonardo.schenkel@…]:
Yes, you can manually run `port edit neomutt` and add manually enter my changes as described the diff. Then just run a `port install neomutt`. On next `port update` or `selfupdate` your changes to the Portfile will be lost (but the package will remain installed).
Tried that (without the revision bump as suggested). Failed. Looked at the patch. Didn't you mean {{{ if {${install.user} eq "root"} }}} That is, try the homespool option only if we '''are''' root? -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:7> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by leonardo.schenkel@…): No, it's the opposite. If you are root the package is built normally because that is how it is supposed to be built (this is a behaviour from upstream, not this port). If you are *not* root then `neomutt` is configured with `--with-homespool` and `mutt_dotlock` is not built, which bypasses the "can't fix permissions" error. It's strange that it didn't work out for you. Did you get the exact same problem as before? Can you post the new complete debug log with my patch applied? -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:8> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by jhi@…): Replying to [comment:8 leonardo.schenkel@…]:
No, it's the opposite. If you are root the package is built normally because that is how it is supposed to be built (this is a behaviour from upstream, not this port). If you are *not* root then `neomutt` is configured with `--with-homespool` and `mutt_dotlock` is not built, which bypasses the "can't fix permissions" error.
It's strange that it didn't work out for you. Did you get the exact same problem as before? Can you post the new complete debug log with my patch applied?
Note: with the "eq root" neomutt built and installed for me. But, anyway: did now "port uninstall neomutt" (to get rid of the modified revision three), and then re-did "port edit neomutt" to put back the "ne root", and re-tried "port install neomutt". Failed, the new patch attached. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:9> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by leonardo.schenkel@…): OK, I checked your log and I think I have a wrong understanding of what `${install.user}` actually means. I have done an alternative approach: I have introduced a new variant `+homespool`, which you should manually activate when running `port install` without root. This flag will be preserved on upgrades, so you only need to remember to activate it manually when you install the package for the first time. If I figure out later how to do it properly (I'll need to ask around), I may be able to enable this variant automatically for cases like yours when you aren't running MacPorts with `sudo`. But you will always be able to enable this yourself, so hopefully that should suffice. Could you please try again once more? -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:10> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+------------------------ Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: neomutt | ----------------------+------------------------ Comment (by mf2k@…): Adding a variant does not need a revision change. The user must specifically install the port with the variant to get it. An update will not add it even if it is a default variant. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:11> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+--------------------------------- Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: neomutt | ----------------------+--------------------------------- Changes (by mf2k@…): * keywords: => haspatch maintainer -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:12> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+--------------------------------- Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: neomutt | ----------------------+--------------------------------- Comment (by cal@…): In any case, this wouldn't need a revbump. Users that succeeded in installing mutt already have the correct version and don't have to rebuild. Users that have failed builds will automatically use the new Portfile after a fix is committed. Let me check for a way to find out whether a Portfile is run in a non-root installation… -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:13> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+--------------------------------- Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: neomutt | ----------------------+--------------------------------- Comment (by cal@…): jhi: Can you attach your copy of `/opt/local/libexec/macports/lib/port1.0/port_autoconf.tcl`? It should contain `install_user $yourusername` which is the default for `install.user`. I'd like to figure out why the proposed solution did not work for you. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:14> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+--------------------------------- Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: neomutt | ----------------------+--------------------------------- Comment (by jhi@…): Replying to [comment:10 leonardo.schenkel@…]:
OK, I checked your log and I think I have a wrong understanding of what `${install.user}` actually means. I have done an alternative approach: I have introduced a new variant `+homespool`, which you should manually activate when running `port install` without root. This flag will be preserved on upgrades, so you only need to remember to activate it manually when you install the package for the first time.
If I figure out later how to do it properly (I'll need to ask around), I may be able to enable this variant automatically for cases like yours when you aren't running MacPorts with `sudo`. But you will always be able to enable this yourself, so hopefully that should suffice.
Could you please try again once more?
With the +homespool variant, install works. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:15> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+--------------------------------- Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: neomutt | ----------------------+--------------------------------- Comment (by jhi@…): Replying to [comment:14 cal@…]:
jhi: Can you attach your copy of `/opt/local/libexec/macports/lib/port1.0/port_autoconf.tcl`? It should contain `install_user $yourusername` which is the default for `install.user`. I'd like to figure out why the proposed solution did not work for you.
Done. The install_users seems to be "root". Note: I used to run macports as root (with sudo) for a while, but got nervous of doing that. So I chown -R:ed /opt/local to myself, and have been running updates fine (no sudo) with that setup. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:16> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+--------------------------------- Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: neomutt | ----------------------+--------------------------------- Comment (by cal@…): Oh, OK, that explains it. Non-root copies of MacPorts should be installed by following https://guide.macports.org/#installing.macports.source and passing `--with-no-root-privileges` switch to `./configure`, which will automatically set `install.user` to your user name. Note that running MacPorts without root privileges gives build systems unrestricted access to your home directory and your files. Running with `sudo` as root makes MacPorts drop privileges for builds to an unprivileged `macports` user. I think we can keep the variant, but add a code block that makes it the default if `install.user` is not `root`: {{{ if {${install.user} ne "root"} { default_variants +homespool } }}} -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:17> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+--------------------------------- Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: neomutt | ----------------------+--------------------------------- Comment (by leonardo.schenkel@…): Great. I have updated the patch with the suggestions and I have added `openmaintainer` as well. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:18> MacPorts <https://www.macports.org/> Ports system for macOS
#52381: neomutt @20160916_2: chgrp fails during non-root destroot ----------------------+--------------------------------- Reporter: jhi@… | Owner: leonardo@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: haspatch maintainer Port: neomutt | ----------------------+--------------------------------- Changes (by cal@…): * status: new => closed * resolution: => fixed Comment: Thanks, committed in r153193 and closing. -- Ticket URL: <https://trac.macports.org/ticket/52381#comment:19> MacPorts <https://www.macports.org/> Ports system for macOS
participants (1)
-
MacPorts