aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-06-17 21:50:16 +1200
committerArslaan Pathan <[email protected]>2026-06-17 21:50:16 +1200
commit1b83d8f91d3310dfa1e80d4a6456c96be385c3f3 (patch)
treeca660cc9ebd2d1004ad3c280b20a59f98285fc43
parent76ab77bb14557f99b942d8d182bab0f04cbdb66e (diff)
downloadyerbalinux-1b83d8f91d3310dfa1e80d4a6456c96be385c3f3.tar.xz
yerbalinux-1b83d8f91d3310dfa1e80d4a6456c96be385c3f3.zip
Add doas to the image!
-rw-r--r--meta-yerba/recipes-core/images/yerba-image.bb2
-rw-r--r--meta-yerba/recipes-support/doas/doas_6.8.2.bb41
2 files changed, 42 insertions, 1 deletions
diff --git a/meta-yerba/recipes-core/images/yerba-image.bb b/meta-yerba/recipes-core/images/yerba-image.bb
index a574801..4fe6219 100644
--- a/meta-yerba/recipes-core/images/yerba-image.bb
+++ b/meta-yerba/recipes-core/images/yerba-image.bb
@@ -20,7 +20,7 @@ IMAGE_INSTALL = "\
dhcpcd \
curl \
wget \
- file
+ file \
"
EXTRA_USERS_PARAMS = "\
diff --git a/meta-yerba/recipes-support/doas/doas_6.8.2.bb b/meta-yerba/recipes-support/doas/doas_6.8.2.bb
new file mode 100644
index 0000000..b01de74
--- /dev/null
+++ b/meta-yerba/recipes-support/doas/doas_6.8.2.bb
@@ -0,0 +1,41 @@
+SUMMARY = "doas - a minimal replacement for sudo"
+DESCRIPTION = "doas is a program originally from OpenBSD that allows users to run commands as other users with a simple configuration."
+HOMEPAGE = "https://github.com/Duncaen/OpenDoas"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=04e889a3020fba01897448b98f439baf"
+
+SRC_URI = "https://github.com/Duncaen/OpenDoas/archive/refs/tags/v6.8.2.tar.gz"
+SRC_URI[sha256sum] = "6da058a0e70b7543bc60624389b0b00b686189ec933828c522bf8b2600495a67"
+
+S = "${WORKDIR}/OpenDoas-6.8.2"
+
+DEPENDS = "libbsd bison-native"
+
+do_compile() {
+ cd ${S}
+ export CC="${CC}"
+ export CFLAGS="${CFLAGS} -I${STAGING_INCDIR}"
+ export LDFLAGS="${LDFLAGS} -L${STAGING_LIBDIR}"
+ ./configure --prefix=/usr
+ oe_runmake
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 4755 ${S}/doas ${D}${bindir}/doas
+
+ install -d ${D}${sysconfdir}
+ echo "permit :wheel" > ${D}${sysconfdir}/doas.conf
+ chmod 0640 ${D}${sysconfdir}/doas.conf
+}
+
+FILES:${PN} = "\
+ ${bindir}/doas \
+ ${sysconfdir}/doas.conf \
+"
+
+pkg_postinst:${PN}() {
+ chmod 4755 $D${bindir}/doas
+}
+
+INSANE_SKIP:${PN} += "ldflags"