From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7E15B138334 for ; Mon, 25 Feb 2019 12:01:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B7249E08F6; Mon, 25 Feb 2019 12:01:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 72107E08F6 for ; Mon, 25 Feb 2019 12:01:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1A810340A3B for ; Mon, 25 Feb 2019 12:01:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D9F8D545 for ; Mon, 25 Feb 2019 12:01:34 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1551096078.bf627d629f87b6bb450c3d435b10176f3a653126.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/fwupd/, sys-apps/fwupd/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/fwupd/files/fwupd-1.2.4-elogind.patch sys-apps/fwupd/fwupd-1.2.4-r2.ebuild sys-apps/fwupd/metadata.xml X-VCS-Directories: sys-apps/fwupd/ sys-apps/fwupd/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: bf627d629f87b6bb450c3d435b10176f3a653126 X-VCS-Branch: master Date: Mon, 25 Feb 2019 12:01:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: de6aec2b-df27-4818-af0e-6190d9f623d4 X-Archives-Hash: 866bfee6ebe0c182333f2074ebacdf0e commit: bf627d629f87b6bb450c3d435b10176f3a653126 Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon Feb 25 10:57:21 2019 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Mon Feb 25 12:01:18 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf627d62 sys-apps/fwupd: Add USE elogind Closes: https://bugs.gentoo.org/668522 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner gentoo.org> sys-apps/fwupd/files/fwupd-1.2.4-elogind.patch | 105 ++++++++++++++++++++ sys-apps/fwupd/fwupd-1.2.4-r2.ebuild | 132 +++++++++++++++++++++++++ sys-apps/fwupd/metadata.xml | 3 +- 3 files changed, 239 insertions(+), 1 deletion(-) diff --git a/sys-apps/fwupd/files/fwupd-1.2.4-elogind.patch b/sys-apps/fwupd/files/fwupd-1.2.4-elogind.patch new file mode 100644 index 00000000000..1a8b7760001 --- /dev/null +++ b/sys-apps/fwupd/files/fwupd-1.2.4-elogind.patch @@ -0,0 +1,105 @@ +From de2b70bc7d0ca092659a0b5a4719e41444660b14 Mon Sep 17 00:00:00 2001 +From: Marcin Sucharski +Date: Sun, 24 Feb 2019 00:28:10 +0100 +Subject: [PATCH] Add elogind support + +--- + data/meson.build | 27 ++++++++++++++++----------- + meson.build | 6 ++++++ + meson_options.txt | 1 + + src/fu-util-common.c | 4 ++-- + 4 files changed, 25 insertions(+), 13 deletions(-) + +diff --git a/data/meson.build b/data/meson.build +index 2d7fb632a..f9377c803 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -63,17 +63,6 @@ if get_option('systemd') + endif + con2.set('dynamic_options', '\n'.join(dynamic_options)) + +- # replace @libexecdir@ +- configure_file( +- input : 'org.freedesktop.fwupd.service.in', +- output : 'org.freedesktop.fwupd.service', +- configuration : con2, +- install: true, +- install_dir: join_paths(datadir, +- 'dbus-1', +- 'system-services'), +- ) +- + # replace @bindir@ + configure_file( + input : 'fwupd-offline-update.service.in', +@@ -92,3 +81,19 @@ if get_option('systemd') + install_dir: systemdunitdir, + ) + endif ++ ++if get_option('systemd') or get_option('elogind') ++ con2 = configuration_data() ++ con2.set('libexecdir', libexecdir) ++ ++ # replace @libexecdir@ ++ configure_file( ++ input : 'org.freedesktop.fwupd.service.in', ++ output : 'org.freedesktop.fwupd.service', ++ configuration : con2, ++ install: true, ++ install_dir: join_paths(datadir, ++ 'dbus-1', ++ 'system-services'), ++ ) ++endif +diff --git a/meson.build b/meson.build +index f4f0af192..d645db2ae 100644 +--- a/meson.build ++++ b/meson.build +@@ -270,6 +270,12 @@ endif + if get_option('systemd') + systemd = dependency('systemd', version : '>= 211') + conf.set('HAVE_SYSTEMD' , '1') ++ conf.set('HAVE_LOGIND' , '1') ++endif ++ ++if get_option('elogind') ++ elogind = dependency('libelogind', version : '>= 211') ++ conf.set('HAVE_LOGIND' , '1') + endif + + if get_option('consolekit') +diff --git a/meson_options.txt b/meson_options.txt +index c9b7ba675..6b0902225 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -18,6 +18,7 @@ option('plugin_uefi', type : 'boolean', value : true, description : 'enable UEFI + option('plugin_nvme', type : 'boolean', value : true, description : 'enable NVMe support') + option('systemd', type : 'boolean', value : true, description : 'enable systemd support') + option('systemdunitdir', type: 'string', value: '', description: 'Directory for systemd units') ++option('elogind', type : 'boolean', value : false, description : 'enable elogind support') + option('tests', type : 'boolean', value : true, description : 'enable tests') + option('udevdir', type: 'string', value: '', description: 'Directory for udev rules') + option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules') +diff --git a/src/fu-util-common.c b/src/fu-util-common.c +index cdeb2ff6b..667c142fb 100644 +--- a/src/fu-util-common.c ++++ b/src/fu-util-common.c +@@ -184,7 +184,7 @@ fu_util_update_shutdown (GError **error) + if (connection == NULL) + return FALSE; + +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_LOGIND + /* shutdown using logind */ + val = g_dbus_connection_call_sync (connection, + "org.freedesktop.login1", +@@ -229,7 +229,7 @@ fu_util_update_reboot (GError **error) + if (connection == NULL) + return FALSE; + +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_LOGIND + /* reboot using logind */ + val = g_dbus_connection_call_sync (connection, + "org.freedesktop.login1", diff --git a/sys-apps/fwupd/fwupd-1.2.4-r2.ebuild b/sys-apps/fwupd/fwupd-1.2.4-r2.ebuild new file mode 100644 index 00000000000..43db76e1c25 --- /dev/null +++ b/sys-apps/fwupd/fwupd-1.2.4-r2.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{4,5,6,7} ) + +inherit meson python-single-r1 vala xdg-utils + +DESCRIPTION="Aims to make updating firmware on Linux automatic, safe and reliable" +HOMEPAGE="https://fwupd.org" +SRC_URI="https://github.com/hughsie/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="colorhug dell doc elogind +gpg +man nvme pkcs7 redfish systemd test thunderbolt uefi" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + ?? ( elogind systemd ) + dell? ( uefi ) +" + +RDEPEND="${PYTHON_DEPS} + app-arch/gcab + app-arch/libarchive:= + dev-db/sqlite + >=dev-libs/glib-2.45.8:2 + dev-libs/json-glib + dev-libs/libgpg-error + dev-libs/libgudev:= + >=dev-libs/libgusb-0.2.9[introspection] + >=dev-libs/libxmlb-0.1.5 + dev-python/pillow[${PYTHON_USEDEP}] + dev-python/pycairo[${PYTHON_USEDEP}] + dev-python/pygobject:3[cairo,${PYTHON_USEDEP}] + >=net-libs/libsoup-2.51.92:2.4[introspection] + >=sys-auth/polkit-0.103 + virtual/libelf:0= + colorhug? ( >=x11-misc/colord-1.2.12:0= ) + dell? ( + sys-libs/efivar + >=sys-libs/libsmbios-2.4.0 + ) + gpg? ( + app-crypt/gpgme + dev-libs/libgpg-error + ) + nvme? ( sys-libs/efivar ) + pkcs7? ( >=net-libs/gnutls-3.4.4.1:= ) + redfish? ( sys-libs/efivar ) + !systemd? ( + !elogind? ( >=sys-auth/consolekit-1.0.0 ) + elogind? ( sys-auth/elogind ) + ) + systemd? ( >=sys-apps/systemd-211 ) + thunderbolt? ( sys-apps/thunderbolt-software-user-space ) + uefi? ( + media-libs/fontconfig + media-libs/freetype + sys-boot/gnu-efi + >=sys-libs/efivar-33 + x11-libs/cairo + ) +" +DEPEND="${RDEPEND} + $(vala_depend) + x11-libs/pango[introspection] + nvme? ( >=sys-kernel/linux-headers-4.4 ) + test? ( net-libs/gnutls[tools] ) +" +BDEPEND=" + >=dev-util/meson-0.47.0 + virtual/pkgconfig + doc? ( dev-util/gtk-doc ) + man? ( app-text/docbook-sgml-utils ) +" + +# required for fwupd daemon to run. +# NOT a build time dependency. The build system does not check for dbus. +PDEPEND="sys-apps/dbus" + +PATCHES=( "${FILESDIR}/${P}-elogind.patch" ) # bug 668522 + +src_prepare() { + default + sed -e "s/'--create'/'--absolute-name', '--create'/" \ + -i data/tests/builder/meson.build || die + sed -e "/'-Werror',/d" \ + -i plugins/uefi/efi/meson.build || die + vala_src_prepare +} + +src_configure() { + xdg_environment_reset + local emesonargs=( + --localstatedir "${EPREFIX}"/var + -Dgtkdoc="$(usex doc true false)" + -Delogind="$(usex elogind true false)" + -Dgpg="$(usex gpg true false)" + -Dman="$(usex man true false)" + -Dpkcs7="$(usex pkcs7 true false)" + -Dplugin_dell="$(usex dell true false)" + -Dplugin_nvme="$(usex nvme true false)" + -Dplugin_redfish="$(usex redfish true false)" + -Dplugin_synaptics="$(usex dell true false)" + -Dplugin_thunderbolt="$(usex thunderbolt true false)" + -Dplugin_uefi="$(usex uefi true false)" + -Dsystemd="$(usex systemd true false)" + -Dtests="$(usex test true false)" + ) + use elogind || use systemd || emesonargs+=( -Dconsolekit=true ) + meson_src_configure +} + +src_install() { + meson_src_install + doinitd "${FILESDIR}"/${PN} + + if ! use systemd && ! use elogind ; then + # Don't timeout when fwupd is running (#673140) + sed '/^IdleTimeout=/s@=[[:digit:]]\+@=0@' \ + -i "${ED}"/etc/${PN}/daemon.conf || die + fi +} + +pkg_postinst() { + elog "In case you are using openrc as init system" + elog "and you're upgrading from Enable ColorHug support through x11-misc/colord package. Enable Dell-specific support. + Use sys-auth/elogind instead of sys-auth/consolekit for session tracking Enable GPG support. Build and install man pages Build and install nvme plugin - Enable PKCS7 verification support via net-libs/gnutls. + Enable PKCS7 verification support via net-libs/gnutls Install redfish plugin Install thunderbolt plugin Enable UEFI support