Bug 481030

Summary: Review Request: emacs-pmd - an interface to PMD for (X)Emacs
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: Package ReviewAssignee: Susi Lehtola <susi.lehtola>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bjrosen, fedora-package-review, notting, susi.lehtola
Target Milestone: ---Flags: susi.lehtola: fedora-review+
kevin: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.6-2.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-11 23:36:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jerry James 2009-01-21 20:12:42 UTC
Spec URL: http://jjames.fedorapeople.org/pmd-emacs/pmd-emacs.spec
SRPM URL: http://jjames.fedorapeople.org/pmd-emacs/pmd-emacs-0.6-1.src.rpm
Description: pmd-emacs supports the invocation of PMD from within (X)Emacs.  Specifically, it supplies function pmd-current-buffer and pmd-current-dir, and enables parsing of the resulting list of PMD complaints so that, for example, next-error will walk through the list correctly.

Comment 1 Susi Lehtola 2009-08-13 19:58:44 UTC
Taking over review. Joshua Rosen will perform an informal review first.

Comment 2 Joshua Rosen 2009-08-14 12:18:28 UTC
This is an informal review, I'm new to the packaging process.

Everything looks good to me. There are no rpmlint errors, the md5sums match, I was able to build it.

#  MUST: rpmlint must be run on every package. The output should be posted in the review.[1]	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}, in the format %{name}.spec unless your package has an exemption. [2] . OK
# MUST: The package must meet the Packaging Guidelines . 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. [3] OK
# MUST: The spec file must be written in American English. [5] OK
# MUST: The spec file for the package MUST be legible. [6] OK
# MUST: The sources used to build the package must match the upstream source OK
# MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture. OK
# MUST: If the package does not successfully compile, build or work on an architecture, NA
# MUST: All build dependencies must be listed in BuildRequires OK
# MUST: The spec file MUST handle locales properly. NA
# MUST: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths NA
# MUST: If the package is designed to be relocatable, NA
# MUST: A package must own all directories that it creates. OK
# MUST: A Fedora package must not list a file more than once in the spec file's %files listings. OK
# MUST: Permissions on files must be set properly. Executables should be set with executable permissions, OK
# MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT). OK
# MUST: Each package must consistently use macros. OK
# MUST: The package must contain code, or permissable content. OK
# MUST: Large documentation files must go in a -doc subpackage. NA
# MUST: If a package includes something as %doc, it must not affect the runtime of the application. OK
# MUST: Header files must be in a -devel package. NA
# MUST: Static libraries must be in a -static package. NA
# MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability). OK
# MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) 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: Requires: %{name} = %{version}-%{release} OK
# MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.OK
# MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. NA
# MUST: Packages must not own files or directories already owned by other packages. OK
# MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or $RPM_BUILD_ROOT). OK
# MUST: All filenames in rpm packages must be valid UTF-8 OK

Comment 3 Susi Lehtola 2009-08-14 20:17:58 UTC
Joshua: rpmlint is not silent.

pmd-emacs-el.noarch: W: no-documentation
pmd-xemacs-el.noarch: W: no-documentation
5 packages and 0 specfiles checked; 0 errors, 2 warnings.

These are, however, OK.

**

As an (X)Emacs package, the Emacs guidelines are applied.
http://fedoraproject.org/wiki/Packaging:Emacs

The name of the package is incorrect, it should be emacs-common-pmd, and the names of the other packages should be {x,}emacs-pmd{,-el}.

See e.g.
http://fedoraproject.org/wiki/Packaging:Emacs#Template_for_a_package_for_both_GNU_Emacs_and_XEmacs

**

If you're using a space to separate BR:s, don't use a comma in
Requires:       xemacs(bin) >= %{xemacs_version}, xemacs-packages-extra

As %install is a bit long, you could add additional space around it.

Comment 4 Joshua Rosen 2009-08-14 20:44:32 UTC
I've just submitted some comments on 483863. I'm blocked by a missing -devel package. I'm not sure where to get it.



I didn't get any rpmlint errors on the pmd package

rpmlint pmd-emacs.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

Comment 5 Jerry James 2009-08-21 15:48:37 UTC
With respect to comment 3, I have fixed the names.  Note that there is no common element, so I have not created an emacs-common-pmd package, which would be empty.

