[Rpm-maint] [rpm-software-management/rpm] brp-compress: scan more thoroughly for man and info directories (#538)

Owen Taylor notifications at github.com
Wed Sep 19 13:39:45 UTC 2018


Thanks for raising this issue, Yanko! I'd like to see something similar - in fact I filed https://src.fedoraproject.org/rpms/rpm/pull-request/15 to change this in the Red Hat packaging. I don't have a lot of input for the best approach. 

> Another possibility might be only scanning for info and man under %{_datadir}

I just checked and it does work to pass %{_datadir} to brp-compress:

```
%__brp_compress /usr/lib/rpm/brp-compress %{_datadir}
```
and use it there:

``` patch
$ diff -u a/scripts/brp-compress  b/scripts/brp-compress 
--- /home/otaylor/Source/rpm/scripts/brp-compress	2018-09-19 09:28:31.352186136 -0400
+++ /usr/lib/rpm/brp-compress	2018-09-19 09:23:34.908197457 -0400
@@ -5,6 +5,8 @@
 	exit 0
 fi
 
+DATADIR=${1:-/usr/share}
+
 cd "$RPM_BUILD_ROOT"
 
 # Compress man pages
@@ -12,9 +14,9 @@
 COMPRESS_EXT=${COMPRESS_EXT:-.gz}
 
 for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \
-	./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \
+	.$DATADIR/man/man* .$DATADIR/man/*/man* .$DATADIR/info \
 	./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \
-	./usr/share/doc/*/man/man* ./usr/lib/*/man/man* ./usr/share/fish/man/man*
+	.$DATADIR/doc/*/man/man* ./usr/lib/*/man/man* .$DATADIR/fish/man/man*
 do
     [ -d $d ] || continue
     for f in `find $d -type f ! -name dir`
```

But this does require (for it to do anything) a change to how `%__brp_compress` is defined as well. In the Fedora case, that means changing redhat-rpm-config as well as rpm. So from that perspective the second patch here is simpler.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/538#issuecomment-422807403
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180919/a21e4603/attachment.html>


More information about the Rpm-maint mailing list