gnu: upower: Update to 0.99.15.

Upstream has removed the Autotools build system and now
only supports Meson, so the build system has been changed
to 'meson-build-system'.

The patch 'power-builddir.patch' has to be replaced to
adjust to the switch to Meson.  This has been done by adding
an origin snippet.

The origin snippet has been simplified, and for consistency,
it has been made a gexp.

Some dependencies were Autotools-only and could be removed.

* gnu/packages/gnome.scm (upower): Update to 0.99.15.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Maxime Devos 2022-02-17 14:51:13 +00:00 committed by Ludovic Courtès
parent 7168148abe
commit b3d7eae08e
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
3 changed files with 33 additions and 69 deletions

View File

@ -1914,7 +1914,6 @@ dist_patch_DATA = \
%D%/packages/patches/util-linux-tests.patch \ %D%/packages/patches/util-linux-tests.patch \
%D%/packages/patches/util-linux-CVE-2021-3995.patch \ %D%/packages/patches/util-linux-CVE-2021-3995.patch \
%D%/packages/patches/util-linux-CVE-2021-3996.patch \ %D%/packages/patches/util-linux-CVE-2021-3996.patch \
%D%/packages/patches/upower-builddir.patch \
%D%/packages/patches/valgrind-enable-arm.patch \ %D%/packages/patches/valgrind-enable-arm.patch \
%D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \
%D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \

View File

@ -62,7 +62,7 @@
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw> ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net> ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021, 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch> ;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org> ;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> ;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
@ -5437,55 +5437,54 @@ faster results and to avoid unnecessary server load.")
(define-public upower (define-public upower
(package (package
(name "upower") (name "upower")
(version "0.99.13") (version "0.99.15")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://gitlab.freedesktop.org/upower/upower") (url "https://gitlab.freedesktop.org/upower/upower")
(commit (string-append "UPOWER_" (commit (string-append "v" version))))
(string-map (match-lambda (#\. #\_)
(chr chr))
version)))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "0khwg6jpq81dcylkpi7cn75bjzif0q9qscwvirrk41krma23iddj")) (base32 "1zk7w7pw8dhlnxhxzcbk33gmxmg8f32mppd67556v9z2qgcg4lhs"))
(patches (search-patches "upower-builddir.patch"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin ;; Upstream commit
;; Upstream commit ;; <https://cgit.freedesktop.org/upower/commit/?id=18457c99b68786cd729b315723d680e6860d9cfa>
;; <https://cgit.freedesktop.org/upower/commit/?id=18457c99b68786cd729b315723d680e6860d9cfa> ;; moved 'dbus-1/system.d' from etc/ to share/. However,
;; moved 'dbus-1/system.d' from etc/ to share/. However, ;; 'dbus-configuration-directory' in (gnu services dbus)
;; 'dbus-configuration-directory' in (gnu services dbus) ;; expects it in etc/. Thus, move it back to its previous
;; expects it in etc/. Thus, move it back to its previous ;; location.
;; location. #~(substitute* "src/meson.build"
(substitute* "src/Makefile.am" (("dbusdir / 'system.d'")
(("^dbusconfdir =.*$") "get_option('sysconfdir') / 'dbus-1/system.d'")
"dbusconfdir = $(sysconfdir)/dbus-1/system.d\n")))))) ;; Avoid writing to /var during the build, this is
(build-system glib-or-gtk-build-system) ;; not possible in Guix!
(("^install_subdir\\('does-not-exist'.*$") "")))))
(build-system meson-build-system)
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:glib-or-gtk? #t
(add-before 'check 'pre-check #:phases
(lambda* (#:key inputs #:allow-other-keys) #~(modify-phases %standard-phases
(let ((umockdev (string-append (assoc-ref inputs "umockdev") (add-before 'check 'pre-check
"/lib"))) (lambda* (#:key inputs #:allow-other-keys)
(setenv "LD_LIBRARY_PATH" umockdev))))) (let ((umockdev (string-append (assoc-ref inputs "umockdev")
#:configure-flags (list "--localstatedir=/var" "/lib")))
(string-append "--with-udevrulesdir=" (setenv "LD_LIBRARY_PATH" umockdev)))))
(assoc-ref %outputs "out") #:configure-flags
"/lib/udev/rules.d")))) #~(list "-Dsystemdsystemunitdir=no"
;; If not specified, udev will try putting history information
;; in /gnu/store.
"-Dhistorydir=/var/lib/upower"
(string-append "-Dudevrulesdir=" #$output "/bin/udev/rules.d"))))
(native-inputs (native-inputs
(list autoconf (list `(,glib "bin") ; for gdbus-codegen
automake
gobject-introspection gobject-introspection
gtk-doc gtk-doc
intltool intltool
libtool
pkg-config pkg-config
python python
which ; for ./autogen.sh
;; For tests. ;; For tests.
python-dbus python-dbus
python-dbusmock python-dbusmock

View File

@ -1,34 +0,0 @@
From 27ae011b31d831752b97eb209bc2b2206fcf40f7 Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Mon, 28 Jun 2021 11:58:47 +0200
Subject: [PATCH] gnu: upower: Fix build directory.
Remove explicit set of UPOWER_CONF_FILE_NAME in up-self-test.c;
instead the harness should set it. In Guix we set it explicitly; the
right thing is to use AM_TEST_ENVIRONMENT and regenerate the
makefiles, but we can't regenerate because current autotools carp on
some things, so we patch the Makefile.in instead.
Also fix to not try to create /var/lib/upower if /var isn't writable.
Based on a patch by Andy Wingo <wingo@igalia.com>
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 3400139..f51ee89 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -181,7 +181,7 @@ $(systemdservice_DATA): $(systemdservice_in_files) Makefile
endif
install-data-hook:
- if test -w $(DESTDIR)$(prefix)/; then \
+ if test -w $(DESTDIR)$(localstatedir)/; then \
mkdir -p $(DESTDIR)$(historydir); \
fi
--
2.32.0