Bug 1680043 - Review Request: toolbox - Unprivileged development environment
Summary: Review Request: toolbox - Unprivileged development environment
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Carl George
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-22 15:43 UTC by Debarshi Ray
Modified: 2019-03-12 22:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-01 21:31:38 UTC
Type: ---
Embargoed:
carl: fedora-review+


Attachments (Terms of Use)

Description Debarshi Ray 2019-02-22 15:43:08 UTC
Spec URL: https://rishi.fedorapeople.org/toolbox.spec
SRPM URL: https://rishi.fedorapeople.org/toolbox-0.0.6-1.fc28.src.rpm

Description:
Toolbox is offers a familiar RPM based environment for developing and
debugging software that runs fully unprivileged using Podman.

Fedora Account System Username: rishi

This is a re-review request for a package rename. The earlier name was fedora-toolbox, and it was reviewed in bug 1641697.

Comment 1 Debarshi Ray 2019-02-22 15:44:01 UTC
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=32968951

Comment 2 Carl George 2019-02-25 19:35:17 UTC
Package Review
==============

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


===== Comments on SHOULD items =====

[ ]: %check is present and all tests pass.

I don't see any tests upstream.  Can you open an issue upstream and include a
comment with the link in the spec file?

[ ]: Packages should try to preserve timestamps of original installed
     files.

Does meson do this?

===== Other comments =====

It seems that all meson is doing is installing the upstream toolbox script at
/usr/bin/toolbox.  Why not just use the install command for this and avoid the
meson build requirement?

There is an rpmlint warning for the manpage.  In the original review you
mentioned that would be included in the 0.0.2 release, but that doesn't appear
to have happened.  Can you link to an upstream issue about the lack of a man
page and include the link in a comment?

https://fedoraproject.org/wiki/Packaging:SourceURL#Git_Tags

The Source0 url doesn't follow the guidelines for git tags, please change it to:

https://github.com/debarshiray/toolbox/archive/%{version}/%{name}-%{version}.tar.gz

or even better:

%{url}/archive/%{version}/%{name}-%{version}.tar.gz


===== 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.
[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]: 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.
[x]: 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.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: 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.
[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]: 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]: 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


