diff options
author | Sven Hebrok | 2023-06-19 12:58:57 +0200 |
---|---|---|
committer | Sven Hebrok | 2023-06-19 12:58:57 +0200 |
commit | d86bdd564d29f2337f7f814e3474e431cc7a090b (patch) | |
tree | 65c9ad28ad8693f58d9bea70c41fbe5b3915a8ba | |
parent | 4caa3516dee09887c838d6cd30c544b513c43401 (diff) | |
download | aur-d86bdd564d29f2337f7f814e3474e431cc7a090b.tar.gz |
Update to 2.4.5
Also include a way to verify the package builds on a clean system
-rw-r--r-- | .SRCINFO | 49 | ||||
-rw-r--r-- | 0001_Fix_OpenSSL_crash_bug.patch | 17 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rwxr-xr-x | _create_package.sh | 13 | ||||
-rwxr-xr-x | _docker_validate.sh | 21 | ||||
-rw-r--r-- | _patch.sed | 11 |
6 files changed, 82 insertions, 75 deletions
@@ -1,44 +1,31 @@ pkgbase = cups-gssapi - pkgver = 2.4.2 - pkgrel = 3.2 + pkgver = 2.4.5 + pkgrel = 1 epoch = 1 url = https://openprinting.github.io/cups/ arch = x86_64 license = Apache license = custom - makedepends = libtiff - makedepends = libpng makedepends = acl makedepends = pam - makedepends = xdg-utils - makedepends = krb5 makedepends = gnutls makedepends = cups-filters - makedepends = bc makedepends = colord - makedepends = gzip - makedepends = autoconf + makedepends = krb5 makedepends = libusb - makedepends = dbus makedepends = avahi - makedepends = hicolor-icon-theme makedepends = systemd - makedepends = libxcrypt - makedepends = inetutils makedepends = libpaper - makedepends = valgrind - makedepends = git - source = https://github.com/OpenPrinting/cups/releases/download/v2.4.2/cups-2.4.2-source.tar.gz - source = https://github.com/OpenPrinting/cups/releases/download/v2.4.2/cups-2.4.2-source.tar.gz.sig + source = https://github.com/OpenPrinting/cups/releases/download/v2.4.5/cups-2.4.5-source.tar.gz + source = https://github.com/OpenPrinting/cups/releases/download/v2.4.5/cups-2.4.5-source.tar.gz.sig source = cups.logrotate source = cups.pam source = cups.sysusers source = cups-2.4.0-statedir.patch source = cups-freebind.patch source = guid.patch - source = 0001_Fix_OpenSSL_crash_bug.patch validpgpkeys = 7082A0A50A2E92640F3880E0E4522DCC9B246FF7 - sha256sums = f03ccb40b087d1e30940a40e0141dcbba263f39974c20eb9f2521066c9c6c908 + sha256sums = 9a404de55f74525b0a6851df0cfdebfa1215aec0e7c2f7be6b9b09b6916fb000 sha256sums = SKIP sha256sums = d87fa0f0b5ec677aae34668f260333db17ce303aa1a752cba5f8e72623d9acf9 sha256sums = 57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5 @@ -46,32 +33,34 @@ pkgbase = cups-gssapi sha256sums = f0b15192952c151b1843742c87850ff3a7d0f3ba5dd236ed16623ef908472ad7 sha256sums = 3385047b9ac8a7b13aeb8f0ca55d15f793ce7283516db0155fe28a67923c592d sha256sums = 0bf6a75ba1b051771f155d9a5d36b307a6d40c6857d645b250fe93f3fb713474 - sha256sums = 632faf08bfd1863e9ad6807aff766983e84030a0e4df441167f17de7266ca152 pkgname = libcups-gssapi - pkgdesc = The CUPS Printing System - client libraries and headers - with gssapi (kerberos) enabled + pkgdesc = OpenPrinting CUPS - client libraries and headers - with gssapi (kerberos) enabled depends = gnutls - depends = libtiff>=4.0.0 - depends = libpng>=1.5.7 - depends = krb5 depends = avahi - depends = libusb - depends = libxcrypt - provides = libcups=2.4.2 + depends = glibc + depends = zlib + depends = krb5 + provides = libcups=2.4.5 conflicts = libcups pkgname = cups-gssapi - pkgdesc = The CUPS Printing System - daemon package - with gssapi (kerberos) enabled + pkgdesc = OpenPrinting CUPS - daemon package - with gssapi (kerberos) enabled install = cups.install depends = acl depends = pam - depends = libcups>=2.4.2 + depends = libcups>=2.4.5 depends = cups-filters - depends = bc depends = dbus depends = systemd + depends = systemd-libs depends = libpaper depends = hicolor-icon-theme + depends = glibc + depends = gcc-libs + depends = avahi + depends = gnutls + optdepends = libusb: for usb printer backend optdepends = ipp-usb: allows to send HTTP requests via a USB connection on devices without Ethernet or WiFi connections optdepends = xdg-utils: xdg .desktop file support optdepends = colord: for ICC color profile support diff --git a/0001_Fix_OpenSSL_crash_bug.patch b/0001_Fix_OpenSSL_crash_bug.patch deleted file mode 100644 index 68c9f711ac7a..000000000000 --- a/0001_Fix_OpenSSL_crash_bug.patch +++ /dev/null @@ -1,17 +0,0 @@ -From c0c403744b1bf4a9790a8fcaabcd60970cbefe06 Mon Sep 17 00:00:00 2001 -From: Michael R Sweet <michael.r.sweet@gmail.com> -Date: Tue, 7 Jun 2022 13:45:29 -0400 -Subject: [PATCH] Fix OpenSSL crash bug - "tls" pointer wasn't cleared after - freeing it (Issue #409) - -diff --git a/cups/tls-openssl.c b/cups/tls-openssl.c -index c3e57742e..6db9f8a9c 100644 ---- a/cups/tls-openssl.c -+++ b/cups/tls-openssl.c -@@ -1152,6 +1152,8 @@ _httpTLSStop(http_t *http) // I - Connection to server - SSL_shutdown(http->tls); - SSL_CTX_free(context); - SSL_free(http->tls); -+ -+ http->tls = NULL; - } @@ -4,16 +4,16 @@ pkgbase="cups-gssapi" pkgname=('libcups-gssapi' 'cups-gssapi') -pkgver=2.4.2 -pkgrel=3.2 +pkgver=2.4.5 +pkgrel=1 epoch=1 arch=('x86_64') license=('Apache' 'custom') url="https://openprinting.github.io/cups/" -makedepends=('libtiff' 'libpng' 'acl' 'pam' 'xdg-utils' 'krb5' 'gnutls' - 'cups-filters' 'bc' 'colord' 'gzip' 'autoconf' 'libusb' 'dbus' - 'avahi' 'hicolor-icon-theme' 'systemd' 'libxcrypt' 'inetutils' 'libpaper' 'valgrind' - 'git') +makedepends=('acl' 'pam' 'gnutls' 'cups-filters' 'colord' +'krb5' + 'libusb' 'avahi' 'systemd' 'libpaper') +#checkdepends=('valgrind') source=(https://github.com/OpenPrinting/cups/releases/download/v${pkgver}/cups-${pkgver}-source.tar.gz{,.sig} cups.logrotate cups.pam @@ -22,17 +22,15 @@ source=(https://github.com/OpenPrinting/cups/releases/download/v${pkgver}/cups-$ # bugfixes cups-freebind.patch guid.patch - 0001_Fix_OpenSSL_crash_bug.patch ) -sha256sums=('f03ccb40b087d1e30940a40e0141dcbba263f39974c20eb9f2521066c9c6c908' +sha256sums=('9a404de55f74525b0a6851df0cfdebfa1215aec0e7c2f7be6b9b09b6916fb000' 'SKIP' 'd87fa0f0b5ec677aae34668f260333db17ce303aa1a752cba5f8e72623d9acf9' '57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5' '06173dfaea37bdd9b39b3e09aba98c34ae7112a2f521db45a688907d8848caa2' 'f0b15192952c151b1843742c87850ff3a7d0f3ba5dd236ed16623ef908472ad7' '3385047b9ac8a7b13aeb8f0ca55d15f793ce7283516db0155fe28a67923c592d' - '0bf6a75ba1b051771f155d9a5d36b307a6d40c6857d645b250fe93f3fb713474' - '632faf08bfd1863e9ad6807aff766983e84030a0e4df441167f17de7266ca152') + '0bf6a75ba1b051771f155d9a5d36b307a6d40c6857d645b250fe93f3fb713474') #validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security@cups.org> #validpgpkeys+=('45D083946E3035282B3CCA9AF434104235DA97EB') # "CUPS.org <security@cups.org>" #validpgpkeys+=('845464660B686AAB36540B6F999559A027815955') # "Michael R Sweet <michael.r.sweet@gmail.com>" @@ -55,10 +53,6 @@ prepare() { # FS#56818 - https://github.com/apple/cups/issues/5236 patch -Np1 -i "${srcdir}"/guid.patch - # FS#75005 - Fix OpenSSL crash bug - "tls" pointer wasn't cleared after - # Fix OpenSSL crash bug - "tls" pointer wasn't cleared after - patch -Np1 -i "${srcdir}"/0001_Fix_OpenSSL_crash_bug.patch - # Rebuild configure script aclocal -I config-scripts autoconf -I config-scripts @@ -93,17 +87,19 @@ build() { make } -check() { - cd "cups"-${pkgver} -# make -k check || /bin/true +# don't run tests - they take ages +#check() { +# cd "cups"-${pkgver} +## make -k check || /bin/true # make check -} +#} package_libcups-gssapi() { provides=("libcups=${pkgver%.r*}") conflicts=('libcups') -pkgdesc="The CUPS Printing System - client libraries and headers - with gssapi (kerberos) enabled" -depends=('gnutls' 'libtiff>=4.0.0' 'libpng>=1.5.7' 'krb5' 'avahi' 'libusb' 'libxcrypt') +pkgdesc="OpenPrinting CUPS - client libraries and headers - with gssapi (kerberos) enabled" +depends=('gnutls' 'avahi' 'glibc' 'zlib') +depends+=("krb5") cd cups-${pkgver} make BUILDROOT="${pkgdir}" install-headers install-libs @@ -118,7 +114,7 @@ depends=('gnutls' 'libtiff>=4.0.0' 'libpng>=1.5.7' 'krb5' 'avahi' 'libusb' 'libx package_cups-gssapi() { provides=('cups') conflicts=('cups') -pkgdesc="The CUPS Printing System - daemon package - with gssapi (kerberos) enabled" +pkgdesc="OpenPrinting CUPS - daemon package - with gssapi (kerberos) enabled" install=cups.install backup=(etc/cups/cupsd.conf etc/cups/snmp.conf @@ -128,9 +124,11 @@ backup=(etc/cups/cupsd.conf etc/cups/subscriptions.conf etc/logrotate.d/cups etc/pam.d/cups) -depends=('acl' 'pam' "libcups>=${pkgver}" 'cups-filters' 'bc' - 'dbus' 'systemd' 'libpaper' 'hicolor-icon-theme') -optdepends=('ipp-usb: allows to send HTTP requests via a USB connection on devices without Ethernet or WiFi connections' +depends=('acl' 'pam' "libcups>=${pkgver}" 'cups-filters' + 'dbus' 'systemd' 'systemd-libs' 'libpaper' 'hicolor-icon-theme' + 'glibc' 'gcc-libs' 'avahi' 'gnutls') +optdepends=('libusb: for usb printer backend' + 'ipp-usb: allows to send HTTP requests via a USB connection on devices without Ethernet or WiFi connections' 'xdg-utils: xdg .desktop file support' 'colord: for ICC color profile support' 'logrotate: for logfile rotation support') diff --git a/_create_package.sh b/_create_package.sh index 76edda3d07ca..12bcc1944c29 100755 --- a/_create_package.sh +++ b/_create_package.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -# requires asp to be installed +# requires devtools to be installed # needed for removing old contents but sparing our files shopt -s extglob @@ -8,12 +8,13 @@ shopt -s extglob if [ -d cups ]; then rm -r cups fi -if ls !("_create_package.sh"|"_patch.sed") >/dev/null 2>/dev/null; then - rm -r !("_create_package.sh"|"_patch.sed") +if ls !("_create_package.sh"|"_patch.sed"|"_docker_validate.sh") >/dev/null 2>/dev/null; then + rm -r !("_create_package.sh"|"_patch.sed"|"_docker_validate.sh") fi # get upstream cups package -asp export cups +pkgctl repo clone --protocol=https cups +rm -rf cups/.git/ mv cups/* ./ rmdir cups @@ -25,3 +26,7 @@ rm -r -- */ # update metadata makepkg --printsrcinfo > .SRCINFO + +echo "[ ] Validating package using docker" +docker run --rm -e MAKEFLAGS -v "$(pwd):/source:ro" archlinux /source/_docker_validate.sh || (echo "[!] Failed to validate package using docker" && exit 1) +echo "[#] Validated package using docker" diff --git a/_docker_validate.sh b/_docker_validate.sh new file mode 100755 index 000000000000..c446c69bac10 --- /dev/null +++ b/_docker_validate.sh @@ -0,0 +1,21 @@ +#!/bin/bash -e +# based on https://www.reddit.com/r/archlinux/comments/6qu4jt/how_to_run_makepkg_in_docker_container_yes_as_root/dl1t5m9/ +if ! [ -f '/source/_docker_validate.sh' ]; then + echo "[!] Did not find source/_docker_validate.sh - are you running from within docker? (with correct mount)" + exit 1 +fi +if [ "$EUID" = 0 ]; then + pacman -Sy --needed --noconfirm base-devel + useradd builduser -m # Create the builduser + passwd -d builduser # Delete the buildusers password + printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers # Allow the builduser passwordless sudo + echo "[ ] Dropping to builduser" + exec sudo -u builduser "$0" "$@" +else + gpg --recv-keys 7082A0A50A2E92640F3880E0E4522DCC9B246FF7 + cd ~ + cp -r /source build + cd build + echo "[ ] Starting to build" + makepkg -risc --noconfirm +fi diff --git a/_patch.sed b/_patch.sed index 3f2aaf8bb269..5926545a7d8e 100644 --- a/_patch.sed +++ b/_patch.sed @@ -12,6 +12,14 @@ s/.\/configure (.+) \\/.\/configure \1 --enable-gssapi --with-cups-build="cups-g # Replace description of subpackages /^pkgdesc=/ s/(.*)"$/\1 - with gssapi (kerberos) enabled"/ +# add krb5 dependency (was removed upstream) +# makedepends is multiline - insert after first line +/^makedepends=/ a 'krb5' + +/^package_libcups-gssapi\(\)/,/depends=/ { + /depends=/ a depends+=("krb5") +} + # add provides fields to subpackages /^package_cups-gssapi\(\)/ a provides=('cups') /^package_libcups-gssapi\(\)/ a provides=("libcups=${pkgver%.r*}") @@ -21,3 +29,6 @@ s/.\/configure (.+) \\/.\/configure \1 --enable-gssapi --with-cups-build="cups-g # fix usage of "${pkgbase}" s/\$\{pkgbase\}/cups/g + +# if we do more patches, use this to update pkgrel: +# s/pkgrel=3/pkgrel=3.2/ |