aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/upower-builddir.patch
blob: d59d4364b86e20000b8552942c0d113c65481bb0 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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.

Patch by Andy Wingo <wingo@igalia.com>

--- upower-0.99.2.orig/src/Makefile.in	2014-12-18 10:32:01.000000000 +0100
+++ upower-0.99.2/src/Makefile.in	2015-04-04 19:49:28.020843678 +0200
@@ -780,6 +780,7 @@
 
 @UP_BUILD_TESTS_TRUE@up_self_test_CFLAGS = $(AM_CFLAGS) $(WARNINGFLAGS_C)
 @UP_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = $(DBUS_LAUNCH)
+@UP_BUILD_TESTS_TRUE@AM_TESTS_ENVIRONMENT = UPOWER_CONF_FILE_NAME=$(top_srcdir)/etc/UPower.conf
 dbusservicedir = $(datadir)/dbus-1/system-services
 dbusservice_in_files = org.freedesktop.UPower.service.in
 dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
@@ -1789,7 +1790,7 @@
 @HAVE_SYSTEMDSYSTEMUNITDIR_TRUE@	@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
 
 install-data-hook:
-	if test -w $(DESTDIR)$(prefix)/; then \
+	if test -w $(DESTDIR)$(localstatedir)/; then \
 		mkdir -p $(DESTDIR)$(historydir); \
 	fi
 
--- upower-0.99.2.orig/src/up-self-test.c	2014-07-17 09:46:15.000000000 +0200
+++ upower-0.99.2/src/up-self-test.c	2015-04-04 18:43:04.952741927 +0200
@@ -295,12 +295,6 @@
 #endif
 	g_test_init (&argc, &argv, NULL);
 
-	/* make check, vs. make distcheck */
-	if (g_file_test ("../etc/UPower.conf", G_FILE_TEST_EXISTS))
-		g_setenv ("UPOWER_CONF_FILE_NAME", "../etc/UPower.conf", TRUE);
-	else
-		g_setenv ("UPOWER_CONF_FILE_NAME", "../../../etc/UPower.conf", TRUE);
-
 	/* tests go here */
 	g_test_add_func ("/power/backend", up_test_backend_func);
 	g_test_add_func ("/power/device", up_test_device_func);
7b4f61cba6973675c3922c'>daemon: Run 'guix perform-download' directly....* nix/scripts/download.in: Remove. * nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove 'scripts/download'. * config-daemon.ac: Don't output 'nix/scripts/download'. * nix/libstore/builtins.cc (builtinDownload): Invoke 'guix perform-download' directly. Ludovic Courtès 2019-09-08daemon: Run 'guix authenticate' directly....* nix/scripts/authenticate.in: Remove. * nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove scripts/authenticate. * config-daemon.ac: Don't output 'nix/scripts/authenticate'. * nix/libstore/local-store.cc (runAuthenticationProgram): Run 'guix authenticate'. Ludovic Courtès 2019-09-08daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'....* nix/scripts/list-runtime-roots.in: Remove. * guix/store/roots.scm (%proc-directory): New variable. (proc-file-roots, proc-exe-roots, proc-cwd-roots) (proc-fd-roots, proc-maps-roots, proc-environ-roots) (referenced-files, canonicalize-store-item, busy-store-items): New procedures, taken from 'list-runtime-roots.in'. * nix/libstore/globals.hh (Settings)[guixProgram]: New field. * nix/libstore/globals.cc (Settings::processEnvironment): Initialize 'guixProgram'. * nix/libstore/gc.cc (addAdditionalRoots): Drop code related to 'NIX_ROOT_FINDER'. Run "guix gc --list-busy". * nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove 'scripts/list-runtime-roots'. * config-daemon.ac: Don't output nix/scripts/list-runtime-roots. * build-aux/pre-inst-env.in: Don't set 'NIX_ROOT_FINDER'. Set 'GUIX'. * doc/guix.texi (Invoking guix gc): Document '--list-busy'. * guix/scripts/gc.scm (show-help, %options): Add "--list-busy". (guix-gc)[list-busy]: New procedure. Handle the 'list-busy' action. Ludovic Courtès 2019-05-01build: Change default substitute server to "ci.guix.gnu.org"....* config-daemon.ac: Replace "ci.guix.info" with "ci.guix.gnu.org". * doc/guix.texi (SUBSTITUTE-SERVER): Likewise. * etc/substitutes/ci.guix.gnu.org.pub: New file. * Makefile.am (dist_pkgdata_DATA): Add it. * guix/scripts/build.scm (%default-log-urls): Update. * guix/scripts/substitute.scm (%default-substitute-urls): Likewise. * guix/store.scm (%default-substitute-urls): Likewise. * guix/self.scm (miscellaneous-files): Add "ci.guix.gnu.org". Ludovic Courtès 2018-12-04build: Default to https://ci.guix.info for substitutes....* config-daemon.ac (guix_substitute_urls): Always default to "https://ci.guix.info". * doc/guix.texi (SUBSTITUTE-SERVER): Switch to ci.guix.info. * guix/scripts/build.scm (%default-log-urls): Likewise. * guix/scripts/substitute.scm (%default-substitute-urls): Likewise. * guix/store.scm (%default-substitute-urls): Likewise. Ludovic Courtès 2018-11-14daemon: Install 'authenticate' script under LIBEXECDIR/guix....That way it is handled in the same way as other helper scripts. * nix/scripts/guix-authenticate.in: Rename to... * nix/scripts/authenticate.in: ... this. * config-daemon.ac: Adjust accordingly. * nix/local.mk (libstore_a_CPPFLAGS): Remove -DOPENSSL_PATH. (nodist_libexec_SCRIPTS): Remove. (nodist_pkglibexec_SCRIPTS): New variable. * nix/nix-daemon/guix-daemon.cc (main): Remove 'setenv' call for "PATH". * nix/libstore/local-store.cc (runAuthenticationProgram): New function. (LocalStore::exportPath, LocalStore::importPath): Use it instead of 'runProgram' and OPENSSL_PATH. Ludovic Courtès 2018-09-06build: Remove -L flag when $LIBGCRYPT_LIBDIR is empty....Reported by Alex Vong <alexvong1995@gmail.com>. * config-daemon.ac: Do not add "-L$LIBGCRYPT_LIBDIR" to LIBGCRYPT_LIBS when "$LIBGCRYPT_LIBDIR" is empty. Ludovic Courtès