]> git.pld-linux.org Git - packages/dhcp.git/blobdiff - dhcp.spec
- updated to 3.0pl2: security fix.
[packages/dhcp.git] / dhcp.spec
index a77d3f8124bd83a842f4ad023281f11320a1606a..34853c6a6619b7e1f5a85b848f9b49e7f8597620 100644 (file)
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -3,8 +3,8 @@ Summary(es):    Servidor DHCP (Protocolo de configuraci
 Summary(pl):   Serwer DHCP
 Summary(pt_BR):        Servidor DHCP (Protocolo de configuração dinâmica de hosts)
 Name:          dhcp
-Version:       3.0
-Release:       4
+Version:       3.0pl2
+Release:       1
 Epoch:         2
 Vendor:                ISC
 License:       distributable
@@ -15,9 +15,11 @@ Source2:     %{name}-relay.init
 Source3:       %{name}-relay.sysconfig
 Source4:       %{name}d.conf.sample
 Source5:       %{name}.sysconfig
+Patch0:                %{name}-sh.patch
 BuildRequires: groff
-Prereq:                rc-scripts >= 0.2.0
-Prereq:                /sbin/chkconfig
+PreReq:                rc-scripts >= 0.2.0
+Requires(post,preun):  /sbin/chkconfig
+Requires(post):        fileutils
 Provides:      dhcpd
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -56,6 +58,7 @@ software BETA.
 Summary:       DHCP Client
 Summary(pl):   Klient DHCP
 Group:         Networking/Daemons
+Requires(post):        fileutils
 Obsoletes:     pump
 
 %description client
@@ -68,8 +71,9 @@ Klient DHCP (Dynamic Host Configuration Protocol).
 Summary:       DHCP Relay Agent
 Summary(pl):   Agent przekazywania informacji DHCP
 Group:         Networking/Daemons
-Prereq:                rc-scripts >= 0.2.0
-Prereq:                /sbin/chkconfig
+PreReq:                rc-scripts >= 0.2.0
+Requires(post,preun):  /sbin/chkconfig
+Requires(post):        fileutils
 
 %description relay
 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
@@ -110,6 +114,7 @@ komunikacji z dzia
 
 %prep
 %setup -q
+%patch0 -p1
 install %{SOURCE4} .
 
 %build
@@ -153,8 +158,6 @@ mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
 
 install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script
 
-gzip -9nf doc/* README RELNOTES
-
 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
 
 %clean
@@ -174,10 +177,23 @@ else
        echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
 fi
 
+%preun
+if [ "$1" = "0" ];then
+       if [ -f /var/lock/subsys/dhcpd ]; then
+               /etc/rc.d/init.d/dhcpd stop >&2
+       fi
+       /sbin/chkconfig --del dhcpd
+fi
+
+%post client
+if [ -d /var/lib/dhcp ]; then
+       install -d /var/lib/dhcp
+fi
+
 %post relay
 /sbin/chkconfig --add dhcp-relay
 if [ -f /var/lock/subsys/dhcrelay ]; then
-       mv /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
+       mv -f /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
 fi
 if [ -f /var/lock/subsys/dhcp-relay ]; then
        /etc/rc.d/init.d/dhcp-relay restart >&2
@@ -185,19 +201,6 @@ else
        echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
 fi
 
-%post client
-if [ -d /var/lib/dhcp ]; then
-       install -d /var/lib/dhcp
-fi
-
-%preun
-if [ "$1" = "0" ];then
-       if [ -f /var/lock/subsys/dhcpd ]; then
-               /etc/rc.d/init.d/dhcpd stop >&2
-       fi
-       /sbin/chkconfig --del dhcpd
-fi
-
 %preun relay
 if [ "$1" = "0" ];then
        if [ -f /var/lock/subsys/dhcp-relay ]; then
@@ -208,6 +211,7 @@ fi
 
 %triggerpostun -- dhcp < 3.0
 if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
+       umask 027
        echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
        echo "" >> /etc/dhcpd.conf.tmp
        cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
@@ -216,7 +220,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
+%doc doc/* README RELNOTES dhcpd.conf.sample
 %{_mandir}/man1/*
 %{_mandir}/man5/dhcp*
 %{_mandir}/man8/dhcp*
This page took 0.541321 seconds and 4 git commands to generate.