Bug 1055005

Summary: Review Request: system-config-repo - Administrate a single yum repository file.
Product: [Fedora] Fedora Reporter: Alec Leamas <leamas.alec>
Component: Package ReviewAssignee: Sergio Pascual <sergio.pasra>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: package-review, sergio.pasra
Target Milestone: ---Flags: sergio.pasra: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: system-config-repo-0-2.20140117git3318cd6.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-03 02:43:22 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 Alec Leamas 2014-01-17 23:00:47 UTC
Spec URL:http://leamas.fedorapeople.org/system-config-repo/1/system-config-repo.spec
SRPM URL: http://leamas.fedorapeople.org/system-config-repo/1/system-config-repo-0-1.c112d69.fc20.src.rpm

Description:
system-config-repo provides a simple graphical interface to a single yum repository file in /etc/yum.repos.d. Using the GUI user can inspect and modify whether the repository is enabled and/or signed. It's also possible to see the underlying file.

Application is primarely intended as a GUI for packaged 3rd-party
repositories but is designed to work in a consistent way for any
repository file.

Fedora Account System Username: leamas

rpmlint notes:

system-config-repo.noarch: E: non-readable /etc/sudoers.d/system-config-repo 0440L

This is a security sensitive file with restricted access.

system-config-repo.noarch: W: desktopfile-without-binary /usr/share/applications/system-config-repo.desktop system-config-repo

Looks like a rpmlint bug. According to the explanation the desktop file should refer to a binary not in the package - which /usr/bin/system-config-repo obviously is.

system-config-repo.src: W: file-size-mismatch system-config-repo-0-c112d69.tar.gz = 552287, https://github.com/leamas/system-config-repo/archive/c112d697b54a596eec37f8eae3ab2a531f572627/system-config-repo-0-c112d69.tar.gz = 552274

This beats me. The files are identical, diff -r shows no difference. One is created from a local repository, one downloaded from github.

Comment 1 Sergio Pascual 2014-01-20 11:49:57 UTC
Package Review
==============

There are some problems, I will post them in the next comment

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== MUST items =====

Generic:
[X]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[X]: License field in the package spec file matches the actual license.
[!]: Package must own all directories that it creates.
[X]: Package contains no bundled libraries without FPC exception.
[X]: Changelog in prescribed format.
[X]: Sources contain only permissible code or content.
[-]: Development files must be in a -devel package
[X]: Package uses nothing in %doc for runtime.
[X]: Package consistently uses macros (instead of hard-coded directory names).
[!]: Package is named according to the Package Naming Guidelines.
[X]: Package does not generate any conflict.
[X]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[!]: Requires correct, justified where necessary.
[X]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[X]: update-desktop-database is invoked in %post and %postun if package
     contains desktop file(s) with a MimeType: entry.
[X]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
[X]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: 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.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package contains desktop file if it is a GUI application.
[x]: Package installs a %{name}.desktop using desktop-file-install or desktop-
     file-validate if there is such a file.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package do not use a name that already exist
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[X]: Python eggs must not download any dependencies during the build process.
[-]: A package which is used by another package via an egg interface should
     provide egg info.
[X]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep
===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate file
     from upstream, the packager SHOULD query upstream to include it.
[!]: Final provides and requires are sane (see attachments).
[X]: Package functions as described.
[X]: Latest version is packaged.
[-]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[X]: Packages should try to preserve timestamps of original installed files.
[X]: update-mime-database is invoked in %post and %postun if package stores
     mime configuration in /usr/share/mime/packages.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: Dist tag is present (not strictly required in GL).
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.

Rpmlint
-------
Checking: system-config-repo-0-1.c112d69.fc21.noarch.rpm
          system-config-repo-0-1.c112d69.fc21.src.rpm
system-config-repo.noarch: W: spelling-error %description -l en_US primarely -> primarily, primary
system-config-repo.noarch: E: non-readable /etc/sudoers.d/system-config-repo 0440L
system-config-repo.noarch: W: desktopfile-without-binary /usr/share/applications/system-config-repo.desktop system-config-repo
system-config-repo.src: W: spelling-error %description -l en_US repos -> ropes, reps, repose
system-config-repo.src: W: spelling-error %description -l en_US primarely -> primarily, primary
system-config-repo.src: W: file-size-mismatch system-config-repo-0-c112d69.tar.gz = 552287, https://github.com/leamas/system-config-repo/archive/c112d697b54a596eec37f8eae3ab2a531f572627/system-config-repo-0-c112d69.tar.gz = 552274
2 packages and 0 specfiles checked; 1 errors, 5 warnings.

