From f3a354c8d1f5a53e5bd29cf01cf800d093a75182 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 8 Apr 2022 20:46:02 +0200 Subject: [PATCH] sys-apps/dbus: Apply Flatcar modifications --- .../coreos-overlay/sys-apps/dbus/README.md | 15 ++++++++ .../sys-apps/dbus/dbus-1.14.4.ebuild | 35 ++++++++++++------- 2 files changed, 37 insertions(+), 13 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/README.md diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/README.md b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/README.md new file mode 100644 index 0000000000..e8770d9ee3 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/README.md @@ -0,0 +1,15 @@ +Modifications done in this fork: + +- Disable user sessions. We don't need them in Flatcar. At some point + Gentoo dropped the dedicated USE flag for it and enables user + sessions with systemd USE flag. + +- Drop the dependency on sec-policy/selinux-dbus which is brought by + the selinux USE flag. We enable the flag because we still want DBus + to be selinux-aware, but for some reason we didn't want to pull in + the `sec-policy/selinux-dbus` package. We may want to revisit this + with our SELinux work. + +- Drop /etc/machine-id generation. We do it elsewhere (bootengine?). + +- Mark it as stable for amd64 and arm64. diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.14.4.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.14.4.ebuild index 9333216aff..ac7ebdfa29 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.14.4.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.14.4.ebuild @@ -17,7 +17,8 @@ SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz" LICENSE="|| ( AFL-2.1 GPL-2 )" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +# Flatcar: Mark it as stable for amd64 and arm64. +KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="debug doc elogind selinux static-libs systemd test X" RESTRICT="!test? ( test )" @@ -51,9 +52,14 @@ DEPEND="${COMMON_DEPEND} >=dev-libs/glib-2.40:2 ) " +# Flatcar: Drop the following dependency to avoid pulling in +# unnecessary ebuilds into rootfs: +# +# selinux? ( sec-policy/selinux-dbus ) +# +# We may want to revisit that, actually. RDEPEND="${COMMON_DEPEND} acct-user/messagebus - selinux? ( sec-policy/selinux-dbus ) systemd? ( virtual/tmpfiles ) " @@ -131,7 +137,9 @@ multilib_src_configure() { --disable-kqueue $(use_enable elogind) $(use_enable systemd) - $(use_enable systemd user-session) + # Flatcar: disable user sessions + # $(use_enable systemd user-session) + --disable-user-session --disable-embedded-tests --disable-modular-tests $(use_enable debug stats) @@ -256,16 +264,17 @@ multilib_src_install_all() { pkg_postinst() { readme.gentoo_print_elog - if use systemd; then - tmpfiles_process dbus.conf - fi - - # Ensure unique id is generated and put it in /etc wrt bug #370451 but symlink - # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse - # dependencies with hardcoded paths (although the known ones got fixed already) - # TODO: should be safe to remove at least the ln because of the above tmpfiles_process? - dbus-uuidgen --ensure="${EROOT}"/etc/machine-id - ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id + # Flatcar: Drop machine-id generation. + # if use systemd; then + # tmpfiles_process dbus.conf + # fi + # + # # Ensure unique id is generated and put it in /etc bug wrt #370451 but symlink + # # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse + # # dependencies with hardcoded paths (although the known ones got fixed already) + # # TODO: should be safe to remove at least the ln because of the above tmpfiles_process? + # dbus-uuidgen --ensure="${EROOT}"/etc/machine-id + # ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id if [[ ${CHOST} == *-darwin* ]]; then local plist="org.freedesktop.dbus-session.plist"