Bug 1932728 - Review Request: sway-systemd - Systemd integration for Sway session
Summary: Review Request: sway-systemd - Systemd integration for Sway session
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Davide Cavalca
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1929001
Blocks: 1935923
TreeView+ depends on / blocked
 
Reported: 2021-02-25 04:48 UTC by Aleksei Bavshin
Modified: 2021-03-14 04:13 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-03-14 04:13:41 UTC
Type: ---
Embargoed:
davide: fedora-review+


Attachments (Terms of Use)

Description Aleksei Bavshin 2021-02-25 04:48:53 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/alebastr/sway-extras/fedora-rawhide-x86_64/02016980-sway-systemd/sway-systemd.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/alebastr/sway-extras/fedora-rawhide-x86_64/02016980-sway-systemd/sway-systemd-0.1.1-0.1.fc35.src.rpm
Copr URL: https://copr.fedorainfracloud.org/coprs/build/2016980

Description:
The goal of this project is to provide a minimal set of configuration files
and scripts required for running Sway in a systemd environment.

This includes several areas of integration:
 - Propagate required variables to the systemd user session environment.
 - Define sway-session.target for starting user services.
 - Place GUI applications into a systemd scopes for systemd-oomd compatibility.

See following links for the motivation behind a separate project and package:
https://src.fedoraproject.org/rpms/sway/pull-request/11
https://lists.fedoraproject.org/archives/list/sway@lists.fedoraproject.org/thread/Z34CVRZLQK6NLQYX2DJWOP7IPJ4XCE7O/

Fedora Account System Username: alebastr

Comment 1 Davide Cavalca 2021-03-08 17:08:06 UTC
Taking this review

Comment 2 Davide Cavalca 2021-03-08 17:22:40 UTC
Package Review
==============

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


Issues:
=======
- systemd_user_post is invoked in %post and systemd_user_preun in %preun
  for Systemd user units service files.
  Note: Systemd user unit service file(s) in sway-systemd
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/Scriptlets/#_user_units


===== 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: Checking patched sources after %prep for licenses. Licenses
     found: "Expat License", "Unknown or generated". 11 files have unknown
     license. Detailed output of licensecheck in /tmp/a/1932728-sway-
     systemd/licensecheck.txt
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /etc/sway/config.d
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /etc/sway/config.d
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[x]: 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.
[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]: 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 must not depend on deprecated() packages.
[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

===== 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).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: 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.
[x]: Packages should try to preserve timestamps of original installed
     files.
[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]: 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: sway-systemd-0.1.1-0.1.fc35.noarch.rpm
          sway-systemd-0.1.1-0.1.fc35.src.rpm
sway-systemd.noarch: W: spelling-error %description -l en_US oomd -> mood, doom
sway-systemd.src: W: spelling-error %description -l en_US oomd -> mood, doom
2 packages and 0 specfiles checked; 0 errors, 2 warnings.




Rpmlint (installed packages)
----------------------------
sway-systemd.noarch: W: spelling-error %description -l en_US oomd -> mood, doom
1 packages and 0 specfiles checked; 0 errors, 1 warnings.



Source checksums
----------------
https://github.com/alebastr/sway-systemd/archive/v0.1.1/sway-systemd-0.1.1.tar.gz :
  CHECKSUM(SHA256) this package     : ba618e1d5d0db963ad351a15a559890527f219c270c67442a88391d87c96f761
  CHECKSUM(SHA256) upstream package : ba618e1d5d0db963ad351a15a559890527f219c270c67442a88391d87c96f761


Requires
--------
sway-systemd (rpmlib, GLIBC filtered):
    /usr/bin/python3
    /usr/bin/sh
    config(sway-systemd)
    python3dist(dbus-next)
    python3dist(i3ipc)
    python3dist(psutil)
    python3dist(python-xlib)
    sway
    systemd



Provides
--------
sway-systemd:
    config(sway-systemd)
    sway-systemd



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1932728
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: PHP, Perl, Ruby, fonts, C/C++, R, Ocaml, Python, Java, Haskell, SugarActivity
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 3 Davide Cavalca 2021-03-08 17:23:16 UTC
Outstanding issues:
- no package is owning /etc/sway/config.d; this should be owned either by this package, or by sway itself if it's a generic sway thing that others may drop configs into
- missing scriptlets for systemd user units (see https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_user_units)

Also, the specfile lists this under MIT, but licensecheck detects it an Expat license (although it is actually MIT afaict). It'd be good to add license headers to the upstream sources as well, but it's not a blocker.

Comment 4 Aleksei Bavshin 2021-03-08 18:10:43 UTC
(In reply to Davide Cavalca from comment #3)
> Outstanding issues:
> - no package is owning /etc/sway/config.d; this should be owned either by
> this package, or by sway itself if it's a generic sway thing that others may
> drop configs into

Will be owned by sway, see https://src.fedoraproject.org/rpms/sway/pull-request/11

> - missing scriptlets for systemd user units (see
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/
> #_user_units)

I checked other specs and I've never seen this part of the guildelines being applied to target files (see gnome-session and plasma-workspace).
I'm not opposed to adding the scriptlets though, just not sure if those will do anything meaningful.

> Also, the specfile lists this under MIT, but licensecheck detects it an
> Expat license (although it is actually MIT afaict). It'd be good to add
> license headers to the upstream sources as well, but it's not a blocker.

The commonly used MIT variant is the same as Expat license. Licensecheck is either not aware of that or uses Expat to avoid ambiguity with MIT/X11 and other variants.
AFAIK, license headers are not required and certainly won't affect licensecheck output.

Comment 5 Davide Cavalca 2021-03-08 18:17:44 UTC
Thanks! I think you're correct about the scriptlets, this is probably not necessary for targets. Looks like everything's taken care of, APPROVED.

Comment 6 Aleksei Bavshin 2021-03-08 18:23:44 UTC
(In reply to Davide Cavalca from comment #5)

Thanks for the review, Davide!

Comment 7 Tomas Hrcka 2021-03-10 22:26:40 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/sway-systemd


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