Bug 749752

Summary: Review Request: dmg2img - Uncompress the Apple compressed disk image files
Product: [Fedora] Fedora Reporter: Lubomir Rintel <lkundrak>
Component: Package ReviewAssignee: Scott Tsai <scottt.tw>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: hobbes1069, notting, package-review, scottt.tw
Target Milestone: ---Flags: scottt.tw: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-13 17:59:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
[PATCH] don't strip binaries none

Description Lubomir Rintel 2011-10-28 08:47:47 UTC
Description:

This package contains dmg2img utility that is able to uncompress compressed dmg 
files into plain disk or filesystem images.

SPEC: http://v3.sk/~lkundrak/SPECS/dmg2img.spec
SRPM: http://v3.sk/~lkundrak/SRPMS/dmg2img-1.6.2-1.el6.src.rpm

Comment 1 Richard Shaw 2011-11-12 20:18:50 UTC
Are you interested in a review swap? I need the following reviewed:

https://bugzilla.redhat.com/show_bug.cgi?id=753453

Here's my initial review:

1. You're missing a "BuildRequires: openssl-devel"

2. Unless it's required for EL (I'm a Fedora guy) using macros for basic commands is discouraged. Just use make instead of the macro for make.

Richard

Comment 2 Scott Tsai 2011-12-22 11:31:33 UTC
Created attachment 549174 [details]
[PATCH] don't strip binaries

This patch adds a STRIP variable to dmg2img's Makefile.
You can build with
   make STRIP=0
to produce unstripped binaries and non empty debuginfo packages

I just emailed this patch to dmg2img's author as listed in the README file, Jean-Pierre Demailly <demailly.fr>

Comment 3 Scott Tsai 2011-12-22 12:10:48 UTC
Some issues I see:

1. I think license should be "GPLv2+ and MIT". Since the COPYING file included in the upstream tarball contains GPLv2 I think we should use "GPLv2+" instead of "GPL+".

2. As noted by Richard in comment #1, "BuildRequires: openssl-devel" is required to build vfdecrypt

3. Dist tag in release field should be %{?dist} instead of %{dist}

4. Unless you're packaging for EPEL 5, I recommend you:
  Remove the BuildRoot tag
  Use make instead of %{__make}
  Remove "rm -rf $RPM_BUILD_ROOT" in the %install section
  Remove the %clean section
  Remove %defattr from the %files section

5. The dmg2img-1.6.2-nostrip.patch already used in the patch and the patch I attached both work to produce non empty debuginfo packages. I think my version has a better chance of being accepted in a future upstream version but that may just be wishful thinking.


Package Review
==============

Key:
- = N/A
x = Pass
! = Fail
? = Not evaluated



==== C/C++ ====
[x]: MUST Package does not contain any libtool archives (.la)
[x]: MUST Package does not contain kernel modules.
[x]: MUST Package contains no static executables.
[x]: MUST Rpath absent or only used for internal libs.
[x]: MUST Package is not relocatable.


==== Generic ====
[x]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: MUST Package successfully compiles and builds into binary rpms on at
     least one supported architecture.
[!]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.

Unless "BuildRequires: openssl-devel" is added to the spec, it won't build in mock.

[!]: MUST Buildroot is not present
     Note: Buildroot is not needed unless packager plans to package for EPEL5

I recommend removing the BuildRoot tag.

[x]: MUST Package contains no bundled libraries.
[x]: MUST Changelog in prescribed format.
[!]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean is needed only if supporting EPEL
[x]: MUST Sources contain only permissible code or content.
[!]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: defattr(....) present in %files section. This is OK if packaging
     for EPEL5. Otherwise not needed
[x]: MUST Macros in Summary, %description expandable at SRPM build time.
[x]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[x]: MUST Package is not known to require ExcludeArch.
[x]: MUST Permissions on files are set properly.
[x]: MUST Package does not contain duplicates in %files.
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[!]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf is only needed if supporting EPEL5
[x]: MUST If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %doc.
[!]: MUST License field in the package spec file matches the actual license.

As noted above I think the License should be "GPLv2+ and MIT".

[x]: MUST Package consistently uses macros (instead of hard-coded directory
     names).
[x]: MUST Package meets the Packaging Guidelines.
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generates any conflict.
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[x]: MUST Package must own all directories that it creates.
[x]: MUST Package does not own files or directories owned by other packages.
[x]: MUST Package installs properly.

Package installs if the missing BuildRequires is fixed.

[x]: MUST Requires correct, justified where necessary.

Requires are correct if the missing BuildRequires is fixed.

