summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-05-17 21:34:02 +0200
committerThomas Haller <thaller@redhat.com>2019-05-17 21:34:02 +0200
commite966f942ccfa3e6a467d572fd5897948caf78508 (patch)
treec23ff7c922d4e93c835659b101b2dd1ce6981899
parent2edf18376f8fcd5a664717f360c910fa36606678 (diff)
parent0cbef232c9515ba0f58e63d6a1599ea1403d4f03 (diff)
downloadNetworkManager-e966f942ccfa3e6a467d572fd5897948caf78508.tar.gz
build: merge branch 'th/build-runstatedir'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/145
-rw-r--r--Makefile.am1
-rw-r--r--config-extra.h.meson1
-rw-r--r--configure.ac9
-rw-r--r--contrib/fedora/rpm/NetworkManager.conf6
-rw-r--r--contrib/fedora/rpm/NetworkManager.spec1
-rwxr-xr-xcontrib/scripts/test-macsec2
-rw-r--r--meson.build4
-rw-r--r--src/dhcp/nm-dhcp-dhcpcd.c4
-rw-r--r--src/nm-config.c2
-rw-r--r--src/nm-session-monitor.c2
-rw-r--r--src/platform/tests/test-link.c6
11 files changed, 21 insertions, 17 deletions
diff --git a/Makefile.am b/Makefile.am
index 3fa232b84c..30557d8ab5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -127,7 +127,6 @@ config-extra.h: Makefile
echo "#define NM_BUILD_SRCDIR \"$(abs_srcdir)\"" >>$@ && \
echo "#define PPPD_PLUGIN_DIR \"$(PPPD_PLUGIN_DIR)\"" >>$@ && \
echo "#define PREFIX \"$(prefix)\"" >>$@ && \
- echo "#define RUNDIR \"$(rundir)\"" >>$@ && \
echo "#define RUNSTATEDIR \"$(runstatedir)\"" >>$@ && \
echo "#define SYSCONFDIR \"$(sysconfdir)\"" >>$@ && \
true
diff --git a/config-extra.h.meson b/config-extra.h.meson
index 34c962fdd5..c539530548 100644
--- a/config-extra.h.meson
+++ b/config-extra.h.meson
@@ -13,6 +13,5 @@
#mesondefine NM_BUILD_SRCDIR
#mesondefine PPPD_PLUGIN_DIR
#mesondefine PREFIX
-#mesondefine RUNDIR
#mesondefine RUNSTATEDIR
#mesondefine SYSCONFDIR
diff --git a/configure.ac b/configure.ac
index 47f9ce2759..7d4adc7509 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,7 +115,14 @@ GETTEXT_PACKAGE=NetworkManager
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
-# Add runstatedir if not specified manually in autoconf < 2.70
+# autoconf 2.70 adds option --runstatedir. To make the directory also configurable
+# on older versions, add --with-runstatedir option. Note that this option overwrites
+# --runstatedir (should it be set). If you know to use autoconf >= 2.70, you should
+# instead use --runstatedir.
+AC_ARG_WITH([runstatedir],
+ AS_HELP_STRING([--with-runstatedir=DIR],
+ [Directory for /var/run. Defaults to $localstatedir/run. In autoconf >= 2.70, you should instead use --runstatedir option. This option takes precedence over --runstatedir.]),
+ [runstatedir="$withval"])
AS_IF([test -z "$runstatedir"], runstatedir="$localstatedir/run")
AC_SUBST(runstatedir)
diff --git a/contrib/fedora/rpm/NetworkManager.conf b/contrib/fedora/rpm/NetworkManager.conf
index 1979ea6878..a2bb0fd39e 100644
--- a/contrib/fedora/rpm/NetworkManager.conf
+++ b/contrib/fedora/rpm/NetworkManager.conf
@@ -2,7 +2,7 @@
#
# See "man 5 NetworkManager.conf" for details.
#
-# The directories /usr/lib/NetworkManager/conf.d/ and /var/run/NetworkManager/conf.d/
+# The directories /usr/lib/NetworkManager/conf.d/ and /run/NetworkManager/conf.d/
# can contain additional configuration snippets installed by packages. These files are
# read before NetworkManager.conf and have thus lowest priority.
# The directory /etc/NetworkManager/conf.d/ can contain additional configuration
@@ -15,7 +15,7 @@
# /usr/lib/NetworkManager/conf.d/, the latter file is shadowed and thus ignored.
# Hence, to disable loading a file from /usr/lib/NetworkManager/conf.d/ you can
# put an empty file to /etc with the same name. The same applies with respect
-# to the directory /var/run/NetworkManager/conf.d where files in /var/run shadow
+# to the directory /run/NetworkManager/conf.d where files in /run shadow
# /usr/lib and are themselves shadowed by files under /etc.
#
# If two files define the same key, the one that is read afterwards will overwrite
@@ -44,7 +44,7 @@
#
# Note that debug logging of NetworkManager can be quite verbose. Some messages
# might be rate-limited by the logging daemon (see RateLimitIntervalSec, RateLimitBurst
-# in man journald.conf).
+# in man journald.conf). Please disable rate-limiting before collecting debug logs.
#
#level=TRACE
#domains=ALL
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec
index 39252c1010..c3551fd710 100644
--- a/contrib/fedora/rpm/NetworkManager.spec
+++ b/contrib/fedora/rpm/NetworkManager.spec
@@ -599,6 +599,7 @@ gtkdocize
autoreconf --install --force
intltoolize --automake --copy --force
%configure \
+ --with-runstatedir=/run \
--disable-silent-rules \
--disable-static \
--with-dhclient=yes \
diff --git a/contrib/scripts/test-macsec b/contrib/scripts/test-macsec
index 60f207bb05..93935865f1 100755
--- a/contrib/scripts/test-macsec
+++ b/contrib/scripts/test-macsec
@@ -46,7 +46,7 @@ ip -n macsec-ns link set macsec-vethp up
echo "* Start wpa_supplicant..."
cat <<EOF > $TMPDIR/wpa_supplicant.conf
-ctrl_interface=/var/run/hostapd1
+ctrl_interface=/run/hostapd1
eapol_version=3
ap_scan=0
fast_reauth=1
diff --git a/meson.build b/meson.build
index 8e34ab2e23..e6b220c62b 100644
--- a/meson.build
+++ b/meson.build
@@ -862,7 +862,6 @@ config_extra_h.set_quoted('LIBEXECDIR', nm_libexecdir)
config_extra_h.set_quoted('LOCALSTATEDIR', nm_localstatedir)
config_extra_h.set_quoted('NMCONFDIR', nm_pkgconfdir)
config_extra_h.set_quoted('NMLIBDIR', nm_pkglibdir)
-config_extra_h.set_quoted('NMLIBDIR', nm_pkglibdir)
config_extra_h.set_quoted('NMLOCALEDIR', nm_localedir)
config_extra_h.set_quoted('NMPLUGINDIR', nm_plugindir)
config_extra_h.set_quoted('NMRUNDIR', nm_pkgrundir)
@@ -871,10 +870,9 @@ config_extra_h.set_quoted('NMVPNDIR', nm_vpndir)
config_extra_h.set_quoted('NM_BUILD_BUILDDIR', meson.build_root())
config_extra_h.set_quoted('NM_BUILD_SRCDIR', meson.source_root())
if enable_ppp
- config_extra_h.set_quoted('PPPD_PLUGIN_DIR', pppd_plugin_dir)
+ config_extra_h.set_quoted('PPPD_PLUGIN_DIR', pppd_plugin_dir)
endif
config_extra_h.set_quoted('PREFIX', nm_prefix)
-config_extra_h.set_quoted('RUNDIR', nm_pkgrundir)
config_extra_h.set_quoted('RUNSTATEDIR', nm_runstatedir)
config_extra_h.set_quoted('SYSCONFDIR', nm_sysconfdir)
diff --git a/src/dhcp/nm-dhcp-dhcpcd.c b/src/dhcp/nm-dhcp-dhcpcd.c
index 2a7482b1fe..ddfb3a4135 100644
--- a/src/dhcp/nm-dhcp-dhcpcd.c
+++ b/src/dhcp/nm-dhcp-dhcpcd.c
@@ -100,9 +100,9 @@ ip4_start (NMDhcpClient *client,
iface = nm_dhcp_client_get_iface (client);
/* dhcpcd does not allow custom pidfiles; the pidfile is always
- * RUNDIR "dhcpcd-<ifname>.pid".
+ * RUNSTATEDIR "dhcpcd-<ifname>.pid".
*/
- priv->pid_file = g_strdup_printf (RUNDIR "/dhcpcd-%s.pid", iface);
+ priv->pid_file = g_strdup_printf (RUNSTATEDIR "/dhcpcd-%s.pid", iface);
dhcpcd_path = nm_dhcp_dhcpcd_get_path ();
if (!dhcpcd_path) {
diff --git a/src/nm-config.c b/src/nm-config.c
index 9fcd6591d5..8262d78721 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -67,7 +67,7 @@ struct NMConfigCmdLineOptions {
*
* It is true, if NM is started the first time -- contrary to a restart
* during the same boot up. That is determined by the content of the
- * /var/run/NetworManager state directory. */
+ * /run/NetworManager state directory. */
bool first_start;
};
diff --git a/src/nm-session-monitor.c b/src/nm-session-monitor.c
index e8c25fd648..f57a767739 100644
--- a/src/nm-session-monitor.c
+++ b/src/nm-session-monitor.c
@@ -44,7 +44,7 @@
#define SESSION_TRACKING_XLOGIND (SESSION_TRACKING_SYSTEMD || SESSION_TRACKING_ELOGIND)
-#define CKDB_PATH "/var/run/ConsoleKit/database"
+#define CKDB_PATH "/run/ConsoleKit/database"
/*****************************************************************************/
diff --git a/src/platform/tests/test-link.c b/src/platform/tests/test-link.c
index a0650cc18e..a2e3a6efb1 100644
--- a/src/platform/tests/test-link.c
+++ b/src/platform/tests/test-link.c
@@ -2765,9 +2765,9 @@ test_netns_push (gpointer fixture, gconstpointer test_data)
static void
test_netns_bind_to_path (gpointer fixture, gconstpointer test_data)
{
-#define P_VAR_RUN "/var/run"
-#define P_VAR_RUN_NETNS "/var/run/netns"
-#define P_VAR_RUN_NETNS_BINDNAME "/var/run/netns/"P_NETNS_BINDNAME
+#define P_VAR_RUN "/run"
+#define P_VAR_RUN_NETNS "/run/netns"
+#define P_VAR_RUN_NETNS_BINDNAME "/run/netns/"P_NETNS_BINDNAME
#define P_NETNS_BINDNAME "nmtst-iproute2-netns"
gs_unref_object NMPlatform *platform_0 = NULL;
gs_unref_object NMPlatform *platform_1 = NULL;