Packaging issues with files section for my future coq package

Michael Schwendt mschwendt at gmail.com
Wed Jun 4 20:57:29 UTC 2008


On Wed, 4 Jun 2008 14:26:51 -0400, Alan Dunn wrote:

> I'm trying to package the Coq theorem proving system.
> 
> My goal is to create a main package with the system and then a
> subpackage for the (optional) IDE. I've written out a spec file, and
> it does compile (that is, I can generate rpms with "rpmbuild -bb
> SPECS/coq.spec"), but this process generates quite a number of "file
> listed twice" warnings that I would like to eliminate like:
> 
> warning: File listed twice: /usr/lib/coq/contrib
> warning: File listed twice: /usr/lib/coq/contrib.cma
> warning: File listed twice: /usr/lib/coq/contrib.cmxa
> warning: File listed twice: /usr/lib/coq/contrib/field
> warning: File listed twice: /usr/lib/coq/contrib/field
> warning: File listed twice: /usr/lib/coq/contrib/field/LegacyField.vo
> warning: File listed twice: /usr/lib/coq/contrib/field/LegacyField.vo
> warning: File listed twice: /usr/lib/coq/contrib/field/LegacyField.vo
> ...
> 
> (the duplicated warnings are listed multiple times in the output, as
> are many files)
> 
> I thought that somehow things could've gone wrong in the files list
> that I generate to use in the %files section via:
> 
> find %{buildroot}%{_libdir}/coq -fprint coqlibfiles
> sed -i -e "s|%{buildroot}||" coqlibfiles

What is in "coqfiles" at this point?

> cat coqlibfiles >> coqfiles
>
> but none of the files are duplicated in the coqfiles file

Post the full spec file, because your quoted fragment is incomplete.
You create "coqlibfiles", then append it to "coqfiles", but whether
"coqfiles" is empty or set up with other contents is unknown. If
empty, you could use "-f coqlibiles" directly instead of creating
a copy.
 
> %files -f coqfiles
> %defattr(-,root,root)
> %doc CHANGES COMPATIBILITY COPYRIGHT CREDITS INSTALL INSTALL.ide
> KNOWN-BUGS LICENSE README
> %doc %{_mandir}/man1/coq*
> %doc %{_mandir}/man1/gallina.1.gz
> %doc %{_mandir}/man1/parser.1.gz
> %{_bindir}/coq*
> %{_bindir}/gallina
> %{_bindir}/parser
> # Parser.opt included seperately
> %exclude %{_bindir}/coqide*
> %exclude %{_libdir}/coq/ide/*
> 
> %files coqide
> %defattr(-,root,root)
> %{_bindir}/coqide*
> %{_libdir}/coq/ide/*
> 
> Anyone know what I'm doing wrong?

Why don't you include and exclude the directories directly
in the %files sections?

-- 
Fedora release 8 (Werewolf) - Linux 2.6.23.15-137.fc8
loadavg: 1.00 1.04 1.12




More information about the devel mailing list