Bug 1255505

Summary: Review Request: dnf-plugin-system-upgrade - DNF plugin to handle system upgrades
Product: [Fedora] Fedora Reporter: Will Woods <wwoods>
Component: Package ReviewAssignee: Adam Williamson <awilliam>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: awilliam, johannespfrang, kevin, me, package-review, panemade
Target Milestone: ---Flags: awilliam: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-22 03:45:14 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:
Bug Depends On:    
Bug Blocks: 1250939    

Description Will Woods 2015-08-20 18:57:36 UTC
Spec URL: https://github.com/rpm-software-management/dnf-plugin-system-upgrade/blob/0.2.0/dnf-plugin-system-upgrade.spec

SRPM URL: https://copr-be.cloud.fedoraproject.org/results/wwoods/dnf-plugin-system-upgrade/fedora-22-x86_64/00109702-dnf-plugin-system-upgrade/dnf-plugin-system-upgrade-0.2.0-1.fc22.src.rpm

Description: This is the DNF plugin to handle system upgrades. It replaces `fedup` for upgrades to F23. See https://fedoraproject.org/wiki/Changes/DNF_System_Upgrades for further info.

Fedora Account System Username: wwoods

This package is intended for F21, F22, F23, and rawhide. For upgrades to work it needs to be present in F21 and F22.

It does not currently provide a replacement for /usr/bin/fedup, but this package should work for a first pass at a review.

Comment 1 Adam Williamson 2015-08-25 16:27:03 UTC
comment: there should be a URL for the source tarball. If you want to use git generated tarballs, follow the guidelines at https://fedoraproject.org/wiki/Packaging:SourceURL#Git_Hosting_Services (which have just been completely changed again, what fun).

Comment 3 Will Woods 2015-08-25 19:43:01 UTC
Also note that version 0.3.0 *does* provide a /usr/bin/fedup backward-compatibility wrapper, so the package now obsoletes fedup.

New packages are currently building in copr.

Comment 4 Will Woods 2015-08-26 19:01:14 UTC
For new packages, see:

  https://copr.fedoraproject.org/coprs/wwoods/dnf-plugin-system-upgrade/builds/

Comment 5 Adam Williamson 2015-08-26 23:44:03 UTC
Package Review
==============

Notes:

* The license file is not included in the module packages, but they can be installed without the main package.
* Creates a file in /usr/lib/systemd/system/system-update.target.wants , but doesn't own it or depend on PackageKit (which owns it).
* Changelog is missing releases (it has '0.3.0', should have '0.3.0-1')
* Might be nice for [Unit] in the service file to include a Documentation= line, per the guidelines: https://fedoraproject.org/wiki/Packaging:Systemd
* The guidelines also say "Unit files should avoid using StandardOutput= or StandardError=", but I'm gonna guess this is a special case?
* "Requires: python-%{name}" is not versioned - perhaps it ought to be?

A few changes required (see [!] items below and notes above), but mostly looks good.

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



===== 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.
[!]: License file installed when any subpackage combination is installed.
[!]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
     Note: Directories without known owners:
     /usr/lib/systemd/system/system-update.target.wants
