spec file installs wrong prefix
NuxRo opened this issue · 4 comments
Hi,
I'm trying to build an RPM based on the supplied spec file, but I end up with:
error: File not found: /builddir/build/BUILDROOT/squidanalyzer-6.6-1.el7.nux.x86_64/usr/share/perl5/vendor_perl/SquidAnalyzer.pm
error: File not found: /builddir/build/BUILDROOT/squidanalyzer-6.6-1.el7.nux.x86_64/usr/lib64/perl5/vendor_perl/auto/SquidAnalyzer/.packlist
That's because the files get installed in:
/var/lib/mock/epel-7-x86_64/root/builddir/build/BUILDROOT/squidanalyzer-6.6-1.el7.nux.x86_64/usr/local/share/perl5/SquidAnalyzer.pm
/var/lib/mock/epel-7-x86_64/root/builddir/build/BUILDROOT/squidanalyzer-6.6-1.el7.nux.x86_64/usr/local/lib64/perl5/auto/SquidAnalyzer/.packlist
It looks like the Makefile needs a PREFIX option that I could set to /usr.
Any pointers?
Thanks,
Lucian
Hi,
The problem is not in the spec imho, it's in the Makefile.
Currently things still get installed in /usr/local etc instead of /usr, the current spec does not build succesfully.
I'm not a RPM packager specialist but with some struggle I think I have definitively solved this issue. Here is the list of files in the RPM, this is a CentOS7 rpmbuild but I hope it will work on your system too.
[root@oracentos7 RPM]# rpm -qlp /root/rpmbuild/RPMS/noarch/squidanalyzer-6.6-1.el7.noarch.rpm
/etc/cron.daily/0squidanalyzer
/etc/squidanalyzer
/etc/squidanalyzer/excluded
/etc/squidanalyzer/included
/etc/squidanalyzer/lang
/etc/squidanalyzer/lang/ca_CA.txt
/etc/squidanalyzer/lang/cs_CZ.txt
/etc/squidanalyzer/lang/de_DE.txt
/etc/squidanalyzer/lang/en_US.txt
/etc/squidanalyzer/lang/es_ES.txt
/etc/squidanalyzer/lang/fr_FR.txt
/etc/squidanalyzer/lang/it_IT.txt
/etc/squidanalyzer/lang/pl_PL.txt
/etc/squidanalyzer/lang/pt_BR.txt
/etc/squidanalyzer/lang/ru_RU.txt
/etc/squidanalyzer/lang/uk_UA.txt
/etc/squidanalyzer/network-aliases
/etc/squidanalyzer/squidanalyzer.conf
/etc/squidanalyzer/url-aliases
/etc/squidanalyzer/user-aliases
/usr/bin/squid-analyzer
/usr/share/doc/squidanalyzer-6.6
/usr/share/doc/squidanalyzer-6.6/ChangeLog
/usr/share/doc/squidanalyzer-6.6/README
/usr/share/man/man3/SquidAnalyzer.3pm.gz
/usr/share/man/man3/squid-analyzer.3.gz
/usr/share/perl5/vendor_perl/SquidAnalyzer.pm
/var/www/squidanalyzer
/var/www/squidanalyzer/flotr2.js
/var/www/squidanalyzer/images
/var/www/squidanalyzer/images/back-arrow.png
/var/www/squidanalyzer/images/cursor.png
/var/www/squidanalyzer/images/domain.png
/var/www/squidanalyzer/images/info.png
/var/www/squidanalyzer/images/logo-squidanalyzer.png
/var/www/squidanalyzer/images/network.png
/var/www/squidanalyzer/images/user.png
/var/www/squidanalyzer/sorttable.js
/var/www/squidanalyzer/squidanalyzer.css
Related commit is 070c5f9.
Thanks
So far so good, thanks for the effort.