From patchwork Wed Mar 8 22:44:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 20611 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFB1CC6FD19 for ; Wed, 8 Mar 2023 22:44:49 +0000 (UTC) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) by mx.groups.io with SMTP id smtpd.web11.7760.1678315488812024261 for ; Wed, 08 Mar 2023 14:44:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=R3nkwDUG; spf=pass (domain: gmail.com, ip: 209.85.219.51, mailfrom: twoerner@gmail.com) Received: by mail-qv1-f51.google.com with SMTP id y3so262150qvn.4 for ; Wed, 08 Mar 2023 14:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678315487; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ZIuq7klKMIM/+kjbeU/mNJQDn4f/ByXOdbEsV66ScnY=; b=R3nkwDUGvGok9ot+v9G0pOczxlfWP0JSQUt+iOt48AltOBmlSgWE1+pjeWGN/mdX6G hyntjyXmwjbw69pv2Q5HmC/98srgIP3RnME5dygQPm2XMlfWjuK/7k5v4Ma6NG44vJcQ SR5DbzyXWa2+KhXsbpX6tGNYTt23DrNAGmvB3LsYsqhSoqtfhfGier1e+RDdERqQuili 0Gn9uIBcbrQhq1kTF2mczWkYhhJ02teMeuy3bLyTwDLDwhFdQXQ9ubQc7rTQjg4jd9hK ZQ6eu422Secg3GqQCvBYWMvkQkxipdT5b+p9wR1hb1Xu3v80MpDpVtInSlHFh+8zO5lZ 4n4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678315487; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZIuq7klKMIM/+kjbeU/mNJQDn4f/ByXOdbEsV66ScnY=; b=5tiothXpCdbQ+QdHgfA5Lu8ZouGPupqlPcQuT/Iet8Kzp0ZPcHobNeNh8XbShWNl3u avgSmKLcEZpPWp1rf3SjXxRSY+Ud0uK50vd7l7YYKQHW1T5lmwJS3ASoT65veD7wDn57 7WOoLfYxZPBCQHWpl1lGAbVQ7SiordzwaP+WQNhuh3vFpJMX2PZbYJpjz+U0VoYgTZj9 syj0ySI3RAnajsrVroMd4zaw84TBi31mmxDZ9ZEEZD+Vqri0BfFHePjhm/3TSMTQLwJc 81BkjM9ncLs0RJLkErjB0PcFOdvhf+37PTHBEX72yNjQmyMQWHvbrCQ8TfYHIAKaK2X2 7D3Q== X-Gm-Message-State: AO0yUKXSrF0dw2CDYBQuzMj1vEHcSdgx3DWkam4fdgHyNTuBeIxWejQK q0b7NGa9srYtT9G3wOT8Ht6sS1S3AD4= X-Google-Smtp-Source: AK7set/GOmX2LDdaPM5qY6soa2TjZO22hNktMciPA37x289nK5RLjJTmiw0hSHDEf8tkuyNceU2IHw== X-Received: by 2002:ad4:5968:0:b0:59b:922c:eb64 with SMTP id eq8-20020ad45968000000b0059b922ceb64mr794245qvb.43.1678315487217; Wed, 08 Mar 2023 14:44:47 -0800 (PST) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id dt17-20020a05620a479100b00742f250ebc0sm12228087qkb.9.2023.03.08.14.44.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 14:44:46 -0800 (PST) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/3] cups: use BUILDROOT instead of DESTDIR Date: Wed, 8 Mar 2023 17:44:40 -0500 Message-Id: <20230308224442.33516-1-twoerner@gmail.com> X-Mailer: git-send-email 2.36.0.rc2.17.g4027e30c53 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 08 Mar 2023 22:44:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178202 The cups documentation is clear that the correct way to install into an alternate root directory is to use the BUILDROOT variable. From INSTALL.md: Use the `BUILDROOT` variable to install to an alternate root directory: make BUILDROOT=/some/other/root/directory install DESTDIR works, but we should use the mechanism the project specifically created for this purpose. Signed-off-by: Trevor Woerner --- meta/recipes-extended/cups/cups.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc index 9c920bb133ff..b8b655a4fb85 100644 --- a/meta/recipes-extended/cups/cups.inc +++ b/meta/recipes-extended/cups/cups.inc @@ -66,7 +66,7 @@ EXTRA_OECONF = " \ EXTRA_AUTORECONF += "--exclude=autoheader" do_install () { - oe_runmake "DESTDIR=${D}" install + oe_runmake "BUILDROOT=${D}" install # Remove /var/run from package as cupsd will populate it on startup rm -fr ${D}/${localstatedir}/run From patchwork Wed Mar 8 22:44:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 20610 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE4E6C678D5 for ; Wed, 8 Mar 2023 22:44:49 +0000 (UTC) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by mx.groups.io with SMTP id smtpd.web10.7768.1678315489081472175 for ; Wed, 08 Mar 2023 14:44:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=e9x8Maa0; spf=pass (domain: gmail.com, ip: 209.85.160.176, mailfrom: twoerner@gmail.com) Received: by mail-qt1-f176.google.com with SMTP id c3so106187qtc.8 for ; Wed, 08 Mar 2023 14:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678315488; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PAQhR9Cr2hJL1ZcyUkwaIdmGMuQpVBRcuNKSRVJJ/xg=; b=e9x8Maa0l2KUi36yVuhlDfP5tEhXY31QOHwec0CHmjrtIkpVGgZ9JRaWeMopdQ1kQz 14phwAXWAAufawWvsYkFj+XSfouXuifR74wWtwga6z/zN5Fa9GqX4dWux2Zr6ILfLgSP b4kq1fnabeR8wdCqDcaIxi2l6njtZ+bZH1eyRTqeJUEJe69Y8AbSc1ArrvpuNGfPXd4S HHHYpkhuKSMtowsJvihRHFavsX6sAlSHy112vCbTyrqY7DNL7TuRQVd/E546SjUtSBhT 9w51822L3AK2TfAXftNQg8f0i4kI+FNB4YXM1/gpmxjiHharr7R1Phz7lQ3k9+xVx6fj BQpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678315488; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PAQhR9Cr2hJL1ZcyUkwaIdmGMuQpVBRcuNKSRVJJ/xg=; b=UawwwMTtGCWSyZ0yQqwY1PIRZJygfRF0JddPUcy3O98GfADlMO+uCdmoRu3Lxk9p0J ksZzqp1ARYZ+v6KVmlZqULvDqffZUayAbiQVdmR/xHXoCyeI4Xd1sCVAEO4bAmqSN4de UB6WNq5g+XKiFGG66A2a1BL2a/OD8/JIlgBRhNMXVcQ9Lx9aAhAFnp7CT4tIdBmuyo/k GAYUVj69kA9P0DcHCWlDNCZKB60gpJNENJCE9dKGXOeMJ5kqfGIdI/95T1PFh19WofUm fUed55YB7tits1ygIGc9U59sqoTG3gp1kYZX75ztDWw/ePQNFtJZlzf4FPBulNccLh33 T/5g== X-Gm-Message-State: AO0yUKVJucgsZVzodgI/I6QhWGoauQu2LTlwRDBCD6N+SuCNMBEWWe1h 1j03O11jn1HvVB78PAOZ229Ggiu8Yh4= X-Google-Smtp-Source: AK7set940ETtNiMxK0hPj3eP2eDSR2FZ41LWpvKENHA/FcKI/eVu80LKZ68RTZVveT4YOBnO08Yudw== X-Received: by 2002:ac8:5d88:0:b0:3bf:cc89:9c8f with SMTP id d8-20020ac85d88000000b003bfcc899c8fmr33196535qtx.68.1678315487962; Wed, 08 Mar 2023 14:44:47 -0800 (PST) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id dt17-20020a05620a479100b00742f250ebc0sm12228087qkb.9.2023.03.08.14.44.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 14:44:47 -0800 (PST) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/3] cups: check PACKAGECONFIG for pam feature Date: Wed, 8 Mar 2023 17:44:41 -0500 Message-Id: <20230308224442.33516-2-twoerner@gmail.com> X-Mailer: git-send-email 2.36.0.rc2.17.g4027e30c53 In-Reply-To: <20230308224442.33516-1-twoerner@gmail.com> References: <20230308224442.33516-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 08 Mar 2023 22:44:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178203 The cups' PACKAGECONFIG is populated based on DISTRO_FEATURES, but a user is free to enable or disable PACKAGECONFIGs at will. In theory it is possible that pam is enabled globally in DISTRO_FEATURES but disabled in cups' PACKAGECONFIG. Checking the PACKAGECONFIG to determine whether or not pam is enabled would be a safer check rather than relying on DISTRO_FEATURES. Signed-off-by: Trevor Woerner --- meta/recipes-extended/cups/cups.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc index b8b655a4fb85..1b522d7d8535 100644 --- a/meta/recipes-extended/cups/cups.inc +++ b/meta/recipes-extended/cups/cups.inc @@ -74,7 +74,7 @@ do_install () { rmdir ${D}/${libexecdir}/${BPN}/driver # Fix the pam configuration file permissions - if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then + if ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then chmod 0644 ${D}${sysconfdir}/pam.d/cups fi From patchwork Wed Mar 8 22:44:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 20612 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF8A0C678D5 for ; Wed, 8 Mar 2023 22:44:59 +0000 (UTC) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by mx.groups.io with SMTP id smtpd.web10.7771.1678315490180098487 for ; Wed, 08 Mar 2023 14:44:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bBrVNSjI; spf=pass (domain: gmail.com, ip: 209.85.160.178, mailfrom: twoerner@gmail.com) Received: by mail-qt1-f178.google.com with SMTP id r16so100764qtx.9 for ; Wed, 08 Mar 2023 14:44:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678315489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=YI9LQvXniCVpyAOn2y2qWGoj+t670mySCnKNo6CECJ8=; b=bBrVNSjI5uNKPbXG2ziEuW/g148oBID3FZ7r5H1XOspVoShkEEE1k0xLl7Ydr6q5p6 dPHqtFlyihTvQyUxxoGobtJrzvPVuaI3os+BAsl8qm2t4DO0OtATEsxIU32O7IguxRCC ex70fCfYusvHuI3w+TIZD+saXbjE409KwWHYOI8nZgKYZjKv8eCm1q07mZvbaXqIbkJT P7DQECeIQRey6IROQ3c4OhV6DOgdqgpjfnMG9dAFFaP0bQETOiLMfMA60B4tLy/T0m11 ZM6j0FB6hXr90XRHuXr6S0TxRYdU1oyzJGahX6Qo+cx6EQvjIDAe30UoJow1psXzX1Pn 0kQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678315489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YI9LQvXniCVpyAOn2y2qWGoj+t670mySCnKNo6CECJ8=; b=K1Gcx73RBsjNDAWh87ch2kCqzewf8DIgNnbD5UuNUNJEvPk85zp+6KFXwt1pi7n+Xd GdiuT46xdXkhb2zUGR3/AMRojETNNv0NSvJuo0BEQmvO+22KKexmmLWvteWuLUi3urKV gitlcL8jN80RI5MypDmTIeVBy9jp1KyBuXeHyRefRTcwiIRUlO+Pz+ZbuXiJMSAdubpX SpoPJpwjDAnyRSICmyDVCYhFYlZnqex2RnJCMBIS9NDYt2cs2/Ym/2MpQCySkb+XUS98 GXVSDdphuKeqZNS5NcgZ45NdX3TDtBptaEkmXYpH/JQA0O0smoYnb3Lmkz1d/h1pg1qD LYnA== X-Gm-Message-State: AO0yUKXJctEhIdcnPLr2Hp4Z9A3SgWPqPTSvMxgunUipxe+c6LfZZw7X z37JztysP1jX32fxJMrL4NA54COvyzA= X-Google-Smtp-Source: AK7set830boJjtnEXIPJrS7PDBpN4Jeebd3mOMWFFIzr5EkCzIoerSXDpCTz+F46A+fUaFDlUOYJAw== X-Received: by 2002:ac8:5e0f:0:b0:3b9:b761:b0a0 with SMTP id h15-20020ac85e0f000000b003b9b761b0a0mr1366202qtx.12.1678315488931; Wed, 08 Mar 2023 14:44:48 -0800 (PST) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id dt17-20020a05620a479100b00742f250ebc0sm12228087qkb.9.2023.03.08.14.44.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 14:44:48 -0800 (PST) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/3] cups: add/fix web interface packaging Date: Wed, 8 Mar 2023 17:44:42 -0500 Message-Id: <20230308224442.33516-3-twoerner@gmail.com> X-Mailer: git-send-email 2.36.0.rc2.17.g4027e30c53 In-Reply-To: <20230308224442.33516-1-twoerner@gmail.com> References: <20230308224442.33516-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 08 Mar 2023 22:44:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178204 cups includes a web server. Users can surf to port 631 (default) of a machine running cups to (potentially, based on configuration, default off) view jobs, add printers, and perform other forms of administration. The location of the various resources that are used by the built-in web server (e.g. index.html) are installed under ${datadir}/doc/cups. By default these artifacts would be included in the ${PN}-doc package. The comments in this recipe, however, would suggest an attempt was made to have them added to ${PN}; albeit unsuccessfully. These resources add roughly 1.8M to an image. Since cups does include a configuration option to disable the web interface (--enable-webif), add a PACKAGECONFIG (default off) to allow the user to decide whether or not they would like the web interface configured and its pieces added to the image. Enabling this PACKAGECONFIG both enables the web interface to be configured and built into cups, and also adds (by way of a recommendation) the web interface package to the image. Considering that the previous intention was not working, defaulting this option to off preserves the existing behaviour. Previously in order to have the web interface data included in an image, a user would have needed to explicitly add the ${PN}-doc package to their image. Signed-off-by: Trevor Woerner --- meta/recipes-extended/cups/cups.inc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc index 1b522d7d8535..da320b108552 100644 --- a/meta/recipes-extended/cups/cups.inc +++ b/meta/recipes-extended/cups/cups.inc @@ -47,6 +47,7 @@ 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 \ @@ -92,7 +93,7 @@ do_install () { fi } -PACKAGES =+ "${PN}-lib ${PN}-libimage" +PACKAGES =+ "${PN}-lib ${PN}-libimage ${PN}-webif" RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" FILES:${PN} += "${libexecdir}/cups/" @@ -101,13 +102,10 @@ FILES:${PN}-lib = "${libdir}/libcups.so.*" FILES:${PN}-libimage = "${libdir}/libcupsimage.so.*" -#package the html for the webgui inside the main packages (~1MB uncompressed) +# 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)}" -FILES:${PN} += "${datadir}/doc/cups/images \ - ${datadir}/doc/cups/*html \ - ${datadir}/doc/cups/*.css \ - ${datadir}/icons/ \ - " CONFFILES:${PN} += "${sysconfdir}/cups/cupsd.conf" MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/cups-config"