public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Pacho Ramos" <pacho@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/files/, sys-power/upower/
Date: Sat, 13 Oct 2018 09:06:40 +0000 (UTC)	[thread overview]
Message-ID: <1539421590.71d8682c51b91e629fff6cb3bddbca9378650406.pacho@gentoo> (raw)

commit:     71d8682c51b91e629fff6cb3bddbca9378650406
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 13 09:04:46 2018 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Oct 13 09:06:30 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71d8682c

sys-power/upower: Apply important fixes from upstream

- Fix upower not having access to udev events (#668084)
- Fix upower's keyboard backlight support

Thanks-to: Peter Tworek
Closes: https://bugs.gentoo.org/668084
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../files/upower-0.99.8-keyboard-backlight.patch   | 30 +++++++
 .../upower/files/upower-0.99.8-udev-events.patch   | 32 +++++++
 sys-power/upower/upower-0.99.8-r1.ebuild           | 99 ++++++++++++++++++++++
 3 files changed, 161 insertions(+)

diff --git a/sys-power/upower/files/upower-0.99.8-keyboard-backlight.patch b/sys-power/upower/files/upower-0.99.8-keyboard-backlight.patch
new file mode 100644
index 00000000000..07b1731ad2c
--- /dev/null
+++ b/sys-power/upower/files/upower-0.99.8-keyboard-backlight.patch
@@ -0,0 +1,30 @@
+From 0a9d9ab4949effb20e77aa52e7b4ee07e776fc0d Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Tue, 4 Sep 2018 09:58:21 +0200
+Subject: daemon: Fix upower's keyboard backlight support
+
+Disabling kernel tunables blocked us from accessing /sys, meaning we
+couldn't change keyboard backlight levels.
+
+Closes: #73
+---
+ src/upower.service.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/upower.service.in b/src/upower.service.in
+index 8838655..4566ad3 100644
+--- a/src/upower.service.in
++++ b/src/upower.service.in
+@@ -10,7 +10,8 @@ Restart=on-failure
+ 
+ # Filesystem lockdown
+ ProtectSystem=strict
+-ProtectKernelTunables=true
++# Needed by keyboard backlight support
++ProtectKernelTunables=false
+ ProtectControlGroups=true
+ ReadWritePaths=@historydir@
+ ProtectHome=true
+-- 
+cgit v1.1
+

diff --git a/sys-power/upower/files/upower-0.99.8-udev-events.patch b/sys-power/upower/files/upower-0.99.8-udev-events.patch
new file mode 100644
index 00000000000..d164824b735
--- /dev/null
+++ b/sys-power/upower/files/upower-0.99.8-udev-events.patch
@@ -0,0 +1,32 @@
+From fe356951a9d45fee73036aaa72661f0319dffba3 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Tue, 21 Aug 2018 13:30:44 +0200
+Subject: daemon: Fix upower not having access to udev events
+
+PrivateNetwork=true will cut off upower from the udev netlink socket, so
+it's not what we want to use, as we want those events.
+
+See https://lists.freedesktop.org/archives/systemd-devel/2018-July/041000.html
+
+Closes: #68
+---
+ src/upower.service.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/upower.service.in b/src/upower.service.in
+index 835529a..8838655 100644
+--- a/src/upower.service.in
++++ b/src/upower.service.in
+@@ -17,7 +17,8 @@ ProtectHome=true
+ PrivateTmp=true
+ 
+ # Network
+-PrivateNetwork=true
++# PrivateNetwork=true would block udev's netlink socket
++RestrictAddressFamilies=AF_UNIX AF_NETLINK
+ 
+ # Execute Mappings
+ MemoryDenyWriteExecute=true
+-- 
+cgit v1.1
+

diff --git a/sys-power/upower/upower-0.99.8-r1.ebuild b/sys-power/upower/upower-0.99.8-r1.ebuild
new file mode 100644
index 00000000000..0fa1a0d4d9b
--- /dev/null
+++ b/sys-power/upower/upower-0.99.8-r1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit systemd xdg-utils
+
+DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics"
+HOMEPAGE="https://upower.freedesktop.org/"
+
+# No tarball released, use the same commit as Fedora
+#SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
+COMMIT="9125ab7ee96fdc4ecc68cfefb50c1cab"
+SRC_URI="https://gitlab.freedesktop.org/upower/upower/uploads/${COMMIT}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0/3" # based on SONAME of libupower-glib.so
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+
+# gtk-doc files are not available as prebuilt in the tarball
+IUSE="doc +introspection ios kernel_FreeBSD kernel_linux selinux"
+
+COMMON_DEPS="
+	>=dev-libs/dbus-glib-0.100
+	>=dev-libs/glib-2.34:2
+	sys-apps/dbus:=
+	introspection? ( dev-libs/gobject-introspection:= )
+	kernel_linux? (
+		virtual/libusb:1
+		virtual/libgudev:=
+		virtual/udev
+		ios? (
+			>=app-pda/libimobiledevice-1:=
+			>=app-pda/libplist-1:=
+			)
+		)
+"
+RDEPEND="
+	${COMMON_DEPS}
+	selinux? ( sec-policy/selinux-devicekit )
+"
+DEPEND="${COMMON_DEPS}
+	doc? ( dev-util/gtk-doc )
+	dev-libs/libxslt
+	app-text/docbook-xsl-stylesheets
+	dev-util/intltool
+	>=sys-devel/gettext-0.17
+	virtual/pkgconfig
+"
+
+QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
+
+DOCS=( AUTHORS HACKING NEWS README )
+
+PATCHES=(
+	# daemon: Fix upower not having access to udev events
+	"${FILESDIR}"/${P}-udev-events.patch
+
+	# daemon: Fix upower's keyboard backlight support
+	"${FILESDIR}"/${P}-keyboard-backlight.patch
+)
+
+src_prepare() {
+	default
+	xdg_environment_reset
+	sed -i -e '/DISABLE_DEPRECATED/d' configure || die
+}
+
+src_configure() {
+	local backend
+
+	if use kernel_linux ; then
+		backend=linux
+	elif use kernel_FreeBSD ; then
+		backend=freebsd
+	else
+		backend=dummy
+	fi
+
+	local myeconfargs=(
+		--disable-static
+		--disable-tests
+		--enable-man-pages
+		--libexecdir="${EPREFIX%/}"/usr/lib/${PN}
+		--localstatedir="${EPREFIX%/}"/var
+		--with-backend=${backend}
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		--with-systemdutildir="$(systemd_get_utildir)"
+		$(use_enable doc gtk-doc)
+		$(use_enable introspection)
+		$(use_with ios idevice)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	find "${D}" -name '*.la' -delete || die
+	keepdir /var/lib/upower #383091
+}


             reply	other threads:[~2018-10-13  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-13  9:06 Pacho Ramos [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-20 22:38 [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/files/, sys-power/upower/ Matt Turner
2019-05-04  9:50 Pacho Ramos
2019-01-20 13:40 Pacho Ramos
2018-03-07 11:37 Michael Palimaka
2017-06-18  9:30 Pacho Ramos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1539421590.71d8682c51b91e629fff6cb3bddbca9378650406.pacho@gentoo \
    --to=pacho@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox