+Thu Oct 17 00:00:00 UTC 2019
+ Added support for doas, use it in some places conditionally
+ if sudo is not present. -ng0
+
Mon Oct 14 00:00:00 UTC 2019
- Add 'pretty' make rule to run uncrustify over the source tree.
+ Added 'pretty' make rule to run uncrustify over the source tree.
-ng0
Mon Sep 16 00:00:00 UTC 2019
AC_SUBST(DATAROOTDIR)
# test for sudo
-# TODO: do we need to change anything for "doas" on openbsd?
AC_MSG_CHECKING(for sudo)
AC_ARG_WITH(sudo,
[ --with-sudo=PATH path to sudo binary (or just yes)],
AM_CONDITIONAL([HAVE_SUDO],
[test "x$SUDO_BINARY" != "x" -o -w /])
+# test for doas
+AC_MSG_CHECKING(for doas)
+AC_CHECK_PROGS(DOAS_BINARY, [doas], false)
+AM_CONDITIONAL(HAVE_DOAS_BINARY, test x$DOAS_BINARY != xfalse)
# test for gnunetdns group name
GNUNETDNS_GROUP=gnunetdns
pkgcfg_DATA = \
dns.conf
+if HAVE_SUDO
+SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
+else
+if HAVE_DOAS_BINARY
+SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
+endif
+endif
+
if LINUX
HIJACKBIN = gnunet-helper-dns
install-exec-hook:
- $(top_srcdir)/src/dns/install-dns-helper.sh $(DESTDIR)$(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true
+ $(top_srcdir)/src/dns/install-dns-helper.sh $(DESTDIR)$(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_OR_DOAS_BINARY) || true
else
install-exec-hook:
endif
dist_pkgcfg_DATA = \
exit.conf
+if HAVE_SUDO
+SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
+else
+if HAVE_DOAS_BINARY
+SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
+endif
+endif
+
if LINUX
EXITBIN = gnunet-helper-exit
install-exec-hook:
- $(top_srcdir)/src/exit/install-exit-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
+ $(top_srcdir)/src/exit/install-exit-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
else
install-exec-hook:
endif
$(top_builddir)/src/identity/libgnunetidentity.la \
$(GN_LIBINTL)
+if HAVE_SUDO
+SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
+else
+if HAVE_DOAS_BINARY
+SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
+endif
+endif
+
if LINUX
HIJACKBIN = gnunet-dns2gns
install-exec-hook:
- $(SUDO_BINARY) setcap 'cap_net_bind_service=+ep' $(DESTDIR)$(libexecdir)/gnunet-dns2gns || true
+ $(SUDO_OR_DOAS_BINARY) setcap 'cap_net_bind_service=+ep' $(DESTDIR)$(libexecdir)/gnunet-dns2gns || true
else
install-exec-hook:
endif
pkgcfg_DATA = \
nat.conf
+if HAVE_SUDO
+SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
+else
+if HAVE_DOAS_BINARY
+SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
+endif
+endif
+
if LINUX
NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
NATSERVER = gnunet-helper-nat-server.c
NATCLIENT = gnunet-helper-nat-client.c
install-exec-hook:
- $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
+ $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
else
if XFREEBSD
NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
NATSERVER = gnunet-helper-nat-server.c
NATCLIENT = gnunet-helper-nat-client.c
install-exec-hook:
- $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
+ $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
endif
else
install-exec-hook:
nat.h
libgnunetnatnew_la_LIBADD = \
$(top_builddir)/src/util/libgnunetutil.la \
- $(GN_LIBINTL) @EXT_LIBS@
+ $(GN_LIBINTL) @EXT_LIBS@
libgnunetnatnew_la_LDFLAGS = \
$(GN_LIB_LDFLAGS) $(WINFLAGS) \
-version-info 2:0:0
# test_nat.c
#test_nat_LDADD = \
# libgnunetnat.la \
-# $(top_builddir)/src/util/libgnunetutil.la
+# $(top_builddir)/src/util/libgnunetutil.la
#test_nat_mini_SOURCES = \
# test_nat_mini.c
#test_nat_mini_LDADD = \
# libgnunetnat.la \
-# $(top_builddir)/src/util/libgnunetutil.la
+# $(top_builddir)/src/util/libgnunetutil.la
#test_nat_test_SOURCES = \
# test_nat_test.c
#test_nat_test_LDADD = \
# libgnunetnat.la \
-# $(top_builddir)/src/util/libgnunetutil.la
+# $(top_builddir)/src/util/libgnunetutil.la
#test_stun_SOURCES = \
# test_stun.c
#test_stun_LDADD = \
# libgnunetnat.la \
-# $(top_builddir)/src/util/libgnunetutil.la
+# $(top_builddir)/src/util/libgnunetutil.la
EXTRA_DIST = \
test_nat_data.conf \
test_quota_compliance_wlan_asymmetric
endif
+if HAVE_SUDO
+SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
+else
+if HAVE_DOAS_BINARY
+SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
+endif
+endif
+
if LINUX
install-exec-hook:
- $(top_srcdir)/src/transport/install-wlan-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
+ $(top_srcdir)/src/transport/install-wlan-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
if HAVE_LIBBLUETOOTH
- $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
+ $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
endif
else
install-exec-hook:
pkgcfg_DATA = \
vpn.conf
+if HAVE_SUDO
+SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
+else
+if HAVE_DOAS_BINARY
+SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
+endif
+endif
+
if LINUX
VPNBIN = gnunet-helper-vpn
install-exec-hook:
- $(top_srcdir)/src/vpn/install-vpn-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
+ $(top_srcdir)/src/vpn/install-vpn-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
else
install-exec-hook:
endif