From b2693c253ef3954a3f520cf1d6df62596c519890 Mon Sep 17 00:00:00 2001 From: Archlinux-Jerry Build Bot Date: Sat, 1 Feb 2020 16:13:48 +0800 Subject: [PATCH] add package: fakeroot-tcp --- fakeroot-tcp/PKGBUILD | 54 ++++++++++++++++++++++++ fakeroot-tcp/autobuild.yaml | 7 +++ fakeroot-tcp/buildbot.update.d/config.sh | 22 ++++++++++ fakeroot-tcp/buildbot.update.d/update.sh | 1 + fakeroot-tcp/fakeroot.install | 14 ++++++ fakeroot-tcp/silence-dlerror.patch | 17 ++++++++ 6 files changed, 115 insertions(+) create mode 100644 fakeroot-tcp/PKGBUILD create mode 100644 fakeroot-tcp/autobuild.yaml create mode 100644 fakeroot-tcp/buildbot.update.d/config.sh create mode 120000 fakeroot-tcp/buildbot.update.d/update.sh create mode 100644 fakeroot-tcp/fakeroot.install create mode 100644 fakeroot-tcp/silence-dlerror.patch diff --git a/fakeroot-tcp/PKGBUILD b/fakeroot-tcp/PKGBUILD new file mode 100644 index 0000000..549a8a3 --- /dev/null +++ b/fakeroot-tcp/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: 4679 +# Contributor: Bartłomiej Piotrowski +# Contributor: Allan McRae +# Contributor: Jochem Kossen + +pkgname=fakeroot-tcp +_pkgname=fakeroot +pkgver=1.24 +pkgrel=2 +pkgdesc='Tool for simulating superuser privileges,with tcp ipc' +arch=('i686' 'x86_64' 'armv7h' 'aarch64') +license=('GPL') +url="http://packages.debian.org/fakeroot" +install=fakeroot.install +depends=('glibc' 'filesystem' 'sed' 'util-linux' 'sh') +makedepends=('po4a' 'automake') +provides=("${_pkgname}=${pkgver}-${pkgrel}") +conflicts=("${_pkgname}") +source=(http://ftp.debian.org/debian/pool/main/f/$_pkgname/${_pkgname}_${pkgver}.orig.tar.gz + silence-dlerror.patch) +md5sums=('964e5f438f1951e5a515dd54edd50fa6' + '5fba0b541b5af39d804265223fda525c') + +prepare() { + cd $_pkgname-$pkgver + patch -p1 -i "$srcdir"/silence-dlerror.patch +} + +build() { + cd $_pkgname-$pkgver + + ./bootstrap + ./configure --prefix=/usr \ + --libdir=/usr/lib/libfakeroot \ + --disable-static \ + --with-ipc=tcp + + make + + cd doc + po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg +} + +package() { + cd $_pkgname-$pkgver + make DESTDIR="$pkgdir" install + + install -dm755 "$pkgdir"/etc/ld.so.conf.d/ + echo '/usr/lib/libfakeroot' > "$pkgdir"/etc/ld.so.conf.d/fakeroot.conf + + # install README for sysv/tcp usage + install -Dm644 README "$pkgdir"/usr/share/doc/$_pkgname/README +} + diff --git a/fakeroot-tcp/autobuild.yaml b/fakeroot-tcp/autobuild.yaml new file mode 100644 index 0000000..0a22a4f --- /dev/null +++ b/fakeroot-tcp/autobuild.yaml @@ -0,0 +1,7 @@ +type: + auto +priority: + 10 +extra: + - update: + - bash buildbot.update.d/update.sh diff --git a/fakeroot-tcp/buildbot.update.d/config.sh b/fakeroot-tcp/buildbot.update.d/config.sh new file mode 100644 index 0000000..5a54732 --- /dev/null +++ b/fakeroot-tcp/buildbot.update.d/config.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# buildbot update hook for aur packages + +PKGNAME='fakeroot-tcp' +PKGBUILD='PKGBUILD' + +# prepare upstream source +prepare() { + true +} + +# which files to include, overrides exclude_files below +INCLUDE_FILES=( +# 'PKGBUILD' +# '.gitignore' +) + +# which files to exclude, use '*' and '.*' to exclude all +EXCLUDE_FILES=( + '.SRCINFO' + '.git' +) diff --git a/fakeroot-tcp/buildbot.update.d/update.sh b/fakeroot-tcp/buildbot.update.d/update.sh new file mode 120000 index 0000000..7600931 --- /dev/null +++ b/fakeroot-tcp/buildbot.update.d/update.sh @@ -0,0 +1 @@ +../../.buildbot/aur.hook.d/update.sh \ No newline at end of file diff --git a/fakeroot-tcp/fakeroot.install b/fakeroot-tcp/fakeroot.install new file mode 100644 index 0000000..986c91b --- /dev/null +++ b/fakeroot-tcp/fakeroot.install @@ -0,0 +1,14 @@ +post_install() { + sbin/ldconfig -r . +} + +post_upgrade() { + if [ "$(vercmp $2 1.14.4-2)" -lt 0 ]; then + sed -i -e '/\/usr\/lib\/libfakeroot/d' etc/ld.so.conf + fi + sbin/ldconfig -r . +} + +pre_remove() { + sbin/ldconfig -r . +} diff --git a/fakeroot-tcp/silence-dlerror.patch b/fakeroot-tcp/silence-dlerror.patch new file mode 100644 index 0000000..a4472d8 --- /dev/null +++ b/fakeroot-tcp/silence-dlerror.patch @@ -0,0 +1,17 @@ +diff --git a/libfakeroot.c b/libfakeroot.c +index f867758..7ef6e47 100644 +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -256,10 +256,12 @@ void load_library_symbols(void){ + /* clear dlerror() just in case dlsym() legitimately returns NULL */ + msg = dlerror(); + *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name); ++#ifdef LIBFAKEROOT_DEBUGGING + if ( (msg = dlerror()) != NULL){ + fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg); + /* abort ();*/ + } ++#endif /* LIBFAKEROOT_DEBUGGING */ + } + } +