Requires
--------
system-config-repo (rpmlib, GLIBC filtered):
    /bin/bash
    /bin/sh
    /usr/bin/bash
    config(system-config-repo)
    hicolor-icon-theme

Provides
--------
system-config-repo:
    application()
    application(system-config-repo.desktop)
    config(system-config-repo)
    mimehandler(application/x-yum-repositories)
    system-config-repo

Source checksums
----------------
https://github.com/leamas/system-config-repo/archive/c112d697b54a596eec37f8eae3ab2a531f572627/system-config-repo-0-c112d69.tar.gz :
  CHECKSUM(SHA256) this package     : 9eabfacb736c5bf15c997d7cd6ba58c11e32ab4516f846c3e763f36f1966bc58
  CHECKSUM(SHA256) upstream package : 066f2c38b7e6bac773834e2e1b18b93f93c6462b33b2717bdd1e909bdbdeb711
However, diff -r shows no differences

Comment 2 Sergio Pascual 2014-01-20 12:39:09 UTC
Problems (blocker)
===================

* Naming: according to the guidelines[1] a snapshot package has a release tage of the form "date-of-checkout vcs-name commit-id". In your case something like 20140120gitc112d69

In addition, depending if the package is a pre relase or a post release, the full version must be:

# pre release
Release: 0.1.%{checkout}%{?dist}

# post release
Release: 1.%{checkout}%{?dist}

where checkout is

%global checkout 20140120git%{shortcommit}

Your package is a pre release, isn't it?


* Python requires and bytecompiling: your package is python 3 based but the python sources are installed in a private directory. Some of the things RPM does for packages under python system directories aren't done (properly), namely:

 - bytecompilling [2], RPM is using python 2.7 to generate the .pyc and .pyo of your package. If you define  

 %global __python %{__python3}

  RPM will use python3 for bytecompilling

 - Python 3 runtime, your package does not have a Requires on python3. It's generated automatically for packages under python system directory. I haven't found a better way than an explicit 
  Requires: python(abi) = 3.3

* Directories: if your package requires sudo to run (and I think it does), it should Require it. That way /etc/sudoers.d is not unowned
  Requires: sudo

Non blocker
===========

I think primarely is a typo, I have only found "primarily" in my english dictionary.


[1] https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Snapshot_packages
[2] https://fedoraproject.org/wiki/Packaging:Python#Byte_compiling

