Initial commit
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
SUMMARY = "An Internet printing system for Unix"
|
||||
DESCRIPTION = "The Common UNIX Printing System is a printing system and \
|
||||
general replacement for lpd and the like. It supports the Internet Printing \
|
||||
Protocol (IPP), and has its own filtering driver model for handling various \
|
||||
document types."
|
||||
HOMEPAGE = "https://www.cups.org/"
|
||||
SECTION = "console/utils"
|
||||
LICENSE = "Apache-2.0"
|
||||
DEPENDS = "libpng jpeg dbus zlib libusb1"
|
||||
|
||||
SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \
|
||||
file://0001-use-echo-only-in-init.patch \
|
||||
file://0002-don-t-try-to-run-generated-binaries.patch \
|
||||
file://libexecdir.patch \
|
||||
file://0004-cups-fix-multilib-install-file-conflicts.patch \
|
||||
file://volatiles.99_cups \
|
||||
file://cups-volatiles.conf \
|
||||
"
|
||||
|
||||
GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases"
|
||||
|
||||
CVE_STATUS[CVE-2008-1033] = "not-applicable-platform: Issue only applies to MacOS"
|
||||
CVE_STATUS[CVE-2009-0032] = "cpe-incorrect: Issue affects pdfdistiller plugin used with but not part of cups"
|
||||
CVE_STATUS[CVE-2018-6553] = "not-applicable-platform: This is an Ubuntu only issue"
|
||||
CVE_STATUS[CVE-2022-26691] = "fixed-version: This is fixed in 2.4.2 but the cve-check class still reports it"
|
||||
CVE_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."
|
||||
|
||||
LEAD_SONAME = "libcupsdriver.so"
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
|
||||
inherit autotools-brokensep binconfig useradd systemd pkgconfig multilib_script github-releases
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
GROUPADD_PARAM:${PN} = "--system lpadmin"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "cups.socket cups.path cups.service cups-lpd.socket"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}"
|
||||
PACKAGECONFIG[avahi] = "--with-dnssd=avahi,--with-dnssd=no,avahi"
|
||||
PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
|
||||
PACKAGECONFIG[gnutls] = "--with-tls=gnutls,--with-tls=no,gnutls"
|
||||
PACKAGECONFIG[pam] = "--enable-pam --with-pam-module=unix, --disable-pam, libpam"
|
||||
PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
|
||||
PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
|
||||
PACKAGECONFIG[webif] = "--enable-webif,--disable-webif"
|
||||
|
||||
EXTRA_OECONF = " \
|
||||
--enable-dbus \
|
||||
--with-dbusdir=${sysconfdir}/dbus-1 \
|
||||
--enable-browsing \
|
||||
--disable-gssapi \
|
||||
--enable-debug \
|
||||
--disable-relro \
|
||||
--enable-libusb \
|
||||
--with-system-groups=lpadmin \
|
||||
--with-cups-group=lp \
|
||||
--with-domainsocket=/run/cups/cups.sock \
|
||||
--with-pkgconfpath=${libdir}/pkgconfig \
|
||||
DSOFLAGS='${LDFLAGS}' \
|
||||
"
|
||||
|
||||
EXTRA_AUTORECONF += "--exclude=autoheader"
|
||||
|
||||
do_install () {
|
||||
oe_runmake "BUILDROOT=${D}" install
|
||||
|
||||
# Remove /var/run from package as cupsd will populate it on startup
|
||||
rm -fr ${D}/${localstatedir}/run
|
||||
rm -fr ${D}/${localstatedir}/log
|
||||
rmdir ${D}/${libexecdir}/${BPN}/driver
|
||||
|
||||
# Fix the pam configuration file permissions
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then
|
||||
chmod 0644 ${D}${sysconfdir}/pam.d/cups
|
||||
fi
|
||||
|
||||
# Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
|
||||
rm -rf ${D}${sysconfdir}/init.d/
|
||||
rm -rf ${D}${sysconfdir}/rc*
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
||||
install -m 0644 ${WORKDIR}/cups-volatiles.conf \
|
||||
${D}${sysconfdir}/tmpfiles.d/cups.conf
|
||||
else
|
||||
install -d ${D}${sysconfdir}/default/volatiles
|
||||
install -m 0644 ${WORKDIR}/volatiles.99_cups \
|
||||
${D}${sysconfdir}/default/volatiles/99_cups
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-lib ${PN}-libimage ${PN}-webif"
|
||||
|
||||
RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
|
||||
FILES:${PN} += "${libexecdir}/cups/"
|
||||
|
||||
FILES:${PN}-lib = "${libdir}/libcups.so.*"
|
||||
|
||||
FILES:${PN}-libimage = "${libdir}/libcupsimage.so.*"
|
||||
|
||||
# put the html for the web interface into its own PACKAGE
|
||||
FILES:${PN}-webif += "${datadir}/doc/cups/ ${datadir}/icons/"
|
||||
RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'webif', '${PN}-webif', '', d)}"
|
||||
|
||||
CONFFILES:${PN} += "${sysconfdir}/cups/cupsd.conf"
|
||||
|
||||
MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config"
|
||||
|
||||
SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess"
|
||||
cups_sysroot_preprocess () {
|
||||
sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libexecdir}/cups:'
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
From a3f4d8ba97f4669a95943a7e65eb61aa44ce7999 Mon Sep 17 00:00:00 2001
|
||||
From: Saul Wold <sgw@linux.intel.com>
|
||||
Date: Thu, 13 Dec 2012 19:03:52 -0800
|
||||
Subject: [PATCH 1/4] use echo only in init
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
scheduler/cups.sh.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scheduler/cups.sh.in b/scheduler/cups.sh.in
|
||||
index 89ac36d..6618a0f 100644
|
||||
--- a/scheduler/cups.sh.in
|
||||
+++ b/scheduler/cups.sh.in
|
||||
@@ -50,7 +50,7 @@ case "`uname`" in
|
||||
ECHO_ERROR=:
|
||||
;;
|
||||
|
||||
- Linux*)
|
||||
+ DisableLinux*)
|
||||
IS_ON=/bin/true
|
||||
if test -f /etc/init.d/functions; then
|
||||
. /etc/init.d/functions
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 3e9a965dcd65ab2d40b753b6f792a1a4559182aa Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Sun, 30 Jan 2011 16:37:27 +0100
|
||||
Subject: [PATCH 2/4] don't try to run generated binaries
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
|
||||
---
|
||||
ppdc/Makefile | 32 ++++++++++++++++----------------
|
||||
1 file changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/ppdc/Makefile b/ppdc/Makefile
|
||||
index 32e2e0b..f1478d4 100644
|
||||
--- a/ppdc/Makefile
|
||||
+++ b/ppdc/Makefile
|
||||
@@ -186,8 +186,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \
|
||||
$(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o genstrings genstrings.o \
|
||||
libcupsppdc.a $(LINKCUPSSTATIC)
|
||||
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
|
||||
- echo Generating localization strings...
|
||||
- ./genstrings >sample.c
|
||||
+# echo Generating localization strings...
|
||||
+# ./genstrings >sample.c
|
||||
|
||||
|
||||
#
|
||||
--
|
||||
2.17.1
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
From 7dbda1887aa19ab720aff22312f4caff2d575f62 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Kang <kai.kang@windriver.com>
|
||||
Date: Wed, 3 Oct 2018 00:27:11 +0800
|
||||
Subject: [PATCH 4/4] cups: fix multilib install file conflicts
|
||||
|
||||
@CUPS_SERVERBIN@ is ${libdir} related that causes multilib install file
|
||||
conflict. Remove @CUPS_SERVERBIN@ from the comment line of cups-files.conf to
|
||||
avoid the conflict.
|
||||
|
||||
Upstream-Status: Inappropriate [OE specific]
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
|
||||
---
|
||||
conf/cups-files.conf.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/conf/cups-files.conf.in b/conf/cups-files.conf.in
|
||||
index 4a78ba6..03c6582 100644
|
||||
--- a/conf/cups-files.conf.in
|
||||
+++ b/conf/cups-files.conf.in
|
||||
@@ -73,7 +73,7 @@ PageLog @CUPS_LOGDIR@/page_log
|
||||
#RequestRoot @CUPS_REQUESTS@
|
||||
|
||||
# Location of helper programs...
|
||||
-#ServerBin @CUPS_SERVERBIN@
|
||||
+#ServerBin
|
||||
|
||||
# SSL/TLS keychain for the scheduler...
|
||||
#ServerKeychain @CUPS_SERVERKEYCHAIN@
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
d /var/log/cups 0755 root root -
|
||||
@@ -0,0 +1,35 @@
|
||||
From 1724f7bcdbcfdb445778f8a2e530c5c094c18c10 Mon Sep 17 00:00:00 2001
|
||||
From: Ross Burton <ross.burton@arm.com>
|
||||
Date: Tue, 13 Jul 2021 12:56:30 +0100
|
||||
Subject: [PATCH] Use $libexecdir instead of hardcoding $prefix/lib as this
|
||||
breaks multilib builds.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
---
|
||||
config-scripts/cups-directories.m4 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4
|
||||
index 2033d47..230166e 100644
|
||||
--- a/config-scripts/cups-directories.m4
|
||||
+++ b/config-scripts/cups-directories.m4
|
||||
@@ -239,7 +239,7 @@ AC_SUBST([CUPS_REQUESTS])
|
||||
AS_CASE(["$host_os_name"], [*-gnu], [
|
||||
# GNUs
|
||||
INSTALL_SYSV="install-sysv"
|
||||
- CUPS_SERVERBIN="$exec_prefix/lib/cups"
|
||||
+ CUPS_SERVERBIN="$libexecdir/cups"
|
||||
], [*bsd* | darwin*], [
|
||||
# *BSD and Darwin (macOS)
|
||||
INSTALL_SYSV=""
|
||||
@@ -247,7 +247,7 @@ AS_CASE(["$host_os_name"], [*-gnu], [
|
||||
], [*], [
|
||||
# All others
|
||||
INSTALL_SYSV="install-sysv"
|
||||
- CUPS_SERVERBIN="$exec_prefix/lib/cups"
|
||||
+ CUPS_SERVERBIN="$libexecdir/cups"
|
||||
])
|
||||
|
||||
AC_DEFINE_UNQUOTED([CUPS_SERVERBIN], ["$CUPS_SERVERBIN"], [Location of server programs.])
|
||||
@@ -0,0 +1,2 @@
|
||||
# <type> <owner> <group> <mode> <path> <linksource>
|
||||
d root root 0755 /var/log/cups none
|
||||
@@ -0,0 +1,5 @@
|
||||
require cups.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
|
||||
|
||||
SRC_URI[sha256sum] = "58e970cf1955e1cc87d0847c32526d9c2ccee335e5f0e3882b283138ba0e7262"
|
||||
Reference in New Issue
Block a user