SHA256
1
0
forked from pool/systemd

Accepting request 1148086 from home:daandemeyer:branches:Base:System

- Add a new %upstream macro to support building from upstream sources. This
  will allow upstream to build systemd rpms using the opensuse systemd packaging
  specs. These rpms will be built and used in upstream's mkosi based hacking and
  testing environment to test changes and in the future to run integration tests
  as well. By building the rpms using the opensuse packaging specs, the idea is
  to catch more issues ahead of time as the mkosi environment will behave more
  like a regular opensuse system.
- Add new %version_override and %version_release macros to allow overriding the
  version and release of the rpm respectively.

OBS-URL: https://build.opensuse.org/request/show/1148086
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1494
This commit is contained in:
Franck Bui 2024-02-20 14:38:41 +00:00 committed by Git OBS Bridge
parent 808df0e80d
commit de9857c4a9
5 changed files with 61 additions and 8 deletions

View File

@ -32,7 +32,11 @@
%{_mandir}/man8/systemd-pcrmachine.service.8.gz
%{_mandir}/man8/systemd-pcrphase-initrd.service.8.gz
%{_mandir}/man8/systemd-pcrphase-sysinit.service.8.gz
%if %{with upstream}
%{_mandir}/man8/systemd-pcrextend.8.gz
%else
%{_mandir}/man8/systemd-pcrphase.8.gz
%endif
%{_mandir}/man8/systemd-pcrphase.service.8.gz
%endif
%{_mandir}/man8/systemd-repart.8.gz
@ -53,8 +57,12 @@
%endif
%{_systemd_util_dir}/systemd-oomd
%if %{with sd_boot}
%if %{with upstream}
%{_systemd_util_dir}/systemd-pcrextend
%else
%{_systemd_util_dir}/systemd-pcrphase
%endif
%endif
%{_systemd_util_dir}/systemd-sysupdate
%{_systemd_util_dir}/systemd-userwork
%if %{with sd_boot}

View File

@ -31,7 +31,11 @@
%{_systemd_util_dir}/network/80-container-vb.network
%{_systemd_util_dir}/network/80-container-ve.network
%{_systemd_util_dir}/network/80-container-vz.network
%if %{with upstream}
%{_systemd_util_dir}/network/89-ethernet.network.example
%else
%{_systemd_util_dir}/network/80-ethernet.network.example
%endif
%{_systemd_util_dir}/network/80-vm-vt.network
%{_systemd_util_dir}/network/80-wifi-adhoc.network
%{_systemd_util_dir}/network/80-wifi-ap.network.example

View File

@ -209,8 +209,8 @@
%{_libdir}/libnss_myhostname.so.2
%{_libdir}/libnss_systemd.so.2
%endif
%{_libdir}/systemd/libsystemd-core-254.so
%{_libdir}/systemd/libsystemd-shared-254.so
%{_libdir}/systemd/libsystemd-core-*.so
%{_libdir}/systemd/libsystemd-shared-*.so
%if %{without bootstrap}
%{_mandir}/man1/busctl.1.gz
%{_mandir}/man1/hostnamectl.1.gz

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Feb 20 12:22:42 UTC 2024 - Daan De Meyer <daan.j.demeyer@gmail.com>
- Add a new %upstream macro to support building from upstream sources. This
will allow upstream to build systemd rpms using the opensuse systemd packaging
specs. These rpms will be built and used in upstream's mkosi based hacking and
testing environment to test changes and in the future to run integration tests
as well. By building the rpms using the opensuse packaging specs, the idea is
to catch more issues ahead of time as the mkosi environment will behave more
like a regular opensuse system.
- Add new %version_override and %version_release macros to allow overriding the
version and release of the rpm respectively.
-------------------------------------------------------------------
Mon Feb 19 08:53:31 UTC 2024 - Franck Bui <fbui@suse.com>

View File

@ -20,6 +20,17 @@
%define archive_version +suse.28.g53e2aaaf9d
%if 0%{?version_override}
%define systemd_major %version_override
%define systemd_minor %{nil}
%else
%define systemd_major 254
%define systemd_minor 1
%endif
%define systemd_version %{systemd_major}%{?systemd_minor:.%{systemd_minor}}
%define systemd_release %{?release_override}%{!?release_override:0}
%define _testsuitedir %{_systemd_util_dir}/tests
%define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit
@ -58,6 +69,8 @@
%bcond_without testsuite
%endif
%bcond_with upstream
# The following features are kept to ease migrations toward SLE. Their default
# value is independent of the build flavor.
%bcond_without filetriggers
@ -79,8 +92,10 @@ fi \
Name: systemd%{?mini}
URL: http://www.freedesktop.org/wiki/Software/systemd
Version: 254.9
Release: 0
# Allow users to specify the version and release when building the rpm by
# setting the %version_override and %release_override macros.
Version: %systemd_version
Release: %systemd_release
Summary: A System and Session Manager
License: LGPL-2.1-or-later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -215,6 +230,8 @@ Patch4: 0002-rc-local-fix-ordering-startup-for-etc-init.d-boot.lo.patch
Patch5: 0008-sysv-generator-translate-Required-Start-into-a-Wants.patch
%endif
%if %{without upstream}
# Patches listed below are put in quarantine. Normally all changes must go to
# upstream first and then are cherry-picked in the SUSE git repository. But for
# very few cases, some stuff might be broken in upstream and need to be fixed or
@ -232,6 +249,8 @@ Patch5008: 5008-test-Add-effective-cgroup-limits-testing.patch
Patch5009: 5009-cgroup-Restrict-effective-limits-with-global-resourc.patch
Patch5010: 5010-cgroup-Rename-effective-limits-internal-table.patch
%endif
%description
Systemd is a system and service manager, compatible with SysV and LSB
init scripts for Linux. systemd provides aggressive parallelization
@ -357,6 +376,15 @@ Conflicts: util-linux < 2.16
Conflicts: udev
Provides: udev = %{version}-%{release}
%endif
%if %{with upstream}
BuildRequires: pkgconfig(xencontrol)
BuildRequires: pkgconfig(libarchive)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(dbus-1)
Recommends: libarchive13
Recommends: libxkbcommon0
%endif
%description -n udev%{?mini}
This package provides systemd-udevd. The udev daemon receives device uevents
@ -722,7 +750,7 @@ export CFLAGS="%{optflags} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
%meson \
-Dmode=release \
-Dversion-tag=%{version}%{archive_version} \
-Dversion-tag=%{version}%[%{without upstream}?"%{archive_version}":""] \
-Ddocdir=%{_docdir}/systemd \
%if %{with split_usr}
-Drootprefix=/usr \
@ -799,7 +827,7 @@ export CFLAGS="%{optflags} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
-Dsbat-distro-url="%{?sbat_distro_url}" \
\
-Dsbat-distro-pkgname="%{name}" \
-Dsbat-distro-version="%{version}-%{release}" \
-Dsbat-distro-version="%{version}%[%{without upstream}?"-%{release}":""]" \
\
-Ddefault-dnssec=no \
-Ddns-servers='' \
@ -1387,13 +1415,13 @@ fi
%defattr(-,root,root)
%license LICENSE.LGPL2.1
%{_libdir}/libsystemd.so.0
%{_libdir}/libsystemd.so.0.37.0
%{_libdir}/libsystemd.so.0.*.0
%files -n libudev%{?mini}1
%defattr(-,root,root)
%license LICENSE.LGPL2.1
%{_libdir}/libudev.so.1
%{_libdir}/libudev.so.1.7.7
%{_libdir}/libudev.so.1.7.*
%if %{with coredump}
%files coredump