FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 06-04-2008, 06:26 PM
"Alan Dunn"
 
Default Packaging issues with files section for my future coq package

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
cat coqlibfiles >> coqfiles

but none of the files are duplicated in the coqfiles file

%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?

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-04-2008, 07:38 PM
Martin Sourada
 
Default Packaging issues with files section for my future coq package

On Wed, 2008-06-04 at 14:26 -0400, Alan Dunn wrote:
...
> find %{buildroot}%{_libdir}/coq -fprint coqlibfiles
> sed -i -e "s|%{buildroot}||" coqlibfiles
> cat coqlibfiles >> coqfiles
...
> %files -f coqfiles
...
> %exclude %{_bindir}/coqide*
> %exclude %{_libdir}/coq/ide/*
>
> %files coqide
...
> %{_bindir}/coqide*
> %{_libdir}/coq/ide/*
>
...

Well actually it seems strange way of including files into
(sub)packages... First you make a list of some of the files you'd like
to include, then include it, but decide that some of the files should go
into subpackage, so exclude them again and list them in the subpackage.
Is there really need to use find and then include the results via -f?

Martin
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-04-2008, 08:57 PM
Michael Schwendt
 
Default Packaging issues with files section for my future coq package

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

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-05-2008, 12:32 AM
"Alan Dunn"
 
Default Packaging issues with files section for my future coq package

The full spec file is below -

My motivation for doing things the way I did was that I wanted to
incorporate arbitrarily deep (admittedly I know the depth for this
particular version in advance, but one can imagine this changing
between versions and it didn't seem like a good solution to create
something that would have to be fixed with each upgrade) directory
structures instead of including

/usr/lib/coq/*
/usr/lib/coq/*/*
(etc)

so instead I just took the directory structure as it was created with
find. That's why some files are excluded in the main package and
included in the subpackage. Of course, I suppose I could also just
change the find query to do the exclusion as well... perhaps that's
better? Or perhaps it's considered poor practice to do what I've done
here, is that so? (I don't really know what tradition is as this is my
first package, but I didn't see anything guiding advice in docs and
I've seen other packages do this.)

The full spec file:

Name: coq
Version: 8.1pl3
Release: 1%{?dist}
Summary: Coq proof management system

Group: Applications/Engineering
License: LGPLv2
URL: http://coq.inria.fr/
Source0: http://coq.inria.fr/V%{version}/files/coq-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ocaml >= 3.08, ocaml-camlp5-devel

%description
Coq is a formal proof management system. It allows for the development
of theorems through first order logic that are mechanically checked by
the machine. Sets of definitions and theorems can be saved as compiled
modules and loaded into the system.

This package provides the main Coq binary without an optional IDE,
Coqide.

%package coqide
Group: Applications/Engineering
Summary: Coqide IDE for Coq proof system.
Requires: coq
BuildRequires: ocaml >= 3.08, ocaml-camlp5-devel, gtk+-devel,
ocaml-lablgtk-devel

%description coqide
Coq is a formal proof management system. It allows for the development
of theorems through first order logic that are mechanically checked by
the machine. Sets of definitions and theorems can be saved as compiled
modules and loaded into the system.

This package provides Coqide, a lightweight IDE for Coq.

%prep
%setup -q

rm -f coqlibfiles coqfiles
rm -f install-emacs install-tex

# Test for emacs site_lisp directory, if so, add relevant files to
roster, else, don't try and install
%define emacsdir %{_datadir}/emacs/site-lisp
%if %(test -e %{emacsdir} && echo 1 || echo 0)
%define emacsopt -emacs %{emacsdir}
echo '%{emacsdir}/coq*' >> coqfiles
%else
%define emacsopt
touch install-emacs
%endif

# Test for tex directory, if so, add relevant files to roster, else,
don't try and install
%define texdir %{_datadir}/texmf/tex/latex/misc
%if %(test -e %{texdir} && echo 1 || echo 0)
%define texopt -coqdocdir %{texdir}
echo "%{texdir}/coqdoc.sty" >> coqfiles
%else
%define texopt
touch install-latex
%endif

%build
./configure -prefix %{_prefix} -bindir %{_bindir} -mandir %{_mandir}
%{emacsopt} %{texopt} -reals all > /dev/null
make world

# Test if we built an optimized parser
%if %(test -e %{buildroot}%{_bindir}/parser.opt && echo 1 || echo 0)
echo "%{_bindir}/parser.opt" >> coqfiles
%endif

%install
rm -rf %{buildroot}

make COQINSTALLPREFIX="%{buildroot}" install

# Build file list for ones that are hard to account for otherwise

find %{buildroot}%{_libdir}/coq -fprint coqlibfiles
sed -i -e "s|%{buildroot}||" coqlibfiles
cat coqlibfiles >> coqfiles

%clean
rm -rf %{buildroot}
make clean

%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/*

%changelog
* Wed Jun 14 2008 Alan Dunn <amdunn@gmail.com> 8.1pl3-1
- Initial version.

Thanks,
- Alan

On Wed, Jun 4, 2008 at 4:57 PM, Michael Schwendt <mschwendt@gmail.com> wrote:
> 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
>
> --
> fedora-devel-list mailing list
> fedora-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list
>

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-05-2008, 03:35 PM
Toshio Kuratomi
 
Default Packaging issues with files section for my future coq package

Alan Dunn wrote:

The full spec file is below -

My motivation for doing things the way I did was that I wanted to
incorporate arbitrarily deep (admittedly I know the depth for this
particular version in advance, but one can imagine this changing
between versions and it didn't seem like a good solution to create
something that would have to be fixed with each upgrade) directory
structures instead of including

/usr/lib/coq/*
/usr/lib/coq/*/*
(etc)

Things listed in %files can be directories and do work recursively. So
what do you think of these changes:


%files -f coqfiles


%files


%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


%{_bindir}/parser*


# Parser.opt included seperately
%exclude %{_bindir}/coqide*
%exclude %{_libdir}/coq/ide/*


%exclude %{_libdir}/coq/ide/



%files coqide
%defattr(-,root,root)
%{_bindir}/coqide*
%{_libdir}/coq/ide/*



%{_libdir}/coq/ide/


%changelog
* Wed Jun 14 2008 Alan Dunn <amdunn@gmail.com> 8.1pl3-1
- Initial version.



And then clean out your find invocations in %build as they aren't
needed. %exclude


-Toshio

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 06-05-2008, 03:53 PM
Michael Schwendt
 
Default Packaging issues with files section for my future coq package

On Wed, 4 Jun 2008 20:32:29 -0400, Alan Dunn wrote:

> The full spec file is below -

Thanks. In the context of the full spec I could rule out side-effects.
The reason for the "File listed twice" warnings simply is because
the "find" commands returns directories _and_ files, and by default,
directories are included recursively. Your generated "coqfiles" list
would include a tree recursively and additionally all found files
a second time.

> /usr/lib/coq/*
> /usr/lib/coq/*/*
> (etc)

Better:

%{_libdir}/coq/

That includes the directory and the entire tree below it.
Feel free to %exclude specific directories if that's necessary.

--
Fedora release 9.90 (Rawhide) - Linux 2.6.26-0.46.rc4.git2.fc10.i686
loadavg: 1.50 1.36 1.39

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 07:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org