From: wchang kim Date: Mon, 12 Sep 2016 06:51:15 +0000 (+0900) Subject: Description : Added the upgrade script from 2.4 to 3.0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0744801c9a7b693921b8cf65b2b18aeb0810fdab;p=platform%2Fupstream%2Fsystemd.git Description : Added the upgrade script from 2.4 to 3.0 systemd_upgrade.sh is installed to /usr/share/upgrade/scripts. It changes the smack rule for /var/log/wtmp and /var/lib/systemd. Change-Id: Iebffca3238bcedd195ec2e91afdf5e46a882ec42 Signed-off-by: Woochang Kim --- diff --git a/packaging/systemd.spec b/packaging/systemd.spec index 76a6d7d..8756aeb 100644 --- a/packaging/systemd.spec +++ b/packaging/systemd.spec @@ -24,6 +24,7 @@ Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.t Source1: pamconsole-tmp.conf Source2: %{name}-rpmlintrc Source1001: systemd.manifest +Source3: systemd_upgrade.sh BuildRequires: gperf BuildRequires: intltool >= 0.40.0 BuildRequires: libacl-devel @@ -281,6 +282,10 @@ rm -rf %{buildroot}/%{_datadir}/zsh/site-functions/* mkdir -p %{buildroot}/%{_localstatedir}/log/journal +# Upgrade script from 2.4 to 3.0 +install -m 755 -d %{buildroot}%{_datadir}/upgrade/scripts +install -m 755 %{SOURCE3} %{buildroot}%{_datadir}/upgrade/scripts + # end of install %pre /usr/bin/getent group cdrom >/dev/null 2>&1 || /usr/sbin/groupadd -r -g 11 cdrom >/dev/null 2>&1 || : @@ -508,6 +513,9 @@ fi %{_localstatedir}/log/journal +%dir %{_datadir}/upgrade/scripts +%{_datadir}/upgrade/scripts/systemd_upgrade.sh + # Make sure we don't remove runlevel targets from F14 alpha installs, # but make sure we don't create then anew. %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target diff --git a/packaging/systemd_upgrade.sh b/packaging/systemd_upgrade.sh new file mode 100644 index 0000000..b2a0036 --- /dev/null +++ b/packaging/systemd_upgrade.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +#-----------------------------------------------# +# systemd patch for upgrade (2.4 -> 3.0) # +#-----------------------------------------------# + +# Macro +PATH=/bin:/usr/bin:/sbin:/usr/sbin +WTMP_DIR=/var/log/wtmp +SYSTEMD_DIR=/var/lib/systemd + +# set smack rule +chsmack -a "System" $WTMP_DIR +chsmack -a "System" $SYSTEMD_DIR