mirror of
https://github.com/systemd/systemd
synced 2024-10-06 16:21:34 +00:00
make nss-systemd support conditional (#6155)
This allows the nss-systemd module to be disabled on minimal installations.
This commit is contained in:
parent
a4bdea5e31
commit
e7e11bbf34
|
@ -23,7 +23,6 @@ MANPAGES += \
|
|||
man/localtime.5 \
|
||||
man/machine-id.5 \
|
||||
man/machine-info.5 \
|
||||
man/nss-systemd.8 \
|
||||
man/os-release.5 \
|
||||
man/sd-bus-errors.3 \
|
||||
man/sd-bus.3 \
|
||||
|
@ -259,7 +258,6 @@ MANPAGES_ALIAS += \
|
|||
man/SD_WARNING.3 \
|
||||
man/init.1 \
|
||||
man/journald.conf.d.5 \
|
||||
man/libnss_systemd.so.2.8 \
|
||||
man/poweroff.8 \
|
||||
man/reboot.8 \
|
||||
man/sd_bus_creds_get_audit_login_uid.3 \
|
||||
|
@ -617,7 +615,6 @@ man/SD_NOTICE.3: man/sd-daemon.3
|
|||
man/SD_WARNING.3: man/sd-daemon.3
|
||||
man/init.1: man/systemd.1
|
||||
man/journald.conf.d.5: man/journald.conf.5
|
||||
man/libnss_systemd.so.2.8: man/nss-systemd.8
|
||||
man/poweroff.8: man/halt.8
|
||||
man/reboot.8: man/halt.8
|
||||
man/sd_bus_creds_get_audit_login_uid.3: man/sd_bus_creds_get_pid.3
|
||||
|
@ -1131,9 +1128,6 @@ man/init.html: man/systemd.html
|
|||
man/journald.conf.d.html: man/journald.conf.html
|
||||
$(html-alias)
|
||||
|
||||
man/libnss_systemd.so.2.html: man/nss-systemd.html
|
||||
$(html-alias)
|
||||
|
||||
man/poweroff.html: man/halt.html
|
||||
$(html-alias)
|
||||
|
||||
|
@ -2170,6 +2164,17 @@ man/systemd-networkd.html: man/systemd-networkd.service.html
|
|||
|
||||
endif
|
||||
|
||||
if ENABLE_NSS_SYSTEMD
|
||||
MANPAGES += \
|
||||
man/nss-systemd.8
|
||||
MANPAGES_ALIAS += \
|
||||
man/libnss_systemd.so.2.8
|
||||
man/libnss_systemd.so.2.8: man/nss-systemd.8
|
||||
man/libnss_systemd.so.2.html: man/nss-systemd.html
|
||||
$(html-alias)
|
||||
|
||||
endif
|
||||
|
||||
if ENABLE_QUOTACHECK
|
||||
MANPAGES += \
|
||||
man/systemd-quotacheck.service.8
|
||||
|
|
|
@ -5280,6 +5280,7 @@ manual_tests += \
|
|||
test-nss
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
if ENABLE_NSS_SYSTEMD
|
||||
libnss_systemd_la_SOURCES = \
|
||||
src/nss-systemd/nss-systemd.sym \
|
||||
src/nss-systemd/nss-systemd.c
|
||||
|
@ -5299,6 +5300,7 @@ libnss_systemd_la_LIBADD = \
|
|||
|
||||
rootlib_LTLIBRARIES += \
|
||||
libnss_systemd.la
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
if HAVE_MYHOSTNAME
|
||||
|
|
10
configure.ac
10
configure.ac
|
@ -1058,6 +1058,15 @@ if test "x$enable_idn" != "xno"; then
|
|||
fi
|
||||
AM_CONDITIONAL(ENABLE_IDN, [test "$have_idn" = "yes"])
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
have_nss_systemd=no
|
||||
AC_ARG_ENABLE(nss-systemd, AS_HELP_STRING([--disable-nss-systemd], [disable nss-systemd support]))
|
||||
if test "x$enable_nss_systemd" != "xno"; then
|
||||
have_nss_systemd=yes
|
||||
AC_DEFINE(ENABLE_NSS_SYSTEMD, [1], [nss-systemd is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_NSS_SYSTEMD, [test "$have_nss_systemd" = "yes"])
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
have_libiptc=no
|
||||
AC_ARG_ENABLE(libiptc, AS_HELP_STRING([--disable-libiptc], [disable optional LIBIPTC support]))
|
||||
|
@ -1801,6 +1810,7 @@ AC_MSG_RESULT([
|
|||
dbus: ${have_dbus}
|
||||
glib: ${have_glib}
|
||||
nss-myhostname: ${have_myhostname}
|
||||
nss-systemd: ${have_nss_systemd}
|
||||
hwdb: ${enable_hwdb}
|
||||
tpm: ${have_tpm}
|
||||
Python: ${have_python}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<refentry id="nss-systemd">
|
||||
<refentry id="nss-systemd" conditional='ENABLE_NSS_SYSTEMD'>
|
||||
|
||||
<refentryinfo>
|
||||
<title>nss-systemd</title>
|
||||
|
|
|
@ -39,7 +39,7 @@ manpages = [
|
|||
['nss-myhostname', '8', ['libnss_myhostname.so.2'], 'HAVE_MYHOSTNAME'],
|
||||
['nss-mymachines', '8', ['libnss_mymachines.so.2'], 'ENABLE_MACHINED'],
|
||||
['nss-resolve', '8', ['libnss_resolve.so.2'], 'ENABLE_RESOLVED'],
|
||||
['nss-systemd', '8', ['libnss_systemd.so.2'], ''],
|
||||
['nss-systemd', '8', ['libnss_systemd.so.2'], 'ENABLE_NSS_SYSTEMD'],
|
||||
['os-release', '5', [], ''],
|
||||
['pam_systemd', '8', [], 'HAVE_PAM'],
|
||||
['resolved.conf', '5', ['resolved.conf.d'], 'ENABLE_RESOLVED'],
|
||||
|
|
|
@ -1014,6 +1014,7 @@ foreach pair : [['utmp', 'HAVE_UTMP'],
|
|||
['smack', 'HAVE_SMACK'],
|
||||
['gshadow', 'ENABLE_GSHADOW'],
|
||||
['idn', 'ENABLE_IDN'],
|
||||
['nss-systemd', 'ENABLE_NSS_SYSTEMD'],
|
||||
]
|
||||
|
||||
if get_option(pair[0])
|
||||
|
@ -1162,7 +1163,7 @@ test_dlopen = executable(
|
|||
dependencies : [libdl])
|
||||
|
||||
foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME'],
|
||||
['systemd', '' ],
|
||||
['systemd', 'ENABLE_NSS_SYSTEMD'],
|
||||
['mymachines', 'ENABLE_MACHINED'],
|
||||
['resolve', 'ENABLE_RESOLVED']]
|
||||
|
||||
|
@ -2455,6 +2456,7 @@ foreach tuple : [
|
|||
['idn'],
|
||||
['libidn2'],
|
||||
['libidn'],
|
||||
['nss-systemd'],
|
||||
['libiptc'],
|
||||
['elfutils'],
|
||||
['binfmt'],
|
||||
|
|
|
@ -203,6 +203,8 @@ option('libidn2', type : 'combo', choices : ['auto', 'true', 'false'],
|
|||
description : 'libidn2 support')
|
||||
option('libidn', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libidn support')
|
||||
option('nss-systemd', type : 'boolean',
|
||||
description : 'enable nss-systemd')
|
||||
option('libiptc', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libiptc support')
|
||||
option('qrencode', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
|
|
Loading…
Reference in a new issue