Accepting request 179651 from Base:System
We talked about using %patch, but in that case I would need a tarball of systemd in rpm-macros package which depends on xz which is part of many circles. (forwarded request 179649 from -miska-) OBS-URL: https://build.opensuse.org/request/show/179651 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=145
This commit is contained in:
commit
83dfa9e029
73
macros.systemd.upstream
Normal file
73
macros.systemd.upstream
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# -*- Mode: makefile; indent-tabs-mode: t -*- */
|
||||||
|
#
|
||||||
|
# This file is part of systemd.
|
||||||
|
#
|
||||||
|
# Copyright 2012 Lennart Poettering
|
||||||
|
#
|
||||||
|
# systemd is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Lesser General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# systemd is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
|
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# RPM macros for packages installing systemd unit files
|
||||||
|
|
||||||
|
%_unitdir @systemunitdir@
|
||||||
|
%_presetdir @systempresetdir@
|
||||||
|
%_udevhwdbdir @udevhwdbdir@
|
||||||
|
%_udevrulesdir @udevrulesdir@
|
||||||
|
%_journalcatalogdir @catalogdir@
|
||||||
|
%_tmpfilesdir @tmpfilesdir@
|
||||||
|
%_sysctldir @sysctldir@
|
||||||
|
|
||||||
|
%systemd_requires \
|
||||||
|
Requires(post): systemd \
|
||||||
|
Requires(preun): systemd \
|
||||||
|
Requires(postun): systemd \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%systemd_post() \
|
||||||
|
if [ $1 -eq 1 ] ; then \
|
||||||
|
# Initial installation \
|
||||||
|
@rootbindir@/systemctl preset %{?*} >/dev/null 2>&1 || : \
|
||||||
|
fi \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%systemd_preun() \
|
||||||
|
if [ $1 -eq 0 ] ; then \
|
||||||
|
# Package removal, not upgrade \
|
||||||
|
@rootbindir@/systemctl --no-reload disable %{?*} > /dev/null 2>&1 || : \
|
||||||
|
@rootbindir@/systemctl stop %{?*} > /dev/null 2>&1 || : \
|
||||||
|
fi \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%systemd_postun() \
|
||||||
|
@rootbindir@/systemctl daemon-reload >/dev/null 2>&1 || : \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%systemd_postun_with_restart() \
|
||||||
|
@rootbindir@/systemctl daemon-reload >/dev/null 2>&1 || : \
|
||||||
|
if [ $1 -ge 1 ] ; then \
|
||||||
|
# Package upgrade, not uninstall \
|
||||||
|
@rootbindir@/systemctl try-restart %{?*} >/dev/null 2>&1 || : \
|
||||||
|
fi \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%udev_hwdb_update() \
|
||||||
|
@rootbindir@/udevadm hwdb --update >/dev/null 2>&1 || : \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%udev_rules_update() \
|
||||||
|
@rootbindir@/udevadm control --reload >/dev/null 2>&1 || : \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%journal_catalog_update() \
|
||||||
|
@rootbindir@/journalctl --update-catalog >/dev/null 2>&1 || : \
|
||||||
|
%{nil}
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 19 08:44:52 UTC 2013 - mhrusecky@suse.com
|
||||||
|
|
||||||
|
- Dropped backward compatibility
|
||||||
|
- Added check for upstream rpm macros changes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 18 12:13:25 UTC 2013 - mhrusecky@suse.com
|
||||||
|
|
||||||
|
- Split out RPM macros into separate package to simplify dependencies
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 18 00:33:10 UTC 2013 - crrodriguez@opensuse.org
|
Tue Jun 18 00:33:10 UTC 2013 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -110,6 +110,7 @@ Source6: baselibs.conf
|
|||||||
Source7: libgcrypt.m4
|
Source7: libgcrypt.m4
|
||||||
Source8: systemd-journald.init
|
Source8: systemd-journald.init
|
||||||
Source9: nss-myhostname-config
|
Source9: nss-myhostname-config
|
||||||
|
Source10: macros.systemd.upstream
|
||||||
|
|
||||||
Source1060: boot.udev
|
Source1060: boot.udev
|
||||||
Source1061: write_dev_root_rule
|
Source1061: write_dev_root_rule
|
||||||
@ -215,6 +216,7 @@ Summary: Development headers for systemd
|
|||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
|
Requires: systemd-rpm-macros
|
||||||
%if 0%{?bootstrap}
|
%if 0%{?bootstrap}
|
||||||
Conflicts: systemd-devel
|
Conflicts: systemd-devel
|
||||||
%endif
|
%endif
|
||||||
@ -367,6 +369,8 @@ This package marks the installation to not use syslog but only the journal.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n systemd-%{version}
|
%setup -q -n systemd-%{version}
|
||||||
|
echo "Checking whether upstream rpm macros changed..."
|
||||||
|
[ -z "`diff -Naru "%{S:10}" src/core/macros.systemd.in`" ] || exit 1
|
||||||
|
|
||||||
# only needed for bootstrap
|
# only needed for bootstrap
|
||||||
%if 0%{?bootstrap}
|
%if 0%{?bootstrap}
|
||||||
@ -490,9 +494,7 @@ sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062}
|
|||||||
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service
|
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
|
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
|
||||||
ln -sf ../systemd-udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
|
ln -sf ../systemd-udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
|
||||||
|
rm -rf %{buildroot}%{_sysconfdir}/rpm
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
|
||||||
install -m644 %{S:4} %{buildroot}%{_sysconfdir}/rpm
|
|
||||||
find %{buildroot} -type f -name '*.la' -delete
|
find %{buildroot} -type f -name '*.la' -delete
|
||||||
mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants}
|
mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants}
|
||||||
|
|
||||||
@ -922,7 +924,9 @@ fi
|
|||||||
%dir %{_datadir}/bash-completion/completions
|
%dir %{_datadir}/bash-completion/completions
|
||||||
%ghost /var/lib/systemd/catalog/database
|
%ghost /var/lib/systemd/catalog/database
|
||||||
%{_datadir}/bash-completion/completions/*
|
%{_datadir}/bash-completion/completions/*
|
||||||
|
%if 0%{suse_version} < 1310
|
||||||
%{_sysconfdir}/rpm/macros.systemd
|
%{_sysconfdir}/rpm/macros.systemd
|
||||||
|
%endif
|
||||||
%dir /var/lib/systemd
|
%dir /var/lib/systemd
|
||||||
%dir /var/lib/systemd/sysv-convert
|
%dir /var/lib/systemd/sysv-convert
|
||||||
%dir /var/lib/systemd/migrated
|
%dir /var/lib/systemd/migrated
|
||||||
|
6
systemd-rpm-macros.changes
Normal file
6
systemd-rpm-macros.changes
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 17 10:49:50 UTC 2013 - mhrusecky@suse.com
|
||||||
|
|
||||||
|
- New package with systemd rpm macros to avoid unnecessary build time
|
||||||
|
dependencies
|
||||||
|
|
57
systemd-rpm-macros.spec
Normal file
57
systemd-rpm-macros.spec
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#
|
||||||
|
# spec file for package systemd-rpm-macros
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#!BuildIgnore: util-linux
|
||||||
|
|
||||||
|
Name: systemd-rpm-macros
|
||||||
|
Version: 1
|
||||||
|
Release: 0
|
||||||
|
Summary: RPM macros for systemd
|
||||||
|
License: LGPL-2.1+
|
||||||
|
Group: System/Base
|
||||||
|
Url: http://en.opensuse.org/openSUSE:Systemd_packaging_guidelines
|
||||||
|
Source0: macros.systemd
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
Starting with openSUSE 12.1, several RPM macros must be used to package systemd
|
||||||
|
services files. This package provides these macros.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
||||||
|
install -m644 %{S:0} %{buildroot}%{_sysconfdir}/rpm
|
||||||
|
UNITDIR="`cat %{S:0} | sed -n 's|.*_unitdir[[:blank:]]*||p'`"
|
||||||
|
for i in $UNITDIR `dirname $UNITDIR`; do
|
||||||
|
mkdir -p %{buildroot}$i
|
||||||
|
echo $i >> unitdir
|
||||||
|
done
|
||||||
|
|
||||||
|
%post
|
||||||
|
|
||||||
|
%postun
|
||||||
|
|
||||||
|
%files -f unitdir
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_sysconfdir}/rpm/macros.systemd
|
||||||
|
|
||||||
|
%changelog
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 19 08:44:06 UTC 2013 - mhrusecky@suse.com
|
||||||
|
|
||||||
|
- Dropped backward compatibility
|
||||||
|
- Added check for upstream rpm macros changes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 18 12:13:25 UTC 2013 - mhrusecky@suse.com
|
||||||
|
|
||||||
|
- Split out RPM macros into separate package to simplify dependencies
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 18 00:33:10 UTC 2013 - crrodriguez@opensuse.org
|
Tue Jun 18 00:33:10 UTC 2013 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
10
systemd.spec
10
systemd.spec
@ -105,6 +105,7 @@ Source6: baselibs.conf
|
|||||||
Source7: libgcrypt.m4
|
Source7: libgcrypt.m4
|
||||||
Source8: systemd-journald.init
|
Source8: systemd-journald.init
|
||||||
Source9: nss-myhostname-config
|
Source9: nss-myhostname-config
|
||||||
|
Source10: macros.systemd.upstream
|
||||||
|
|
||||||
Source1060: boot.udev
|
Source1060: boot.udev
|
||||||
Source1061: write_dev_root_rule
|
Source1061: write_dev_root_rule
|
||||||
@ -210,6 +211,7 @@ Summary: Development headers for systemd
|
|||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
|
Requires: systemd-rpm-macros
|
||||||
%if 0%{?bootstrap}
|
%if 0%{?bootstrap}
|
||||||
Conflicts: systemd-devel
|
Conflicts: systemd-devel
|
||||||
%endif
|
%endif
|
||||||
@ -362,6 +364,8 @@ This package marks the installation to not use syslog but only the journal.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n systemd-%{version}
|
%setup -q -n systemd-%{version}
|
||||||
|
echo "Checking whether upstream rpm macros changed..."
|
||||||
|
[ -z "`diff -Naru "%{S:10}" src/core/macros.systemd.in`" ] || exit 1
|
||||||
|
|
||||||
# only needed for bootstrap
|
# only needed for bootstrap
|
||||||
%if 0%{?bootstrap}
|
%if 0%{?bootstrap}
|
||||||
@ -485,9 +489,7 @@ sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062}
|
|||||||
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service
|
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
|
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
|
||||||
ln -sf ../systemd-udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
|
ln -sf ../systemd-udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
|
||||||
|
rm -rf %{buildroot}%{_sysconfdir}/rpm
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
|
||||||
install -m644 %{S:4} %{buildroot}%{_sysconfdir}/rpm
|
|
||||||
find %{buildroot} -type f -name '*.la' -delete
|
find %{buildroot} -type f -name '*.la' -delete
|
||||||
mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants}
|
mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants}
|
||||||
|
|
||||||
@ -917,7 +919,9 @@ fi
|
|||||||
%dir %{_datadir}/bash-completion/completions
|
%dir %{_datadir}/bash-completion/completions
|
||||||
%ghost /var/lib/systemd/catalog/database
|
%ghost /var/lib/systemd/catalog/database
|
||||||
%{_datadir}/bash-completion/completions/*
|
%{_datadir}/bash-completion/completions/*
|
||||||
|
%if 0%{suse_version} < 1310
|
||||||
%{_sysconfdir}/rpm/macros.systemd
|
%{_sysconfdir}/rpm/macros.systemd
|
||||||
|
%endif
|
||||||
%dir /var/lib/systemd
|
%dir /var/lib/systemd
|
||||||
%dir /var/lib/systemd/sysv-convert
|
%dir /var/lib/systemd/sysv-convert
|
||||||
%dir /var/lib/systemd/migrated
|
%dir /var/lib/systemd/migrated
|
||||||
|
Loading…
Reference in New Issue
Block a user