===== 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.
[x]: Final provides and requires are sane (see attachments).
[x]: 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.
[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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.


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

Generic:
[x]: Rpmlint is run on all installed packages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: toolbox-0.0.6-1.fc29.noarch.rpm
          toolbox-0.0.6-1.fc29.src.rpm
toolbox.noarch: W: no-manual-page-for-binary toolbox
2 packages and 0 specfiles checked; 0 errors, 1 warnings.

Comment 3 Carl George 2019-02-25 19:37:50 UTC
Oh one more thing I forgot, can you mention in the changelog entry that it's a
rename from fedora-toolbox?

Comment 4 Debarshi Ray 2019-03-01 07:18:22 UTC
Thanks for the review!

(In reply to Carl George from comment #2)
> There is an rpmlint warning for the manpage.  In the original review you
> mentioned that would be included in the 0.0.2 release, but that doesn't
> appear to have happened.  Can you link to an upstream issue about the
> lack of a man page and include the link in a comment?

Various man pages are about to get merged soon:
https://github.com/debarshiray/toolbox/pull/66

Comment 5 Debarshi Ray 2019-03-01 11:34:38 UTC
(In reply to Carl George from comment #2)
> [ ]: Packages should try to preserve timestamps of original installed
>      files.
> 
> Does meson do this?

Yes.

[rishi@kolache toolbox]$ meson --prefix=/opt builddir && ninja -C builddir && ninja -C builddir install
The Meson build system
Version: 0.49.1
Source dir: /home/rishi/devel/toolbox/git/toolbox
Build dir: /home/rishi/devel/toolbox/git/toolbox/builddir
Build type: native build
Project name: toolbox
Project version: 0.0.6
...
...
Installing /home/rishi/devel/toolbox/git/toolbox/toolbox to /opt/bin
[rishi@kolache toolbox]$ ls -lrt toolbox
-rwxrwxr-x. 1 rishi rishi 24895 Mar  1 10:04 toolbox
[rishi@kolache toolbox]$ ls -lrt /opt/bin/toolbox 
-rwxr-xr-x. 1 rishi rishi 24895 Mar  1 10:04 /opt/bin/toolbox
[rishi@kolache toolbox]$ date
Fri Mar  1 11:53:10 CET 2019
[rishi@kolache toolbox]$

> It seems that all meson is doing is installing the upstream toolbox script at
> /usr/bin/toolbox.  Why not just use the install command for this and avoid
> the meson build requirement?

That would be almost like coming up with an ad hoc build system. :)

It's true that placing the toolbox script in the right location is the most important thing that we need to do. However, there are a number of other secondary items on the list:

* Make it easy for passers-by and new contributors approaching the project to quickly try it out. A well known build system that's a de-facto standard is a lot more approachable than an ad hoc set of scripts. Just like we are still using Git, even though we are unlikely to use all the bells and whistles to manage the development of a single shell script.

* What is today just a single shell script is unlikely to remain so in the near future. For example, just the inclusion of a set of manual pages is going to add more work that would need to be done. Then somebody will ask for a build flag to make those optional. Not to mention on-going work that's a lot more complex than scripts and man pages: https://github.com/owtaylor/fedora-toolbox/tree/toolboxd

* Even though it's not an immediate concern today, using a well understood build system helps in conforming to things like the Build API (https://github.com/cgwalters/build-api) and is generally easier to plug into meta-build systems.

* Not to mention various minutiae like supporting DESTDIR, preserving time stamps and so on.

Given that a significant portion of our operating system has already replaced Autotools with Meson as the preferred build system, using Meson was the most obvious choice. This might, of course, be affected by significant changes to the project in future. eg., if the toolbox tool gets re-written in Rust or Go, then it might have a bearing on the build system.

> https://fedoraproject.org/wiki/Packaging:SourceURL#Git_Tags
> 
> The Source0 url doesn't follow the guidelines for git tags, please change it
> to:
> 
> https://github.com/debarshiray/toolbox/archive/%{version}/%{name}-%{version}.
> tar.gz
> 
> or even better:
> 
> %{url}/archive/%{version}/%{name}-%{version}.tar.gz

Umm... why? The package is not referring to tarballs auto-generated by GitHub from Git tags. It's referring to the release tarballs explicitly listed against each release announcement: https://github.com/debarshiray/toolbox/releases

In an ideal world, we would no longer be needing release tarballs and only operating with Git tags. Sadly, we aren't there yet because downstream distributors often work with tarballs. As long as that holds true, and generating a tarball is just a trivial 'ninja dist' away, I prefer to not rely on the auto-generated tarballs:

* Avoids having to select one from the myriad of ways in which GitHub can auto-generate a tarball. eg., see how the URLs to the auto-generated tarballs (eg., https://github.com/debarshiray/toolbox/archive/0.0.6.tar.gz) on https://github.com/debarshiray/toolbox/releases differ from those given on https://fedoraproject.org/wiki/Packaging:SourceURL#Git_Tags.

* It's reassuring to use a tarball that was tested with 'ninja dist' by the person making the release. It's true that 'ninja dist' is very similar to the way GitHub auto-generates the tarballs, but regardless of the build system in play, the original principle still holds.

* Various downstreams have a slight preference for non-auto-generated tarballs. eg., https://fedoraproject.org/wiki/Packaging:SourceURL#Git_Hosting_Services says:
    "If the upstream does create tarballs you should use them as tarballs provide an easier trail for people auditing the packages."

* It avoids a needless dependency on the GitHub infrastructure.

Or did I completely misinterpret your concern?

Comment 6 Debarshi Ray 2019-03-01 13:28:30 UTC
Updated Spec URL: https://rishi.fedorapeople.org/toolbox.spec
Updated SRPM URL: https://rishi.fedorapeople.org/toolbox-0.0.6-1.fc29.src.rpm

(In reply to Carl George from comment #2)
> [ ]: %check is present and all tests pass.
> 
> I don't see any tests upstream.  Can you open an issue upstream and include a
> comment with the link in the spec file?

Added.

(In reply to Carl George from comment #3)
> Oh one more thing I forgot, can you mention in the changelog entry that it's
> a rename from fedora-toolbox?

Done.

Once again, thanks for your review, Carl!

Comment 7 Carl George 2019-03-01 14:45:44 UTC
Those are fair points about meson.  I don't have a problem with using it in the specfile, I was more just curious.

I see what you mean about the release tarball versus the git tag tarball.  Sorry about that, I'm just used to having to use the tag.  Thanks for setting me straight.

Only thing left is these new rpmlint warnings.

    toolbox.spec:39: W: macro-in-comment %check
    toolbox.spec:40: W: macro-in-comment %meson_test

I would change your commented check section to something like this to resolve it.

    %check
    # https://github.com/debarshiray/toolbox/issues/68
    #%%meson_test

Pending that minor cleanup, PACKAGE APPROVED.

Comment 8 Debarshi Ray 2019-03-01 15:57:09 UTC
Updated Spec URL: https://rishi.fedorapeople.org/toolbox.spec
Updated SRPM URL: https://rishi.fedorapeople.org/toolbox-0.0.6-1.fc29.src.rpm

(In reply to Carl George from comment #7)
> I see what you mean about the release tarball versus the git tag tarball. 
> Sorry about that, I'm just used to having to use the tag.  Thanks for
> setting me straight.

No need to apologize. It got me to sit down and reason about some of the things we take for granted. :)

> Only thing left is these new rpmlint warnings.
> 
>     toolbox.spec:39: W: macro-in-comment %check
>     toolbox.spec:40: W: macro-in-comment %meson_test

Oops! Silly me, I only ran rpmlint on the installed RPM this time.

> I would change your commented check section to something like this to
> resolve it.
> 
>     %check
>     # https://github.com/debarshiray/toolbox/issues/68
>     #%%meson_test

Yes, fixed.

Comment 10 Gwyn Ciesla 2019-03-01 16:46:57 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/toolbox

Comment 11 Debarshi Ray 2019-03-01 21:29:44 UTC
I have now built it in master and f30:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1218244
https://koji.fedoraproject.org/koji/buildinfo?buildID=1218509

Builds for f29 and f28 need to wait until the planned Fedora Infrastructure outage is over.

Comment 12 Debarshi Ray 2019-03-01 21:31:38 UTC
Thanks everybody. Closing.

Comment 13 Fedora Update System 2019-03-02 00:37:48 UTC
toolbox-0.0.6-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7a77a138f9

Comment 14 Fedora Update System 2019-03-02 00:43:52 UTC
toolbox-0.0.6-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-59304a081d

Comment 15 Fedora Update System 2019-03-03 03:39:16 UTC
toolbox-0.0.6-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-59304a081d

Comment 16 Fedora Update System 2019-03-03 04:05:52 UTC
toolbox-0.0.6-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-7a77a138f9

Comment 17 Fedora Update System 2019-03-12 21:44:27 UTC
toolbox-0.0.6-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2019-03-12 22:18:16 UTC
toolbox-0.0.6-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


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