1 |
yngwin 15/02/03 05:30:01 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: openntpd-5.7_p3.ebuild |
5 |
Log: |
6 |
version bump (bug #538394) |
7 |
|
8 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 0x4FDF9CFD2FAC514E!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.131 net-misc/openntpd/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openntpd/ChangeLog?rev=1.131&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openntpd/ChangeLog?rev=1.131&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openntpd/ChangeLog?r1=1.130&r2=1.131 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v |
20 |
retrieving revision 1.130 |
21 |
retrieving revision 1.131 |
22 |
diff -u -r1.130 -r1.131 |
23 |
--- ChangeLog 25 Jan 2015 00:54:30 -0000 1.130 |
24 |
+++ ChangeLog 3 Feb 2015 05:30:01 -0000 1.131 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for net-misc/openntpd |
27 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.130 2015/01/25 00:54:30 ottxor Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/ChangeLog,v 1.131 2015/02/03 05:30:01 yngwin Exp $ |
30 |
+ |
31 |
+*openntpd-5.7_p3 (03 Feb 2015) |
32 |
+ |
33 |
+ 03 Feb 2015; Ben de Groot <yngwin@g.o> +openntpd-5.7_p3.ebuild: |
34 |
+ version bump (bug #538394) |
35 |
|
36 |
*openntpd-5.7_p2 (25 Jan 2015) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 net-misc/openntpd/openntpd-5.7_p3.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openntpd/openntpd-5.7_p3.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openntpd/openntpd-5.7_p3.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: openntpd-5.7_p3.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2015 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/openntpd-5.7_p3.ebuild,v 1.1 2015/02/03 05:30:01 yngwin Exp $ |
51 |
|
52 |
EAPI=5 |
53 |
inherit autotools eutils systemd user |
54 |
|
55 |
MY_P="${P/_p/p}" |
56 |
DESCRIPTION="Lightweight NTP server ported from OpenBSD" |
57 |
HOMEPAGE="http://www.openntpd.org/" |
58 |
SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz" |
59 |
|
60 |
LICENSE="BSD GPL-2" |
61 |
SLOT="0" |
62 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
63 |
IUSE="selinux" |
64 |
|
65 |
DEPEND="!<=net-misc/ntp-4.2.0-r2 |
66 |
!net-misc/ntp[-openntpd]" |
67 |
RDEPEND="${DEPEND} |
68 |
selinux? ( sec-policy/selinux-ntp )" |
69 |
|
70 |
S="${WORKDIR}/${MY_P}" |
71 |
|
72 |
pkg_setup() { |
73 |
export NTP_HOME="${NTP_HOME:=/var/lib/openntpd/chroot}" |
74 |
enewgroup ntp |
75 |
enewuser ntp -1 -1 "${NTP_HOME}" ntp |
76 |
|
77 |
# make sure user has correct HOME as flipping between the standard ntp pkg |
78 |
# and this one was possible in the past |
79 |
if [[ $(egethome ntp) != ${NTP_HOME} ]]; then |
80 |
ewarn "From this version on, the homedir of the ntp user cannot be changed" |
81 |
ewarn "dynamically after the installation. For homedir different from" |
82 |
ewarn "/var/lib/openntpd/chroot set NTP_HOME in your make.conf and re-emerge." |
83 |
esethome ntp "${NTP_HOME}" |
84 |
fi |
85 |
} |
86 |
|
87 |
src_prepare() { |
88 |
# fix /run path |
89 |
sed -i 's:/var/run/ntpd:/run/ntpd:g' ntpctl.8 ntpd.8 || die |
90 |
sed -i 's:LOCALSTATEDIR "/run/ntpd:"/run/ntpd:' ntpd.h || die |
91 |
# fix ntpd.drift path |
92 |
sed -i 's:/var/db/ntpd.drift:/var/lib/openntpd/ntpd.drift:g' ntpd.8 || die |
93 |
sed -i 's:"/db/ntpd.drift":"/openntpd/ntpd.drift":' ntpd.h || die |
94 |
# fix default config to use gentoo pool |
95 |
sed -i 's:servers pool.ntp.org:#servers pool.ntp.org:' ntpd.conf || die |
96 |
printf "\n# Choose servers announced from Gentoo NTP Pool\nservers 0.gentoo.pool.ntp.org\nservers 1.gentoo.pool.ntp.org\nservers 2.gentoo.pool.ntp.org\nservers 3.gentoo.pool.ntp.org\n" >> ntpd.conf || die |
97 |
} |
98 |
|
99 |
src_configure() { |
100 |
econf --with-privsep-user=ntp --with-privsep-path="${NTP_HOME}" |
101 |
} |
102 |
|
103 |
src_install() { |
104 |
default |
105 |
rm -r "${ED}"/var |
106 |
|
107 |
newinitd "${FILESDIR}/${PN}.init.d-20080406-r6" ntpd |
108 |
newconfd "${FILESDIR}/${PN}.conf.d-20080406-r6" ntpd |
109 |
|
110 |
systemd_newunit "${FILESDIR}/${PN}.service-20080406-r4" ntpd.service |
111 |
} |
112 |
|
113 |
pkg_config() { |
114 |
einfo "Setting up chroot for ntp in ${NTP_HOME}" |
115 |
# remove localtime file from previous installations |
116 |
rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime |
117 |
mkdir -p "${EROOT%/}${NTP_HOME}"/etc |
118 |
if ! ln "${EROOT%/}"/etc/localtime "${EROOT%/}${NTP_HOME}"/etc/localtime ; then |
119 |
cp "${EROOT%/}"/etc/localtime "${EROOT%/}${NTP_HOME}"/etc/localtime || die |
120 |
einfo "We could not create a hardlink from /etc/localtime to ${NTP_HOME}/etc/localtime," |
121 |
einfo "so please run 'emerge --config =${CATEGORY}/${PF}' whenever you change" |
122 |
einfo "your timezone." |
123 |
fi |
124 |
chown -R root:root "${EROOT%/}${NTP_HOME}" || die |
125 |
} |
126 |
|
127 |
pkg_postinst() { |
128 |
pkg_config |
129 |
|
130 |
[[ -f ${EROOT}var/log/ntpd.log ]] && \ |
131 |
ewarn "Logfile '${EROOT}var/log/ntpd.log' might be orphaned, please remove it if not in use via syslog." |
132 |
|
133 |
if [[ -f ${EROOT}var/lib/ntpd.drift ]] ; then |
134 |
einfo "Moving ntpd.drift file to new location." |
135 |
mv "${EROOT}var/lib/ntpd.drift" "${EROOT}var/lib/openntpd/ntpd.drift" |
136 |
fi |
137 |
} |
138 |
|
139 |
pkg_postrm() { |
140 |
# remove localtime file from previous installations |
141 |
rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime |
142 |
} |