From patchwork Thu Jul 1 19:15:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Roevens X-Patchwork-Id: 4481 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GG7Gp0JZNz3x1K for ; Thu, 1 Jul 2021 19:16:02 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GG7Gl5WQYz1g9; Thu, 1 Jul 2021 19:15:59 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GG7Gl3G8lz2yxL; Thu, 1 Jul 2021 19:15:59 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GG7Gj4cd9z2xZ8 for ; Thu, 1 Jul 2021 19:15:57 +0000 (UTC) Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4GG7Gh533GzDt for ; Thu, 1 Jul 2021 19:15:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0420C8241D for ; Thu, 1 Jul 2021 21:15:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u21BBdjkNAKq for ; Thu, 1 Jul 2021 21:15:54 +0200 (CEST) Received: from amaterasu.sicho.home ([192.168.0.1] helo=chojin.sicho.home) by filekeeper.sicho.home with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1lz29d-0008SN-PJ; Thu, 01 Jul 2021 21:15:17 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1625166953; bh=bzDIIo+b+/fed4OFHhXuDsRQmeQDTqB0o+wzPmSRtKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RPtxdN2S0NHjfq7PuUsrt6RIzOww+duvaBCd459RGFIqfufi2+slZlHe7Eq/0bvxx XN7Xu+QnaPJfadfPytaRRf5PRn+s/NBM9m86s1SOGdN+1D0Rw6vAB5e8Exaozmjb7/ YtxOfqFB6ekte/FsLm0zk1kKK+MkgxdfQ8uqQvBlj+H++MWA603SfNkmXD4LM9dxOe FglvXQFiy8KIxaBBVTGOJImsenb3yip39kpcsatdcU2DHcwwNKizM4BOeGLYNcw2jS 6HBUHlDyYhm6AWJduSgVwiM0XtWfuiaYgJjFnNcpiz7XO/rFNkXmEZg2xogIpqL5Ws S5/nUm2iUmq0g== From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH 1/2] buildprocess: Add extra metadata to meta-* files Date: Thu, 1 Jul 2021 21:15:13 +0200 Message-Id: <20210701191514.8176-2-robin.roevens@disroot.org> In-Reply-To: <20210701191514.8176-1-robin.roevens@disroot.org> References: <20210701191514.8176-1-robin.roevens@disroot.org> Mime-Version: 1.0 X-filekeeper-MailScanner-ID: 1lz29d-0008SN-PJ X-filekeeper-MailScanner: Found to be clean X-filekeeper-MailScanner-From: robin.roevens@disroot.org X-filekeeper-MailScanner-Watermark: 1625771723.74754@zOeG+Stv7RvVJfxFQE4D8g ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=RPtxdN2S; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1625166956; a=rsa-sha256; cv=none; b=eIPLsIW4LNadlELDmbpN2mVmXs0AYCZOt9M2UTxZMSVlF1undNd/3bRp5eMDKKRir93xb+ KB3KpYRp3sJ7GMkUUAREUbA0UJHO2Eg0HH7JJUOMfZlb654JaSe/2lSiwAffruGo7/Tx4G cW4Mv9DyN0rEjWl51BPTTAyBsMP0vPSE75g+uV8Ls7qQM4cn3fXdZqY/xPDSvOh+qVozWt NVEUuHslmEmh9BCcj4a1IlxeDt/ETaO9I4oVW5Q86ZwRivmI/xUy/TDFK79NEAJ2Nlh/BD ofRCqqr9EjgJePwYAPZpZ8lqtRZ01oqg7G8i3O+LysrmhkNT0wjx8B9/9PJzBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1625166956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0WyjrmTM6D2RsFi+AxeB60Tucjx6/IEHagBBh78emeE=; b=QK+jgAXmNABUt4mkRybmC83JkSVzfyRGib1/1yMEq5uuwmKnRU7QSM3rX/+upowgefMOHE 3a4R13JPJmfBzeq1HVwA+mOBBEbXVY43CtX45SZbStNKqNhfz5UWeUR4ne3D3QYmJiDaUV jFGnTm5/70M/q4H66rTjxdEYYXAtMH/CnLJsuQTGlnOMJVJIOA5NtT7MnxXyAaW44AKP/P w3PBTiV3RKwFS6qigPIJDpzOD2VbggO++ncburaguCiUFtDM/wt19gEJFybShDsySTE7GB CZWcDr5QVGGnVf8cA6+UpdYSW0D5gPK6N61OpP41c9xOpldoJO9qNYWV91W1vw== X-Rspamd-Queue-Id: 4GG7Gh533GzDt Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=RPtxdN2S; dmarc=pass (policy=quarantine) header.from=disroot.org; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-0.52 / 11.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[disroot.org:s=mail]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; BROKEN_CONTENT_TYPE(1.50)[]; IP_REPUTATION_HAM(-1.01)[asn: 50673(-0.29), country: NL(-0.01), ip: 178.21.23.139(-0.71)]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; DKIM_TRACE(0.00)[disroot.org:+]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,quarantine]; NEURAL_HAM(-1.00)[-1.000]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL]; BAYES_HAM(-3.00)[99.99%] X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" * Add a Summary and Services field to the meta-* addon files. * Add an INSTALL_INITSCRIPTS macro that takes a space seperated list of initscripts to install. * I kept the original INSTALL_INITSCRIPT as a method to install individual initscripts for backwards compatibility and possible corner cases. Signed-off-by: Robin Roevens --- lfs/Config | 11 ++++++++++- src/pakfire/meta | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lfs/Config b/lfs/Config index 7d98e303b..5f48b0f33 100644 --- a/lfs/Config +++ b/lfs/Config @@ -297,13 +297,16 @@ define PAK # Cleanup rm -rf $(DIR_TMP_PAK) - # Create meta file + # Escape SUMMARY variable and create meta file + summaryEscaped=$$(sed 's/[&/\]/\\&/g' <<< "$(SUMMARY)"); \ sed \ -e "s/NAME/$(PROG)/g" \ + -e "s/SUMMARY/$$summaryEscaped/g" \ -e "s/VER/$(VER)/g" \ -e "s/RELEASE/$(PAK_VER)/g" \ -e "s/DEPS/$(DEPS)/g" \ -e "s/SIZE/$$(stat --format=%s /install/packages/$(PROG)-$(VER)-$(PAK_VER).ipfire)/g" \ + -e "s/SERVICES/$(SERVICES)/g" \ < /usr/src/src/pakfire/meta > /install/packages/meta-$(PROG) endef @@ -311,6 +314,12 @@ define INSTALL_INITSCRIPT install -m 754 -v $(DIR_SRC)/src/initscripts/packages/$(1) /etc/rc.d/init.d/$(1) endef +define INSTALL_INITSCRIPTS + for initscript in $(1); do \ + $(call INSTALL_INITSCRIPT,$$initscript) || exit 1; \ + done +endef + ifeq "$(BUILD_ARCH)" "$(filter $(BUILD_ARCH),aarch64 riscv64)" define UPDATE_AUTOMAKE for i in $$(find $(DIR_APP) -name config.guess -o -name config.sub); do \ diff --git a/src/pakfire/meta b/src/pakfire/meta index d97b2a0fa..08e7d53fb 100644 --- a/src/pakfire/meta +++ b/src/pakfire/meta @@ -1,6 +1,8 @@ Name: NAME +Summary: SUMMARY ProgVersion: VER Release: RELEASE Size: SIZE Dependencies: DEPS File: NAME-VER-RELEASE.ipfire +Services: SERVICES