Replace inplace macro with upstream macro
Currently, the inplace macro only influences whether we use tools/meson-vcs-tag.sh to figure out the version instead of using the predefined one. But doing an inplace build shouldn't really affect the version, since it's possible to do an inplace builds that's not a git main upstream build, so the two concepts are disjoint. Instead, let's replace the "inplace" macro with an "upstream" macro to indicate that we're building from systemd git upstream. Aside from influencing the version, this also disables various patches and adds a libarchive dependency that was added upstream recently but isn't in an official release yet.
This commit is contained in:
parent
a9172a2e9c
commit
a95f14a72e
|
@ -7,7 +7,7 @@ and his [talk during ASG2019](https://www.youtube.com/watch?v=fVM1kJrymRM).
|
||||||
git clone https://github.com/systemd/systemd
|
git clone https://github.com/systemd/systemd
|
||||||
fedpkg clone systemd fedora-systemd
|
fedpkg clone systemd fedora-systemd
|
||||||
cd systemd
|
cd systemd
|
||||||
rpmbuild -bb --build-in-place --noprep --define "_sourcedir $PWD/../fedora-systemd" --define "_rpmdir $PWD/rpms" --with inplace ../fedora-systemd/systemd.spec
|
rpmbuild -bb --build-in-place --noprep --define "_sourcedir $PWD/../fedora-systemd" --define "_rpmdir $PWD/rpms" --with upstream ../fedora-systemd/systemd.spec
|
||||||
sudo dnf upgrade --setopt install_weak_deps=False rpms/*/*.rpm
|
sudo dnf upgrade --setopt install_weak_deps=False rpms/*/*.rpm
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
19
systemd.spec
19
systemd.spec
|
@ -28,13 +28,12 @@
|
||||||
%bcond tests 1
|
%bcond tests 1
|
||||||
%bcond lto 1
|
%bcond lto 1
|
||||||
|
|
||||||
# Support for quick builds with rpmbuild --build-in-place.
|
# Build from git main
|
||||||
# See README.build-in-place.
|
%bcond upstream 0
|
||||||
%bcond inplace 0
|
|
||||||
|
|
||||||
Name: systemd
|
Name: systemd
|
||||||
Url: https://systemd.io
|
Url: https://systemd.io
|
||||||
%if %{without inplace}
|
%if %{without upstream}
|
||||||
Version: 255.3
|
Version: 255.3
|
||||||
%else
|
%else
|
||||||
# determine the build information from local checkout
|
# determine the build information from local checkout
|
||||||
|
@ -100,6 +99,8 @@ GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[
|
||||||
# than in the next section. Packit CI will drop any patches in this range before
|
# than in the next section. Packit CI will drop any patches in this range before
|
||||||
# applying upstream pull requests.
|
# applying upstream pull requests.
|
||||||
|
|
||||||
|
%if %{without upstream}
|
||||||
|
|
||||||
# Work-around for dracut issue: run generators directly when we are in initrd
|
# Work-around for dracut issue: run generators directly when we are in initrd
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2164404
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2164404
|
||||||
# Drop when dracut-060 is available.
|
# Drop when dracut-060 is available.
|
||||||
|
@ -115,6 +116,8 @@ Patch0491: https://github.com/systemd/systemd/pull/30846.patch
|
||||||
# Adjust upstream config to use our shared stack
|
# Adjust upstream config to use our shared stack
|
||||||
Patch0499: fedora-use-system-auth-in-pam-systemd-user.patch
|
Patch0499: fedora-use-system-auth-in-pam-systemd-user.patch
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch %{ix86} x86_64 aarch64
|
%ifarch %{ix86} x86_64 aarch64
|
||||||
%global want_bootloader 1
|
%global want_bootloader 1
|
||||||
%endif
|
%endif
|
||||||
|
@ -206,6 +209,10 @@ BuildRequires: pkgconfig(bash-completion)
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl(IPC::SysV)
|
BuildRequires: perl(IPC::SysV)
|
||||||
|
|
||||||
|
%if %{with upstream}
|
||||||
|
BuildRequires: pkgconfig(libarchive)
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifnarch %ix86
|
%ifnarch %ix86
|
||||||
# bpftool is not built for i368
|
# bpftool is not built for i368
|
||||||
BuildRequires: bpftool
|
BuildRequires: bpftool
|
||||||
|
@ -282,6 +289,10 @@ Recommends: libelf.so.1(ELFUTILS_1.7)%{?elf_bits}
|
||||||
Recommends: libcryptsetup.so.12%{?elf_suffix}
|
Recommends: libcryptsetup.so.12%{?elf_suffix}
|
||||||
Recommends: libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits}
|
Recommends: libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits}
|
||||||
|
|
||||||
|
%if %{with upstream}
|
||||||
|
Recommends: libarchive.so.13%{?elf_suffix}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
systemd is a system and service manager that runs as PID 1 and starts the rest
|
systemd is a system and service manager that runs as PID 1 and starts the rest
|
||||||
of the system. It provides aggressive parallelization capabilities, uses socket
|
of the system. It provides aggressive parallelization capabilities, uses socket
|
||||||
|
|
Loading…
Reference in New Issue