summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--auto/help4
-rw-r--r--auto/make4
-rw-r--r--auto/options8
-rw-r--r--auto/summary2
-rwxr-xr-xconfigure2
-rw-r--r--pkg/deb/Makefile2
-rw-r--r--pkg/docker/template.Dockerfile2
-rw-r--r--pkg/rpm/Makefile2
-rw-r--r--src/nxt_runtime.c10
-rw-r--r--test/conftest.py2
-rwxr-xr-xtools/setup-unit6
11 files changed, 22 insertions, 22 deletions
diff --git a/auto/help b/auto/help
index 5de528ba..f2307e9c 100644
--- a/auto/help
+++ b/auto/help
@@ -21,14 +21,14 @@ cat << END
--datarootdir=DIR default: "\$prefix/share"
--mandir=DIR default: "\$datarootdir/man"
--localstatedir=DIR default: "\$prefix/var"
- --libstatedir=DIR default: "\$localstatedir/lib/unit"
+ --statedir=DIR default: "\$localstatedir/lib/unit"
--runstatedir=DIR default: "\$localstatedir/run/unit"
--logdir=DIR default: "\$localstatedir/log/unit"
--tmpdir=DIR default: "/tmp"
--incdir=DIR [deprecated] synonym for --includedir
--modules=DIR [deprecated] synonym for --modulesdir
- --state=DIR [deprecated] synonym for --libstatedir
+ --state=DIR [deprecated] synonym for --statedir
--tmp=DIR [deprecated] synonym for --tmpdir
--pid=FILE set pid filename, default: "\$runstatedir/unit.pid"
diff --git a/auto/make b/auto/make
index 66f2b1ec..a8f17e73 100644
--- a/auto/make
+++ b/auto/make
@@ -366,8 +366,8 @@ ${NXT_DAEMON}-install: $NXT_DAEMON install-check
test -d \$(DESTDIR)$NXT_SBINDIR \
|| install -d \$(DESTDIR)$NXT_SBINDIR
install -p $NXT_BUILD_DIR/$NXT_DAEMON \$(DESTDIR)$NXT_SBINDIR/
- test -d \$(DESTDIR)$NXT_LIBSTATEDIR \
- || install -d \$(DESTDIR)$NXT_LIBSTATEDIR
+ test -d \$(DESTDIR)$NXT_STATEDIR \
+ || install -d \$(DESTDIR)$NXT_STATEDIR
test -d \$(DESTDIR)$NXT_LOGDIR \
|| install -d \$(DESTDIR)$NXT_LOGDIR
test -d \$(DESTDIR)$NXT_RUNSTATEDIR \
diff --git a/auto/options b/auto/options
index 802ab701..5487be7f 100644
--- a/auto/options
+++ b/auto/options
@@ -74,10 +74,10 @@ do
--datarootdir=*) NXT_DATAROOTDIR="$value" ;;
--mandir=*) NXT_MANDIR="$value" ;;
--localstatedir=*) NXT_LOCALSTATEDIR="$value" ;;
- --libstatedir=*) NXT_LIBSTATEDIR="$value" ;;
+ --statedir=*) NXT_STATEDIR="$value" ;;
--state=*)
- >&2 echo "[warn] option --state is deprecated; use --libstatedir"
- NXT_LIBSTATEDIR="$value"
+ >&2 echo "[warn] option --state is deprecated; use --statedir"
+ NXT_STATEDIR="$value"
;;
--logdir=*) NXT_LOGDIR="$value" ;;
--runstatedir=*) NXT_RUNSTATEDIR="$value" ;;
@@ -160,7 +160,7 @@ NXT_DATAROOTDIR="${NXT_DATAROOTDIR-"$NXT_PREFIX/share"}"
NXT_MANDIR="${NXT_MANDIR-"$NXT_DATAROOTDIR/man"}"
NXT_LOCALSTATEDIR="${NXT_LOCALSTATEDIR-"$NXT_PREFIX/var"}"
-NXT_LIBSTATEDIR="${NXT_LIBSTATEDIR-"$NXT_LOCALSTATEDIR/lib/unit"}"
+NXT_STATEDIR="${NXT_STATEDIR-"$NXT_LOCALSTATEDIR/lib/unit"}"
NXT_LOGDIR="${NXT_LOGDIR-"$NXT_LOCALSTATEDIR/log/unit"}"
NXT_LOG="${NXT_LOG-"$NXT_LOGDIR/unit.log"}"
NXT_RUNSTATEDIR="${NXT_RUNSTATEDIR-"$NXT_LOCALSTATEDIR/run/unit"}"
diff --git a/auto/summary b/auto/summary
index eff4881d..fabe3b10 100644
--- a/auto/summary
+++ b/auto/summary
@@ -13,7 +13,7 @@ Unit configuration summary:
include directory: ......... "$NXT_INCLUDEDIR"
man pages directory: ....... "$NXT_MANDIR"
modules directory: ......... "$NXT_MODULESDIR"
- state directory: ........... "$NXT_LIBSTATEDIR"
+ state directory: ........... "$NXT_STATEDIR"
tmp directory: ............. "$NXT_TMPDIR"
pid file: .................. "$NXT_PID"
diff --git a/configure b/configure
index 1b831e6b..d50c6f8b 100755
--- a/configure
+++ b/configure
@@ -72,7 +72,7 @@ cat << END >> $NXT_AUTO_CONFIG_H
#define NXT_PID "$NXT_PID"
#define NXT_LOG "$NXT_LOG"
#define NXT_MODULESDIR "$NXT_MODULESDIR"
-#define NXT_LIBSTATEDIR "$NXT_LIBSTATEDIR"
+#define NXT_STATEDIR "$NXT_STATEDIR"
#define NXT_TMPDIR "$NXT_TMPDIR"
#define NXT_CONTROL_SOCK "$NXT_CONTROL"
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
index ccd2bd35..788bbe5a 100644
--- a/pkg/deb/Makefile
+++ b/pkg/deb/Makefile
@@ -117,7 +117,7 @@ endif
CONFIGURE_ARGS_COMMON=\
--prefix=/usr \
- --libstatedir=/var/lib/unit \
+ --statedir=/var/lib/unit \
--control="unix:/var/run/control.unit.sock" \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
diff --git a/pkg/docker/template.Dockerfile b/pkg/docker/template.Dockerfile
index 6037729c..ea3224cc 100644
--- a/pkg/docker/template.Dockerfile
+++ b/pkg/docker/template.Dockerfile
@@ -15,7 +15,7 @@ RUN set -ex \
&& CC_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_CFLAGS_MAINT_APPEND="-Wp,-D_FORTIFY_SOURCE=2 -fPIC" dpkg-buildflags --get CFLAGS)" \
&& LD_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed -pie" dpkg-buildflags --get LDFLAGS)" \
&& CONFIGURE_ARGS="--prefix=/usr \
- --libstatedir=/var/lib/unit \
+ --statedir=/var/lib/unit \
--control=unix:/var/run/control.unit.sock \
--pid=/var/run/unit.pid \
--log=/var/log/unit.log \
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index a6efb625..b3265eac 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -108,7 +108,7 @@ endif
CONFIGURE_ARGS_COMMON=\
--prefix=/usr \
- --libstatedir=%{_sharedstatedir}/unit \
+ --statedir=%{_sharedstatedir}/unit \
--control="unix:/var/run/unit/control.sock" \
--pid=/var/run/unit/unit.pid \
--log=/var/log/unit/unit.log \
diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c
index 739238af..1da52da0 100644
--- a/src/nxt_runtime.c
+++ b/src/nxt_runtime.c
@@ -786,7 +786,7 @@ nxt_runtime_conf_init(nxt_task_t *task, nxt_runtime_t *rt)
rt->pid = NXT_PID;
rt->log = NXT_LOG;
rt->modules = NXT_MODULESDIR;
- rt->state = NXT_LIBSTATEDIR;
+ rt->state = NXT_STATEDIR;
rt->control = NXT_CONTROL_SOCK;
rt->tmp = NXT_TMPDIR;
@@ -946,7 +946,7 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
static const char no_modules[] =
"option \"--modulesdir\" requires directory\n";
static const char no_state[] =
- "option \"--libstatedir\" requires directory\n";
+ "option \"--statedir\" requires directory\n";
static const char no_tmp[] = "option \"--tmpdir\" requires directory\n";
static const char help[] =
@@ -969,8 +969,8 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
" --modulesdir DIR set modules directory name\n"
" default: \"" NXT_MODULESDIR "\"\n"
"\n"
- " --libstatedir DIR set state directory name\n"
- " default: \"" NXT_LIBSTATEDIR "\"\n"
+ " --statedir DIR set state directory name\n"
+ " default: \"" NXT_STATEDIR "\"\n"
"\n"
" --tmpdir DIR set tmp directory name\n"
" default: \"" NXT_TMPDIR "\"\n"
@@ -1069,7 +1069,7 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
continue;
}
- if (nxt_strcmp(p, "--libstatedir") == 0) {
+ if (nxt_strcmp(p, "--statedir") == 0) {
if (*argv == NULL) {
write(STDERR_FILENO, no_state, nxt_length(no_state));
return NXT_ERROR;
diff --git a/test/conftest.py b/test/conftest.py
index 5dc92fa2..06d63389 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -373,7 +373,7 @@ def unit_run(state_dir=None):
'--no-daemon',
'--modulesdir',
build_dir,
- '--libstatedir',
+ '--statedir',
state,
'--pid',
f'{temp_dir}/unit.pid',
diff --git a/tools/setup-unit b/tools/setup-unit
index 67f89394..da276448 100755
--- a/tools/setup-unit
+++ b/tools/setup-unit
@@ -598,14 +598,14 @@ unit_ctl_welcome()
# Check unitd is not configured already.
echo "$cmd" \
- | if grep '\--libstatedir' >/dev/null; then
+ | if grep '\--statedir' >/dev/null; then
echo "$cmd" \
| sed 's/ --/\n--/g' \
- | grep '\--libstatedir' \
+ | grep '\--statedir' \
| cut -d' ' -f2;
else
$cmd --help \
- | sed -n '/\--libstatedir/,+1p' \
+ | sed -n '/\--statedir/,+1p' \
| grep 'default:' \
| sed 's/ *default: "\(.*\)"/\1/';
fi \