[arch-commits] Commit in cups/trunk (3 files)

Andreas Radke andyrtr at archlinux.org
Fri Nov 27 20:06:44 UTC 2020


    Date: Friday, November 27, 2020 @ 20:06:44
  Author: andyrtr
Revision: 402337

upgpkg: cups 1:2.3.3op1-1: upstream update 2.3.3op1 - first release of the OpenPrinting fork; don't let the cupsd server wait for network-online.target - use IP_FREEBIND

Added:
  cups/trunk/cups-freebind.patch
Modified:
  cups/trunk/PKGBUILD
Deleted:
  cups/trunk/cups-systemd-service.patch

----------------------------+
 PKGBUILD                   |   46 ++++++++++++++++++++-----------------------
 cups-freebind.patch        |   15 ++++++++++++++
 cups-systemd-service.patch |   14 -------------
 3 files changed, 37 insertions(+), 38 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-27 18:45:55 UTC (rev 402336)
+++ PKGBUILD	2020-11-27 20:06:44 UTC (rev 402337)
@@ -2,9 +2,10 @@
 
 pkgbase="cups"
 pkgname=('libcups' 'cups')
-_commit=63ffc5cd75e474e475bb3bcd70fb4e62bd836770 # master 2020-11-25
-pkgver=2.3.3+121+g63ffc5cd7
+#_commit=be75d5d99a54c5f62608f7b9e98748d4c7045ec1 # master 2020-11-27
+pkgver=2.3.3op1
 pkgrel=1
+epoch=1
 arch=('x86_64')
 license=('Apache' 'custom')
 #url="https://www.cups.org/"
@@ -14,7 +15,8 @@
              'avahi'  'hicolor-icon-theme' 'systemd' 'libxcrypt' 'inetutils' 'libpaper' 'valgrind'
              'git')
 source=(#https://github.com/apple/cups/releases/download/v${pkgver}/cups-${pkgver}-source.tar.gz{,.sig}
-        "git+https://github.com/OpenPrinting/cups#commit=$_commit"
+        https://github.com/OpenPrinting/cups/releases/download/v${pkgver}/cups-${pkgver}-source.tar.gz{,.sig}
+        #"git+https://github.com/OpenPrinting/cups#commit=$_commit"
         cups.logrotate
         cups.pam
         cups.sysusers
@@ -22,9 +24,9 @@
         cups-no-export-ssllibs.patch
         cups-1.6.2-statedir.patch
         # bugfixes
-        cups-systemd-service.patch
+        cups-freebind.patch
         guid.patch)
