[arch-commits] Commit in lib32-libcups/repos/multilib-x86_64 (4 files)

Antonio Rojas arojas at gemini.archlinux.org
Mon Dec 6 20:59:39 UTC 2021


    Date: Monday, December 6, 2021 @ 20:59:38
  Author: arojas
Revision: 1065382

archrelease: copy trunk to multilib-x86_64

Added:
  lib32-libcups/repos/multilib-x86_64/PKGBUILD
    (from rev 1065381, lib32-libcups/trunk/PKGBUILD)
  lib32-libcups/repos/multilib-x86_64/cups-freebind.patch
    (from rev 1065381, lib32-libcups/trunk/cups-freebind.patch)
  lib32-libcups/repos/multilib-x86_64/guid.patch
    (from rev 1065381, lib32-libcups/trunk/guid.patch)
Deleted:
  lib32-libcups/repos/multilib-x86_64/PKGBUILD

---------------------+
 PKGBUILD            |   91 ++++++++++++++++++++++++++------------------------
 cups-freebind.patch |   15 ++++++++
 guid.patch          |   39 +++++++++++++++++++++
 3 files changed, 102 insertions(+), 43 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-06 20:59:20 UTC (rev 1065381)
+++ PKGBUILD	2021-12-06 20:59:38 UTC (rev 1065382)
@@ -1,43 +0,0 @@
-# Maintainer: Andreas Radke <andyrtr at archlinux.org>
-
-_pkgbasename=libcups
-pkgname=lib32-$_pkgbasename
-pkgver=2.3.3
-pkgrel=1
-pkgdesc="The CUPS Printing System - client libraries (32-bit)"
-arch=('x86_64')
-license=('Apache' 'custom')
-url="https://www.cups.org/"
-depends=(lib32-krb5 lib32-libtiff lib32-libpng lib32-gnutls $_pkgbasename)
-source=(https://github.com/apple/cups/releases/download/v${pkgver}/cups-${pkgver}-source.tar.gz{,.sig})
-sha256sums=('261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee'
-            'SKIP')
-validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223'  # CUPS.org (CUPS.org PGP key) <security at cups.org>
-              '45D083946E3035282B3CCA9AF434104235DA97EB') # "CUPS.org <security at cups.org>"     
-build() {
-  export CC="gcc -m32"
-  export CXX="g++ -m32"
-  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
-
-  cd cups-${pkgver}
-
-  aclocal -I config-scripts
-  autoconf -I config-scripts
-
-  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
-     --disable-ldap --enable-raw-printing --disable-gssapi --disable-dbus \
-     --enable-ssl=yes--enable-threads --enable-libusb=no \
-	 --disable-avahi --disable-dnssd \
-     --with-optim="$CFLAGS" --libdir=/usr/lib32
-  make libs
-}
-
-package() {
-  cd cups-${pkgver}
-  make BUILDROOT="${pkgdir}" install-libs
-  rm -rf "$pkgdir/usr/lib"
-
-# add license + exception
-  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" {LICENSE,NOTICE}
-}
-