[x]: Package contains no bundled libraries without FPC exception.
[!]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: The spec file handles locales properly.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: 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.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[x]: Package contains systemd file(s) if in need.
[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.
     Note: Documentation size is 10240 bytes in 1 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 %license.
[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]: Dist tag is present.
[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 does not use a name that already exists.
[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:
[-]: 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:
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[!]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in python3
     -dnf-plugin-system-upgrade , python2-dnf-plugin-system-upgrade
[ ]: Package functions as described.
[x]: Latest version is packaged.
[x]: 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.
[x]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
[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]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Uses parallel make %{?_smp_mflags} macro.
[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: dnf-plugin-system-upgrade-0.3.0-1.fc24.noarch.rpm
          python3-dnf-plugin-system-upgrade-0.3.0-1.fc24.noarch.rpm
          python2-dnf-plugin-system-upgrade-0.3.0-1.fc24.noarch.rpm
          dnf-plugin-system-upgrade-0.3.0-1.fc24.src.rpm
dnf-plugin-system-upgrade.noarch: W: incoherent-version-in-changelog 0.3.0 ['0.3.0-1.fc24', '0.3.0-1']
dnf-plugin-system-upgrade.noarch: W: self-obsoletion fedup < 0.9.2-3 obsoletes fedup
dnf-plugin-system-upgrade.noarch: W: no-manual-page-for-binary fedup
python3-dnf-plugin-system-upgrade.noarch: W: no-documentation
python2-dnf-plugin-system-upgrade.noarch: W: no-documentation
dnf-plugin-system-upgrade.src:11: W: unversioned-explicit-provides dnf-command(system-upgrade)
dnf-plugin-system-upgrade.src:13: W: unversioned-explicit-provides fedup
4 packages and 0 specfiles checked; 0 errors, 7 warnings.




Rpmlint (installed packages)
----------------------------
python2-dnf-plugin-system-upgrade.noarch: W: no-documentation
dnf-plugin-system-upgrade.noarch: W: incoherent-version-in-changelog 0.3.0 ['0.3.0-1.fc24', '0.3.0-1']
dnf-plugin-system-upgrade.noarch: W: self-obsoletion fedup < 0.9.2-3 obsoletes fedup
dnf-plugin-system-upgrade.noarch: W: no-manual-page-for-binary fedup
python3-dnf-plugin-system-upgrade.noarch: W: no-documentation
3 packages and 0 specfiles checked; 0 errors, 5 warnings.



Requires
--------
python2-dnf-plugin-system-upgrade (rpmlib, GLIBC filtered):
    python(abi)
    python-dnf

dnf-plugin-system-upgrade (rpmlib, GLIBC filtered):
    /bin/bash
    python-dnf-plugin-system-upgrade

python3-dnf-plugin-system-upgrade (rpmlib, GLIBC filtered):
    python(abi)
    python3-dnf



Provides
--------
python2-dnf-plugin-system-upgrade:
    python-dnf-plugin-system-upgrade
    python2-dnf-plugin-system-upgrade

dnf-plugin-system-upgrade:
    dnf-command(system-upgrade)
    dnf-plugin-system-upgrade
    fedup

python3-dnf-plugin-system-upgrade:
    python3-dnf-plugin-system-upgrade



Source checksums
----------------
https://github.com/rpm-software-management/dnf-plugin-system-upgrade/archive/0.3.0.tar.gz#/dnf-plugin-system-upgrade-0.3.0.tar.gz :
  CHECKSUM(SHA256) this package     : 9b18064116f91eb49cbcb4f8accbe05c399d07445bc7e1edffe3917e0a012ec8
  CHECKSUM(SHA256) upstream package : 9b18064116f91eb49cbcb4f8accbe05c399d07445bc7e1edffe3917e0a012ec8


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -n dnf-plugin-system-upgrade
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 6 Will Woods 2015-08-31 22:54:07 UTC
(In reply to Adam Williamson from comment #5)
> Package Review
> ==============
> 
> Notes:
> 
> * The license file is not included in the module packages, but they can be
> installed without the main package.

Fixed.

> * Creates a file in /usr/lib/systemd/system/system-update.target.wants , but
> doesn't own it or depend on PackageKit (which owns it).

This is tricky. PackageKit shouldn't own that directory. It *would* be created if we were using 'systemctl enable', but the spec specifically says:

  To make things a bit more robust we recommend hooking the update script
  into system-update.target via a .wants/ symlink in the distribution
  package, rather than depending on "systemctl enable" in the postinst
  scriptlets of your package. 

  More specifically, for your update script create a .service file,
  without [Install] section, and then add a symlink like
  [...]system-update.target.wants/foobar.service → ../foobar.service
  to your package.

Probably we should make systemd own that directory? Or can both PackageKit and dnf-plugin-system-upgrade own it?

> * Changelog is missing releases (it has '0.3.0', should have '0.3.0-1')

Fixed.

> * Might be nice for [Unit] in the service file to include a Documentation=
> line, per the guidelines: https://fedoraproject.org/wiki/Packaging:Systemd

Added; will be expanded when there's a man page.

> * The guidelines also say "Unit files should avoid using StandardOutput= or
> StandardError=", but I'm gonna guess this is a special case?

Yes, because we really do need the output/stderr to go to the screen.

> * "Requires: python-%{name}" is not versioned - perhaps it ought to be?

No, because we want to pull the default version for whichever is the default Python stack; this is handled by the %python_provide nonsense.
See the dnf spec for another example of this behavior.

Comment 7 Adam Williamson 2015-08-31 23:19:41 UTC
It's fine for two packages to own a directory: what it means is that as long as either package is installed, the directory will be kept (it'll only be removed if both packages are removed). I think it's the appropriate move here as there isn't a natural dependency between the two packages.

So I'm gonna say this is APPROVED, assuming you go ahead and make the package own the /usr/lib/systemd/system/system-update.target.wants directory on commit. Thanks!

Comment 9 Will Woods 2015-09-01 20:05:04 UTC
New Package SCM Request
=======================
Package Name: dnf-plugin-system-upgrade
Short Description: System Upgrade plugin for DNF
Upstream URL: https://github.com/rpm-software-management/dnf-plugin-system-upgrade
Owners: wwoods packaging-team
Branches: f21 f22 f23
InitialCC:

Comment 10 Gwyn Ciesla 2015-09-03 13:32:56 UTC
Invalid group "packaging-team" all groups should ends with "-sig".

Also, groups much be in InitialCC

Comment 11 Parag AN(पराग) 2015-09-03 13:56:00 UTC
Well, I just wonder how is this process-git-requests script worked here again by Jon? First Kevin did run that script yesterday. Today Jon ran the same script whereas this request was for new package and not for package change SCM request. Looks like for script it doesn't matter if the request is for new package or existing package.

Comment 12 Adam Williamson 2015-09-03 15:37:27 UTC
seems a bit academic since the branches have been created and packages built already :)

Comment 13 Kevin Fenzi 2015-09-04 16:55:21 UTC
Yeah, I just ran the script as normal, but I don't see any update here... perhaps bugzilla hiccupped? Anyhow, let us know if there's anything more to do here.

Comment 14 Parag AN(पराग) 2015-12-22 03:45:14 UTC
I think package is already built on all requested branches. Let's close this review.