SHA256
1
0
forked from pool/systemd

Accepting request 314756 from home:jengelh:branches:Base:System

- Rework "-mini" package logic to not conflict with itself and
  then add libsystemd0 to mini.

OBS-URL: https://build.opensuse.org/request/show/314756
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=881
This commit is contained in:
Dr. Werner Fink 2015-07-03 11:16:13 +00:00 committed by Git OBS Bridge
parent 342151e475
commit 6e1b3eb37e
5 changed files with 91 additions and 73 deletions

View File

@ -5,8 +5,8 @@
ORIG_SPEC=systemd ORIG_SPEC=systemd
EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ${ORIG_SPEC}.spec! #####\n" EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ${ORIG_SPEC}.spec! #####\n"
sed "s/^%define bootstrap.*$/${EDIT_WARNING}%define bootstrap 1/; sed "s/^%define bootstrap .*$/${EDIT_WARNING}%define bootstrap 1/;
s/^%define udevpkgname.*$/${EDIT_WARNING}%define udevpkgname udev-mini/; s/^%define mini .*$/${EDIT_WARNING}%define mini -mini/;
s/^\(Name:.*\)$/\1-mini/; s/^\(Name:.*\)$/\1-mini/;
s/^BuildRoot.*/&\n\nProvides: %{real} = %{version}-%{release}\n/ s/^BuildRoot.*/&\n\nProvides: %{real} = %{version}-%{release}\n/
" < ${ORIG_SPEC}.spec > ${ORIG_SPEC}-mini.spec " < ${ORIG_SPEC}.spec > ${ORIG_SPEC}-mini.spec

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jul 1 09:42:44 UTC 2015 - jengelh@inai.de
- Rework "-mini" package logic to not conflict with itself and
then add libsystemd0 to mini.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 1 03:43:51 UTC 2015 - crrodriguez@opensuse.org Wed Jul 1 03:43:51 UTC 2015 - crrodriguez@opensuse.org

View File

