Blame SOURCES/autoconf-2.69-backport-runstatedir-option.patch

8dc1e6
From a197431414088a417b407b9b20583b2e8f7363bd Mon Sep 17 00:00:00 2001
8dc1e6
From: Eric Blake <eblake@redhat.com>
8dc1e6
Date: Thu, 12 Sep 2013 15:11:29 -0600
8dc1e6
Subject: [PATCH] AC_INIT: add --runstatedir option to configure
8dc1e6
8dc1e6
http://lwn.net/Articles/436012/ documents that many distros
8dc1e6
are now preferring to use /run rather than /var/run for
8dc1e6
storage of pid files and other per-process temporary files
8dc1e6
that must not be cleaned out during arbitrary TMPDIR sweeps.
8dc1e6
As such, the GNU Coding Standards were recently changed to
8dc1e6
recommend a new configure option to make it easy to choose
8dc1e6
this directory at configure time.  This patch adds support
8dc1e6
for the option to all configure scripts built by autoconf.
8dc1e6
8dc1e6
* general.m4 (_AC_INIT_PARSE_ARGS): Add new directory option.
8dc1e6
(_AC_INIT_HELP): Document it.
8dc1e6
* doc/autoconf.texi (Installation Directory Variables): Document
8dc1e6
new option.
8dc1e6
(Site Defaults): Mention typical use within a distro.
8dc1e6
* NEWS: Mention the addition.
8dc1e6
8dc1e6
Signed-off-by: Eric Blake <eblake@redhat.com>
8dc1e6
---
8dc1e6
 NEWS                    |    5 +++++
8dc1e6
 doc/autoconf.texi       |   14 +++++++++++++-
8dc1e6
 lib/autoconf/general.m4 |   13 ++++++++++++-
8dc1e6
 3 files changed, 30 insertions(+), 2 deletions(-)
8dc1e6
8dc1e6
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
8dc1e6
index 26e7b17..4932067 100644
8dc1e6
--- a/doc/autoconf.texi
8dc1e6
+++ b/doc/autoconf.texi
8dc1e6
@@ -2826,7 +2826,18 @@ usually has a subdirectory per locale.
8dc1e6
 
8dc1e6
 @defvar localstatedir
8dc1e6
 @ovindex localstatedir
8dc1e6
-The directory for installing modifiable single-machine data.
8dc1e6
+The directory for installing modifiable single-machine data.  Content in
8dc1e6
+this directory typically survives a reboot.
8dc1e6
+@end defvar
8dc1e6
+
8dc1e6
+@defvar runstatedir
8dc1e6
+@ovindex runstatedir
8dc1e6
+The directory for installing temporary modifiable single-machine data.
8dc1e6
+Content in this directory survives as long as the process is running
8dc1e6
+(such as pid files), as contrasted with @file{/tmp} that may be
8dc1e6
+periodically cleaned.  Conversely, this directory is typically cleaned
8dc1e6
+on a reboot.  By default, this is a subdirectory of
8dc1e6
+@code{localstatedir}.
8dc1e6
 @end defvar
8dc1e6
 
8dc1e6
 @defvar mandir
8dc1e6
@@ -22606,6 +22617,7 @@ test "$prefix" = NONE && prefix=/usr/share/local/gnu
8dc1e6
 test "$exec_prefix" = NONE && exec_prefix=/usr/local/gnu
8dc1e6
 test "$sharedstatedir" = '$@{prefix@}/com' && sharedstatedir=/var
8dc1e6
 test "$localstatedir" = '$@{prefix@}/var' && localstatedir=/var
8dc1e6
+test "$runstatedir" = '$@{localstatedir@}/run' && runstatedir=/run
8dc1e6
 
8dc1e6
 # Give Autoconf 2.x generated configure scripts a shared default
8dc1e6
 # cache file for feature test results, architecture-specific.
8dc1e6
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
8dc1e6
index 70b0168..1ce9922 100644
8dc1e6
--- a/lib/autoconf/general.m4
8dc1e6
+++ b/lib/autoconf/general.m4
8dc1e6
@@ -586,6 +586,7 @@ AC_SUBST([datadir],        ['${datarootdir}'])dnl
8dc1e6
 AC_SUBST([sysconfdir],     ['${prefix}/etc'])dnl
8dc1e6
 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
8dc1e6
 AC_SUBST([localstatedir],  ['${prefix}/var'])dnl
8dc1e6
+AC_SUBST([runstatedir],    ['${localstatedir}/run'])dnl
8dc1e6
 AC_SUBST([includedir],     ['${prefix}/include'])dnl
8dc1e6
 AC_SUBST([oldincludedir],  ['/usr/include'])dnl
8dc1e6
 AC_SUBST([docdir],         [m4_ifset([AC_PACKAGE_TARNAME],
8dc1e6
@@ -812,6 +813,15 @@ do
8dc1e6
   | -silent | --silent | --silen | --sile | --sil)
8dc1e6
     silent=yes ;;
8dc1e6
 
8dc1e6
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
8dc1e6
+  | --runstate | --runstat | --runsta | --runst | --runs \
8dc1e6
+  | --run | --ru | --r)
8dc1e6
+    ac_prev=runstatedir ;;
8dc1e6
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
8dc1e6
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
8dc1e6
+  | --run=* | --ru=* | --r=*)
8dc1e6
+    runstatedir=$ac_optarg ;;
8dc1e6
+
8dc1e6
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
8dc1e6
     ac_prev=sbindir ;;
8dc1e6
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
8dc1e6
@@ -921,7 +931,7 @@ fi
8dc1e6
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
8dc1e6
 		datadir sysconfdir sharedstatedir localstatedir includedir \
8dc1e6
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
8dc1e6
-		libdir localedir mandir
8dc1e6
+		libdir localedir mandir runstatedir
8dc1e6
 do
8dc1e6
   eval ac_val=\$$ac_var
8dc1e6
   # Remove trailing slashes.
8dc1e6
@@ -1058,6 +1068,7 @@ Fine tuning of the installation directories:
8dc1e6
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
8dc1e6
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
8dc1e6
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
8dc1e6
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
8dc1e6
   --libdir=DIR            object code libraries [EPREFIX/lib]
8dc1e6
   --includedir=DIR        C header files [PREFIX/include]
8dc1e6
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
8dc1e6
-- 
8dc1e6
1.7.2.5