del: fakeroot
This commit is contained in:
parent
62d57e110d
commit
6b371a276a
@ -1,22 +0,0 @@
|
||||
pkgbase = fakeroot
|
||||
pkgdesc = Tool for simulating superuser privileges
|
||||
pkgver = 1.34
|
||||
pkgrel = 2
|
||||
url = https://tracker.debian.org/pkg/fakeroot
|
||||
install = fakeroot.install
|
||||
arch = x86_64
|
||||
license = GPL
|
||||
checkdepends = sharutils
|
||||
makedepends = systemd
|
||||
makedepends = po4a
|
||||
depends = glibc
|
||||
depends = filesystem
|
||||
depends = sed
|
||||
depends = util-linux
|
||||
depends = sh
|
||||
source = https://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.34.orig.tar.gz
|
||||
source = optimize-fd-closing.patch
|
||||
sha256sums = 5727f16d8903792588efa7a9f8ef8ce71f8756e746b62e45162e7735662e56bb
|
||||
sha256sums = 848d4157c6332c387df229beb5645223b5adce11d9ba9002e70322564447465a
|
||||
|
||||
pkgname = fakeroot
|
@ -1,54 +0,0 @@
|
||||
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
||||
# Contributor: Allan McRae <allan@archlinux.org>
|
||||
# Contributor: Jochem Kossen <j.kossen@home.nl>
|
||||
|
||||
pkgname=fakeroot
|
||||
pkgver=1.34
|
||||
pkgrel=2
|
||||
pkgdesc='Tool for simulating superuser privileges'
|
||||
arch=('x86_64')
|
||||
license=('GPL')
|
||||
url='https://tracker.debian.org/pkg/fakeroot'
|
||||
install=fakeroot.install
|
||||
depends=('glibc' 'filesystem' 'sed' 'util-linux' 'sh')
|
||||
makedepends=('systemd' 'po4a')
|
||||
checkdepends=('sharutils')
|
||||
source=("https://deb.debian.org/debian/pool/main/f/$pkgname/${pkgname}_${pkgver}.orig.tar.gz"
|
||||
optimize-fd-closing.patch)
|
||||
sha256sums=('5727f16d8903792588efa7a9f8ef8ce71f8756e746b62e45162e7735662e56bb'
|
||||
'848d4157c6332c387df229beb5645223b5adce11d9ba9002e70322564447465a')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
patch -Np1 < ../optimize-fd-closing.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--libdir=/usr/lib/libfakeroot \
|
||||
--disable-static \
|
||||
--with-ipc=sysv
|
||||
|
||||
make
|
||||
|
||||
cd doc
|
||||
po4a -k 0 --rm-backups --variable 'srcdir=../doc/' po4a/po4a.cfg
|
||||
}
|
||||
|
||||
check() {
|
||||
cd $pkgname-$pkgver
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
install -dm0755 "$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 -Dm0644 README "$pkgdir/usr/share/doc/$pkgname/README"
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
post_install() {
|
||||
usr/bin/ldconfig -r .
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
usr/bin/ldconfig -r .
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
usr/bin/ldconfig -r .
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
Description: Optimize file descriptor closing
|
||||
Closing all the fds is a severe performance issue in containers when
|
||||
ulimit is high. We fixed that in APT a long time ago, time to apply
|
||||
the same fix here.
|
||||
Author: Julian Andres Klode <juliank@ubuntu.com>
|
||||
|
||||
--- a/faked.c
|
||||
+++ b/faked.c
|
||||
@@ -107,6 +107,7 @@
|
||||
#ifdef HAVE_SYS_XATTR_H
|
||||
#include <sys/xattr.h>
|
||||
#endif
|
||||
+#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
@@ -1502,16 +1503,32 @@ int main(int argc, char **argv){
|
||||
/* literally copied from the linux klogd code, go to background */
|
||||
if ((pid=fork()) == 0){
|
||||
int fl;
|
||||
- int num_fds = getdtablesize();
|
||||
+ DIR *dir;
|
||||
|
||||
- fflush(stdout);
|
||||
+ dir = opendir("/proc/self/fd");
|
||||
+ if (dir != NULL) {
|
||||
+ struct dirent *ent;
|
||||
+ int dfd = dirfd(dir);
|
||||
+ while (ent = readdir(dir)) {
|
||||
+ fl = atoi(ent->d_name);
|
||||
+ if (fl >= 0 && fl != dfd)
|
||||
+#ifdef FAKEROOT_FAKENET
|
||||
+ if (fl != sd)
|
||||
+#endif /* FAKEROOT_FAKENET */
|
||||
+ close(fl);
|
||||
+ }
|
||||
+ closedir(dir);
|
||||
+ }
|
||||
+ else {
|
||||
+ int num_fds = getdtablesize();
|
||||
|
||||
- /* This is the child closing its file descriptors. */
|
||||
- for (fl= 0; fl <= num_fds; ++fl)
|
||||
+ /* This is the child closing its file descriptors. */
|
||||
+ for (fl= 0; fl <= num_fds; ++fl)
|
||||
#ifdef FAKEROOT_FAKENET
|
||||
- if (fl != sd)
|
||||
+ if (fl != sd)
|
||||
#endif /* FAKEROOT_FAKENET */
|
||||
- close(fl);
|
||||
+ close(fl);
|
||||
+ }
|
||||
setsid();
|
||||
} else {
|
||||
printf("%li:%i\n",(long)FAKE_KEY,pid);
|
Loading…
Reference in New Issue
Block a user