From: Hugo Villeneuve Date: Thu, 7 Mar 2024 04:37:37 +0000 (-0500) Subject: Add configure option to enable/disable creation of user/group X-Git-Tag: 4.3.4-dev~36^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1820%2Fhead;p=thirdparty%2Fshairport-sync.git Add configure option to enable/disable creation of user/group Useful for Yocto, for example, where groupadd or getenv is not available. Enabled by default, to keep same behavior as before. --- diff --git a/Makefile.am b/Makefile.am index d11f095d..298f59be 100644 --- a/Makefile.am +++ b/Makefile.am @@ -261,7 +261,11 @@ INSTALL_GROUP_TARGET = install-group-local $(INSTALL_GROUP_TARGET): getent group shairport-sync &>/dev/null || groupadd -r shairport-sync &>/dev/null +if INSTALL_CREATE_USER_GROUP INSTALL_USER_TARGET = install-user-local +else +INSTALL_USER_TARGET = +endif $(INSTALL_USER_TARGET): $(INSTALL_GROUP_TARGET) getent passwd shairport-sync &>/dev/null || useradd -r -M -g shairport-sync -s /usr/sbin/nologin -G audio shairport-sync &>/dev/null diff --git a/configure.ac b/configure.ac index d13795a6..6c71bb8b 100644 --- a/configure.ac +++ b/configure.ac @@ -115,6 +115,11 @@ if test "x$with_external_mdns" = xyes ; then fi AM_CONDITIONAL([USE_EXTERNAL_MDNS], [test "x$with_external_mdns" = "xyes" ]) +# Check if we want to create user/group (default to yes): + +AC_ARG_WITH([create-user-group],[AS_HELP_STRING([--with-create-user-group],[create user/group during a make install])], ,[with_with_create_user_group=yes]) +AM_CONDITIONAL([INSTALL_CREATE_USER_GROUP], [test "x$with_with_create_user_group" = "xyes"]) + # Add the libconfig package if test "x${with_pkg_config}" = xyes ; then PKG_CHECK_MODULES(