Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.99k stars 11.36k forks source link

Mutt 1.5.24 (bottled) Missing mutt_dotlock #45400

Closed dagoodma closed 8 years ago

dagoodma commented 8 years ago

Hello,

I installed mutt: stable 1.5.24 (bottled), HEAD with homebrew, but I am unable to write to my inbox when using mutt. When I try and delete a message I see: Mailbox is read-only.

I have ensured that folder and spool file permissions are correct for /var/spool/username. I found that mutt_dotlock is needed by mutt to lock the mail spool file to allow editing. See I can't modify my inbox folder, Mutt claims it's read-only, but permissions are ok? here: http://dev.mutt.org/trac/wiki/MuttFaq/Folder. But it seems that mutt_dotlock was never installed by homebrew. Am I missing something?

chdiza commented 8 years ago

This might have something to do with recent changes to how Homebrew treats $HOME during build. Perhaps the configure arg --with-homespool=.mbox is no longer treating it as $HOME/.mbox. I don't know, though, and even if that is what's going on I don't know the right way to fix it.

DomT4 commented 8 years ago

I don't think so. I reverted the $HOME change locally and it still wasn't installed.

chdiza commented 8 years ago

What version of OS X is this?

Also, is it that mutt_dotlock is not being installed anywhere, or just not in /usr/local/bin? If the latter, mutt has a config variable for your muttrc, namely $dotlock_program.

DomT4 commented 8 years ago

10.11. And mutt_dotlock doesn't even seem to being built, looking in the build directory during compile.

DomT4 commented 8 years ago

Running the build manually outside Homebrew hits this and fails, but the mutt_dotlock binary is generated & installed:

if test -f /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt_dotlock && test xmail != x ; then \
        chgrp mail /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt_dotlock && \
        chmod 2755 /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt_dotlock || \
        { echo "Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
    fi
chgrp: you are not a member of group mail
Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in the mail spool directory.

Which explains our workaround. If you build it with the workaround the mutt_dotlock binary isn't generated/installed:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-exec-hook
if test -f /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt.dotlock && test -f /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt_dotlock ; then    \
        rm -f /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt.dotlock ;       \
        ln -sf /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt_dotlock /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt.dotlock ; \
    fi
if test -f /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt_dotlock && test x != x ; then \
        chgrp  /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt_dotlock && \
        chmod 755 /tmp/mutt-test/mutt-1.5.24/BUILDINGA/bin/mutt_dotlock || \
        { echo "Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
    fi
/usr/local/bin/gmkdir -p /tmp/mutt-test/mutt-1.5.24/BUILDINGA/etc
/usr/local/bin/ginstall -c -m 644 ./mime.types /tmp/mutt-test/mutt-1.5.24/BUILDINGA/etc/mime.types.dist
if [ ! -f /tmp/mutt-test/mutt-1.5.24/BUILDINGA/etc/mime.types ]; then \
        /usr/local/bin/ginstall -c -m 644 ./mime.types /tmp/mutt-test/mutt-1.5.24/BUILDINGA/etc; \
    fi
DomT4 commented 8 years ago

Looks like DOTLOCK_GROUP could be set, perhaps, to work around this. Not sure if that could cause issues if other parts of mutt expect the user to be mail though.

DomT4 commented 8 years ago

Overriding mail in the Makefile for DOTLOCK_GROUP with admin does work.

chdiza commented 8 years ago

I can scour dev.mutt.org for prior tickets on this, but I won't have a spare second until Monday at earliest.

DomT4 commented 8 years ago

Planning to tee up a PR shortly for this, which if you or @dagoodma wanted to check for basic usage, etc that'd be cool.

DomT4 commented 8 years ago

Alright. If anyone wants to try and break #45482 that'd be appreciated.

iPadGuy commented 8 years ago

I guess that I am late to the game. After upgrading to OS X El Capitan, I decided to take another stab at getting mutt to work, but no dice. Do I need to tap the pull request for this?

Thanks!

dunn commented 8 years ago

@iPadGuy It was merged, so if you're still having problems open a new issue. Thanks!