* [Buildroot] [PATCH] package/opendoas: new package
@ 2026-04-11 8:06 Francois Perrad via buildroot
2026-04-12 10:40 ` Julien Olivain via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Francois Perrad via buildroot @ 2026-04-11 8:06 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/opendoas/Config.in | 9 ++++++
package/opendoas/opendoas.hash | 3 ++
package/opendoas/opendoas.mk | 50 ++++++++++++++++++++++++++++++++++
5 files changed, 64 insertions(+)
create mode 100644 package/opendoas/Config.in
create mode 100644 package/opendoas/opendoas.hash
create mode 100644 package/opendoas/opendoas.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index f8c71d679..3ec8a16a8 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1197,6 +1197,7 @@ F: package/lua*
F: package/lynis/
F: package/lzlib/
F: package/moarvm/
+F: package/opendoas/
F: package/perl*
F: package/pkg-perl.mk
F: package/pkg-luarocks.mk
diff --git a/package/Config.in b/package/Config.in
index fbc2605ff..77af2c332 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2746,6 +2746,7 @@ comment "Utilities"
source "package/lowdown/Config.in"
source "package/minisign/Config.in"
source "package/neofetch/Config.in"
+ source "package/opendoas/Config.in"
source "package/pdmenu/Config.in"
source "package/pinentry/Config.in"
source "package/qprint/Config.in"
diff --git a/package/opendoas/Config.in b/package/opendoas/Config.in
new file mode 100644
index 000000000..f359ed576
--- /dev/null
+++ b/package/opendoas/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_OPENDOAS
+ bool "opendoas"
+ depends on BR2_USE_MMU # fork()
+ select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
+ help
+ OpenDoas: a portable version of OpenBSD's doas command.
+ doas is a minimal replacement for the venerable sudo.
+
+ https://github.com/Duncaen/OpenDoas
diff --git a/package/opendoas/opendoas.hash b/package/opendoas/opendoas.hash
new file mode 100644
index 000000000..ada1835f5
--- /dev/null
+++ b/package/opendoas/opendoas.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 6da058a0e70b7543bc60624389b0b00b686189ec933828c522bf8b2600495a67 opendoas-6.8.2.tar.gz
+sha256 293e7f2bc3a06396b200956cd660cd101bdb3c109f31c9ab6f2547f2105b38af LICENSE
diff --git a/package/opendoas/opendoas.mk b/package/opendoas/opendoas.mk
new file mode 100644
index 000000000..baeb37e4c
--- /dev/null
+++ b/package/opendoas/opendoas.mk
@@ -0,0 +1,50 @@
+################################################################################
+#
+# opendoas
+#
+################################################################################
+
+OPENDOAS_VERSION = 6.8.2
+OPENDOAS_SITE = $(call github,Duncaen,OpenDoas,v$(OPENDOAS_VERSION))
+OPENDOAS_LICENSE = ISC
+OPENDOAS_LICENSE_FILES = LICENSE
+
+OPENDOAS_CONF_OPTS = \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-shadow
+
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+OPENDOAS_DEPENDENCIES += libxcrypt
+endif
+
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+define OPENDOAS_INSTALL_PAM_CONF
+ $(INSTALL) -D -m 0644 $(@D)/pam.d__doas__linux $(TARGET_DIR)/etc/pam.d/doas
+endef
+
+OPENDOAS_DEPENDENCIES += linux-pam
+OPENDOAS_CONF_OPTS += --with-pam
+else
+OPENDOAS_CONF_OPTS += --without-pam
+endif
+
+define OPENDOAS_CONFIGURE_CMDS
+ (cd $(@D) && \
+ $(TARGET_CONFIGURE_OPTS) ./configure $(OPENDOAS_CONF_OPTS))
+endef
+
+define OPENDOAS_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+ CC="$(TARGET_CC)"
+endef
+
+define OPENDOAS_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/doas $(TARGET_DIR)/usr/bin/doas
+ $(OPENDOAS_INSTALL_PAM_CONF)
+endef
+
+$(eval $(generic-package))
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] package/opendoas: new package
2026-04-11 8:06 [Buildroot] [PATCH] package/opendoas: new package Francois Perrad via buildroot
@ 2026-04-12 10:40 ` Julien Olivain via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Julien Olivain via buildroot @ 2026-04-12 10:40 UTC (permalink / raw)
To: Francois Perrad; +Cc: buildroot
Hi Francois,
On 11/04/2026 10:06, Francois Perrad via buildroot wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Applied to master, thanks. For info, I made few changes:
- add package description in commit log
- add comments justifying the generic-package infra
- add missing dependency on host-bison
See:
https://gitlab.com/buildroot.org/buildroot/-/commit/3d454f76fce239a2d7887a9a04c354fc617059c8
Also, could you consider adding a runtime for this package?
You can probably start from the sudo test::
https://gitlab.com/buildroot.org/buildroot/-/blob/2026.02/support/testing/tests/package/test_sudo.py
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-12 10:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-11 8:06 [Buildroot] [PATCH] package/opendoas: new package Francois Perrad via buildroot
2026-04-12 10:40 ` Julien Olivain via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox