From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 21 Jan 2022 09:37:43 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nApQV-008b9x-A5 for lore@lore.pengutronix.de; Fri, 21 Jan 2022 09:37:43 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1nApQU-0006jF-J8; Fri, 21 Jan 2022 09:37:42 +0100 Received: from mail-eopbgr80074.outbound.protection.outlook.com ([40.107.8.74] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nApQ5-0006j2-In; Fri, 21 Jan 2022 09:37:19 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UUmGFhxW24qXr7LepWaRQ2G9TX+HXMa4wYcnSKbqVf0gfaxp9DviUZ9YUBqXJvD2OSPtem3FnY7y4srBGuacb7NRUNl49K3S0XJxoaPGPCS+4EhLhmsV6gJakIPJ1I4QwAaOibKzyvYH7TWqtFMEvXrTvDIVF65y3fvp1wX1uWwJPxx5wTpYts6b8rZSrNRJ4PUuP04HcFhD3EQcPv5yME+uL7M6CKBg7ISJ8TkzXFmKwRbgb9qf/qjFzCTmBpLthPU+295MCt98NIAIMOgwQmDqYwUqpiJ/k8SiRYt5wL0eOlGSNue2tSo0/wpJn2k8q7MFv1CTVgP+lXbzEOKlDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EwqTJWbl6kiw+bOm98vMvIAedP43oMD2v5sDJTwCavo=; b=PgWimRRvhqKTCgzWE+7iI1zORnfx+lZ4xidwLhp2CcpmY67ou+vDHf2ntIf6hPBC7ZKmo56S6n0YqtSJXvRsC9OjHO8oyrvGDynLOGhSQFdArLPxzvZBCn3y81CspuKLB03HpTw8f57o67gKoTqYUb69AsanL7RH11ByI/57FGkTtFV276ioBJcYbHR8viRHTOC0fOhlCrNKlBBVS5RM4u+yL2f8sqc9l22IQDqmHTAPoMqeafKsZ4bmtXL06OdXaOCA26ixt1Avws5cZIWTfhnft54g0GNhI8LZ+Uf4YJdz3wSMf3dsQJkn9vXFZHaRS/1n/Kx18IRGSfp9eWAzsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=t2datacom.onmicrosoft.com; s=selector1-t2datacom-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EwqTJWbl6kiw+bOm98vMvIAedP43oMD2v5sDJTwCavo=; b=kMZqkBr5SWuAhiomECNckp9p2ifxEUYci6qCZ73XtAzTGg9cosezgfnxo8h9VxW2UJWph8IPzQIwrq+oSIJq6n7egD75/SuqyLkByVzl8Qh5JZrP/KvbYyEGs6Un8zNI3kVrRTKJSFJ0j4wDxybIGwQPOnj/Ccs7xZxctLeMuFE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=t2data.com; Received: from DB9P251MB0618.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:334::22) by DB9P251MB0450.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:324::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.12; Fri, 21 Jan 2022 08:37:16 +0000 Received: from DB9P251MB0618.EURP251.PROD.OUTLOOK.COM ([fe80::10ab:30da:9dfb:56fe]) by DB9P251MB0618.EURP251.PROD.OUTLOOK.COM ([fe80::10ab:30da:9dfb:56fe%3]) with mapi id 15.20.4888.013; Fri, 21 Jan 2022 08:37:15 +0000 Message-ID: Date: Fri, 21 Jan 2022 09:36:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: ptxdist@pengutronix.de, m.olbrich@pengutronix.de References: <20220112133042.872717-1-christian.melki@t2data.com> From: Christian Melki In-Reply-To: X-ClientProxiedBy: GV3P280CA0083.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:a::11) To DB9P251MB0618.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:334::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9ebb907c-2888-4a63-378d-08d9dcb93a44 X-MS-TrafficTypeDiagnostic: DB9P251MB0450:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TFNtK/I5H2qVbgbWjSLBcLvPTqbRZ32egDP/qCNgg+gz5DwzFc5F+p03nZ850eqPX/W4/FTXHjt8DqR+YEnS4UZMpmL2g7kzMWvkkwZ1rT9iUjLforj9TP8v2hsOzu7LWxkSQv7DhZnZo91qLPLZ6CAOSQp8RGMqBaoKIojiWoiJMkqHNmDXk/5t36KSPSGjc99AHGWfXgaP7YrmX319EhQvEEiaaLtmY81FVuC+CLu7+UPhQap8c9wrTRYLzw7pcXYDegENCmeGHqI+xZfYS/TrDsbcl0X0uVaRGCd1xCJzbHlyVbAGJ8yeMFpBqeyFN5Oy+nPTjq5Hmexm934UeexXODp8+Q+Uo24Jflaoj7w47u/NV6p52ukNwtmBQfojPltue1CMd5/ZsjjjuGWijMTlEe866jz3IgF1iHacjF8krHcWo2lXu/ADSOKm3W8xejZquW4VZBpC004jLDfmSjeFZiAffoVazwQSPMKQrGr+HsKE57uGJWaOQiyrL5suSDnif34vdKDDthg74LXTJ1/DiRwgkNXluUzULQfIvUc6MXSZdk5QVuXOke1sdpDyiIrMzFxWV7B5sFUtnhMo/MjtRvu9M0BJ90QE1wQV3Xj7z4m6+b7Uk10NqMcPoNQt2VAxLyUZuEacMGnjk2IYB4ZQQEa7EwduUQBuxjQKE+WO3bN6M54eTs9zsAkko/mVpoDT3hzr+4nSOpz8O3pY95IF1/fJgZgjlu34n0uaQywXGZd6hOo7zJV/O8DSsT6D8xDTDtLAMsk37H2a2h+Qyg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9P251MB0618.EURP251.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(136003)(376002)(346002)(39830400003)(366004)(396003)(6512007)(6666004)(316002)(66556008)(66476007)(26005)(186003)(38350700002)(38100700002)(508600001)(66946007)(44832011)(31686004)(2906002)(36756003)(86362001)(31696002)(4326008)(8676002)(52116002)(53546011)(8936002)(6506007)(83380400001)(6486002)(2616005)(5660300002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RE9PT1JPbnB3RmZjc3hNU0FsdGlFZDBwWTNnaDdoZnlGVG1aWlpSd21Oa0s0?= =?utf-8?B?ZFVqRGhrZ0JwQTQwWXQxbHRHNDQzSituMm0rc3JaWERwbFdFT21TUHpCVVpw?= =?utf-8?B?bVJzQi9RUDNkWjJGKy9zVWtCTlNHY2tFaDIxVnVlbG56OEtudnQ5WjNMTlYv?= =?utf-8?B?UGpjOWdsUFYyanhYMnQ4c3lwcWVZSjVXLytmZ3ZQQVF2VnpVTzJyV2xDQUEy?=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JVWEwYkZLV1Ntb1R1TUZLMkFxRjFXODhQSWk1M1JiNmpNZUY5?= =?utf-8?B?VWdzZnJUQS95WnN2QTQ5cnoxSXBqMHRVSThCaVU5QjBkRGN2c2orQ2ZoQnJZ?= =?utf-8?B?UUIxdlU1VVVmZGU2S2xML0NtY1lOZEk5WEFXUXRQa0FXZHF6eXR6VUcxeWk3?= =?utf-8?B?ZWRTSVFRS2plWDFOU3VDZUEweDVFbkhveXIrcHVnZWUyYnlKS3U5NmsyT2t2?= =?utf-8?Q?C0685jI9pyS43A4+nnurRg+AyR/XFQ6hoiy3F5E1Jo=3D?= X-OriginatorOrg: t2data.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ebb907c-2888-4a63-378d-08d9dcb93a44 X-MS-Exchange-CrossTenant-AuthSource: DB9P251MB0618.EURP251.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2022 08:37:15.5494 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 27928da5-aacd-4ba1-9566-c748a6863e6c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qOFJFoV0Eq/pD/6QEXb9Fm60N/YG4Nen+ngMc8CUhr+2+5iwL9B6LNRs8hzphrneYmzmZ30Ck/K2Ggy+KGrxdMaxBJ/4uO8kMx37ix9Ova8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P251MB0450 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] [PATCH v2] rootfs: Add possibility to add custom directories and files. X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: flix.ptxdist@benfm.de Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On 1/21/22 9:07 AM, Michael Olbrich wrote: > On Wed, Jan 12, 2022 at 02:30:42PM +0100, Christian Melki wrote: >> Add two custom targets in the rootfs configuration. >> Rationale behind this is that I often find myself maintaining >> a copy of a package ruleset just to be able to copy a file or add >> a directory. >> These changes are often things that are project specific and >> are useless upstream. >> Now this type of project specific maintenance can go away. > > Nack. It's normal and expected to have some rules in your BSP. And it quite > trivial to maintain. We even have a template to create rules to make it > even easier. > > Michael > Thanks for the feedback. Sort of suspected the nack. The request was a bit naive. But I still think it's a common problem. I don't mind creating new packages and rules for things that deserve it. But it annoys me that I have to keep my own set of ptxdist default rules because I want to add a file or two in relation to the package. Because every time I install a new ptxdist release I have to merge my changes to the new ruleset (so I don't miss out), just to be able to copy files. Yes, I can create separate rules. But the files belong to a specific package for my solutions and I prefer not to have a dependency file-copy-rule-package for a lot of packages. This is not something that the CUSTOM_FILES do address, but atleast it removes the need to constantly merge/update files on every ptxdist upgrade. Regards, Christian >> Signed-off-by: Christian Melki >> --- >> rules/rootfs.in | 33 +++++++++++++++++++++++++++++++++ >> rules/rootfs.make | 13 +++++++++++++ >> 2 files changed, 46 insertions(+) >> >> diff --git a/rules/rootfs.in b/rules/rootfs.in >> index 34e9bdcff..dddb5ebe1 100644 >> --- a/rules/rootfs.in >> +++ b/rules/rootfs.in >> @@ -257,6 +257,22 @@ config ROOTFS_VAR_TMP >> available at run-time. >> >> endmenu >> + >> +config ROOTFS_CUSTOM_DIRS >> + bool >> + prompt "custom directories" >> + help >> + Create custom directories in the rootfs. Directories >> + will be created from a file in the project conf directory, >> + directories.cfg. Format: :. >> + Multiple directories are separated by a newline. >> + Use this if you want to add various directories, >> + but do not wish to maintain a copy of a package file >> + solely for that purpose. >> + For example: >> + /conf:0755 >> + /conf/default:0700 >> + >> endif # ROOTFS >> >> # ---------------------------------------------------------------------------- >> @@ -488,4 +504,21 @@ choice >> If enabled, no /init will be install. >> endchoice >> >> +config ROOTFS_CUSTOM_FILES >> + bool >> + prompt "custom files" >> + help >> + Copy custom files to the rootfs. Files will be >> + created from a file in the project conf directory, >> + files.cfg. Format: :. >> + Multiple files are separated by a newline. >> + Files are installed with the install_alternative mechanism. >> + Use this if you want to add various scripts, data files, >> + etc but do not wish to maintain a copy of a package file >> + solely for that purpose. >> + For example: >> + /usr/share/data.cfg:0644 >> + /etc/daemon.cfg:0644 >> + /usr/bin/script.sh:0755 >> + >> endmenu >> diff --git a/rules/rootfs.make b/rules/rootfs.make >> index 1c1e5501c..715804cec 100644 >> --- a/rules/rootfs.make >> +++ b/rules/rootfs.make >> @@ -145,6 +145,12 @@ ifdef PTXCONF_ROOTFS_VAR_OVERLAYFS >> @$(call install_link, rootfs, ../var.mount, \ >> /usr/lib/systemd/system/local-fs.target.requires/var.mount) >> endif >> +ifdef PTXCONF_ROOTFS_CUSTOM_DIRS >> + @$(foreach customdir, $(shell cat $(call ptx/in-platformconfigdir, directories)), \ >> + $(call install_copy, rootfs, 0, 0, \ >> + $(word 2, $(subst :, ,$(customdir))), \ >> + $(word 1, $(subst :, ,$(customdir))))$(ptx/nl)) >> +endif >> >> # # >> # # install files in rootfs >> @@ -277,6 +283,13 @@ ifdef PTXCONF_ROOTFS_INIT_BIN >> @$(call install_alternative, rootfs, 0, 0, 0755, /init) >> endif >> >> +ifdef PTXCONF_ROOTFS_CUSTOM_FILES >> + @$(foreach customfiles, $(shell cat $(call ptx/in-platformconfigdir, files)), \ >> + $(call install_alternative, rootfs, 0, 0, \ >> + $(word 2, $(subst :, ,$(customfiles))), \ >> + $(word 1, $(subst :, ,$(customfiles))))$(ptx/nl)) >> +endif >> + >> @$(call install_finish, rootfs) >> >> @$(call touch) >> -- >> 2.30.2 >> >> >> _______________________________________________ >> ptxdist mailing list >> ptxdist@pengutronix.de >> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de >> > _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de