extra/cups to 2.3.3+106+ga72b0140e-1

This commit is contained in:
Kevin Mihelich 2020-11-21 17:05:33 +00:00
parent 32b6074565
commit 75c42551cd
3 changed files with 50 additions and 24 deletions

View file

@ -6,16 +6,20 @@
pkgbase="cups" pkgbase="cups"
pkgname=('libcups' 'cups') pkgname=('libcups' 'cups')
pkgver=2.3.3 _commit=a72b0140ee9ad72f7ffc1f46fbe962bde159cbb8 # master 2020-11-15
pkgrel=3 pkgver=2.3.3+106+ga72b0140e
pkgrel=1
arch=('x86_64') arch=('x86_64')
license=('Apache' 'custom') license=('Apache' 'custom')
url="https://www.cups.org/" #url="https://www.cups.org/"
url="https://github.com/OpenPrinting/cups"
options=(!distcc) options=(!distcc)
makedepends=('libtiff' 'libpng' 'acl' 'pam' 'xdg-utils' 'krb5' 'gnutls' makedepends=('libtiff' 'libpng' 'acl' 'pam' 'xdg-utils' 'krb5' 'gnutls'
'cups-filters' 'bc' 'colord' 'xinetd' 'gzip' 'autoconf' 'libusb' 'dbus' 'cups-filters' 'bc' 'colord' 'xinetd' 'gzip' 'autoconf' 'libusb' 'dbus'
'avahi' 'hicolor-icon-theme' 'systemd' 'libxcrypt' 'inetutils' 'libpaper') 'avahi' 'hicolor-icon-theme' 'systemd' 'libxcrypt' 'inetutils' 'libpaper'
source=(https://github.com/apple/cups/releases/download/v${pkgver}/cups-${pkgver}-source.tar.gz{,.sig} '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.logrotate
cups.pam cups.pam
cups.sysusers cups.sysusers
@ -25,22 +29,28 @@ source=(https://github.com/apple/cups/releases/download/v${pkgver}/cups-${pkgver
# bugfixes # bugfixes
cups-systemd-socket.patch cups-systemd-socket.patch
guid.patch) guid.patch)
sha256sums=('261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee' sha256sums=(#'261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee'
'SKIP' 'SKIP'
'd87fa0f0b5ec677aae34668f260333db17ce303aa1a752cba5f8e72623d9acf9' 'd87fa0f0b5ec677aae34668f260333db17ce303aa1a752cba5f8e72623d9acf9'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5' '57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'06173dfaea37bdd9b39b3e09aba98c34ae7112a2f521db45a688907d8848caa2' '06173dfaea37bdd9b39b3e09aba98c34ae7112a2f521db45a688907d8848caa2'
'ff3eb0782af0405f5dafe89e04b1b4ea7a49afc5496860d724343bd04f375832' 'ff3eb0782af0405f5dafe89e04b1b4ea7a49afc5496860d724343bd04f375832'
'23349c96f2f7aeb7d48e3bcd35a969f5d5ac8f55a032b0cfaa0a03d7e37ea9af' '23349c96f2f7aeb7d48e3bcd35a969f5d5ac8f55a032b0cfaa0a03d7e37ea9af'
'3d8e24fd340fecef7101672d342433365cf78130b7182ecfd03071e31e894a9b' '5fb8b1df744ddff3652d9940fe2c084f4146b22a60b95a7eb97a2ed29e0d3a10'
'd4537526c1e075866ae22ad263da000fc2a592d36c26b79a459a1cfdade2bb2d') 'd4537526c1e075866ae22ad263da000fc2a592d36c26b79a459a1cfdade2bb2d')
validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security@cups.org> validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security@cups.org>
validpgpkeys+=('45D083946E3035282B3CCA9AF434104235DA97EB') # "CUPS.org <security@cups.org>" validpgpkeys+=('45D083946E3035282B3CCA9AF434104235DA97EB') # "CUPS.org <security@cups.org>"
validpgpkeys+=('845464660B686AAB36540B6F999559A027815955') # "Michael R Sweet <michael.r.sweet@gmail.com>" validpgpkeys+=('845464660B686AAB36540B6F999559A027815955') # "Michael R Sweet <michael.r.sweet@gmail.com>"
pkgver() {
cd $pkgbase
git describe --tags | sed 's/-/+/g' | sed 's/v//'
}
prepare() { prepare() {
cd "${pkgbase}"-${pkgver} cd "${pkgbase}" #-${pkgver}
# improve build and linking # improve build and linking
# Do not export SSL libs in cups-config # Do not export SSL libs in cups-config
@ -56,9 +66,9 @@ prepare() {
patch -Np1 -i "${srcdir}"/guid.patch patch -Np1 -i "${srcdir}"/guid.patch
# set MaxLogSize to 0 to prevent using cups internal log rotation # set MaxLogSize to 0 to prevent using cups internal log rotation
sed -i -e '5i\ ' 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 '6i# Disable cups internal logging - use logrotate instead' conf/cupsd.conf.in
sed -i -e '7iMaxLogSize 0' conf/cupsd.conf.in # sed -i -e '7iMaxLogSize 0' conf/cupsd.conf.in
# Rebuild configure script for not zipping man-pages. # Rebuild configure script for not zipping man-pages.
aclocal -I config-scripts aclocal -I config-scripts
@ -66,7 +76,10 @@ prepare() {
} }
build() { 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 # use fixed cups user (id 209) since systemd adds "lp" group without a fixed id
./configure --prefix=/usr \ ./configure --prefix=/usr \
@ -79,6 +92,7 @@ build() {
--with-exe-file-perm=0755 \ --with-exe-file-perm=0755 \
--with-cups-user=209 \ --with-cups-user=209 \
--with-cups-group=209 \ --with-cups-group=209 \
--with-max-log-size=0 \
--enable-pam=yes \ --enable-pam=yes \
--enable-raw-printing \ --enable-raw-printing \
--enable-dbus=yes \ --enable-dbus=yes \
@ -93,19 +107,21 @@ build() {
} }
check() { check() {
cd "${pkgbase}"-${pkgver} cd "${pkgbase}" #-${pkgver}
#make -k check || /bin/true # make -k check || /bin/true
# make check
} }
package_libcups() { package_libcups() {
pkgdesc="The CUPS Printing System - client libraries and headers" pkgdesc="The CUPS Printing System - client libraries and headers"
depends=('gnutls' 'libtiff>=4.0.0' 'libpng>=1.5.7' 'krb5' 'avahi' 'libusb' 'libxcrypt') 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 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) # put this into the libs pkg to make other software find the libs(no pkg-config file included)
mkdir -p "${pkgdir}"/usr/bin 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 # add license + exception
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" {LICENSE,NOTICE} install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" {LICENSE,NOTICE}
@ -129,7 +145,7 @@ optdepends=('ipp-usb: allows to send HTTP requests via a USB connection on devic
'colord: for ICC color profile support' 'colord: for ICC color profile support'
'logrotate: for logfile rotation support') 'logrotate: for logfile rotation support')
cd "${pkgbase}"-${pkgver} cd "${pkgbase}" #-${pkgver}
make BUILDROOT="${pkgdir}" install-data install-exec make BUILDROOT="${pkgdir}" install-data install-exec
# this one we ship in the libcups pkg # this one we ship in the libcups pkg
@ -170,7 +186,7 @@ optdepends=('ipp-usb: allows to send HTTP requests via a USB connection on devic
# remove client.conf man page # remove client.conf man page
rm -f "${pkgdir}"/usr/share/man/man5/client.conf.5 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 perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:' "$pkgdir"/usr/share/cups/mime/mime.convs
# comment out unnecessary PageLogFormat entry # comment out unnecessary PageLogFormat entry

View file

@ -19,14 +19,15 @@ diff -up cups-2.0.2/scheduler/main.c.ustTJg cups-2.0.2/scheduler/main.c
if (fg) if (fg)
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground."); cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in 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/cups.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 +++ cups-2.3.0/scheduler/cups.service.in.new 2019-08-25 20:20:25.805339727 +0200
@@ -1,11 +1,12 @@ @@ -1,12 +1,13 @@
[Unit] [Unit]
Description=CUPS Scheduler Description=CUPS Scheduler
Documentation=man:cupsd(8) Documentation=man:cupsd(8)
-After=sssd.service -After=sssd.service
+After=sssd.service network-online.target +After=sssd.service network-online.target
Requires=cups.socket
+Wants=network-online.target +Wants=network-online.target
[Service] [Service]
@ -36,3 +37,4 @@ diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler
Restart=on-failure Restart=on-failure
[Install] [Install]

View file

@ -16,5 +16,13 @@ post_upgrade() {
echo "make sure /etc/cups and all files within are owned by" echo "make sure /etc/cups and all files within are owned by"
echo "cups group - run \"chgrp -R cups /etc/cups\"." echo "cups group - run \"chgrp -R cups /etc/cups\"."
fi 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
}