Bug 1224265 - Review Request: udiskie - Automounter for removable media
Summary: Review Request: udiskie - Automounter for removable media
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Raphael Groner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-22 12:22 UTC by Jan Staněk
Modified: 2015-07-28 11:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-28 11:05:36 UTC
Type: ---
Embargoed:
projects.rg: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Jan Staněk 2015-05-22 12:22:45 UTC
Spec URL: https://jstanek.fedorapeople.org/udiskie/udiskie.spec
SRPM URL: https://jstanek.fedorapeople.org/udiskie/udiskie-1.2.0-1.fc21.src.rpm
Description: udiskie is a front-end for UDisks written in python. Its main purpose is automatically mounting removable media, such as CDs or flash drives.
Fedora Account System Username: jstanek

Comment 1 Raphael Groner 2015-05-25 09:54:36 UTC
When installing man pages, note that they should be installed uncompressed as the build system will compress them as needed. The compression method may change.
https://fedoraproject.org/wiki/Packaging:Guidelines#Manpages

rpmbuild will handle that for you magically.


Your spec file has some explicit Requires. Please ensure that all of those referenced packages are available and really needed for all the target distributions (e.g. currently Fedora rawhide, 22, 21, 20, EPEL7, EPEL6, EPEL5, …)
https://fedoraproject.org/wiki/Packaging:Guidelines#Explicit_Requires

Comment 2 Jan Staněk 2015-06-04 11:51:37 UTC
Updated versions:
 - Spec URL: https://jstanek.fedorapeople.org/udiskie/udiskie.spec
 - SRPM URL: https://jstanek.fedorapeople.org/udiskie/udiskie-1.2.0-1.fc23.src.rpm

Changes:
 - Man pages compressing was left to rpmbuild
 - Revised the Requires. Unfortunately, the rpmbuild does not automatically pick dependencies for python modules, so they need to be specified explicitly. Also made sure that the package builds on Fedora Rawhide, 22, 21 and 20 and EPEL 7. EPEL 6 and older lacks udisks2, so building a wrapper for it there makes no sense.
 - Added polkit rules, extracted from README file, as separate source and %config file.

Comment 3 Raphael Groner 2015-06-04 12:08:31 UTC
Thanks for the fixes. As I am on vacation currently, could we postpone the official review till to not earlier than the end of next week? Maybe someone else have time to do it earlier if it is urgent, though.

Please remove this command from %install: rm -rf %{buildroot}
It's not needed since EPEL7 and Fedora20+. As you wrote there is not going to happen an EPEL6 build, this rm command is obsolete.

