Re: Building rpms in mock
Zenon Panoussis <[email protected]>
| Newsgroups | gmane.mail.imap.courier.general |
|---|---|
| Message-ID | <[email protected]> |
> There are already configure options.
TODO: update/expand documentation ;)
> The userid and the groupid are set when building the
> courier-authlib package, by using its –with-mailuser
> and –with-mailgroup options; although I haven't tested
> what happens if the specified user and group does not
> exist when building courier-authlib.
This:
$ mock -r alma+epel-9-x86_64 --with-mailuser=courier --with-mailgroup=courier courier-authlib-0.72.0-1.el9.src.rpm
error: Bad exit status from /var/tmp/rpm-tmp.bAlMXK (%build)
/builddir/.rpmmacros: line 4: Macro %_with_mailuser needs whitespace before body
/builddir/.rpmmacros: line 5: Macro %_with_mailgroup needs whitespace before body
$ mock -r alma+epel-9-x86_64 --with-mailuser courier --with-mailgroup courier courier-authlib-0.72.0-1.el9.src.rpm
ERROR: Must specify --resultdir when building multiple RPMS
$ mock -r alma+epel-9-x86_64 --with mailuser=courier --with mailgroup=courier courier-authlib-0.72.0-1.el9.src.rpm
/builddir/.rpmmacros: line 4: Macro %_with_mailuser needs whitespace before body
/builddir/.rpmmacros: line 5: Macro %_with_mailgroup needs whitespace before body
This flies right in the face of man(1) mock. At the end,
after a cataract of very gross expletives which luckily
no-one heard because they were only in my head, this
seemed to work:
$ mock -r alma+epel-9-x86_64 --define 'mailgroup courier' --define 'mailuser courier' courier-authlib-0.72.0-1.el9.src.rpm
But after it compiled without errors, I went to the spec
to try to figure out why the --with arguments kept failing.
What I found is that there are no mailuser and mailgroup
macros in the spec. ./configure --help offers a long list
of options, but none of them can be passed to rpmbuild.
It looks like, but I'm not sure, that each and every available
configure option needs to be declared in the rpm spec in the
form of
%configure \
%{?_with_mailuser} \
%{?_with_mailgroup} \
etc
http://ftp.rpm.org/api/4.4.2.2/conditionalbuilds.html
***
None of this addresses your comment "haven't tested what
happens if the specified user and group does not exist
when building courier-authlib". I now know that a courier
that was built with the 'courier' user/group present in
the mock chroot runs as daemon, but I suspect that the
'courier' user/group were not yet created in the mock
chroot when the authlib-devel was built, that the courier
build subsequently used. In other words, everything is
uncertain and needs to be tested methodically. I'll do
that when we get past the .spec usaer/group configure
problem.
Z
--
Слава Україні!
Путин хуйло!
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users