From patchwork Mon Jan 31 22:40:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robin Roevens X-Patchwork-Id: 5023 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 4Jnjhs0THbz3xfY for ; Mon, 31 Jan 2022 22:41:17 +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 4Jnjhq0x9cz4W4; Mon, 31 Jan 2022 22:41:15 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Jnjhp6TsCz30JF; Mon, 31 Jan 2022 22:41:14 +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 4Jnjhn4ltxz2x9p for ; Mon, 31 Jan 2022 22:41:13 +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 4Jnjhn36M3zPD for ; Mon, 31 Jan 2022 22:41:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 82CEF16228 for ; Mon, 31 Jan 2022 23:41:11 +0100 (CET) X-Virus-Scanned: SPAM Filter 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 UTF8SMTP id XJyVZaPuNMiw for ; Mon, 31 Jan 2022 23:41:10 +0100 (CET) Received: from chojin.sicho.home (amaterasu.sicho.home [192.168.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (no client certificate requested) (Authenticated sender) by hachiman (MailScanner Milter) with SMTP id A9494B00F; Mon, 31 Jan 2022 23:41:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1643668869; bh=FxeIul00oCqaP1eSWlfECHA0J7gD0GxubKXoCoskffI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XXBjpBFa+ZWflwNMlhXkgnOm6+KZswgP//4yTsxFjrpK0LIYRx9fjCsFvnEJbsO0N cnAjka7+kST+CiSZZnZl6PbQUykmWjcSu+0LA58obui4NtT7TqPS7ZUK5E7bHgyVco g/TInu8+k/kJBidZ4hT3AoG84IKDq5xoFRF502u0B+LvPFgZYD1RLVyszhrjokXN63 39WGgWqWZSIqChWYUK71oDIdDjSB08rd4RlXPqJLFrfzYGESfdi/iesxCeuj5Iyx9y vTwJU5rYptmt746EEXTalTH699TiwbHM6A5qR+PAos3WfgIEser4aCRFhNL0+tX2lz HF8XqDwMcSOEw== From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH v3 1/2] buildprocess: Add extra metadata to meta-* files Date: Mon, 31 Jan 2022 23:40:46 +0100 Message-Id: <20220131224047.22310-2-robin.roevens@disroot.org> In-Reply-To: <20220131224047.22310-1-robin.roevens@disroot.org> References: <20220131224047.22310-1-robin.roevens@disroot.org> Mime-Version: 1.0 X-sicho-MailScanner-ID: A9494B00F.A8A80 X-sicho-MailScanner: Found to be clean X-sicho-MailScanner-From: robin.roevens@disroot.org X-sicho-MailScanner-Watermark: 1644273666.47225@YrwvH+zcRkazY7JdkbUikA ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1643668873; a=rsa-sha256; cv=none; b=YR/gLHDdMe5ml2QiqW9AsDTRVPnbWUWR7AdQqPi6P3+TYTM97o4CHIT4tPHqjDJeZQ8A6H V74yv5bJd2ueVOFKVyHVdlN778gYEBUq4ruvOghKXxC0NIphpGemrj5bnSNW10MpOauCtg jqtbUdKq6cuLWm2cUjAnfsTDwbdOfu0idXcOBl4yZSNl+Y8tuAj7wyfeG7pnX2WvvjcTSG tcaGbeNjUU03aaxPunTEP3SiFwSAq0dfEp3RDnozEvqCzhcPOQ8DRH+xHDTGQxt6vNMjVP tevPeTIYPeHpYFphqfQst00S91ksxNr6AfA4ISZ+ryN6b6rl8VCqyZxLTu0K9Q== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=XXBjpBFa; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1643668873; 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=JSfKwPU8QsPjzmhUJqsvsiSSyPeHd05Dy8+A1EJld3g=; b=N/Oj36PpsIZZhqVo5bu4ecclQWEFX7UYNfzvziukwNBPITsR/BynPkQEkQSAXHyduW2NPx hyASBFtYY/yHSLDs0szYfd19J2FugAtKigYjdeZTbwIDYH66BuaEk/dXJBIPxJwT3wanTX Z658Dk3ussExdzyUWopqn5c703qb4yMLu/2CN8TuS4pSE3PREs225XZ/UVoydjDNCMbTyC +/QIR8jehXJt9Rcz1Y50r/oWJdNwvQhmm07iYzDQDtNX2+z/0j8Uqp7oKE8gPDXQDVV8Yr QqhoIGTeVPTCx2yUP5jjP2V88wt1BnpHHfBrvIQmfpiyWD0+MDmF2neZUnmjZg== X-Spamd-Result: default: False [-3.60 / 11.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-0.87)[-0.867]; SPF_REPUTATION_HAM(-0.71)[-0.71288154725616]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,quarantine]; MV_CASE(0.50)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[disroot.org:s=mail]; R_SPF_ALLOW(-0.20)[+a:c]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; IP_REPUTATION_HAM(-0.01)[asn: 50673(0.00), country: NL(-0.01), ip: 178.21.23.139(0.00)]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL]; DKIM_TRACE(0.00)[disroot.org:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RWL_MAILSPIKE_POSSIBLE(0.00)[178.21.23.139:from] Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=XXBjpBFa; 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-Queue-Id: 4Jnjhn36M3zPD X-Rspamd-Server: mail01.haj.ipfire.org 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 Reviewed-by: Peter Müller --- lfs/Config | 11 ++++++++++- src/pakfire/meta | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lfs/Config b/lfs/Config index 76a07b088..525c0881a 100644 --- a/lfs/Config +++ b/lfs/Config @@ -301,13 +301,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 @@ -315,6 +318,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