Hi,
I am trying to build my own rpm for mutt. I am using the spec file from the Fedora srpm. During the build it fails on the following command.
if test -f $BUILDROOT/usr/bin/mutt_dotlock && test xmail != x ; then \ chgrp mail $BUILDROOT/usr/bin/mutt_dotlock && \ chmod 2755 $BUILDROOT/usr/bin/mutt_dotlock || \ { echo "Can't fix mutt_dotlock's permissions!" >&2 ; exit 1 ; } \ fi
This is the error message I get.
chgrp: changing group of `$BUILDROOT/usr/bin/mutt_dotlock': Operation not permitted Can't fix mutt_dotlock's permissions! make[4]: *** [install-exec-hook] Error 1
I then realised only root can call chgrp, so I tried to build with mock. But I still get the same failure. I have successfully used mock to build notmuch and git before. What am I doing wrong this time?
Thanks in advance for any suggestions,
On Fri, Nov 23, 2012 at 04:16:46PM +0100, Suvayu Ali wrote:
I am trying to build my own rpm for mutt. I am using the spec file from the Fedora srpm. During the build it fails on the following command.
if test -f $BUILDROOT/usr/bin/mutt_dotlock && test xmail != x ; then \ chgrp mail $BUILDROOT/usr/bin/mutt_dotlock && \ chmod 2755 $BUILDROOT/usr/bin/mutt_dotlock || \ { echo "Can't fix mutt_dotlock's permissions!" >&2 ; exit 1 ; } \ fi This is the error message I get.
Instead of changing the permissions in that way, use %attr in the %files section.
Hi Matthew,
On Fri, Nov 23, 2012 at 10:23:27AM -0500, Matthew Miller wrote:
On Fri, Nov 23, 2012 at 04:16:46PM +0100, Suvayu Ali wrote:
I am trying to build my own rpm for mutt. I am using the spec file from the Fedora srpm. During the build it fails on the following command.
if test -f $BUILDROOT/usr/bin/mutt_dotlock && test xmail != x ; then \ chgrp mail $BUILDROOT/usr/bin/mutt_dotlock && \ chmod 2755 $BUILDROOT/usr/bin/mutt_dotlock || \ { echo "Can't fix mutt_dotlock's permissions!" >&2 ; exit 1 ; } \ fi This is the error message I get.
Instead of changing the permissions in that way, use %attr in the %files section.
This is part of the Makefile generated by configure in the %config section. Does that mean I have to patch the Makefile after it is generated and then do as you suggest in the %files section?
On Fri, Nov 23, 2012 at 04:38:56PM +0100, Suvayu Ali wrote:
This is part of the Makefile generated by configure in the %config section. Does that mean I have to patch the Makefile after it is generated and then do as you suggest in the %files section?
Looks like the Fedora package has a patch causing the dotlock command to not be built at all.
On Fri, Nov 23, 2012 at 11:23:34AM -0500, Matthew Miller wrote:
On Fri, Nov 23, 2012 at 04:38:56PM +0100, Suvayu Ali wrote:
This is part of the Makefile generated by configure in the %config section. Does that mean I have to patch the Makefile after it is generated and then do as you suggest in the %files section?
Looks like the Fedora package has a patch causing the dotlock command to not be built at all.
Thanks a lot Matthew. I think I have it figured out now. I found the patch, and applying it solves this problem. :)
Cheers,