[Freeipa-devel] [PATCH] Fixed rpm build warning - extension.js listed twice
Petr Vobornik
pvoborni at redhat.com
Wed Mar 14 14:40:00 UTC 2012
First, I have to say that I'm new to rpm specs and I don't like this
patch but I don't have better solution.
Problem:
Building the ipa rpms returns this:
warning: File listed twice: /usr/share/ipa/ui/extension.js
Cause:
This is because of a glob:
%{_usr}/share/ipa/ui/*.js
and then more specifically:
%config(noreplace) %{_usr}/share/ipa/ui/extension.js
https://fedorahosted.org/freeipa/ticket/2253
Solution thoughts::
1) best way would be limit glob like in bash ie:
'%{_usr}/share/ipa/ui/!(extension).js'. It doesn't work in spec file.
2) I don't want to specify each JavaScript file in spec - would have to
alter spec each time when adding new one.
--> I found nothing better than to use file list.
Filelist generation:
I'm creating it in %prep phase from install/ui/Makefile.am:
grep .js install/ui/Makefile.am | grep -v 'extension.js' | sed -e
's/[\t]*\\//' -e 's|[\t]*|%{_usr}/share/ipa/ui/|'
It would also be possible to generate the list from listing the directory:
find install/ui/ -maxdepth 1 -type f -name *.js ! -name develop.js !
-name extension.js | sed 's|^install|%{usr}/share/ipa|g'
Why from Makefile?:
The list of .js files in git and Makefile differs. Therefore listing
from dir also needs to create exceptions for not used files (develop.js)
- bad in long term.
--
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0109-Fixed-rpm-build-warning-extension.js-listed-twice.patch
Type: text/x-patch
Size: 1531 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120314/214b68e3/attachment.bin>
More information about the Freeipa-devel
mailing list