@ -18,10 +18,9 @@
##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! ##### ##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! #####
%define bootstrap 1 %define bootstrap 1
%define real systemd
##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! ##### ##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! #####
%define udevpkgname udev-mini %define mini -mini
%define udev_major 1 %define real systemd
%define min_kernel_version 3.7 %define min_kernel_version 3.7
%bcond_without bash_completion %bcond_without bash_completion
@ -102,7 +101,7 @@ BuildRequires: pkgconfig(libqrencode)
BuildRequires: pkgconfig(usbutils) >= 0.82 BuildRequires: pkgconfig(usbutils) >= 0.82
# the buildignore is important for bootstrapping # the buildignore is important for bootstrapping
#!BuildIgnore: udev #!BuildIgnore: udev
Requires: %{udevpkgname} >= 172 Requires: udev >= 172
Recommends: %{name}-bash-completion Recommends: %{name}-bash-completion
Requires: dbus-1 >= 1.4.0 Requires: dbus-1 >= 1.4.0
Requires: kbd Requires: kbd
@ -350,12 +349,18 @@ Provides: sysvinit:/sbin/init
%description sysvinit %description sysvinit
Drop-in replacement of System V init tools. Drop-in replacement of System V init tools.
%package -n libsystemd0 %package -n libsystemd0%{?mini}
Summary: Component library for systemd Summary: Component library for systemd
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
%if 0%{?bootstrap}
Conflicts: libsystemd0
Conflicts: kiwi
# avoid kiwi picking it for bootstrap
Requires: this-is-only-for-build-envs
%endif
%description -n libsystemd0 %description -n libsystemd0%{?mini}
This library provides several of the systemd C APIs: This library provides several of the systemd C APIs:
* sd-bus implements an alternative D-Bus client library that is * sd-bus implements an alternative D-Bus client library that is
@ -376,7 +381,7 @@ This library provides several of the systemd C APIs:
* sd-login(3): APIs to introspect and monitor seat, login session and * sd-login(3): APIs to introspect and monitor seat, login session and
user status information on the local system. user status information on the local system.
%package -n %{udevpkgname} %package -n udev%{?mini}
Summary: A rule-based device node and kernel event manager Summary: A rule-based device node and kernel event manager
License: GPL-2.0 License: GPL-2.0
Group: System/Kernel Group: System/Kernel
@ -388,7 +393,7 @@ PreReq: /usr/bin/sg_inq
Requires(pre): /usr/bin/stat Requires(pre): /usr/bin/stat
Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/bin/getent Requires(pre): /usr/bin/getent
Requires(post): lib%{udevpkgname}%{udev_major} Requires(post): libudev%{?mini}1
Requires(post): sed Requires(post): sed
Requires(post): /usr/bin/systemctl Requires(post): /usr/bin/systemctl
%if %{defined regenerate_initrd_post} %if %{defined regenerate_initrd_post}
@ -409,14 +414,13 @@ Conflicts: util-linux < 2.16
Conflicts: ConsoleKit < 0.4.1 Conflicts: ConsoleKit < 0.4.1
Requires: filesystem Requires: filesystem
%if 0%{?bootstrap} %if 0%{?bootstrap}
Provides: udev = %{version} Provides: udev = %version-%release
Conflicts: libudev%{udev_major} Conflicts: otherproviders(udev)
Conflicts: udev
# avoid kiwi picking it for bootstrap # avoid kiwi picking it for bootstrap
Requires: this-is-only-for-build-envs Requires: this-is-only-for-build-envs
%endif %endif
%description -n %{udevpkgname} %description -n udev%{?mini}
Udev creates and removes device nodes in /dev for devices discovered or Udev creates and removes device nodes in /dev for devices discovered or
removed from the system. It receives events via kernel netlink messages removed from the system. It receives events via kernel netlink messages
and dispatches them according to rules in /lib/udev/rules.d/. Matching and dispatches them according to rules in /lib/udev/rules.d/. Matching
@ -425,34 +429,33 @@ call tools to initialize a device, or load needed kernel modules.
%package -n lib%{udevpkgname}%{udev_major} %package -n libudev%{?mini}1
# This really should have been libudev1%{?mini}, but requires changes to prjconf :-/
Summary: Dynamic library to access udev device information Summary: Dynamic library to access udev device information
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
Requires: %{udevpkgname} >= %{version}-%{release}
%if 0%{?bootstrap} %if 0%{?bootstrap}
Conflicts: libudev%{udev_major} Conflicts: libudev1
Conflicts: kiwi Conflicts: kiwi
# avoid kiwi picking it for bootstrap # avoid kiwi picking it for bootstrap
Requires: this-is-only-for-build-envs Requires: this-is-only-for-build-envs
%endif %endif
%description -n lib%{udevpkgname}%{udev_major} %description -n libudev%{?mini}1
This package contains the dynamic library libudev, which provides This package contains the dynamic library libudev, which provides
access to udev device information access to udev device information
%package -n lib%{udevpkgname}-devel %package -n libudev%{?mini}-devel
Summary: Development files for libudev Summary: Development files for libudev
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Libraries/Other Group: Development/Libraries/C and C++
Requires: lib%{udevpkgname}%{udev_major} = %{version}-%{release} Requires: libudev%{?mini}1 = %version-%release
%if 0%{?bootstrap} %if 0%{?bootstrap}
Provides: libudev-devel = %{version} Provides: libudev-devel = %version-%release
Conflicts: libudev%{udev_major} = %{version} Conflicts: otherproviders(libudev-devel)
Conflicts: libudev-devel
%endif %endif
%description -n lib%{udevpkgname}-devel %description -n libudev%{?mini}-devel
This package contains the development files for the library libudev, a This package contains the development files for the library libudev, a
dynamic library, which provides access to udev device information. dynamic library, which provides access to udev device information.
@ -984,12 +987,12 @@ if [ $1 -eq 0 ]; then
rm -f /etc/systemd/system/default.target 2>&1 || : rm -f /etc/systemd/system/default.target 2>&1 || :
fi fi
%pretrans -n %{udevpkgname} -p <lua> %pretrans -n udev%{?mini} -p <lua>
if posix.stat("/lib/udev") and not posix.stat("/usr/lib/udev") then if posix.stat("/lib/udev") and not posix.stat("/usr/lib/udev") then
posix.symlink("/lib/udev", "/usr/lib/udev") posix.symlink("/lib/udev", "/usr/lib/udev")
end end
%pre -n %{udevpkgname} %pre -n udev%{?mini}
if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then
rm /usr/lib/udev rm /usr/lib/udev
mv /lib/udev /usr/lib mv /lib/udev /usr/lib
@ -1007,7 +1010,7 @@ if test -f /proc/1/exe -a -d /proc/1/root ; then
fi fi
fi fi
%post -n %{udevpkgname} %post -n udev%{?mini}
/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : /usr/bin/udevadm hwdb --update >/dev/null 2>&1 || :
# add KERNEL name match to existing persistent net rules # add KERNEL name match to existing persistent net rules
sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
@ -1042,7 +1045,7 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then
fi fi
fi fi
%postun -n %{udevpkgname} %postun -n udev%{?mini}
%insserv_cleanup %insserv_cleanup
systemctl daemon-reload >/dev/null 2>&1 || : systemctl daemon-reload >/dev/null 2>&1 || :
@ -1062,14 +1065,14 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then
fi fi
%if %{defined regenerate_initrd_post} %if %{defined regenerate_initrd_post}
%posttrans -n %{udevpkgname} %posttrans -n udev%{?mini}
%regenerate_initrd_posttrans %regenerate_initrd_posttrans
%endif %endif
%post -n libsystemd0 -p /sbin/ldconfig %post -n libsystemd0%{?mini} -p /sbin/ldconfig
%postun -n libsystemd0 -p /sbin/ldconfig %postun -n libsystemd0%{?mini} -p /sbin/ldconfig
%post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %post -n libudev%{?mini}1 -p /sbin/ldconfig
%postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %postun -n libudev%{?mini}1 -p /sbin/ldconfig
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
@ -1431,7 +1434,7 @@ exit 0
%{_mandir}/man8/runlevel.8* %{_mandir}/man8/runlevel.8*
%endif %endif
%files -n %{udevpkgname} %files -n udev%{?mini}
%defattr(-,root,root) %defattr(-,root,root)
/sbin/udevd /sbin/udevd
/sbin/udevadm /sbin/udevadm
@ -1488,7 +1491,7 @@ exit 0
%{_datadir}/pkgconfig/udev.pc %{_datadir}/pkgconfig/udev.pc
%endif %endif
%files -n libsystemd0 %files -n libsystemd0%{?mini}
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libsystemd.so.* %_libdir/libsystemd.so.*
%if %{with compat_libs} %if %{with compat_libs}
@ -1498,11 +1501,11 @@ exit 0
%_libdir/libsystemd-journal.so.* %_libdir/libsystemd-journal.so.*
%endif %endif
%files -n lib%{udevpkgname}%{udev_major} %files -n libudev%{?mini}1
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libudev.so.* %{_libdir}/libudev.so.*
%files -n lib%{udevpkgname}-devel %files -n libudev%{?mini}-devel
%defattr(-,root,root) %defattr(-,root,root)
%{_includedir}/libudev.h %{_includedir}/libudev.h
%{_libdir}/libudev.so %{_libdir}/libudev.so

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jul 1 09:42:44 UTC 2015 - jengelh@inai.de
- Rework "-mini" package logic to not conflict with itself and
then add libsystemd0 to mini.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 1 03:43:51 UTC 2015 - crrodriguez@opensuse.org Wed Jul 1 03:43:51 UTC 2015 - crrodriguez@opensuse.org

