docs: merge branch 'th/nm-settings-manual'
This is a first step to improve our manual pages ([1]). [1] https://bugzilla.redhat.com/show_bug.cgi?id=1614726 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/528
This commit is contained in:
24
.gitignore
vendored
24
.gitignore
vendored
@@ -147,16 +147,19 @@ test-*.trs
|
||||
/libnm-core/nm-dbus-types.xml
|
||||
/libnm-core/nm-vpn-dbus-types.xml
|
||||
|
||||
/libnm/nm-settings-ifcfg-rh-docs.xml
|
||||
/libnm/nm-property-docs.xml
|
||||
/libnm/nm-settings-docs.xml
|
||||
/libnm/nm-settings-docs-overrides.xml
|
||||
/libnm/nm-settings-keyfile-docs.xml
|
||||
/libnm/nm-property-infos-dbus.xml
|
||||
/libnm/nm-property-infos-ifcfg-rh.xml
|
||||
/libnm/nm-property-infos-keyfile.xml
|
||||
/libnm/nm-property-infos-nmcli.xml
|
||||
/libnm/nm-settings-docs-gir.xml
|
||||
/libnm/tests/test-libnm
|
||||
/libnm/tests/test-nm-client
|
||||
/libnm/tests/test-remote-settings-client
|
||||
/libnm/tests/test-secret-agent
|
||||
|
||||
/clients/cli/generate-docs-nm-settings-nmcli
|
||||
/clients/cli/generate-docs-nm-settings-nmcli.xml
|
||||
|
||||
/m4/codeset.m4
|
||||
/m4/gettext.m4
|
||||
/m4/glibc2.m4
|
||||
@@ -192,9 +195,12 @@ test-*.trs
|
||||
/m4/xsize.m4
|
||||
|
||||
/man/*.[1785]
|
||||
/man/nm-settings.xml
|
||||
/man/nm-settings-dbus.xml
|
||||
/man/nm-settings-docs-dbus.xml
|
||||
/man/nm-settings-docs-nmcli.xml
|
||||
/man/nm-settings-ifcfg-rh.xml
|
||||
/man/nm-settings-keyfile.xml
|
||||
/man/nm-settings-nmcli.xml
|
||||
/man/common.ent
|
||||
|
||||
/po/*.gmo
|
||||
@@ -298,6 +304,7 @@ test-*.trs
|
||||
/docs/libnm-util/tmpl/
|
||||
/docs/libnm-util/version.xml
|
||||
/docs/libnm-util/xml/
|
||||
/man/nm-settings.xml
|
||||
/include/
|
||||
/initscript/*/[Nn]etwork[Mm]anager
|
||||
/initscript/Slackware/rc.networkmanager
|
||||
@@ -325,8 +332,13 @@ test-*.trs
|
||||
/libnm/fake-typelib/typelibs.c
|
||||
/libnm/nm-ifcfg-rh-docs.xml
|
||||
/libnm/nm-keyfile-docs.xml
|
||||
/libnm/nm-property-docs.xml
|
||||
/libnm/nm-setting-docs-overrides.xml
|
||||
/libnm/nm-setting-docs.xml
|
||||
/libnm/nm-settings-docs-overrides.xml
|
||||
/libnm/nm-settings-docs.xml
|
||||
/libnm/nm-settings-ifcfg-rh-docs.xml
|
||||
/libnm/nm-settings-keyfile-docs.xml
|
||||
/libnm/tests/test-general
|
||||
/policy/org.freedesktop.NetworkManager.policy
|
||||
/policy/org.freedesktop.NetworkManager.policy.in
|
||||
|
278
Makefile.am
278
Makefile.am
@@ -456,9 +456,9 @@ shared_nm_udev_aux_libnm_udev_aux_la_LIBADD = \
|
||||
|
||||
###############################################################################
|
||||
|
||||
noinst_LTLIBRARIES += shared/nm-libnm-core-intern/libnm-libnm-core-intern.la
|
||||
noinst_LTLIBRARIES += libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la
|
||||
|
||||
shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_CPPFLAGS = \
|
||||
libnm_core_nm_libnm_core_intern_libnm_libnm_core_intern_la_CPPFLAGS = \
|
||||
$(dflt_cppflags) \
|
||||
-I$(srcdir)/shared \
|
||||
-I$(builddir)/shared \
|
||||
@@ -471,32 +471,34 @@ shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_CPPFLAGS = \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_SOURCES = \
|
||||
shared/nm-libnm-core-intern/nm-common-macros.h \
|
||||
shared/nm-libnm-core-intern/nm-ethtool-utils.c \
|
||||
shared/nm-libnm-core-intern/nm-ethtool-utils.h \
|
||||
shared/nm-libnm-core-intern/nm-libnm-core-utils.c \
|
||||
shared/nm-libnm-core-intern/nm-libnm-core-utils.h \
|
||||
shared/nm-libnm-core-intern/nm-auth-subject.c \
|
||||
shared/nm-libnm-core-intern/nm-auth-subject.h \
|
||||
libnm_core_nm_libnm_core_intern_libnm_libnm_core_intern_la_SOURCES = \
|
||||
libnm-core/nm-libnm-core-intern/nm-auth-subject.c \
|
||||
libnm-core/nm-libnm-core-intern/nm-auth-subject.h \
|
||||
libnm-core/nm-libnm-core-intern/nm-common-macros.h \
|
||||
libnm-core/nm-libnm-core-intern/nm-ethtool-utils.c \
|
||||
libnm-core/nm-libnm-core-intern/nm-ethtool-utils.h \
|
||||
libnm-core/nm-libnm-core-intern/nm-libnm-core-utils.c \
|
||||
libnm-core/nm-libnm-core-intern/nm-libnm-core-utils.h \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_LDFLAGS = \
|
||||
libnm_core_nm_libnm_core_intern_libnm_libnm_core_intern_la_LDFLAGS = \
|
||||
$(CODE_COVERAGE_LDFLAGS) \
|
||||
$(SANITIZER_LIB_LDFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_LIBADD = \
|
||||
libnm_core_nm_libnm_core_intern_libnm_libnm_core_intern_la_LIBADD = \
|
||||
$(GLIB_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
$(shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
$(libnm_core_nm_libnm_core_intern_libnm_libnm_core_intern_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
|
||||
EXTRA_DIST += libnm-core/nm-libnm-core-intern/README.md
|
||||
|
||||
###############################################################################
|
||||
|
||||
noinst_LTLIBRARIES += shared/nm-libnm-core-aux/libnm-libnm-core-aux.la
|
||||
noinst_LTLIBRARIES += libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la
|
||||
|
||||
shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_CPPFLAGS = \
|
||||
libnm_core_nm_libnm_core_aux_libnm_libnm_core_aux_la_CPPFLAGS = \
|
||||
$(dflt_cppflags) \
|
||||
-I$(srcdir)/shared \
|
||||
-I$(builddir)/shared \
|
||||
@@ -509,28 +511,30 @@ shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_CPPFLAGS = \
|
||||
-DNETWORKMANAGER_COMPILATION='(NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)' \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_SOURCES = \
|
||||
shared/nm-libnm-core-aux/nm-dispatcher-api.h \
|
||||
shared/nm-libnm-core-aux/nm-libnm-core-aux.c \
|
||||
shared/nm-libnm-core-aux/nm-libnm-core-aux.h \
|
||||
libnm_core_nm_libnm_core_aux_libnm_libnm_core_aux_la_SOURCES = \
|
||||
libnm-core/nm-libnm-core-aux/nm-dispatcher-api.h \
|
||||
libnm-core/nm-libnm-core-aux/nm-libnm-core-aux.c \
|
||||
libnm-core/nm-libnm-core-aux/nm-libnm-core-aux.h \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_LDFLAGS = \
|
||||
libnm_core_nm_libnm_core_aux_libnm_libnm_core_aux_la_LDFLAGS = \
|
||||
$(CODE_COVERAGE_LDFLAGS) \
|
||||
$(SANITIZER_LIB_LDFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_LIBADD = \
|
||||
libnm_core_nm_libnm_core_aux_libnm_libnm_core_aux_la_LIBADD = \
|
||||
$(GLIB_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
$(shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
$(libnm_core_nm_libnm_core_aux_libnm_libnm_core_aux_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
|
||||
EXTRA_DIST += libnm-core/nm-libnm-core-aux/README.md
|
||||
|
||||
###############################################################################
|
||||
|
||||
noinst_LTLIBRARIES += shared/nm-keyfile/libnm-keyfile.la
|
||||
noinst_LTLIBRARIES += libnm-core/nm-keyfile/libnm-keyfile.la
|
||||
|
||||
shared_nm_keyfile_libnm_keyfile_la_CPPFLAGS = \
|
||||
libnm_core_nm_keyfile_libnm_keyfile_la_CPPFLAGS = \
|
||||
$(dflt_cppflags) \
|
||||
-I$(srcdir)/shared \
|
||||
-I$(builddir)/shared \
|
||||
@@ -543,29 +547,29 @@ shared_nm_keyfile_libnm_keyfile_la_CPPFLAGS = \
|
||||
-DNETWORKMANAGER_COMPILATION='(NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)' \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_keyfile_libnm_keyfile_la_SOURCES = \
|
||||
shared/nm-keyfile/nm-keyfile-internal.h \
|
||||
shared/nm-keyfile/nm-keyfile-utils.c \
|
||||
shared/nm-keyfile/nm-keyfile-utils.h \
|
||||
shared/nm-keyfile/nm-keyfile.c \
|
||||
libnm_core_nm_keyfile_libnm_keyfile_la_SOURCES = \
|
||||
libnm-core/nm-keyfile/nm-keyfile-internal.h \
|
||||
libnm-core/nm-keyfile/nm-keyfile-utils.c \
|
||||
libnm-core/nm-keyfile/nm-keyfile-utils.h \
|
||||
libnm-core/nm-keyfile/nm-keyfile.c \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_keyfile_libnm_keyfile_la_LDFLAGS = \
|
||||
libnm_core_nm_keyfile_libnm_keyfile_la_LDFLAGS = \
|
||||
$(CODE_COVERAGE_LDFLAGS) \
|
||||
$(SANITIZER_LIB_LDFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_keyfile_libnm_keyfile_la_LIBADD = \
|
||||
libnm_core_nm_keyfile_libnm_keyfile_la_LIBADD = \
|
||||
$(GLIB_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
$(shared_nm_keyfile_libnm_keyfile_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
$(libnm_core_nm_keyfile_libnm_keyfile_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
|
||||
###############################################################################
|
||||
|
||||
noinst_LTLIBRARIES += shared/nm-libnm-aux/libnm-libnm-aux.la
|
||||
noinst_LTLIBRARIES += libnm/nm-libnm-aux/libnm-libnm-aux.la
|
||||
|
||||
shared_nm_libnm_aux_libnm_libnm_aux_la_CPPFLAGS = \
|
||||
libnm_nm_libnm_aux_libnm_libnm_aux_la_CPPFLAGS = \
|
||||
$(dflt_cppflags) \
|
||||
-I$(srcdir)/shared \
|
||||
-I$(builddir)/shared \
|
||||
@@ -580,23 +584,25 @@ shared_nm_libnm_aux_libnm_libnm_aux_la_CPPFLAGS = \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_libnm_aux_libnm_libnm_aux_la_SOURCES = \
|
||||
shared/nm-libnm-aux/nm-libnm-aux.c \
|
||||
shared/nm-libnm-aux/nm-libnm-aux.h \
|
||||
libnm_nm_libnm_aux_libnm_libnm_aux_la_SOURCES = \
|
||||
libnm/nm-libnm-aux/nm-libnm-aux.c \
|
||||
libnm/nm-libnm-aux/nm-libnm-aux.h \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_libnm_aux_libnm_libnm_aux_la_LDFLAGS = \
|
||||
libnm_nm_libnm_aux_libnm_libnm_aux_la_LDFLAGS = \
|
||||
$(CODE_COVERAGE_LDFLAGS) \
|
||||
$(SANITIZER_LIB_LDFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
shared_nm_libnm_aux_libnm_libnm_aux_la_LIBADD = \
|
||||
libnm_nm_libnm_aux_libnm_libnm_aux_la_LIBADD = \
|
||||
$(GLIB_LIBS) \
|
||||
libnm/libnm.la \
|
||||
$(NULL)
|
||||
|
||||
$(shared_nm_libnm_aux_libnm_libnm_aux_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
$(shared_nm_libnm_aux_libnm_libnm_aux_la_OBJECTS): $(libnm_lib_h_pub_mkenums)
|
||||
$(libnm_nm_libnm_aux_libnm_libnm_aux_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
$(libnm_nm_libnm_aux_libnm_libnm_aux_la_OBJECTS): $(libnm_lib_h_pub_mkenums)
|
||||
|
||||
EXTRA_DIST += libnm/nm-libnm-aux/README.md
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -1220,11 +1226,11 @@ nodist_libnm_core_tests_test_general_SOURCES = \
|
||||
$(NULL)
|
||||
|
||||
libnm_core_tests_ldadd = \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
shared/nm-keyfile/libnm-keyfile.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-keyfile/libnm-keyfile.la \
|
||||
libnm-core/libnm-core.la \
|
||||
$(libnm_crypto_lib) \
|
||||
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
shared/systemd/libnm-systemd-shared.la \
|
||||
shared/systemd/libnm-systemd-logging-stub.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
@@ -1449,10 +1455,10 @@ nodist_libnm_liblibnm_la_SOURCES = \
|
||||
$(NULL)
|
||||
|
||||
libnm_liblibnm_la_LIBADD = \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/libnm-core.la \
|
||||
$(libnm_crypto_lib) \
|
||||
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
introspection/libnmdbus.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/systemd/libnm-systemd-shared.la \
|
||||
@@ -1553,58 +1559,55 @@ libnm/libnm.typelib: libnm/libnm.gir
|
||||
INTROSPECTION_GIRS += libnm/NM-1.0.gir
|
||||
|
||||
libnm_noinst_data = \
|
||||
libnm/nm-property-docs.xml \
|
||||
libnm/nm-settings-docs-overrides.xml \
|
||||
libnm/nm-settings-docs.xml \
|
||||
libnm/nm-settings-keyfile-docs.xml \
|
||||
libnm/nm-settings-ifcfg-rh-docs.xml
|
||||
clients/cli/generate-docs-nm-settings-nmcli.xml \
|
||||
libnm/nm-property-infos-dbus.xml \
|
||||
libnm/nm-property-infos-ifcfg-rh.xml \
|
||||
libnm/nm-property-infos-keyfile.xml \
|
||||
libnm/nm-property-infos-nmcli.xml \
|
||||
libnm/nm-settings-docs-gir.xml \
|
||||
man/nm-settings-docs-dbus.xml \
|
||||
man/nm-settings-docs-nmcli.xml \
|
||||
$(NULL)
|
||||
|
||||
noinst_DATA += $(libnm_noinst_data)
|
||||
|
||||
clients/cli/generate-docs-nm-settings-nmcli.xml: clients/cli/generate-docs-nm-settings-nmcli
|
||||
$(AM_V_GEN) clients/cli/generate-docs-nm-settings-nmcli > $@
|
||||
|
||||
libnm_docs_sources = $(libnm_core_lib_c_settings_real)
|
||||
|
||||
libnm/nm-settings-docs-overrides.xml: libnm/generate-plugin-docs.pl $(libnm_docs_sources)
|
||||
$(AM_V_GEN) $(srcdir)/libnm/generate-plugin-docs.pl dbus $@ $(filter-out $<,$^)
|
||||
libnm/nm-property-infos-%.xml: tools/generate-docs-nm-property-infos.pl $(libnm_docs_sources)
|
||||
$(AM_V_GEN) $(srcdir)/tools/generate-docs-nm-property-infos.pl $(patsubst nm-property-infos-%.xml,%,$(notdir $@)) $@ $(filter-out $<,$^)
|
||||
|
||||
# When the python scripts loads libnm and the address sanitizers is
|
||||
# enabled, we must LD_PRELOAD libasan otherwise it will complain that
|
||||
# it was not loaded as initial library.
|
||||
libnm/nm-property-docs.xml: libnm/generate-setting-docs.py $(libnm_docs_sources) | libnm/NM-1.0.gir libnm/NM-1.0.typelib libnm/libnm.la
|
||||
libnm/nm-settings-docs-gir.xml: tools/generate-docs-nm-settings-docs-gir.py libnm/NM-1.0.gir libnm/NM-1.0.typelib libnm/libnm.la $(libnm_docs_sources)
|
||||
$(AM_V_GEN) \
|
||||
export GI_TYPELIB_PATH=$(abs_builddir)/libnm$${GI_TYPELIB_PATH:+:$$GI_TYPELIB_PATH}; \
|
||||
export LD_LIBRARY_PATH=$(abs_builddir)/libnm/.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH}; \
|
||||
$(call set_sanitizer_env,$(abs_builddir)/libnm/.libs/libnm.so); \
|
||||
"$(PYTHON)" \
|
||||
$(srcdir)/libnm/generate-setting-docs.py \
|
||||
$(srcdir)/tools/generate-docs-nm-settings-docs-gir.py \
|
||||
--gir $(builddir)/libnm/NM-1.0.gir \
|
||||
--output $@
|
||||
|
||||
libnm/nm-settings-docs.xml: libnm/generate-setting-docs.py libnm/nm-settings-docs-overrides.xml $(libnm_docs_sources) | libnm/NM-1.0.gir libnm/NM-1.0.typelib libnm/libnm.la
|
||||
$(AM_V_GEN) \
|
||||
export GI_TYPELIB_PATH=$(abs_builddir)/libnm$${GI_TYPELIB_PATH:+:$$GI_TYPELIB_PATH}; \
|
||||
export LD_LIBRARY_PATH=$(abs_builddir)/libnm/.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH}; \
|
||||
$(call set_sanitizer_env,$(abs_builddir)/libnm/.libs/libnm.so); \
|
||||
"$(PYTHON)" \
|
||||
$(srcdir)/libnm/generate-setting-docs.py \
|
||||
--gir $(builddir)/libnm/NM-1.0.gir \
|
||||
--overrides $(word 2,$^) \
|
||||
--output $@
|
||||
man/nm-settings-docs-nmcli.xml: clients/cli/generate-docs-nm-settings-nmcli.xml libnm/nm-property-infos-nmcli.xml libnm/nm-settings-docs-gir.xml tools/generate-docs-nm-settings-docs-merge.py
|
||||
$(AM_V_GEN) "$(PYTHON)" $(srcdir)/tools/generate-docs-nm-settings-docs-merge.py $@ $(wordlist 1,3,$^)
|
||||
|
||||
libnm/nm-settings-keyfile-docs.xml: libnm/generate-plugin-docs.pl $(libnm_docs_sources)
|
||||
$(AM_V_GEN) $(srcdir)/libnm/generate-plugin-docs.pl keyfile $@ $(filter-out $<,$^)
|
||||
libnm/nm-settings-ifcfg-rh-docs.xml: libnm/generate-plugin-docs.pl $(libnm_docs_sources)
|
||||
$(AM_V_GEN) $(srcdir)/libnm/generate-plugin-docs.pl ifcfg-rh $@ $(filter-out $<,$^)
|
||||
man/nm-settings-docs-%.xml: libnm/nm-property-infos-%.xml libnm/nm-settings-docs-gir.xml tools/generate-docs-nm-settings-docs-merge.py
|
||||
$(AM_V_GEN) "$(PYTHON)" $(srcdir)/tools/generate-docs-nm-settings-docs-merge.py $@ $(wordlist 1,2,$^)
|
||||
|
||||
EXTRA_DIST += $(libnm_noinst_data)
|
||||
DISTCLEANFILES += $(libnm_noinst_data)
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
libnm/generate-setting-docs.py \
|
||||
libnm/generate-plugin-docs.pl \
|
||||
tools/generate-docs-nm-property-infos.pl \
|
||||
tools/generate-docs-nm-settings-docs-merge.py \
|
||||
tools/generate-docs-nm-settings-docs-gir.py \
|
||||
libnm/meson.build \
|
||||
libnm/nm-enum-types.c.template \
|
||||
libnm/nm-enum-types.h.template \
|
||||
libnm/meson.build
|
||||
$(NULL)
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -2314,11 +2317,11 @@ src_libNetworkManager_la_SOURCES = \
|
||||
|
||||
src_libNetworkManager_la_LIBADD = \
|
||||
src/libNetworkManagerBase.la \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
shared/nm-keyfile/libnm-keyfile.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-keyfile/libnm-keyfile.la \
|
||||
libnm-core/libnm-core.la \
|
||||
$(libnm_crypto_lib) \
|
||||
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
shared/nm-udev-aux/libnm-udev-aux.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
@@ -2405,11 +2408,11 @@ src_nm_iface_helper_SOURCES = \
|
||||
|
||||
src_nm_iface_helper_LDADD = \
|
||||
src/libNetworkManagerBase.la \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
shared/nm-keyfile/libnm-keyfile.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-keyfile/libnm-keyfile.la \
|
||||
libnm-core/libnm-core.la \
|
||||
$(libnm_crypto_lib) \
|
||||
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
shared/nm-udev-aux/libnm-udev-aux.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
@@ -2454,11 +2457,11 @@ src_initrd_nm_initrd_generator_SOURCES = \
|
||||
src_initrd_nm_initrd_generator_LDADD = \
|
||||
src/initrd/libnmi-core.la \
|
||||
src/libNetworkManagerBase.la \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
shared/nm-keyfile/libnm-keyfile.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-keyfile/libnm-keyfile.la \
|
||||
libnm-core/libnm-core.la \
|
||||
$(libnm_crypto_lib) \
|
||||
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
shared/nm-udev-aux/libnm-udev-aux.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
@@ -4312,7 +4315,7 @@ clients_nm_online_LDFLAGS = \
|
||||
|
||||
clients_nm_online_LDADD = \
|
||||
libnm/libnm.la \
|
||||
shared/nm-libnm-aux/libnm-libnm-aux.la \
|
||||
libnm/nm-libnm-aux/libnm-libnm-aux.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
shared/libcsiphash.la \
|
||||
@@ -4376,7 +4379,7 @@ $(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp
|
||||
|
||||
clients_common_settings_doc_h = clients/common/settings-docs.h
|
||||
if HAVE_INTROSPECTION
|
||||
$(clients_common_settings_doc_h): clients/common/settings-docs.xsl libnm/nm-property-docs.xml clients/common/.dirstamp
|
||||
$(clients_common_settings_doc_h): clients/common/settings-docs.xsl libnm/nm-settings-docs-gir.xml clients/common/.dirstamp
|
||||
$(AM_V_GEN) $(XSLTPROC) --output $@ $< $(word 2,$^)
|
||||
DISTCLEANFILES += $(clients_common_settings_doc_h)
|
||||
check-local-settings-docs: $(clients_common_settings_doc_h)
|
||||
@@ -4442,8 +4445,8 @@ clients_common_tests_test_clients_common_LDFLAGS = \
|
||||
clients_common_tests_test_clients_common_LDADD = \
|
||||
clients/common/libnmc.la \
|
||||
clients/common/libnmc-base.la \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
shared/libcsiphash.la \
|
||||
@@ -4486,7 +4489,7 @@ clients_common_tests_test_libnm_core_aux_LDFLAGS = \
|
||||
$(NULL)
|
||||
|
||||
clients_common_tests_test_libnm_core_aux_LDADD = \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
shared/libcsiphash.la \
|
||||
@@ -4533,12 +4536,12 @@ clients_cli_nmcli_CPPFLAGS = \
|
||||
clients_cli_nmcli_LDADD = \
|
||||
clients/common/libnmc.la \
|
||||
clients/common/libnmc-base.la \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
shared/libcsiphash.la \
|
||||
shared/nm-libnm-aux/libnm-libnm-aux.la \
|
||||
libnm/nm-libnm-aux/libnm-libnm-aux.la \
|
||||
libnm/libnm.la \
|
||||
$(GLIB_LIBS) \
|
||||
$(READLINE_LIBS)
|
||||
@@ -4563,6 +4566,43 @@ uninstall_hook += uninstall-hook-nmcli
|
||||
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
|
||||
noinst_PROGRAMS += clients/cli/generate-docs-nm-settings-nmcli
|
||||
|
||||
clients_cli_generate_docs_nm_settings_nmcli_SOURCES = \
|
||||
clients/cli/generate-docs-nm-settings-nmcli.c \
|
||||
$(NULL)
|
||||
|
||||
clients_cli_generate_docs_nm_settings_nmcli_CPPFLAGS = \
|
||||
-I$(srcdir)/clients/common \
|
||||
$(clients_cppflags) \
|
||||
-DG_LOG_DOMAIN=\""nmcli"\" \
|
||||
$(NULL)
|
||||
|
||||
clients_cli_generate_docs_nm_settings_nmcli_LDADD = \
|
||||
clients/common/libnmc.la \
|
||||
clients/common/libnmc-base.la \
|
||||
libnm/nm-libnm-aux/libnm-libnm-aux.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm/libnm.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
shared/libcsiphash.la \
|
||||
$(GLIB_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
clients_cli_generate_docs_nm_settings_nmcli_LDFLAGS = \
|
||||
-Wl,--version-script="$(srcdir)/linker-script-binary.ver" \
|
||||
$(SANITIZER_EXEC_LDFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
$(clients_cli_generate_docs_nm_settings_nmcli_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
$(clients_cli_generate_docs_nm_settings_nmcli_OBJECTS): $(libnm_lib_h_pub_mkenums)
|
||||
|
||||
###############################################################################
|
||||
|
||||
EXTRA_DIST += \
|
||||
clients/cli/nmcli-completion \
|
||||
clients/cli/meson.build \
|
||||
@@ -4733,9 +4773,9 @@ clients_tui_nmtui_LDADD = \
|
||||
clients/tui/newt/libnmt-newt.a \
|
||||
clients/common/libnmc.la \
|
||||
clients/common/libnmc-base.la \
|
||||
shared/nm-libnm-aux/libnm-libnm-aux.la \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm/nm-libnm-aux/libnm-libnm-aux.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
shared/libcsiphash.la \
|
||||
@@ -4800,9 +4840,9 @@ clients_cloud_setup_nm_cloud_setup_LDFLAGS = \
|
||||
$(NULL)
|
||||
|
||||
clients_cloud_setup_nm_cloud_setup_LDADD = \
|
||||
shared/nm-libnm-aux/libnm-libnm-aux.la \
|
||||
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
libnm/nm-libnm-aux/libnm-libnm-aux.la \
|
||||
libnm-core/nm-libnm-core-aux/libnm-libnm-core-aux.la \
|
||||
libnm-core/nm-libnm-core-intern/libnm-libnm-core-intern.la \
|
||||
shared/nm-glib-aux/libnm-glib-aux.la \
|
||||
shared/nm-std-aux/libnm-std-aux.la \
|
||||
shared/libcsiphash.la \
|
||||
@@ -4971,16 +5011,21 @@ man/%.1 man/%.5 man/%.7 man/%.8: man/%.xml man/common.ent
|
||||
endif
|
||||
|
||||
man_nm_settings_xml = \
|
||||
man/nm-settings.xml \
|
||||
man/nm-settings-dbus.xml \
|
||||
man/nm-settings-ifcfg-rh.xml \
|
||||
man/nm-settings-keyfile.xml \
|
||||
man/nm-settings-ifcfg-rh.xml
|
||||
man/nm-settings-nmcli.xml \
|
||||
$(NULL)
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
|
||||
man/nm-setting%.xml: man/common.ent
|
||||
man/nm-settings-%.xml: man/nm-settings-%.xsl man/nm-settings-docs-%.xml man/common.ent
|
||||
$(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) $< $(word 2,$^)
|
||||
|
||||
man/nm-setting%.xml: man/nm-setting%.xsl libnm/nm-setting%-docs.xml
|
||||
$(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) $^
|
||||
man/nm-settings-keyfile.xml: man/nm-settings-keyfile.xsl libnm/nm-property-infos-keyfile.xml man/common.ent
|
||||
$(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) $< $(word 2,$^)
|
||||
man/nm-settings-ifcfg-rh.xml: man/nm-settings-ifcfg-rh.xsl libnm/nm-property-infos-ifcfg-rh.xml man/common.ent
|
||||
$(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) $< $(word 2,$^)
|
||||
|
||||
CLEANFILES += $(man_nm_settings_xml)
|
||||
|
||||
@@ -4996,15 +5041,10 @@ man_pages += \
|
||||
man/nmtui.1
|
||||
|
||||
man_pages_autogen += \
|
||||
man/nm-settings-dbus.5 \
|
||||
man/nm-settings-keyfile.5 \
|
||||
man/nm-settings.5
|
||||
|
||||
if WITH_OPENVSWITCH
|
||||
man_pages += man/nm-openvswitch.7
|
||||
else
|
||||
EXTRA_DIST += man/nm-openvswitch.7
|
||||
dist_dependencies += man/nm-openvswitch.7
|
||||
endif
|
||||
man/nm-settings-nmcli.5 \
|
||||
$(NULL)
|
||||
|
||||
if CONFIG_PLUGIN_IFCFG_RH
|
||||
man_pages_autogen += man/nm-settings-ifcfg-rh.5
|
||||
@@ -5013,6 +5053,13 @@ EXTRA_DIST += man/nm-settings-ifcfg-rh.5
|
||||
dist_dependencies += man/nm-settings-ifcfg-rh.5
|
||||
endif
|
||||
|
||||
if WITH_OPENVSWITCH
|
||||
man_pages += man/nm-openvswitch.7
|
||||
else
|
||||
EXTRA_DIST += man/nm-openvswitch.7
|
||||
dist_dependencies += man/nm-openvswitch.7
|
||||
endif
|
||||
|
||||
CLEANFILES += \
|
||||
man/common.ent
|
||||
|
||||
@@ -5022,7 +5069,8 @@ EXTRA_DIST += \
|
||||
$(addsuffix .xsl,$(basename $(man_nm_settings_xml))) \
|
||||
$(man_pages) \
|
||||
$(addsuffix .xml,$(basename $(man_pages))) \
|
||||
$(man_pages_autogen)
|
||||
$(man_pages_autogen) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
if HAVE_DOCS
|
||||
@@ -5031,7 +5079,8 @@ install-data-hook-man:
|
||||
for link in $(nmtui_links); do \
|
||||
ln -f $(DESTDIR)$(mandir)/man1/nmtui.1 $(DESTDIR)$(mandir)/man1/$$link.1; \
|
||||
done; \
|
||||
ln -f $(DESTDIR)$(mandir)/man5/NetworkManager.conf.5 $(DESTDIR)$(mandir)/man5/nm-system-settings.conf.5;
|
||||
ln -f $(DESTDIR)$(mandir)/man5/NetworkManager.conf.5 $(DESTDIR)$(mandir)/man5/nm-system-settings.conf.5; \
|
||||
ln -f $(DESTDIR)$(mandir)/man5/nm-settings-nmcli.5 $(DESTDIR)$(mandir)/man5/nm-settings.5;
|
||||
|
||||
install_data_hook += install-data-hook-man
|
||||
|
||||
@@ -5039,7 +5088,8 @@ uninstall-hook-man:
|
||||
for link in $(nmtui_links); do \
|
||||
rm -f $(DESTDIR)$(mandir)/man1/$$link.1; \
|
||||
done; \
|
||||
rm -f $(DESTDIR)$(mandir)/man5/nm-system-settings.conf.5;
|
||||
rm -f $(DESTDIR)$(mandir)/man5/nm-system-settings.conf.5; \
|
||||
rm -f $(DESTDIR)$(mandir)/man5/nm-settings.5;
|
||||
|
||||
uninstall_hook += uninstall-hook-man
|
||||
|
||||
|
57
clients/cli/generate-docs-nm-settings-nmcli.c
Normal file
57
clients/cli/generate-docs-nm-settings-nmcli.c
Normal file
@@ -0,0 +1,57 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1+
|
||||
|
||||
#include "nm-default.h"
|
||||
|
||||
#include "nm-meta-setting-desc.h"
|
||||
|
||||
#define INDENT 4
|
||||
|
||||
static char *
|
||||
_xml_escape_attribute (const char *value)
|
||||
{
|
||||
gs_free char *s = NULL;
|
||||
|
||||
s = g_markup_escape_text (value, -1);
|
||||
return g_strdup_printf ("\"%s\"", s);
|
||||
}
|
||||
|
||||
static const char *
|
||||
_indent_level (guint num_spaces)
|
||||
{
|
||||
static const char spaces[] = " ";
|
||||
|
||||
nm_assert (num_spaces < G_N_ELEMENTS (spaces));
|
||||
return &spaces[G_N_ELEMENTS (spaces) - num_spaces - 1];
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
int i_sett_infos;
|
||||
int i_property;
|
||||
|
||||
g_print ("<nm-setting-docs>\n");
|
||||
for (i_sett_infos = 0; i_sett_infos < G_N_ELEMENTS (nm_meta_setting_infos_editor); i_sett_infos++) {
|
||||
const NMMetaSettingInfoEditor *sett_info = &nm_meta_setting_infos_editor[i_sett_infos];
|
||||
gs_free char *tmp1 = NULL;
|
||||
|
||||
g_print ("%s<setting", _indent_level (INDENT));
|
||||
g_print (" name=%s >\n", tmp1 = _xml_escape_attribute (sett_info->general->setting_name));
|
||||
|
||||
for (i_property = 0; i_property < sett_info->properties_num; i_property++) {
|
||||
const NMMetaPropertyInfo *prop_info = sett_info->properties[i_property];
|
||||
gs_free char *tmp2 = NULL;
|
||||
gs_free char *tmp3 = NULL;
|
||||
|
||||
g_print ("%s<property", _indent_level (2*INDENT));
|
||||
g_print (" name=%s", tmp2 = _xml_escape_attribute (prop_info->property_name));
|
||||
if (prop_info->property_alias)
|
||||
g_print ("\n%salias=%s", _indent_level (2*INDENT + 10), tmp3 = _xml_escape_attribute (prop_info->property_alias));
|
||||
g_print (" />\n");
|
||||
}
|
||||
|
||||
g_print ("%s</setting>\n", _indent_level (INDENT));
|
||||
}
|
||||
g_print ("</nm-setting-docs>\n");
|
||||
return 0;
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1+
|
||||
|
||||
name = 'nmcli'
|
||||
if enable_nmcli
|
||||
|
||||
# FIXME: nmcli-completion should be renamed to nmcli
|
||||
install_data(
|
||||
@@ -8,15 +8,8 @@ install_data(
|
||||
install_dir: join_paths(nm_datadir, 'bash-completion', 'completions'),
|
||||
)
|
||||
|
||||
deps = [
|
||||
libnmc_base_dep,
|
||||
libnmc_dep,
|
||||
readline_dep,
|
||||
libnm_libnm_aux_dep,
|
||||
]
|
||||
|
||||
executable(
|
||||
name,
|
||||
'nmcli',
|
||||
files(
|
||||
'agent.c',
|
||||
'common.c',
|
||||
@@ -28,9 +21,38 @@ executable(
|
||||
'settings.c',
|
||||
'utils.c',
|
||||
),
|
||||
dependencies: deps,
|
||||
c_args: clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format(name)],
|
||||
dependencies: [
|
||||
libnmc_base_dep,
|
||||
libnmc_dep,
|
||||
readline_dep,
|
||||
libnm_libnm_aux_dep,
|
||||
],
|
||||
c_args: clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format('nmcli')],
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
install: true,
|
||||
)
|
||||
|
||||
endif
|
||||
|
||||
generate_docs_nm_settings_nmcli = executable(
|
||||
'generate-docs-nm-settings-nmcli',
|
||||
files(
|
||||
'generate-docs-nm-settings-nmcli.c',
|
||||
),
|
||||
dependencies: [
|
||||
libnmc_base_dep,
|
||||
libnmc_dep,
|
||||
libnm_libnm_aux_dep,
|
||||
],
|
||||
c_args: clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format('nmcli')],
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
)
|
||||
|
||||
generate_docs_nm_settings_nmcli_xml = custom_target(
|
||||
'generate-docs-nm-settings-nmcli.xml',
|
||||
output: 'generate-docs-nm-settings-nmcli.xml',
|
||||
command: [ generate_docs_nm_settings_nmcli ],
|
||||
capture: true,
|
||||
)
|
||||
|
@@ -34,7 +34,7 @@ settings_docs = 'settings-docs.h'
|
||||
if enable_introspection
|
||||
settings_docs_source = custom_target(
|
||||
settings_docs,
|
||||
input: nm_property_docs,
|
||||
input: nm_settings_docs_xml_gir,
|
||||
output: settings_docs,
|
||||
command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), '@INPUT@'],
|
||||
)
|
||||
|
@@ -19,10 +19,7 @@ executable(
|
||||
)
|
||||
|
||||
subdir('common')
|
||||
|
||||
if enable_nmcli
|
||||
subdir('cli')
|
||||
endif
|
||||
subdir('cli')
|
||||
|
||||
if enable_nmtui
|
||||
subdir('tui')
|
||||
|
@@ -1284,9 +1284,10 @@ if test "$build_docs" != "yes" -a \
|
||||
\
|
||||
-f "$srcdir"/man/nm-openvswitch.7 -a \
|
||||
\
|
||||
-f "$srcdir"/man/nm-settings-dbus.5 -a \
|
||||
-f "$srcdir"/man/nm-settings-ifcfg-rh.5 -a \
|
||||
-f "$srcdir"/man/nm-settings-keyfile.5 -a \
|
||||
-f "$srcdir"/man/nm-settings.5 -a \
|
||||
-f "$srcdir"/man/nm-settings-nmcli.5 -a \
|
||||
\
|
||||
-f "$srcdir"/man/nm-settings.xml -a \
|
||||
-f "$srcdir"/man/nm-settings-keyfile.xml -a \
|
||||
|
@@ -7,8 +7,8 @@ GENERATED_FILES =
|
||||
|
||||
if BUILD_DOCS
|
||||
|
||||
settings-spec.xml: settings-spec.xsl $(top_builddir)/libnm/nm-settings-docs.xml
|
||||
$(AM_V_GEN) xsltproc --output $@ $^
|
||||
settings-spec.xml: settings-spec.xsl $(top_builddir)/man/nm-settings-docs-dbus.xml
|
||||
$(AM_V_GEN) (! test -f $@ || chmod u+w $@) && xsltproc --output $@ $^
|
||||
|
||||
# Top-level SGML file includes (depends on) settings-spec.xml
|
||||
$(DOC_MAIN_SGML_FILE): settings-spec.xml
|
||||
@@ -88,8 +88,9 @@ content_files = \
|
||||
$(top_builddir)/man/NetworkManager.xml \
|
||||
$(top_builddir)/man/NetworkManager.conf.xml \
|
||||
$(top_builddir)/man/nmcli-examples.xml \
|
||||
$(top_builddir)/man/nm-settings.xml \
|
||||
$(top_builddir)/man/nm-settings-dbus.xml \
|
||||
$(top_builddir)/man/nm-settings-keyfile.xml \
|
||||
$(top_builddir)/man/nm-settings-nmcli.xml \
|
||||
version.xml \
|
||||
$(NULL)
|
||||
|
||||
@@ -104,6 +105,25 @@ endif
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# workaround setup-build.stamp from gtk-doc.make, which copies
|
||||
# the file as read-only. That breaks later build steps, as the
|
||||
# file can no longer be written. Instead, copy the file with `cp -f`
|
||||
# only.
|
||||
setup-build.stamp:
|
||||
-$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
|
||||
files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
|
||||
if test "x$$files" != "x" ; then \
|
||||
for file in $$files ; do \
|
||||
destdir=`dirname $(abs_builddir)/$$file`; \
|
||||
test -d "$$destdir" || mkdir -p "$$destdir"; \
|
||||
test -f $(abs_srcdir)/$$file && \
|
||||
( cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file ; \
|
||||
chmod u+w $(abs_builddir)/$$file ) || true; \
|
||||
done; \
|
||||
fi; \
|
||||
fi
|
||||
$(AM_V_at)touch setup-build.stamp
|
||||
|
||||
####################################
|
||||
|
||||
EXTRA_DIST += version.xml.in settings-spec.xsl meson.build $(GENERATED_FILES)
|
||||
|
@@ -6,7 +6,7 @@ if enable_introspection
|
||||
|
||||
inputs = [
|
||||
settings + '.xsl',
|
||||
nm_settings_docs,
|
||||
nm_settings_docs_xml['dbus'],
|
||||
]
|
||||
|
||||
content_files += custom_target(
|
||||
|
@@ -73,7 +73,8 @@
|
||||
<xi:include href="../../man/nmcli.xml"/>
|
||||
<xi:include href="../../man/nmcli-examples.xml"/>
|
||||
<xi:include href="../../man/nmtui.xml"/>
|
||||
<xi:include href="../../man/nm-settings.xml"><xi:fallback /></xi:include>
|
||||
<xi:include href="../../man/nm-settings-dbus.xml"><xi:fallback /></xi:include>
|
||||
<xi:include href="../../man/nm-settings-nmcli.xml"><xi:fallback /></xi:include>
|
||||
<xi:include href="../../man/nm-settings-keyfile.xml"><xi:fallback /></xi:include>
|
||||
<xi:include href="../../man/nm-settings-ifcfg-rh.xml"><xi:fallback /></xi:include>
|
||||
<xi:include href="../../man/nm-online.xml"/>
|
||||
|
@@ -34,11 +34,12 @@ CFILE_GLOB=$(top_srcdir)/libnm-core/*.c $(top_srcdir)/libnm/*.c
|
||||
# Header files to ignore when scanning.
|
||||
IGNORE_HFILES= \
|
||||
common.h \
|
||||
nm-crypto.h \
|
||||
nm-crypto-impl.h \
|
||||
nm-dbus-helpers.h \
|
||||
nm-core-internal.h \
|
||||
nm-core-tests-enum-types.h \
|
||||
nm-core-types-internal.h \
|
||||
nm-crypto-impl.h \
|
||||
nm-crypto.h \
|
||||
nm-dbus-helpers.h \
|
||||
nm-device-private.h \
|
||||
nm-dhcp4-config.h \
|
||||
nm-dhcp6-config.h \
|
||||
@@ -51,10 +52,23 @@ IGNORE_HFILES= \
|
||||
nm-remote-connection-private.h \
|
||||
nm-setting-private.h \
|
||||
nm-utils-private.h \
|
||||
nm-core-tests-enum-types.h \
|
||||
\
|
||||
test-general-enums.h \
|
||||
\
|
||||
nm-keyfile-internal.h \
|
||||
nm-keyfile-utils.h \
|
||||
test-general-enums.h
|
||||
\
|
||||
nm-auth-subject.h \
|
||||
nm-common-macros.h \
|
||||
nm-ethtool-utils.h \
|
||||
nm-libnm-core-utils.h \
|
||||
\
|
||||
nm-dispatcher-api.h \
|
||||
nm-libnm-core-aux.h \
|
||||
\
|
||||
nm-libnm-aux.h \
|
||||
\
|
||||
$(NULL)
|
||||
|
||||
# Images to copy into HTML directory.
|
||||
HTML_IMAGES = libnm.png
|
||||
|
@@ -7,11 +7,12 @@ src_dirs = [
|
||||
|
||||
private_headers = [
|
||||
'common.h',
|
||||
'nm-crypto.h',
|
||||
'nm-crypto-impl.h',
|
||||
'nm-dbus-helpers.h',
|
||||
'nm-core-internal.h',
|
||||
'nm-core-tests-enum-types.h',
|
||||
'nm-core-types-internal.h',
|
||||
'nm-crypto-impl.h',
|
||||
'nm-crypto.h',
|
||||
'nm-dbus-helpers.h',
|
||||
'nm-device-private.h',
|
||||
'nm-dhcp4-config.h',
|
||||
'nm-dhcp6-config.h',
|
||||
@@ -24,10 +25,19 @@ private_headers = [
|
||||
'nm-remote-connection-private.h',
|
||||
'nm-setting-private.h',
|
||||
'nm-utils-private.h',
|
||||
'nm-core-tests-enum-types.h',
|
||||
|
||||
'test-general-enums.h',
|
||||
|
||||
'nm-keyfile-internal.h',
|
||||
'nm-keyfile-utils.h',
|
||||
'test-general-enums.h',
|
||||
|
||||
'nm-auth-subject.h',
|
||||
'nm-common-macros.h',
|
||||
'nm-ethtool-utils.h',
|
||||
'nm-libnm-core-utils.h',
|
||||
|
||||
'nm-dispatcher-api.h',
|
||||
'nm-libnm-core-aux.h',
|
||||
]
|
||||
|
||||
scan_args = [
|
||||
|
@@ -88,7 +88,11 @@ libnm_core_enum_sources = gnome.mkenums_simple(
|
||||
|
||||
libnm_libnm_core_intern = static_library(
|
||||
'nm-libnm-core-intern',
|
||||
sources: nm_ethtool_utils_source + nm_libnm_core_utils_source + nm_auth_subject_source + [libnm_core_enum_sources[1]],
|
||||
sources: files(
|
||||
'nm-libnm-core-intern/nm-auth-subject.c',
|
||||
'nm-libnm-core-intern/nm-ethtool-utils.c',
|
||||
'nm-libnm-core-intern/nm-libnm-core-utils.c',
|
||||
) + [libnm_core_enum_sources[1]],
|
||||
dependencies: libnm_core_nm_default_dep,
|
||||
c_args: common_c_flags,
|
||||
)
|
||||
@@ -221,7 +225,9 @@ c_flags = [
|
||||
|
||||
libnm_libnm_core_aux = static_library(
|
||||
'nm-libnm-core-aux',
|
||||
sources: nm_libnm_core_aux_source + [libnm_core_enum_sources[1]],
|
||||
sources: files(
|
||||
'nm-libnm-core-aux/nm-libnm-core-aux.c',
|
||||
) + [libnm_core_enum_sources[1]],
|
||||
dependencies: libnm_utils_base_dep,
|
||||
c_args: c_flags,
|
||||
link_with: libnm_libnm_core_intern,
|
||||
@@ -236,7 +242,10 @@ libnm_libnm_core_aux_dep = declare_dependency(
|
||||
|
||||
libnm_keyfile = static_library(
|
||||
'nm-keyfile',
|
||||
sources: nm_keyfile_source + [libnm_core_enum_sources[1]],
|
||||
sources: files(
|
||||
'nm-keyfile/nm-keyfile-utils.c',
|
||||
'nm-keyfile/nm-keyfile.c',
|
||||
) + [libnm_core_enum_sources[1]],
|
||||
dependencies: libnm_utils_base_dep,
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||
|
21
libnm-core/nm-libnm-core-aux/README.md
Normal file
21
libnm-core/nm-libnm-core-aux/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
nm-libnm-core-aux is a static library that:
|
||||
|
||||
- uses parts of "libnm-core", that are public API of "libnm"
|
||||
- can be statically linked into users of libnm-core (like libnm
|
||||
and NetworkManager).
|
||||
- that can also be statically linked into other users of libnm.
|
||||
|
||||
Basically, it is a static library with utility functions that extends
|
||||
libnm-core (the part that is public API of libnm), but can also be
|
||||
used without full libnm.
|
||||
|
||||
That means:
|
||||
|
||||
- you can use it everywhere where you either statically link
|
||||
with libnm-core, or dynamically link with libnm.
|
||||
- you cannot use it inside libnm-core itself. This is the difference
|
||||
between nm-libnm-core-intern and nm-libnm-core-aux.
|
||||
|
||||
Also, since nm-libnm-core-aux itself only uses public (stable)
|
||||
API of libnm, you theoretically can copy the sources into your
|
||||
own source tree.
|
21
libnm-core/nm-libnm-core-intern/README.md
Normal file
21
libnm-core/nm-libnm-core-intern/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
nm-libnm-core-intern is a static library that:
|
||||
|
||||
- uses parts of "libnm-core", that are public API of "libnm"
|
||||
- that is statically linked into libnm-core (and thus libnm
|
||||
and NetworkManager).
|
||||
- that can also be statically linked into other users of libnm.
|
||||
|
||||
Basically, it is a static library with utility functions that extends
|
||||
libnm-core (the part that is public API of libnm), but it is used
|
||||
by libnm-core.
|
||||
|
||||
That means:
|
||||
|
||||
- you can use it everywhere where you either statically link
|
||||
with libnm-core, or dynamically link with libnm.
|
||||
- you can even use it inside of libnm-core itself. This is the difference
|
||||
between nm-libnm-core-intern and nm-libnm-core-aux.
|
||||
|
||||
Also, since nm-libnm-core-intern itself only uses public (stable)
|
||||
API of libnm, you theoretically can copy the sources into your
|
||||
own source tree.
|
@@ -212,35 +212,52 @@ if enable_introspection
|
||||
install: true,
|
||||
)
|
||||
|
||||
generate_plugin_docs = join_paths(meson.current_source_dir(), 'generate-plugin-docs.pl')
|
||||
|
||||
name = 'nm-settings-keyfile-docs.xml'
|
||||
nm_settings_keyfile_docs = custom_target(
|
||||
name,
|
||||
input: libnm_core_settings_sources,
|
||||
output: name,
|
||||
command: [perl, generate_plugin_docs, 'keyfile', '@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
|
||||
name = 'nm-settings-docs-overrides.xml'
|
||||
nm_settings_docs_overrides = custom_target(
|
||||
name,
|
||||
input: libnm_core_settings_sources,
|
||||
output: name,
|
||||
command: [perl, generate_plugin_docs, 'dbus', '@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
|
||||
infos = [ 'dbus', 'nmcli', 'keyfile' ]
|
||||
if enable_ifcfg_rh
|
||||
name = 'nm-settings-ifcfg-rh-docs.xml'
|
||||
nm_settings_ifcfg_rh_docs = custom_target(
|
||||
name,
|
||||
input: libnm_core_settings_sources,
|
||||
output: name,
|
||||
command: [perl, generate_plugin_docs, 'ifcfg-rh', '@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
infos += [ 'ifcfg-rh' ]
|
||||
endif
|
||||
foreach info: infos
|
||||
t = custom_target(
|
||||
'nm-propery-infos-' + info + '.xml',
|
||||
input: libnm_core_settings_sources,
|
||||
output: 'nm-propery-infos-' + info + '.xml',
|
||||
command: [
|
||||
perl,
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-property-infos.pl'),
|
||||
info,
|
||||
'@OUTPUT@',
|
||||
'@INPUT@'
|
||||
],
|
||||
)
|
||||
|
||||
generate_setting_docs = join_paths(meson.current_source_dir(), 'generate-setting-docs.py')
|
||||
# meson 0.47 doesn't support non-static keys for dicts
|
||||
# nor extending dicts incrementally. Workaround.
|
||||
if info == 'dbus'
|
||||
nm_property_infos_xml_dbus = t
|
||||
elif info == 'keyfile'
|
||||
nm_property_infos_xml_keyfile = t
|
||||
elif info == 'ifcfg-rh'
|
||||
nm_property_infos_xml_ifcfg_rh = t
|
||||
elif info == 'nmcli'
|
||||
nm_property_infos_xml_nmcli = t
|
||||
else
|
||||
assert(false)
|
||||
endif
|
||||
endforeach
|
||||
if enable_ifcfg_rh
|
||||
nm_property_infos_xml = {
|
||||
'dbus': nm_property_infos_xml_dbus,
|
||||
'keyfile': nm_property_infos_xml_keyfile,
|
||||
'nmcli': nm_property_infos_xml_nmcli,
|
||||
'ifcfg-rh': nm_property_infos_xml_ifcfg_rh,
|
||||
}
|
||||
else
|
||||
nm_property_infos_xml = {
|
||||
'dbus': nm_property_infos_xml_dbus,
|
||||
'keyfile': nm_property_infos_xml_keyfile,
|
||||
'nmcli': nm_property_infos_xml_nmcli,
|
||||
}
|
||||
endif
|
||||
|
||||
gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH').stdout()
|
||||
if gi_typelib_path != ''
|
||||
@@ -260,23 +277,21 @@ if enable_introspection
|
||||
'LD_LIBRARY_PATH=' + ld_library_path,
|
||||
]
|
||||
|
||||
name = 'nm-property-docs.xml'
|
||||
nm_property_docs = custom_target(
|
||||
name,
|
||||
nm_settings_docs_xml_gir = custom_target(
|
||||
'nm-settings-docs-gir.xml',
|
||||
input: libnm_gir[0],
|
||||
output: name,
|
||||
command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--output', '@OUTPUT@'],
|
||||
output: 'nm-settings-docs-gir.xml',
|
||||
command: [
|
||||
generate_setting_docs_env,
|
||||
python.path(),
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py'),
|
||||
'--lib-path', meson.current_build_dir(),
|
||||
'--gir', '@INPUT@',
|
||||
'--output', '@OUTPUT@'
|
||||
],
|
||||
depends: libnm_gir,
|
||||
)
|
||||
|
||||
name = 'nm-settings-docs.xml'
|
||||
nm_settings_docs = custom_target(
|
||||
name,
|
||||
input: [libnm_gir[0], nm_settings_docs_overrides],
|
||||
output: name,
|
||||
command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT0@', '--overrides', '@INPUT1@', '--output', '@OUTPUT@'],
|
||||
depends: libnm_gir,
|
||||
)
|
||||
endif
|
||||
|
||||
if enable_tests
|
||||
@@ -285,7 +300,9 @@ endif
|
||||
|
||||
libnm_libnm_aux = static_library(
|
||||
'nm-libnm-aux',
|
||||
sources: nm_libnm_aux_source,
|
||||
sources: files(
|
||||
'nm-libnm-aux/nm-libnm-aux.c',
|
||||
),
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="@0@"'.format('libnmc'),
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
|
15
libnm/nm-libnm-aux/README.md
Normal file
15
libnm/nm-libnm-aux/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
nm-libnm-aux is a static library that:
|
||||
|
||||
- uses the public parts of "libnm"
|
||||
- that can also be statically linked into other users of libnm.
|
||||
|
||||
Basically, it is a static library with utility functions that extends
|
||||
libnm.
|
||||
|
||||
That means:
|
||||
|
||||
- you can use it everywhere where you dynamically link with libnm.
|
||||
|
||||
Also, since nm-libnm-aux itself only uses public (stable)
|
||||
API of libnm, you theoretically can copy the sources into your
|
||||
own source tree.
|
@@ -56,13 +56,50 @@ foreach man: mans
|
||||
endforeach
|
||||
|
||||
if enable_introspection
|
||||
|
||||
name = 'dbus'
|
||||
nm_settings_docs_xml_dbus = custom_target(
|
||||
'nm-settings-docs-' + name + '.xml',
|
||||
input: [nm_settings_docs_xml_gir, nm_property_infos_xml[name]],
|
||||
output: 'nm-settings-docs-' + name + '.xml',
|
||||
command: [
|
||||
python.path(),
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py'),
|
||||
'@OUTPUT@',
|
||||
nm_property_infos_xml[name],
|
||||
nm_settings_docs_xml_gir,
|
||||
],
|
||||
)
|
||||
|
||||
name = 'nmcli'
|
||||
nm_settings_docs_xml_nmcli = custom_target(
|
||||
'nm-settings-docs-' + name + '.xml',
|
||||
input: [nm_settings_docs_xml_gir, nm_property_infos_xml[name]],
|
||||
output: 'nm-settings-docs-' + name + '.xml',
|
||||
command: [
|
||||
python.path(),
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py'),
|
||||
'@OUTPUT@',
|
||||
generate_docs_nm_settings_nmcli_xml,
|
||||
nm_property_infos_xml[name],
|
||||
nm_settings_docs_xml_gir,
|
||||
],
|
||||
)
|
||||
|
||||
nm_settings_docs_xml = {
|
||||
'gir': nm_settings_docs_xml_gir,
|
||||
'dbus': nm_settings_docs_xml_dbus,
|
||||
'nmcli': nm_settings_docs_xml_nmcli,
|
||||
}
|
||||
|
||||
mans = [
|
||||
['nm-settings-keyfile', '5', nm_settings_keyfile_docs],
|
||||
['nm-settings', '5', nm_settings_docs],
|
||||
['nm-settings-keyfile', '5', nm_property_infos_xml['keyfile']],
|
||||
['nm-settings-dbus', '5', nm_settings_docs_xml['dbus']],
|
||||
['nm-settings-nmcli', '5', nm_settings_docs_xml['nmcli']],
|
||||
]
|
||||
|
||||
if enable_ifcfg_rh
|
||||
mans += [['nm-settings-ifcfg-rh', '5', nm_settings_ifcfg_rh_docs]]
|
||||
mans += [['nm-settings-ifcfg-rh', '5', nm_property_infos_xml['ifcfg-rh']]]
|
||||
endif
|
||||
|
||||
foreach man: mans
|
||||
|
@@ -13,21 +13,21 @@
|
||||
/>
|
||||
|
||||
<xsl:template match="nm-setting-docs">
|
||||
<refentry id="nm-settings">
|
||||
<refentry id="nm-settings-dbus">
|
||||
<refentryinfo>
|
||||
<title>nm-settings</title>
|
||||
<title>nm-settings-dbus</title>
|
||||
<author>NetworkManager developers</author>
|
||||
</refentryinfo>
|
||||
<refmeta>
|
||||
<refentrytitle>nm-settings</refentrytitle>
|
||||
<refentrytitle>nm-settings-dbus</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
<refmiscinfo class="source">NetworkManager</refmiscinfo>
|
||||
<refmiscinfo class="manual">Configuration</refmiscinfo>
|
||||
<refmiscinfo class="version">&NM_VERSION;</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>nm-settings</refname>
|
||||
<refpurpose>Description of settings and properties of NetworkManager connection profiles</refpurpose>
|
||||
<refname>nm-settings-dbus</refname>
|
||||
<refpurpose>Description of settings and properties of NetworkManager connection profiles on the D-Bus API</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 id='description'><title>Description</title>
|
||||
@@ -122,10 +122,14 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id='see_also'><title>See Also</title>
|
||||
<para><link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
|
||||
<para>
|
||||
<link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
|
||||
<link linkend='nm-settings-keyfile'><citerefentry><refentrytitle>nm-settings-keyfile</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
|
||||
<link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
|
||||
<link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
|
||||
<link linkend='nmcli-examples'><citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>7</manvolnum></citerefentry></link>,
|
||||
<link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link></para>
|
||||
<link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</xsl:template>
|
||||
@@ -155,7 +159,7 @@
|
||||
<xsl:template match="property">
|
||||
<xsl:variable name="setting_name" select="../@name"/>
|
||||
<row>
|
||||
<entry align="left"><xsl:attribute name="id">nm-settings.property.<xsl:value-of select="../@name"/>.<xsl:value-of select="@name"/></xsl:attribute><xsl:value-of select="@name"/></entry>
|
||||
<entry align="left"><xsl:attribute name="id">nm-settings-dbus.property.<xsl:value-of select="../@name"/>.<xsl:value-of select="@name"/></xsl:attribute><xsl:value-of select="@name"/></entry>
|
||||
<entry align="left"><xsl:value-of select="@type"/></entry>
|
||||
<entry align="left"><xsl:value-of select="@default"/></entry>
|
||||
<entry><xsl:value-of select="@description"/><xsl:if test="@type = 'NMSettingSecretFlags (uint32)'"> (see <xref linkend="secrets-flags"/> for flag values)</xsl:if></entry>
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<!-- We need to strip whitespaces so that position() function counts correctly.
|
||||
http://www.oxygenxml.com/archives/xsl-list/200305/msg00430.html -->
|
||||
<xsl:strip-space elements="nm-ifcfg-rh-docs setting" />
|
||||
<xsl:strip-space elements="nm-setting-docs setting" />
|
||||
|
||||
<xsl:output
|
||||
method="xml"
|
||||
@@ -16,7 +16,7 @@
|
||||
doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
||||
/>
|
||||
|
||||
<xsl:template match="nm-ifcfg-rh-docs">
|
||||
<xsl:template match="nm-setting-docs">
|
||||
<refentry id="nm-settings-ifcfg-rh">
|
||||
<refentryinfo>
|
||||
<title>nm-settings-ifcfg-rh</title>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
||||
/>
|
||||
|
||||
<xsl:template match="nm-keyfile-docs">
|
||||
<xsl:template match="nm-setting-docs">
|
||||
<refentry id="nm-settings-keyfile">
|
||||
<refentryinfo>
|
||||
<title>nm-settings-keyfile</title>
|
||||
|
145
man/nm-settings-nmcli.xsl
Normal file
145
man/nm-settings-nmcli.xsl
Normal file
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE stylesheet [
|
||||
<!ENTITY % entities SYSTEM "common.ent" >
|
||||
%entities;
|
||||
]>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output
|
||||
method="xml"
|
||||
doctype-public="-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
||||
/>
|
||||
|
||||
<xsl:template match="nm-setting-docs">
|
||||
<refentry id="nm-settings-nmcli">
|
||||
<refentryinfo>
|
||||
<title>nm-settings-nmcli</title>
|
||||
<author>NetworkManager developers</author>
|
||||
</refentryinfo>
|
||||
<refmeta>
|
||||
<refentrytitle>nm-settings-nmcli</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
<refmiscinfo class="source">NetworkManager</refmiscinfo>
|
||||
<refmiscinfo class="manual">Configuration</refmiscinfo>
|
||||
<refmiscinfo class="version">&NM_VERSION;</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>nm-settings-nmcli</refname>
|
||||
<refpurpose>Description of settings and properties of NetworkManager connection profiles for nmcli</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 id='description'><title>Description</title>
|
||||
<para>
|
||||
NetworkManager is based on a concept of connection profiles, sometimes referred to as
|
||||
connections only. These connection profiles contain a network configuration. When
|
||||
NetworkManager activates a connection profile on a network device the configuration will
|
||||
be applied and an active network connection will be established. Users are free to create
|
||||
as many connection profiles as they see fit. Thus they are flexible in having various network
|
||||
configurations for different networking needs.
|
||||
</para>
|
||||
<para>
|
||||
NetworkManager provides an API for configuring connection profiles, for activating them
|
||||
to configure the network, and inspecting the current network configuration. The command
|
||||
line tool <emphasis>nmcli</emphasis> is a client application to NetworkManager that uses
|
||||
this API. See <link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>
|
||||
for details.
|
||||
</para>
|
||||
<para>
|
||||
With commands like <literal>nmcli connection add</literal>, <literal>nmcli connection modify</literal>
|
||||
and <literal>nmcli connection show</literal>, connection profiles can be created, modified
|
||||
and inspected. A profile consists of properties. On D-Bus this follows the format
|
||||
as described by <link linkend='nm-settings-dbus'><citerefentry><refentrytitle>nm-settings-dbus</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
|
||||
while this manual page describes the settings format how they are expected by <emphasis>nmcli</emphasis>.
|
||||
</para>
|
||||
<para>
|
||||
The settings and properties shown in tables below list all available connection
|
||||
configuration options. However, note that not all settings are applicable to all
|
||||
connection types. <emphasis>nmcli</emphasis> connection editor has also a built-in
|
||||
<emphasis>describe</emphasis> command that can display description of particular settings
|
||||
and properties of this page.
|
||||
</para>
|
||||
<xsl:apply-templates/>
|
||||
<refsect2 id="secrets-flags">
|
||||
<title>Secret flag types:</title>
|
||||
<para>
|
||||
Each password or secret property in a setting has an associated <emphasis>flags</emphasis> property
|
||||
that describes how to handle that secret. The <emphasis>flags</emphasis> property is a bitfield
|
||||
that contains zero or more of the following values logically OR-ed together.
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>0x0 (none) - the system is responsible for providing and storing this secret. This
|
||||
may be required so that secrets are already available before the user logs in.
|
||||
It also commonly means that the secret will be stored in plain text on disk, accessible
|
||||
to root only. For example via the keyfile settings plugin as described in the "PLUGINS" section
|
||||
in <link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>0x1 (agent-owned) - a user-session secret agent is responsible for providing and storing
|
||||
this secret; when it is required, agents will be asked to provide it.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>0x2 (not-saved) - this secret should not be saved but should be requested from the user
|
||||
each time it is required. This flag should be used for One-Time-Pad secrets, PIN codes from hardware tokens,
|
||||
or if the user simply does not want to save the secret.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>0x4 (not-required) - in some situations it cannot be automatically determined that a secret
|
||||
is required or not. This flag hints that the secret is not required and should not be requested from the user.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id='files'><title>Files</title>
|
||||
<para><filename>/etc/NetworkManager/system-connections</filename> or distro plugin-specific location</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id='see_also'><title>See Also</title>
|
||||
<para>
|
||||
<link linkend='nm-settings-dbus'><citerefentry><refentrytitle>nm-settings-dbus</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
|
||||
<link linkend='nm-settings-keyfile'><citerefentry><refentrytitle>nm-settings-keyfile</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
|
||||
<link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
|
||||
<link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
|
||||
<link linkend='nmcli-examples'><citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>7</manvolnum></citerefentry></link>,
|
||||
<link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link></para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="setting">
|
||||
<refsect2>
|
||||
<title><xsl:value-of select="@name"/> setting</title>
|
||||
<para><xsl:value-of select="@description"/>.</para>
|
||||
<informaltable>
|
||||
<tgroup cols="4">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Key Name</entry>
|
||||
<entry>Value Type</entry>
|
||||
<entry>Default Value</entry>
|
||||
<entry>Value Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:apply-templates/>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect2>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="property">
|
||||
<xsl:variable name="setting_name" select="../@name"/>
|
||||
<row>
|
||||
<entry align="left"><xsl:attribute name="id">nm-settings-nmcli.property.<xsl:value-of select="../@name"/>.<xsl:value-of select="@name"/></xsl:attribute><xsl:value-of select="@name"/></entry>
|
||||
<entry align="left"><xsl:value-of select="@type"/></entry>
|
||||
<entry align="left"><xsl:value-of select="@default"/></entry>
|
||||
<entry><xsl:value-of select="@description"/><xsl:if test="@type = 'NMSettingSecretFlags (uint32)'"> (see <xref linkend="secrets-flags"/> for flag values)</xsl:if></entry>
|
||||
</row>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
@@ -12,7 +12,7 @@ project(
|
||||
'buildtype=debugoptimized',
|
||||
'c_std=gnu11',
|
||||
],
|
||||
meson_version: '>= 0.46.0',
|
||||
meson_version: '>= 0.47.2',
|
||||
)
|
||||
|
||||
nm_name = meson.project_name()
|
||||
|
@@ -56,6 +56,9 @@ libnm-core/nm-crypto-gnutls.c
|
||||
libnm-core/nm-crypto-nss.c
|
||||
libnm-core/nm-connection.c
|
||||
libnm-core/nm-dbus-utils.c
|
||||
libnm-core/nm-keyfile/nm-keyfile-utils.c
|
||||
libnm-core/nm-keyfile/nm-keyfile.c
|
||||
libnm-core/nm-libnm-core-aux/nm-libnm-core-aux.c
|
||||
libnm-core/nm-setting-6lowpan.c
|
||||
libnm-core/nm-setting-8021x.c
|
||||
libnm-core/nm-setting-adsl.c
|
||||
@@ -140,9 +143,6 @@ libnm/nm-vpn-plugin-old.c
|
||||
libnm/nm-vpn-service-plugin.c
|
||||
data/org.freedesktop.NetworkManager.policy.in.in
|
||||
shared/nm-glib-aux/nm-shared-utils.c
|
||||
shared/nm-keyfile/nm-keyfile-utils.c
|
||||
shared/nm-keyfile/nm-keyfile.c
|
||||
shared/nm-libnm-core-aux/nm-libnm-core-aux.c
|
||||
src/NetworkManagerUtils.c
|
||||
src/main.c
|
||||
src/main-utils.c
|
||||
|
@@ -107,27 +107,12 @@ nm_version_macro_header = configure_file(
|
||||
configuration: data_conf,
|
||||
)
|
||||
|
||||
nm_ethtool_utils_source = files('nm-libnm-core-intern/nm-ethtool-utils.c')
|
||||
|
||||
nm_libnm_core_aux_source = files('nm-libnm-core-aux/nm-libnm-core-aux.c')
|
||||
|
||||
nm_libnm_core_utils_source = files('nm-libnm-core-intern/nm-libnm-core-utils.c')
|
||||
|
||||
nm_keyfile_source = files(
|
||||
'nm-keyfile/nm-keyfile-utils.c',
|
||||
'nm-keyfile/nm-keyfile.c',
|
||||
)
|
||||
|
||||
nm_libnm_aux_source = files('nm-libnm-aux/nm-libnm-aux.c')
|
||||
|
||||
nm_meta_setting_source = files('nm-meta-setting.c')
|
||||
|
||||
nm_test_utils_impl_source = files('nm-test-utils-impl.c')
|
||||
|
||||
nm_vpn_plugin_utils_source = files('nm-utils/nm-vpn-plugin-utils.c')
|
||||
|
||||
nm_auth_subject_source = files('nm-libnm-core-intern/nm-auth-subject.c')
|
||||
|
||||
c_flags = [
|
||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||
'-DNETWORKMANAGER_COMPILATION=0',
|
||||
|
@@ -131,17 +131,13 @@ sub process_data {
|
||||
# - XML handling -
|
||||
sub write_header {
|
||||
(my $header =
|
||||
qq{<?xml version=\"1.0\"?>
|
||||
<!DOCTYPE nm-$plugin-docs [
|
||||
]>
|
||||
|
||||
<nm-$plugin-docs>
|
||||
qq{<nm-setting-docs>
|
||||
}) =~ s/^ {7}//mg;
|
||||
print {$fo} $header;
|
||||
}
|
||||
|
||||
sub write_footer {
|
||||
my $footer = "</nm-$plugin-docs>";
|
||||
my $footer = "</nm-setting-docs>";
|
||||
print {$fo} $footer;
|
||||
}
|
||||
|
@@ -172,7 +172,6 @@ def usage():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-l', '--lib-path', metavar='PATH', action='append', help='path to scan for shared libraries')
|
||||
parser.add_argument('-g', '--gir', metavar='FILE', help='NM-1.0.gir file')
|
||||
parser.add_argument('-x', '--overrides', metavar='FILE', help='documentation overrides file')
|
||||
parser.add_argument('-o', '--output', metavar='FILE', help='output file')
|
||||
|
||||
args = parser.parse_args()
|
||||
@@ -195,9 +194,6 @@ settings = sorted(settings, key=settings_sort_key)
|
||||
|
||||
init_constants(girxml, settings)
|
||||
|
||||
if args.overrides is not None:
|
||||
overrides = ET.parse(args.overrides).getroot()
|
||||
|
||||
outfile.write("""<?xml version=\"1.0\"?>
|
||||
<!DOCTYPE nm-setting-docs [
|
||||
<!ENTITY quot """>
|
||||
@@ -218,48 +214,31 @@ for settingxml in settings:
|
||||
outfile.write(" <setting name=\"%s\" description=\"%s\" name_upper=\"%s\" >\n" % (setting.props.name, class_desc, get_setting_name_define (settingxml)))
|
||||
|
||||
setting_properties = { prop.name: prop for prop in GObject.list_properties(setting) if prop.name != 'name' }
|
||||
if args.overrides is None:
|
||||
setting_overrides = {}
|
||||
else:
|
||||
setting_overrides = { override.attrib['name']: override for override in overrides.findall('./setting[@name="%s"]/property' % setting.props.name) }
|
||||
|
||||
properties = sorted(set.union(set(setting_properties.keys()), set(setting_overrides.keys())))
|
||||
for prop in sorted(setting_properties):
|
||||
pspec = setting_properties[prop]
|
||||
|
||||
for prop in properties:
|
||||
value_type = None
|
||||
value_desc = None
|
||||
default_value = None
|
||||
propxml = settingxml.find('./gi:property[@name="%s"]' % pspec.name, ns_map)
|
||||
if propxml is None:
|
||||
propxml = basexml.find('./gi:property[@name="%s"]' % pspec.name, ns_map)
|
||||
if propxml is None:
|
||||
propxml = ipxml.find('./gi:property[@name="%s"]' % pspec.name, ns_map)
|
||||
|
||||
if prop in setting_properties:
|
||||
pspec = setting_properties[prop]
|
||||
propxml = settingxml.find('./gi:property[@name="%s"]' % pspec.name, ns_map)
|
||||
if propxml is None:
|
||||
propxml = basexml.find('./gi:property[@name="%s"]' % pspec.name, ns_map)
|
||||
if propxml is None:
|
||||
propxml = ipxml.find('./gi:property[@name="%s"]' % pspec.name, ns_map)
|
||||
|
||||
value_type = get_prop_type(setting, pspec)
|
||||
value_desc = get_docs(propxml)
|
||||
default_value = get_default_value(setting, pspec, propxml)
|
||||
|
||||
if prop in setting_overrides:
|
||||
override = setting_overrides[prop]
|
||||
if override.attrib['format'] != '':
|
||||
value_type = override.attrib['format']
|
||||
if override.attrib['description'] != '':
|
||||
value_desc = override.attrib['description']
|
||||
value_type = get_prop_type(setting, pspec)
|
||||
value_desc = get_docs(propxml)
|
||||
default_value = get_default_value(setting, pspec, propxml)
|
||||
|
||||
prop_upper = prop.upper().replace('-', '_')
|
||||
|
||||
if value_desc is None:
|
||||
raise Exception("%s.%s needs a documentation description" % (setting.props.name, prop))
|
||||
|
||||
default_value_as_xml = ''
|
||||
if default_value is not None:
|
||||
outfile.write(" <property name=\"%s\" name_upper=\"%s\" type=\"%s\" default=\"%s\" description=\"%s\" />\n" %
|
||||
(prop, prop_upper, value_type, escape(default_value), escape(value_desc)))
|
||||
else:
|
||||
outfile.write(" <property name=\"%s\" name_upper=\"%s\" type=\"%s\" description=\"%s\" />\n" %
|
||||
(prop, prop_upper, value_type, escape(value_desc)))
|
||||
default_value_as_xml = (' default=\"%s\"' % (escape(default_value)))
|
||||
|
||||
outfile.write(" <property name=\"%s\" name_upper=\"%s\" type=\"%s\"%s description=\"%s\" />\n" %
|
||||
(prop, prop_upper, value_type, default_value_as_xml, escape(value_desc)))
|
||||
|
||||
outfile.write(" </setting>\n")
|
||||
|
146
tools/generate-docs-nm-settings-docs-merge.py
Executable file
146
tools/generate-docs-nm-settings-docs-merge.py
Executable file
@@ -0,0 +1,146 @@
|
||||
#!/usr/bin/env python
|
||||
# SPDX-License-Identifier: LGPL-2.1+
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
import collections
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
###############################################################################
|
||||
|
||||
_setting_name_order = [
|
||||
"connection",
|
||||
"6lowpan",
|
||||
"802-1x",
|
||||
"adsl",
|
||||
"bluetooth",
|
||||
"bond",
|
||||
"bridge",
|
||||
"bridge-port",
|
||||
"cdma",
|
||||
"dcb",
|
||||
"dummy",
|
||||
"ethtool",
|
||||
"generic",
|
||||
"gsm",
|
||||
"infiniband",
|
||||
"ipv4",
|
||||
"ipv6",
|
||||
"ip-tunnel",
|
||||
"macsec",
|
||||
"macvlan",
|
||||
"match",
|
||||
"802-11-olpc-mesh",
|
||||
"ovs-bridge",
|
||||
"ovs-dpdk",
|
||||
"ovs-interface",
|
||||
"ovs-patch",
|
||||
"ovs-port",
|
||||
"ppp",
|
||||
"pppoe",
|
||||
"proxy",
|
||||
"serial",
|
||||
"sriov",
|
||||
"tc",
|
||||
"team",
|
||||
"team-port",
|
||||
"tun",
|
||||
"user",
|
||||
"vlan",
|
||||
"vpn",
|
||||
"vrf",
|
||||
"vxlan",
|
||||
"wifi-p2p",
|
||||
"wimax",
|
||||
"802-3-ethernet",
|
||||
"wireguard",
|
||||
"802-11-wireless",
|
||||
"802-11-wireless-security",
|
||||
"wpan",
|
||||
]
|
||||
|
||||
def _setting_name_order_idx(name):
|
||||
try:
|
||||
return _setting_name_order.index(name)
|
||||
except ValueError:
|
||||
return len(_setting_name_order)
|
||||
|
||||
def key_fcn_setting_name(n1):
|
||||
return (_setting_name_order_idx(n1), n1)
|
||||
|
||||
def iter_keys_of_dicts(dicts, key = None):
|
||||
keys = set([k for d in dicts for k in d.keys()])
|
||||
return sorted(keys, key = key)
|
||||
|
||||
def node_to_dict(node, tag, key_attr):
|
||||
dictionary = collections.OrderedDict()
|
||||
if node is not None:
|
||||
for n in node.iter(tag):
|
||||
k = n.get(key_attr)
|
||||
assert(k is not None)
|
||||
dictionary[k] = n
|
||||
return dictionary
|
||||
|
||||
def node_get_attr(nodes, name):
|
||||
for n in nodes:
|
||||
if n is None:
|
||||
continue
|
||||
x = n.get(name, None)
|
||||
if x:
|
||||
return x
|
||||
return None
|
||||
|
||||
def node_set_attr(dst_node, name, nodes):
|
||||
x = node_get_attr(nodes, name)
|
||||
if x:
|
||||
dst_node.set(name, x)
|
||||
|
||||
###############################################################################
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
print("%s [OUT_FILE] [SETTING_XML [...]]" % (sys.argv[0]))
|
||||
exit(1)
|
||||
|
||||
output_xml_file = sys.argv[1]
|
||||
|
||||
xml_roots = list([ET.parse(f).getroot() for f in sys.argv[2:]])
|
||||
|
||||
assert(all([root.tag == 'nm-setting-docs' for root in xml_roots]))
|
||||
|
||||
settings_roots = list([node_to_dict(root, 'setting', 'name') for root in xml_roots])
|
||||
|
||||
root_node = ET.Element('nm-setting-docs')
|
||||
|
||||
for setting_name in iter_keys_of_dicts(settings_roots, key_fcn_setting_name):
|
||||
|
||||
settings = list([d.get(setting_name) for d in settings_roots])
|
||||
|
||||
setting_node = ET.SubElement(root_node, 'setting')
|
||||
|
||||
setting_node.set('name', setting_name)
|
||||
|
||||
node_set_attr(setting_node, 'description', settings)
|
||||
node_set_attr(setting_node, 'name_upper', settings)
|
||||
|
||||
properties = list([node_to_dict(s, 'property', 'name') for s in settings])
|
||||
|
||||
for property_name in iter_keys_of_dicts(properties):
|
||||
|
||||
properties_attrs = list([p.get(property_name) for p in properties])
|
||||
|
||||
property_node = ET.SubElement(setting_node, 'property')
|
||||
property_node.set('name', property_name)
|
||||
property_node.set('name_upper', property_name.upper().replace('-', '_'))
|
||||
|
||||
x = node_get_attr(properties_attrs, 'format')
|
||||
if x:
|
||||
property_node.set('type', x)
|
||||
else:
|
||||
node_set_attr(property_node, 'type', properties_attrs)
|
||||
|
||||
node_set_attr(property_node, 'default', properties_attrs)
|
||||
node_set_attr(property_node, 'description', properties_attrs)
|
||||
|
||||
ET.ElementTree(root_node).write(output_xml_file)
|
@@ -52,6 +52,7 @@ if [ "$enable_docs" = 1 ]; then
|
||||
done
|
||||
|
||||
ln -f "${DESTDIR}${nm_mandir}/man5/NetworkManager.conf.5" "${DESTDIR}${nm_mandir}/man5/nm-system-settings.conf.5"
|
||||
ln -f "${DESTDIR}${nm_mandir}/man5/nm-settings-nmcli.5" "${DESTDIR}${nm_mandir}/man5/nm-settings.5"
|
||||
fi
|
||||
|
||||
if [ "$enable_ifcfg_rh" = 1 ]; then
|
||||
|
Reference in New Issue
Block a user