diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-07-31 14:52:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-07-31 14:54:21 +0000 |
commit | a2fd4c4e40fff79d43c13c3d4e919596667e3526 (patch) | |
tree | 1b7c2dc9ee704a6b93b7dedb4bbf4e94eef81dd7 /testing | |
parent | 506c4f449ff86d8256c26a9af65e3fdd041f6bf5 (diff) | |
download | aports-a2fd4c4e40fff79d43c13c3d4e919596667e3526.tar.bz2 aports-a2fd4c4e40fff79d43c13c3d4e919596667e3526.tar.xz |
testing/accountsservice: upgrade to 0.6.50, modernize
Diffstat (limited to 'testing')
-rw-r--r-- | testing/accountsservice/APKBUILD | 44 | ||||
-rw-r--r-- | testing/accountsservice/musl-fgetspent_r.patch | 34 |
2 files changed, 53 insertions, 25 deletions
diff --git a/testing/accountsservice/APKBUILD b/testing/accountsservice/APKBUILD index ad3fdd83fa..920ab460d5 100644 --- a/testing/accountsservice/APKBUILD +++ b/testing/accountsservice/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=accountsservice -pkgver=0.6.39 +pkgver=0.6.50 pkgrel=0 pkgdesc="D-Bus interface for user account query and manipulation" url="http://www.freedesktop.org/software/accountsservice/" @@ -10,24 +10,16 @@ license="GPL-3.0-or-later" depends="" depends_dev="glib-dev gobject-introspection-dev polkit-dev" makedepends="$depends_dev intltool gnome-doc-utils" -install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" -source="http://www.freedesktop.org/software/accountsservice/accountsservice-$pkgver.tar.xz" - -_builddir="$srcdir"/accountsservice-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - +source="http://www.freedesktop.org/software/accountsservice/accountsservice-$pkgver.tar.xz + musl-fgetspent_r.patch + " +builddir="$srcdir"/$pkgname-$pkgver build() { - cd "$_builddir" - ./configure \ + cd "$builddir" + # Hack to check for /var/log/wtmp instead of /var/log/utx.log + sed -i configure -e "s;utx\.log;wtmp;g" + ac_cv_file__var_log_utx_log=yes ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ @@ -36,17 +28,19 @@ build() { --infodir=/usr/share/info \ --localstatedir=/var \ --disable-systemd \ - --enable-introspection=yes \ - || return 1 - # hack to disable utmpx - sed -i -e '/#define HAVE_UTMPX_H 1/d' config.h + --enable-introspection=yes + make +} - make || return 1 +check() { + cd "$builddir" + make check } package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 + cd "$builddir" + make DESTDIR="$pkgdir" install } -sha512sums="b72f2edf95b7df5b38c75fbe4be2581384f7ff3631248a9fd2a523a13638e2c9c8933f195b8991a7138a556786531258b00878dc1a68863b616d2d2a17cbcf33 accountsservice-0.6.39.tar.xz" +sha512sums="6e07cd318452b1cbedeacd729f0ebb200525caf1b09981abb2bac16fd90756a790ebec08aca0a0cea016f14ab27c159a68fe1332ef4bc636c5863b8c61040f64 accountsservice-0.6.50.tar.xz +469392beca8f5941eafaa193c4fcb0472770ee4183ce520416a1b5d6abafe0e201990eb74d06bfbd9e20af08e55aff5f0031f267083f6c6879f0fe4e5028103c musl-fgetspent_r.patch" diff --git a/testing/accountsservice/musl-fgetspent_r.patch b/testing/accountsservice/musl-fgetspent_r.patch new file mode 100644 index 0000000000..f5046d47c6 --- /dev/null +++ b/testing/accountsservice/musl-fgetspent_r.patch @@ -0,0 +1,34 @@ +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, + |