View File

@ -17,9 +17,8 @@
%define bootstrap 0 %define bootstrap 0
%define mini %nil
%define real systemd %define real systemd
%define udevpkgname udev
%define udev_major 1
%define min_kernel_version 3.7 %define min_kernel_version 3.7
%bcond_without bash_completion %bcond_without bash_completion
@ -97,7 +96,7 @@ BuildRequires: pkgconfig(libqrencode)
BuildRequires: pkgconfig(usbutils) >= 0.82 BuildRequires: pkgconfig(usbutils) >= 0.82
# the buildignore is important for bootstrapping # the buildignore is important for bootstrapping
#!BuildIgnore: udev #!BuildIgnore: udev
Requires: %{udevpkgname} >= 172 Requires: udev >= 172
Recommends: %{name}-bash-completion Recommends: %{name}-bash-completion
Requires: dbus-1 >= 1.4.0 Requires: dbus-1 >= 1.4.0
Requires: kbd Requires: kbd
@ -345,12 +344,18 @@ Provides: sysvinit:/sbin/init
%description sysvinit %description sysvinit
Drop-in replacement of System V init tools. Drop-in replacement of System V init tools.
%package -n libsystemd0 %package -n libsystemd0%{?mini}
Summary: Component library for systemd Summary: Component library for systemd
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
%if 0%{?bootstrap}
Conflicts: libsystemd0
Conflicts: kiwi
# avoid kiwi picking it for bootstrap
Requires: this-is-only-for-build-envs
%endif
%description -n libsystemd0 %description -n libsystemd0%{?mini}
This library provides several of the systemd C APIs: This library provides several of the systemd C APIs:
* sd-bus implements an alternative D-Bus client library that is * sd-bus implements an alternative D-Bus client library that is
@ -371,7 +376,7 @@ This library provides several of the systemd C APIs:
* sd-login(3): APIs to introspect and monitor seat, login session and * sd-login(3): APIs to introspect and monitor seat, login session and
user status information on the local system. user status information on the local system.
%package -n %{udevpkgname} %package -n udev%{?mini}
Summary: A rule-based device node and kernel event manager Summary: A rule-based device node and kernel event manager
License: GPL-2.0 License: GPL-2.0
Group: System/Kernel Group: System/Kernel
@ -383,7 +388,7 @@ PreReq: /usr/bin/sg_inq
Requires(pre): /usr/bin/stat Requires(pre): /usr/bin/stat
Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/bin/getent Requires(pre): /usr/bin/getent
Requires(post): lib%{udevpkgname}%{udev_major} Requires(post): libudev%{?mini}1
Requires(post): sed Requires(post): sed
Requires(post): /usr/bin/systemctl Requires(post): /usr/bin/systemctl
%if %{defined regenerate_initrd_post} %if %{defined regenerate_initrd_post}
@ -404,14 +409,13 @@ Conflicts: util-linux < 2.16
Conflicts: ConsoleKit < 0.4.1 Conflicts: ConsoleKit < 0.4.1
Requires: filesystem Requires: filesystem
%if 0%{?bootstrap} %if 0%{?bootstrap}
Provides: udev = %{version} Provides: udev = %version-%release
Conflicts: libudev%{udev_major} Conflicts: otherproviders(udev)
Conflicts: udev
# avoid kiwi picking it for bootstrap # avoid kiwi picking it for bootstrap
Requires: this-is-only-for-build-envs Requires: this-is-only-for-build-envs
%endif %endif
%description -n %{udevpkgname} %description -n udev%{?mini}
Udev creates and removes device nodes in /dev for devices discovered or Udev creates and removes device nodes in /dev for devices discovered or
removed from the system. It receives events via kernel netlink messages removed from the system. It receives events via kernel netlink messages
and dispatches them according to rules in /lib/udev/rules.d/. Matching and dispatches them according to rules in /lib/udev/rules.d/. Matching
@ -420,34 +424,33 @@ call tools to initialize a device, or load needed kernel modules.
%package -n lib%{udevpkgname}%{udev_major} %package -n libudev%{?mini}1
# This really should have been libudev1%{?mini}, but requires changes to prjconf :-/
Summary: Dynamic library to access udev device information Summary: Dynamic library to access udev device information
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
Requires: %{udevpkgname} >= %{version}-%{release}
%if 0%{?bootstrap} %if 0%{?bootstrap}
Conflicts: libudev%{udev_major} Conflicts: libudev1
Conflicts: kiwi Conflicts: kiwi
# avoid kiwi picking it for bootstrap # avoid kiwi picking it for bootstrap
Requires: this-is-only-for-build-envs Requires: this-is-only-for-build-envs
%endif %endif
%description -n lib%{udevpkgname}%{udev_major} %description -n libudev%{?mini}1
This package contains the dynamic library libudev, which provides This package contains the dynamic library libudev, which provides
access to udev device information access to udev device information
%package -n lib%{udevpkgname}-devel %package -n libudev%{?mini}-devel
Summary: Development files for libudev Summary: Development files for libudev
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Libraries/Other Group: Development/Libraries/C and C++
Requires: lib%{udevpkgname}%{udev_major} = %{version}-%{release} Requires: libudev%{?mini}1 = %version-%release
%if 0%{?bootstrap} %if 0%{?bootstrap}
Provides: libudev-devel = %{version} Provides: libudev-devel = %version-%release
Conflicts: libudev%{udev_major} = %{version} Conflicts: otherproviders(libudev-devel)
Conflicts: libudev-devel
%endif %endif
%description -n lib%{udevpkgname}-devel %description -n libudev%{?mini}-devel
This package contains the development files for the library libudev, a This package contains the development files for the library libudev, a
dynamic library, which provides access to udev device information. dynamic library, which provides access to udev device information.
@ -979,12 +982,12 @@ if [ $1 -eq 0 ]; then
rm -f /etc/systemd/system/default.target 2>&1 || : rm -f /etc/systemd/system/default.target 2>&1 || :
fi fi
%pretrans -n %{udevpkgname} -p <lua> %pretrans -n udev%{?mini} -p <lua>
if posix.stat("/lib/udev") and not posix.stat("/usr/lib/udev") then if posix.stat("/lib/udev") and not posix.stat("/usr/lib/udev") then
posix.symlink("/lib/udev", "/usr/lib/udev") posix.symlink("/lib/udev", "/usr/lib/udev")
end end
%pre -n %{udevpkgname} %pre -n udev%{?mini}
if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then
rm /usr/lib/udev rm /usr/lib/udev
mv /lib/udev /usr/lib mv /lib/udev /usr/lib
@ -1002,7 +1005,7 @@ if test -f /proc/1/exe -a -d /proc/1/root ; then
fi fi
fi fi
%post -n %{udevpkgname} %post -n udev%{?mini}
/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : /usr/bin/udevadm hwdb --update >/dev/null 2>&1 || :
# add KERNEL name match to existing persistent net rules # add KERNEL name match to existing persistent net rules
sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
@ -1037,7 +1040,7 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then
fi fi
fi fi
%postun -n %{udevpkgname} %postun -n udev%{?mini}
%insserv_cleanup %insserv_cleanup
systemctl daemon-reload >/dev/null 2>&1 || : systemctl daemon-reload >/dev/null 2>&1 || :
@ -1057,14 +1060,14 @@ if [ "${YAST_IS_RUNNING}" != "instsys" ]; then
fi fi
%if %{defined regenerate_initrd_post} %if %{defined regenerate_initrd_post}
%posttrans -n %{udevpkgname} %posttrans -n udev%{?mini}
%regenerate_initrd_posttrans %regenerate_initrd_posttrans
%endif %endif
%post -n libsystemd0 -p /sbin/ldconfig %post -n libsystemd0%{?mini} -p /sbin/ldconfig
%postun -n libsystemd0 -p /sbin/ldconfig %postun -n libsystemd0%{?mini} -p /sbin/ldconfig
%post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %post -n libudev%{?mini}1 -p /sbin/ldconfig
%postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %postun -n libudev%{?mini}1 -p /sbin/ldconfig
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
@ -1426,7 +1429,7 @@ exit 0
%{_mandir}/man8/runlevel.8* %{_mandir}/man8/runlevel.8*
%endif %endif
%files -n %{udevpkgname} %files -n udev%{?mini}
%defattr(-,root,root) %defattr(-,root,root)
/sbin/udevd /sbin/udevd
/sbin/udevadm /sbin/udevadm
@ -1483,7 +1486,7 @@ exit 0
%{_datadir}/pkgconfig/udev.pc %{_datadir}/pkgconfig/udev.pc
%endif %endif
%files -n libsystemd0 %files -n libsystemd0%{?mini}
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libsystemd.so.* %_libdir/libsystemd.so.*
%if %{with compat_libs} %if %{with compat_libs}
@ -1493,11 +1496,11 @@ exit 0
%_libdir/libsystemd-journal.so.* %_libdir/libsystemd-journal.so.*
%endif %endif
%files -n lib%{udevpkgname}%{udev_major} %files -n libudev%{?mini}1
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libudev.so.* %{_libdir}/libudev.so.*
%files -n lib%{udevpkgname}-devel %files -n libudev%{?mini}-devel
%defattr(-,root,root) %defattr(-,root,root)
%{_includedir}/libudev.h %{_includedir}/libudev.h
%{_libdir}/libudev.so %{_libdir}/libudev.so