summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cups
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/cups')
-rw-r--r--meta/recipes-extended/cups/cups.inc85
-rw-r--r--meta/recipes-extended/cups/cups/0001-use-echo-only-in-init.patch11
-rw-r--r--meta/recipes-extended/cups/cups/0002-don-t-try-to-run-generated-binaries.patch58
-rw-r--r--meta/recipes-extended/cups/cups/0003-cups_1.4.6.bb-Fix-build-on-ppc64.patch51
-rw-r--r--meta/recipes-extended/cups/cups/0004-cups-fix-multilib-install-file-conflicts.patch12
-rw-r--r--meta/recipes-extended/cups/cups/CVE-2020-10001.patch74
-rw-r--r--meta/recipes-extended/cups/cups/libexecdir.patch34
-rw-r--r--meta/recipes-extended/cups/cups_2.3.3.bb6
-rw-r--r--meta/recipes-extended/cups/cups_2.4.12.bb5
9 files changed, 90 insertions, 246 deletions
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index 244c87001f..b8761df0d5 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -6,77 +6,68 @@ document types."
6HOMEPAGE = "https://www.cups.org/" 6HOMEPAGE = "https://www.cups.org/"
7SECTION = "console/utils" 7SECTION = "console/utils"
8LICENSE = "Apache-2.0" 8LICENSE = "Apache-2.0"
9DEPENDS = "gnutls libpng jpeg dbus zlib libusb1" 9DEPENDS = "libpng jpeg dbus zlib libusb1"
10 10
11SRC_URI = "https://github.com/apple/cups/releases/download/v${PV}/${BP}-source.tar.gz \ 11SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \
12 file://0001-use-echo-only-in-init.patch \ 12 file://0001-use-echo-only-in-init.patch \
13 file://0002-don-t-try-to-run-generated-binaries.patch \ 13 file://0002-don-t-try-to-run-generated-binaries.patch \
14 file://0003-cups_1.4.6.bb-Fix-build-on-ppc64.patch \ 14 file://libexecdir.patch \
15 file://0004-cups-fix-multilib-install-file-conflicts.patch \ 15 file://0004-cups-fix-multilib-install-file-conflicts.patch \
16 file://volatiles.99_cups \ 16 file://volatiles.99_cups \
17 file://cups-volatiles.conf \ 17 file://cups-volatiles.conf \
18 file://CVE-2020-10001.patch \
19 " 18 "
20 19
21UPSTREAM_CHECK_URI = "https://github.com/apple/cups/releases" 20GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases"
22UPSTREAM_CHECK_REGEX = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar"
23 21
24# Issue only applies to MacOS 22CVE_STATUS[CVE-2008-1033] = "not-applicable-platform: Issue only applies to MacOS"
25CVE_CHECK_WHITELIST += "CVE-2008-1033" 23CVE_STATUS[CVE-2009-0032] = "cpe-incorrect: Issue affects pdfdistiller plugin used with but not part of cups"
26# Issue affects pdfdistiller plugin used with but not part of cups 24CVE_STATUS[CVE-2018-6553] = "not-applicable-platform: This is an Ubuntu only issue"
27CVE_CHECK_WHITELIST += "CVE-2009-0032" 25CVE_STATUS[CVE-2022-26691] = "fixed-version: This is fixed in 2.4.2 but the cve-check class still reports it"
28# This is an Ubuntu only issue. 26CVE_STATUS[CVE-2021-25317] = "not-applicable-config: This concerns /var/log/cups having lp ownership, our /var/log/cups is root:root, so this doesn't apply."
29CVE_CHECK_WHITELIST += "CVE-2018-6553"
30 27
31LEAD_SONAME = "libcupsdriver.so" 28LEAD_SONAME = "libcupsdriver.so"
32 29
33CLEANBROKEN = "1" 30CLEANBROKEN = "1"
34 31
35inherit autotools-brokensep binconfig useradd systemd pkgconfig multilib_script 32inherit autotools-brokensep binconfig useradd systemd pkgconfig multilib_script github-releases
36 33
37USERADD_PACKAGES = "${PN}" 34USERADD_PACKAGES = "${PN}"
38GROUPADD_PARAM_${PN} = "--system lpadmin" 35GROUPADD_PARAM:${PN} = "--system lpadmin"
39 36
40SYSTEMD_SERVICE_${PN} = "org.cups.cupsd.socket org.cups.cupsd.path org.cups.cupsd.service org.cups.cups-lpd.socket" 37SYSTEMD_SERVICE:${PN} = "cups.socket cups.path cups.service cups-lpd.socket"
41 38
42PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ 39PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
43 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}" 40 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \
44PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" 41 openssl \
42"
43PACKAGECONFIG[avahi] = "--with-dnssd=avahi,--with-dnssd=no,avahi"
45PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" 44PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
45PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls,,,openssl"
46PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl,,,gnutls"
46PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam" 47PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam"
47PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd" 48PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
48PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd" 49PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
50PACKAGECONFIG[webif] = "--enable-webif,--disable-webif"
49 51
50EXTRA_OECONF = " \ 52EXTRA_OECONF = " \
51 --enable-gnutls \
52 --enable-dbus \ 53 --enable-dbus \
54 --with-dbusdir=${sysconfdir}/dbus-1 \
53 --enable-browsing \ 55 --enable-browsing \
54 --disable-gssapi \ 56 --disable-gssapi \
55 --enable-debug \ 57 --enable-debug \
56 --disable-relro \ 58 --disable-relro \
57 --enable-libusb \ 59 --enable-libusb \
58 --with-system-groups=lpadmin \ 60 --with-system-groups=lpadmin,root,sys,wheel \
59 --with-cups-group=lp \ 61 --with-cups-group=lp \
60 --with-domainsocket=/run/cups/cups.sock \ 62 --with-domainsocket=/run/cups/cups.sock \
63 --with-pkgconfpath=${libdir}/pkgconfig \
61 DSOFLAGS='${LDFLAGS}' \ 64 DSOFLAGS='${LDFLAGS}' \
62 " 65 "
63 66
64EXTRA_AUTORECONF += "--exclude=autoheader" 67EXTRA_AUTORECONF += "--exclude=autoheader"
65 68
66do_compile () {
67 echo "all:" > man/Makefile
68 echo "libs:" >> man/Makefile
69 echo "install:" >> man/Makefile
70 echo "install-data:" >> man/Makefile
71 echo "install-exec:" >> man/Makefile
72 echo "install-headers:" >> man/Makefile
73 echo "install-libs:" >> man/Makefile
74
75 oe_runmake
76}
77
78do_install () { 69do_install () {
79 oe_runmake "DSTROOT=${D}" install 70 oe_runmake "BUILDROOT=${D}" install
80 71
81 # Remove /var/run from package as cupsd will populate it on startup 72 # Remove /var/run from package as cupsd will populate it on startup
82 rm -fr ${D}/${localstatedir}/run 73 rm -fr ${D}/${localstatedir}/run
@@ -84,7 +75,7 @@ do_install () {
84 rmdir ${D}/${libexecdir}/${BPN}/driver 75 rmdir ${D}/${libexecdir}/${BPN}/driver
85 76
86 # Fix the pam configuration file permissions 77 # Fix the pam configuration file permissions
87 if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then 78 if ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then
88 chmod 0644 ${D}${sysconfdir}/pam.d/cups 79 chmod 0644 ${D}${sysconfdir}/pam.d/cups
89 fi 80 fi
90 81
@@ -93,36 +84,34 @@ do_install () {
93 rm -rf ${D}${sysconfdir}/init.d/ 84 rm -rf ${D}${sysconfdir}/init.d/
94 rm -rf ${D}${sysconfdir}/rc* 85 rm -rf ${D}${sysconfdir}/rc*
95 install -d ${D}${sysconfdir}/tmpfiles.d 86 install -d ${D}${sysconfdir}/tmpfiles.d
96 install -m 0644 ${WORKDIR}/cups-volatiles.conf \ 87 install -m 0644 ${UNPACKDIR}/cups-volatiles.conf \
97 ${D}${sysconfdir}/tmpfiles.d/cups.conf 88 ${D}${sysconfdir}/tmpfiles.d/cups.conf
98 else 89 else
99 install -d ${D}${sysconfdir}/default/volatiles 90 install -d ${D}${sysconfdir}/default/volatiles
100 install -m 0644 ${WORKDIR}/volatiles.99_cups \ 91 install -m 0644 ${UNPACKDIR}/volatiles.99_cups \
101 ${D}${sysconfdir}/default/volatiles/99_cups 92 ${D}${sysconfdir}/default/volatiles/99_cups
102 fi 93 fi
103} 94}
104 95
105PACKAGES =+ "${PN}-lib ${PN}-libimage" 96PACKAGES =+ "${PN}-lib ${PN}-libimage ${PN}-webif"
106 97
107RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" 98RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
108FILES_${PN} += "${libexecdir}/cups/ \ 99FILES:${PN} += "${libexecdir}/cups/ ${systemd_system_unitdir}/system-cups.slice"
109 "
110 100
111FILES_${PN}-lib = "${libdir}/libcups.so.*" 101FILES:${PN}-lib = "${libdir}/libcups.so.*"
112 102
113FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*" 103FILES:${PN}-libimage = "${libdir}/libcupsimage.so.*"
114 104
115#package the html for the webgui inside the main packages (~1MB uncompressed) 105# put the html for the web interface into its own PACKAGE
106FILES:${PN}-webif += "${datadir}/doc/cups/ ${datadir}/icons/"
107RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'webif', '${PN}-webif', '', d)}"
116 108
117FILES_${PN} += "${datadir}/doc/cups/images \ 109CONFFILES:${PN} += "${sysconfdir}/cups/cupsd.conf"
118 ${datadir}/doc/cups/*html \
119 ${datadir}/doc/cups/*.css \
120 ${datadir}/icons/ \
121 "
122CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"
123 110
124MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config" 111MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config"
125 112
113LOCALE_PATHS += "${datadir}/cups/templates"
114
126SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess" 115SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess"
127cups_sysroot_preprocess () { 116cups_sysroot_preprocess () {
128 sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libexecdir}/cups:' 117 sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libexecdir}/cups:'
diff --git a/meta/recipes-extended/cups/cups/0001-use-echo-only-in-init.patch b/meta/recipes-extended/cups/cups/0001-use-echo-only-in-init.patch
index 80bbad0a44..c0cb7df581 100644
--- a/meta/recipes-extended/cups/cups/0001-use-echo-only-in-init.patch
+++ b/meta/recipes-extended/cups/cups/0001-use-echo-only-in-init.patch
@@ -1,7 +1,7 @@
1From a3f4d8ba97f4669a95943a7e65eb61aa44ce7999 Mon Sep 17 00:00:00 2001 1From c5f943b1ac6e1c86ae64686e29e178fedf933e96 Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com> 2From: Saul Wold <sgw@linux.intel.com>
3Date: Thu, 13 Dec 2012 19:03:52 -0800 3Date: Thu, 13 Dec 2012 19:03:52 -0800
4Subject: [PATCH 1/4] use echo only in init 4Subject: [PATCH] use echo only in init
5 5
6Upstream-Status: Inappropriate [embedded specific] 6Upstream-Status: Inappropriate [embedded specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
@@ -10,10 +10,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10 1 file changed, 1 insertion(+), 1 deletion(-) 10 1 file changed, 1 insertion(+), 1 deletion(-)
11 11
12diff --git a/scheduler/cups.sh.in b/scheduler/cups.sh.in 12diff --git a/scheduler/cups.sh.in b/scheduler/cups.sh.in
13index 89ac36d..6618a0f 100644 13index 74cce18..c57f0db 100644
14--- a/scheduler/cups.sh.in 14--- a/scheduler/cups.sh.in
15+++ b/scheduler/cups.sh.in 15+++ b/scheduler/cups.sh.in
16@@ -50,7 +50,7 @@ case "`uname`" in 16@@ -51,7 +51,7 @@ case "`uname`" in
17 ECHO_ERROR=: 17 ECHO_ERROR=:
18 ;; 18 ;;
19 19
@@ -22,6 +22,3 @@ index 89ac36d..6618a0f 100644
22 IS_ON=/bin/true 22 IS_ON=/bin/true
23 if test -f /etc/init.d/functions; then 23 if test -f /etc/init.d/functions; then
24 . /etc/init.d/functions 24 . /etc/init.d/functions
25--
262.17.1
27
diff --git a/meta/recipes-extended/cups/cups/0002-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups/0002-don-t-try-to-run-generated-binaries.patch
index ea248e4710..cf2f1a6747 100644
--- a/meta/recipes-extended/cups/cups/0002-don-t-try-to-run-generated-binaries.patch
+++ b/meta/recipes-extended/cups/cups/0002-don-t-try-to-run-generated-binaries.patch
@@ -1,21 +1,20 @@
1From 3e9a965dcd65ab2d40b753b6f792a1a4559182aa Mon Sep 17 00:00:00 2001 1From da9a313ae5a2d1da683dd58572df0d7a660eb922 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net> 2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Sun, 30 Jan 2011 16:37:27 +0100 3Date: Sun, 30 Jan 2011 16:37:27 +0100
4Subject: [PATCH 2/4] don't try to run generated binaries 4Subject: [PATCH] don't try to run generated binaries
5 5
6Upstream-Status: Inappropriate [embedded specific] 6Upstream-Status: Inappropriate [embedded specific]
7 7
8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> 8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
9
10--- 9---
11 ppdc/Makefile | 32 ++++++++++++++++---------------- 10 ppdc/Makefile | 4 ++--
12 1 file changed, 16 insertions(+), 16 deletions(-) 11 1 file changed, 2 insertions(+), 2 deletions(-)
13 12
14diff --git a/ppdc/Makefile b/ppdc/Makefile 13diff --git a/ppdc/Makefile b/ppdc/Makefile
15index 32e2e0b..f1478d4 100644 14index e36ed11..3fe97e1 100644
16--- a/ppdc/Makefile 15--- a/ppdc/Makefile
17+++ b/ppdc/Makefile 16+++ b/ppdc/Makefile
18@@ -186,8 +186,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \ 17@@ -187,8 +187,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \
19 $(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o genstrings genstrings.o \ 18 $(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o genstrings genstrings.o \
20 libcupsppdc.a $(LINKCUPSSTATIC) 19 libcupsppdc.a $(LINKCUPSSTATIC)
21 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 20 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
@@ -26,48 +25,3 @@ index 32e2e0b..f1478d4 100644
26 25
27 26
28 # 27 #
29@@ -205,9 +205,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) foo.drv foo-fr.po
30 $(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
31 $(LINKCUPSSTATIC)
32 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
33- echo Testing PPD compiler...
34- ./ppdc-static -l en,fr -I ../data foo.drv
35- ./ppdc-static -l en,fr -z -I ../data foo.drv
36+# echo Testing PPD compiler...
37+# ./ppdc-static -l en,fr -I ../data foo.drv
38+# ./ppdc-static -l en,fr -z -I ../data foo.drv
39
40
41 #
42@@ -235,17 +235,17 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC)
43 $(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
44 $(LINKCUPSSTATIC)
45 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
46- echo Testing PPD importer...
47- $(RM) -r ppd ppd2 sample-import.drv
48- ./ppdc-static -l en -I ../data sample.drv
49- ./ppdi-static -I ../data -o sample-import.drv ppd/*
50- ./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
51- if diff -r ppd ppd2 >/dev/null; then \
52- echo PPD import OK; \
53- else \
54- echo PPD import FAILED; \
55- exit 1; \
56- fi
57+# echo Testing PPD importer...
58+# $(RM) -r ppd ppd2 sample-import.drv
59+# ./ppdc-static -l en -I ../data sample.drv
60+# ./ppdi-static -I ../data -o sample-import.drv ppd/*
61+# ./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
62+# if diff -r ppd ppd2 >/dev/null; then \
63+# echo PPD import OK; \
64+# else \
65+# echo PPD import FAILED; \
66+# exit 1; \
67+# fi
68
69
70 #
71--
722.17.1
73
diff --git a/meta/recipes-extended/cups/cups/0003-cups_1.4.6.bb-Fix-build-on-ppc64.patch b/meta/recipes-extended/cups/cups/0003-cups_1.4.6.bb-Fix-build-on-ppc64.patch
deleted file mode 100644
index b48c7a9ad2..0000000000
--- a/meta/recipes-extended/cups/cups/0003-cups_1.4.6.bb-Fix-build-on-ppc64.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 66c2079ae91389ee0f9d704bf0d2cccd53b2c603 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 22 Jul 2012 16:54:17 -0700
4Subject: [PATCH 3/4] cups_1.4.6.bb: Fix build on ppc64
5
6Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches
7e.g. ppc64 where base libdir is lib64 this does not go well
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10Upstream-Status: Inappropriate [OE config specific]
11
12Update on 20190904:
13Redefine CUPS_SERVERBIN to "$libexecdir/cups" which solves file confliction
14when multilib is enabled.
15
16Signed-off-by: Kai Kang <kai.kang@windriver.com>
17
18---
19 config-scripts/cups-directories.m4 | 2 +-
20 configure | 2 +-
21 2 files changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4
24index b74083a..9a5abb2 100644
25--- a/config-scripts/cups-directories.m4
26+++ b/config-scripts/cups-directories.m4
27@@ -270,7 +270,7 @@ case "$host_os_name" in
28 *)
29 # All others
30 INSTALL_SYSV="install-sysv"
31- CUPS_SERVERBIN="$exec_prefix/lib/cups"
32+ CUPS_SERVERBIN="$libexecdir/cups"
33 ;;
34 esac
35
36diff --git a/configure b/configure
37index d3df145..bc68a6c 100755
38--- a/configure
39+++ b/configure
40@@ -6420,7 +6420,7 @@ case "$host_os_name" in
41 *)
42 # All others
43 INSTALL_SYSV="install-sysv"
44- CUPS_SERVERBIN="$exec_prefix/lib/cups"
45+ CUPS_SERVERBIN="$libexecdir/cups"
46 ;;
47 esac
48
49--
502.17.1
51
diff --git a/meta/recipes-extended/cups/cups/0004-cups-fix-multilib-install-file-conflicts.patch b/meta/recipes-extended/cups/cups/0004-cups-fix-multilib-install-file-conflicts.patch
index bc9260307c..31338822e6 100644
--- a/meta/recipes-extended/cups/cups/0004-cups-fix-multilib-install-file-conflicts.patch
+++ b/meta/recipes-extended/cups/cups/0004-cups-fix-multilib-install-file-conflicts.patch
@@ -1,7 +1,7 @@
1From 7dbda1887aa19ab720aff22312f4caff2d575f62 Mon Sep 17 00:00:00 2001 1From 880bad2c6b08afd2e2e303bc3ceea559edbe76d2 Mon Sep 17 00:00:00 2001
2From: Kai Kang <kai.kang@windriver.com> 2From: Kai Kang <kai.kang@windriver.com>
3Date: Wed, 3 Oct 2018 00:27:11 +0800 3Date: Wed, 3 Oct 2018 00:27:11 +0800
4Subject: [PATCH 4/4] cups: fix multilib install file conflicts 4Subject: [PATCH] cups: fix multilib install file conflicts
5 5
6@CUPS_SERVERBIN@ is ${libdir} related that causes multilib install file 6@CUPS_SERVERBIN@ is ${libdir} related that causes multilib install file
7conflict. Remove @CUPS_SERVERBIN@ from the comment line of cups-files.conf to 7conflict. Remove @CUPS_SERVERBIN@ from the comment line of cups-files.conf to
@@ -10,16 +10,15 @@ avoid the conflict.
10Upstream-Status: Inappropriate [OE specific] 10Upstream-Status: Inappropriate [OE specific]
11 11
12Signed-off-by: Kai Kang <kai.kang@windriver.com> 12Signed-off-by: Kai Kang <kai.kang@windriver.com>
13
14--- 13---
15 conf/cups-files.conf.in | 2 +- 14 conf/cups-files.conf.in | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
17 16
18diff --git a/conf/cups-files.conf.in b/conf/cups-files.conf.in 17diff --git a/conf/cups-files.conf.in b/conf/cups-files.conf.in
19index 4a78ba6..03c6582 100644 18index f96f745..27d8be9 100644
20--- a/conf/cups-files.conf.in 19--- a/conf/cups-files.conf.in
21+++ b/conf/cups-files.conf.in 20+++ b/conf/cups-files.conf.in
22@@ -73,7 +73,7 @@ PageLog @CUPS_LOGDIR@/page_log 21@@ -70,7 +70,7 @@ PageLog @CUPS_LOGDIR@/page_log
23 #RequestRoot @CUPS_REQUESTS@ 22 #RequestRoot @CUPS_REQUESTS@
24 23
25 # Location of helper programs... 24 # Location of helper programs...
@@ -28,6 +27,3 @@ index 4a78ba6..03c6582 100644
28 27
29 # SSL/TLS keychain for the scheduler... 28 # SSL/TLS keychain for the scheduler...
30 #ServerKeychain @CUPS_SERVERKEYCHAIN@ 29 #ServerKeychain @CUPS_SERVERKEYCHAIN@
31--
322.17.1
33
diff --git a/meta/recipes-extended/cups/cups/CVE-2020-10001.patch b/meta/recipes-extended/cups/cups/CVE-2020-10001.patch
deleted file mode 100644
index 09a0a5765d..0000000000
--- a/meta/recipes-extended/cups/cups/CVE-2020-10001.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From efbea1742bd30f842fbbfb87a473e5c84f4162f9 Mon Sep 17 00:00:00 2001
2From: Michael R Sweet <msweet@msweet.org>
3Date: Mon, 1 Feb 2021 15:02:32 -0500
4Subject: [PATCH] Fix a buffer (read) overflow in ippReadIO (CVE-2020-10001)
5
6Upstream-Status: Backport
7CVE: CVE-2020-10001
8
9Reference to upstream patch:
10[https://github.com/OpenPrinting/cups/commit/efbea1742bd30f842fbbfb87a473e5c84f4162f9]
11
12[SG: Addapted for version 2.3.3]
13Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
14---
15 CHANGES.md | 2 ++
16 cups/ipp.c | 8 +++++---
17 2 files changed, 7 insertions(+), 3 deletions(-)
18
19diff --git a/CHANGES.md b/CHANGES.md
20index df72892..5ca12da 100644
21--- a/CHANGES.md
22+++ b/CHANGES.md
23@@ -4,6 +4,8 @@ CHANGES - 2.3.3 - 2020-04-24
24 Changes in CUPS v2.3.3
25 ----------------------
26
27+- Security: Fixed a buffer (read) overflow in the `ippReadIO` function
28+ (CVE-2020-10001)
29 - CVE-2020-3898: The `ppdOpen` function did not handle invalid UI
30 constraint. `ppdcSource::get_resolution` function did not handle
31 invalid resolution strings.
32diff --git a/cups/ipp.c b/cups/ipp.c
33index 3d52934..adbb26f 100644
34--- a/cups/ipp.c
35+++ b/cups/ipp.c
36@@ -2866,7 +2866,8 @@ ippReadIO(void *src, /* I - Data source */
37 unsigned char *buffer, /* Data buffer */
38 string[IPP_MAX_TEXT],
39 /* Small string buffer */
40- *bufptr; /* Pointer into buffer */
41+ *bufptr, /* Pointer into buffer */
42+ *bufend; /* End of buffer */
43 ipp_attribute_t *attr; /* Current attribute */
44 ipp_tag_t tag; /* Current tag */
45 ipp_tag_t value_tag; /* Current value tag */
46@@ -3441,6 +3442,7 @@ ippReadIO(void *src, /* I - Data source */
47 }
48
49 bufptr = buffer;
50+ bufend = buffer + n;
51
52 /*
53 * text-with-language and name-with-language are composite
54@@ -3454,7 +3456,7 @@ ippReadIO(void *src, /* I - Data source */
55
56 n = (bufptr[0] << 8) | bufptr[1];
57
58- if ((bufptr + 2 + n) >= (buffer + IPP_BUF_SIZE) || n >= (int)sizeof(string))
59+ if ((bufptr + 2 + n + 2) > bufend || n >= (int)sizeof(string))
60 {
61 _cupsSetError(IPP_STATUS_ERROR_INTERNAL,
62 _("IPP language length overflows value."), 1);
63@@ -3481,7 +3483,7 @@ ippReadIO(void *src, /* I - Data source */
64 bufptr += 2 + n;
65 n = (bufptr[0] << 8) | bufptr[1];
66
67- if ((bufptr + 2 + n) >= (buffer + IPP_BUF_SIZE))
68+ if ((bufptr + 2 + n) > bufend)
69 {
70 _cupsSetError(IPP_STATUS_ERROR_INTERNAL,
71 _("IPP string length overflows value."), 1);
72--
732.17.1
74
diff --git a/meta/recipes-extended/cups/cups/libexecdir.patch b/meta/recipes-extended/cups/cups/libexecdir.patch
new file mode 100644
index 0000000000..493c7970ea
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/libexecdir.patch
@@ -0,0 +1,34 @@
1From 4ae7ad87aa022f5128be222dffbf0c50ec6e846e Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Tue, 13 Jul 2021 12:56:30 +0100
4Subject: [PATCH] Use $libexecdir instead of hardcoding $prefix/lib as this
5 breaks multilib builds.
6
7Upstream-Status: Pending
8Signed-off-by: Ross Burton <ross.burton@arm.com>
9---
10 config-scripts/cups-directories.m4 | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4
14index 069ee7b..2f67e5b 100644
15--- a/config-scripts/cups-directories.m4
16+++ b/config-scripts/cups-directories.m4
17@@ -239,7 +239,7 @@ AC_SUBST([CUPS_REQUESTS])
18 AS_CASE(["$host_os_name"], [*-gnu], [
19 # GNUs
20 INSTALL_SYSV="install-sysv"
21- CUPS_SERVERBIN="$exec_prefix/lib/cups"
22+ CUPS_SERVERBIN="$libexecdir/cups"
23 ], [*bsd* | darwin*], [
24 # *BSD and Darwin (macOS)
25 INSTALL_SYSV=""
26@@ -247,7 +247,7 @@ AS_CASE(["$host_os_name"], [*-gnu], [
27 ], [*], [
28 # All others
29 INSTALL_SYSV="install-sysv"
30- CUPS_SERVERBIN="$exec_prefix/lib/cups"
31+ CUPS_SERVERBIN="$libexecdir/cups"
32 ])
33
34 AC_DEFINE_UNQUOTED([CUPS_SERVERBIN], ["$CUPS_SERVERBIN"], [Location of server programs.])
diff --git a/meta/recipes-extended/cups/cups_2.3.3.bb b/meta/recipes-extended/cups/cups_2.3.3.bb
deleted file mode 100644
index 5caeb6f58b..0000000000
--- a/meta/recipes-extended/cups/cups_2.3.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1require cups.inc
2
3LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
4
5SRC_URI[md5sum] = "412434ceefbdf3ec71bc9188a035f589"
6SRC_URI[sha256sum] = "261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee"
diff --git a/meta/recipes-extended/cups/cups_2.4.12.bb b/meta/recipes-extended/cups/cups_2.4.12.bb
new file mode 100644
index 0000000000..ac73c2780f
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_2.4.12.bb
@@ -0,0 +1,5 @@
1require cups.inc
2
3LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
4
5SRC_URI[sha256sum] = "b1dde191a4ae2760c47220c82ca6155a28c382701e6c1a0159d1054990231d59"