From 281b056cc3e2a456333c0aba1c9c1254647b0940 Mon Sep 17 00:00:00 2001 From: Robert Fairley Date: Mar 22 2019 19:04:03 +0000 Subject: Update specfile and sources for v0.16 --- diff --git a/.gitignore b/.gitignore index e29e6c4..4a6175b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /console-login-helper-messages-0.13.tar.gz +/v0.16.tar.gz diff --git a/console-login-helper-messages.spec b/console-login-helper-messages.spec index 7578fd1..f374b00 100644 --- a/console-login-helper-messages.spec +++ b/console-login-helper-messages.spec @@ -2,12 +2,12 @@ %global github_project console-login-helper-messages Name: console-login-helper-messages -Version: 0.13 -Release: 4%{?dist} +Version: 0.16 +Release: 1%{?dist} Summary: Combines motd, issue, profile features to show system information to the user before/on login License: BSD URL: https://github.com/%{github_owner}/%{github_project} -Source0: https://github.com/%{github_owner}/%{github_project}/releases/download/v%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/%{github_owner}/%{github_project}/archive/v%{version}.tar.gz BuildArch: noarch BuildRequires: systemd @@ -20,16 +20,34 @@ Requires: bash systemd %package motdgen Summary: Message of the day generator script showing system information Requires: console-login-helper-messages +# sshd reads /run/motd.d, where the generated MOTD message is written. +Recommends: openssh # bash: bash scripts are included in this package # systemd: systemd service and path units, and querying for failed units +# (the above applies to the issuegen and profile subpackages too) +Requires: bash systemd # setup: filesystem paths need setting up # * https://pagure.io/setup/pull-request/14 # * https://pagure.io/setup/pull-request/15 -# (the above applies to the issuegen and profile subpackages too) -Requires: bash systemd setup +# Make exception for fc29 - soft requires as we will create /run/motd.d +# ourselves using tmpfiles if it doesn't already exist. +%if 0%{?fc29} +Requires: setup +%else +Requires: setup >= 2.12.7-1 +%endif # pam: Needed to display issues symlinked from /etc/motd.d. # * https://github.com/linux-pam/linux-pam/issues/47 -Requires: pam >= 1.3.1-1 +Requires: ((pam >= 1.3.1-15) if openssh) +# selinux-policy: to apply pam_var_run_t contexts: +# * https://github.com/fedora-selinux/selinux-policy/pull/244 +# Make exception for fc29, as PAM will create the tmpfiles. (In Fedora 30 and +# above, setup is responsible for this). +%if 0%{?fc29} +Requires: ((selinux-policy >= 3.14.2-50) if openssh) +%else +Requires: ((selinux-policy >= 3.14.3-23) if openssh) +%endif %description motdgen %{summary}. @@ -88,49 +106,38 @@ mkdir -p %{buildroot}%{_tmpfilesdir} mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d # issuegen files -install -DpZm 0644 usr/lib/systemd/system/%{name}-issuegen.path %{buildroot}%{_unitdir}/%{name}-issuegen.path install -DpZm 0644 usr/lib/systemd/system/%{name}-issuegen.service %{buildroot}%{_unitdir}/%{name}-issuegen.service install -DpZm 0644 usr/lib/tmpfiles.d/%{name}-issuegen-tmpfiles.conf %{buildroot}%{_tmpfilesdir}/%{name}-issuegen.conf install -DpZm 0644 usr/lib/udev/rules.d/90-%{name}-issuegen.rules %{buildroot}%{_prefix}/lib/udev/rules.d/90-%{name}-issuegen.rules -install -DpZm 0755 usr/lib/%{name}/issuegen %{buildroot}%{_prefix}/lib/%{name}/issuegen +install -DpZm 0755 usr/libexec/%{name}/issuegen %{buildroot}%{_libexecdir}/%{name}/issuegen # motdgen files -install -DpZm 0644 usr/lib/systemd/system/%{name}-motdgen.path %{buildroot}%{_unitdir}/%{name}-motdgen.path install -DpZm 0644 usr/lib/systemd/system/%{name}-motdgen.service %{buildroot}%{_unitdir}/%{name}-motdgen.service install -DpZm 0644 usr/lib/tmpfiles.d/%{name}-motdgen-tmpfiles.conf %{buildroot}%{_tmpfilesdir}/%{name}-motdgen.conf -install -DpZm 0755 usr/lib/%{name}/motdgen %{buildroot}%{_prefix}/lib/%{name}/motdgen +install -DpZm 0755 usr/libexec/%{name}/motdgen %{buildroot}%{_libexecdir}/%{name}/motdgen + # profile files install -DpZm 0644 usr/lib/tmpfiles.d/%{name}-profile-tmpfiles.conf %{buildroot}%{_tmpfilesdir}/%{name}-profile.conf install -DpZm 0755 usr/share/%{name}/profile.sh %{buildroot}%{_prefix}/share/%{name}/profile.sh # symlinks -ln -snf /run/%{name}/%{name}.issue %{buildroot}%{_sysconfdir}/issue.d/%{name}.issue -# TODO(rfairley): symlink for /run/motd.d/console-login-helper-messages.motd needs to be -# removed once upstream changes to have pam_motd.so display MOTD directly in /run -# land -ln -snf /run/%{name}/%{name}.motd %{buildroot}%{_sysconfdir}/motd.d/%{name}.motd +ln -snf /run/%{name}/40_%{name}.issue %{buildroot}%{_sysconfdir}/issue.d/40_%{name}.issue ln -snf %{_prefix}/share/%{name}/profile.sh %{buildroot}%{_sysconfdir}/profile.d/%{name}-profile.sh %pre # TODO: use tmpfiles_create_package macro for tmpfiles %post -%systemd_post %{name}-issuegen.path %systemd_post %{name}-issuegen.service -%systemd_post %{name}-motdgen.path %systemd_post %{name}-motdgen.service %preun -%systemd_preun %{name}-issuegen.path %systemd_preun %{name}-issuegen.service -%systemd_preun %{name}-motdgen.path %systemd_preun %{name}-motdgen.service %postun -%systemd_postun_with_restart %{name}-issuegen.path %systemd_postun_with_restart %{name}-issuegen.service -%systemd_postun_with_restart %{name}-motdgen.path %systemd_postun_with_restart %{name}-motdgen.service # TODO: %check @@ -138,30 +145,28 @@ ln -snf %{_prefix}/share/%{name}/profile.sh %{buildroot}%{_sysconfdir}/profile.d %files %doc README.md %license LICENSE +%dir %{_libexecdir}/%{name} %dir %{_prefix}/lib/%{name} %dir /run/%{name} %dir %{_prefix}/share/%{name} %dir %{_sysconfdir}/%{name} %files issuegen -%{_unitdir}/%{name}-issuegen.path %{_unitdir}/%{name}-issuegen.service %{_tmpfilesdir}/%{name}-issuegen.conf %{_prefix}/lib/udev/rules.d/90-%{name}-issuegen.rules -%{_prefix}/lib/%{name}/issuegen +%{_libexecdir}/%{name}/issuegen %dir %{_prefix}/lib/%{name}/issue.d %dir /run/%{name}/issue.d -%{_sysconfdir}/issue.d/%{name}.issue +%{_sysconfdir}/issue.d/40_%{name}.issue %dir %{_sysconfdir}/%{name}/issue.d %files motdgen -%{_unitdir}/%{name}-motdgen.path %{_unitdir}/%{name}-motdgen.service %{_tmpfilesdir}/%{name}-motdgen.conf -%{_prefix}/lib/%{name}/motdgen +%{_libexecdir}/%{name}/motdgen %dir %{_prefix}/lib/%{name}/motd.d %dir /run/%{name}/motd.d -%{_sysconfdir}/motd.d/%{name}.motd %dir %{_sysconfdir}/%{name}/motd.d %files profile @@ -170,6 +175,20 @@ ln -snf %{_prefix}/share/%{name}/profile.sh %{buildroot}%{_sysconfdir}/profile.d %{_sysconfdir}/profile.d/%{name}-profile.sh %changelog +* Thu Mar 21 2019 Robert Fairley - 0.16-1 +- relax setup dependency for f29 +- general upstream source/tidiness improvements +- house executable scripts in /usr/libexec +- change Source0 to use GitHub-generated archive link +- drop .path units for motdgen and issuegen + +* Fri Mar 15 2019 Robert Fairley - 0.15-1 +- make motdgen generate motd in /run with no symlink + +* Fri Mar 15 2019 Robert Fairley - 0.14-1 +- issuegen.service: rely on sshd-keygen.target +- issuegen: don't show kernel version + * Thu Jan 24 2019 Robert Fairley - 0.13-4 - update reviewers.md and manual.md with correct paths diff --git a/sources b/sources index 02adf80..eca5681 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (console-login-helper-messages-0.13.tar.gz) = 26baa1f06a2ca0cf08a9d22bca7b7bcfe3670a00c358e2a722d58180d4f6ec061d031cca85aee575e11bdb6ffa9e0ab5ae2f92a6d33eafa8cf1c1076aae4911f +SHA512 (v0.16.tar.gz) = d30be5162450f52773c533c253544263df41c4c11fc7b816301569df6e4e8dbe2e84a054ff13855e743f94099aa4fa50182ed78319cf7bf2df725160f81827e2