Comment 3 Alec Leamas 2014-01-20 13:38:08 UTC
(In reply to Sergio Pascual from comment #2)
> Problems (blocker)
> ===================
> 
> * Naming: according to the guidelines[1] a snapshot package has a release
> tage of the form "date-of-checkout vcs-name commit-id". In your case
> something like 20140120gitc112d69
> 
> In addition, depending if the package is a pre relase or a post release, the
> full version must be:
> 
> # pre release
> Release: 0.1.%{checkout}%{?dist}
> 
> # post release
> Release: 1.%{checkout}%{?dist}
> 
> where checkout is
> 
> %global checkout 20140120git%{shortcommit}
> 
> Your package is a pre release, isn't it?
Yup, and fixed (You are right. That said, I really dislike these GL when applied here. But that's another story).


> * Python requires and bytecompiling: your package is python 3 based but the
> python sources are installed in a private directory. Some of the things RPM
> does for packages under python system directories aren't done (properly),
> namely:
> 
>  - bytecompilling [2], RPM is using python 2.7 to generate the .pyc and .pyo
> of your package. If you define  
> 
>  %global __python %{__python3}
> 
>   RPM will use python3 for bytecompilling
Thanks for good catch! Fixed.


>  - Python 3 runtime, your package does not have a Requires on python3. It's
> generated automatically for packages under python system directory. I
> haven't found a better way than an explicit 
>   Requires: python(abi) = 3.3
Thanks again for good catch, fixed using >= 3.3 . Also added R: python3-gobject and R: gtk3 for the glib/gtk3 introspections stuff. Might be missing something more here...

In case you wonder about it (?) I don't want to install this under the python system directory since it doesn't contain anything which should be used by other packages.


> * Directories: if your package requires sudo to run (and I think it does),
> it should Require it. That way /etc/sudoers.d is not unowned
>   Requires: sudo
Indeed, fixed.

 
> Non blocker
> ===========
> 
> I think primarely is a typo, I have only found "primarily" in my english
> dictionary.
No typo. Bad Englisch, not my native language. Fixed


spec: http://leamas.fedorapeople.org/system-config-repo/2/system-config-repo.spec
srpm: http://leamas.fedorapeople.org/system-config-repo/2/system-config-repo-0-0.2.20140117gitc112d69.fc20.src.rpm

Comment 4 Sergio Pascual 2014-01-20 14:33:10 UTC
> 
> >  - Python 3 runtime, your package does not have a Requires on python3. It's
> > generated automatically for packages under python system directory. I
> > haven't found a better way than an explicit 
> >   Requires: python(abi) = 3.3
> Thanks again for good catch, fixed using >= 3.3 . 

I don't think you can do that (>= 3.3). Even if the code is compatible between 3.3 and (say), 3.4, the pyc and pyc have to be recompiled for each version of the interpreter.

Instead of the explicit version you can use

Requires:  python(abi) = %{python3_version}

Comment 5 Alec Leamas 2014-01-20 16:26:38 UTC
(In reply to Sergio Pascual from comment #4)
> > 
> > >  - Python 3 runtime, your package does not have a Requires on python3. It's
> > > generated automatically for packages under python system directory. I
> > > haven't found a better way than an explicit 
> > >   Requires: python(abi) = 3.3
> > Thanks again for good catch, fixed using >= 3.3 . 
> 
> I don't think you can do that (>= 3.3). Even if the code is compatible
> between 3.3 and (say), 3.4, the pyc and pyc have to be recompiled for each
> version of the interpreter.
> 
> Instead of the explicit version you can use
> 
> Requires:  python(abi) = %{python3_version}

Yes, that must be the way to do it, fixed. Thanks!  New links:

spec: http://leamas.fedorapeople.org/system-config-repo/3/system-config-repo.spec
srpm: http://leamas.fedorapeople.org/system-config-repo/3/system-config-repo-0-0.3.20140117gitc112d69.fc20.src.rpm

Comment 6 Sergio Pascual 2014-01-20 16:32:15 UTC
Fine, this is approved

Comment 7 Alec Leamas 2014-01-20 17:18:57 UTC
Thanks for review and some really good catches!

Comment 8 Alec Leamas 2014-01-20 17:23:49 UTC
New Package SCM Request
=======================
Package Name: system-config-repo
Short Description: Administrate a single yum repository file
Owners: leamas
Branches: f19 f20
InitialCC:

Comment 9 Gwyn Ciesla 2014-01-21 14:09:31 UTC
Git done (by process-git-requests).

Comment 10 Fedora Update System 2014-01-21 16:33:04 UTC
system-config-repo-0-1.20140117git3318cd6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/system-config-repo-0-1.20140117git3318cd6.fc19

Comment 11 Fedora Update System 2014-01-21 16:35:35 UTC
system-config-repo-0-1.20140117git3318cd6.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/system-config-repo-0-1.20140117git3318cd6.fc20

Comment 12 Fedora Update System 2014-01-22 23:03:15 UTC
system-config-repo-0-1.20140117git3318cd6.fc19 has been pushed to the Fedora 19 testing repository.

Comment 13 Fedora Update System 2014-01-25 08:44:15 UTC
system-config-repo-0-2.20140117git3318cd6.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/system-config-repo-0-2.20140117git3318cd6.fc20

Comment 14 Fedora Update System 2014-01-25 08:45:18 UTC
system-config-repo-0-2.20140117git3318cd6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/system-config-repo-0-2.20140117git3318cd6.fc19

Comment 15 Fedora Update System 2014-02-03 02:43:22 UTC
system-config-repo-0-2.20140117git3318cd6.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2014-02-03 02:47:07 UTC
system-config-repo-0-2.20140117git3318cd6.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.