From 757ee2ed93ad2aea8af83240af184c1a28ad0443 Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 10 May 2022 20:42:31 +0300 Subject: [PATCH 1/3] dbus: remove useless nulls --- pkgs/development/libraries/dbus/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 6e3a6ed5b305..025a107191cd 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -8,16 +8,14 @@ , systemd , audit , libapparmor -, libX11 ? null -, libICE ? null -, libSM ? null -, x11Support ? (stdenv.isLinux || stdenv.isDarwin) , dbus , docbook_xml_dtd_44 , docbook-xsl-nons , xmlto , autoreconfHook , autoconf-archive +, x11Support ? (stdenv.isLinux || stdenv.isDarwin) +, xorg }: stdenv.mkDerivation rec { @@ -82,11 +80,11 @@ stdenv.mkDerivation rec { ]; buildInputs = - lib.optionals x11Support [ + lib.optionals x11Support (with xorg; [ libX11 libICE libSM - ] ++ lib.optional enableSystemd systemd + ]) ++ lib.optional enableSystemd systemd ++ lib.optionals stdenv.isLinux [ audit libapparmor ]; # ToDo: optional selinux? From be4c9c60c2e9cd447805b1cd8d0f2493d2e6f323 Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 10 May 2022 20:58:19 +0300 Subject: [PATCH 2/3] dbus: 1.12.20 -> 1.14.0 fprintd: remove dbus patch --- pkgs/development/libraries/dbus/default.nix | 20 +++---------------- .../dbus/docs-reproducible-ids.patch | 15 -------------- pkgs/tools/security/fprintd/default.nix | 11 +--------- 3 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 pkgs/development/libraries/dbus/docs-reproducible-ids.patch diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 025a107191cd..29b76e59243d 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -20,28 +20,14 @@ stdenv.mkDerivation rec { pname = "dbus"; - version = "1.12.20"; + version = "1.14.0"; src = fetchurl { - url = "https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; - sha256 = "1zp5gpx61v1cpqf2zwb1cidhp9xylvw49d3zydkxqk6b1qa20xpp"; + url = "https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.xz"; + sha256 = "sha256-zNfM43WW4KGVWP1mSNEnKrQ/AR2AyGNa6o/QutWK69Q="; }; patches = [ - # 'generate.consistent.ids=1' ensures reproducible docs, for further details see - # http://docbook.sourceforge.net/release/xsl/current/doc/html/generate.consistent.ids.html - # Also applied upstream in https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/189, - # expected in version 1.14 - ./docs-reproducible-ids.patch - # AC_PATH_XTRA doesn't seem to find X11 libs even though libX11 seems - # to provide valid pkg-config files. This replace AC_PATH_XTRA with - # PKG_CHECK_MODULES. - # MR merged cf https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/212/diffs?commit_id=23880a181e82ee7f - (fetchpatch { - url = "https://gitlab.freedesktop.org/dbus/dbus/-/commit/6bfaea0707ba1a7788c4b6d30c18fb094f3a1dd4.patch"; - sha256 = "1d8ay55n2ksw5faqx3hsdpfni3xl3gq9hnjl65073xcfnx67x8d2"; - }) - # Fix dbus-daemon crashing when running tests due to long XDG_DATA_DIRS. # https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/302 (fetchpatch { diff --git a/pkgs/development/libraries/dbus/docs-reproducible-ids.patch b/pkgs/development/libraries/dbus/docs-reproducible-ids.patch deleted file mode 100644 index 2356b64d95cf..000000000000 --- a/pkgs/development/libraries/dbus/docs-reproducible-ids.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --color -Naur dbus-1.12.20-original/doc/Makefile.in dbus-1.12.20-hacked2/doc/Makefile.in ---- dbus-1.12.20-original/doc/Makefile.in 2020-07-02 12:10:41.000000000 +0200 -+++ dbus-1.12.20-hacked2/doc/Makefile.in 2020-11-07 09:57:15.297694773 +0100 -@@ -870,8 +870,10 @@ - .PRECIOUS: Makefile - - -+# 'generate.consistent.ids=1' ensures reproducible docs, for further details see -+# http://docbook.sourceforge.net/release/xsl/current/doc/html/generate.consistent.ids.html - @DBUS_XML_DOCS_ENABLED_TRUE@%.html: %.xml --@DBUS_XML_DOCS_ENABLED_TRUE@ $(XMLTO) html-nochunks $< -+@DBUS_XML_DOCS_ENABLED_TRUE@ $(XMLTO) --stringparam generate.consistent.ids=1 html-nochunks $< - - @DBUS_XML_DOCS_ENABLED_TRUE@%.1: %.1.xml - @DBUS_XML_DOCS_ENABLED_TRUE@ $(XMLTO) man $< diff --git a/pkgs/tools/security/fprintd/default.nix b/pkgs/tools/security/fprintd/default.nix index d9c17f935eda..501481957543 100644 --- a/pkgs/tools/security/fprintd/default.nix +++ b/pkgs/tools/security/fprintd/default.nix @@ -44,16 +44,7 @@ stdenv.mkDerivation rec { gettext gtk-doc libxslt - # TODO: apply this to D-Bus so that other packages can benefit. - # https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/202 - (dbus.overrideAttrs (attrs: { - postInstall = attrs.postInstall or "" + '' - ln -s ${fetchurl { - url = "https://gitlab.freedesktop.org/dbus/dbus/-/raw/b207135dbd8c09cf8da28f7e3b0a18bb11483663/doc/catalog.xml"; - sha256 = "1/43XwAIcmRXfM4OXOPephyQyUnW8DSveiZbiPvW72I="; - }} $out/share/xml/dbus-1/catalog.xml - ''; - })) + dbus docbook-xsl-nons docbook_xml_dtd_412 ]; From d538cef5a8d306384af7ed12ad6f55f054a31f50 Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 10 May 2022 21:44:08 +0300 Subject: [PATCH 3/3] dbus: enable strictDeps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit output verified with https://github.com/Artturin/diffing justhad to add system to nativeBuildInputs for │ │ │ │ +ExecStartPost=-/usr/bin/systemctl --user set-environment DBUS_SESSION_BUS_ADDRESS=unix:path=%t/bus │ │ │ │ -ExecStartPost=-/nix/store/xwd2br5nzzd5rdil4yb250zfgdng7l8v-systemd-250.4/bin/systemctl --user set-environment DBUS_SESSION_BUS_ADDR> --- pkgs/development/libraries/dbus/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 29b76e59243d..e78529492497 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -52,6 +52,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "lib" "doc" "man" ]; + strictDeps = true; nativeBuildInputs = [ autoreconfHook autoconf-archive @@ -88,7 +89,8 @@ stdenv.mkDerivation rec { "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system" "--with-systemduserunitdir=${placeholder "out"}/etc/systemd/user" ] ++ lib.optional (!x11Support) "--without-x" - ++ lib.optionals stdenv.isLinux [ "--enable-apparmor" "--enable-libaudit" ]; + ++ lib.optionals stdenv.isLinux [ "--enable-apparmor" "--enable-libaudit" ] + ++ lib.optionals enableSystemd [ "SYSTEMCTL=${systemd}/bin/systemctl" ]; NIX_CFLAGS_LINK = lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed";