Merge pull request #172367 from Artturin/dbusupdate

dbus: 1.12.20 -> 1.14.0
This commit is contained in:
Artturi 2022-05-12 14:43:17 +03:00 committed by GitHub
commit 8f43c6e3a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 49 deletions

View File

@ -8,42 +8,26 @@
, 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 {
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 {
@ -68,6 +52,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "lib" "doc" "man" ];
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
autoconf-archive
@ -82,11 +67,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?
@ -104,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";

View File

@ -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 $<

View File

@ -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
];