Comment 4 Jan Staněk 2015-06-04 12:36:26 UTC
(In reply to Raphael Groner from comment #3)
> Thanks for the fixes. As I am on vacation currently, could we postpone the
> official review till to not earlier than the end of next week? Maybe someone
> else have time to do it earlier if it is urgent, though.
It is not urgent, so I'm fine with postponing the official review.
 
> Please remove this command from %install: rm -rf %{buildroot}
> It's not needed since EPEL7 and Fedora20+. As you wrote there is not going
> to happen an EPEL6 build, this rm command is obsolete.
Removed.

Comment 5 Raphael Groner 2015-06-17 18:36:03 UTC
Why no python3 for Fedora 20? Well, it will be EOL in some weeks, so why care about that at all? Maybe remove the conditional and build always for Python3.

Comment 6 Jan Staněk 2015-06-18 09:18:44 UTC
The python3 modules are built for all Fedoras. The only things that switches between Python2/3 are the executable files. According to guidelines [1], they should use Python2 up to and including Fedora 21, and Python 3 from Fedora 22 onward -- which should be exactly what the conditional does. (I'm assuming you are talking about the `%if 0%fedora > 21` conditionals.)

[1] https://fedoraproject.org/wiki/Packaging:Python#Avoiding_collisions_between_the_python_2_and_python_3_stacks

Comment 7 Raphael Groner 2015-06-21 17:47:06 UTC
Doing this review for F20 does not make any sense. F20 is in EOL freeze since a week ago.

Besides that, F20 build fails with:
+ /usr/bin/python2 setup.py test
WARNING:root:Missing runtime dependencies:
	No module named gi.repository.DBus
WARNING:root:Missing runtime dependencies:
	No module named gi.repository.GLib
WARNING:root:Missing runtime dependencies:
	No module named gi.repository.Gtk
WARNING:root:Missing runtime dependencies:
	No module named gi.repository.Notify
running test
Searching for docopt
Reading https://pypi.python.org/simple/docopt/
Download error on https://pypi.python.org/simple/docopt/: [Errno -2] Name or service not known -- Some packages may not be found!
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Couldn't find index page for 'docopt' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or download links found for docopt
error: Could not find suitable distribution for Requirement.parse('docopt')

Comment 8 Raphael Groner 2015-06-21 17:51:58 UTC
FTBFS, because rawhide build fails as well.

Comment 9 Jan Staněk 2015-06-24 08:11:23 UTC
I cannot reproduce the test failures - both on my machine's mock and in copr [1,2]. The only warning I'm getting is about missing Notify typelib - which is fine, as it is only optional.

The log you posted is complaining about missing gobject bindings for python (packages pygobject3 and python3-gobject, both are present in (Build)Requires), and then tries to download other necessary python modules (doctopt and PyYAML, both again present in respective (Build)Requires).

So I'm bit confused about what went wrong...

As for Fedora 20, the specfile does not have any F20 specific parts, so not doing the review for it should not be a problem.

[1] https://copr.fedoraproject.org/coprs/jstanek/udiskie/
[2] https://copr-be.cloud.fedoraproject.org/results/jstanek/udiskie/fedora-rawhide-x86_64/udiskie-1.2.0-1.fc23/build.log.gz

Comment 10 Raphael Groner 2015-06-26 15:19:22 UTC
Sorry for the delay here. 
I am going to take a closer look inside, hopefully in the next days.

Comment 11 Raphael Groner 2015-06-26 20:01:27 UTC
Package Review
==============

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


Issues generally:
* You can use -print and -delete as the options for find
  to log and remove the disallowed files:
- find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f
+ find %{buildroot} -name '*.exe' -print -delete
With that, you need also only one line to find in both py2 and py3 folders.
You should do that removal early in %prep, but I do not know if install fails.
https://fedoraproject.org/wiki/Packaging:Guidelines#No_inclusion_of_pre-built_binaries_or_libraries


===== 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.
     Note: There is no build directory. Running licensecheck on vanilla
     upstream sources. No licenses found. Please check the source files for
     licenses manually.
[x]: License file installed when any subpackage combination is installed.
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /etc/polkit-1/rules.d,
     /etc/polkit-1
=> This is handled in PolicyKit. So you must add Requires: polkit
https://fedoraproject.org/wiki/Packaging:Guidelines#The_directory_is_also_owned_by_a_package_implementing_required_functionality_of_your_package

[!]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /usr/share/icons/hicolor
     (hicolor-icon-theme, fedora-logos),
     /usr/share/icons/hicolor/scalable/actions(hicolor-icon-theme),
     /usr/share/icons/hicolor/scalable(hicolor-icon-theme, fedora-logos)
=> Please remove them from %files, hicolor-icon-theme takes care of that.
=> Add Requires: hicolor-icon-theme
https://fedoraproject.org/wiki/Packaging:Guidelines#The_directory_is_also_owned_by_a_package_implementing_required_functionality_of_your_package

[x]: Package contains no bundled libraries without FPC exception.
[x]: 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.
[!]: Requires correct, justified where necessary.
=> see above.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[!]: gtk-update-icon-cache is invoked in %postun and %posttrans if package
     contains icons.
     Note: icons in udiskie
=> Please fix.
https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache
[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 61440 bytes in 6 files.
=> List manpage without %doc, it is a separate file and has nothing to do with documentation folder.
[!]: 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 requires other packages for directories it uses.
[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]: %config files are marked noreplace or the reason is justified.
[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]: No %config files under /usr.
[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:
[ ]: Binary eggs must be removed in %prep
     Note: Cannot find any build in BUILD directory (--prebuilt option?)
=> I do not understand this. The hint is wrong.
[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.
[?]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel

===== 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).
=> see above.
[!]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in python-
     udiskie , python3-udiskie
[!]: Package functions as described.
=> several open issues that currently prevent fully functionality.
[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.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[!]: Packages should try to preserve timestamps of original installed
     files.
=> Use 'nstall -p' or 'cp -p' instead.
[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]: 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: udiskie-1.2.0-1.fc23.noarch.rpm
          python-udiskie-1.2.0-1.fc23.noarch.rpm
          python3-udiskie-1.2.0-1.fc23.noarch.rpm
          udiskie-1.2.0-1.fc23.src.rpm
udiskie.noarch: W: spelling-error %description -l en_US unmounting -> mounting, miscounting, unstinting
python-udiskie.noarch: W: spelling-error Summary(en_US) automounter -> auto mounter, auto-mounter, mounter
python3-udiskie.noarch: W: spelling-error Summary(en_US) udisks -> disks, u disks, Saudis
python3-udiskie.noarch: W: spelling-error Summary(en_US) automounting -> auto mounting, auto-mounting, automating
udiskie.src: W: spelling-error %description -l en_US unmounting -> mounting, miscounting, unstinting
4 packages and 0 specfiles checked; 0 errors, 5 warnings.




Rpmlint (installed packages)
----------------------------
INFO: mock.py version 1.2.9 starting (python version = 3.4.2)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled ccache
Mock Version: 1.2.9
INFO: Mock Version: 1.2.9
Traceback (most recent call last):
  File "/usr/sbin/mock", line 831, in <module>
    main()
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 653, in main
    run_command(options, args, config_opts, commands, buildroot, state)
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 708, in run_command
    commands.init()
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.4/site-packages/mockbuild/backend.py", line 123, in init
    self.buildroot.initialize(**kwargs)
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.4/site-packages/mockbuild/buildroot.py", line 84, in initialize
    self._init(prebuild=prebuild, do_log=do_log)
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.4/site-packages/mockbuild/buildroot.py", line 128, in _init
    self._setup_devices()
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 84, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.4/site-packages/mockbuild/buildroot.py", line 442, in _setup_devices
    os.symlink("/proc/self/mounts", self.make_chroot_path('etc', 'mtab'))
FileExistsError: [Errno 17] File exists: '/proc/self/mounts' -> '/var/lib/mock/fedora-rawhide-x86_64/root/etc/mtab'



Requires
--------
python-udiskie (rpmlib, GLIBC filtered):
    PyYAML
    gtk3
    pygobject3
    python(abi)
    python-docopt
    udisks2

python3-udiskie (rpmlib, GLIBC filtered):
    gtk3
    python(abi)
    python3-PyYAML
    python3-docopt
    python3-gobject
    udisks2

udiskie (rpmlib, GLIBC filtered):
    /bin/sh
    /usr/bin/python3
    config(udiskie)
    python3-udiskie



Provides
--------
python-udiskie:
    python-udiskie

python3-udiskie:
    python3-udiskie

udiskie:
    config(udiskie)
    udiskie



Source checksums
----------------
https://pypi.python.org/packages/source/u/udiskie/udiskie-1.2.0.tar.gz :
  CHECKSUM(SHA256) this package     : 075b967360d69b6e9a06a5b93b36b2a9181367b269d305710b96c38b245ac340
  CHECKSUM(SHA256) upstream package : 075b967360d69b6e9a06a5b93b36b2a9181367b269d305710b96c38b245ac340


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -v -m fedora-rawhide-x86_64 -b 1224265
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 12 Jan Staněk 2015-07-01 13:44:42 UTC
I have uploaded updated SPEC and SRPM, links are still the same.

> * You can use -print and -delete as the options for find
>  to log and remove the disallowed files:
> - find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f
> + find %{buildroot} -name '*.exe' -print -delete
> With that, you need also only one line to find in both py2 and py3 folders.
> You should do that removal early in %prep, but I do not know if install fails.
> https://fedoraproject.org/wiki/Packaging:Guidelines#No_inclusion_of_pre-built_binaries_or_libraries
I changed the find commands to use the -delete switch. However, they cannot be moved into %prep section, as their purpose is to remove any *.exe files generated during build, if any.

> [!]: Package must own all directories that it creates.
>      Note: Directories without known owners: /etc/polkit-1/rules.d, /etc/polkit-1
> => This is handled in PolicyKit. So you must add Requires: polkit
Require for polkit added.

> [!]: Package does not own files or directories owned by other packages.
> => Please remove them from %files, hicolor-icon-theme takes care of that.
> => Add Requires: hicolor-icon-theme
Require for hicolor-icon-theme added, and the %files line was changed to only match the concrete files (no directories).

> [!]: gtk-update-icon-cache is invoked in %postun and %posttrans if package
>      contains icons.
>      Note: icons in udiskie
The icon cache scriptlet was already there, just beyond the %check section. To be sure, I moved it before that section.

> => List manpage without %doc, it is a separate file and has nothing to do with documentation folder.
%doc before manpages removed.

> [!]: Fully versioned dependency in subpackages if applicable.
>      Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in python-udiskie , python3-udiskie
This package works "backwards" in this case - the main package requires one of the subpackages and not the other way around. To these requires, I added the %{version}-%{release} macros (no %{?_isa}, as they are all noarch).

> [!]: Package functions as described.
> => several open issues that currently prevent fully functionality.
I'm not sure which issues you are refering to. If you mean the github ones, they are mainly RFE or authors's own plans for the future.

> [!]: Packages should try to preserve timestamps of original installed
>      files.
> => Use 'install -p' or 'cp -p' instead.
Went through the used commands and add the -p switch when applicable.

I hope I did not miss any issue, if so, please point me to it.

Comment 13 Raphael Groner 2015-07-11 17:16:56 UTC
APPROVED

Sorry for the long delay.

Comment 14 Jan Staněk 2015-07-13 07:38:47 UTC
New Package SCM Request
=======================
Package Name: udiskie
Short Description: Removable disk auto-mounter
Upstream URL: https://pypi.python.org/pypi/udiskie
Owners: jstanek
Branches: f21 f22 epel7
InitialCC:

Comment 15 Gwyn Ciesla 2015-07-15 17:33:53 UTC
Git done (by process-git-requests).

Comment 16 Jan Staněk 2015-07-23 08:16:53 UTC
Package Change Request
======================
Package Name: udiskie
New Branches: f23
Owners: jstanek

New package request has been issued before f23 branching, but granted after the branching. As a result, this package now lacks f23 branch, which it should have.

Comment 17 Gwyn Ciesla 2015-07-23 13:36:14 UTC
Git done (by process-git-requests).

Comment 18 Jan Staněk 2015-07-28 11:05:36 UTC
Approved package imported and successfully built for all branches.


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