From: Quirin Gylstorff <Quirin.Gylstorff@siemens.com>
To: isar-users@googlegroups.com
Subject: [RFC PATCH 2/2] meta/recipe-support: Use DEBIAN_SYSTEMD_SERVICE variable
Date: Thu, 1 Feb 2024 14:07:42 +0100 [thread overview]
Message-ID: <20240201130752.3734292-3-Quirin.Gylstorff@siemens.com> (raw)
In-Reply-To: <20240201130752.3734292-1-Quirin.Gylstorff@siemens.com>
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
Change recipes to use the new DEBIAN_SYSTEMD_SERVICE variable.
Also add comment to sshd-regen-keys to explain usage of the
old mechanism.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
meta/recipes-support/enable-fsck/enable-fsck.bb | 6 ++----
meta/recipes-support/enable-fsck/files/postinst | 3 ---
.../expand-on-first-boot/expand-on-first-boot_1.4.bb | 7 ++-----
meta/recipes-support/expand-on-first-boot/files/postinst | 3 ---
.../recipes-support/sshd-regen-keys/sshd-regen-keys_0.4.bb | 1 +
5 files changed, 5 insertions(+), 15 deletions(-)
delete mode 100644 meta/recipes-support/enable-fsck/files/postinst
delete mode 100644 meta/recipes-support/expand-on-first-boot/files/postinst
diff --git a/meta/recipes-support/enable-fsck/enable-fsck.bb b/meta/recipes-support/enable-fsck/enable-fsck.bb
index 0413f79d..b68d8f76 100644
--- a/meta/recipes-support/enable-fsck/enable-fsck.bb
+++ b/meta/recipes-support/enable-fsck/enable-fsck.bb
@@ -10,16 +10,14 @@ inherit dpkg-raw
DESCRIPTION = "This service enables fsck on first boot"
DEBIAN_DEPENDS = "systemd, sed, mount, initramfs-tools"
+DEBIAN_SYSTEMD_SERVICE = "enable-fsck.service"
SRC_URI = " \
file://enable-fsck.service \
file://enable-fsck.sh \
- file://postinst"
+ "
do_install() {
- install -d -m 755 ${D}/lib/systemd/system
- install -m 644 ${WORKDIR}/enable-fsck.service ${D}/lib/systemd/system/
-
install -d -m 755 ${D}/usr/share/enable-fsck
install -m 755 ${WORKDIR}/enable-fsck.sh ${D}/usr/share/enable-fsck/
}
diff --git a/meta/recipes-support/enable-fsck/files/postinst b/meta/recipes-support/enable-fsck/files/postinst
deleted file mode 100644
index 1c4c3bdb..00000000
--- a/meta/recipes-support/enable-fsck/files/postinst
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-systemctl enable enable-fsck.service
diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.4.bb b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.4.bb
index 0996000c..a24d1e9c 100644
--- a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.4.bb
+++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.4.bb
@@ -11,16 +11,13 @@ DESCRIPTION = "This service grows the last partition to the full medium during f
MAINTAINER = "isar-users <isar-users@googlegroups.com>"
DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), util-linux"
+DEBIAN_SYSTEMD_SERVICE = "expand-on-first-boot.service"
SRC_URI = " \
file://expand-on-first-boot.service \
file://expand-last-partition.sh \
- file://postinst"
-
+ "
do_install() {
- install -d -m 755 ${D}/lib/systemd/system
- install -m 644 ${WORKDIR}/expand-on-first-boot.service ${D}/lib/systemd/system/
-
install -d -m 755 ${D}/usr/share/expand-on-first-boot
install -m 755 ${WORKDIR}/expand-last-partition.sh ${D}/usr/share/expand-on-first-boot/
}
diff --git a/meta/recipes-support/expand-on-first-boot/files/postinst b/meta/recipes-support/expand-on-first-boot/files/postinst
deleted file mode 100644
index a190b01a..00000000
--- a/meta/recipes-support/expand-on-first-boot/files/postinst
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-systemctl enable expand-on-first-boot.service
diff --git a/meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.4.bb b/meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.4.bb
index 9ce1d8d8..b6d60814 100644
--- a/meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.4.bb
+++ b/meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.4.bb
@@ -5,6 +5,7 @@ DESCRIPTION = "Systemd service to regenerate sshd keys"
MAINTAINER = "isar-users <isar-users@googlegroups.com>"
DEBIAN_DEPENDS = "openssh-server, systemd"
+# postinst also removes exiting ssh keys
SRC_URI = "file://postinst \
file://sshd-regen-keys.service"
--
2.43.0
next prev parent reply other threads:[~2024-02-01 13:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 13:07 [RFC PATCH 0/2] debianize: Use dh_installsystemd Quirin Gylstorff
2024-02-01 13:07 ` [RFC PATCH 1/2] debianize: use dh_installsystemd to automatically add systemd service Quirin Gylstorff
2024-02-01 13:07 ` Quirin Gylstorff [this message]
2024-02-01 15:16 ` [RFC PATCH 0/2] debianize: Use dh_installsystemd MOESSBAUER, Felix
2024-02-01 15:48 ` Gylstorff Quirin
2024-02-01 15:52 ` Anton Mikanovich
2024-02-15 8:42 ` MOESSBAUER, Felix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240201130752.3734292-3-Quirin.Gylstorff@siemens.com \
--to=quirin.gylstorff@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox