Re: Building rpms in mock

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

>> A courier-authlib-config-%{mailuser}-%{mailgroup} empty subpackage. So,  
>> it'll be courier-authlib-config-daemon-daemon for me, and courier-authlib- 
>> config-courier-courier for you. [...]  Both courier-authlib, and all other  
>> packages will get a dependency on this subpackage.
> This narrows down the possible user:group names to courier and
> daemon and it's good, though anyone currently running as something
> else, e.g. mail:daemon, will be left out in the cold.
>
> The main problem I'm facing is that neither authlib nor courier
> can be built in mock because they expect the user:group to exist.

This should be dealt with now. The new build will, if set up with a static  
uid:gid, will create it before building courier-authlib, and courier-authlib- 
config's scriptlet will recreate it when it gets installed.

> Another problem comes with the old-style system detections by
> fedora-release, rocky-release etc. A simple %{?fedora} would
> cover the former and a %{?rhel} would cover all el variants and
> derivatives, including alma which I am using and the rpm now
> identifies as non-fedora and non-rhel. (I don't know whether
> centos-stream identifies itself as rhel, fedora, or something
> else.)

There's a lot of legacy cruft in there, that can certainly be cleaned up.

> Finally, on line 170 of the 1.3.5-1 courier.spec there is a
> dangling "%if %is_rocky" that I don't understand. But at least
> this can be done regarding fedora:
>
> --- rpmbuild/SPECS/courier.spec 2023-12-26 10:53:07.000000000 +0000
> +++ rpmbuild/SPECS/courier.spec 2023-12-26 10:58:36.931000000 +0000
> @@ -146,11 +146,6 @@
>  BuildRequires:   perl(ExtUtils::Embed)
>  BuildRequires:   /etc/mime.types
>
> -%define need_perl_generators %(if rpm -q fedora-release >/dev/null  
> 2>/dev/null; then echo "1"; exit 0; fi; echo "0"; exit 1)
> -
> -%if %need_perl_generators
> -BuildRequires: perl-generators
> -%endif
>
>  %define use_openssl %(rpm -q openssl-devel >/dev/null 2>&1 && echo 1 &&  
> exit 0; echo 0)
>
> @@ -178,10 +173,9 @@
>  BuildRequires:      %{__make}
>  Obsoletes:     courier-smtpauth < 1.3.5
>
> -%define is_fedora %(if rpm -q fedora-release >/dev/null 2>/dev/null; then  
> echo "1"; exit 0; fi; echo "0"; exit 1)
> -
> -%if %is_fedora
> +%if %{?fedora}
>  BuildRequires: /usr/lib/locale/locale-archive
> +BuildRequires: perl-generators
>  %endif
>
>  %if ! %alternatives

Such as this.

> perl-generators are also needed by all rhel. I assume that
> the same applies to /usr/lib/locale/locale-archive; up to
> el7 this came from glibc-common and from el8 on it is part
> of glibc-all-langpacks. If so, %if ( %{?fedora} || %{?rhel} )
> would do the trick for both at the same time.

Currently the package build on centos, and rocky 8/9, as is.

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

iHUEABYKAB0WIQRupkKLJP96aW75pIOKYPgoojZS4gUCZYrJmQAKCRCKYPgoojZS
4oj3AQDq6r0L0EWKwa/4PGy5XcD5W0LO3ev/ZKE1p3HWYf39pwD/ZLD6CR0RCydI
0iXRBWVcfldO0Nrkntj8LUnzxbUULwc=
=Be+Q
-----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.