From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kei Yamashita Subject: Re: [PATCH] gnu: Add wmbattery Date: Sat, 14 May 2016 22:38:51 -0400 Message-ID: <20160514223851.0615794f@openmailbox.org> References: <20160404170451.5e21f8f0@openmailbox.org> <20160513122507.127a7227@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/WjuFmR0bqCQ1SzJWhzjH5Kh"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2N13-0007k4-I7 for guix-devel@gnu.org; Mon, 16 May 2016 14:13:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2N0z-0003yu-VY for guix-devel@gnu.org; Mon, 16 May 2016 14:13:17 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:46659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2N0z-0003yW-L5 for guix-devel@gnu.org; Mon, 16 May 2016 14:13:13 -0400 In-Reply-To: <20160513122507.127a7227@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org --Sig_/WjuFmR0bqCQ1SzJWhzjH5Kh Content-Type: multipart/mixed; boundary="MP_/sOjqV6OvzaGaTwzmn/AgEkz" --MP_/sOjqV6OvzaGaTwzmn/AgEkz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Fri, 13 May 2016 12:25:07 +0200 Danny Milosavljevic wrote: > On Mon, 4 Apr 2016 17:04:51 -0400 > Kei Yamashita wrote: >=20 > > The source tarball comes from Debian. =20 >=20 > The wmbattery version > > that we use in Guix has a memory leak. It's been eating up all memory > of my laptop for some time now, so I tracked it down. >=20 > The fix would be: >=20 > diff -ur orig/dockapps-30b9edb/upower.c dockapps-30b9edb/upower.c > --- orig/dockapps-30b9edb/upower.c 2015-08-31 > 01:58:13.000000000 +0200 +++ dockapps-30b9edb/upower.c > 2016-05-12 07:21:27.550374114 +0200 @@ -56,7 +56,8 @@ > =20 > int upower_supported(void) > { > - up =3D up_client_new(); > + if (!up) > + up =3D up_client_new(); > =20 > if (!up) { > return 0; > @@ -78,7 +79,8 @@ > GPtrArray *devices =3D NULL; > static int retries =3D 0; > =20 > - up =3D up_client_new(); > + if (!up) > + up =3D up_client_new(); > =20 > if (!up) > return -1; >=20 > I added Joey Hess, the author of the program, to Cc. >=20 > @Joey Hess: what do you think? Until the patch is applied upstream, this patch should keep things in order within Guix. --MP_/sOjqV6OvzaGaTwzmn/AgEkz Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-gnu-wmbattery-Add-patch-upower-phase.patch =46rom e07912c6b5ea2ff45d5b923dccad26fef3ca932d Mon Sep 17 00:00:00 2001 From: Kei Yamashita Date: Sat, 14 May 2016 22:27:15 -0400 Subject: [PATCH] gnu: wmbattery: Add `patch-upower' phase. * gnu/packages/gnustep.scm (wmbattery): Add `patch-upower' phase. --- gnu/packages/gnustep.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm index 31fca5b..961df0e 100644 --- a/gnu/packages/gnustep.scm +++ b/gnu/packages/gnustep.scm @@ -108,7 +108,13 @@ interface. It is fast, feature rich, easy to configur= e, and easy to use.") #:phases (modify-phases %standard-phases (add-after 'unpack 'autoconf - (lambda _ (zero? (system* "autoreconf" "-vfi"))))))) + (lambda _ (zero? (system* "autoreconf" "-vfi")))) + (add-before 'configure 'patch-upower + (lambda _ + (substitute* "upower.c" + (("up =3D up_client_new\\(\\);") + (string-append "if (!up)\n" + " up =3D up_client_new();"))= )))))) (inputs `(("glib" ,glib) ("libx11" ,libx11) --=20 2.7.4 --MP_/sOjqV6OvzaGaTwzmn/AgEkz-- --Sig_/WjuFmR0bqCQ1SzJWhzjH5Kh Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXN+E7AAoJEGS2gC359kOTFE8IALBsjnnzc32y/dl6q0hWGk6P +42ZDr8ap0m1VeF5RbCOXWdkJGrQJw1yTXMmy3f4hWJMl1MFDE1UbUY8R4UyBpk/ asa72uxiQD19y7BO1EkHcvTZXvi8mYxcOdI+rRihns1skNQbHmC5oFk3o+EKTakI 5O+PpGKmNXXo2cN5NP/sExKOhUW57tNLX6P15gSvXailgQBqMQtBPYdPps3c6+8s bWkLvCfQWfX3skguAjRceOk54vYHRUDNQ9Bs2Dd/GvJ+4uQLkL2Vbs1843YnxWzE nGygOI9KDcA8jQ/Nym3DOsxMrsXn6kQ6PGcvRXOyRBGVagQ5oiqCdHq9QH/Qa+Y= =56ea -----END PGP SIGNATURE----- --Sig_/WjuFmR0bqCQ1SzJWhzjH5Kh--