[x]: MUST Rpmlint output is silent.
rpmlint output:
dmg2img.x86_64: W: spelling-error Summary(en_US) Uncompress -> Uncompressed, Compression, Compressor
dmg2img.x86_64: W: spelling-error %description -l en_US uncompress -> uncompressed, compression, compressor
dmg2img.x86_64: W: spelling-error %description -l en_US dmg -> mg, deg, dig
dmg2img.x86_64: W: spelling-error %description -l en_US filesystem -> file system, file-system, systemically
dmg2img.x86_64: W: no-manual-page-for-binary dmg2img
dmg2img.src: W: spelling-error Summary(en_US) Uncompress -> Uncompressed, Compression, Compressor
dmg2img.src: W: spelling-error %description -l en_US uncompress -> uncompressed, compression, compressor
dmg2img.src: W: spelling-error %description -l en_US dmg -> mg, deg, dig
dmg2img.src: W: spelling-error %description -l en_US filesystem -> file system, file-system, systemically
3 packages and 0 specfiles checked; 0 errors, 9 warnings.

The 8 spelling-error's can all be ignored and dmg2img not having a man page shouldn't block this.

[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
/home/scottt/work/dmg2img/dmg2img-1.6.2.tar.gz :
  MD5SUM this package     : 296d35daab76d63ff6adad54113a8caa
  MD5SUM upstream package : 296d35daab76d63ff6adad54113a8caa

[x]: MUST Spec file is legible and written in American English.
[x]: MUST Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: MUST Package contains a SysV-style init script if in need of one.
[x]: MUST File names are valid UTF-8.
[!]: SHOULD Reviewer should test that the package builds in mock.

Build succeeds if missing BuildRequires is fixed.

[x]: SHOULD If the source package does not include license text(s) as a
     separate file from upstream, the packager SHOULD query upstream to
     include it.
[!]: SHOULD Dist tag is present.

Use %{?dist} instead of %{dist}

[x]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin,
     /usr/sbin.
[x]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).

They look sane once the missing BuildRequires is fixed.

[x]: SHOULD Package functions as described.
[x]: SHOULD Package does not include license text files separate from
     upstream.
[x]: SHOULD Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[x]: SHOULD SourceX / PatchY prefixed with %{name}.
[x]: SHOULD SourceX is a working URL.
[-]: SHOULD Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: SHOULD Package should compile and build into binary rpms on all supported
     architectures.
[-]: SHOULD %check is present and all tests pass.
[x]: SHOULD Packages should try to preserve timestamps of original installed
     files.
[x]: SHOULD Spec use %global instead of %define.

I would approve this package once the above issues are fixed.

Comment 4 Richard Shaw 2012-01-03 15:36:04 UTC
Ping!

Is the requester still interested in this review request?

Comment 5 Lubomir Rintel 2012-01-08 23:10:24 UTC
Thank you for your review.
Updated packages:

SPEC: http://v3.sk/~lkundrak/SPECS/dmg2img.spec
SRPM: http://v3.sk/~lkundrak/SRPMS/dmg2img-1.6.2-2.el6.src.rpm

(In reply to comment #3)
> Some issues I see:
> 
> 1. I think license should be "GPLv2+ and MIT". Since the COPYING file included
> in the upstream tarball contains GPLv2 I think we should use "GPLv2+" instead
> of "GPL+".

No. Comment is what decides and author obviously removed the version intentionally.

> 2. As noted by Richard in comment #1, "BuildRequires: openssl-devel" is
> required to build vfdecrypt

Fixed.

> 3. Dist tag in release field should be %{?dist} instead of %{dist}

Fixed.

> 4. Unless you're packaging for EPEL 5, I recommend you:
>   Remove the BuildRoot tag
>   Use make instead of %{__make}
>   Remove "rm -rf $RPM_BUILD_ROOT" in the %install section
>   Remove the %clean section
>   Remove %defattr from the %files section

I want el5 builds to work and will probably be submitting the package for el5.
I changed the %make macro for make though.

> 5. The dmg2img-1.6.2-nostrip.patch already used in the patch and the patch I
> attached both work to produce non empty debuginfo packages. I think my version
> has a better chance of being accepted in a future upstream version but that may
> just be wishful thinking.

I believe conditional stripping is not a good idea. If upstream accepts your patch, I'll gladly drop mine though.

Comment 6 Scott Tsai 2012-01-11 02:53:52 UTC
(In reply to comment #5)
> > 1. I think license should be "GPLv2+ and MIT". Since the COPYING file included
> > in the upstream tarball contains GPLv2 I think we should use "GPLv2+" instead
> > of "GPL+". 
> No. Comment is what decides and author obviously removed the version
> intentionally.

Fair enough. The rest of the spec changes are fine.
http://koji.fedoraproject.org/koji/taskinfo?taskID=3637610

APPROVED.

Comment 7 Lubomir Rintel 2012-01-12 10:58:03 UTC
New Package SCM Request
=======================
Package Name: dmg2img
Short Description: Uncompress the Apple compressed disk image files
Owners: lkundrak
Branches: f15 f16 el6 el5

Comment 8 Scott Tsai 2012-01-13 02:01:32 UTC
(In reply to comment #7)
Lubomir, I think you forgot to set fedora-cvs flag to "?"

Comment 9 Gwyn Ciesla 2012-01-13 02:50:25 UTC
Git done (by process-git-requests).

Comment 10 Lubomir Rintel 2012-02-13 17:59:09 UTC
Imported and built. Thank you!