public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/musl:master commit in: sys-apps/accountsservice/files/, sys-apps/accountsservice/
@ 2019-08-19  0:06 Anthony G. Basile
  0 siblings, 0 replies; 5+ messages in thread
From: Anthony G. Basile @ 2019-08-19  0:06 UTC (permalink / raw
  To: gentoo-commits

commit:     7af0482c8e1c79485fac662c12c344d65b31bbfc
Author:     Spotlight <spotlight <AT> joscomputing <DOT> space>
AuthorDate: Tue Jul 23 22:00:17 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Aug 19 00:04:16 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=7af0482c

sys-apps/accountservice: update to 0.6.50-r1

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 sys-apps/accountsservice/Manifest                  |   2 +-
 ....45.ebuild => accountsservice-0.6.50-r1.ebuild} |  23 ++---
 .../files/accountsservice-0.6.43-elogind.patch     | 110 ---------------------
 .../accountsservice-0.6.50-loaded-state.patch      |  36 +++++++
 4 files changed, 49 insertions(+), 122 deletions(-)

diff --git a/sys-apps/accountsservice/Manifest b/sys-apps/accountsservice/Manifest
index 2e0a9fd..a3e3d72 100644
--- a/sys-apps/accountsservice/Manifest
+++ b/sys-apps/accountsservice/Manifest
@@ -1 +1 @@
-DIST accountsservice-0.6.45.tar.xz 382740 BLAKE2B ce88e53c7d0187f53ed0a2758f81c8e2d1083ab1c95ec6cddebb2167b36706b1537ecf74b7904a9002c6179cfdf811a3268451af9443727ba9793a9af06cf8aa SHA512 09975f9fa03a3177d923de6d6f6e6acfffeb2ff4924c45eaac78c994c16974427c8e936a87034747ba494d2bb3df6e8a92ff44db387761b06e06e311d7cf105a
+DIST accountsservice-0.6.50.tar.xz 384484 BLAKE2B 52c06ba85498f292204834f967211d8f0940786dc2ea3070124d3aecccd551375bfbc8fc31f23a2c3c86e23359294307656c3b927c4e819fc102d8626ae0dd82 SHA512 6e07cd318452b1cbedeacd729f0ebb200525caf1b09981abb2bac16fd90756a790ebec08aca0a0cea016f14ab27c159a68fe1332ef4bc636c5863b8c61040f64

diff --git a/sys-apps/accountsservice/accountsservice-0.6.45.ebuild b/sys-apps/accountsservice/accountsservice-0.6.50-r1.ebuild
similarity index 73%
rename from sys-apps/accountsservice/accountsservice-0.6.45.ebuild
rename to sys-apps/accountsservice/accountsservice-0.6.50-r1.ebuild
index 8bc3ae9..a925c0e 100644
--- a/sys-apps/accountsservice/accountsservice-0.6.45.ebuild
+++ b/sys-apps/accountsservice/accountsservice-0.6.50-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-
 GNOME2_EAUTORECONF="yes"
+
 inherit gnome2 systemd
 
 DESCRIPTION="D-Bus interfaces for querying and manipulating user account information"
@@ -12,19 +12,18 @@ SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
 
 LICENSE="GPL-3+"
 SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ia64 ~ppc ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~sparc x86"
 
-IUSE="doc elogind +introspection selinux systemd"
-
-REQUIRED_USE="?? ( elogind systemd )"
+IUSE="doc consolekit elogind +introspection selinux systemd"
+REQUIRED_USE="^^ ( consolekit elogind systemd )"
 
 CDEPEND="
-	>=dev-libs/glib-2.37.3:2
+	>=dev-libs/glib-2.44:2
 	sys-auth/polkit
+	consolekit? ( sys-auth/consolekit )
 	elogind? ( >=sys-auth/elogind-229.4 )
 	introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
 	systemd? ( >=sys-apps/systemd-186:0= )
-	!systemd? ( !elogind? ( sys-auth/consolekit ) )
 "
 DEPEND="${CDEPEND}
 	dev-libs/libxslt
@@ -42,9 +41,11 @@ RDEPEND="${CDEPEND}
 "
 
 PATCHES=(
-	"${FILESDIR}/${PN}-0.6.35-gentoo-system-users.patch"
-	"${FILESDIR}/${PN}-0.6.43-elogind.patch"
-	"${FILESDIR}/musl-fgetspent_r.patch"
+	"${FILESDIR}"/${PN}-0.6.35-gentoo-system-users.patch
+
+	# lib: don't set loaded state until seat is fetched (from 'master')
+	"${FILESDIR}"/${P}-loaded-state.patch
+	"${FILESDIR}"/musl-fgetspent_r.patch
 )
 
 src_prepare() {

diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch b/sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch
deleted file mode 100644
index cd3510e..0000000
--- a/sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 9fdd1d95ec094a0df6d8d3dd9c8f04fa8499b845 Mon Sep 17 00:00:00 2001
-From: Sven Eden <sven.eden@gmx.de>
-Date: Tue, 6 Jun 2017 10:17:33 -0400
-Subject: configure: elogind on non-systemd systems
-
-This commit adds some configure goo to make accountsservice use
-elogind if explicitly requested for systems that don't have
-systemd.
-
-diff --git a/configure.ac b/configure.ac
-index b255e72..4b21477 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -264,22 +264,24 @@ dnl Check for xsltproc
- dnl ---------------------------------------------------------------------------
- AC_PATH_PROG([XSLTPROC], [xsltproc])
- 
--# systemd
-+# systemd or elogind
-+
-+have_systemd=no
-+
-+AC_MSG_CHECKING([whether to use systemd])
- 
- AC_ARG_ENABLE([systemd],
-               AS_HELP_STRING([--enable-systemd], [Use systemd]),
-               [enable_systemd=$enableval],
-               [enable_systemd=auto])
- 
-+AC_MSG_RESULT($enable_systemd)
-+
- if test x$enable_systemd != xno; then
--   PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186],
--			                     [have_systemd=yes], [have_systemd=no])
--else
--   have_systemd=no
-+        PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186],
-+                                   [have_systemd=yes])
- fi
- 
--AC_MSG_CHECKING([whether to use systemd])
--
- if test x$enable_systemd = xauto ; then
-         if test x$have_systemd = xno ; then
-                 enable_systemd=no
-@@ -288,21 +290,54 @@ if test x$enable_systemd = xauto ; then
-         fi
- fi
- 
--AC_MSG_RESULT($enable_systemd)
-+have_elogind=no
-+
-+AC_MSG_CHECKING([whether to use elogind])
-+
-+AC_ARG_ENABLE([elogind],
-+              AS_HELP_STRING([--enable-elogind], [Use elogind]),
-+              [enable_elogind=$enableval],
-+              [enable_elogind=no])
-+
-+AC_MSG_RESULT($enable_elogind)
- 
- if test x$enable_systemd = xyes; then
-         if test x$have_systemd = xno; then
--                AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
-+                AC_MSG_ERROR([Systemd support explicitly requested, but libsystemd not found])
-+        fi
-+
-+        dnl Requesting to use the elogind session tracker makes no sense where
-+        dnl systemd-login is (or might be) running.
-+        if test x$enable_elogind = xyes; then
-+                AC_MSG_WARN([elogind support requested, but systemd was found.])
-+                AC_MSG_ERROR([Disable either elogind or systemd support.])
-         fi
-+
-+        AC_SUBST(SYSTEMD_CFLAGS)
-+        AC_SUBST(SYSTEMD_LIBS)
-+
-+        LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $SYSTEMD_LIBS"
-+        LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $SYSTEMD_CFLAGS"
-+
-         AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is used])
- fi
--AC_SUBST(SYSTEMD_CFLAGS)
--AC_SUBST(SYSTEMD_LIBS)
- 
--LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $SYSTEMD_LIBS"
--LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $SYSTEMD_CFLAGS"
-+if test "x$enable_elogind" != "xno"; then
-+        PKG_CHECK_MODULES(ELOGIND, [libelogind >= 229.4],
-+                                   [have_elogind=yes])
-+
-+        if test "x$have_elogind" != "xyes"; then
-+                AC_MSG_ERROR([elogind support requested, but libelogind not found])
-+        else
-+                AC_SUBST(ELOGIND_CFLAGS)
-+                AC_SUBST(ELOGIND_LIBS)
-+
-+                LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $ELOGIND_LIBS"
-+                LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $ELOGIND_CFLAGS"
-+        fi
-+fi
- 
--if test "x$have_systemd" != "xno" ; then
-+if test "x${have_systemd}" != "xno" -o "x${have_elogind}" != "xno" ; then
-         AC_DEFINE(WITH_SYSTEMD, 1, [Define to enable systemd support])
- fi
- 
--- 
-cgit v0.10.2
-

diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.50-loaded-state.patch b/sys-apps/accountsservice/files/accountsservice-0.6.50-loaded-state.patch
new file mode 100644
index 0000000..901704b
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-0.6.50-loaded-state.patch
@@ -0,0 +1,36 @@
+From c7fa612023a163e8b2352e1170c6df3fceb19b27 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode@redhat.com>
+Date: Thu, 19 Jul 2018 13:14:09 -0400
+Subject: lib: don't set loaded state until seat is fetched
+
+At the moment we set is-loaded on the user-manager
+object as soon as we start fetching the seat, but
+we should waiting until the seat is fetched, so
+that can_switch() will return the correct value
+if the caller waited until the loaded signal
+to use it.
+
+This commit changes the >= to > which I believe
+was the original intention anyway.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=107298
+---
+ src/libaccountsservice/act-user-manager.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c
+index 325421b..e7e26b1 100644
+--- a/src/libaccountsservice/act-user-manager.c
++++ b/src/libaccountsservice/act-user-manager.c
+@@ -2382,7 +2382,7 @@ maybe_set_is_loaded (ActUserManager *manager)
+         /* Don't set is_loaded yet unless the seat is already loaded enough
+          * or failed to load.
+          */
+-        if (manager->priv->seat.state >= ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
++        if (manager->priv->seat.state > ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
+                 g_debug ("ActUserManager: Seat loaded, so now setting loaded property");
+         } else if (manager->priv->seat.state == ACT_USER_MANAGER_SEAT_STATE_UNLOADED) {
+                 g_debug ("ActUserManager: Seat wouldn't load, so giving up on it and setting loaded property");
+-- 
+cgit v1.1
+


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-apps/accountsservice/files/, sys-apps/accountsservice/
@ 2023-07-27  6:31 Fabian Groffen
  0 siblings, 0 replies; 5+ messages in thread
From: Fabian Groffen @ 2023-07-27  6:31 UTC (permalink / raw
  To: gentoo-commits

commit:     1509130765cbb849b2186954e0b24944eca843ee
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 27 06:31:44 2023 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jul 27 06:31:44 2023 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=15091307

sys-apps/accountsservice: sync with gx86

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-apps/accountsservice/Manifest                  |  1 +
 .../accountsservice/accountsservice-23.13.9.ebuild | 96 ++++++++++++++++++++++
 .../accountsservice-23.13.9-check-for-wtmp.patch   | 41 +++++++++
 .../accountsservice-23.13.9-fgetspent_r-musl.patch | 53 ++++++++++++
 .../accountsservice-23.13.9-generate-version.patch | 30 +++++++
 5 files changed, 221 insertions(+)

diff --git a/sys-apps/accountsservice/Manifest b/sys-apps/accountsservice/Manifest
index 0e7fae0f..e71030a3 100644
--- a/sys-apps/accountsservice/Manifest
+++ b/sys-apps/accountsservice/Manifest
@@ -1 +1,2 @@
 DIST accountsservice-22.08.8.tar.xz 102672 BLAKE2B 7c9436d3845fc1883772b434c4f9e2fba934d17e6d4452a6be65e1d790a23b331eaaa64b0e6eff6fefe79587a40cf1749a0f3de09f323b10740046bd9d145c9d SHA512 2ca3ceb1b44338d9924b86788256d4eef7ec10e0c2197bfb8cc6c31ae224fab3051f03cb406a526f90057684965bef4ba0f2cc01b26198ec1fc6baec36ad3ff8
+DIST accountsservice-23.13.9.tar.xz 636064 BLAKE2B 74dbbe816937e626ba0f6524b4293466ac2905f474396f5d23633e966d46e013de110671abcbfe2911fffa1e98872e2525b61594a967f917975ebf18d39b8547 SHA512 c6eb543ce2e07b61bbdfa454e388949bc688517be0536b14f30c66383ed105b15d3fab8b6c62b1eaa08f67d9bdc29b928729d9f7c704f47de4decf0de8e12f89

diff --git a/sys-apps/accountsservice/accountsservice-23.13.9.ebuild b/sys-apps/accountsservice/accountsservice-23.13.9.ebuild
new file mode 100644
index 00000000..eaa12c4c
--- /dev/null
+++ b/sys-apps/accountsservice/accountsservice-23.13.9.ebuild
@@ -0,0 +1,96 @@
+# Copyright 2011-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{9..11} )
+inherit meson python-any-r1 systemd
+
+DESCRIPTION="D-Bus interfaces for querying and manipulating user account information"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/AccountsService/"
+SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86"
+
+IUSE="doc elogind gtk-doc +introspection selinux systemd test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="^^ ( elogind systemd )"
+
+CDEPEND="
+	>=dev-libs/glib-2.63.5:2
+	sys-auth/polkit
+	virtual/libcrypt:=
+	elogind? ( >=sys-auth/elogind-229.4 )
+	introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
+	systemd? ( >=sys-apps/systemd-186:0= )
+"
+DEPEND="${CDEPEND}"
+BDEPEND="
+	dev-libs/libxslt
+	dev-util/gdbus-codegen
+	dev-util/glib-utils
+	sys-devel/gettext
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-xml-dtd:4.1.2
+		app-text/xmlto
+	)
+	gtk-doc? (
+		dev-util/gtk-doc
+		app-text/docbook-xml-dtd:4.3
+	)
+	test? (
+		$(python_gen_any_dep '
+			dev-python/python-dbusmock[${PYTHON_USEDEP}]
+		')
+	)
+"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-accountsd )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-22.04.62-gentoo-system-users.patch
+	"${FILESDIR}"/${PN}-23.13.9-generate-version.patch #905770
+	"${FILESDIR}"/${PN}-23.13.9-check-for-wtmp.patch
+	"${FILESDIR}"/${PN}-23.13.9-fgetspent_r-musl.patch
+)
+
+python_check_deps() {
+	if use test; then
+		python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
+	fi
+}
+
+src_configure() {
+	# No option to disable tests
+	if ! use test; then
+		sed -e "/subdir('tests')/d" -i meson.build || die
+	fi
+
+	local emesonargs=(
+		--localstatedir="${EPREFIX}/var"
+		-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
+		-Dadmin_group="wheel"
+		-Dcheck_wtmp="$(usex !elibc_musl true false)"
+		$(meson_use elogind)
+		$(meson_use introspection)
+		$(meson_use doc docbook)
+		$(meson_use gtk-doc gtk_doc)
+		-Dvapi=false
+	)
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+
+	# https://gitlab.freedesktop.org/accountsservice/accountsservice/-/issues/90
+	if use doc; then
+		mv "${ED}/usr/share/doc/${PN}" "${ED}/usr/share/doc/${PF}" || die
+	fi
+
+	# This directories are created at runtime when needed
+	rm -r "${ED}"/var/lib || die
+}

diff --git a/sys-apps/accountsservice/files/accountsservice-23.13.9-check-for-wtmp.patch b/sys-apps/accountsservice/files/accountsservice-23.13.9-check-for-wtmp.patch
new file mode 100644
index 00000000..34a60b0b
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-23.13.9-check-for-wtmp.patch
@@ -0,0 +1,41 @@
+Adds a meson build option to check if wtmp path is valid.
+wtmp is not used on musl and is implemented with stubs because it is harmful software, and because of that, checking whether the path is valid or not does not matter.
+
+See: https://wiki.musl-libc.org/faq.html#Q:_Why_is_the_utmp/wtmp_functionality_only_implemented_as_stubs?
+https://bugs.gentoo.org/762442
+
+---
+ meson.build       | 4 +++-
+ meson_options.txt | 1 +
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 075776f..0801659 100644
+--- a/meson.build
++++ b/meson.build
+@@ -102,7 +102,9 @@ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
+   config_h.set('PATH_WTMP', '_PATH_WTMPX')
+ else
+   path_wtmp = '/var/log/utx.log'
+-  assert(run_command('test', '-e', path_wtmp, check: false).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
++  if get_option('check_wtmp')
++    assert(run_command('test', '-e', path_wtmp, check: false).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
++  endif
+   config_h.set_quoted('PATH_WTMP', path_wtmp)
+ endif
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index 93f384a..4fec12e 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -6,6 +6,7 @@ option('extra_admin_groups', type: 'array', value: [], description: 'Comma-separ
+ option('minimum_uid', type: 'integer', value: 1000, description: 'Set minimum uid for human users')
+ 
+ option('elogind', type: 'boolean', value: false, description: 'Use elogind')
++option('check_wtmp', type: 'boolean', value: true, description: 'Check if wtmp path is valid (musl workaround)')
+ 
+ option('introspection', type: 'boolean', value: true, description: 'Enable introspection for this build')
+ option('vapi', type: 'boolean', value: true, description : 'Enable Vala bindings for this build')
+-- 
+2.35.1
+

diff --git a/sys-apps/accountsservice/files/accountsservice-23.13.9-fgetspent_r-musl.patch b/sys-apps/accountsservice/files/accountsservice-23.13.9-fgetspent_r-musl.patch
new file mode 100644
index 00000000..8cdeb695
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-23.13.9-fgetspent_r-musl.patch
@@ -0,0 +1,53 @@
+Define fgetspent_r if not already defined. (GNU extension, therefore not in musl).
+
+https://git.alpinelinux.org/aports/tree/community/accountsservice/musl-fgetspent_r.patch (copied the function from here).
+diff -u b/src/daemon.c b/src/daemon.c
+--- b/src/daemon.c
++++ b/src/daemon.c
+@@ -32,7 +32,7 @@
+ #include <pwd.h>
+ #ifdef HAVE_SHADOW_H
+ #include <shadow.h>
+-#endif
++#endif // HAVE_SHADOW_H
+ #include <unistd.h>
+ #include <errno.h>
+ #include <sys/types.h>
+@@ -51,6 +51,25 @@
+ #include "user.h"
+ #include "accounts-user-generated.h"
+ 
++#ifndef HAVE_FGETSPENT_R
++static int fgetspent_r(FILE *fp, struct spwd *spbuf, char *buf, size_t buflen, struct spwd **spbufp) {
++       struct spwd *shadow_entry = fgetspent(fp);
++       if(!shadow_entry)
++               return -1;
++       size_t namplen = strlen(shadow_entry->sp_namp);
++       size_t pwdplen = strlen(shadow_entry->sp_pwdp);
++
++       if(namplen + pwdplen + 2 > buflen)
++               return -1;
++
++       *spbufp = memcpy(spbuf, shadow_entry, sizeof(struct spwd));
++       spbuf->sp_namp = strncpy(buf, shadow_entry->sp_namp, namplen + 1);
++       spbuf->sp_pwdp = strncpy(buf + namplen + 1, shadow_entry->sp_pwdp, pwdplen + 1);
++
++       return 0;
++}
++#endif // HAVE_FGETSPENT_R
++
+ #define PATH_PASSWD "passwd"
+ #define PATH_SHADOW "shadow"
+ #define PATH_GROUP "/etc/group"
+only in patch2:
+unchanged:
+--- a/meson.build
++++ b/meson.build
+@@ -71,6 +71,7 @@ check_functions = [
+   'getusershell',
+   'setutxdb',
+   'fgetpwent',
++  'fgetspent_r'
+ ]
+ 
+ foreach func: check_functions

diff --git a/sys-apps/accountsservice/files/accountsservice-23.13.9-generate-version.patch b/sys-apps/accountsservice/files/accountsservice-23.13.9-generate-version.patch
new file mode 100644
index 00000000..162b914b
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-23.13.9-generate-version.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/905770
+https://gitlab.freedesktop.org/accountsservice/accountsservice/-/merge_requests/136
+https://gitlab.freedesktop.org/accountsservice/accountsservice/-/commit/c9c16b3c47e13e90bb2213141f6f309e2d474396
+
+From c9c16b3c47e13e90bb2213141f6f309e2d474396 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Fri, 5 May 2023 07:43:48 -0700
+Subject: [PATCH] generate-version.sh: fix script inside of a tarball
+
+---
+ generate-version.sh | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/generate-version.sh b/generate-version.sh
+index 3f88bff..8375c86 100755
+--- a/generate-version.sh
++++ b/generate-version.sh
+@@ -4,11 +4,10 @@ exec 3>&2 2> /dev/null
+ SRCDIR=$(dirname "$0")
+ cd "$SRCDIR"
+ CWD=$(realpath "$PWD")
+-TOPLEVEL_WORKING_DIR=$(realpath "$(git rev-parse --show-toplevel)")
+ exec 2>&3
+ 
+ # If it's not from a git checkout, assume it's from a tarball
+-if [ "$TOPLEVEL_WORKING_DIR" != "$CWD" ]; then
++if ! git rev-parse --is-inside-git-dir > /dev/null 2>&1; then
+     VERSION_FROM_DIR_NAME=$(basename "$CWD" | sed -n 's/^accountsservice-\([^-]*\)$/\1/p')
+ 
+     if [ -n "$VERSION_FROM_DIR_NAME" ]; then


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-apps/accountsservice/files/, sys-apps/accountsservice/
@ 2022-08-14 21:33 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-08-14 21:33 UTC (permalink / raw
  To: gentoo-commits

commit:     630364c519d028de3192f87ccc1fd7f75cac696f
Author:     Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
AuthorDate: Sun Aug 14 20:27:44 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 14 21:33:43 2022 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=630364c5

sys-apps/accountservice: sync with ::gentoo

This is a temporary fix for fgetspent_r. A rewrite should be done and
put into ::gentoo.

Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org>
Closes: https://github.com/gentoo/musl/pull/472
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/accountsservice/Manifest                  |  2 +-
 ....6.55.ebuild => accountsservice-22.08.8.ebuild} | 43 ++++++++++--------
 .../accountsservice-0.6.50-loaded-state.patch      | 36 ---------------
 .../accountsservice-0.6.55-meson-0.61-build.patch  | 23 ----------
 ...untsservice-22.04.62-gentoo-system-users.patch} | 35 ++++++++------
 .../accountsservice-22.08.8-check-for-wtmp.patch   | 41 +++++++++++++++++
 .../accountsservice-22.08.8-fgetspent_r-musl.patch | 53 ++++++++++++++++++++++
 .../accountsservice/files/musl-fgetspent_r.patch   | 35 --------------
 sys-apps/accountsservice/files/musl-wtmp.patch     | 14 ------
 9 files changed, 140 insertions(+), 142 deletions(-)

diff --git a/sys-apps/accountsservice/Manifest b/sys-apps/accountsservice/Manifest
index d02ee748..0e7fae0f 100644
--- a/sys-apps/accountsservice/Manifest
+++ b/sys-apps/accountsservice/Manifest
@@ -1 +1 @@
-DIST accountsservice-0.6.55.tar.xz 97972 BLAKE2B aba3adfeb53e64455ce8e672b9db754bae4af6b4de0823cc021d0311a381ec40af04371e78f7c84eab7fb72356b26e22db78aad0343d57f65ea71a7742b51fc7 SHA512 c12e6a8e80f9b087f97238da4734d2d3a14a7c5cbd870a32a04b00116f176c818c39fb886f6dc72c3e93c136b0c2074ddf8f77e20431fa3bd54f138bea9d262d
+DIST accountsservice-22.08.8.tar.xz 102672 BLAKE2B 7c9436d3845fc1883772b434c4f9e2fba934d17e6d4452a6be65e1d790a23b331eaaa64b0e6eff6fefe79587a40cf1749a0f3de09f323b10740046bd9d145c9d SHA512 2ca3ceb1b44338d9924b86788256d4eef7ec10e0c2197bfb8cc6c31ae224fab3051f03cb406a526f90057684965bef4ba0f2cc01b26198ec1fc6baec36ad3ff8

diff --git a/sys-apps/accountsservice/accountsservice-0.6.55.ebuild b/sys-apps/accountsservice/accountsservice-22.08.8.ebuild
similarity index 64%
rename from sys-apps/accountsservice/accountsservice-0.6.55.ebuild
rename to sys-apps/accountsservice/accountsservice-22.08.8.ebuild
index e1ebb8c4..c9f501af 100644
--- a/sys-apps/accountsservice/accountsservice-0.6.55.ebuild
+++ b/sys-apps/accountsservice/accountsservice-22.08.8.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 2011-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-
-inherit meson systemd
+PYTHON_COMPAT=( python3_{8..10} )
+inherit meson python-any-r1 systemd
 
 DESCRIPTION="D-Bus interfaces for querying and manipulating user account information"
 HOMEPAGE="https://www.freedesktop.org/wiki/Software/AccountsService/"
@@ -11,13 +11,14 @@ SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
 
 LICENSE="GPL-3+"
 SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86"
 
-IUSE="doc elogind gtk-doc +introspection selinux systemd"
+IUSE="doc elogind gtk-doc +introspection selinux systemd test"
+RESTRICT="!test? ( test )"
 REQUIRED_USE="^^ ( elogind systemd )"
 
 CDEPEND="
-	>=dev-libs/glib-2.44:2
+	>=dev-libs/glib-2.63.5:2
 	sys-auth/polkit
 	virtual/libcrypt:=
 	elogind? ( >=sys-auth/elogind-229.4 )
@@ -32,29 +33,32 @@ BDEPEND="
 	virtual/pkgconfig
 	doc? (
 		app-text/docbook-xml-dtd:4.1.2
-		app-text/xmlto )
+		app-text/xmlto
+	)
 	gtk-doc? (
 		dev-util/gtk-doc
-		app-text/docbook-xml-dtd:4.3 )
+		app-text/docbook-xml-dtd:4.3
+	)
+	test? (
+		$(python_gen_any_dep '
+			dev-python/python-dbusmock[${PYTHON_USEDEP}]
+		')
+	)
 "
 RDEPEND="${CDEPEND}
 	selinux? ( sec-policy/selinux-accountsd )
 "
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-0.6.35-gentoo-system-users.patch
-	"${FILESDIR}"/${PN}-0.6.55-meson-0.61-build.patch
+	"${FILESDIR}"/${PN}-22.04.62-gentoo-system-users.patch
+	"${FILESDIR}"/${PN}-22.08.8-check-for-wtmp.patch
+	"${FILESDIR}"/${PN}-22.08.8-fgetspent_r-musl.patch
 )
 
-src_prepare() {
-	default
-
-	if use elibc_musl ; then
-		eapply "${FILESDIR}/musl-fgetspent_r.patch"
-		eapply "${FILESDIR}/musl-wtmp.patch"
+python_check_deps() {
+	if use test; then
+		has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
 	fi
-
-	eapply_user
 }
 
 src_configure() {
@@ -62,11 +66,12 @@ src_configure() {
 		--localstatedir="${EPREFIX}/var"
 		-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
 		-Dadmin_group="wheel"
-		$(meson_use systemd)
+		-Dcheck_wtmp="$(usex !elibc_musl true false)"
 		$(meson_use elogind)
 		$(meson_use introspection)
 		$(meson_use doc docbook)
 		$(meson_use gtk-doc gtk_doc)
+		-Dvapi=false
 	)
 	meson_src_configure
 }

diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.50-loaded-state.patch b/sys-apps/accountsservice/files/accountsservice-0.6.50-loaded-state.patch
deleted file mode 100644
index 901704bc..00000000
--- a/sys-apps/accountsservice/files/accountsservice-0.6.50-loaded-state.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c7fa612023a163e8b2352e1170c6df3fceb19b27 Mon Sep 17 00:00:00 2001
-From: Ray Strode <rstrode@redhat.com>
-Date: Thu, 19 Jul 2018 13:14:09 -0400
-Subject: lib: don't set loaded state until seat is fetched
-
-At the moment we set is-loaded on the user-manager
-object as soon as we start fetching the seat, but
-we should waiting until the seat is fetched, so
-that can_switch() will return the correct value
-if the caller waited until the loaded signal
-to use it.
-
-This commit changes the >= to > which I believe
-was the original intention anyway.
-
-https://bugs.freedesktop.org/show_bug.cgi?id=107298
----
- src/libaccountsservice/act-user-manager.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c
-index 325421b..e7e26b1 100644
---- a/src/libaccountsservice/act-user-manager.c
-+++ b/src/libaccountsservice/act-user-manager.c
-@@ -2382,7 +2382,7 @@ maybe_set_is_loaded (ActUserManager *manager)
-         /* Don't set is_loaded yet unless the seat is already loaded enough
-          * or failed to load.
-          */
--        if (manager->priv->seat.state >= ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
-+        if (manager->priv->seat.state > ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
-                 g_debug ("ActUserManager: Seat loaded, so now setting loaded property");
-         } else if (manager->priv->seat.state == ACT_USER_MANAGER_SEAT_STATE_UNLOADED) {
-                 g_debug ("ActUserManager: Seat wouldn't load, so giving up on it and setting loaded property");
--- 
-cgit v1.1
-

diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.55-meson-0.61-build.patch b/sys-apps/accountsservice/files/accountsservice-0.6.55-meson-0.61-build.patch
deleted file mode 100644
index d56f4b7e..00000000
--- a/sys-apps/accountsservice/files/accountsservice-0.6.55-meson-0.61-build.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-https://gitlab.freedesktop.org/accountsservice/accountsservice/-/commit/ac9b14f1c1bbca413987d0bbfeaad05804107e9a.patch
-https://bugs.gentoo.org/831465
-
-From: Luca Boccassi <bluca@debian.org>
-Date: Sun, 31 Oct 2021 12:29:14 +0000
-Subject: [PATCH] Fix build with meson 0.60
-
-Positional parameters to merge_file() were never allowed and always
-ignored, so just drop it.
-See: https://github.com/mesonbuild/meson/issues/9441
-
-Fixes #97
---- a/data/meson.build
-+++ b/data/meson.build
-@@ -33,7 +33,6 @@ configure_file(
- policy = act_namespace.to_lower() + '.policy'
- 
- i18n.merge_file(
--  policy,
-   input: policy + '.in',
-   output: policy,
-   po_dir: po_dir,
-GitLab

diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch b/sys-apps/accountsservice/files/accountsservice-22.04.62-gentoo-system-users.patch
similarity index 56%
rename from sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch
rename to sys-apps/accountsservice/files/accountsservice-22.04.62-gentoo-system-users.patch
index 39ebf42e..d65fa2f8 100644
--- a/sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch
+++ b/sys-apps/accountsservice/files/accountsservice-22.04.62-gentoo-system-users.patch
@@ -1,9 +1,22 @@
---- a/src/user-classify.c.old	2013-12-04 20:29:48.944454769 +0100
-+++ b/src/user-classify.c	2013-12-04 20:32:59.728283477 +0100
-@@ -55,6 +55,48 @@
+From 0db673b94a6031640ae5faa3b79c4a1fea078350 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Sun, 30 Jan 2022 12:00:09 -0800
+Subject: [PATCH] Add more users
+
+---
+ src/user-classify.c | 35 ++++++++++++++++++++++++++++++++++-
+ 1 file changed, 34 insertions(+), 1 deletion(-)
+
+diff --git a/src/user-classify.c b/src/user-classify.c
+index 9224905..70f1877 100644
+--- a/src/user-classify.c
++++ b/src/user-classify.c
+@@ -52,7 +52,40 @@ static const char *default_excludes[] = {
          "at",
          "gdm",
-         "gnome-initial-setup"
+         "gnome-initial-setup",
+-        "git"
++        "git",
 +        /* Additional Gentoo system users with non-trivial login shell */
 +        "amanda",
 +        "backuppc",
@@ -12,15 +25,6 @@
 +        "flexlm",
 +        "foldingathome",
 +        "geneweb",
-+        "git",
-+        "gnump3d",
-+        "hacluster",
-+        "hg",
-+        "hsqldb",
-+        "infinote",
-+        "foldingathome",
-+        "geneweb",
-+        "git",
 +        "gnump3d",
 +        "hacluster",
 +        "hg",
@@ -48,4 +52,7 @@
 +        "vdradmin",
  };
  
- #define PATH_NOLOGIN "/sbin/nologin"
+ static gboolean
+-- 
+2.34.1
+

diff --git a/sys-apps/accountsservice/files/accountsservice-22.08.8-check-for-wtmp.patch b/sys-apps/accountsservice/files/accountsservice-22.08.8-check-for-wtmp.patch
new file mode 100644
index 00000000..c0363046
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-22.08.8-check-for-wtmp.patch
@@ -0,0 +1,41 @@
+Adds a meson build option to check if wtmp path is valid.
+wtmp is not used on musl and is implemented with stubs because it is harmful software, and because of that, checking whether the path is valid or not does not matter.
+
+See: https://wiki.musl-libc.org/faq.html#Q:_Why_is_the_utmp/wtmp_functionality_only_implemented_as_stubs?
+https://bugs.gentoo.org/762442
+
+---
+ meson.build       | 4 +++-
+ meson_options.txt | 1 +
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 075776f..0801659 100644
+--- a/meson.build
++++ b/meson.build
+@@ -102,7 +102,9 @@ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
+   config_h.set('PATH_WTMP', '_PATH_WTMPX')
+ else
+   path_wtmp = '/var/log/utx.log'
+-  assert(run_command('test', '-e', path_wtmp).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
++  if get_option('check_wtmp')
++    assert(run_command('test', '-e', path_wtmp).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
++  endif
+   config_h.set_quoted('PATH_WTMP', path_wtmp)
+ endif
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index 93f384a..4fec12e 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -6,6 +6,7 @@ option('extra_admin_groups', type: 'array', value: [], description: 'Comma-separ
+ option('minimum_uid', type: 'integer', value: 1000, description: 'Set minimum uid for human users')
+ 
+ option('elogind', type: 'boolean', value: false, description: 'Use elogind')
++option('check_wtmp', type: 'boolean', value: true, description: 'Check if wtmp path is valid (musl workaround)')
+ 
+ option('introspection', type: 'boolean', value: true, description: 'Enable introspection for this build')
+ option('vapi', type: 'boolean', value: true, description : 'Enable Vala bindings for this build')
+-- 
+2.35.1
+

diff --git a/sys-apps/accountsservice/files/accountsservice-22.08.8-fgetspent_r-musl.patch b/sys-apps/accountsservice/files/accountsservice-22.08.8-fgetspent_r-musl.patch
new file mode 100644
index 00000000..180b14a2
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-22.08.8-fgetspent_r-musl.patch
@@ -0,0 +1,53 @@
+Define fgetspent_r if not already defined. (GNU extension, therefore not in musl).
+
+https://git.alpinelinux.org/aports/tree/community/accountsservice/musl-fgetspent_r.patch (copied the function from here).
+diff -u b/src/daemon.c b/src/daemon.c
+--- b/src/daemon.c
++++ b/src/daemon.c
+@@ -32,7 +32,7 @@
+ #include <pwd.h>
+ #ifdef HAVE_SHADOW_H
+ #include <shadow.h>
+-#endif
++#endif // HAVE_SHADOW_H
+ #include <unistd.h>
+ #include <errno.h>
+ #include <sys/types.h>
+@@ -51,6 +51,25 @@
+ #include "user.h"
+ #include "accounts-user-generated.h"
+ 
++#ifndef HAVE_FGETSPENT_R
++static int fgetspent_r(FILE *fp, struct spwd *spbuf, char *buf, size_t buflen, struct spwd **spbufp) {
++       struct spwd *shadow_entry = fgetspent(fp);
++       if(!shadow_entry)
++               return -1;
++       size_t namplen = strlen(shadow_entry->sp_namp);
++       size_t pwdplen = strlen(shadow_entry->sp_pwdp);
++
++       if(namplen + pwdplen + 2 > buflen)
++               return -1;
++
++       *spbufp = memcpy(spbuf, shadow_entry, sizeof(struct spwd));
++       spbuf->sp_namp = strncpy(buf, shadow_entry->sp_namp, namplen + 1);
++       spbuf->sp_pwdp = strncpy(buf + namplen + 1, shadow_entry->sp_pwdp, pwdplen + 1);
++
++       return 0;
++}
++#endif // HAVE_FGETSPENT_R
++
+ #define PATH_PASSWD "/etc/passwd"
+ #define PATH_SHADOW "/etc/shadow"
+ #define PATH_GROUP "/etc/group"
+only in patch2:
+unchanged:
+--- a/meson.build
++++ b/meson.build
+@@ -71,6 +71,7 @@ check_functions = [
+   'getusershell',
+   'setutxdb',
+   'fgetpwent',
++  'fgetspent_r'
+ ]
+ 
+ foreach func: check_functions

diff --git a/sys-apps/accountsservice/files/musl-fgetspent_r.patch b/sys-apps/accountsservice/files/musl-fgetspent_r.patch
deleted file mode 100644
index 3b5cc803..00000000
--- a/sys-apps/accountsservice/files/musl-fgetspent_r.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: https://git.alpinelinux.org/aports/tree/community/accountsservice
-
-diff --git a/src/daemon.c b/src/daemon.c
-index 312394a..e7b3c58 100644
---- a/src/daemon.c
-+++ b/src/daemon.c
-@@ -140,6 +140,28 @@ error_get_type (void)
- #define MAX_LOCAL_USERS 50
- #endif
- 
-+#ifndef __GLIBC__
-+ /* Musl libc does not support fgetspent_r(), write own
-+  * wrapper
-+  */
-+static int fgetspent_r(FILE *fp, struct spwd *spbuf, char *buf, size_t buflen, struct spwd **spbufp) {
-+       struct spwd *shadow_entry = fgetspent(fp);
-+       if(!shadow_entry)
-+               return -1;
-+       size_t namplen = strlen(shadow_entry->sp_namp);
-+       size_t pwdplen = strlen(shadow_entry->sp_pwdp);
-+
-+       if(namplen + pwdplen + 2 > buflen)
-+               return -1;
-+
-+       *spbufp = memcpy(spbuf, shadow_entry, sizeof(struct spwd));
-+       spbuf->sp_namp = strncpy(buf, shadow_entry->sp_namp, namplen + 1);
-+       spbuf->sp_pwdp = strncpy(buf + namplen + 1, shadow_entry->sp_pwdp, pwdplen + 1);
-+
-+       return 0;
-+}
-+#endif
-+
- static struct passwd *
- entry_generator_fgetpwent (Daemon       *daemon,
-                            GHashTable   *users,

diff --git a/sys-apps/accountsservice/files/musl-wtmp.patch b/sys-apps/accountsservice/files/musl-wtmp.patch
deleted file mode 100644
index c4d364bb..00000000
--- a/sys-apps/accountsservice/files/musl-wtmp.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-From: https://git.alpinelinux.org/aports/tree/community/accountsservice
-
---- a/meson.build
-+++ b/meson.build
-@@ -82,8 +82,7 @@ if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURC
- elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
-   config_h.set('PATH_WTMP', '_PATH_WTMPX')
- else
--  assert(run_command('test', '-e', '/var/log/utx.log').returncode() == 0, 'Do not know which filename to watch for wtmp changes')
--  config_h.set_quoted('PATH_WTMP', '/var/log/utx.log')
-+  config_h.set_quoted('PATH_WTMP', '/var/log/wtmp')
- endif
- 
- # compiler flags


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-apps/accountsservice/files/, sys-apps/accountsservice/
@ 2018-08-18  9:51 Anthony G. Basile
  0 siblings, 0 replies; 5+ messages in thread
From: Anthony G. Basile @ 2018-08-18  9:51 UTC (permalink / raw
  To: gentoo-commits

commit:     43a3368c8a6e12755c024484726f1fc9ac57ac58
Author:     stefson <herrtimson <AT> yahoo <DOT> de>
AuthorDate: Thu Aug 16 11:49:16 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Aug 18 09:51:20 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=43a3368c

sys-apps/accountsservice: add missing patch

 sys-apps/accountsservice/Manifest                  |   2 +-
 .../files/accountsservice-0.6.43-elogind.patch     | 110 +++++++++++++++++++++
 2 files changed, 111 insertions(+), 1 deletion(-)

diff --git a/sys-apps/accountsservice/Manifest b/sys-apps/accountsservice/Manifest
index 98ff97f..1ed7b70 100644
--- a/sys-apps/accountsservice/Manifest
+++ b/sys-apps/accountsservice/Manifest
@@ -1 +1 @@
-DIST accountsservice-0.6.43.tar.xz 381008 SHA256 ed3ba94aa38ceb822a0e1a1ac71bf1a8123babf90be049397b3a00900e48d6cc SHA512 0673430b7e5fd726397a9358d60d5c34542afaa786b795d3c8b544dc2bdab151c74f9a3daa4bcd94dc7669400a78cd4cddc453cad78ee8e431bf7c1f417138e2 WHIRLPOOL e704d9dcb5b7c0c6ee7c1ab5ed310ab2428e94d061663367f213c5903f68768680492d651524ef1e7594417335de529463d63b8d8a4d1cc8b6445358f1b97a33
+DIST accountsservice-0.6.43.tar.xz 381008 BLAKE2B 62b29bbb04eef0503c29cb9d81056776f7cb3840145231f049f8b335dfc11bfd60f2ec717e3543b0af73c597da2e4c2d4139c0c535b1716923695355f06e7e4e SHA512 0673430b7e5fd726397a9358d60d5c34542afaa786b795d3c8b544dc2bdab151c74f9a3daa4bcd94dc7669400a78cd4cddc453cad78ee8e431bf7c1f417138e2

diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch b/sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch
new file mode 100644
index 0000000..cd3510e
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-0.6.43-elogind.patch
@@ -0,0 +1,110 @@
+From 9fdd1d95ec094a0df6d8d3dd9c8f04fa8499b845 Mon Sep 17 00:00:00 2001
+From: Sven Eden <sven.eden@gmx.de>
+Date: Tue, 6 Jun 2017 10:17:33 -0400
+Subject: configure: elogind on non-systemd systems
+
+This commit adds some configure goo to make accountsservice use
+elogind if explicitly requested for systems that don't have
+systemd.
+
+diff --git a/configure.ac b/configure.ac
+index b255e72..4b21477 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -264,22 +264,24 @@ dnl Check for xsltproc
+ dnl ---------------------------------------------------------------------------
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ 
+-# systemd
++# systemd or elogind
++
++have_systemd=no
++
++AC_MSG_CHECKING([whether to use systemd])
+ 
+ AC_ARG_ENABLE([systemd],
+               AS_HELP_STRING([--enable-systemd], [Use systemd]),
+               [enable_systemd=$enableval],
+               [enable_systemd=auto])
+ 
++AC_MSG_RESULT($enable_systemd)
++
+ if test x$enable_systemd != xno; then
+-   PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186],
+-			                     [have_systemd=yes], [have_systemd=no])
+-else
+-   have_systemd=no
++        PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186],
++                                   [have_systemd=yes])
+ fi
+ 
+-AC_MSG_CHECKING([whether to use systemd])
+-
+ if test x$enable_systemd = xauto ; then
+         if test x$have_systemd = xno ; then
+                 enable_systemd=no
+@@ -288,21 +290,54 @@ if test x$enable_systemd = xauto ; then
+         fi
+ fi
+ 
+-AC_MSG_RESULT($enable_systemd)
++have_elogind=no
++
++AC_MSG_CHECKING([whether to use elogind])
++
++AC_ARG_ENABLE([elogind],
++              AS_HELP_STRING([--enable-elogind], [Use elogind]),
++              [enable_elogind=$enableval],
++              [enable_elogind=no])
++
++AC_MSG_RESULT($enable_elogind)
+ 
+ if test x$enable_systemd = xyes; then
+         if test x$have_systemd = xno; then
+-                AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
++                AC_MSG_ERROR([Systemd support explicitly requested, but libsystemd not found])
++        fi
++
++        dnl Requesting to use the elogind session tracker makes no sense where
++        dnl systemd-login is (or might be) running.
++        if test x$enable_elogind = xyes; then
++                AC_MSG_WARN([elogind support requested, but systemd was found.])
++                AC_MSG_ERROR([Disable either elogind or systemd support.])
+         fi
++
++        AC_SUBST(SYSTEMD_CFLAGS)
++        AC_SUBST(SYSTEMD_LIBS)
++
++        LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $SYSTEMD_LIBS"
++        LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $SYSTEMD_CFLAGS"
++
+         AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is used])
+ fi
+-AC_SUBST(SYSTEMD_CFLAGS)
+-AC_SUBST(SYSTEMD_LIBS)
+ 
+-LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $SYSTEMD_LIBS"
+-LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $SYSTEMD_CFLAGS"
++if test "x$enable_elogind" != "xno"; then
++        PKG_CHECK_MODULES(ELOGIND, [libelogind >= 229.4],
++                                   [have_elogind=yes])
++
++        if test "x$have_elogind" != "xyes"; then
++                AC_MSG_ERROR([elogind support requested, but libelogind not found])
++        else
++                AC_SUBST(ELOGIND_CFLAGS)
++                AC_SUBST(ELOGIND_LIBS)
++
++                LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $ELOGIND_LIBS"
++                LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $ELOGIND_CFLAGS"
++        fi
++fi
+ 
+-if test "x$have_systemd" != "xno" ; then
++if test "x${have_systemd}" != "xno" -o "x${have_elogind}" != "xno" ; then
+         AC_DEFINE(WITH_SYSTEMD, 1, [Define to enable systemd support])
+ fi
+ 
+-- 
+cgit v0.10.2
+


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-apps/accountsservice/files/, sys-apps/accountsservice/
@ 2017-03-29 16:47 Aric Belsito
  0 siblings, 0 replies; 5+ messages in thread
From: Aric Belsito @ 2017-03-29 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     83a777a5bb4b302be6802cbe8fbd3a1b2dc8baa7
Author:     Rasmus Thomsen <rasmus.thomsen <AT> live <DOT> de>
AuthorDate: Wed Mar 29 14:29:34 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Mar 29 16:40:00 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=83a777a5

sys-apps/accountsservice: add ebuild with musl fixes

 sys-apps/accountsservice/Manifest                  |  5 ++
 .../accountsservice/accountsservice-0.6.43.ebuild  | 60 ++++++++++++++++++++++
 ...ccountsservice-0.6.35-gentoo-system-users.patch | 51 ++++++++++++++++++
 .../accountsservice/files/musl-fgetspent_r.patch   | 34 ++++++++++++
 sys-apps/accountsservice/metadata.xml              | 12 +++++
 5 files changed, 162 insertions(+)

diff --git a/sys-apps/accountsservice/Manifest b/sys-apps/accountsservice/Manifest
new file mode 100644
index 0000000..745459b
--- /dev/null
+++ b/sys-apps/accountsservice/Manifest
@@ -0,0 +1,5 @@
+AUX accountsservice-0.6.35-gentoo-system-users.patch 1122 SHA256 f1a308a364db53ec939505daf1435fb99cf2899789976e21080464720b78297f SHA512 e8ac404aed1da3ab4bb092b476cbb18f2ae7d209bcbe6a30cb9058f50dce0f70d64a3de593108ef5588132389d522d19975384eb1b8414119cb622bc7d738931 WHIRLPOOL 35d8756e1fcff2c08926ecc2864bacccad5542d59a028b0969a4429a4855528d9b607f4cfe5849d04f131db2e142dd1bf9531ca6b79b404e55d97ba0fd6162f8
+AUX musl-fgetspent_r.patch 1475 SHA256 97a06c8777ab85deae2633e2b83b865f1c65ded4e4263ef19e7949d8f482d1a0 SHA512 1c8ca5522c7533d105b91180c41f36a9d4a660fb86e275d6428caee70c9102ca61312c1ecb886f490b84f59aea18f630904cb91e1e9cac45dbc700bcd10c0363 WHIRLPOOL c3a1dfebf26d1770e86a679766a15d255e853fd1bf1b1b8b0d96fe9656413807cb21fddf9d6b79d4cdb0bd5b5f53035b55f5fa83113a1981e9780adfbecb0c83
+DIST accountsservice-0.6.43.tar.xz 381008 SHA256 ed3ba94aa38ceb822a0e1a1ac71bf1a8123babf90be049397b3a00900e48d6cc SHA512 0673430b7e5fd726397a9358d60d5c34542afaa786b795d3c8b544dc2bdab151c74f9a3daa4bcd94dc7669400a78cd4cddc453cad78ee8e431bf7c1f417138e2 WHIRLPOOL e704d9dcb5b7c0c6ee7c1ab5ed310ab2428e94d061663367f213c5903f68768680492d651524ef1e7594417335de529463d63b8d8a4d1cc8b6445358f1b97a33
+EBUILD accountsservice-0.6.43.ebuild 1497 SHA256 81c71c962f51ef316f072983dc7ba1bb847826fea69a1a323f8828c73a54283e SHA512 3cde07f954c2db1a17c5475d4802b3cfd5381fa9d359e26fa389ab868137f5be7dad420e086d275004902b27ca77d973c53d565e2c16a2686efbdb20247d1e84 WHIRLPOOL 4e5ac23047ef83656d83e074952cf021893be66dd29451d5b550e1ff4b642d5b20869c0df29c27bb5437d6ac06b458398e8a374db9583de19b5c98e99849e6c2
+MISC metadata.xml 396 SHA256 51257c7b97ea8af47f6485adee93352a26dc901024f316b3a1dcf8c2cbcd62bf SHA512 e523489c63c11a5ed2d060f9bfdf5cf5d47813c1289823032e9b45ed2dfdd1ef9d11a863403cd1492696f4ea0070a61ca3a8d8780d1bdba9ed710a035ef1a5ce WHIRLPOOL c4687da67a3971a43863ce13a2bba326a8271e392d5253024ecf0abe55977c09f81e06da7b5c4506a232a2abb1a8b13bd41ffa4a128f0c8fcb22f43c20de5e4c

diff --git a/sys-apps/accountsservice/accountsservice-0.6.43.ebuild b/sys-apps/accountsservice/accountsservice-0.6.43.ebuild
new file mode 100644
index 0000000..1e28d31
--- /dev/null
+++ b/sys-apps/accountsservice/accountsservice-0.6.43.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2 systemd
+
+DESCRIPTION="D-Bus interfaces for querying and manipulating user account information"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/AccountsService/"
+SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ppc ppc64 ~sparc x86"
+
+IUSE="doc +introspection selinux systemd"
+
+CDEPEND="
+	>=dev-libs/glib-2.37.3:2
+	sys-auth/polkit
+	introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
+	systemd? ( >=sys-apps/systemd-186:0= )
+	!systemd? ( sys-auth/consolekit )
+"
+DEPEND="${CDEPEND}
+	dev-libs/libxslt
+	dev-util/gdbus-codegen
+	>=dev-util/gtk-doc-am-1.15
+	>=dev-util/intltool-0.40
+	sys-devel/gettext
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-xml-dtd:4.1.2
+		app-text/xmlto )
+"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-accountsd )
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.6.35-gentoo-system-users.patch"
+	"${FILESDIR}/musl-fgetspent_r.patch"
+)
+
+src_prepare() {
+	default
+	sed -i configure -e "s;utx\.log;wtmp;g"
+	export ac_cv_file__var_log_utx_log=yes
+}
+
+src_configure() {
+	gnome2_src_configure \
+		--disable-static \
+		--disable-more-warnings \
+		--localstatedir="${EPREFIX}"/var \
+		--enable-admin-group="wheel" \
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+		$(use_enable doc docbook-docs) \
+		$(use_enable introspection) \
+		$(use_enable systemd)
+}

diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch b/sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch
new file mode 100644
index 0000000..39ebf42
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-0.6.35-gentoo-system-users.patch
@@ -0,0 +1,51 @@
+--- a/src/user-classify.c.old	2013-12-04 20:29:48.944454769 +0100
++++ b/src/user-classify.c	2013-12-04 20:32:59.728283477 +0100
+@@ -55,6 +55,48 @@
+         "at",
+         "gdm",
+         "gnome-initial-setup"
++        /* Additional Gentoo system users with non-trivial login shell */
++        "amanda",
++        "backuppc",
++        "drqueue",
++        "firebird",
++        "flexlm",
++        "foldingathome",
++        "geneweb",
++        "git",
++        "gnump3d",
++        "hacluster",
++        "hg",
++        "hsqldb",
++        "infinote",
++        "foldingathome",
++        "geneweb",
++        "git",
++        "gnump3d",
++        "hacluster",
++        "hg",
++        "hsqldb",
++        "infinote",
++        "jffnms",
++        "klive",
++        "mailman",
++        "mpd",
++        "mythtv",
++        "nagios",
++        "nx",
++        "oneadmin",
++        "openvpn",
++        "p2p",
++        "phxd",
++        "resin",
++        "rplayd",
++        "scponly",
++        "secoff",
++        "tinyproxy",
++        "ttrssd",
++        "vboxguest",
++        "vdr",
++        "vdradmin",
+ };
+ 
+ #define PATH_NOLOGIN "/sbin/nologin"

diff --git a/sys-apps/accountsservice/files/musl-fgetspent_r.patch b/sys-apps/accountsservice/files/musl-fgetspent_r.patch
new file mode 100644
index 0000000..c365065
--- /dev/null
+++ b/sys-apps/accountsservice/files/musl-fgetspent_r.patch
@@ -0,0 +1,34 @@
+Musl libc does not support fgetspent_r(), so fall back
+to using the non-thread-safe fgetspent() function.
+
+--- a/src/daemon.c	2016-09-06 21:48:50.000000000 +0200
++++ b/src/daemon.c	2016-11-25 10:41:01.614534302 +0100
+@@ -174,7 +174,7 @@
+                         int ret = 0;
+ 
+                         shadow_entry_buffers = g_malloc0 (sizeof (*shadow_entry_buffers));
+-
++#if defined(__GLIBC__)
+                         ret = fgetspent_r (fp, &shadow_entry_buffers->spbuf, shadow_entry_buffers->buf, sizeof (shadow_entry_buffers->buf), &shadow_entry);
+                         if (ret == 0) {
+                                 g_hash_table_insert (shadow_users, g_strdup (shadow_entry->sp_namp), shadow_entry_buffers);
+@@ -185,6 +185,19 @@
+                                         break;
+                                 }
+                         }
++#else
++                        /* Musl libc does not support fgetspent_r(), so fall back
++                         * to using the non-thread-safe fgetspent() function.
++                         */
++                        shadow_entry = fgetspent(fp);
++                        if (shadow_entry == NULL) {
++                                g_free (shadow_entry_buffers);
++
++                                if (errno != EINTR) {
++                                        break;
++                                }
++                        }
++#endif
+                 } while (shadow_entry != NULL);
+ 
+                 fclose (fp);

diff --git a/sys-apps/accountsservice/metadata.xml b/sys-apps/accountsservice/metadata.xml
new file mode 100644
index 0000000..df1259a
--- /dev/null
+++ b/sys-apps/accountsservice/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>gnome@gentoo.org</email>
+		<name>Gentoo GNOME Desktop</name>
+	</maintainer>
+	<use>
+		<flag name="systemd">Use <pkg>sys-apps/systemd</pkg> instead of
+			<pkg>sys-auth/consolekit</pkg> for session tracking</flag>
+	</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-27  6:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-19  0:06 [gentoo-commits] proj/musl:master commit in: sys-apps/accountsservice/files/, sys-apps/accountsservice/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2023-07-27  6:31 Fabian Groffen
2022-08-14 21:33 Sam James
2018-08-18  9:51 Anthony G. Basile
2017-03-29 16:47 Aric Belsito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox