From ca5ecaae7a8f75e18ba85b29839752da76e3b7b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 16 Sep 2024 20:20:44 +0200 Subject: Merging upstream version 256.4. Signed-off-by: Daniel Baumann --- .../10-debian-ubuntu/mkosi.build.chroot | 147 --------------------- .../mkosi.conf.d/10-debian-ubuntu/mkosi.conf | 92 ------------- .../10-debian-ubuntu/mkosi.conf.d/10-debug.conf | 29 ---- .../10-debian-ubuntu/mkosi.conf.d/efi.conf | 16 --- .../10-debian-ubuntu/mkosi.conf.d/network.conf | 7 - .../mkosi.conf.d/10-debian-ubuntu/mkosi.postinst | 29 ---- .../mkosi.conf.d/10-debian-ubuntu/mkosi.prepare | 18 --- 7 files changed, 338 deletions(-) delete mode 100755 mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot delete mode 100644 mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf delete mode 100644 mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/10-debug.conf delete mode 100644 mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/efi.conf delete mode 100644 mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/network.conf delete mode 100755 mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.postinst delete mode 100755 mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.prepare (limited to 'mkosi.images/system/mkosi.conf.d/10-debian-ubuntu') diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot deleted file mode 100755 index f1eed03..0000000 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot +++ /dev/null @@ -1,147 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-2.1-or-later -set -e - -if ((NO_BUILD)); then - exit 0 -fi - -# shellcheck source=/dev/null -. /usr/lib/os-release - -if [ ! -d "pkg/$ID/debian" ]; then - echo "deb rules not found at pkg/$ID/debian, run mkosi once with -ff to make sure the rules are cloned" >&2 - exit 1 -fi - -# We transplant the debian/ folder from the deb package sources into the upstream sources. -mount --mkdir --bind "$SRCDIR/pkg/$ID/debian" "$SRCDIR"/debian - -# We remove the patches so they don't get applied. -rm -rf "$SRCDIR"/debian/patches/* - -# While the build directory can be specified through DH_OPTIONS, the default one is hardcoded everywhere so -# we have to use that. Because it is architecture dependent, we query it using dpkg-architecture first. -DEB_HOST_GNU_TYPE="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" -mount --mkdir --bind "$BUILDDIR" "$SRCDIR/obj-$DEB_HOST_GNU_TYPE" - -if [ -d .git/ ] && [ -z "$(git status --porcelain)" ]; then - TS="$(git show --no-patch --format=%ct HEAD)" -else - TS="${SOURCE_DATE_EPOCH:-$(date +%s)}" -fi - -# Add a new changelog entry to update the version. We use a fixed date since a dynamic one causes a full -# rebuild every time. -cat >debian/changelog.new < $(date --rfc-email --date "@$TS") - -EOF -cat debian/changelog >>debian/changelog.new -mv debian/changelog.new debian/changelog - -MKOSI_CFLAGS="-O0" -if ((LLVM)); then - # TODO: Remove -fno-sanitize-function when https://github.com/systemd/systemd/issues/29972 is fixed. - MKOSI_CFLAGS="$MKOSI_CFLAGS -shared-libasan -fno-sanitize=function" -fi - -MKOSI_LDFLAGS="" -if ((LLVM)) && [[ -n "$SANITIZERS" ]]; then - MKOSI_LDFLAGS="$MKOSI_LDFLAGS -Wl,-rpath=$(clang --print-file-name="")lib/linux" -fi - -MKOSI_MESON_OPTIONS="-D mode=developer -D b_sanitize=${SANITIZERS:-none}" -if ((WIPE)); then - MKOSI_MESON_OPTIONS="$MKOSI_MESON_OPTIONS --wipe" -fi - -# TODO: Drop GENSYMBOLS_LEVEL once https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986746 is fixed. -build() { - env \ - CC="$( ((LLVM)) && echo clang || echo gcc)" \ - CXX="$( ((LLVM)) && echo clang++ || echo g++)" \ - CC_LD="$( ((LLVM)) && echo lld)" \ - CXX_LD="$( ((LLVM)) && echo lld)" \ - DEB_BUILD_OPTIONS="$(awk '$1=$1' <<<"\ - $( ((WITH_TESTS)) || echo nocheck) \ - $( ((WITH_DOCS)) || echo nodoc) \ - $( ((WITH_DEBUG)) && echo debug || echo nostrip) \ - $( ! ((MESON_VERBOSE)) && echo terse) \ - optimize=-lto \ - hardening=-fortify \ - ")" \ - DEB_BUILD_PROFILES="$(awk '$1=$1' <<<"\ - $( ((WITH_TESTS)) || echo nocheck) \ - $( ((WITH_DOCS)) || echo nodoc) \ - pkg.systemd.upstream \ - ")" \ - DEB_CFLAGS_APPEND="$MKOSI_CFLAGS $CFLAGS" \ - DEB_CXXFLAGS_APPEND="$MKOSI_CFLAGS $CFLAGS" \ - DEB_LDFLAGS_APPEND="$MKOSI_LDFLAGS $LDFLAGS" \ - DPKG_FORCE="unsafe-io" \ - DPKG_DEB_COMPRESSOR_TYPE="none" \ - DH_MISSING="--fail-missing" \ - CONFFLAGS_UPSTREAM="$MKOSI_MESON_OPTIONS $MESON_OPTIONS" \ - GENSYMBOLS_LEVEL="$( ((LLVM)) && echo 0 || echo 1)" \ - dpkg-buildpackage \ - --no-pre-clean \ - --unsigned-changes \ - --build=binary - - EXIT_STATUS=$? - - # Make sure we don't reconfigure twice. - MKOSI_MESON_OPTIONS="${MKOSI_MESON_OPTIONS//"--wipe"/}" - - return $EXIT_STATUS -} - -if ! build; then - # debhelper installs files for each package to debian/ so we figure out which files were - # packaged by querying all the package names from debian/control and running find on each of the - # corresponding package directory in debian/. - grep "Package:" debian/control | - sed "s/Package: //" | - xargs -d '\n' -I {} sh -c "[ -d debian/{} ] && (cd debian/{} && find . ! -type d ! -path "*dh-exec*" -printf '%P\n')" | - # Remove compression suffix from compressed manpages as the manpages in debian/tmp will be uncompressed. - sed --regexp-extended 's/([0-9])\.gz$/\1/' | - sort --unique >/tmp/packaged-files - - # We figure out the installed files by running find on debian/tmp/ which contains the files installed - # by meson install. - (cd debian/tmp/ && find . ! -type d ! -path "*dh-exec*" -printf '%P\n') >/tmp/installed-files - - if [ -f debian/not-installed ]; then - grep --invert-match "^#" debian/not-installed >>/tmp/installed-files - fi - - sort --unique --output /tmp/installed-files /tmp/installed-files - - # We get all the installed files that were not packaged by finding entries in the installed file that are - # not in the packaged file. - comm -23 /tmp/installed-files /tmp/packaged-files > /tmp/unpackaged-files - # If there are no unpackaged files something else went wrong. - if [ ! -s /tmp/unpackaged-files ]; then - exit 1 - fi - - # Otherwise, we append the unpackaged files to the filelist for the systemd package and retry the build. - cat /tmp/unpackaged-files >>debian/systemd.install - build -fi - -( - shopt -s nullglob - rm -f "$BUILDDIR"/*.deb "$BUILDDIR"/*.ddeb - - cp ../*.deb ../*.ddeb "$PACKAGEDIR" - cp ../*.deb ../*.ddeb "$OUTPUTDIR" - cp ../*.deb ../*.ddeb "$BUILDDIR" - # These conflict with the packages that we actually want to install, so remove them - rm -f "$BUILDDIR"/systemd-standalone-*.deb "$BUILDDIR"/systemd-standalone-*.ddeb -) diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf deleted file mode 100644 index c6b8154..0000000 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf +++ /dev/null @@ -1,92 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later - -[Match] -Distribution=|debian -Distribution=|ubuntu - -[Content] -Environment= - GIT_URL=https://salsa.debian.org/systemd-team/systemd.git - GIT_SUBDIR=debian - GIT_BRANCH=ci/v256-stable - GIT_COMMIT=5f07b24c429e854db1afad5f14729804a46a59af - -VolatilePackages= - libnss-myhostname - libnss-mymachines - libnss-resolve - libnss-systemd - libpam-systemd - libsystemd-dev - libudev-dev - systemd - systemd-container - systemd-coredump - systemd-cryptsetup - systemd-dev - systemd-homed - systemd-journal-remote - systemd-oomd - systemd-repart - systemd-resolved - systemd-sysv - systemd-tests - systemd-timesyncd - systemd-ukify - systemd-userdbd - udev - -Packages= - ^libasan[0-9]+$ - ^libtss2-esys-[0-9.]+-0$ - ^libtss2-mu-[0-9.]+-0$ - ^libubsan[0-9]+$ - apt - bind9-dnsutils - cryptsetup-bin - dbus-broker - dbus-user-session - dmsetup - dpkg-dev - f2fs-tools - fdisk - git-core - gnutls-bin - iproute2 - iputils-ping - isc-dhcp-server - libcap-ng-utils - libclang-rt-dev - libtss2-rc0 - libtss2-tcti-device0 - locales - man-db - multipath-tools - netcat-openbsd - open-iscsi - openssh-client - openssh-server - passwd - policykit-1 - procps - psmisc - python3-pexpect - python3-psutil - quota - softhsm2 - squashfs-tools - stress - tgt - tpm2-tools - tzdata - xxd - -InitrdPackages= - libclang-rt-dev - tpm2-tools - -InitrdVolatilePackages= - systemd - systemd-cryptsetup - systemd-repart - udev diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/10-debug.conf b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/10-debug.conf deleted file mode 100644 index 2bb6164..0000000 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/10-debug.conf +++ /dev/null @@ -1,29 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later - -[Match] -Environment=WITH_DEBUG=1 - -[Content] -VolatilePackages= - libnss-myhostname-dbgsym - libnss-mymachines-dbgsym - libnss-resolve-dbgsym - libnss-systemd-dbgsym - libpam-systemd-dbgsym - libsystemd-shared-dbgsym - libsystemd0-dbgsym - libudev1-dbgsym - systemd-boot-dbgsym - systemd-container-dbgsym - systemd-coredump-dbgsym - systemd-cryptsetup-dbgsym - systemd-dbgsym - systemd-homed-dbgsym - systemd-journal-remote-dbgsym - systemd-oomd-dbgsym - systemd-repart-dbgsym - systemd-resolved-dbgsym - systemd-tests-dbgsym - systemd-timesyncd-dbgsym - systemd-userdbd-dbgsym - udev-dbgsym diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/efi.conf b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/efi.conf deleted file mode 100644 index 781670a..0000000 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/efi.conf +++ /dev/null @@ -1,16 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later -# sbsigntool exists only on UEFI architectures - -[Match] -Architecture=|x86 -Architecture=|x86-64 -Architecture=|arm -Architecture=|arm64 -Architecture=|riscv32 -Architecture=|riscv64 - -[Content] -Packages= - sbsigntool - systemd-boot - systemd-boot-efi diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/network.conf b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/network.conf deleted file mode 100644 index 4fb4f46..0000000 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/network.conf +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later - -[Match] -Environment=NO_BUILD=1 - -[Content] -WithNetwork=yes diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.postinst b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.postinst deleted file mode 100755 index 314f235..0000000 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.postinst +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-2.1-or-later -set -e - -# By default Suggests are not installed (and often Recommends are disabled too), which means we will miss -# the dlopen optional dependencies, but the tests need them, so parse them from the package metadata and -# install them. This is not an issue when building locally, as the build and runtime images are the same, -# so they would get installed as build dependencies anyway. - -if [ "$1" = "build" ] || ! ((NO_BUILD)); then - exit 0 -fi - -# Query the Recommends and Suggests of all systemd packages, by matching on the version -systemd_version="$(dpkg-query --showformat '${Version}' --show systemd)" -mapfile -t systemd_packages < <( dpkg --list | grep '^ii' | grep "$systemd_version" | awk '{print $2}' | tr '\n' ' ' ) -extra_packages=() -# shellcheck disable=SC2068 -for package in ${systemd_packages[@]}; do - # We are looking for dlopens, so filter for libraries - mapfile -t -O "${#extra_packages[@]}" extra_packages < <(dpkg-query --showformat '${Suggests}' --show "$package" | sed -e "s/, /\n/g" -e "s/|.*//" | grep "lib") - mapfile -t -O "${#extra_packages[@]}" extra_packages < <(dpkg-query --showformat '${Recommends}' --show "$package" | sed -e "s/, /\n/g" -e "s/|.*//" | grep "lib") -done - -if [ "${#extra_packages[@]}" -eq 0 ]; then - exit 0 -fi - -apt install "${extra_packages[@]}" diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.prepare b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.prepare deleted file mode 100755 index 645671a..0000000 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.prepare +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-2.1-or-later -set -e - -if [ "$1" = "build" ] || ((NO_BUILD)); then - exit 0 -fi - -# shellcheck source=/dev/null -. "$BUILDROOT/usr/lib/os-release" - -if [ ! -d "pkg/$ID/debian" ]; then - echo "deb rules not found at pkg/$ID/debian, run mkosi once with -ff to make sure the rules are cloned" >&2 - exit 1 -fi - -cd "pkg/$ID" -DEB_BUILD_PROFILES="pkg.systemd.upstream" apt-get build-dep . -- cgit v1.2.3