- When building systemd rpms in place (i.e. rpmbuild --build-in-place), the

version of systemd is now retrieved from the file "meson.version" by
  default. This file is supposed to contain a string that described the full
  version of the systemd project.
- Overriding of %systemd_version/%systemd_release is now limited to builds of
  rpms in place cases.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1496
This commit is contained in:
Franck Bui 2024-02-23 08:10:09 +00:00 committed by Git OBS Bridge
parent 60821ed2c5
commit cf25628836
3 changed files with 26 additions and 14 deletions

View File

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

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Feb 23 07:51:50 UTC 2024 - Franck Bui <fbui@suse.com>
- When building systemd rpms in place (i.e. rpmbuild --build-in-place), the
version of systemd is now retrieved from the file "meson.version" by
default. This file is supposed to contain a string that described the full
version of the systemd project.
- Overriding of %systemd_version/%systemd_release is now limited to builds of
rpms in place cases.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 22 09:47:41 UTC 2024 - Franck Bui <fbui@suse.com> Thu Feb 22 09:47:41 UTC 2024 - Franck Bui <fbui@suse.com>
@ -16,6 +27,7 @@ Tue Feb 20 12:22:42 UTC 2024 - Daan De Meyer <daan.j.demeyer@gmail.com>
as well. By building the rpms using the opensuse packaging specs, the idea is 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 to catch more issues ahead of time as the mkosi environment will behave more
like a regular opensuse system. like a regular opensuse system.
- Add new %version_override and %version_release macros to allow overriding the - Add new %version_override and %version_release macros to allow overriding the
version and release of the rpm respectively. version and release of the rpm respectively.

View File

@ -18,18 +18,20 @@
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%define systemd_version 254.9
%define systemd_release 0
%define archive_version +suse.30.g31f1148f75 %define archive_version +suse.30.g31f1148f75
%if 0%{?version_override} %if 0%{?_build_in_place}
%define systemd_major %version_override # Allow users to specify the version and the release when building the rpm in
%define systemd_minor %{nil} # place. When not provided we look for the version in meson.version (introduced
%else # in v256).
%define systemd_major 254 %define systemd_version %{?version_override}%{!?version_override:%(cat meson.version)}
%define systemd_minor 9 %define systemd_release %{?release_override}%{!?release_override:0}
%define archive_version %{nil}
%endif %endif
%define systemd_version %{systemd_major}%{?systemd_minor:.%{systemd_minor}} %define systemd_major %{sub %systemd_version 1 3}
%define systemd_release %{?release_override}%{!?release_override:0}
%define _testsuitedir %{_systemd_util_dir}/tests %define _testsuitedir %{_systemd_util_dir}/tests
%define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit %define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit
@ -92,8 +94,6 @@ fi \
Name: systemd%{?mini} Name: systemd%{?mini}
URL: http://www.freedesktop.org/wiki/Software/systemd URL: http://www.freedesktop.org/wiki/Software/systemd
# Allow users to specify the version and release when building the rpm by
# setting the %%version_override and %%release_override macros.
Version: %systemd_version Version: %systemd_version
Release: %systemd_release Release: %systemd_release
Summary: A System and Session Manager Summary: A System and Session Manager
@ -750,7 +750,7 @@ export CFLAGS="%{optflags} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
%meson \ %meson \
-Dmode=release \ -Dmode=release \
-Dversion-tag=%{version}%[%{without upstream}?"%{archive_version}":""] \ -Dversion-tag=%{version}%{archive_version} \
-Ddocdir=%{_docdir}/systemd \ -Ddocdir=%{_docdir}/systemd \
%if %{with split_usr} %if %{with split_usr}
-Drootprefix=/usr \ -Drootprefix=/usr \