diff --git a/.gitignore b/.gitignore index 6cf7897..5df577e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /systemd-*/ /.build-*.log /x86_64/ +/noarch/ /systemd-*src.rpm /systemd-*.tar.xz /systemd-*.tar.gz diff --git a/README.build-in-place.md b/README.build-in-place.md index 057c103..8c444c5 100644 --- a/README.build-in-place.md +++ b/README.build-in-place.md @@ -7,7 +7,7 @@ and his [talk during ASG2019](https://www.youtube.com/watch?v=fVM1kJrymRM). git clone https://github.com/systemd/systemd fedpkg clone systemd fedora-systemd cd systemd -rpmbuild -bb --build-in-place --noprep --define "_sourcedir $PWD/../fedora-systemd" --define "_rpmdir $PWD/rpms" --with inplace ../systemd.spec +rpmbuild -bb --build-in-place --noprep --define "_sourcedir $PWD/../fedora-systemd" --define "_rpmdir $PWD/rpms" --with inplace ../fedora-systemd/systemd.spec sudo dnf upgrade --setopt install_weak_deps=False rpms/*/*.rpm ``` diff --git a/sources b/sources index b97b829..d53b087 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemd-253.5.tar.gz) = 39709b485cd9287e26ac8e973fa1692b280bec3b96e1da6667e4a4f2ac2228aa072b22802720a254698d32c82f5306d7feb32229e4b6d54cc0e2b1e2caa4cc2e +SHA512 (systemd-253.18.tar.gz) = 70b2387f51c633067824a21714a3c47066dff619a686b73b51f73abd560f4da6f2e93ab5e4b3e6501297164a84b1ac7435d410e1b3c9d4e744cfe39c4d4333ae diff --git a/systemd.spec b/systemd.spec index 2c6b59f..b196896 100644 --- a/systemd.spec +++ b/systemd.spec @@ -15,20 +15,27 @@ %global elf_suffix ()%{elf_bits} %endif +%bcond bzip2 1 +%bcond gnutls 1 +%bcond lz4 1 +%bcond xz 1 +%bcond zlib 1 +%bcond zstd 1 + # Bootstrap may be needed to break circular dependencies with cryptsetup, # e.g. when re-building cryptsetup on a json-c SONAME-bump. -%bcond_with bootstrap -%bcond_without tests -%bcond_without lto +%bcond bootstrap 0 +%bcond tests 1 +%bcond lto 1 # Support for quick builds with rpmbuild --build-in-place. # See README.build-in-place. -%bcond_with inplace +%bcond inplace 0 Name: systemd Url: https://systemd.io %if %{without inplace} -Version: 253.5 +Version: 253.18 %else # determine the build information from local checkout Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/') @@ -95,7 +102,6 @@ GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[ # https://bugzilla.redhat.com/show_bug.cgi?id=2164404 Patch0001: https://github.com/systemd/systemd/pull/26494.patch - # Those are downstream-only patches, but we don't want them in packit builds: # https://bugzilla.redhat.com/show_bug.cgi?id=1738828 Patch0490: use-bfq-scheduler.patch @@ -128,19 +134,31 @@ BuildRequires: /usr/bin/getfacl BuildRequires: libacl-devel BuildRequires: gobject-introspection-devel BuildRequires: libblkid-devel +%if %{with xz} BuildRequires: xz-devel BuildRequires: xz +%endif +%if %{with lz4} BuildRequires: lz4-devel BuildRequires: lz4 +%endif +%if %{with bzip2} BuildRequires: bzip2-devel +%endif +%if %{with zstd} BuildRequires: libzstd-devel +%endif BuildRequires: libidn2-devel BuildRequires: libcurl-devel BuildRequires: kmod-devel BuildRequires: elfutils-devel BuildRequires: openssl-devel +%if %{with gnutls} BuildRequires: gnutls-devel +%endif +%if %{undefined rhel} BuildRequires: qrencode-devel +%endif BuildRequires: libmicrohttpd-devel BuildRequires: libxkbcommon-devel BuildRequires: iptables-devel @@ -162,9 +180,11 @@ BuildRequires: python3-devel BuildRequires: python3dist(jinja2) BuildRequires: python3dist(lxml) BuildRequires: python3dist(pefile) +%if %{undefined rhel} BuildRequires: python3dist(pillow) -BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-flakes) +%endif +BuildRequires: python3dist(pytest) BuildRequires: python3dist(zstd) # gzip and lzma are provided by the stdlib BuildRequires: firewalld-filesystem @@ -195,9 +215,9 @@ Requires(post): grep # systemd-machine-id-setup requires libssl Requires(post): openssl-libs Requires: dbus >= 1.9.18 -Requires: %{name}-pam = %{version}-%{release} +Requires: %{name}-pam%{_isa} = %{version}-%{release} Requires(meta): (%{name}-rpm-macros = %{version}-%{release} if rpm-build) -Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}-libs%{_isa} = %{version}-%{release} %{?fedora:Recommends: %{name}-networkd = %{version}-%{release}} %{?fedora:Recommends: %{name}-resolved = %{version}-%{release}} Recommends: diffutils @@ -235,7 +255,9 @@ Recommends: libidn2.so.0(IDN2_0.0.0)%{?elf_bits} Recommends: libpcre2-8.so.0%{?elf_suffix} Recommends: libpwquality.so.1%{?elf_suffix} Recommends: libpwquality.so.1(LIBPWQUALITY_1.0)%{?elf_bits} +%if %{undefined rhel} Recommends: libqrencode.so.4%{?elf_suffix} +%endif Recommends: libbpf.so.0%{?elf_suffix} Recommends: libbpf.so.0(LIBBPF_0.4.0)%{?elf_bits} @@ -491,7 +513,7 @@ useful to test systemd internals. %package standalone-repart Summary: Standalone systemd-repart binary for use on systems without systemd -Provides: %{name}-tmpfiles = %{version}-%{release} +Provides: %{name}-repart = %{version}-%{release} RemovePathPostfixes: .standalone %description standalone-repart @@ -521,7 +543,7 @@ package and is meant for use on systems without systemd. %package standalone-shutdown Summary: Standalone systemd-shutdown binary for use on systems without systemd -Provides: %{name}-sysusers = %{version}-%{release} +Provides: %{name}-shutdown = %{version}-%{release} RemovePathPostfixes: .standalone %description standalone-shutdown @@ -536,8 +558,6 @@ package and is meant for use in exitrds. # Let's disable the service. sed -r -i '/^enable systemd-boot-update.service/d' presets/90-systemd.preset -sed -r 's|/system/|/user/|g' %{SOURCE16} >10-timeout-abort.conf.user - %generate_buildrequires %if 0%{?have_gnu_efi} if grep -q gnu-efi meson_options.txt; then @@ -571,11 +591,11 @@ CONFIGURE_OPTS=( -Dbpf-framework=%[0%{?have_bpf}?"true":"false"] -Dapparmor=false -Dpolkit=true - -Dxz=true - -Dzlib=true - -Dbzip2=true - -Dlz4=true - -Dzstd=true + -Dxz=%[%{with xz}?"true":"false"] + -Dzlib=%[%{with zlib}?"true":"false"] + -Dbzip2=%[%{with bzip2}?"true":"false"] + -Dlz4=%[%{with lz4}?"true":"false"] + -Dzstd=%[%{with zstd}?"true":"false"] -Dpam=true -Dacl=true -Dsmack=true @@ -588,8 +608,8 @@ CONFIGURE_OPTS=( -Dlibcryptsetup=%[%{with bootstrap}?"false":"true"] -Delfutils=true -Dpwquality=true - -Dqrencode=true - -Dgnutls=true + -Dqrencode=%[%{defined rhel}?"false":"true"] + -Dgnutls=%[%{with gnutls}?"true":"false"] -Dmicrohttpd=true -Dlibidn2=true -Dlibiptc=false @@ -685,6 +705,8 @@ if ! diff -u %{SOURCE1} ${new_triggers}; then sleep 5 fi +sed -r 's|/system/|/user/|g' %{SOURCE16} >10-timeout-abort.conf.user + %install %meson_install @@ -902,7 +924,7 @@ if [ $1 -eq 1 ]; then systemd-tmpfiles --create &>/dev/null || : fi -%systemd_postun_with_restart systemd-timedated.service systemd-portabled.service systemd-homed.service systemd-hostnamed.service systemd-journald.service systemd-localed.service systemd-userdbd.service systemd-oomd.service +%systemd_postun_with_restart systemd-timedated.service systemd-hostnamed.service systemd-journald.service systemd-localed.service systemd-userdbd.service systemd-oomd.service # FIXME: systemd-logind.service is excluded (https://github.com/systemd/systemd/pull/17558) # FIXME: user@*.service needs to be restarted, but using systemctl --user daemon-reexec @@ -934,8 +956,7 @@ systemctl --no-reload preset systemd-oomd.service &>/dev/null || : # a different package version. systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || : - -%global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-timesyncd.service %{?have_gnu_efi:systemd-boot-update.service} +%global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-homed.service systemd-timesyncd.service %{?have_gnu_efi:systemd-boot-update.service} systemd-portabled.service systemd-pstore.service remote-cryptsetup.target %post udev # Move old stuff around in /var/lib @@ -1011,6 +1032,24 @@ fi %preun networkd %systemd_preun systemd-networkd.service systemd-networkd-wait-online.service +%postun networkd +%systemd_postun_with_restart systemd-networkd.service +%systemd_postun systemd-networkd-wait-online.service + +%post resolved +[ $1 -eq 1 ] || exit 0 +# Initial installation + +touch %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation + +# Related to https://bugzilla.redhat.com/show_bug.cgi?id=1943263 +if ls /usr/lib/systemd/libsystemd-shared-24[0-8].so &>/dev/null; then + echo "Skipping presets for systemd-resolved.service, seems we are upgrading from old systemd." + exit 0 +fi + +%systemd_post systemd-resolved.service + %preun resolved if [ $1 -eq 0 ] ; then systemctl disable --quiet \ @@ -1026,19 +1065,8 @@ if [ $1 -eq 0 ] ; then fi fi -%post resolved -[ $1 -eq 1 ] || exit 0 -# Initial installation - -touch %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation - -# Related to https://bugzilla.redhat.com/show_bug.cgi?id=1943263 -if ls /usr/lib/systemd/libsystemd-shared-24[0-8].so &>/dev/null; then - echo "Skipping presets for systemd-resolved.service, seems we are upgrading from old systemd." - exit 0 -fi - -%systemd_post systemd-resolved.service +%postun resolved +%systemd_postun_with_restart systemd-resolved.service %posttrans resolved [ -e %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation ] || exit 0