From patchwork Wed Dec 11 21:58:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 53963 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 3FC4BE77180 for ; Wed, 11 Dec 2024 21:59:16 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.groups.io with SMTP id smtpd.web11.6604.1733954347570834024 for ; Wed, 11 Dec 2024 13:59:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IB47WuY7; spf=pass (domain: gmail.com, ip: 209.85.221.52, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3862b364538so691610f8f.1 for ; Wed, 11 Dec 2024 13:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733954345; x=1734559145; 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=IB47WuY7yWz55UZVJ0PTMBwW/ssxQO2PlAK4iusppPH6W+2Bt6zbAvbxmgjg5oT/Ik ovdyuU1x0Vilo+e+Y0Co/nLdr5ku+dlNr9JvXc31N91L4GCxTkPlkhEV3OnoHexZGCOz EawHLb0zA3TL/btI13Pgc/LoERHOqcDu7us8QjtM7AHhsyilvsqFYmegLAr536CpMmyC bBpA6OmNgDzIduMz5viK2YkQr9xUNecag2BULbnDxWJrI8FYlM5LOcr8Y0UkLWY9jzzi 8l6nTr5OqRPGUsFX5WcW3OLlFYfICtCfqNVmVOUpECzzAGytP/xJP1hD3lh+/zIlbh0B nHEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733954345; x=1734559145; 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=A2YNhwXfP1ueUn5ZYBAQ4RGkPoRG9LT/cTO4SYFXm6aIlmqsUgxgDahhfJEFAply2o EOwoQi4uF5QoE+ebtfT/vp5D7O4UWKz/0BYJPrVpaAaPNsIBkmJVXREOi70YWRjzpTs0 jQXcbqpovKe/Re+WhXBaznPWFvW90tsxpXBO6IP6ZzQGnH7fY/cxpARECnOpTGw1yHu9 CyyR9myAnwWBupiNWxEYEpoVEOBf1VkpXEp58GXHUpYPRwjTDaEy+m22yEn5xL+o9qNW k7xGj6LnyiryEpPSchgghGfzm6TI2s2iJoD8XONH6KT0I+6OokskuAHrWm6yCll1NDgq 41XA== X-Gm-Message-State: AOJu0Yyo0QHgZdMMtTkwjSD//nsLzpke2zeGx07NEBfaFkR4rOr81jhr iunOKXwTgwJ2Lexe6fQyoWHFSNjEHY52P5qp76HhkCon7wwCXS3N6Vz9uw== X-Gm-Gg: ASbGncvo42bhXhbL7bKIffkKW7CUzCWXTwhkPu/zD0lqKA46VT03UpVW6U2FXBSw74c uX+SK6fQMbqgrAvjZ8EFmYJsBw3vnWiDG4zuDpLOoOzOrzBK0FroIBcwNyVK4wJaKRTWFbmRsBu 8c+wFo7zwPNQazssFwa07IjRbvYkIpa3x305+LdefC1Rm9DxwGDSDm6+lQI//J5qHn2hmWXBD3v 9asCvHD8h1fnBihJUYd+LwlCQyiieYYiFW9wFlDiqppCyM3z5Or8oXuR14RzoVV6BPrHUbO0g== X-Google-Smtp-Source: AGHT+IH1MuDU0Y2V4nEyCxd67BcyGAO2jZ6WotWjuzqL2VVtDZLU8F5N6UF4N+pjWp0rsPFTI+TTKw== X-Received: by 2002:a05:6000:4609:b0:385:faf5:ebb8 with SMTP id ffacd0b85a97d-387887cd649mr693358f8f.7.1733954345506; Wed, 11 Dec 2024 13:59:05 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824c5c98sm2180792f8f.58.2024.12.11.13.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 13:59:04 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 1/5] busybox: add klogd service to FILES Date: Wed, 11 Dec 2024 22:58:37 +0100 Message-ID: <20241211215859.2187259-2-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241211215859.2187259-1-adrian.freihofer@gmail.com> References: <20241211215859.2187259-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 ; Wed, 11 Dec 2024 21:59:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208612 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 Wed Dec 11 21:58:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 53964 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 5D7F8E77185 for ; Wed, 11 Dec 2024 21:59:16 +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.6558.1733954349590699097 for ; Wed, 11 Dec 2024 13:59:09 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bdiXIveU; 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-385ef8b64b3so5836596f8f.0 for ; Wed, 11 Dec 2024 13:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733954348; x=1734559148; 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=bdiXIveUIUGdpqgr84H6ACoRgY+jBUxxxM90eSyqZrLv5KxLX4QSGjLemNgSIH8sM9 qV8dnSfFq01RZATIf28QlpAcwEhrpfPnHoWYHwaXbE+KlKx6ivARlKqFqoUyfc9vrOHh vzWELQVjT10/e0nMJxeDEArwpWfzIXjJ0gu2DlrUwlBz5WAEvNdLGQaypyHS8R+Mr022 ZQXFQRODwliGxbxLUkMx0Oe5tumCxd9I7dImLlUFgqFLEjjxpr9sZJeQVQwovxcTEHcV 30XAwh44MnDQDs2IZ7/6mNgfMXb/MOcbelf5kOEW/C/ZRyNyic4kFwTQapJ88MWXazjz rJ4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733954348; x=1734559148; 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=V3xUlpD0oYt0bM4JSTMn4yOpH3cuecI+M/xzdTN+0j39gqek0b1TzMxyYPXLwNlfbD krtO3NwUXZijHgtcgVZIyfgmt8Y394Bsdd9SgaOersewZLR5wTSQUj4eg+TLTPA3lSfG 4rBKABWWM02R9QvCPhHpSCNWOmTppFqOlDXLzFqA3Zb8xUcity/dTEHQfyJworQnWd4V UHM7QhFZDQ/bnVNXobDLpvqjOatAssi2C49jimhK5JC10lQNnyVeZEXfdiU559lwzPUQ iFySfmFEdQCDoEpQVhWBlM29t9ReuMBjaJ/sfo//1WXWPbLrOvYqrzBoFj1pE7Maqpo1 RYbA== X-Gm-Message-State: AOJu0YxZMXrgtl0y5pp90vcAt8+2h0P9p30q3MgwlG7XNd9jwJDEKdAB qxgKBx3ijssdpYMVI8xHNiHn9A6R4LjfrKF0d8jTC4sEyq/PNa5wV32vYA== X-Gm-Gg: ASbGncu4+BQRd3N4ieEliQQ7Wn6LT9Oru1E6876XnFwk/maCQ2mxm54FPtvt8whxE9d u0Tcah63q0mS5coRcVSjFIRVC6O8rZ+hyzal0pZ+2DJNO7zs9j5Me6gna9UgA+s76XVY4YAAbLp EfITmI6pZFC0QkFB1UFNPZr4N8orgN2jMqIrOcBW+oqSrIbV0DHyH5G/fmhvvd61K9rz5CALMmV eqReDfBsEClfwGAJsyww3nzX5emmcg2+EI2xMjfAIZfZozBA8djaYxttMufmiqkTQbdFA4BAA== X-Google-Smtp-Source: AGHT+IEbehMb7arB28/gxP6Gpd9BQBMRe91lBIZNQyMI4+cqG3kDcv60qxrOVPFyxRROG5Z4PPGwGw== X-Received: by 2002:a5d:64ad:0:b0:386:4a0d:bb23 with SMTP id ffacd0b85a97d-387876850a3mr956904f8f.11.1733954347573; Wed, 11 Dec 2024 13:59:07 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824c5c98sm2180792f8f.58.2024.12.11.13.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 13:59:06 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 2/5] dropbear: add dropbearkey.service to FILES Date: Wed, 11 Dec 2024 22:58:38 +0100 Message-ID: <20241211215859.2187259-3-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241211215859.2187259-1-adrian.freihofer@gmail.com> References: <20241211215859.2187259-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 ; Wed, 11 Dec 2024 21:59:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208613 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 Wed Dec 11 21:58:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 53962 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 3E033E7717D for ; Wed, 11 Dec 2024 21:59:16 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.web10.6560.1733954351715409635 for ; Wed, 11 Dec 2024 13:59:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CpgyztH9; spf=pass (domain: gmail.com, ip: 209.85.221.49, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3862d16b4f5so727308f8f.0 for ; Wed, 11 Dec 2024 13:59:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733954350; x=1734559150; 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=CpgyztH9aDE+JQeZKgAHboD5elNmEewugp6nCUJ4e9DPVDBwQ79AmWYFlkJNXl3rOB xr6hscLVu1hLnmN00n/0KRsBJmO7pljPJd00s8JLsZ0KKHqnikl2li+olayf7HwlcYwK 0vVDJVYPxFYd083IsQHxGdNodYFtt1E2SgBZRvG07//3Jzc88qlZw5bZfkIbp/8iFO3d ASZszlHEUIPoachpAh0bviUwIIhZVOWb1Ot5WxScyZcBr1jyUZr9/Nqnlkb0u5KoDLMt uS5sp7CbeC7aH8oAp0rKwPzRzjn/5h4+F/yASEskwWAOC57AUTtd8/ellah0AfJvAWMy aYNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733954350; x=1734559150; 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=Y5iAa9MJZ35dL/FuB1KMMvUpyJ+4Hud7f2rePeajW5npOm2FpdpkCsTOLBKtLB6t5O 3LVg6tJE/Za5SylIJ4SU3KyhuBQ+m15OySiOE3rZAtjXlqd2Uzg5wWRA5A3ANrpsd6I0 OiOaJ8m6yELIT6lrzfq8n1B6XoWbEJfiVrsWuA0adejR1sO6C/wUCiPTB69y/bqmeeuU Muppvnqbk7p4QbXrB5Th6nEutfdjIz8PNC7M9PPChtC8OwkuHrubH0knvswJlR2TqInr 2bPw8KsSFExxO1Xn7X+A1ZlyFYyukOfb/m2F6UeUBgDWzY6K9wLRWcvnBPgP4yLzt73q nhLw== X-Gm-Message-State: AOJu0Yxw6hjIgMUpmaGM2VqUGyWTynilrHUNgjTK91XMxjug4S3KtBV4 X7rzzr0ulEXjZ4faA2JeePQQLhsuGK+m3sTDHTuWJpdX4Jhm3L7SkR8kjw== X-Gm-Gg: ASbGnctXzyVERWJkkIYSv5OLfw0jqQaS2N7dV7VE0856pEMO1om1yMpPCdDxtVvcT58 houc19rLfArx9KLttPrMPNeoIrI9IiX+weuOQnWWT4dfr7KfhllMOU1I47m6gwp/bxh+4fDSw42 S1mvio212bbrR74Lnkn9TNjYJgwVafHiGI5Ij3clravIg0rVGOScN//j43laSNjOMEoHduu17Ez 0JouqKdzSiHiytrvMzKSXDTOOXYs/X7zNVegdJtbZV3BAycRlu+xI9CHS0baNdvO0rtUdicuQ== X-Google-Smtp-Source: AGHT+IFt8kaDN2o+fchRAtbp2EQRYmEPsilaZYFpivjkH6mork4w1IxYyLavera5Oe5LuyjAZrITjA== X-Received: by 2002:a05:6000:699:b0:385:ea40:b46b with SMTP id ffacd0b85a97d-387887ac9d0mr629588f8f.4.1733954349698; Wed, 11 Dec 2024 13:59:09 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824c5c98sm2180792f8f.58.2024.12.11.13.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 13:59:08 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 3/5] systemd.bbclass: refactor adding files Date: Wed, 11 Dec 2024 22:58:39 +0100 Message-ID: <20241211215859.2187259-4-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241211215859.2187259-1-adrian.freihofer@gmail.com> References: <20241211215859.2187259-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 ; Wed, 11 Dec 2024 21:59:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208614 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 Wed Dec 11 21:58:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 53965 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 4B290E77183 for ; Wed, 11 Dec 2024 21:59:16 +0000 (UTC) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.web11.6607.1733954353836923002 for ; Wed, 11 Dec 2024 13:59:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Jak9uCDS; spf=pass (domain: gmail.com, ip: 209.85.221.48, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-385e27c75f4so5257598f8f.2 for ; Wed, 11 Dec 2024 13:59:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733954352; x=1734559152; 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=Jak9uCDSGuC02Rq7ndokEx0x/xDnS+Jy7zCSqXeCNpuRxZFToV8U0WQumwXAxzlanC 1YtcqLdvwqGS32y5yA9RuIboyocv5L+UMd+u4dRCAmsGkQ+ZcSSdpqYTWJKL7zRfe7lg 5Ww5FpoUEv9Jl+N2XOtJ6lUCwopNIJTzOy6+C+g2ZqQZGGa7vFsUVMcIy0GZC5Ws2SxA 27Wwb1g9wBJyDrvO7m0jg57MZoaOOZ26w4X8v970wRLXOZ84CuoQv2Qx182ByPYi8Spu rK84xSr2vLJymzFRU6h3Gnk2QGesQBMhZpL/Jbvq8bFN3OxJ39+HIAzB1VH+Q6M05FCL Q7LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733954352; x=1734559152; 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=TgfCK8cYp91Dq+zS44nCuit3e3GiUun3AHCvhF0EwJ4TpWtRdRVHUudeRGzRhYO2zb EdXDsTwsvNI+sFqWMvB+YpThH1fLoWcrc1TNsNMojZ+r6BWixsV+QrTSyu+3WKl8uKSz Yip+7nY3GH9yYvny9zlvwAlOCUu7XVSBGMUpVTCCj18MiDYTISgXxhhWoq1Gm2/wyE6e g/1XMJNC13957/W1AZouYaSPGDZiWJuE7e8l64oHaZ+Bq4riIPTzQNsPBc94jFykivkq 6YBCFr7S24SEAU0PvFef5U1i1hAuCKsljCnIb2/DyrKEL7jjTR4dx0cbRY2rzv/AYzX7 OX+g== X-Gm-Message-State: AOJu0YwzdlHVi3FN1rLeRFQTwqJYwHQqvrGC8EY6D965r4kdvr5tumXN oiZYp1Dgj3sqnGWnSl/x0PmdDxG+9bNIEdXud2t5eXSOi5a68pW3HD+mQQ== X-Gm-Gg: ASbGncv5YHvnucEwPJBxhA4cFv+66SW3g+p9G/Dr28YoR89fQFai2fIk5Y/Ws7VqDMu IE+ec7bWLcDEsEMAmunE4y9PZoS0CeWo/rMxulTD4vhjHjoJ4YaJjF3lsBtsE7CnvoI7Hx2rAYp nrQec3lAPs2a9Rl68lTqciwQvOHaSUUE2CCkeX2gHqMmEGcRtH2LVEiRfovyxeVRtXGDvkkY/Bh DAP6wPscqhEEZs0Wih8W4wsY/pZinOjCamJYgERy5t55XA4gGgOJS2BUFY3c1UWYqLCusJ2pg== X-Google-Smtp-Source: AGHT+IHNYOGOkS6OTmaUERDiuZE9Yi+oytbsBgkouSzy88IukhouFtsHpgJZ2CeVNordmqN2Jq1Cgw== X-Received: by 2002:a5d:6483:0:b0:385:e176:4420 with SMTP id ffacd0b85a97d-3864ce7ff3emr4461562f8f.10.1733954351773; Wed, 11 Dec 2024 13:59:11 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824c5c98sm2180792f8f.58.2024.12.11.13.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 13:59:10 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 4/5] systemd.bbclass: do not automatically add Also services Date: Wed, 11 Dec 2024 22:58:40 +0100 Message-ID: <20241211215859.2187259-5-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241211215859.2187259-1-adrian.freihofer@gmail.com> References: <20241211215859.2187259-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 ; Wed, 11 Dec 2024 21:59:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208615 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 Wed Dec 11 21:58:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 53966 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 4B7B7E77184 for ; Wed, 11 Dec 2024 21:59:16 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web11.6608.1733954355223196902 for ; Wed, 11 Dec 2024 13:59:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CUO63VE9; spf=pass (domain: gmail.com, ip: 209.85.221.43, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3863703258fso685489f8f.1 for ; Wed, 11 Dec 2024 13:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733954353; x=1734559153; 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=2y32TV2a6HlkYt57OuRpiV7oQNAJbYhJOaI+hlxMnUM=; b=CUO63VE9Y5RbKQ/MH95mw6KvvqR4p4JhR6CFcolmzpzSbSsneJJc7ESRJvDbPWcyHV qmulvchbOW9TDKMXU15vaq4z5czzI9q1myvmWR9GvpUC+4CQ596Tkblo9dxxOqJs0tYO MxU/2eckpmwBXLKwngvVaRmd0Glv76RP9BO9OcxbZRwH+V06vA3M6chRrXUCEuqOemhl flIiRuBvbrwuMBO4/DlbVAvcK3KLZACuBTu+/nJ8byF/ejL4KNyZ4H4gQmNGYus2yB3f GOaNJZ7g3DKFUUpgaGPsJDR8APZIOdxVC1rPFHH5Kw2t60vTm1ZIcQKlmcfNiOUzzlJF lO+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733954353; x=1734559153; 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=2y32TV2a6HlkYt57OuRpiV7oQNAJbYhJOaI+hlxMnUM=; b=kMXyGbb2Ij9LlH0pgneLuQchdqmcrdEM3WudMWu/Uw7HPryx9PVy1nL7FVklZ2JERD BoY+QQfTTu8MWkGcQNBBx7c/bXYU6sm+yhOCzGrvbVt67QZbwRze1Pq0Trf+gS8Ns6Sm 8p6GhQxZisN9W8yY+iE7u5jtkmPBxjj7OF7q37B28Z9zKfjW7EJUvdtlIC/nnw2fnj9G sXmUFpPZe82ueUjVIf13uFE3azhuY3l4bza8/jMWPsiywLm/qq5jbZiQyvMLCZX06w56 MTmA/11B1ho5Tu+YfkMYW4KQe5/Z33epPx9vnce2wHGWxsnbdAi1FUukKSEhz7ECqZAO 56xw== X-Gm-Message-State: AOJu0YykCUgKv7JuKILc99s1DLil38M3dkphneeEmftk4aR0MZt7696Y zEy78tsFPZjoJxiyM5k0nltUBwD0uJavCq1IQXLaqG2+v9pkHD2N0DpqnQ== X-Gm-Gg: ASbGnctZmmk3gS8kx4JXRIxf9SPCBoUCByd8PA8yD95z05aqj9uVjXWUDCL8d6k1nOf 5F3aopyitxiAn/DgduETiCJynBfRqsbqBRghtsi2uThn4bjB4H5kUhffYRXiTWTrpH0hCCnBx8D BxkZK//OwcxesN6Rk0LsEAdhAiarLzsfpen1o1xWuwbLDFGXX4Ut6TbL+mE26ZxC8c4AmlPgqvp h5aLi0ePRqjuQ7Ijanl8GDprCqyAHYU58/eybqXp8oZzIlJFOEf4Vxcrsd4gXw7fFhciKf53Q== X-Google-Smtp-Source: AGHT+IFwwV8wtzybfzoy8X5s7K1w0gLPq4vxC5LbJ+g/oJjMdMt4jx9u+Vd8PaMw+eXig7ASxsXhyg== X-Received: by 2002:a05:6000:186e:b0:386:3327:4f21 with SMTP id ffacd0b85a97d-38788858799mr538045f8f.27.1733954353216; Wed, 11 Dec 2024 13:59:13 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824c5c98sm2180792f8f.58.2024.12.11.13.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 13:59:12 -0800 (PST) From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 5/5] systemd: split networkd into its own package Date: Wed, 11 Dec 2024 22:58:41 +0100 Message-ID: <20241211215859.2187259-6-adrian.freihofer@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241211215859.2187259-1-adrian.freihofer@gmail.com> References: <20241211215859.2187259-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 ; Wed, 11 Dec 2024 21:59:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/208616 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 --- meta/recipes-core/systemd/systemd_256.8.bb | 27 +++++++++++++++++++--- 1 file changed, 24 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..ca43c8d2ddb 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" @@ -453,7 +455,7 @@ 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 +622,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 +653,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 +720,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)} \