diff options
author | Ross Burton <ross@burtonini.com> | 2021-07-13 12:56:30 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-19 13:34:26 +0100 |
commit | 494e73fbc9b974d23f70572cfe780b4b7030189a (patch) | |
tree | 8b59bbb67e146ac2c10683d43b05c2dbb3111a33 /meta | |
parent | 28d3fe177c913eaba68d6172598eced98576f005 (diff) | |
download | poky-494e73fbc9b974d23f70572cfe780b4b7030189a.tar.gz |
cups: update to 2.3.3op2
Apple are no longer maintaining CUPS, and future development is now
happening under the OpenPrinting project:
https://ftp.pwg.org/pub/pwg/liaison/openprinting/presentations/cups-plenary-may-2021.pdf
Also stop disabling the manpage installation as manpages are useful, and
remove some patch chunks that are not required.
The CVE-2020-10001 patch is dropped as this is incorporated into 2.3.3op2.
(From OE-Core rev: 53bd9a96a003a7103b8475f9c1ad7ef999e34f87)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
7 files changed, 39 insertions, 194 deletions
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc index be5a11c944..df23825466 100644 --- a/meta/recipes-extended/cups/cups.inc +++ b/meta/recipes-extended/cups/cups.inc | |||
@@ -8,18 +8,17 @@ SECTION = "console/utils" | |||
8 | LICENSE = "Apache-2.0" | 8 | LICENSE = "Apache-2.0" |
9 | DEPENDS = "libpng jpeg dbus zlib libusb1" | 9 | DEPENDS = "libpng jpeg dbus zlib libusb1" |
10 | 10 | ||
11 | SRC_URI = "https://github.com/apple/cups/releases/download/v${PV}/${BP}-source.tar.gz \ | 11 | SRC_URI = "https://github.com/OpenPrinting/cups/releases/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 | ||
21 | UPSTREAM_CHECK_URI = "https://github.com/apple/cups/releases" | 20 | UPSTREAM_CHECK_URI = "https://github.com/OpenPrinting/cups/releases" |
22 | UPSTREAM_CHECK_REGEX = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar" | 21 | UPSTREAM_CHECK_REGEX = "cups-(?P<pver>.+)-source.tar" |
23 | 22 | ||
24 | # Issue only applies to MacOS | 23 | # Issue only applies to MacOS |
25 | CVE_CHECK_WHITELIST += "CVE-2008-1033" | 24 | CVE_CHECK_WHITELIST += "CVE-2008-1033" |
@@ -37,7 +36,7 @@ inherit autotools-brokensep binconfig useradd systemd pkgconfig multilib_script | |||
37 | USERADD_PACKAGES = "${PN}" | 36 | USERADD_PACKAGES = "${PN}" |
38 | GROUPADD_PARAM_${PN} = "--system lpadmin" | 37 | GROUPADD_PARAM_${PN} = "--system lpadmin" |
39 | 38 | ||
40 | SYSTEMD_SERVICE_${PN} = "org.cups.cupsd.socket org.cups.cupsd.path org.cups.cupsd.service org.cups.cups-lpd.socket" | 39 | SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service cups-lpd.socket" |
41 | 40 | ||
42 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ | 41 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ |
43 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}" | 42 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}" |
@@ -63,20 +62,8 @@ EXTRA_OECONF = " \ | |||
63 | 62 | ||
64 | EXTRA_AUTORECONF += "--exclude=autoheader" | 63 | EXTRA_AUTORECONF += "--exclude=autoheader" |
65 | 64 | ||
66 | do_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 | |||
78 | do_install () { | 65 | do_install () { |
79 | oe_runmake "DSTROOT=${D}" install | 66 | oe_runmake "DESTDIR=${D}" install |
80 | 67 | ||
81 | # Remove /var/run from package as cupsd will populate it on startup | 68 | # Remove /var/run from package as cupsd will populate it on startup |
82 | rm -fr ${D}/${localstatedir}/run | 69 | rm -fr ${D}/${localstatedir}/run |
@@ -105,8 +92,7 @@ do_install () { | |||
105 | PACKAGES =+ "${PN}-lib ${PN}-libimage" | 92 | PACKAGES =+ "${PN}-lib ${PN}-libimage" |
106 | 93 | ||
107 | RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" | 94 | RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" |
108 | FILES_${PN} += "${libexecdir}/cups/ \ | 95 | FILES_${PN} += "${libexecdir}/cups/" |
109 | " | ||
110 | 96 | ||
111 | FILES_${PN}-lib = "${libdir}/libcups.so.*" | 97 | FILES_${PN}-lib = "${libdir}/libcups.so.*" |
112 | 98 | ||
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..2bc26edbfc 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 | |||
@@ -26,48 +26,6 @@ index 32e2e0b..f1478d4 100644 | |||
26 | 26 | ||
27 | 27 | ||
28 | # | 28 | # |
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 | -- | 29 | -- |
72 | 2.17.1 | 30 | 2.17.1 |
73 | 31 | ||
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 @@ | |||
1 | From 66c2079ae91389ee0f9d704bf0d2cccd53b2c603 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 22 Jul 2012 16:54:17 -0700 | ||
4 | Subject: [PATCH 3/4] cups_1.4.6.bb: Fix build on ppc64 | ||
5 | |||
6 | Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches | ||
7 | e.g. ppc64 where base libdir is lib64 this does not go well | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | Upstream-Status: Inappropriate [OE config specific] | ||
11 | |||
12 | Update on 20190904: | ||
13 | Redefine CUPS_SERVERBIN to "$libexecdir/cups" which solves file confliction | ||
14 | when multilib is enabled. | ||
15 | |||
16 | Signed-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 | |||
23 | diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4 | ||
24 | index 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 | |||
36 | diff --git a/configure b/configure | ||
37 | index 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 | -- | ||
50 | 2.17.1 | ||
51 | |||
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 @@ | |||
1 | From efbea1742bd30f842fbbfb87a473e5c84f4162f9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael R Sweet <msweet@msweet.org> | ||
3 | Date: Mon, 1 Feb 2021 15:02:32 -0500 | ||
4 | Subject: [PATCH] Fix a buffer (read) overflow in ippReadIO (CVE-2020-10001) | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | CVE: CVE-2020-10001 | ||
8 | |||
9 | Reference to upstream patch: | ||
10 | [https://github.com/OpenPrinting/cups/commit/efbea1742bd30f842fbbfb87a473e5c84f4162f9] | ||
11 | |||
12 | [SG: Addapted for version 2.3.3] | ||
13 | Signed-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 | |||
19 | diff --git a/CHANGES.md b/CHANGES.md | ||
20 | index 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. | ||
32 | diff --git a/cups/ipp.c b/cups/ipp.c | ||
33 | index 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 | -- | ||
73 | 2.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..2e15841b0d --- /dev/null +++ b/meta/recipes-extended/cups/cups/libexecdir.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Use $libexecdir instead of hardcoding $prefix/lib as this breaks multilib builds. | ||
2 | |||
3 | Upstream-Status: Inappropriate | ||
4 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
5 | |||
6 | diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4 | ||
7 | index 1430af3a6..6efedc604 100644 | ||
8 | --- a/config-scripts/cups-directories.m4 | ||
9 | +++ b/config-scripts/cups-directories.m4 | ||
10 | @@ -265,7 +265,7 @@ case "$host_os_name" in | ||
11 | *-gnu) | ||
12 | # GNUs | ||
13 | INSTALL_SYSV="install-sysv" | ||
14 | - CUPS_SERVERBIN="$exec_prefix/lib/cups" | ||
15 | + CUPS_SERVERBIN="$libexecdir/cups" | ||
16 | ;; | ||
17 | *bsd* | darwin*) | ||
18 | # *BSD and Darwin (macOS) | ||
19 | @@ -275,7 +275,7 @@ case "$host_os_name" in | ||
20 | *) | ||
21 | # All others | ||
22 | INSTALL_SYSV="install-sysv" | ||
23 | - CUPS_SERVERBIN="$exec_prefix/lib/cups" | ||
24 | + CUPS_SERVERBIN="$libexecdir/cups" | ||
25 | ;; | ||
26 | esac | ||
27 | \ No newline at end of file | ||
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 @@ | |||
1 | require cups.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
4 | |||
5 | SRC_URI[md5sum] = "412434ceefbdf3ec71bc9188a035f589" | ||
6 | SRC_URI[sha256sum] = "261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee" | ||
diff --git a/meta/recipes-extended/cups/cups_2.3.3op2.bb b/meta/recipes-extended/cups/cups_2.3.3op2.bb new file mode 100644 index 0000000000..fc2aa702f5 --- /dev/null +++ b/meta/recipes-extended/cups/cups_2.3.3op2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require cups.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
4 | |||
5 | SRC_URI[sha256sum] = "deb3575bbe79c0ae963402787f265bfcf8d804a71fc2c94318a74efec86f96df" | ||