Re: courier rpm

Joost Ruijsch via courier-users <[email protected]> Sun, 18 Aug 2024 09:31:36 +0200
Newsgroups gmane.mail.imap.courier.general
Message-ID <[email protected]>
On 18-08-2024 01:50, Sam Varshavchik wrote:
> Zenon Panoussis writes:
>
>> A completely separate problem with the current src.rpm is
>> that it fails to build in mock because too tight permissions
>> prevent strip from doing its job. This patch fixes that:
>>
>> --- courier.spec.orig   2024-08-17 21:08:10.688000000 +0000
>> +++ courier.spec        2024-08-17 21:07:33.825000000 +0000
>> @@ -673,6 +673,13 @@
>>  %{__ln_s} `realpath --relative-to /etc/cron.monthly -m 
>> %{_sbindir}/mkdhparams` 
>> $RPM_BUILD_ROOT/etc/cron.monthly/courier-mkdhparams
>>  echo "/etc/cron.monthly/courier-mkdhparams" >>filelist
>>
>> +## Loosen up permissions in BUILDROOT bindirs to prevent strip
>> +## "unable to copy file -- permission denied" in mock.
>> +chmod -R a+rw %{buildroot}/usr/lib/courier/libexec/courier
>> +chmod -R a+rw %{buildroot}/usr/lib/courier/sbin
>> +chmod -R a+rw %{buildroot}/usr/lib/courier/bin
>> +chmod -R a+rw %{buildroot}/var/www/cgi-bin
>> +
>>  #
>>  # Make up some /etc/profile.d scripts
>>  #
>>
>> Loosening up permissions at this stage doesn't matter, because
>> they are set again as they should be in %files.
>
> Strange. I use mock occasionally to build Courier for a new Fedora 
> release before updating to it, and I don't have a recollection of this 
> build failure. But it doesn't matter, it's simple enough to add this.

Maybe you did not notice. The build process does not fail but produces 
unstripped binaries. I have been using a similar hack for some five 
years now to build regular packages on Fedora. It is not just affecting 
the mock build.

My dirty hack:

sed -i '/^%post$/i chmod -R u+w $RPM_BUILD_ROOT' courier.spec

_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users