diff options
author | Repository mirror & CI <repomirrorci@gentoo.org> | 2019-02-25 12:25:44 +0000 |
---|---|---|
committer | Repository mirror & CI <repomirrorci@gentoo.org> | 2019-02-25 12:25:44 +0000 |
commit | 9057624f1d93a99e9b88b8a9791ba1f706baf46c (patch) | |
tree | aff32c88e9ba42925670e614fcd62ba1dc4a3960 | |
parent | 2019-02-25 11:44:24 UTC (diff) | |
parent | user.eclass: avoid calling nscd if it doesn't exist (diff) | |
download | gentoo-9057624f1d93a99e9b88b8a9791ba1f706baf46c.tar.gz gentoo-9057624f1d93a99e9b88b8a9791ba1f706baf46c.tar.bz2 gentoo-9057624f1d93a99e9b88b8a9791ba1f706baf46c.zip |
Merge updates from master
-rw-r--r-- | eclass/user.eclass | 4 | ||||
-rw-r--r-- | sys-apps/fwupd/files/fwupd-1.2.4-elogind.patch | 105 | ||||
-rw-r--r-- | sys-apps/fwupd/fwupd-1.2.4-r2.ebuild (renamed from sys-apps/fwupd/fwupd-1.2.4-r1.ebuild) | 35 | ||||
-rw-r--r-- | sys-apps/fwupd/metadata.xml | 3 | ||||
-rw-r--r-- | sys-apps/sysvinit/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/sysvinit/sysvinit-2.94.ebuild (renamed from sys-apps/sysvinit/sysvinit-2.94_beta.ebuild) | 0 |
6 files changed, 128 insertions, 21 deletions
diff --git a/eclass/user.eclass b/eclass/user.eclass index 97e417a7be9d..f6a10a6bee28 100644 --- a/eclass/user.eclass +++ b/eclass/user.eclass @@ -88,8 +88,8 @@ egetent() { grep "${key}:\*:" /etc/${db} ;; *) - # ignore output if nscd doesn't exist, or we're not running as root - nscd -i "${db}" 2>/dev/null + # ignore nscd output if we're not running as root + type -p nscd >/dev/null && nscd -i "${db}" 2>/dev/null getent "${db}" "${key}" ;; esac 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 000000000000..1a8b7760001d --- /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 <marcin.sucharski@protonmail.com> +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-r1.ebuild b/sys-apps/fwupd/fwupd-1.2.4-r2.ebuild index 58920bdfbf6d..43db76e1c25a 100644 --- a/sys-apps/fwupd/fwupd-1.2.4-r1.ebuild +++ b/sys-apps/fwupd/fwupd-1.2.4-r2.ebuild @@ -12,17 +12,16 @@ 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 +gpg +man nvme pkcs7 redfish systemd test thunderbolt uefi" -REQUIRED_USE=" - ${PYTHON_REQUIRED_USE} +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} +RDEPEND="${PYTHON_DEPS} app-arch/gcab app-arch/libarchive:= dev-db/sqlite @@ -49,11 +48,12 @@ RDEPEND=" ) nvme? ( sys-libs/efivar ) pkcs7? ( >=net-libs/gnutls-3.4.4.1:= ) - redfish? ( - sys-libs/efivar + redfish? ( sys-libs/efivar ) + !systemd? ( + !elogind? ( >=sys-auth/consolekit-1.0.0 ) + elogind? ( sys-auth/elogind ) ) systemd? ( >=sys-apps/systemd-211 ) - !systemd? ( >=sys-auth/consolekit-1.0.0 ) thunderbolt? ( sys-apps/thunderbolt-software-user-space ) uefi? ( media-libs/fontconfig @@ -63,25 +63,25 @@ RDEPEND=" x11-libs/cairo ) " -DEPEND=" - ${RDEPEND} +DEPEND="${RDEPEND} $(vala_depend) x11-libs/pango[introspection] - doc? ( dev-util/gtk-doc ) - man? ( app-text/docbook-sgml-utils ) 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'/" \ @@ -95,9 +95,9 @@ src_configure() { xdg_environment_reset local emesonargs=( --localstatedir "${EPREFIX}"/var - -Dconsolekit="$(usex systemd false true)" - -Dgpg="$(usex gpg true false)" -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)" @@ -109,6 +109,7 @@ src_configure() { -Dsystemd="$(usex systemd true false)" -Dtests="$(usex test true false)" ) + use elogind || use systemd || emesonargs+=( -Dconsolekit=true ) meson_src_configure } @@ -116,7 +117,7 @@ src_install() { meson_src_install doinitd "${FILESDIR}"/${PN} - if ! use systemd ; then + 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 diff --git a/sys-apps/fwupd/metadata.xml b/sys-apps/fwupd/metadata.xml index 702c657eeb25..d6ab1d6e8c68 100644 --- a/sys-apps/fwupd/metadata.xml +++ b/sys-apps/fwupd/metadata.xml @@ -9,10 +9,11 @@ <flag name="colorhug">Enable ColorHug support through <pkg>x11-misc/colord</pkg> package.</flag> <flag name="dell">Enable Dell-specific support.</flag> + <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> instead of <pkg>sys-auth/consolekit</pkg> for session tracking</flag> <flag name="gpg">Enable GPG support.</flag> <flag name="man">Build and install man pages</flag> <flag name="nvme">Build and install nvme plugin</flag> - <flag name="pkcs7">Enable PKCS7 verification support via <pkg>net-libs/gnutls</pkg>.</flag> + <flag name="pkcs7">Enable PKCS7 verification support via <pkg>net-libs/gnutls</pkg></flag> <flag name="redfish">Install redfish plugin</flag> <flag name="thunderbolt">Install thunderbolt plugin</flag> <flag name="uefi">Enable UEFI support</flag> diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest index 93b32e5f0028..a7aa2c886a04 100644 --- a/sys-apps/sysvinit/Manifest +++ b/sys-apps/sysvinit/Manifest @@ -1,3 +1,3 @@ DIST sysvinit-2.91.tar.xz 114412 BLAKE2B 5e044f589f5001c2b5a30eda76bf5c24bb2a7e0d308b7027d54031848407e6b7667b59096044eb186a7f6a862521d4a670c05a17dcc929d07da6515058949606 SHA512 8dcf6de79b03567c300ef5f2b7dd211895745e231510d730092085a15f61f06f28cee7c504b0b022bdcb4b4e903f44946537d4fbb2b5069fb5d29bb099fd45f5 DIST sysvinit-2.93.tar.xz 117580 BLAKE2B 2e771b00dbdc73e76df9e78659aaa5e5fcbfda36290a1b5aa20a5a6fe3540c4616f2a235a668de30d33c620e2d2516da303537eda47b83b29b0844ad7aa77df4 SHA512 c80d07a674253d15ec6382cfaf792f47486e2e84ab9c913d3c9e03b590cf211177a3a14e168f4d1c9c2e97737221f7ac70a75633d90502837a6d29bdc4c48d72 -DIST sysvinit-2.94-beta.tar.xz 120584 BLAKE2B 7fe9bdfcdbccd13cb34a0a48da45314f1d960c49380255f99df151717c9228b6f0cdd8362795d5e6145eb483845cfbb5966937853ff826f60f0db57cd121d06c SHA512 f403e352572247d3a9c30f591d0119950b0332c51dd3c5d33f5140f7effb1832b314322dc79bb4f2958ac370c461808651e1f712d67a877ef7f9e21d463abcb1 +DIST sysvinit-2.94.tar.xz 120900 BLAKE2B e45a95246325e93ef49f11573924216937e238761cb9f5979ae2b272838fb3280b1d12c9553992271f7926dc7c7bc18e352a8019a70f54c592971fe043453804 SHA512 8d3b7b777f7c37cf5eaf73d4cdfad8ac54c6115577052bd7ddf3588da8fb7d16b812ffaade0ce300c2c6b7d2acd6e7778130544befc171eab174ee8766b3ec50 diff --git a/sys-apps/sysvinit/sysvinit-2.94_beta.ebuild b/sys-apps/sysvinit/sysvinit-2.94.ebuild index bb9842d5c6a9..bb9842d5c6a9 100644 --- a/sys-apps/sysvinit/sysvinit-2.94_beta.ebuild +++ b/sys-apps/sysvinit/sysvinit-2.94.ebuild |