Date: Sunday, November 15, 2020 @ 12:49:11 Author: andyrtr Revision: 401139
upgpkg: cups 2.3.3+105+g59137acc1-1: switch to OpenPrinting cups fork; follow other linux distributions with common service naming scheme; avoid libtool overlinking Modified: cups/trunk/PKGBUILD cups/trunk/cups-systemd-socket.patch cups/trunk/cups.install ---------------------------+ PKGBUILD | 59 ++++++++++++++++++++++++++++++-------------- cups-systemd-socket.patch | 8 +++-- cups.install | 10 ++++++- 3 files changed, 55 insertions(+), 22 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-11-15 12:11:15 UTC (rev 401138) +++ PKGBUILD 2020-11-15 12:49:11 UTC (rev 401139) @@ -2,15 +2,19 @@ pkgbase="cups" pkgname=('libcups' 'cups') -pkgver=2.3.3 -pkgrel=3 +_commit=59137acc14cffad7fa1c076ea09f6d555aac203d # master 2020-11-14 +pkgver=2.3.3+105+g59137acc1 +pkgrel=1 arch=('x86_64') license=('Apache' 'custom') -url="https://www.cups.org/" +#url="https://www.cups.org/" +url="https://github.com/OpenPrinting/cups" makedepends=('libtiff' 'libpng' 'acl' 'pam' 'xdg-utils' 'krb5' 'gnutls' 'cups-filters' 'bc' 'colord' 'xinetd' 'gzip' 'autoconf' 'libusb' 'dbus' - 'avahi' 'hicolor-icon-theme' 'systemd' 'libxcrypt' 'inetutils' 'libpaper' 'valgrind') -source=(https://github.com/apple/cups/releases/download/v${pkgver}/cups-${pkgver}-source.tar.gz{,.sig} + '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" cups.logrotate cups.pam cups.sysusers @@ -20,7 +24,7 @@ # bugfixes cups-systemd-socket.patch guid.patch) -sha256sums=('261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee' +sha256sums=(#'261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee' 'SKIP' 'd87fa0f0b5ec677aae34668f260333db17ce303aa1a752cba5f8e72623d9acf9' '57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5' @@ -27,15 +31,21 @@ '06173dfaea37bdd9b39b3e09aba98c34ae7112a2f521db45a688907d8848caa2' 'ff3eb0782af0405f5dafe89e04b1b4ea7a49afc5496860d724343bd04f375832' '23349c96f2f7aeb7d48e3bcd35a969f5d5ac8f55a032b0cfaa0a03d7e37ea9af' - '3d8e24fd340fecef7101672d342433365cf78130b7182ecfd03071e31e894a9b' + 'f0d65d37aa57de0481244f9f0dc1fe2277a1fbe43e5333e24649c2f9e10f414e' 'd4537526c1e075866ae22ad263da000fc2a592d36c26b79a459a1cfdade2bb2d') validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <secur...@cups.org> validpgpkeys+=('45D083946E3035282B3CCA9AF434104235DA97EB') # "CUPS.org <secur...@cups.org>" validpgpkeys+=('845464660B686AAB36540B6F999559A027815955') # "Michael R Sweet <michael.r.sw...@gmail.com>" + +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 @@ -51,9 +61,9 @@ 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 +# 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 @@ -61,8 +71,11 @@ } build() { - cd "${pkgbase}"-${pkgver} + cd "${pkgbase}" #-${pkgver} + # The build system uses only DSOFLAGS but not LDFLAGS to build some libraries. + export DSOFLAGS=${LDFLAGS} + # use fixed cups user (id 209) since systemd adds "lp" group without a fixed id ./configure --prefix=/usr \ --sysconfdir=/etc \ @@ -74,6 +87,7 @@ --with-exe-file-perm=0755 \ --with-cups-user=209 \ --with-cups-group=209 \ + --with-max-log-size=0 \ --enable-pam=yes \ --enable-raw-printing \ --enable-dbus=yes \ @@ -88,8 +102,9 @@ } check() { - cd "${pkgbase}"-${pkgver} - #make -k check || /bin/true + cd "${pkgbase}" #-${pkgver} +# make -k check || /bin/true +# make check } package_libcups() { @@ -96,11 +111,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}"-${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} @@ -124,7 +140,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 @@ -165,9 +181,16 @@ # remove client.conf man page rm -f "${pkgdir}"/usr/share/man/man5/client.conf.5 - # comment out all conversion rules which use any of the removed filters that are now part of cups-filters + # comment out removed filters that are now part of cups-filters perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:' "$pkgdir"/usr/share/cups/mime/mime.convs # comment out unnecessary PageLogFormat entry sed -i -e 's:PageLogFormat:#PageLogFormat:' "$pkgdir"/etc/cups/cupsd.conf* + + # rename the systems service files + mv "${pkgdir}"/usr/lib/systemd/system/org.cups.cups-lpd.socket "${pkgdir}"/usr/lib/systemd/system/cups-lpd.socket + mv "${pkgdir}"/usr/lib/systemd/system/org.cups.cups-lpd@.service "${pkgdir}"/usr/lib/systemd/system/cups-lpd@.service + mv "${pkgdir}"/usr/lib/systemd/system/org.cups.cupsd.path "${pkgdir}"/usr/lib/systemd/system/cups.path + mv "${pkgdir}"/usr/lib/systemd/system/org.cups.cupsd.service "${pkgdir}"/usr/lib/systemd/system/cups.service + mv "${pkgdir}"/usr/lib/systemd/system/org.cups.cupsd.socket "${pkgdir}"/usr/lib/systemd/system/cups.socket } Modified: cups-systemd-socket.patch =================================================================== --- cups-systemd-socket.patch 2020-11-15 12:11:15 UTC (rev 401138) +++ cups-systemd-socket.patch 2020-11-15 12:49:11 UTC (rev 401139) @@ -21,18 +21,20 @@ diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in --- cups-2.3.0/scheduler/org.cups.cupsd.service.in 2019-08-23 17:19:38.000000000 +0200 +++ cups-2.3.0/scheduler/org.cups.cupsd.service.in.new 2019-08-25 20:20:25.805339727 +0200 -@@ -1,11 +1,12 @@ +@@ -1,12 +1,13 @@ [Unit] Description=CUPS Scheduler Documentation=man:cupsd(8) -After=sssd.service +After=sssd.service network-online.target + Requires=cups.socket +Wants=network-online.target - + [Service] ExecStart=@sbindir@/cupsd -l -Type=simple +Type=notify Restart=on-failure + + [Install] - [Install] Modified: cups.install =================================================================== --- cups.install 2020-11-15 12:11:15 UTC (rev 401138) +++ cups.install 2020-11-15 12:49:11 UTC (rev 401139) @@ -16,5 +16,13 @@ echo "make sure /etc/cups and all files within are owned by" echo "cups group - run \"chgrp -R cups /etc/cups\"." fi + + # upstream reverted back to common old naming scheme + if [[ $(vercmp 2.3.3+105+g59137acc1-1 $2) = 1 ]]; then + echo ">>> Cups systemd socket and service files have been" + echo ">>> renamed by upstream decision. Please make sure" + echo ">>> to disable/reenable the services to your need." + echo ">>> hint: \"pacman -Ql cups | grep systemd\" and" + echo ">>> \"ls -lR /etc/systemd/ | grep cups\" " + fi } -