don't build libdst (#849166)

This commit is contained in:
Jiri Popelka 2012-08-17 16:58:01 +02:00
parent b4dd5fd1d3
commit 3d2a80f090
5 changed files with 63 additions and 92 deletions

View File

@ -202,66 +202,6 @@ diff -up dhcp-4.2.2b1/common/upf.c.cloexec dhcp-4.2.2b1/common/upf.c
if (sock < 0) { if (sock < 0) {
if (errno == EBUSY) { if (errno == EBUSY) {
continue; continue;
diff -up dhcp-4.2.2b1/dst/dst_api.c.cloexec dhcp-4.2.2b1/dst/dst_api.c
--- dhcp-4.2.2b1/dst/dst_api.c.cloexec 2009-10-29 01:46:48.000000000 +0100
+++ dhcp-4.2.2b1/dst/dst_api.c 2011-07-01 14:13:31.035887670 +0200
@@ -437,7 +437,7 @@ dst_s_write_private_key(const DST_KEY *k
PRIVATE_KEY, PATH_MAX);
/* Do not overwrite an existing file */
- if ((fp = dst_s_fopen(file, "w", 0600)) != NULL) {
+ if ((fp = dst_s_fopen(file, "we", 0600)) != NULL) {
int nn;
if ((nn = fwrite(encoded_block, 1, len, fp)) != len) {
EREPORT(("dst_write_private_key(): Write failure on %s %d != %d errno=%d\n",
@@ -494,7 +494,7 @@ dst_s_read_public_key(const char *in_nam
* flags, proto, alg stored as decimal (or hex numbers FIXME).
* (FIXME: handle parentheses for line continuation.)
*/
- if ((fp = dst_s_fopen(name, "r", 0)) == NULL) {
+ if ((fp = dst_s_fopen(name, "re", 0)) == NULL) {
EREPORT(("dst_read_public_key(): Public Key not found %s\n",
name));
return (NULL);
@@ -620,7 +620,7 @@ dst_s_write_public_key(const DST_KEY *ke
return (0);
}
/* create public key file */
- if ((fp = dst_s_fopen(filename, "w+", 0644)) == NULL) {
+ if ((fp = dst_s_fopen(filename, "w+e", 0644)) == NULL) {
EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n",
filename, errno));
return (0);
@@ -854,7 +854,7 @@ dst_s_read_private_key_file(char *name,
return (0);
}
/* first check if we can find the key file */
- if ((fp = dst_s_fopen(filename, "r", 0)) == NULL) {
+ if ((fp = dst_s_fopen(filename, "re", 0)) == NULL) {
EREPORT(("dst_s_read_private_key_file: Could not open file %s in directory %s\n",
filename, dst_path[0] ? dst_path :
(char *) getcwd(NULL, PATH_MAX - 1)));
diff -up dhcp-4.2.2b1/dst/prandom.c.cloexec dhcp-4.2.2b1/dst/prandom.c
--- dhcp-4.2.2b1/dst/prandom.c.cloexec 2009-11-20 02:49:01.000000000 +0100
+++ dhcp-4.2.2b1/dst/prandom.c 2011-07-01 14:13:31.035887670 +0200
@@ -269,7 +269,7 @@ get_dev_random(u_char *output, unsigned
s = stat("/dev/random", &st);
if (s == 0 && S_ISCHR(st.st_mode)) {
- if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK)) != -1) {
+ if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK | O_CLOEXEC)) != -1) {
if ((n = read(fd, output, size)) < 0)
n = 0;
close(fd);
@@ -480,7 +480,7 @@ digest_file(dst_work *work)
work->file_digest = dst_free_key(work->file_digest);
return (0);
}
- if ((fp = fopen(name, "r")) == NULL)
+ if ((fp = fopen(name, "re")) == NULL)
return (0);
for (no = 0; (i = fread(buf, sizeof(*buf), sizeof(buf), fp)) > 0;
no += i)
diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
--- dhcp-4.2.2b1/omapip/trace.c.cloexec 2010-05-27 02:34:57.000000000 +0200 --- dhcp-4.2.2b1/omapip/trace.c.cloexec 2010-05-27 02:34:57.000000000 +0200
+++ dhcp-4.2.2b1/omapip/trace.c 2011-07-01 14:13:31.036887669 +0200 +++ dhcp-4.2.2b1/omapip/trace.c 2011-07-01 14:13:31.036887669 +0200

View File

@ -46,31 +46,6 @@ diff -up dhcp-4.2.2/dhcpctl/Makefile.am.sharedlib dhcp-4.2.2/dhcpctl/Makefile.am
-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \ -cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \ +cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
$(BIND9_LIBDIR) -ldns-export -lisc-export $(BIND9_LIBDIR) -ldns-export -lisc-export
diff -up dhcp-4.2.2/dst/base64.c.sharedlib dhcp-4.2.2/dst/base64.c
--- dhcp-4.2.2/dst/base64.c.sharedlib 2009-11-20 02:49:01.000000000 +0100
+++ dhcp-4.2.2/dst/base64.c 2011-10-09 20:07:40.000000000 +0200
@@ -64,6 +64,7 @@ static const char rcsid[] = "$Id: base64
#include <sys/socket.h>
+#include "dst_internal.h"
#include "cdefs.h"
#include "osdep.h"
#include "arpa/nameser.h"
diff -up dhcp-4.2.2/dst/Makefile.am.sharedlib dhcp-4.2.2/dst/Makefile.am
--- dhcp-4.2.2/dst/Makefile.am.sharedlib 2007-05-29 18:32:10.000000000 +0200
+++ dhcp-4.2.2/dst/Makefile.am 2011-10-09 20:07:40.000000000 +0200
@@ -1,8 +1,8 @@
AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
-lib_LIBRARIES = libdst.a
+lib_LTLIBRARIES = libdst.la
-libdst_a_SOURCES = dst_support.c dst_api.c hmac_link.c md5_dgst.c \
+libdst_la_SOURCES = dst_support.c dst_api.c hmac_link.c md5_dgst.c \
base64.c prandom.c
EXTRA_DIST = dst_internal.h md5.h md5_locl.h
diff -up dhcp-4.2.2/omapip/Makefile.am.sharedlib dhcp-4.2.2/omapip/Makefile.am diff -up dhcp-4.2.2/omapip/Makefile.am.sharedlib dhcp-4.2.2/omapip/Makefile.am
--- dhcp-4.2.2/omapip/Makefile.am.sharedlib 2011-10-09 20:07:39.000000000 +0200 --- dhcp-4.2.2/omapip/Makefile.am.sharedlib 2011-10-09 20:07:39.000000000 +0200
+++ dhcp-4.2.2/omapip/Makefile.am 2011-10-09 20:07:40.000000000 +0200 +++ dhcp-4.2.2/omapip/Makefile.am 2011-10-09 20:07:40.000000000 +0200

View File

@ -0,0 +1,46 @@
diff -up dhcp-4.2.4-P1/configure.ac.remove-dst dhcp-4.2.4-P1/configure.ac
--- dhcp-4.2.4-P1/configure.ac.remove-dst 2012-08-17 15:24:29.066454140 +0200
+++ dhcp-4.2.4-P1/configure.ac 2012-08-17 15:24:29.071454073 +0200
@@ -608,7 +608,6 @@ AC_OUTPUT([
common/Makefile
common/tests/Makefile
dhcpctl/Makefile
- dst/Makefile
includes/Makefile
omapip/Makefile
relay/Makefile
diff -up dhcp-4.2.4-P1/includes/Makefile.am.remove-dst dhcp-4.2.4-P1/includes/Makefile.am
--- dhcp-4.2.4-P1/includes/Makefile.am.remove-dst 2012-07-13 08:17:54.000000000 +0200
+++ dhcp-4.2.4-P1/includes/Makefile.am 2012-08-17 15:25:08.253922458 +0200
@@ -1,7 +1,6 @@
nobase_include_HEADERS = omapip/alloc.h omapip/buffer.h omapip/convert.h \
omapip/hash.h omapip/isclib.h omapip/omapip.h \
- omapip/omapip_p.h omapip/result.h omapip/trace.h \
- isc-dhcp/dst.h
+ omapip/omapip_p.h omapip/result.h omapip/trace.h
EXTRA_DIST = cdefs.h ctrace.h dhcp.h dhcp6.h dhcpd.h dhctoken.h failover.h \
heap.h inet.h minires.h osdep.h site.h statement.h tree.h \
diff -up dhcp-4.2.4-P1/Makefile.am.remove-dst dhcp-4.2.4-P1/Makefile.am
--- dhcp-4.2.4-P1/Makefile.am.remove-dst 2012-08-17 15:24:29.067454126 +0200
+++ dhcp-4.2.4-P1/Makefile.am 2012-08-17 15:24:29.071454073 +0200
@@ -27,7 +27,7 @@ else
SUBDIRS =
endif
-SUBDIRS += includes tests common dst omapip client dhcpctl relay server
+SUBDIRS += includes tests common omapip client dhcpctl relay server
nobase_include_HEADERS = dhcpctl/dhcpctl.h
diff -up dhcp-4.2.4-P1/server/ddns.c.remove-dst dhcp-4.2.4-P1/server/ddns.c
--- dhcp-4.2.4-P1/server/ddns.c.remove-dst 2012-07-13 08:18:05.000000000 +0200
+++ dhcp-4.2.4-P1/server/ddns.c 2012-08-17 15:24:29.072454060 +0200
@@ -34,7 +34,6 @@
*/
#include "dhcpd.h"
-#include "dst/md5.h"
#include <dns/result.h>
#ifdef NSUPDATE

View File

@ -50,7 +50,7 @@ diff -up dhcp-4.2.4b1/Makefile.am.systemtap dhcp-4.2.4b1/Makefile.am
+++ dhcp-4.2.4b1/Makefile.am 2012-04-16 17:46:10.947226667 +0200 +++ dhcp-4.2.4b1/Makefile.am 2012-04-16 17:46:10.947226667 +0200
@@ -29,5 +29,8 @@ endif @@ -29,5 +29,8 @@ endif
SUBDIRS += includes tests common dst omapip client dhcpctl relay server SUBDIRS += includes tests common omapip client dhcpctl relay server
+SUBDIRS += tapset +SUBDIRS += tapset
+#DIST_SUBDIRS = $(SUBDIRS) +#DIST_SUBDIRS = $(SUBDIRS)

View File

@ -18,7 +18,7 @@
Summary: Dynamic host configuration protocol software Summary: Dynamic host configuration protocol software
Name: dhcp Name: dhcp
Version: 4.2.4 Version: 4.2.4
Release: 10.%{patchver}%{?dist} Release: 11.%{patchver}%{?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.
@ -60,7 +60,8 @@ Patch22: dhcp-4.2.1-sendDecline.patch
Patch23: dhcp-4.2.1-retransmission.patch Patch23: dhcp-4.2.1-retransmission.patch
Patch25: dhcp-4.2.4-rfc3442-classless-static-routes.patch Patch25: dhcp-4.2.4-rfc3442-classless-static-routes.patch
Patch27: dhcp-4.2.0-honor-expired.patch Patch27: dhcp-4.2.0-honor-expired.patch
Patch29: dhcp-4.2.2-remove-bind.patch Patch28: dhcp-4.2.2-remove-bind.patch
Patch29: dhcp-4.2.4-P1-remove-dst.patch
Patch30: dhcp-4.2.2-sharedlib.patch Patch30: dhcp-4.2.2-sharedlib.patch
Patch31: dhcp-4.2.4-PPP.patch Patch31: dhcp-4.2.4-PPP.patch
Patch32: dhcp-4.2.3-paranoia.patch Patch32: dhcp-4.2.3-paranoia.patch
@ -171,8 +172,16 @@ libdhcpctl and libomapi static libraries are also included in this package.
# Remove bundled BIND source # Remove bundled BIND source
rm bind/bind.tar.gz rm bind/bind.tar.gz
# Remove libdst
rm -rf dst/
rm -rf includes/isc-dhcp
# Fire away bundled BIND source. # Fire away bundled BIND source.
%patch29 -p1 -b .remove-bind %{?_rawbuild} %patch28 -p1 -b .remove-bind %{?_rawbuild}
# Fire away libdst
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #30692])
%patch29 -p1 -b .remove-dst %{?_rawbuild}
# Replace the standard ISC warning message about requesting help with an # Replace the standard ISC warning message about requesting help with an
# explanation that this is a patched build of ISC DHCP and bugs should be # explanation that this is a patched build of ISC DHCP and bugs should be
@ -317,6 +326,7 @@ rm bind/bind.tar.gz
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #28038]) # (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #28038])
%patch44 -p1 -b .interval %patch44 -p1 -b .interval
pushd contrib pushd contrib
%{__chmod} -x 3.0b1-lease-convert dhclient-tz-exithook.sh ldap/dhcpd-conf-to-ldap %{__chmod} -x 3.0b1-lease-convert dhclient-tz-exithook.sh ldap/dhcpd-conf-to-ldap
%{__chmod} -x sethostname.sh solaris.init %{__chmod} -x sethostname.sh solaris.init
@ -569,21 +579,21 @@ fi
%files libs %files libs
%{_libdir}/libdhcpctl.so.* %{_libdir}/libdhcpctl.so.*
%{_libdir}/libomapi.so.* %{_libdir}/libomapi.so.*
%{_libdir}/libdst.so.*
%files devel %files devel
%doc doc/IANA-arp-parameters doc/api+protocol %doc doc/IANA-arp-parameters doc/api+protocol
%{_includedir}/dhcpctl %{_includedir}/dhcpctl
%{_includedir}/isc-dhcp
%{_includedir}/omapip %{_includedir}/omapip
%{_libdir}/libdhcpctl.so %{_libdir}/libdhcpctl.so
%{_libdir}/libomapi.so %{_libdir}/libomapi.so
%{_libdir}/libdst.so
%attr(0644,root,root) %{_mandir}/man3/dhcpctl.3.gz %attr(0644,root,root) %{_mandir}/man3/dhcpctl.3.gz
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
%changelog %changelog
* Fri Aug 17 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.4-11.P1
- don't build libdst, it hasn't been used since 4.2.0 (#849166)
* Fri Jul 27 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.4-10.P1 * Fri Jul 27 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.4-10.P1
- isc_time_nowplusinterval() is not safe with 64-bit time_t (#662254, #789601) - isc_time_nowplusinterval() is not safe with 64-bit time_t (#662254, #789601)