Bug 1131127 - Review Request: safelease - legacy locking mechanism for VDSM
Summary: Review Request: safelease - legacy locking mechanism for VDSM
Keywords:
Status: CLOSED DUPLICATE of bug 1191498
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Yaniv Bronhaim
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-18 13:46 UTC by Yoav Kleinberger
Modified: 2015-07-21 12:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-11 12:02:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Yoav Kleinberger 2014-08-18 13:46:06 UTC
Spec URL: https://fedorapeople.org/~ykleinbe/safelease/safelease.spec
SRPM URL: https://fedorapeople.org/~ykleinbe/safelease/safelease-1.0-1.fc20.src.rpm
Description: safelease is a legacy locking utility for VDSM
Fedora Account System Username: ykleinbe

This is my first package. I need a sponsor. 

I am the maintainer of the project: http://gerrit.ovirt.org/gitweb?p=safelease.git;a=summary

Comment 1 Michael Schwendt 2014-08-18 21:10:37 UTC
Consider perusing Fedora's Packaging Guidelines:

  https://fedoraproject.org/wiki/Packaging:Guidelines

Watch out for sections that are relevant to what is found in your spec file.

Also consider running "fedora-review -b 1131127" to point that tool at this ticket and have it perform many checks on your packages.

Comment 2 Yaniv Bronhaim 2014-10-20 08:24:42 UTC
New files and few spec changes to fit fedora-review requirements. Please review:

Spec URL: http://bronhaim.fedorapeople.org/safelease.spec
SRPM URL: http://bronhaim.fedorapeople.org/python-safelease-1.0-2.fc20.src.rpm

Description: Safelease is a legacy locking utility
(will provide better description in next version)

Fedora Account System Username: ybronhei

Comment 4 Yaniv Bronhaim 2014-10-20 08:49:14 UTC
remove python- suffix:

Spec URL: http://bronhaim.fedorapeople.org/safelease.spec
SRPM URL: http://bronhaim.fedorapeople.org/safelease-1.0-2.fc20.src.rpm

Comment 5 Michael Schwendt 2014-10-21 08:52:49 UTC
There are various packaging mistakes (do pay attention to what the fedora-review and rpmlint tools find, for example), one which I had pointed out to Yoav in private already:

The package is inacceptable so far. In particular, because it doesn't build
from source code but includes only a precompiled executable

  $ tar xfz safelease-1.0.tar.gz 
  $ file safelease-1.0/safelease
safelease-1.0/safelease: ELF 64-bit LSB executable, x86-64, version 1
(SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32,
BuildID[sha1]=78aaab633c37efff02253f07db38b0f622a6999e, not stripped

Also, it is very unusual for the reviewer (and potential sponsor) to provide updates of the package, since self-approval of own packages is not possible.

Comment 6 Vitor de Lima 2014-12-08 11:22:58 UTC
New revision using autoconf and automake.

Spec URL: http://vdelima.fedorapeople.org/safelease.spec
SRPM URL: http://vdelima.fedorapeople.org/safelease-1.0-3.fc20.src.rpm

Comment 7 Michael Schwendt 2014-12-08 12:57:26 UTC
A few comments:

> %global libname safelease
> 
> Name:       %{libname}

What's the purpose of defining %libname when

1) the "Name" tag defines %name already,
2) you don't use %libname everywhere,
3) you use %name, %libname *and* a hardcoded "saferelease"

?

Shorter, more common, and cleaner:

  Name: saferelease

That defines %{name} to be "saferelease".
Then use %{name} everywhere instead of "saferelease".
This also works well when renaming the package.


> License:    GPLv2+

That doesn't match the C source file, which contains a GPLv3+ preamble. Please clarify.


> Source:     %{libname}-%{version}.tar.gz

https://fedoraproject.org/wiki/Packaging:Guidelines#Tags
https://fedoraproject.org/wiki/Packaging:SourceURL#Referencing_Source


> Summary:    Legacy locking utility

> %description
> Legacy locking utility for VDSM

https://fedoraproject.org/wiki/Packaging:Guidelines#Summary_and_description

Could you think of expanding on this a bit more and making it a full sentence? Currently %description is %summary plus two words only. There is no documentation included either.


