summaryrefslogtreecommitdiff
path: root/chrony
diff options
context:
space:
mode:
authorJuergen Daubert <jue@jue.li>2016-11-29 13:56:52 +0100
committerJuergen Daubert <jue@jue.li>2016-11-29 13:56:52 +0100
commita101898d58ae36788a1d20ffff401396f9c1d157 (patch)
treed4a9aea9e71aee5a6a69f8b831e647a2f9f48bb1 /chrony
parent85de2976a9f50008c0691d72dfbf03cd1131b64c (diff)
parent7aad8ae28f638be81c37f461401afdc4fa8ca165 (diff)
downloadopt-a101898d58ae36788a1d20ffff401396f9c1d157.tar.gz
opt-a101898d58ae36788a1d20ffff401396f9c1d157.tar.xz
Merge branch '3.2' into 3.3
Diffstat (limited to 'chrony')
-rw-r--r--chrony/.footprint6
-rw-r--r--chrony/.md5sum2
-rw-r--r--chrony/Pkgfile8
-rw-r--r--chrony/README15
-rw-r--r--chrony/chronyd2
-rw-r--r--chrony/post-install4
-rw-r--r--chrony/pre-install6
7 files changed, 34 insertions, 9 deletions
diff --git a/chrony/.footprint b/chrony/.footprint
index 53004ba9d..b122ba1c0 100644
--- a/chrony/.footprint
+++ b/chrony/.footprint
@@ -17,8 +17,8 @@ drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/chronyd.8.gz
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/lib/
-drwxr-xr-x root/root var/lib/chrony/
+drwxr-x--- chrony/chrony var/lib/chrony/
drwxr-xr-x root/root var/log/
-drwxr-xr-x root/root var/log/chrony/
+drwxr-x--- chrony/chrony var/log/chrony/
drwxr-xr-x root/root var/run/
-drwxr-x--- root/root var/run/chrony/
+drwxr-x--- chrony/chrony var/run/chrony/
diff --git a/chrony/.md5sum b/chrony/.md5sum
index babd259ab..718e57d33 100644
--- a/chrony/.md5sum
+++ b/chrony/.md5sum
@@ -1,2 +1,2 @@
d08dd5a7d79a89891d119adcccb4397d chrony-2.4.1.tar.gz
-4bdea4aea28853c7be54ffdb9f6b87a8 chronyd
+b34048039655b0eba564f10cca23e3ce chronyd
diff --git a/chrony/Pkgfile b/chrony/Pkgfile
index 63dbb5271..fbbd1720a 100644
--- a/chrony/Pkgfile
+++ b/chrony/Pkgfile
@@ -5,19 +5,19 @@
name=chrony
version=2.4.1
-release=1
+release=2
source=(http://download.tuxfamily.org/$name/$name-$version.tar.gz
chronyd)
build () {
cd $name-$version
- ./configure --prefix=/usr
+ ./configure --prefix=/usr --with-user=chrony
+
make
make DESTDIR=$PKG install
- install -d $PKG/var/{lib,log}/chrony
- install -d -m 0750 $PKG/var/run/chrony
+ install -d -o chrony -g chrony -m 0750 $PKG/var/{lib,log,run}/chrony
install -D -m 0755 $SRC/chronyd $PKG/etc/rc.d/chronyd
install examples/chrony.conf.example1 $PKG/etc/chrony.conf
}
diff --git a/chrony/README b/chrony/README
new file mode 100644
index 000000000..752308b9e
--- /dev/null
+++ b/chrony/README
@@ -0,0 +1,15 @@
+README for chrony 2.4.x
+
+REQUIREMENTS
+
+PRE-INSTALL
+ Run the included pre-install script to create a new
+ user/group chrony.
+
+PRECAUTION
+ As of version 2.4.1-2 chrony no longer runs as root
+ but as a dedicated user/group chrony.
+ Chown all files and directories created by chrony
+ to chrony:chrony or run the supplied post-install
+ script.
+
diff --git a/chrony/chronyd b/chrony/chronyd
index b9bcac1e6..e6629e718 100644
--- a/chrony/chronyd
+++ b/chrony/chronyd
@@ -13,7 +13,7 @@ start)
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
;;
stop)
- $SSD --stop --retry 10 --pidfile $PID
+ $SSD --stop --remove-pidfile --retry 10 --pidfile $PID
;;
restart)
$0 stop
diff --git a/chrony/post-install b/chrony/post-install
new file mode 100644
index 000000000..cd6276af0
--- /dev/null
+++ b/chrony/post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+chown -R chrony:chrony /var/lib/chrony /var/log/chrony
+
diff --git a/chrony/pre-install b/chrony/pre-install
new file mode 100644
index 000000000..b8b8f93be
--- /dev/null
+++ b/chrony/pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+getent group chrony || /usr/sbin/groupadd -g 55 chrony
+getent passwd chrony || /usr/sbin/useradd -g chrony -u 55 -d /var/lib/chrony -s /bin/false chrony
+/usr/bin/passwd -l chrony
+

Generated by cgit