[arch-commits] Commit in file/repos (3 files)

Sébastien Luttringer seblu at archlinux.org
Wed Mar 31 13:50:25 UTC 2021


    Date: Wednesday, March 31, 2021 @ 13:50:25
  Author: seblu
Revision: 411343

archrelease: copy trunk to testing-x86_64

Added:
  file/repos/testing-x86_64/
  file/repos/testing-x86_64/PKGBUILD
    (from rev 411342, file/trunk/PKGBUILD)
  file/repos/testing-x86_64/file-5.38-seccomp-tcgets.patch
    (from rev 411342, file/trunk/file-5.38-seccomp-tcgets.patch)

--------------------------------+
 PKGBUILD                       |   59 +++++++++++++++++++++++++++++++++++++++
 file-5.38-seccomp-tcgets.patch |   28 ++++++++++++++++++
 2 files changed, 87 insertions(+)

Copied: file/repos/testing-x86_64/PKGBUILD (from rev 411342, file/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2021-03-31 13:50:25 UTC (rev 411343)
@@ -0,0 +1,59 @@
+# Maintainer: Sébastien Luttringer <seblu at archlinux.org>
+# Contributor: Allan McRae <allan at archlinux.org>
+# Contributor: Andreas Radke <andyrtr at archlinux.org>
+
+pkgname=file
+pkgver=5.40
+pkgrel=1
+pkgdesc='File type identification utility'
+arch=('x86_64')
+license=('custom')
+groups=('base-devel')
+url='https://www.darwinsys.com/file/'
+depends=('glibc' 'zlib' 'xz' 'bzip2' 'libseccomp' 'libseccomp.so')
+provides=('libmagic.so')
+source=("https://astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.asc})
+validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
+sha256sums=('167321f43c148a553f68a0ea7f579821ef3b11c27b8cbe158e4df897e4a5dd57'
+            'SKIP')
+
+prepare() {
+  cd $pkgname-$pkgver
+  # apply patch from the source array (should be a pacman feature)
+  local src
+  for src in "${source[@]}"; do
+    src="${src%%::*}"
+    src="${src##*/}"
+    [[ $src = *.patch ]] || continue
+    echo "Applying patch $src..."
+    patch -Np1 < "../$src"
+  done
+}
+
+build() {
+  cd $pkgname-$pkgver
+
+  # Fix linking libmagic (vfork needs libpthread)
+  CFLAGS+=" -pthread"
+
+  ./configure \
+    --prefix=/usr \
+    --datadir=/usr/share/file \
+    --enable-fsect-man5 \
+    --enable-libseccomp
+  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+  make
+}
+
+check() {
+  cd $pkgname-$pkgver
+  make check
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: file/repos/testing-x86_64/file-5.38-seccomp-tcgets.patch (from rev 411342, file/trunk/file-5.38-seccomp-tcgets.patch)
===================================================================
--- testing-x86_64/file-5.38-seccomp-tcgets.patch	                        (rev 0)
+++ testing-x86_64/file-5.38-seccomp-tcgets.patch	2021-03-31 13:50:25 UTC (rev 411343)
@@ -0,0 +1,28 @@
+From 78573ec1c43346064661169c5c8df32e7c3bd6d6 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Fri, 17 Jan 2020 17:12:58 +0000
+Subject: [PATCH] PR/130: tobias: adjust seccomp for ioctl on hardwired
+ terminal
+
+---
+ src/seccomp.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index ebf3ea1cb..0ba17233b 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -186,8 +186,12 @@ enable_sandbox_full(void)
+ 	ALLOW_IOCTL_RULE(FIONREAD);
+ #endif
+ #ifdef TIOCGWINSZ
+-	// musl libc may call ioctl TIOCGWINSZ when calling stdout
++	// musl libc may call ioctl TIOCGWINSZ on stdout
+ 	ALLOW_IOCTL_RULE(TIOCGWINSZ);
++#endif
++#ifdef TCGETS
++	// glibc may call ioctl TCGETS on stdout on physical terminal
++	ALLOW_IOCTL_RULE(TCGETS);
+ #endif
+ 	ALLOW_RULE(lseek);
+  	ALLOW_RULE(_llseek);



More information about the arch-commits mailing list