spec cleanup
This commit is contained in:
parent
8df2f33e21
commit
b7e832e280
81
dhcp.spec
81
dhcp.spec
@ -18,14 +18,14 @@
|
|||||||
Summary: Dynamic host configuration protocol software
|
Summary: Dynamic host configuration protocol software
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.3.2
|
Version: 4.3.2
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||||
# that's why it is at 12 now. It should have never been used, but it was.
|
# that's why it is at 12 now. It should have never been used, but it was.
|
||||||
# So we are stuck with it.
|
# So we are stuck with it.
|
||||||
Epoch: 12
|
Epoch: 12
|
||||||
License: ISC
|
License: ISC
|
||||||
URL: http://isc.org/products/DHCP/
|
Url: http://isc.org/products/DHCP/
|
||||||
Source0: ftp://ftp.isc.org/isc/dhcp/%{VERSION}/dhcp-%{VERSION}.tar.gz
|
Source0: ftp://ftp.isc.org/isc/dhcp/%{VERSION}/dhcp-%{VERSION}.tar.gz
|
||||||
Source1: dhclient-script
|
Source1: dhclient-script
|
||||||
Source2: README.dhclient.d
|
Source2: README.dhclient.d
|
||||||
@ -86,7 +86,7 @@ BuildRequires: systemd systemd-devel
|
|||||||
# dhcp-sd_notify.patch
|
# dhcp-sd_notify.patch
|
||||||
BuildRequires: pkgconfig(libsystemd)
|
BuildRequires: pkgconfig(libsystemd)
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
%if %sdt
|
%if %{sdt}
|
||||||
BuildRequires: systemtap-sdt-devel
|
BuildRequires: systemtap-sdt-devel
|
||||||
%global tapsetdir /usr/share/systemtap/tapset
|
%global tapsetdir /usr/share/systemtap/tapset
|
||||||
%endif
|
%endif
|
||||||
@ -95,7 +95,7 @@ BuildRequires: systemtap-sdt-devel
|
|||||||
# Because nothing under _docdir is allowed to "require" anything,
|
# Because nothing under _docdir is allowed to "require" anything,
|
||||||
# prevent _docdir from being scanned. (#674058)
|
# prevent _docdir from being scanned. (#674058)
|
||||||
%filter_requires_in %{_docdir}
|
%filter_requires_in %{_docdir}
|
||||||
%filter_setup
|
%{filter_setup}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
DHCP (Dynamic Host Configuration Protocol)
|
DHCP (Dynamic Host Configuration Protocol)
|
||||||
@ -358,25 +358,25 @@ rm -rf includes/isc-dhcp
|
|||||||
|
|
||||||
# DHCLIENT_DEFAULT_PREFIX_LEN 64 -> 128
|
# DHCLIENT_DEFAULT_PREFIX_LEN 64 -> 128
|
||||||
# https://bugzilla.gnome.org/show_bug.cgi?id=656610
|
# https://bugzilla.gnome.org/show_bug.cgi?id=656610
|
||||||
%{__sed} -i -e 's|DHCLIENT_DEFAULT_PREFIX_LEN 64|DHCLIENT_DEFAULT_PREFIX_LEN 128|g' includes/site.h
|
sed -i -e 's|DHCLIENT_DEFAULT_PREFIX_LEN 64|DHCLIENT_DEFAULT_PREFIX_LEN 128|g' includes/site.h
|
||||||
|
|
||||||
# Update paths in all man pages
|
# Update paths in all man pages
|
||||||
for page in client/dhclient.conf.5 client/dhclient.leases.5 \
|
for page in client/dhclient.conf.5 client/dhclient.leases.5 \
|
||||||
client/dhclient-script.8 client/dhclient.8 ; do
|
client/dhclient-script.8 client/dhclient.8 ; do
|
||||||
%{__sed} -i -e 's|CLIENTBINDIR|%{_sbindir}|g' \
|
sed -i -e 's|CLIENTBINDIR|%{_sbindir}|g' \
|
||||||
-e 's|RUNDIR|%{_localstatedir}/run|g' \
|
-e 's|RUNDIR|%{_localstatedir}/run|g' \
|
||||||
-e 's|DBDIR|%{_localstatedir}/lib/dhclient|g' \
|
-e 's|DBDIR|%{_localstatedir}/lib/dhclient|g' \
|
||||||
-e 's|ETCDIR|%{dhcpconfdir}|g' $page
|
-e 's|ETCDIR|%{dhcpconfdir}|g' $page
|
||||||
done
|
done
|
||||||
|
|
||||||
for page in server/dhcpd.conf.5 server/dhcpd.leases.5 server/dhcpd.8 ; do
|
for page in server/dhcpd.conf.5 server/dhcpd.leases.5 server/dhcpd.8 ; do
|
||||||
%{__sed} -i -e 's|CLIENTBINDIR|%{_sbindir}|g' \
|
sed -i -e 's|CLIENTBINDIR|%{_sbindir}|g' \
|
||||||
-e 's|RUNDIR|%{_localstatedir}/run|g' \
|
-e 's|RUNDIR|%{_localstatedir}/run|g' \
|
||||||
-e 's|DBDIR|%{_localstatedir}/lib/dhcpd|g' \
|
-e 's|DBDIR|%{_localstatedir}/lib/dhcpd|g' \
|
||||||
-e 's|ETCDIR|%{dhcpconfdir}|g' $page
|
-e 's|ETCDIR|%{dhcpconfdir}|g' $page
|
||||||
done
|
done
|
||||||
|
|
||||||
%{__sed} -i -e 's|/var/db/|%{_localstatedir}/lib/dhcpd/|g' contrib/dhcp-lease-list.pl
|
sed -i -e 's|/var/db/|%{_localstatedir}/lib/dhcpd/|g' contrib/dhcp-lease-list.pl
|
||||||
|
|
||||||
%build
|
%build
|
||||||
#libtoolize --copy --force
|
#libtoolize --copy --force
|
||||||
@ -399,40 +399,40 @@ CFLAGS="%{optflags} -fno-strict-aliasing" \
|
|||||||
--with-libbind-libs=%{_libdir}/bind99 \
|
--with-libbind-libs=%{_libdir}/bind99 \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--enable-log-pid \
|
--enable-log-pid \
|
||||||
%if %sdt
|
%if %{sdt}
|
||||||
--enable-systemtap \
|
--enable-systemtap \
|
||||||
--with-tapset-install-dir=%{tapsetdir} \
|
--with-tapset-install-dir=%{tapsetdir} \
|
||||||
%endif
|
%endif
|
||||||
--enable-paranoia --enable-early-chroot \
|
--enable-paranoia --enable-early-chroot \
|
||||||
--with-systemd
|
--with-systemd
|
||||||
%{__make} %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
pushd doc
|
pushd doc
|
||||||
%{__make} devel
|
make %{?_smp_mflags} devel
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__make} install DESTDIR=%{buildroot}
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
|
|
||||||
# We don't want example conf files in /etc
|
# We don't want example conf files in /etc
|
||||||
%{__rm} -f %{buildroot}%{_sysconfdir}/dhclient.conf.example
|
rm -f %{buildroot}%{_sysconfdir}/dhclient.conf.example
|
||||||
%{__rm} -f %{buildroot}%{_sysconfdir}/dhcpd.conf.example
|
rm -f %{buildroot}%{_sysconfdir}/dhcpd.conf.example
|
||||||
|
|
||||||
# dhclient-script
|
# dhclient-script
|
||||||
%{__install} -D -p -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}/dhclient-script
|
install -D -p -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}/dhclient-script
|
||||||
|
|
||||||
# README.dhclient.d
|
# README.dhclient.d
|
||||||
%{__install} -p -m 0644 %{SOURCE2} .
|
install -p -m 0644 %{SOURCE2} .
|
||||||
|
|
||||||
# Empty directory for dhclient.d scripts
|
# Empty directory for dhclient.d scripts
|
||||||
%{__mkdir} -p %{buildroot}%{dhcpconfdir}/dhclient.d
|
mkdir -p %{buildroot}%{dhcpconfdir}/dhclient.d
|
||||||
|
|
||||||
# NetworkManager dispatcher script
|
# NetworkManager dispatcher script
|
||||||
%{__mkdir} -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
||||||
%{__install} -p -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
install -p -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
||||||
%{__install} -p -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
install -p -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
||||||
|
|
||||||
# pm-utils script to handle suspend/resume and dhclient leases
|
# pm-utils script to handle suspend/resume and dhclient leases
|
||||||
%{__install} -D -p -m 0755 %{SOURCE5} %{buildroot}%{_libdir}/pm-utils/sleep.d/56dhclient
|
install -D -p -m 0755 %{SOURCE5} %{buildroot}%{_libdir}/pm-utils/sleep.d/56dhclient
|
||||||
|
|
||||||
# systemd unit files
|
# systemd unit files
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
@ -441,14 +441,14 @@ install -m 644 %{SOURCE7} %{buildroot}%{_unitdir}
|
|||||||
install -m 644 %{SOURCE8} %{buildroot}%{_unitdir}
|
install -m 644 %{SOURCE8} %{buildroot}%{_unitdir}
|
||||||
|
|
||||||
# Start empty lease databases
|
# Start empty lease databases
|
||||||
%{__mkdir} -p %{buildroot}%{_localstatedir}/lib/dhcpd/
|
mkdir -p %{buildroot}%{_localstatedir}/lib/dhcpd/
|
||||||
touch %{buildroot}%{_localstatedir}/lib/dhcpd/dhcpd.leases
|
touch %{buildroot}%{_localstatedir}/lib/dhcpd/dhcpd.leases
|
||||||
touch %{buildroot}%{_localstatedir}/lib/dhcpd/dhcpd6.leases
|
touch %{buildroot}%{_localstatedir}/lib/dhcpd/dhcpd6.leases
|
||||||
%{__mkdir} -p %{buildroot}%{_localstatedir}/lib/dhclient/
|
mkdir -p %{buildroot}%{_localstatedir}/lib/dhclient/
|
||||||
|
|
||||||
# default sysconfig file for dhcpd
|
# default sysconfig file for dhcpd
|
||||||
%{__mkdir} -p %{buildroot}%{_sysconfdir}/sysconfig
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||||
%{__cat} <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/dhcpd
|
cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/dhcpd
|
||||||
# WARNING: This file is NOT used anymore.
|
# WARNING: This file is NOT used anymore.
|
||||||
|
|
||||||
# If you are here to restrict what interfaces should dhcpd listen on,
|
# If you are here to restrict what interfaces should dhcpd listen on,
|
||||||
@ -470,10 +470,10 @@ touch %{buildroot}%{_localstatedir}/lib/dhcpd/dhcpd6.leases
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Copy sample conf files into position (called by doc macro)
|
# Copy sample conf files into position (called by doc macro)
|
||||||
%{__cp} -p doc/examples/dhclient-dhcpv6.conf client/dhclient6.conf.example
|
cp -p doc/examples/dhclient-dhcpv6.conf client/dhclient6.conf.example
|
||||||
%{__cp} -p doc/examples/dhcpd-dhcpv6.conf server/dhcpd6.conf.example
|
cp -p doc/examples/dhcpd-dhcpv6.conf server/dhcpd6.conf.example
|
||||||
|
|
||||||
%{__cat} << EOF > client/dhclient-enter-hooks
|
cat << EOF > client/dhclient-enter-hooks
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# For dhclient/dhclient-script debugging.
|
# For dhclient/dhclient-script debugging.
|
||||||
@ -491,8 +491,8 @@ echo "reason: ${reason}"
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Install default (empty) dhcpd.conf:
|
# Install default (empty) dhcpd.conf:
|
||||||
%{__mkdir} -p %{buildroot}%{dhcpconfdir}
|
mkdir -p %{buildroot}%{dhcpconfdir}
|
||||||
%{__cat} << EOF > %{buildroot}%{dhcpconfdir}/dhcpd.conf
|
cat << EOF > %{buildroot}%{dhcpconfdir}/dhcpd.conf
|
||||||
#
|
#
|
||||||
# DHCP Server Configuration file.
|
# DHCP Server Configuration file.
|
||||||
# see /usr/share/doc/dhcp-server/dhcpd.conf.example
|
# see /usr/share/doc/dhcp-server/dhcpd.conf.example
|
||||||
@ -501,7 +501,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Install default (empty) dhcpd6.conf:
|
# Install default (empty) dhcpd6.conf:
|
||||||
%{__cat} << EOF > %{buildroot}%{dhcpconfdir}/dhcpd6.conf
|
cat << EOF > %{buildroot}%{dhcpconfdir}/dhcpd6.conf
|
||||||
#
|
#
|
||||||
# DHCPv6 Server Configuration file.
|
# DHCPv6 Server Configuration file.
|
||||||
# see /usr/share/doc/dhcp-server/dhcpd6.conf.example
|
# see /usr/share/doc/dhcp-server/dhcpd6.conf.example
|
||||||
@ -510,10 +510,10 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Install dhcp.schema for LDAP configuration
|
# Install dhcp.schema for LDAP configuration
|
||||||
%{__install} -D -p -m 0644 contrib/ldap/dhcp.schema %{buildroot}%{_sysconfdir}/openldap/schema/dhcp.schema
|
install -D -p -m 0644 contrib/ldap/dhcp.schema %{buildroot}%{_sysconfdir}/openldap/schema/dhcp.schema
|
||||||
|
|
||||||
# Don't package libtool *.la files
|
# Don't package libtool *.la files
|
||||||
find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
|
|
||||||
%pre server
|
%pre server
|
||||||
# /usr/share/doc/setup/uidgid
|
# /usr/share/doc/setup/uidgid
|
||||||
@ -537,8 +537,8 @@ chown -R dhcpd:dhcpd %{_localstatedir}/lib/dhcpd/
|
|||||||
for servicename in dhcpd dhcpd6; do
|
for servicename in dhcpd dhcpd6; do
|
||||||
etcservicefile=%{_sysconfdir}/systemd/system/${servicename}.service
|
etcservicefile=%{_sysconfdir}/systemd/system/${servicename}.service
|
||||||
if [ -f ${etcservicefile} ]; then
|
if [ -f ${etcservicefile} ]; then
|
||||||
grep -q Type= ${etcservicefile} || %{__sed} -i '/\[Service\]/a Type=notify' ${etcservicefile}
|
grep -q Type= ${etcservicefile} || sed -i '/\[Service\]/a Type=notify' ${etcservicefile}
|
||||||
%{__sed} -i 's/After=network.target/Wants=network-online.target\nAfter=network-online.target/' ${etcservicefile}
|
sed -i 's/After=network.target/Wants=network-online.target\nAfter=network-online.target/' ${etcservicefile}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
@ -550,8 +550,8 @@ exit 0
|
|||||||
for servicename in dhcrelay; do
|
for servicename in dhcrelay; do
|
||||||
etcservicefile=%{_sysconfdir}/systemd/system/${servicename}.service
|
etcservicefile=%{_sysconfdir}/systemd/system/${servicename}.service
|
||||||
if [ -f ${etcservicefile} ]; then
|
if [ -f ${etcservicefile} ]; then
|
||||||
grep -q Type= ${etcservicefile} || %{__sed} -i '/\[Service\]/a Type=notify' ${etcservicefile}
|
grep -q Type= ${etcservicefile} || sed -i '/\[Service\]/a Type=notify' ${etcservicefile}
|
||||||
%{__sed} -i 's/After=network.target/Wants=network-online.target\nAfter=network-online.target/' ${etcservicefile}
|
sed -i 's/After=network.target/Wants=network-online.target\nAfter=network-online.target/' ${etcservicefile}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
@ -623,7 +623,7 @@ done
|
|||||||
%attr(0644,root,root) %{_mandir}/man5/dhcpd.conf.5.gz
|
%attr(0644,root,root) %{_mandir}/man5/dhcpd.conf.5.gz
|
||||||
%attr(0644,root,root) %{_mandir}/man5/dhcpd.leases.5.gz
|
%attr(0644,root,root) %{_mandir}/man5/dhcpd.leases.5.gz
|
||||||
%attr(0644,root,root) %{_mandir}/man8/dhcpd.8.gz
|
%attr(0644,root,root) %{_mandir}/man8/dhcpd.8.gz
|
||||||
%if %sdt
|
%if %{sdt}
|
||||||
%{tapsetdir}/*.stp
|
%{tapsetdir}/*.stp
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -653,7 +653,7 @@ done
|
|||||||
|
|
||||||
%files common
|
%files common
|
||||||
%{!?_licensedir:%global license %%doc}
|
%{!?_licensedir:%global license %%doc}
|
||||||
%license LICENSE
|
%{license} LICENSE
|
||||||
%doc README RELNOTES doc/References.txt
|
%doc README RELNOTES doc/References.txt
|
||||||
%attr(0644,root,root) %{_mandir}/man5/dhcp-options.5.gz
|
%attr(0644,root,root) %{_mandir}/man5/dhcp-options.5.gz
|
||||||
%attr(0644,root,root) %{_mandir}/man5/dhcp-eval.5.gz
|
%attr(0644,root,root) %{_mandir}/man5/dhcp-eval.5.gz
|
||||||
@ -675,6 +675,9 @@ done
|
|||||||
%doc doc/html/
|
%doc doc/html/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 09 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-10
|
||||||
|
- spec cleanup
|
||||||
|
|
||||||
* Thu Jul 02 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-9
|
* Thu Jul 02 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-9
|
||||||
- test upstream fix for #866714 (paranoia.patch)
|
- test upstream fix for #866714 (paranoia.patch)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user