mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
package/opendoas: new package
OpenDoas: a portable version of OpenBSD's doas command. doas is a minimal replacement for the venerable sudo. https://github.com/Duncaen/OpenDoas Signed-off-by: Francois Perrad <francois.perrad@gadz.org> [Julien: - add package description in commit log - add comments justifying the generic-package infra - add missing dependency on host-bison ] Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
9639bb44c7
commit
3d454f76fc
@@ -1205,6 +1205,7 @@ F: package/lua*
|
|||||||
F: package/lynis/
|
F: package/lynis/
|
||||||
F: package/lzlib/
|
F: package/lzlib/
|
||||||
F: package/moarvm/
|
F: package/moarvm/
|
||||||
|
F: package/opendoas/
|
||||||
F: package/perl*
|
F: package/perl*
|
||||||
F: package/pkg-perl.mk
|
F: package/pkg-perl.mk
|
||||||
F: package/pkg-luarocks.mk
|
F: package/pkg-luarocks.mk
|
||||||
|
|||||||
@@ -2747,6 +2747,7 @@ comment "Utilities"
|
|||||||
source "package/lowdown/Config.in"
|
source "package/lowdown/Config.in"
|
||||||
source "package/minisign/Config.in"
|
source "package/minisign/Config.in"
|
||||||
source "package/neofetch/Config.in"
|
source "package/neofetch/Config.in"
|
||||||
|
source "package/opendoas/Config.in"
|
||||||
source "package/pdmenu/Config.in"
|
source "package/pdmenu/Config.in"
|
||||||
source "package/pinentry/Config.in"
|
source "package/pinentry/Config.in"
|
||||||
source "package/qprint/Config.in"
|
source "package/qprint/Config.in"
|
||||||
|
|||||||
9
package/opendoas/Config.in
Normal file
9
package/opendoas/Config.in
Normal file
@@ -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
|
||||||
3
package/opendoas/opendoas.hash
Normal file
3
package/opendoas/opendoas.hash
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Locally computed
|
||||||
|
sha256 6da058a0e70b7543bc60624389b0b00b686189ec933828c522bf8b2600495a67 opendoas-6.8.2.tar.gz
|
||||||
|
sha256 293e7f2bc3a06396b200956cd660cd101bdb3c109f31c9ab6f2547f2105b38af LICENSE
|
||||||
60
package/opendoas/opendoas.mk
Normal file
60
package/opendoas/opendoas.mk
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# opendoas
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
OPENDOAS_VERSION = 6.8.2
|
||||||
|
OPENDOAS_SITE = $(call github,Duncaen,OpenDoas,v$(OPENDOAS_VERSION))
|
||||||
|
OPENDOAS_LICENSE = ISC
|
||||||
|
OPENDOAS_LICENSE_FILES = LICENSE
|
||||||
|
|
||||||
|
OPENDOAS_DEPENDENCIES = host-bison
|
||||||
|
|
||||||
|
# Those options looks like autotools ones, but this package has a
|
||||||
|
# handwritten "configure" script that mimic a subset of autotools.
|
||||||
|
# This is why this package uses the generic-package infra. See:
|
||||||
|
# https://github.com/Duncaen/OpenDoas/blob/v6.8.2/configure
|
||||||
|
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)" \
|
||||||
|
YACC="$(HOST_DIR)/bin/bison -y"
|
||||||
|
endef
|
||||||
|
|
||||||
|
define OPENDOAS_INSTALL_TARGET_CMDS
|
||||||
|
$(INSTALL) -D -m 0755 $(@D)/doas $(TARGET_DIR)/usr/bin/doas
|
||||||
|
$(OPENDOAS_INSTALL_PAM_CONF)
|
||||||
|
endef
|
||||||
|
|
||||||
|
# NOTE: Even though this package has a "configure" script, it is not
|
||||||
|
# generated using autotools, so we have to use the generic package
|
||||||
|
# infrastructure.
|
||||||
|
$(eval $(generic-package))
|
||||||
Reference in New Issue
Block a user