Bug 1667174

Summary: Review Request: console-login-helper-messages - Shows helper information in terminal before/after login
Product: [Fedora] Fedora Reporter: Robert Fairley <rfairley>
Component: Package ReviewAssignee: Dennis Gilmore <dennis>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dustymabe, package-review
Target Milestone: ---Flags: dennis: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-29 14:16:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 177841    

Description Robert Fairley 2019-01-17 16:17:43 UTC
Spec URL: https://copr-be.cloud.fedoraproject.org/results/rfairley/console-login-helper-messages/fedora-rawhide-x86_64/00847358-console-login-helper-messages/console-login-helper-messages.spec
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/rfairley/console-login-helper-messages/fedora-rawhide-x86_64/00847358-console-login-helper-messages/console-login-helper-messages-0.12-1.fc30.src.rpm
Description: Combines motd, issue, profile features to show system information to the user before/on login. The information shown before login (via issue) includes: SSH keys, and an IP address to use for SSH login. Information shown at login is a brief MOTD with system information sourced from `/etc/os-release`. A profile script that shows failed systemd units upon login to the bash terminal is also included.
Fedora Account System Username: rfairley

Hi! I have packaged console-login-helper-messages (upstream: https://github.com/rfairley/console-login-helper-messages) for distribution in Fedora.

I am the upstream maintainer for this package. The need for console-login-helper-messages this arose from https://github.com/coreos/fedora-coreos-tracker/issues/36#issue-354763917 to carry forward information shown at the login prompt on Container Linux to Fedora CoreOS. We think the console messages could be helpful for similar systems that might only have the serial console available before login, and can display the IP address/SSH keys before logging in through SSH.

This is my first package, and I will need a sponsor. Past contributions in Fedora I have made include adding the option of displaying MOTD messages from other directories, and helping patching these changes to Fedora.
Upstream issue: https://github.com/linux-pam/linux-pam/issues/68.
Fedora patches:
 * https://src.fedoraproject.org/rpms/pam/pull-request/5.
 * https://github.com/fedora-selinux/selinux-policy/pull/232
 * https://pagure.io/setup/pull-request/15

Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=32090526

A few ways to verify the package works if reviewing: https://github.com/rfairley/console-login-helper-messages/blob/master/reviewers.md

Comment 1 Dennis Gilmore 2019-01-17 20:28:00 UTC
/etc/issue.d is unowned and should be provided by fedora-release.
for /usr/lib/udev and /usr/lib/udev/rules.d a missing requires on systemd-udev needs to be added

otherwise the rest looks fine.

Package Review

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

===== MUST items =====

[X]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[X]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "BSD 3-clause "New" or "Revised" License", "Unknown or
     generated". 11 files have unknown license. Detailed output of
     licensecheck in /home/dennis/1667174-console-login-helper-
[x]: License file installed when any subpackage combination is installed.
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /etc/issue.d
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /etc/issue.d, /usr/lib/udev,
[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
[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
[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
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

[ ]: 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).
[ ]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in console-
     login-helper-messages-motdgen , console-login-helper-messages-issuegen
     , console-login-helper-messages-profile
[ ]: 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
[ ]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
[ ]: Files in /run, var/run and /var/lock uses tmpfiles.d when appropriate
[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
[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 =====

[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.

Checking: console-login-helper-messages-0.12-1.fc30.noarch.rpm
console-login-helper-messages.noarch: W: spelling-error Summary(en_US) motd -> mots, mot, mod
console-login-helper-messages.noarch: E: summary-too-long C Combines motd, issue, profile features to show system information to the user before/on login
console-login-helper-messages.noarch: W: spelling-error %description -l en_US motd -> mots, mot, mod
console-login-helper-messages.noarch: E: description-line-too-long C Combines motd, issue, profile features to show system information to the user before/on login.
console-login-helper-messages-motdgen.noarch: W: no-documentation
console-login-helper-messages-issuegen.noarch: W: no-documentation
console-login-helper-messages-issuegen.noarch: W: dangling-symlink /etc/issue.d/console-login-helper-messages.issue /run/issue.d/console-login-helper-messages.issue
console-login-helper-messages-profile.noarch: W: only-non-binary-in-usr-lib
console-login-helper-messages-profile.noarch: W: no-documentation
console-login-helper-messages.src: W: spelling-error Summary(en_US) motd -> mots, mot, mod
console-login-helper-messages.src: E: summary-too-long C Combines motd, issue, profile features to show system information to the user before/on login
console-login-helper-messages.src: W: spelling-error %description -l en_US motd -> mots, mot, mod
console-login-helper-messages.src: E: description-line-too-long C Combines motd, issue, profile features to show system information to the user before/on login.
console-login-helper-messages.src:74: E: hardcoded-library-path in %{_prefix}/lib/%{name}/issue.d
console-login-helper-messages.src:75: E: hardcoded-library-path in %{_prefix}/lib/%{name}/motd.d
console-login-helper-messages.src:95: E: hardcoded-library-path in %{_prefix}/lib/%{name}/issuegen
console-login-helper-messages.src:100: E: hardcoded-library-path in %{_prefix}/lib/%{name}/motdgen
console-login-helper-messages.src:133: W: macro-in-comment %check
console-login-helper-messages.src:138: E: hardcoded-library-path in %{_prefix}/lib/%{name}
console-login-helper-messages.src:148: E: hardcoded-library-path in %{_prefix}/lib/%{name}/issuegen
console-login-helper-messages.src:149: E: hardcoded-library-path in %{_prefix}/lib/%{name}/issue.d
console-login-helper-messages.src:157: E: hardcoded-library-path in %{_prefix}/lib/%{name}/motdgen
console-login-helper-messages.src:158: E: hardcoded-library-path in %{_prefix}/lib/%{name}/motd.d
5 packages and 0 specfiles checked; 13 errors, 10 warnings.

Rpmlint (installed packages)
Cannot parse rpmlint output:

console-login-helper-messages-profile (rpmlib, GLIBC filtered):

console-login-helper-messages-motdgen (rpmlib, GLIBC filtered):

console-login-helper-messages (rpmlib, GLIBC filtered):

console-login-helper-messages-issuegen (rpmlib, GLIBC filtered):





Source checksums
https://github.com/rfairley/console-login-helper-messages/releases/download/v0.12/console-login-helper-messages-0.12.tar.gz :
  CHECKSUM(SHA256) this package     : 81e31926ccc59b6ef38c2de6fb90eb18b7cf354f579314792b69269a63d56baa
  CHECKSUM(SHA256) upstream package : 9b8e5b65fef3a6606640e5496d9fc22a093fa3a3eb874c49ec18341abe91b91a
However, diff -r shows no differences

Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1667174
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: Java, C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP

Comment 2 Robert Fairley 2019-01-18 21:51:29 UTC
Thank you Dennis for reviewing. I made some changes:
- Added the missing systemd-udev Requires
- Added a Requires for fedora-release
- Added conditionals for the selinux-policy version (before the version given in the Requires was only built for Rawhide).
- Added a condition for pam to only be a requirement if openssh is installed

For the fedora-release Requires, I will need to add a (fedora-release >= *version*) once a patch to fedora-release that includes `/etc/issue.d` is made. Will be opening a PR shortly for that, will post the link here.

For the selinux-policy Requires, these version numbers will need to be updated once a fix is made to the policy (https://github.com/fedora-selinux/selinux-policy/issues/242). Some functionality will still work without the selinux-policy patches though; so I don't think the patches need to be a hard Requires. Since the selinux-policy versions apply only when using sshd, I made those Requires apply only where openssh is installed.

The updated specfile is here: https://copr-be.cloud.fedoraproject.org/results/rfairley/console-login-helper-messages/fedora-rawhide-x86_64/00848024-console-login-helper-messages/console-login-helper-messages.spec
(also the diff here with the changes): https://github.com/rfairley/console-login-helper-messages/commit/850e3c2b5c6c2bb11148af21215b242b780caf77
The updated SRPM is here: https://copr-be.cloud.fedoraproject.org/results/rfairley/console-login-helper-messages/fedora-rawhide-x86_64/00848024-console-login-helper-messages/console-login-helper-messages-0.12-2.fc30.src.rpm

Comment 3 Robert Fairley 2019-01-19 03:32:24 UTC
PR to own `/etc/issue.d` in Rawhide: https://src.fedoraproject.org/rpms/fedora-release/pull-request/64

Comment 4 Robert Fairley 2019-01-24 19:00:16 UTC
Made changes to simplify the dependencies for the time being, while the upstream changes in pam, selinux-policy, and setup make it to stable.

The workaround is to use a symlink linking from `/etc/motd.d` to the location in `/run/console-login-helper-messages` where the MOTD is generated. This means the package can rely on the upstream version without the backported patch for pam_motd; it is easier to rely on this version for now.

Updated specfile: https://copr-be.cloud.fedoraproject.org/results/rfairley/console-login-helper-messages/fedora-rawhide-x86_64/00850024-console-login-helper-messages/console-login-helper-messages.spec
diff including the changes to the specfile: https://github.com/rfairley/console-login-helper-messages/pull/21/files#diff-597b61e33ca6d6f5b5ad0fefd69a0613
Updated SRPM: https://copr-be.cloud.fedoraproject.org/results/rfairley/console-login-helper-messages/fedora-rawhide-x86_64/00850024-console-login-helper-messages/console-login-helper-messages-0.13-4.fc30.src.rpm

Also, ownership of /etc/issue.d is merged at https://src.fedoraproject.org/rpms/fedora-release/pull-request/64.

Sorry for the chopping and changing. Ready for another look.

Comment 5 Dennis Gilmore 2019-01-30 11:16:36 UTC
I have verified the issues are fixed.

Package is approved

Comment 6 Dusty Mabe 2019-01-31 02:01:42 UTC
dist-git created here: https://src.fedoraproject.org/rpms/console-login-helper-messages