Spec URL: http://linville.fedorapeople.org/unzoo.spec SRPM URL: http://linville.fedorapeople.org/unzoo-4.4-1.src.rpm Description: 'unzoo' is a zoo archive extractor. A zoo archive is a file that contains several files, called its members, usually in compressed form to save space. 'unzoo' can list all or selected members or extract all or selected members, i.e., uncompress them and write them to files. It cannot add new members or delete members. For this you need the zoo archiver, called 'zoo', written by Rahul Dhesi.
I chose package unzoo because the zoo archiver mentioned above is released under a restrictive license... Should I be using %{?dist} as part of the Release line in the .spec file?
Taking on review.
- optflags are not used. Use gcc %{optflags} -o unzoo -DSYS_IS_UNIX -O unzoo.c in the build phase. - Move rm -rf %{buildroot} to the top of the install phase. - Drop the creation of the dir and just use install -Dpm 755 unzoo %{buildroot}%{_bindir}/unzoo as this will do the creation for you. - Shipping source code as documentation is silly, please drop it. I see that there is some documentation in the beginning of the source file, please extract it to a text file (remove the unnecessary *'s and so on), ship it as Source1 and put it into %doc.
And yes: you should use %{?dist} in the Release line.
(In reply to comment #3) > - optflags are not used. Use > gcc %{optflags} -o unzoo -DSYS_IS_UNIX -O unzoo.c > in the build phase. One comment: "-O" overwrites "-O2" optimization level used in %optflags, so when using %optflags "-O" argument should be removed.
(In reply to comment #5) > (In reply to comment #3) > > - optflags are not used. Use > > gcc %{optflags} -o unzoo -DSYS_IS_UNIX -O unzoo.c > > in the build phase. > > One comment: > "-O" overwrites "-O2" optimization level used in %optflags, > so when using %optflags "-O" argument should be removed. Right you are: only the value of the last argument is used. Thanks. John: Please remove the -O flag, since %{optflags} already contain the necessary optimizations.
Spec URL: http://linville.fedorapeople.org/unzoo.spec SRPM URL: http://linville.fedorapeople.org/unzoo-4.4-2.fc10.src.rpm - Use 'gcc %{optflags}' for compile - Remove '-O' from compile command - Compile %{SOURCE0} to avoid unnecessary copy operation during prep phase - Move rm -rf %{buildroot} to the top of the install phase - Generate unzoo.txt from unzoo.c during prep phase and change %doc line to match - Use install -Dpm 755 unzoo %{buildroot}%{_bindir}/unzoo - Add %{?dist} to the Release line
Review: rpmlint output: unzoo.src: W: mixed-use-of-spaces-and-tabs (spaces: line 1, tab: line 25) unzoo.src: W: no-version-in-last-changelog unzoo.x86_64: W: no-version-in-last-changelog unzoo.x86_64: W: unstripped-binary-or-object /usr/bin/unzoo 2 packages and 0 specfiles checked; 0 errors, 4 warnings. MUST: - Add versions to changelog. - Get rpmbuild to strib binary and build debuginfo package. I have no idea why it isn't doing that at the moment... MUST: The spec file for the package is legible and macros are used consistently. OK MUST: The package must be named according to the Package Naming Guidelines. OK MUST: The spec file name must match the base package %{name}. OK MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines. OK MUST: The License field in the package spec file must match the actual license. OK MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. OK MUST: The package MUST successfully compile and build into binary rpms. OK MUST: The spec file MUST handle locales properly. OK MUST: Packages containing shared library files must call ldconfig. OK MUST: A package must own all directories that it creates or require the package that owns the directory. OK MUST: Files only listed once in %files listings. OK MUST: Permissions on files must be set properly. OK MUST: Clean section exists. OK MUST: Large documentation files must go in a -doc subpackage. OK MUST: Items in %doc do not affect runtime of application. OK MUST: Header files must be in a -devel package. OK MUST: Static libraries must be in a -static package. OK MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig'. OK MUST: If a package contains library files with a suffix then library files ending in .so must go in a -devel package. OK MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency. OK MUST: Packages does not contain any .la libtool archives. OK MUST: Desktop files are installed properly. OK MUST: No file conflicts with other packages and no general names. OK MUST: Buildroot cleaned before install. OK SHOULD: %{?dist} tag is used in release. OK SHOULD: If the package does not include license text(s) as separate files from upstream, the packager should query upstream to include it. ~OK SHOULD: The package builds in mock. OK
Spec URL: http://linville.fedorapeople.org/unzoo.spec SRPM URL: http://linville.fedorapeople.org/unzoo-4.4-3.fc10.src.rpm * Thu Mar 26 2009 John W. Linville <linville> - 4.4-3.fc10 - Use setup macro in prep phase (cleaner spec, generates debuginfo) - Add release info in changelog rpmlint output: 1 packages and 1 specfiles checked; 0 errors, 0 warnings. I was doing some setup manually, since a bare %setup doesn't grok a single .c file. Digging-up the right options for %setup not only cleans-up the .spec file but also generates the debuginfo package. :-)
rpmlint output is now clean, however the debuginfo package is not complete: the source code is missing from it. Copy the source file to the build directory, then the source code is included in debuginfo. Your setup and build phases should like the following: %setup -Tc -n %{name}-%{version} cp -a %{SOURCE0} . cat unzoo.c | sed -e '/SYNTAX/,/\*\//!d' | cut -c5- > unzoo.txt %build gcc %{optflags} -o unzoo -DSYS_IS_UNIX unzoo.c PS. Don't put the dist tag in the changelog, since you can use the same spec to build on any Fedora/RHEL release.
Spec URL: http://linville.fedorapeople.org/unzoo.spec SRPM URL: http://linville.fedorapeople.org/unzoo-4.4-4.fc10.src.rpm * Thu Mar 26 2009 John W. Linville <linville> - 4.4-4 - Copy source to build directory so it is included in debuginfo rpm2cpio ../RPMS/x86_64/unzoo-debuginfo-4.4-4.fc10.x86_64.rpm | cpio -idt ./usr/lib/debug ./usr/lib/debug/.build-id ./usr/lib/debug/.build-id/73 ./usr/lib/debug/.build-id/73/6e399c036b54a296e1fd08e41012249eeb9053 ./usr/lib/debug/.build-id/73/6e399c036b54a296e1fd08e41012249eeb9053.debug ./usr/lib/debug/usr ./usr/lib/debug/usr/bin ./usr/lib/debug/usr/bin/unzoo.debug ./usr/src/debug/unzoo-4.4 ./usr/src/debug/unzoo-4.4/unzoo.c 311 blocks
No need to tag NEEDINFO every time you update the spec :) OK, now the package looks better. btw, you can see the file list simply by using rpm -qpl, no need for rpm2cpio... The package adheres to the guidelines and is thus APPROVED.
New Package CVS Request ======================= Package Name: unzoo Short Description: ZOO archive extractor Owners: linville Branches: F-10 InitialCC: linville
CVS Done
unzoo-4.4-4.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/unzoo-4.4-4.fc10
Great, now we can update the deco-archive package so that deco can use unzoo instead of zoo, which is not available in Fedora. Where can we download .zoo files for testing?
unzoo-4.4-4.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
Anyway, I rebuilt deco-archive with unzoo support.
Package Change Request ====================== Package Name: unzoo New Branches: el5 el6 Owners: linville
Git done (by process-git-requests).
Package Change Request ====================== Package Name: unzoo New Branches: el7 Owners: linville
Package Change Request ====================== Package Name: unzoo New Branches: epel7 Owners: linville