diff --git a/update-motd.service b/update-motd.service index e44daa3..6aa1aa7 100644 --- a/update-motd.service +++ b/update-motd.service @@ -2,7 +2,6 @@ Description=Dynamically Generate Message Of The Day # running update-motd.service after cloud-final.service, which will be later in the boot process # this is to avoid running update-motd at the same time with other services such as dnf activities in userdata scripts -Wants=network-online.target cloud-final.service After=network-online.target cloud-final.service [Service] diff --git a/update-motd.spec b/update-motd.spec index 23ae070..020afce 100644 --- a/update-motd.spec +++ b/update-motd.spec @@ -11,20 +11,21 @@ Requires: system-release >= 2022 BuildRequires: systemd-devel %{?systemd_requires} -Source0: sbin_update-motd -Source1: update-motd.timer -Source2: update-motd.service +Source0: %{url}/archive/refs/tags/%{name}-%{version}-%{release}.tar.gz %description Framework and scripts for producing a dynamically generated Message Of The Day. Based on and compatible with the framework implemented in Ubuntu. +%prep +%autosetup -n %{name}-%{name}-%{version}-%{release} + %install rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir}/update-motd.d -install -D -m 0755 %{SOURCE0} %{buildroot}%{_sbindir}/update-motd -install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/update-motd.timer -install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/update-motd.service +install -D -m 0755 sbin_update-motd %{buildroot}%{_sbindir}/update-motd +install -D -m 0644 update-motd.timer %{buildroot}%{_unitdir}/update-motd.timer +install -D -m 0644 update-motd.service %{buildroot}%{_unitdir}/update-motd.service # for %ghost install -d %{buildroot}%{_sharedstatedir}/update-motd touch %{buildroot}%{_sharedstatedir}/update-motd/motd