> %files
> %doc AUTHORS COPYING README
> %{_libexecdir}/safelease/safelease

$ rpmls -p safelease-1.0-3.fc21.x86_64.rpm 
-rwxr-xr-x  /usr/libexec/safelease/safelease
drwxr-xr-x  /usr/share/doc/safelease
-rw-r--r--  /usr/share/doc/safelease/AUTHORS
-rw-r--r--  /usr/share/doc/safelease/COPYING
-rw-r--r--  /usr/share/doc/safelease/README

Directory /usr/libexec/saferelease is not included yet. Notice the missing 'd' entry in the list of files.

https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Ownership
https://fedoraproject.org/wiki/Packaging:UnownedDirectories

Comment 8 Michael Schwendt 2014-12-08 13:00:31 UTC
s/saferelease/safelease/g  in my previous comment, of course. :(

Comment 9 Vitor de Lima 2014-12-15 19:08:52 UTC
New revision addressing the previous comments:

Spec URL: http://vdelima.fedorapeople.org/safelease.spec
SRPM URL: http://vdelima.fedorapeople.org/safelease-1.0-3.fc20.src.rpm

Comment 11 Michael Schwendt 2015-01-08 09:52:34 UTC
I've had trouble finding this ticket after the xmas break, since it's "under review" already: http://fedoraproject.org/PackageReviewStatus/

It's assigned to Yaniv Bronheim, comment 2:

> Fedora Account System Username: ybronhei

Correct is "bronhaim" in FAS, IRC nick and email is "ybronhei".

This ticket is marked FE-NEEDSPONSOR, but ybronhei must be a packager sponsor then: https://fedoraproject.org/wiki/Package_Review_Process#Reviewer

Other than that:

* "fedora-review -b 1131127" doesn't find any additional issues either.

* What is planned for the transition from /usr/libexec/vdsm/safelease to
/usr/libexec/safelease/safelease?

Comment 12 Yaniv Bronhaim 2015-01-11 15:37:51 UTC
I'm not packagers sponsor.. afaik at least :) I pushed only 2 packages till now to fedora. and yes, I use different nickname, ybronhei is my redhat account and bronhaim is my public username in other sites. but we're the same guy

We (Vitor and I) still need sponsor and I thought its you. 

Vitor, why don't we install safelease in the same location (%{_libexecdir}/%{vdsm_name}/safelease) and sign the package as Obsolote vdsm **

Comment 13 Dan Kenigsberg 2015-01-13 13:22:19 UTC
Michael, I do not understand your question regarding /usr/libexec/safelease/safelease. I see that Vitor's most recent spec owns that /usr/libexec/safelease directory.

%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/%{name}

Frankly, I do not think that we need a directory at all (safelease has a single libexec), but I suppose this is not your point.

Comment 14 Michael Schwendt 2015-01-13 13:35:43 UTC
Directory ownership has been corrected after comment 7 (bottom).

My question in comment 11 is based on the fact that vdsm places safelease in a different directory. It does not know about the new location chosen by this package. Unless it will be patched to look there. That's why I want to know what is the plan?

> Vitor, why don't we install safelease in the same location
> (%{_libexecdir}/%{vdsm_name}/safelease) and sign the package
> as Obsolote vdsm **

It certainly must not obsolete vdsm.

Comment 15 Dan Kenigsberg 2015-01-13 14:45:32 UTC
Once an independent safelease is available, Vdsm is going to require it, and use the binary shipped by it in /usr/libexec/safelease. Until that happens, vdsm would continue to contain its old implementation of safelease and run it from the old location. Placing safelease binary on the same location is counter-productive.

Vitor is responsible on getting this ticket resolved, now that Yoav is no longer with us. Please sponsor him as the maintainer of the safelease package.

Comment 16 Michael Schwendt 2015-01-13 18:43:55 UTC
It has proven to be faster for Red Hat employees to get sponsored (usually also by somebody at Red Hat) when following this process: https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group#Become_a_co-maintainer


Instead, I would expect Vitor to attempt at doing a few reviews:
https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group#Show_Your_Expertise_by_Commenting_on_other_Review_Requests


Other than that, to clear up some of the chaos in this ticket, review tickets are assigned to the _reviewer_, i.e. the same person who toggles the "fedora-review" flag: https://fedoraproject.org/wiki/Package_Review_Process#Reviewer

[ https://fedoraproject.org/wiki/Category:Package_Maintainers ]

Comment 17 Yaniv Bronhaim 2015-01-20 16:06:13 UTC
I'll continue the handling and not the original reporter. 

the fedora-review output ([1]) seems alright, please lets continue the review process. any additional information is needed?

[1]===== MUST items =====

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

Generic:
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "GPL (v2 or later)", "Unknown or generated". 1 files have unknown
     license. Detailed output of licensecheck in /home/ybronhei/Projects
     /fedora-reviews/1131127-safelease/licensecheck.txt
[ ]: %build honors applicable compiler flags or justifies otherwise.
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: 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
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: 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.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: Useful -debuginfo package or justification otherwise.
[ ]: 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 30720 bytes in 3 files.
[ ]: 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 must own all directories that it creates.
[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 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

===== 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).
[ ]: Package functions as described.
[ ]: 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.
[ ]: Packages should try to preserve timestamps of original installed files.
[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]: 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]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[x]: Package should not use obsolete m4 macros
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: safelease-1.0-3.fc20.x86_64.rpm
          safelease-1.0-3.fc20.src.rpm
safelease.src:38: W: macro-in-%changelog %libname
safelease.src:38: W: macro-in-%changelog %name
2 packages and 0 specfiles checked; 0 errors, 2 warnings.




Rpmlint (installed packages)
----------------------------
<mock-chroot>[root@ybronhei /]# rpmlint safelease
safelease.x86_64: E: zero-length /usr/share/doc/safelease/readme.md
1 packages and 0 specfiles checked; 1 errors, 0 warnings.
<mock-chroot>[root@ybronhei /]# echo 'rpmlint-done:'



Requires
--------
safelease (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    rtld(GNU_HASH)



Provides
--------
safelease:
    safelease
    safelease(x86-64)



Source checksums
----------------
https://github.com/vitordelima/safelease/archive/1.0/safelease-1.0.tar.gz :
  CHECKSUM(SHA256) this package     : bac8e453cfc3a32257fde1fe577c14de1d5800bfc7aa238c52534fd813ef55c4
  CHECKSUM(SHA256) upstream package : bac8e453cfc3a32257fde1fe577c14de1d5800bfc7aa238c52534fd813ef55c4


Generated by fedora-review 0.5.2 (63c24cb) last change: 2014-07-14
Command line :/usr/bin/fedora-review -b 1131127
Buildroot used: fedora-20-x86_64
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: Java, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, EPEL5, BATCH, DISTTAG

Comment 18 Michael Schwendt 2015-01-21 08:05:43 UTC
> Assignee: nobody → ybronhei

As pointed out in comment 16, the bugzilla review tickets are assigned to _the reviewer_, which in this case MUST be a reviewer who is also a packager sponsor.
This is explained here:

  https://fedoraproject.org/wiki/Package_Review_Process#Reviewer

Parts of the process may be a bit confusing, but we've all started somewhere.

[...]

About these rpmlint W/E:

> safelease.src:38: W: macro-in-%changelog %libname
> safelease.src:38: W: macro-in-%changelog %name

You may want to escape them with a double '%%', so they are not expanded. Not only will it make the %changelog comment more readable, expanded macros in %changelog can cause problems. Not limited to garbage such as an expanded %configure macro. ;)


> safelease.x86_64: E: zero-length /usr/share/doc/safelease/readme.md

Not really an Error, but if one doesn't want to package empty files, one is better served with a guard somewhere in %prep or %install which would error out once the file has non-zero length -> a reminder to add it or revisit the packaging.


Any replies to comment 16?

Comment 19 Yaniv Bronhaim 2015-01-21 19:44:35 UTC
Thank you for the followup Michael. We will fix the warnings and post the updated links in new bug. When that's done I will close that bug as the reporter cannot continue the process

Comment 20 Yaniv Bronhaim 2015-02-11 12:02:43 UTC

*** This bug has been marked as a duplicate of bug 1191498 ***


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