From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 12 Jan 2022 14:31:35 +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 1n7dix-000E34-Eu for lore@lore.pengutronix.de; Wed, 12 Jan 2022 14:31:35 +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 1n7diw-00073c-H0; Wed, 12 Jan 2022 14:31:34 +0100 Received: from mail-eopbgr80081.outbound.protection.outlook.com ([40.107.8.81] 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 1n7diR-00072Y-OI for ptxdist@pengutronix.de; Wed, 12 Jan 2022 14:31:08 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i8XvrVhpcnyGJwSdD3JCG4mfCZ4upjnlrKrDQQuR7egtaB5FTX2SykZZ2+MR6yXdt70WXgBAdJb898wyqgA6nkkHzVrriTbT2v45KWVIo23MyMjLneUIacFgDUlZ2oLkWRRcvqyQOaquKrBXrPQejVyUvWOMIdkNWtPyrWSy42QHsGX7JlWtC1BLlSnCxlD7SzXLdKH4mDWoXSB3w2bGCgJRqKN1zrh53NYZRV5QlSdpV9X4JTsuKK2hXxMJuBn3YLvwF0tP8ehfxkBmnU+SPjtUbroVo3rKnTlJvlhUD4ni6ZKeyjeXHHyndanW8+zfCkpXDEUo3J/Pse2PGAdQtw== 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=1dWnqZ1P78E3R402QEzG/aalEs42a+Bbdgx1oNAMY/Q=; b=L0tHP9kCd1Qp6X5W88HCyBY8Cg1vUoHZWM0ar8olhnCAsfCvzPDBtjAD7rdFpgHpGj9P2laQZ/RjzDIFCS6f57IZ03Expdvesg0DcNanpsy8DjnKpRh5rrQ1TXdNEoV/Mj6Jc5cFpjf763JAsXiOOzRoMa+RKcRbtbOmTWm2hMwmCF3AGU/AUWNLG04V2sKLSthPa5pyDXd4CIQdK+BXvU3CKynZNkev6F5QQLQKGoOzMfhiQf4B7HhSMEUgOF3aTeE3GML0BfTKaMdvISvnVqObhOCQ1DVarERr0UdgbsqSOmn2xp+ym+RwDU7FsdXqq+eowQrDbqIMxraq3uhuGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=t2data.com; dmarc=pass action=none header.from=t2data.com; dkim=pass header.d=t2data.com; 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=1dWnqZ1P78E3R402QEzG/aalEs42a+Bbdgx1oNAMY/Q=; b=RQCm0/NsRmBgSsY7HsqtXSZbrAmCUo7hurRHKC4VNs8bskvfTUgpS77iviU7h17MqLE554+e3kvoUS1gOHVRaThCp7yC8bopqApoL0PWsR84p1Y3jCAyJQ2z50XmduOE6e5ow6o/aOazrA+bGHPIwD90sA2P+t8n354oTCw8nqA= 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 DB9P251MB0498.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:33c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.11; Wed, 12 Jan 2022 13:30:59 +0000 Received: from DB9P251MB0618.EURP251.PROD.OUTLOOK.COM ([fe80::91c:5b0e:d5b2:5b18]) by DB9P251MB0618.EURP251.PROD.OUTLOOK.COM ([fe80::91c:5b0e:d5b2:5b18%8]) with mapi id 15.20.4867.012; Wed, 12 Jan 2022 13:30:59 +0000 From: Christian Melki To: ptxdist@pengutronix.de Date: Wed, 12 Jan 2022 14:30:42 +0100 Message-Id: <20220112133042.872717-1-christian.melki@t2data.com> X-Mailer: git-send-email 2.30.2 X-ClientProxiedBy: GV3P280CA0107.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:8::9) 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: e2adf53b-fdfc-45f3-ce54-08d9d5cfc52d X-MS-TrafficTypeDiagnostic: DB9P251MB0498:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6ypljoCZTlOODK6+HJk4uv6e2wyrqJRvkv3GDSpsezZQhjdTgww3L6/yalYt0lmWrGdBWcBY6bBVm2pbTkpIoingLpdrkvUTxIpntEMhPGRWQ/NbJMv95HnVWk0yJbNGaYBJung4BnOYMrDgmorWPAcfTzT7YXzOzslgUeWaIXFlRn8FQOJPuOalakVENrMO/8Tro0fH5jlLRKlHIx6BDZKjxNdKyeBOWWQZvljF5VM3iGZKivJ66mMdCHwnH+q0/S1k220QXvfFTjgf/Nx83diBuqYXQOElRAhmfScbubXdDmVcOd53U0cMYm+crPVhUSIShr8aucZ3iJBet/axM8Niw/6jFgVjbI+dyKK9YSRB+SWBtR+VEqQHs8lSEO6liYqJpCpDBNdcMU8h/8NUPdc/gI2/18SJeUoVfty2kJBDOiDGjXej6Cn66eiPwRp/zcJvVHuT7OZ9hr/WhBAG5M85/qH8F5siVM2R2s4m02NKntwN6HUiY2fNtPCwXanqsOITr5ee0e+e8fQH9MtJxULE4prDUSgR1fyyH1I4+0SpKIfSZ8SI4+H5FqqO4ZFnDv4iYtb8H1yUWWVhCCwINgjQQp+ZwpJR7DP28fXj+qwlfRRiWq53l44GRDynLrZAWCVRWRy9QwCnzOzxZ+BdBtUvXyGVa1JZsbft8ZDNugb2gEC88PyaJ/kslqVzeUXWycPE+UWYkMCe8ijOFuePtw== 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:(396003)(366004)(39830400003)(42606007)(376002)(346002)(136003)(66476007)(8676002)(44832011)(2616005)(66946007)(36756003)(86362001)(4326008)(66556008)(6666004)(26005)(6486002)(316002)(38100700002)(38350700002)(6506007)(52116002)(6512007)(6916009)(5660300002)(2906002)(8936002)(186003)(1076003)(508600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?APVxq77jl1JNl7Z17g2ScuUTyL3apHwPLhhBCUC3w/qUr9DuqI+RADjJ+vuK?= =?us-ascii?Q?JNlrg7VzNPERpufQpq/hBIfoIFf0uFyynkS9rkA+ZjTLgGIi626b7wFqHaBf?= =?us-ascii?Q?VSPivk0rZVOGDn+Lx2MZX3nnAVArwPYp+PWA1a4PDku++vwJptHLEyHqZ01s?= =?us-ascii?Q?kMRpnK7VKpVj7bbXqS7B/TYO8/pNW3wnpcu84iwFD7mTnQc6RGgtzvBWHXbn?= =?us-ascii?Q?O3BntJN2JqNSqFdDzl+yEW0vUd3kASoYO0WSqBiMakJq8vyRPfPMw7u1nI1Y?= =?us-ascii?Q?0FUeSgRLqJXGP/d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-ascii?Q?jeIwg5twAFYZszV6kByb+za6Iac53p6BLsJBhvRyAwgYCNHwS/delU6xNXin?= =?us-ascii?Q?lZJTw3EAplXOBo6F4mPANGPowhg0iRTCjtfc9uPN8P+fnEH8oXuXuxhDAmgT?= =?us-ascii?Q?4+QCpIz0kqmqwQXDtA8NKxG+x7Ghtg4GkbaJzVO+v1k2Skv36DngRhfqSviO?= =?us-ascii?Q?+4L9SvuZSLbp8yS1ABRTFCUNkWlLG8wMEjiP9orBT6vlpdhmn/qefM0ApZ0A?= =?us-ascii?Q?++ZALvOAekuQNQMBsAdSeYO34Uyq9oBZ+bKXrxh+I8x7GNM7wl87ocfSJxlB?= =?us-ascii?Q?VliS4jRGDMQ6gV9bxxvg3cnu9JvRvCpQxnfldREQeGYTpSC/R9pcEHoDnfLU?= =?us-ascii?Q?SADbF7PIQYtEvsKyNonSm29QPSqyeGVkkPYedUlU28Xxi14sLFhZDXQrjpP0?= =?us-ascii?Q?hH8b8MNl7Ad1aNoIQJxUYupA2ddJb5mnHMC8Pr2jMFPmQl/PeeYmPKLclv6l?= =?us-ascii?Q?MFhWoLVlhAPCBadFKHlDRO59Jc8=3D?= X-OriginatorOrg: t2data.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2adf53b-fdfc-45f3-ce54-08d9d5cfc52d X-MS-Exchange-CrossTenant-AuthSource: DB9P251MB0618.EURP251.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2022 13:30:59.5352 (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: abXPf39/XYJYf7I3QK8SRkPJVn2o6Pdv70MnEAuMdS5AGY880Ae2Z2l/wcYEpp7K5UgjK9f36jl//XtmzkvJ3gjjlsJpfnpNFxSvJyCT5Ic= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P251MB0498 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,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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. 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