From patchwork Thu Dec 12 15:55:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 54003 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 5CA1AE77182 for ; Thu, 12 Dec 2024 16:44:32 +0000 (UTC) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.groups.io with SMTP id smtpd.web11.24071.1734021861988571545 for ; Thu, 12 Dec 2024 08:44:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H/AJGZOZ; spf=pass (domain: gmail.com, ip: 209.85.221.50, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-3863494591bso443881f8f.1 for ; Thu, 12 Dec 2024 08:44:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734021860; x=1734626660; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n0S4h4bjQHNxCguBepnEcHHxqvMFu2otDmuUiyFjCFo=; b=H/AJGZOZng3wm2/Yt0rItzCKbv7ttJSvbs0l4Ftl8diyctgqi8yMwlAkVlT9YSswkv dJBBiLR1XGnpu09Vx2A/k0x1HshWmlxAhImqqxv3xCTllD+NgYk52Xb057K7jcTsFB46 jfG9HG8COP6+NhsMl69hswggV4Q13Pibu8UdmOD9HOjmYaTWc0Q1Vj5z/7hM5jAg5hON vLbWtKjblO7D/qQbeIyLtKxLcc8D4sJ0oF7k/gEVQrrK5+9OX4QC4WdIRoHiP9x1wOws rZtIl/LN0j80+kzor5iyvXSd5w17uGtYs1XggOYc+48KuGGTaVVcaQksk66X7ha4lVYW NSvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734021860; x=1734626660; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n0S4h4bjQHNxCguBepnEcHHxqvMFu2otDmuUiyFjCFo=; b=dz51QaxmYkVADteL9xcvHZ22g50xsA61kuY80fxoY+bzh12wi4nULUEgDaZ8UUBsmJ 9WSrODZPfsqN8rrXX6Jihb9/lv5zgGIfYS9q/CAsWFPS+qQIiTpk6vFCXpreYSrrHm/e TMp+4LogentZNUWx8ShY1S0z2wR0u7HmUtMWgOuxFXl+SJnT9wpNzW6hGapRuiZYjs3c /0A9ZiS5JHfwgjMlDW2AQ0KYFkbtnxdRvsyTJVTTiMpRjcuRDh/c/VQl/1rRqRIxeBf/ +/qudcbboU9Ks0XMUZNHSkR5+8mex2hFWOrZYa+k/B4xORidRnUzz5obLJ+UKYIqVNNP R21g== X-Gm-Message-State: AOJu0Yzakb0zePGwmt1DRf93viuuP8SsGoxnK8aZNer593+8X1sdHqw5 /STtGqBuKSHz0ZXh8DnGxlIXSrCuyK+x1ALd5qKL9zglx5VPiERTolLZaA== X-Gm-Gg: ASbGncsU+sa+5EgEWAweipkoCiO7O3/F1YtKAMztEMHy/IDRToOAFJcvZF2UQ3YHyHa vYZwHpGTJw0LtnR508VgrRS7wmySktYr4lm+S5rJky4RcGUYRR2s/u/FqLXjb9hJfMnKsCttkEC ubhHRpSVg4BljMtfVaNVayzMyfaC+hh6KHdivNeiaUwX1LJjNE2GIdOQjh+UjCJK1vqiMpVXcJL rfdEPxJxKZ0phszz2VVFNaZXNy/5dqJbImHB4XSmHpeu+gB+yHPfTUoFtM/hzxUgQVT+1HBnUWO X-Google-Smtp-Source: AGHT+IHSNn8li5showmsXB9PFSvOT35ezcW/DrXyZD3tC21NcKwW7yA+CxFAbb8hN8c7lE8q2PMf0g== X-Received: by 2002:a05:6000:2702:b0:386:5b2:a9d9 with SMTP id ffacd0b85a97d-3864cea05b0mr4839078f8f.53.1734021859844; Thu, 12 Dec 2024 08:44:19 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824a4815sm4473331f8f.26.2024.12.12.08.44.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 08:44:18 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCHv2 1/5] busybox: add klogd service to FILES Date: Thu, 12 Dec 2024 16:55:22 +0100 Message-ID: <20241212164407.2904755-2-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241212164407.2904755-1-adrian.freihofer@gmail.com> References: <20241212164407.2904755-1-adrian.freihofer@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 ; Thu, 12 Dec 2024 16:44:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208654 From: Adrian Freihofer busybox syslog.service file contains: Also=busybox-klogd.service That's why busybox-klog.service got automatically added to FILES:busybox-syslog. Since this incorrect auto adding feature gets dropped from systemd.bbclass this needs to be added explicitly. Signed-off-by: Adrian Freihofer --- meta/recipes-core/busybox/busybox.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 67a9111e5bd..f778cff0f4a 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -24,7 +24,14 @@ EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${ PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" FILES:${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" -FILES:${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_system_unitdir}/syslog.service ${sysconfdir}/default/busybox-syslog" +FILES:${PN}-syslog = "\ + ${sysconfdir}/init.d/syslog* \ + ${sysconfdir}/syslog-startup.conf* \ + ${sysconfdir}/syslog.conf* \ + ${systemd_system_unitdir}/syslog.service \ + ${systemd_system_unitdir}/busybox-klogd.service \ + ${sysconfdir}/default/busybox-syslog \ +" FILES:${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*" FILES:${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" FILES:${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" From patchwork Thu Dec 12 15:55:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 54004 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 5B57DE77180 for ; Thu, 12 Dec 2024 16:44:32 +0000 (UTC) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.groups.io with SMTP id smtpd.web11.24072.1734021863353058701 for ; Thu, 12 Dec 2024 08:44:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YXkPElCL; spf=pass (domain: gmail.com, ip: 209.85.128.43, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4361815b96cso5986415e9.1 for ; Thu, 12 Dec 2024 08:44:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734021861; x=1734626661; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W4hjuVLZ/5K/WaoiI93KOQT7qScWedFSOcLBYP6wqJc=; b=YXkPElCLqBwTMkx8voLeOXzf6XMkVaDDMSQEtF+3qlLbSp2QD7Cc40R58dOpmo2ZeO 1oOzrpF9r2/WsWE+jRqpZSD518tyYls9+/qStWg90l9Or7RXxsppaiqsxXN4LXxPFWwf qjZmLd7Ax2O6ATQRfXXfXQraqgiftYJ+tbSC8BahEVZLDLjLD/HKTJuU0xcCu3u7Ry6d TTmCifxV2W53bG2+uVmisJ7RB5sBpWzAOh/BTwLNW1v1G4QtOz4lO+kU5WkCHTZPFFw5 qNzH4E5+BVQceEFSdRqR8QX5ulnZvE7oqV+Jj2M1+LIjd2r64+IkHfjqWOPuZg9JrG6M RbdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734021861; x=1734626661; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W4hjuVLZ/5K/WaoiI93KOQT7qScWedFSOcLBYP6wqJc=; b=aFgK7ag2028slcw9o7b4GH5TKeSFTYUzeeYWVu6oaIAR0kikWTkCz+VGKNycDiUZFH wl4kRvKgjqxbuQI7XBjAa1kZo38oO1JNFLCaHj9/jJ8JWMyQTuhNsY77dbleZE1drzA1 nIZFUG7qtnhnWLqir0Il7sK7IDHiJeZ4bH3dz2IYMNLBTmm7dhxemF96AOwriaGsibZB VHWoD7vH15YeAo899gb1cwn0fH2m5usH5/5ysN7JkSqusDZyj/p5BFKNg4Wf8KUPm6HJ S85OX7KgduUOGT1rL8oFP++GA5M17bUObWtb5LhQyVvSLUHAxL05wn/ZKzISVDrG/QfW GQsQ== X-Gm-Message-State: AOJu0Yw5GsWsZhNZ3TLgquoIdzr2tOHo3q6iMrct51EvrRbfNXUD5Yv3 IBRIBacegzX6lCLZ4+Cm2bF3tleAeamxX1x6r4WATfdDUwsqbLBCkula9g== X-Gm-Gg: ASbGncvaty/s7+HPb/b3m9fM2KpfchOqAMQ9Xi9wSY9gBgNH5Ijewq3izjWeBAtw+RL H1Ct2RhvYQ4TzvbOgUIkwMx2P7dh/7kwiag7Utjpu7n8OTzJbBWQZz27CFcWkJyGNTVhGvFhkcb obj+ymoALoI8wCAbYXnbulBH/Aph+yohWP/KZzK1fAXX5c8JZRMoovUlnvHS4ZW6+fk2F05xR9O QNM70ODa0QUprEaPyaOV+os6FZ7rM6yJsYhd7IOKC6uzU6hnGfkhaxsu+RibDrMG5KJTiAOl1ER X-Google-Smtp-Source: AGHT+IFL9CCjzybPWaoxxPoYgB+JpQpaP9OlSlJBk8anQ783bds2JMNm6qV1L9N2vgmj2D3PhPvYog== X-Received: by 2002:a05:6000:1ac8:b0:386:32cb:4aa with SMTP id ffacd0b85a97d-3864ce93bb1mr5911569f8f.45.1734021861314; Thu, 12 Dec 2024 08:44:21 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824a4815sm4473331f8f.26.2024.12.12.08.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 08:44:20 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCHv2 2/5] dropbear: add dropbearkey.service to FILES Date: Thu, 12 Dec 2024 16:55:23 +0100 Message-ID: <20241212164407.2904755-3-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241212164407.2904755-1-adrian.freihofer@gmail.com> References: <20241212164407.2904755-1-adrian.freihofer@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 ; Thu, 12 Dec 2024 16:44:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208655 From: Adrian Freihofer dropbear.socket file contains: Also=dropbearkey.service That's why dropbearkey.service got automatically added to FILES. Since this incorrect auto adding feature gets dropped from systemd.bbclass this needs to be added explicitly. Signed-off-by: Adrian Freihofer --- meta/recipes-core/dropbear/dropbear_2024.86.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-core/dropbear/dropbear_2024.86.bb b/meta/recipes-core/dropbear/dropbear_2024.86.bb index e3f4d17896c..be246a0ccd5 100644 --- a/meta/recipes-core/dropbear/dropbear_2024.86.bb +++ b/meta/recipes-core/dropbear/dropbear_2024.86.bb @@ -129,3 +129,5 @@ pkg_postrm:${PN} () { } CONFFILES:${PN} = "${sysconfdir}/default/dropbear" + +FILES:${PN} += "${systemd_system_unitdir}/dropbearkey.service" From patchwork Thu Dec 12 15:55:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 54006 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 64DC5E7717F for ; Thu, 12 Dec 2024 16:44:32 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.web10.23994.1734021865587328514 for ; Thu, 12 Dec 2024 08:44:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kyjs/PGx; spf=pass (domain: gmail.com, ip: 209.85.221.45, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-385e1fcb0e1so442257f8f.2 for ; Thu, 12 Dec 2024 08:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734021864; x=1734626664; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k4rl2mFQyq/4wW6LlLbou5q/REaODnyWSsEkDxQEOnI=; b=kyjs/PGx5XH6jnkOy4SJha9nBngrJ2nA8V7pAa6nX8mmkpFAsVvjJ4/TI3nZOjZYML Ozz/eUPUjEHkx4owEnOT6neegdSjebbpVMlFAZzXNR8xBm5KTBDzS4diTtQo5uDN1t3W Xg/OWN6wJ/yfkGfyRwnukRVDbG+uMe9qXWoltb8M1PTbZ00VbIONhD5DhvFyBXupNR8n qUrZiv3OpGL1BDKtgvTh33ue5wvREhk7cPYV28CSgJshGpHS9FDrqNRNRh7qUpyRxi3Y Xcgq2zeRxGekTbBt9RZvrm3MJQVmqkl9WuxWu3ZagX7Gd8Wu8tesyHeEsyTldq5OITQc tlXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734021864; x=1734626664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k4rl2mFQyq/4wW6LlLbou5q/REaODnyWSsEkDxQEOnI=; b=rWADGfFIvCYLClDJ4eGk0CWPqP5C+T3rU4XUDjjLZLu8rtYuLch3p5blP+AQFGZb8r RWecydPOG+MHKb1Mtw5sq46ls0vkcODq9+C52w7+2mkRnN+iMmwkUKw7HzXZDbrfnNkK +sv93yYKpHUVLKJ9iJnZLOljxbuMeRoz5AHT5T+F6QzMgtvsYphRS1rk2KMmRQG1j+He ZwVSJRvNMeB7F7ckDXHbUydWxFf7AsOmrvvexGX+7PBEFtbpORv7hq8TMU22EDh6bXDX yAfHC5ad0+mE9wdKgk3WyXxHG3qQzkYeA52ZrAn7lZaclx2u+YzmHdtTylhoBNAcABk4 9Cow== X-Gm-Message-State: AOJu0Yw22t2mPPgYGU2UfOmeE0dBOLMMJzve3Od1Qm6VxgKMpz/ML98E 91EV4alU23jO5zkJgzkXIZxbmZaVO832yEjLPlUhviEZepu9ULl29VWVLg== X-Gm-Gg: ASbGnctwtXqXKZI+eodTOASdOBFF3ufBtKbBYVj466FMQ6AbDHmg9Lfxi7l5gMt7YGw nndUH+EOa9t696d7tY3oB/ySCgRffz6c0w83g2lJT80zZZTO3cn8MNoufkZFCtVJoTky1HaxeZL +mxWNd9kQ5tQwhxcFh/xfLLRBHhmW0a6h9V4NunYj5Jgu0Qf8BEQiEIQ2OTstwC0y3SCJ9AgQkg ezAwVYOY4Myx2T159iUN9NdoUWSpIxHxvGH/wIv6oB1fj/UImFyqBcsA5/4xdJ/SkXQ8FIGzEHa X-Google-Smtp-Source: AGHT+IHfDZvcg6hj037UmEWkeORs0yvlO8sPc3awTgyzU0aK1+R1FsV+4mRHobhU0QiZl57GlEe4qg== X-Received: by 2002:a5d:5f89:0:b0:385:e0ea:d4e7 with SMTP id ffacd0b85a97d-3864ced3a1bmr6863404f8f.55.1734021863459; Thu, 12 Dec 2024 08:44:23 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824a4815sm4473331f8f.26.2024.12.12.08.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 08:44:22 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCHv2 3/5] systemd.bbclass: refactor adding files Date: Thu, 12 Dec 2024 16:55:24 +0100 Message-ID: <20241212164407.2904755-4-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241212164407.2904755-1-adrian.freihofer@gmail.com> References: <20241212164407.2904755-1-adrian.freihofer@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 ; Thu, 12 Dec 2024 16:44:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208656 From: Adrian Freihofer The keys variable was intended as an array of keys. But it looks like this has not been used for more than 10 years now. Adding files automatically to packages needs probably anyway very specific code rather than a generic loop. Lets simplify this a bit. Using python code should also not be slower for these usually small files. Signed-off-by: Adrian Freihofer --- meta/classes-recipe/systemd.bbclass | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/meta/classes-recipe/systemd.bbclass b/meta/classes-recipe/systemd.bbclass index 7324af8555d..be77da48125 100644 --- a/meta/classes-recipe/systemd.bbclass +++ b/meta/classes-recipe/systemd.bbclass @@ -124,29 +124,26 @@ python systemd_populate_packages() { return appended # Add systemd files to FILES:*-systemd, parse for Also= and follow recursive - def systemd_add_files_and_parse(pkg_systemd, path, service, keys): + def systemd_add_files_and_parse(pkg_systemd, path, service): # avoid infinite recursion if systemd_append_file(pkg_systemd, oe.path.join(path, service)): fullpath = oe.path.join(d.getVar("D"), path, service) if service.find('.service') != -1: # for *.service add *@.service service_base = service.replace('.service', '') - systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service', keys) + systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') if service.find('.socket') != -1: # for *.socket add *.service and *@.service service_base = service.replace('.socket', '') - systemd_add_files_and_parse(pkg_systemd, path, service_base + '.service', keys) - systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service', keys) - for key in keys.split(): - # recurse all dependencies found in keys ('Also';'Conflicts';..) and add to files - cmd = "grep %s %s | sed 's,%s=,,g' | tr ',' '\\n'" % (key, shlex.quote(fullpath), key) - pipe = os.popen(cmd, 'r') - line = pipe.readline() - while line: - line = line.replace('\n', '') - systemd_add_files_and_parse(pkg_systemd, path, line, keys) - line = pipe.readline() - pipe.close() + systemd_add_files_and_parse(pkg_systemd, path, service_base + '.service') + systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') + # Add all units which have an Also= referring a unit in this package to this package as well. + with open(fullpath, 'r') as unit_f: + for line in unit_f: + if line.startswith('Also'): + also_unit = line.split('=', 1)[1].strip() + bb.warn("also: %s" % also_unit) + systemd_add_files_and_parse(pkg_systemd, path, also_unit) # Check service-files and call systemd_add_files_and_parse for each entry def systemd_check_services(): @@ -155,7 +152,6 @@ python systemd_populate_packages() { searchpaths.append(d.getVar("systemd_user_unitdir")) systemd_packages = d.getVar('SYSTEMD_PACKAGES') - keys = 'Also' # scan for all in SYSTEMD_SERVICE[] for pkg_systemd in systemd_packages.split(): for service in get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd).split(): @@ -179,7 +175,7 @@ python systemd_populate_packages() { break if path_found != '': - systemd_add_files_and_parse(pkg_systemd, path_found, service, keys) + systemd_add_files_and_parse(pkg_systemd, path_found, service) else: bb.fatal("Didn't find service unit '{0}', specified in SYSTEMD_SERVICE:{1}. {2}".format( service, pkg_systemd, "Also looked for service unit '{0}'.".format(base) if base is not None else "")) From patchwork Thu Dec 12 15:55:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 54005 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 69BB6E77183 for ; Thu, 12 Dec 2024 16:44:32 +0000 (UTC) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mx.groups.io with SMTP id smtpd.web10.23995.1734021866865706399 for ; Thu, 12 Dec 2024 08:44:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IG8IVA9N; spf=pass (domain: gmail.com, ip: 209.85.221.46, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-385f06d0c8eso433304f8f.0 for ; Thu, 12 Dec 2024 08:44:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734021865; x=1734626665; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3cNNviIoa8QXy0mweKmzVrVZKmKqQ21eUG0Zu1E6tlc=; b=IG8IVA9N1g0m2gksIUV6UdNAwnaXNVoRpAd8ZjPNbIiqXUJf1bvGoX2EAPyCA+W0xk 8yTrFqY5+8KACiTzuD6SaGr+fKfqh3GWx9Otjv6QmDFcfGife0I7n/3hrBlKXFGkUowh 41jO6zo+kXAOB6DPlKPRKk3JWjAatP/0/rZUjSstzvDFA7yzaQtqIAIQ1mxdRxQwg22v 52HxAe9jHuIwm/FZirNitEp1XfXJRNVp1MRYj5lu5wotExpU3MDfwDksmHdeT0Pb+k2m bcUOD0dP+SGSKrhRJgBvcQLwvr8oKTQXBNFNVu5hvfXj3rIA7j76HOURssE9/bnSaWDQ fBWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734021865; x=1734626665; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3cNNviIoa8QXy0mweKmzVrVZKmKqQ21eUG0Zu1E6tlc=; b=beJf9Brz50wlZnN6Z4zeppBX0LqL8R+RBT40kDb6FtoXdd8nNEOlx8h0IQvKD2Nuqk 9vCSQP7mxsh+y/HdQQCT19A7fabSBlW7Q4Yy75XMHjQjVcg6TnBH992NEbolrx/MOMJs RkiW8BX/Drq7fp4Rs3U2SLU5TaIdp6dO6nzUQKajoS4mf/ziCqITP6j6j9Il9aQ7Vn/7 CzFAp3o99TOjQglLBIEn23Lz7zl3VFkjDa2sJx5tQ7jiLy6ODCmQH6kAWpOWgIDjlqeF SlvD3+QRPxj1xb/RnOdKxU8jfr6dGfPZxDxAveMi/fYYvLvE5o8a3yAJli0fB1nDoJqA dIPw== X-Gm-Message-State: AOJu0Yy1ohNH+UHEVpr6ifASu8y6UW4a9OXn8tUfbRPpFI6ME6qDv7M9 WAoX+zmChuBOhs2AKUMkmZoIMXIh4rgr0PPGAIAqgdx3VBxPJb6/QHDeDQ== X-Gm-Gg: ASbGncuCIN3dtv4F5oiAJzh6n8bHMWkqlu8DTu/Et5Ym2RacLYsMXsztBTBb3vZ26Xe 1PyP2ez5wAudkj4akMB31UZU4mwfVfdh+uufbcfG8K5oenZYRkEOBGRQN5H91GDB7fK594//kcd ad0kUuJJMNIlW+iwOkEOFBNPSi6ooLZ3tevCl2NQ0Ys/N/7Plu0DFwYCIGQPA1YSoIXvnvXkx3L IRuuu1qPxdkVf77mUUtdV94yaLgcZI8J1UacCC6G60TvGn5w0nAJlh+SnZt+/b4gnw1zkjF9F9V X-Google-Smtp-Source: AGHT+IEsp5Ny6jIK33MEmPr+ZDRTqFcyiilPNP/i3XYWYYs9TzJR7O6b6Da25xjrK9zdJeTaFNybEg== X-Received: by 2002:a05:6000:785:b0:385:db11:badf with SMTP id ffacd0b85a97d-3864ce54346mr6045598f8f.22.1734021864822; Thu, 12 Dec 2024 08:44:24 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824a4815sm4473331f8f.26.2024.12.12.08.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 08:44:23 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCHv2 4/5] systemd.bbclass: do not automatically add Also services Date: Thu, 12 Dec 2024 16:55:25 +0100 Message-ID: <20241212164407.2904755-5-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241212164407.2904755-1-adrian.freihofer@gmail.com> References: <20241212164407.2904755-1-adrian.freihofer@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 ; Thu, 12 Dec 2024 16:44:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208657 From: Adrian Freihofer Starting a systemd service “Also” does not mean that both services must be in the same package. However, the systemd.bbclass enforces this. Example: a.service: [Install] Also=b.service If a.service is packed in package A, b.service is automatically packed into package A as well. This happens even if b.service is explicitly added to package B using FILES and SYSTEMD_SERVICE variables. The automatic packing of socket files with the corresponding service files is probably a widely used feature of systemd.bbclass. This bahavior does not change. Adding regular service files to a package just because it is another service in the same package that "Also" uses the service is a bug that this commit fixes. Signed-off-by: Adrian Freihofer --- meta/classes-recipe/systemd.bbclass | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/classes-recipe/systemd.bbclass b/meta/classes-recipe/systemd.bbclass index be77da48125..4b4470b7b34 100644 --- a/meta/classes-recipe/systemd.bbclass +++ b/meta/classes-recipe/systemd.bbclass @@ -132,18 +132,18 @@ python systemd_populate_packages() { # for *.service add *@.service service_base = service.replace('.service', '') systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') + # Add the socket unit which is referred by the Also= in this service file to the same package. + with open(fullpath, 'r') as unit_f: + for line in unit_f: + if line.startswith('Also'): + also_unit = line.split('=', 1)[1].strip() + if also_unit.find('.socket') != -1: + systemd_add_files_and_parse(pkg_systemd, path, also_unit) if service.find('.socket') != -1: # for *.socket add *.service and *@.service service_base = service.replace('.socket', '') systemd_add_files_and_parse(pkg_systemd, path, service_base + '.service') systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') - # Add all units which have an Also= referring a unit in this package to this package as well. - with open(fullpath, 'r') as unit_f: - for line in unit_f: - if line.startswith('Also'): - also_unit = line.split('=', 1)[1].strip() - bb.warn("also: %s" % also_unit) - systemd_add_files_and_parse(pkg_systemd, path, also_unit) # Check service-files and call systemd_add_files_and_parse for each entry def systemd_check_services(): From patchwork Thu Dec 12 15:55:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 54007 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 79A7EE77184 for ; Thu, 12 Dec 2024 16:44:32 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.web11.24074.1734021868234631706 for ; Thu, 12 Dec 2024 08:44:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ak0+uhm/; spf=pass (domain: gmail.com, ip: 209.85.128.54, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-435f8f29f8aso6224665e9.2 for ; Thu, 12 Dec 2024 08:44:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734021866; x=1734626666; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Jjh5nCafTZUhI9d3Y54APbXVq79WTV2k004+X6P2lSE=; b=Ak0+uhm/F0COfAy7uVjsb1je1uXmuBoJJT7Ha+wj2Pmp83x0ODF+dDLAwgTCA+TXYj Nuw+lpUuuVAojp1jyqm5oDnth5SkUTWOmBcaVV0djq6OQ/h7nfgbXwoaav5WIDoldA5N mG/J5PkHRvrhS40JR6w3M2qmrIAFvmsJl7Vx4kaMbFH46jE9rCmw3CydpmaINAd7Rbhq xzgezgbdHLfvNVrV/yz247NVhssTiv4CJXgPrMOhym/VSDo0tuL8enQ80VSwQzN0yZzm 88JqvA94P/g+vMWBxYgt3vNGDTTXXszgAgbYbJYksCLN88YHqFaAF+r6GqJtyOHh2knZ iRcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734021866; x=1734626666; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jjh5nCafTZUhI9d3Y54APbXVq79WTV2k004+X6P2lSE=; b=tchaV3yLKEDa3XCTjKLSuv3XjQmcWZbwNb0k3PwZfTMeXrj9A+vegz91IXxNN8rEp1 9TNDqRJ0W5iYhaoz7ea6EPBEkSek5OQQpHrssFoTp0ERq+I23O/obI5DY3KQZPwv9Zqr KbmuwI8KjiIKYnvE8Y+9EjCW2kwrDamf6vde5VMkjJZ68w1pMDL6+PLY2NcYttncnWPT nxH4jbDyYGycJBzYhkBcF1kwXbcdUJdZEowsY8g6gRC4duHokgapdbZHtpdyTIDf2X3F efGWLjjTFKfV9pjmymvj4/sJSO/amUAA4M4cAlAgrL68cA4qDMN37pceDt4ZoYxGdvdO QqHg== X-Gm-Message-State: AOJu0YxnshKOFgGhYmDJlhB+j3xEy/wH5l0fi0NZRcmrr+AQeYVtFCHW Z8EG6ga+lvkyrnThjfD2epBMyrawUJm9cCDBghaaM6RsxUSgPjpXNQYBsA== X-Gm-Gg: ASbGncvt/QizxxPAQlxF2oHD1Wx5lyiLTZYdDEUkwUAGg30u7uUR65xXxSvQ7/mkL8T a0DdzGArZ0a+rjYqqOUzz+4/p+2z0UuKkZvEmzjQWZhshFhZ6siBJWfCCZZtZTgYI6JYr8ONRMq E+RoSnPqPKgvB7Ch+0hsqsrhIRlCJ4YhGNTek1cOVH6CVn4kagKYbNfszT0o5KxLkLyIehPaDWP Le0D8QuyMi9uKe+joSavm2hyOvvGtmUyk0jeSKlfziHl4uMrtaihDVBaF7RDTfWAYytpZ39pQua X-Google-Smtp-Source: AGHT+IFzmBQe2QSJ9GnZS4kFCN6d/JEMpudo7BRjjZrYfARq1gxTOqQSgZTNt12prPxgialsQtb+dQ== X-Received: by 2002:a5d:64aa:0:b0:385:e0d6:fb48 with SMTP id ffacd0b85a97d-3864ce894b6mr7155634f8f.7.1734021866270; Thu, 12 Dec 2024 08:44:26 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824a4815sm4473331f8f.26.2024.12.12.08.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 08:44:25 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCHv2 5/5] systemd: split networkd into its own package Date: Thu, 12 Dec 2024 16:55:26 +0100 Message-ID: <20241212164407.2904755-6-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241212164407.2904755-1-adrian.freihofer@gmail.com> References: <20241212164407.2904755-1-adrian.freihofer@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 ; Thu, 12 Dec 2024 16:44:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208658 From: Adrian Freihofer Support of images with different network management implementations without having to recompile systemd and other components. Fedora does this as well since systemd version 246.6-2: https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec#_578 This proves that it is technically possible and officially supported by systemd. Signed-off-by: Adrian Freihofer Signed-off-by: Adrian Freihofer > --- meta/recipes-core/systemd/systemd_256.8.bb | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/systemd/systemd_256.8.bb b/meta/recipes-core/systemd/systemd_256.8.bb index c1915d7e941..0710377d32d 100644 --- a/meta/recipes-core/systemd/systemd_256.8.bb +++ b/meta/recipes-core/systemd/systemd_256.8.bb @@ -412,6 +412,7 @@ PACKAGE_BEFORE_PN = "\ ${PN}-journal-remote \ ${PN}-kernel-install \ ${PN}-mime \ + ${PN}-networkd \ ${PN}-rpm-macros \ ${PN}-udev-rules \ ${PN}-vconsole-setup \ @@ -440,6 +441,7 @@ SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfm ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)} \ " SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" @@ -448,12 +450,13 @@ USERADD_PACKAGES = "${PN} \ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)} \ " GROUPADD_PARAM:${PN} = "-r systemd-journal;" GROUPADD_PARAM:udev = "-r render" GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" -USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}" +USERADD_PARAM:${PN}-networkd = "--system -d / -M --shell /sbin/nologin systemd-network" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${datadir}/polkit-1 polkitd;', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}" @@ -620,6 +623,27 @@ FILES:${PN}-extra-utils = "\ FILES:${PN}-mime = "${MIMEDIR}" RRECOMMENDS:${PN} += "${PN}-mime" +FILES:${PN}-networkd = "\ + ${bindir}/networkctl \ + ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \ + ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ + ${datadir}/polkit-1/actions/org.freedesktop.network1.policy \ + ${nonarch_libdir}/sysusers.d/systemd-network.conf \ + ${nonarch_libdir}/tmpfiles.d/systemd-network.conf \ + ${sysconfdir}/systemd/networkd.conf \ + ${systemd_system_unitdir}/systemd-networkd* \ + ${systemd_unitdir}/network/*.network \ + ${systemd_unitdir}/network/*.network.example \ + ${systemd_unitdir}/networkd.conf \ + ${systemd_unitdir}/systemd-networkd* \ +" +# systemd-networkd-persistent-storage.service BindsTo=systemd-networkd.service +# systemd-networkd.service has Also=systemd-networkd-wait-online.service +SYSTEMD_SERVICE:${PN}-networkd = "systemd-networkd.service" +CONFFILES:${PN}-networkd = "${sysconfdir}/systemd/networkd.conf" +RDEPENDS:${PN}-networkd += "${PN}" +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)}" + FILES:${PN}-udev-rules = "\ ${nonarch_libdir}/udev/rules.d/70-uaccess.rules \ ${nonarch_libdir}/udev/rules.d/71-seat.rules \ @@ -630,7 +654,6 @@ FILES:${PN}-udev-rules = "\ CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ ${sysconfdir}/systemd/journald.conf \ ${sysconfdir}/systemd/logind.conf \ - ${sysconfdir}/systemd/networkd.conf \ ${sysconfdir}/systemd/pstore.conf \ ${sysconfdir}/systemd/resolved.conf \ ${sysconfdir}/systemd/sleep.conf \ @@ -698,7 +721,6 @@ FILES:${PN} = " ${base_bindir}/* \ ${nonarch_libdir}/modprobe.d/README \ ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', d)} \