Il giorno gio 1 feb 2018 alle 10:06, Paul Howarth <paul@xxxxxxxxxxxx>
ha scritto:
On Thu, 01 Feb 2018 06:52:57 +0100
Federico Bruni <fede@xxxxxxxxxxxxx> wrote:
>
>> %license COPYING
>>
>> %doc README.* COPYING
>
> If including the file COPYING as a licence file already,
duplicating
> it also as a separate doc file isn't necessary and should not be
> done.
I must duplicate it, since upstream is copying that file in the doc
dir:
[extractpdfmark-1.0.2]$ grep COPYING Makefile
$(srcdir)/config.h.in $(dist_doc_DATA) COPYING compile \
dist_doc_DATA = README.md README.ja.md COPYING
So if I remove it from %doc, I'll get an error:
error: Installed (but unpackaged) file(s) found:
/usr/share/doc/extractpdfmark/COPYING
Installed (but unpackaged) file(s) found:
/usr/share/doc/extractpdfmark/COPYING
Should I ask upstream to fix it and put COPYING under
/usr/share/licenses?
You could remove the copy in /usr/share/doc/extractpdfmark at the end
of %install to avoid this problem.
Good idea, but I cannot make it work. I've tried this first:
%install
%make_install
rm -f %{_docdir}/extractpdfmark/COPYING
But it seems that it tries to remove the file in my system instead of
that in chroot?
make[1]: Leaving directory
'/home/fede/RPM/extractpdfmark/extractpdfmark-1.0.2'
+ rm -f /usr/share/doc/extractpdfmark/COPYING
rm: cannot remove '/usr/share/doc/extractpdfmark/COPYING': Permission
denied
I tried also the %post command, but for some reason it's not executed.
I cannot figure out why.
%post
rm %{_docdir}/extractpdfmark/COPYING
I've tried "rm" and "/usr/bin/rm".
I've placed the %post after %install first and then after %files.
But the file is not removed and I don't see any error message in the
log.
I cannot find any good tutorial on this subject. If you have links to
suggest please let me know.
Thanks
Federico
_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx