Bug 491875 - Review Request: unzoo - ZOO archive extractor
Summary: Review Request: unzoo - ZOO archive extractor
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Susi Lehtola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-24 14:13 UTC by John W. Linville
Modified: 2014-07-16 18:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-01 17:49:25 UTC
Type: ---
Embargoed:
susi.lehtola: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description John W. Linville 2009-03-24 14:13:22 UTC
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.

Comment 1 John W. Linville 2009-03-24 14:19:09 UTC
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?

Comment 2 Susi Lehtola 2009-03-24 21:48:46 UTC
Taking on review.

Comment 3 Susi Lehtola 2009-03-24 22:00:53 UTC
- 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.

Comment 4 Susi Lehtola 2009-03-24 22:01:28 UTC
And yes: you should use %{?dist} in the Release line.

Comment 5 Mamoru TASAKA 2009-03-25 05:33:48 UTC
(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.

Comment 6 Susi Lehtola 2009-03-25 07:15:48 UTC
(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.

Comment 7 John W. Linville 2009-03-25 14:25:17 UTC
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

Comment 8 Susi Lehtola 2009-03-25 18:39:23 UTC
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

Comment 9 John W. Linville 2009-03-26 16:56:03 UTC
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. :-)

Comment 10 Susi Lehtola 2009-03-26 17:19:15 UTC
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.

Comment 11 John W. Linville 2009-03-27 01:52:50 UTC
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

Comment 12 Susi Lehtola 2009-03-27 07:13:53 UTC
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.

Comment 13 John W. Linville 2009-03-31 18:03:00 UTC
New Package CVS Request
=======================
Package Name: unzoo
Short Description: ZOO archive extractor
Owners: linville
Branches: F-10
InitialCC: linville

Comment 14 Dennis Gilmore 2009-04-01 16:36:30 UTC
CVS Done

Comment 15 Fedora Update System 2009-04-01 17:48:35 UTC
unzoo-4.4-4.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/unzoo-4.4-4.fc10

Comment 16 Orcan Ogetbil 2009-04-01 19:52:26 UTC
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?

Comment 17 Fedora Update System 2009-04-02 17:13:05 UTC
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.

Comment 18 Orcan Ogetbil 2009-04-05 01:50:48 UTC
Anyway, I rebuilt deco-archive with unzoo support.

Comment 19 John W. Linville 2012-07-12 18:32:49 UTC
Package Change Request
======================
Package Name: unzoo
New Branches: el5 el6
Owners: linville

Comment 20 Jason Tibbitts 2012-07-13 22:52:36 UTC
Git done (by process-git-requests).

Comment 21 John W. Linville 2014-07-16 18:20:13 UTC
Package Change Request
======================
Package Name: unzoo
New Branches: el7
Owners: linville

Comment 22 John W. Linville 2014-07-16 18:21:12 UTC
Package Change Request
======================
Package Name: unzoo
New Branches: epel7
Owners: linville

Comment 23 Gwyn Ciesla 2014-07-16 18:32:25 UTC
Git done (by process-git-requests).


Note You need to log in before you can comment on or make changes to this bug.