-sha256sums=(#'261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee'
+sha256sums=('5cf7988081d9003f589ba173b37bc2bbf81db43bb94e5e7d3e7d4c0afb0f9bc2'
             'SKIP'
             'd87fa0f0b5ec677aae34668f260333db17ce303aa1a752cba5f8e72623d9acf9'
             '57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
@@ -31,7 +33,7 @@
             '06173dfaea37bdd9b39b3e09aba98c34ae7112a2f521db45a688907d8848caa2'
             'ff3eb0782af0405f5dafe89e04b1b4ea7a49afc5496860d724343bd04f375832'
             '23349c96f2f7aeb7d48e3bcd35a969f5d5ac8f55a032b0cfaa0a03d7e37ea9af'
-            '2abd918d5a5e38762ae7c2a3a443a7b9e8d9980fbe693a4b60415b18a80ebd83'
+            '3385047b9ac8a7b13aeb8f0ca55d15f793ce7283516db0155fe28a67923c592d'
             'd4537526c1e075866ae22ad263da000fc2a592d36c26b79a459a1cfdade2bb2d')
 validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security at cups.org>
 validpgpkeys+=('45D083946E3035282B3CCA9AF434104235DA97EB') # "CUPS.org <security at cups.org>"
@@ -38,14 +40,14 @@
 validpgpkeys+=('845464660B686AAB36540B6F999559A027815955') # "Michael R Sweet <michael.r.sweet at gmail.com>"
 
 
-pkgver() {
-  cd $pkgbase
-  git describe --tags | sed 's/-/+/g' | sed 's/v//'
-}
+#pkgver() {
+#  cd $pkgbase
+#  git describe --tags | sed 's/-/+/g' | sed 's/v//'
+#}
 
 prepare() {
 
-  cd "${pkgbase}" #-${pkgver}
+  cd "${pkgbase}"-${pkgver}
 
   # improve build and linking
   # Do not export SSL libs in cups-config
@@ -54,18 +56,14 @@
   patch -Np1 -i "${srcdir}"/cups-1.6.2-statedir.patch
 
   # bug fixes
-  # make sure network is online or cups would ne a restart to be reachable over network
+
   # https://github.com/OpenPrinting/cups/issues/53
-  patch -Np1 -i "${srcdir}"/cups-systemd-service.patch
+  # use IP_FREEBIND, because cupsd cannot bind to not yet existing IP address
+  patch -Np1 -i "${srcdir}"/cups-freebind.patch
 
   # FS#56818 - https://github.com/apple/cups/issues/5236
   patch -Np1 -i "${srcdir}"/guid.patch
 
-  # set MaxLogSize to 0 to prevent using cups internal log rotation
-#  sed -i -e '5i\ ' conf/cupsd.conf.in
-#  sed -i -e '6i# Disable cups internal logging - use logrotate instead' conf/cupsd.conf.in
-#  sed -i -e '7iMaxLogSize 0' conf/cupsd.conf.in
-
   # Rebuild configure script for not zipping man-pages.
   aclocal -I config-scripts
   autoconf -I config-scripts
@@ -72,7 +70,7 @@
 }
 
 build() {
-  cd "${pkgbase}" #-${pkgver}
+  cd "${pkgbase}"-${pkgver}
 
   # The build system uses only DSOFLAGS but not LDFLAGS to build some libraries.
   export DSOFLAGS=${LDFLAGS}
@@ -103,7 +101,7 @@
 }
 
 check() {
-  cd "${pkgbase}" #-${pkgver}
+  cd "${pkgbase}"-${pkgver}
 #  make -k check || /bin/true
 #  make check
 }
@@ -112,12 +110,12 @@
 pkgdesc="The CUPS Printing System - client libraries and headers"
 depends=('gnutls' 'libtiff>=4.0.0' 'libpng>=1.5.7' 'krb5' 'avahi' 'libusb' 'libxcrypt')
 
-  cd ${pkgbase} #-${pkgver}
+  cd ${pkgbase}-${pkgver}
   make BUILDROOT="${pkgdir}" install-headers install-libs
   # put this into the libs pkg to make other software find the libs(no pkg-config file included)
   mkdir -p "${pkgdir}"/usr/bin
-#  install -m755 "${srcdir}"/"${pkgbase}"-${pkgver}/cups-config "${pkgdir}"/usr/bin/cups-config
-  install -m755 "${srcdir}"/"${pkgbase}"/cups-config "${pkgdir}"/usr/bin/cups-config
+  install -m755 "${srcdir}"/"${pkgbase}"-${pkgver}/cups-config "${pkgdir}"/usr/bin/cups-config
+#  install -m755 "${srcdir}"/"${pkgbase}"/cups-config "${pkgdir}"/usr/bin/cups-config
 
   # add license + exception
   install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" {LICENSE,NOTICE}
@@ -141,7 +139,7 @@
             'colord: for ICC color profile support'
             'logrotate: for logfile rotation support')
 
-  cd "${pkgbase}" #-${pkgver}
+  cd "${pkgbase}"-${pkgver}
   make BUILDROOT="${pkgdir}" install-data install-exec
 
   # this one we ship in the libcups pkg

Added: cups-freebind.patch
===================================================================
--- cups-freebind.patch	                        (rev 0)
+++ cups-freebind.patch	2020-11-27 20:06:44 UTC (rev 402337)
@@ -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

Deleted: cups-systemd-service.patch
===================================================================
--- cups-systemd-service.patch	2020-11-27 18:45:55 UTC (rev 402336)
+++ cups-systemd-service.patch	2020-11-27 20:06:44 UTC (rev 402337)
@@ -1,14 +0,0 @@
---- cups-2.3.0/scheduler/cups.service.in	2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/scheduler/cups.service.in.new	2019-08-25 20:20:25.805339727 +0200
-@@ -1,8 +1,9 @@
- [Unit]
- Description=CUPS Scheduler
- Documentation=man:cupsd(8)
--After=network.target sssd.service ypbind.service
-+After=network-online.target sssd.service ypbind.service
- Requires=cups.socket
-+Wants=network-online.target
-
- [Service]
- ExecStart=@sbindir@/cupsd -l
- 



More information about the arch-commits mailing list