Copied: lib32-libcups/repos/multilib-x86_64/PKGBUILD (from rev 1065381, lib32-libcups/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-12-06 20:59:38 UTC (rev 1065382)
@@ -0,0 +1,48 @@
+# Maintainer: Andreas Radke <andyrtr at archlinux.org>
+
+_pkgbasename=libcups
+pkgname=lib32-$_pkgbasename
+pkgver=2.4.0
+pkgrel=1
+pkgdesc="The CUPS Printing System - client libraries (32-bit)"
+arch=('x86_64')
+license=('Apache' 'custom')
+url="https://www.cups.org/"
+depends=(lib32-krb5 lib32-libtiff lib32-libpng lib32-gnutls $_pkgbasename)
+source=(https://github.com/OpenPrinting/cups/releases/download/v${pkgver}/cups-${pkgver}-source.tar.gz{,.sig}
+        cups-freebind.patch
+        guid.patch
+)
+sha256sums=('9abecec128ca6847c5bb2d3e3d30c87b782c0697b9acf284d16fa38f80a3a6de'
+            'SKIP'
+            '3385047b9ac8a7b13aeb8f0ca55d15f793ce7283516db0155fe28a67923c592d'
+            '0bf6a75ba1b051771f155d9a5d36b307a6d40c6857d645b250fe93f3fb713474')
+validpgpkeys=('7ADB58203CA5F046F28025B215AA6A7F4D4227D7') # "Zdenek Dohnal (Associate Software Engineer) <zdohnal at redhat.com>"
+
+build() {
+  export CC="gcc -m32"
+  export CXX="g++ -m32"
+  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+
+  cd cups-${pkgver}
+
+  aclocal -I config-scripts
+  autoconf -I config-scripts
+
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+     --disable-ldap --enable-raw-printing --disable-gssapi --disable-dbus \
+     --enable-ssl=yes--enable-threads --enable-libusb=no \
+	 --with-dnssd=no \
+     --with-optim="$CFLAGS" --libdir=/usr/lib32
+  make libs
+}
+
+package() {
+  cd cups-${pkgver}
+  make BUILDROOT="${pkgdir}" install-libs
+  rm -rf "$pkgdir/usr/lib"
+
+# add license + exception
+  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" {LICENSE,NOTICE}
+}
+

Copied: lib32-libcups/repos/multilib-x86_64/cups-freebind.patch (from rev 1065381, lib32-libcups/trunk/cups-freebind.patch)
===================================================================
--- cups-freebind.patch	                        (rev 0)
+++ cups-freebind.patch	2021-12-06 20:59:38 UTC (rev 1065382)
@@ -0,0 +1,15 @@
+diff -up cups-2.0.2/cups/http-addr.c.freebind cups-2.0.2/cups/http-addr.c
+--- cups-2.0.2/cups/http-addr.c.freebind	2015-02-10 14:46:33.000000000 +0100
++++ cups-2.0.2/cups/http-addr.c	2015-02-10 14:50:35.074759141 +0100
+@@ -186,6 +186,10 @@ httpAddrListen(http_addr_t *addr,	/* I -
+   val = 1;
+   setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, CUPS_SOCAST &val, sizeof(val));
+ 
++#ifdef __linux
++  setsockopt(fd, IPPROTO_IP, IP_FREEBIND, CUPS_SOCAST &val, sizeof(val));
++#endif /* __linux */
++
+ #ifdef IPV6_V6ONLY
+   if (addr->addr.sa_family == AF_INET6)
+     setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, CUPS_SOCAST &val, sizeof(val));
+diff -up cups-2.0.2/scheduler/listen.c.freebind cups-2.0.2/scheduler/listen.c

Copied: lib32-libcups/repos/multilib-x86_64/guid.patch (from rev 1065381, lib32-libcups/trunk/guid.patch)
===================================================================
--- guid.patch	                        (rev 0)
+++ guid.patch	2021-12-06 20:59:38 UTC (rev 1065382)
@@ -0,0 +1,39 @@
+--- cups-2.4.0/scheduler/cups-exec.c	2021-11-29 16:19:34.235186064 +0100
++++ cups-2.4.0/scheduler/cups-exec.c.new	2021-11-29 16:25:30.764049649 +0100
+@@ -134,9 +134,14 @@ main(int  argc,				/* I - Number of command-line args */
+ #  if CUPS_SNAP
+     if (setgroups(0, NULL))
+ #  else
+-    if (setgroups(1, &gid))
+-#  endif /* CUPS_SNAP */
++#include <pwd.h>
++    struct passwd * pwd = getpwuid(uid);
++    if(initgroups(pwd->pw_name,pwd->pw_gid))
++    {
++      fprintf(stderr, "DEBUG: initgroups failed\n");
+       exit(errno + 100);
++    }
++#  endif /* CUPS_SNAP */
+ 
+     if (uid && setuid(uid))
+       exit(errno + 100);
+--- cups-2.4.0/scheduler/util.c	2021-11-29 15:27:31.000000000 +0100
++++ cups-2.4.0/scheduler/util.c.new	2021-11-29 16:29:58.810719066 +0100
+@@ -296,7 +296,16 @@
+     */
+ 
+     if (!getuid() && user)
+-      setuid(user);			/* Run as restricted user */
++    {
++#include <pwd.h>
++      struct passwd * pwd = getpwuid(user);
++      if(initgroups(pwd->pw_name,pwd->pw_gid))
++      {
++        fprintf(stderr, "DEBUG: initgroups failed\n");
++        exit(errno + 100);
++      }
++      setuid(user); /* Run as restricted user */
++    }
+ 
+     if ((fd = open("/dev/null", O_RDONLY)) > 0)
+     {



More information about the arch-commits mailing list