rpms/ntp/devel ntp.dhclient,NONE,1.1 ntp.spec,1.84,1.85
Miroslav Lichvar
mlichvar at fedoraproject.org
Wed Jan 14 17:46:52 UTC 2009
- Previous message: rpms/netbeans-svnclientadapter/devel svnClientAdapter-1.4.0-build.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 netbeans-svnclientadapter.spec, 1.1, 1.2 sources, 1.2, 1.3
- Next message: rpms/google-gadgets/devel .cvsignore, 1.4, 1.5 google-gadgets.spec, 1.8, 1.9 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mlichvar
Update of /cvs/pkgs/rpms/ntp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21589
Modified Files:
ntp.spec
Added Files:
ntp.dhclient
Log Message:
- include dhclient script (David Cantrell)
- convert COPYRIGHT to UTF-8
--- NEW FILE ntp.dhclient ---
#!/bin/bash
#
# ntp.sh: dhclient-script plugin for NTP settings,
# place in /etc/dhcp/dhclient.d and 'chmod +x ntp.sh' to enable
#
# Copyright (C) 2008 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): David Cantrell <dcantrell at redhat.com>
# Miroslav Lichvar <mlichvar at redhat.com>
#
CONF=/etc/ntp.conf
SAVECONF=${SAVEDIR}/${CONF##*/}.predhclient.${interface}
ntp_config() {
if [ ! "${PEERNTP}" = "no" ] && [ -n "${new_ntp_servers}" ] &&
[ -e ${CONF} ] && [ -d ${SAVEDIR} ]; then
mv -f ${CONF} ${SAVECONF}
egrep -v '^server .* # added by /sbin/dhclient-script$' < ${SAVECONF} > ${CONF}
diff -q ${CONF} ${SAVECONF} >/dev/null 2>&1
if [ $? -eq 1 ]; then
rm -f ${SAVECONF}
cp -f ${CONF} ${SAVECONF}
fi
for s in ${new_ntp_servers}; do
echo "server ${s} # added by /sbin/dhclient-script" >> ${CONF}
done
restorecon ${CONF} ${SAVECONF} >/dev/null 2>&1
service ntpd condrestart >/dev/null 2>&1
fi
}
ntp_restore() {
if [ ! "${PEERNTP}" = "no" ] && [ -f ${SAVECONF} ]; then
mv -f ${SAVECONF} ${CONF}
restorecon ${CONF} >/dev/null 2>&1
service ntpd condrestart >/dev/null 2>&1
fi
}
Index: ntp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/devel/ntp.spec,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- ntp.spec 12 Jan 2009 13:53:46 -0000 1.84
+++ ntp.spec 14 Jan 2009 17:46:22 -0000 1.85
@@ -38,6 +38,7 @@
Source7: ntpdate.init
Source8: ntp.cryptopw
Source9: ntpdate.sysconfig
+Source10: ntp.dhclient
# ntpbz #628, #1073
Patch1: ntp-4.2.4p4-kernel.patch
@@ -166,6 +167,10 @@
ln -sf md5.c libntp/md5c.c
%patch13 -p1 -b .bsdadv
+for f in COPYRIGHT; do
+ iconv -f iso8859-1 -t utf8 -o ${f}{_,} && touch -r ${f}{,_} && mv -f ${f}{_,}
+done
+
%build
export CFLAGS="$RPM_OPT_FLAGS"
if echo 'int main () { return 0; }' | gcc -pie -fPIE -O2 -xc - -o pietest 2>/dev/null; then
@@ -218,7 +223,7 @@
find htmldoc -type d | xargs chmod 755
pushd $RPM_BUILD_ROOT
-mkdir -p .%{_sysconfdir}/{ntp,ntp/crypto,sysconfig} .%{_initrddir}
+mkdir -p .%{_sysconfdir}/{ntp/crypto,sysconfig,dhcp/dhclient.d} .%{_initrddir}
mkdir -p .%{_localstatedir}/{lib/ntp,log/ntpstats}
touch .%{_localstatedir}/lib/ntp/drift
sed -e 's|ETCNTP|%{_sysconfdir}/ntp|' -e 's|VARNTP|%{_localstatedir}/lib/ntp|' \
@@ -231,6 +236,7 @@
install -p -m644 %{SOURCE9} .%{_sysconfdir}/sysconfig/ntpdate
install -p -m644 %{SOURCE6} .%{_sysconfdir}/ntp/step-tickers
install -p -m600 %{SOURCE8} .%{_sysconfdir}/ntp/crypto/pw
+install -p -m755 %{SOURCE10} .%{_sysconfdir}/dhcp/dhclient.d/ntp.sh
popd
%clean
@@ -282,6 +288,8 @@
%config(noreplace) %{_sysconfdir}/ntp.conf
%dir %attr(750,root,ntp) %{_sysconfdir}/ntp/crypto
%config(noreplace) %{_sysconfdir}/ntp/crypto/pw
+%dir %{_sysconfdir}/dhcp/dhclient.d
+%{_sysconfdir}/dhcp/dhclient.d/ntp.sh
%dir %attr(-,ntp,ntp) %{_localstatedir}/lib/ntp
%ghost %attr(644,ntp,ntp) %{_localstatedir}/lib/ntp/drift
%dir %attr(-,ntp,ntp) %{_localstatedir}/log/ntpstats
@@ -311,8 +319,10 @@
%{_mandir}/man8/ntpdate.8*
%changelog
-* Mon Jan 12 2009 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p6-1
+* Wed Jan 14 2009 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p6-1
- update to 4.2.4p6 (CVE-2009-0021)
+- include dhclient script (David Cantrell)
+- convert COPYRIGHT to UTF-8
* Wed Oct 08 2008 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p5-2
- retry failed name resolution few times before giving up (#460561)
- Previous message: rpms/netbeans-svnclientadapter/devel svnClientAdapter-1.4.0-build.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 netbeans-svnclientadapter.spec, 1.1, 1.2 sources, 1.2, 1.3
- Next message: rpms/google-gadgets/devel .cvsignore, 1.4, 1.5 google-gadgets.spec, 1.8, 1.9 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list