Browse Source

Refresh patch queue

Applied upstream or handled there in another way:

* Pass LDFLAGS to bgpdump linkage
* Use $(DESTDDIR) when installing files
* Use strlcat provided by libbsd
Christoph Biedl 3 years ago
parent
commit
fa7eb87df4

+ 0 - 16
debian/patches/debian.hardening.patch

@@ -1,16 +0,0 @@
-Description: Pass LDFLAGS to bgpdump linkage
-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Bug: https://bitbucket.org/ripencc/bgpdump/issues/50
-Last-Update: 2019-01-27
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -32,7 +32,7 @@
- 	$(COMPILE) -o example example.c libbgpdump.a $(SYS_LIBS)
- 
- bgpdump: bgpdump.c libbgpdump.a
--	$(COMPILE) -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)
-+	$(COMPILE) -Wl,-z,relro -Wl,-z,now -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)
- 
- check-clean:
- 	rm -f test_out/*.bgp.gz

+ 0 - 22
debian/patches/debian.prefix-install.patch

@@ -1,22 +0,0 @@
-Description: Use $(DESTDDIR) when installing files
-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Forwarded: No
-Last-Update: 2017-11-18
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -48,10 +48,10 @@
- 	rm -Rf $(PKG)
- 
- install: all
--	install -d $(bindir) $(includedir) $(libdir)
--	install bgpdump $(bindir)
--	install $(LIB_H) $(includedir)
--	install libbgpdump.so libbgpdump.a $(libdir)
-+	install -d $(DESTDIR)/$(bindir) $(DESTDIR)/$(includedir) $(DESTDIR)/$(libdir)
-+	install bgpdump $(DESTDIR)/$(bindir)
-+	install $(LIB_H) $(DESTDIR)/$(includedir)
-+	install libbgpdump.so libbgpdump.a $(DESTDIR)/$(libdir)
- 
- PKG=@PACKAGE_NAME@-@PACKAGE_VERSION@
- dist:

+ 0 - 43
debian/patches/local.use-libbsd.patch

@@ -1,43 +0,0 @@
-Description: Use strlcat provided by libbsd
-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Forwarded: No
-Last-Update: 2017-11-18
-
---- a/configure.in
-+++ b/configure.in
-@@ -25,6 +25,7 @@
- 
- AC_CHECK_LIB(z, gzopen, [], AC_MSG_ERROR([libz not found],1))
- AC_CHECK_LIB(bz2, BZ2_bzReadOpen, [], AC_MSG_ERROR([libbzip2 not found],1))
-+AC_CHECK_LIB(bsd, strlcat, [], AC_MSG_ERROR([libsd not found],1))
- 
- # Check for inet_ntoa in -lnsl if not found (Solaris)
- AC_CHECK_FUNCS(inet_ntoa, [], AC_CHECK_LIB(nsl, inet_ntoa, [], AC_MSG_ERROR([inet_ntoa not found],1)))
---- a/bgpdump_lib.c
-+++ b/bgpdump_lib.c
-@@ -37,6 +37,7 @@
- #include <netinet/in.h>
- #include <sys/socket.h>
- #include <arpa/inet.h>
-+#include <bsd/string.h>
- 
- #include <zlib.h>
- #include <assert.h>
-@@ -78,7 +79,7 @@
- static    struct aspath *asn32_merge_paths(struct aspath *path, struct aspath *newpath);
- static    void asn32_expand_16_to_32(char *dst, char *src, int len);
- 
--#if defined(linux)
-+#if 0
- static    size_t strlcat(char *dst, const char *src, size_t size);
- #endif
- 
-@@ -1755,7 +1756,7 @@
-   }
- }
- 
--#if defined(linux)
-+#if 0
- size_t strlcat(char *dst, const char *src, size_t size) {
-   if (strlen (dst) + strlen (src) >= size)
-     return -1;

+ 0 - 3
debian/patches/series

@@ -7,10 +7,7 @@ upstream.fix-unaligned-memory-access.patch
 # local modifications
 # local modifications
 local.disable-cfr_strerror.patch
 local.disable-cfr_strerror.patch
 local.fix-buffer-weirdness.patch
 local.fix-buffer-weirdness.patch
-local.use-libbsd.patch
 local.increase-max-prefixes.patch
 local.increase-max-prefixes.patch
 local.enhance-test-script.patch
 local.enhance-test-script.patch
 
 
 # Debianisation
 # Debianisation
-debian.prefix-install.patch
-debian.hardening.patch

+ 1 - 1
debian/patches/upstream.fix-crash-on-huge-prefix-lists.patch

@@ -9,7 +9,7 @@ Last-Update: 2016-07-13
 
 
 --- a/bgpdump_lib.c
 --- a/bgpdump_lib.c
 +++ b/bgpdump_lib.c
 +++ b/bgpdump_lib.c
-@@ -1589,11 +1589,16 @@
+@@ -1590,11 +1590,16 @@
              break;
              break;
          }
          }
          
          

+ 1 - 1
debian/patches/upstream.fix-unaligned-memory-access.patch

@@ -7,7 +7,7 @@ Last-Update: 2016-10-30
 
 
 --- a/bgpdump_lib.c
 --- a/bgpdump_lib.c
 +++ b/bgpdump_lib.c
 +++ b/bgpdump_lib.c
-@@ -1325,12 +1325,14 @@
+@@ -1326,12 +1326,14 @@
  	    space = 1;
  	    space = 1;
  
  
  	  int asn_pos = i * as->asn_len;
  	  int asn_pos = i * as->asn_len;