Re: Building rpms in mock

Sam Varshavchik <[email protected]>
Newsgroups gmane.mail.imap.courier.general
Message-ID <[email protected]>
Zenon Panoussis writes:

> %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

That's the only answer that I see. courier-authlib's rpm will pick  
courier/courier if the userid and groupid exists.

The path of least resistance is to add a single option to add a single  
encompassing parameter:

%configure %{?config_flags}

And pass it in via mock:

mock --rebuild --define \
  'config_flags --with-mailuser=courier  --with-mailgroup=courier'

At this point I think it's simpler to extract the spec file out of the  
tarball, modify it, then "mock --buildsrpm" to build a new source rpm, and  
then --rebuild it.

Here's the problem that I see: this will build a custom courier-authlib,  
with custom uid/gid, but in order to build all the subsequent packages the  
courier-authlib rpm has to be installed in the mock chroot, and this means  
that the userid and groupids need to be created in it.

This means further hacking of the courier-authlib rpm, adding a %pre script  
to create the userid and the groupid.

_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQRupkKLJP96aW75pIOKYPgoojZS4gUCZYWFvwAKCRCKYPgoojZS
4kq3AP9+u51eiejUwtwNBncGo2CqsHtXodsv6g2QkHKoCklrxAEAyezXzlgeEJXy
8u7mbATduWsEdUiBuMJz0QFmIGidGQw=
=OkSN
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.