With respect to comment 4, I am utterly confused by the first paragraph.  What on earth are you talking about?  As for the second part, you only ran rpmlint on the spec file, not on the packages.

Thanks for the review.

New files are here:
http://jjames.fedorapeople.org/emacs-pmd/emacs-pmd-0.6-1.fc11.src.rpm
http://jjames.fedorapeople.org/emacs-pmd/emacs-pmd.spec

Comment 6 Susi Lehtola 2009-08-21 15:56:05 UTC
(In reply to comment #5)
> With respect to comment 4, I am utterly confused by the first paragraph.  What
> on earth are you talking about?  As for the second part, you only ran rpmlint
> on the spec file, not on the packages.

Joshua's comment was not related to this review. He's a new packager, and the comment was related to the sponsorship process.

Comment 7 Susi Lehtola 2009-08-21 16:14:52 UTC
emacs-pmd-el.noarch: W: no-documentation
xemacs-pmd-el.noarch: W: no-documentation
5 packages and 0 specfiles checked; 0 errors, 2 warnings.

These are expected.

**

Change the %define's into %global's, unless you have a specific reason to use %define's.

**

 %define xemacs_lispdir  %{_datadir}/xemacs/site-packages/lisp
should be
 %global xemacs_lispdir %{_datadir}/xemacs/site-packages
as per http://fedoraproject.org/wiki/Packaging:Emacs#Template_for_a_package_for_both_GNU_Emacs_and_XEmacs

N.B. the difference in %files of the spec file template and your version
%files -n emacs-%{pkg}
%defattr(-,root,root,-)
%{emacs_lispdir}/%{pkg}/*.elc
%{emacs_startdir/*.el
%dir %{emacs_lispdir}/%{pkg}

%files -n emacs-%{pkg}-el
%defattr(-,root,root,-)
%{emacs_lispdir}/%{pkg}/*.el

"For GNU Emacs, files for add-on package foo should be placed in /usr/share/emacs/site-lisp/foo."
"For XEmacs, files for add-on package foo should be placed in /usr/share/xemacs/site-packages/lisp/foo."


**

As instructed by the Emacs packaging guideline, change the main package to emacs-common-pmd and put the %doc there, no need to replicate it in emacs-pmd and xemacs-pmd.

**

Comment 8 Jerry James 2009-08-21 20:17:02 UTC
I replaced %define with %global.  I restructured the packages so that emacs-common-pmd is the top-level package.  The %files section now conforms to the guidelines.  New versions:

http://jjames.fedorapeople.org/emacs-pmd/emacs-common-pmd-0.6-2.fc11.src.rpm
http://jjames.fedorapeople.org/emacs-pmd/emacs-common-pmd.spec

Comment 9 Susi Lehtola 2009-09-07 15:44:59 UTC
Whoops, this slipped under my radar.

**

License is OK
Source matches upstream
Spec conforms to Emacs guidelines
Time stamps are kept

**

I find it a bit of an overkill to use wildcards for a single file, so I'd replace e.g.
 %{emacs_lispdir}/%{pkg}/*.elc
 %{emacs_startdir}/*.el
 %dir %{emacs_lispdir}/%{pkg}
with
 %{emacs_startdir}/%{pkg}.el
 %dir %{emacs_lispdir}/%{pkg}
 %{emacs_lispdir}/%{pkg}/%{pkg}.elc
(it's more logical to have the dir before its contents on the list).

With this note the package is

APPROVED

Comment 10 Jerry James 2009-09-08 16:38:37 UTC
Thank you, Jussi.  I'll make that last change before checking in the package.

New Package CVS Request
=======================
Package Name: emacs-common-pmd
Short Description: An interface to PMD for Emacs
Owners: jjames
Branches: F-11
InitialCC:

Comment 11 Kevin Fenzi 2009-09-09 16:12:44 UTC
cvs done.

Comment 12 Fedora Update System 2009-09-09 21:45:11 UTC
emacs-common-pmd-0.6-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/emacs-common-pmd-0.6-2.fc11

Comment 13 Fedora Update System 2009-09-11 23:35:56 UTC
emacs-common-pmd-0.6-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.