Skip to contentSkip to conversation

package dhcpdump: bump to version 1.9

PATCH In review Kadambini Nema 2 participants 4 messages Feb 18, 2024 – Feb 20, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package dhcpdump: bump to version 1.9

- Change the site to a well maintained - https://github.com/bbonev/dhcpdump
- Fix some of the reported build failures - autobuild.buildroot.org/?reason=dhcpdump-1.8
- Build test results
./utils/test-pkg -d br_test -k -c dhcpdump.config -p dhcpdump

                    bootlin-armv5-uclibc [1/6]: OK
                     bootlin-armv7-glibc [2/6]: OK
                   bootlin-armv7m-uclibc [3/6]: OK
                     bootlin-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: OK
                            sourcery-arm [6/6]: OK

6 builds, 0 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed

---
 ...Fix-build-with-gcc4.8-use-br-fortify.patch | 10 ++++++++
 .../0001-use-non-bsd-structures.patch         | 23 -------------------
 package/dhcpdump/Config.in                    |  2 +-
 package/dhcpdump/dhcpdump.hash                |  2 +-
 package/dhcpdump/dhcpdump.mk                  |  5 ++--
 5 files changed, 15 insertions(+), 27 deletions(-)
 create mode 100644 package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch
 delete mode 100644 package/dhcpdump/0001-use-non-bsd-structures.patch
package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch new file +10 -0
new file mode 100644
index 0000000000..a5c1218c99
@@ -0,0 +1,10 @@
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile	2024-02-17 13:57:08.166161973 -0800
++++ b/Makefile	2024-02-17 13:57:45.055153969 -0800
+@@ -1,5 +1,5 @@
+ CFLAGS+=${CPPFLAGS}
+-CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O3 -fPIE
++CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -g -O3 -fPIE
+ LDFLAGS+=-g -Wl,-z,relro -Wl,-z,now -fPIE -pie
+ LIBS+=-lpcap
+ 
package/dhcpdump/0001-use-non-bsd-structures.patch deleted +0 -23
deleted file mode 100644
index 40115fb640..0000000000
@@ -1,23 +0,0 @@
-The udphdr structure has uh_* fields when _FAVOR_BSD is
-defined. Otherwise, the fields are just named source, dest, len and
-check. See <netinet/udp.h>.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-
-Index: dhcpdump-1.8/dhcpdump.c
-===================================================================
---- dhcpdump-1.8.orig/dhcpdump.c	2011-05-17 20:20:46.506980003 +0200
-+++ dhcpdump-1.8/dhcpdump.c	2011-05-17 20:20:59.338979999 +0200
-@@ -163,10 +163,10 @@
- 	strcpy(ip_origin, (u_char *)inet_ntoa(ip->ip_src));
- 	strcpy(ip_destination, (u_char *)inet_ntoa(ip->ip_dst));
- 
--	if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->uh_ulen)))
-+	if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->len)))
- 		return;
- 
--	printdata((u_char *)(sp + offset), ntohs(udp->uh_ulen));
-+	printdata((u_char *)(sp + offset), ntohs(udp->len));
- }
- 
- // check for matching CHADDR (Peter Apian-Bennewitz <[email protected]>)
package/dhcpdump/Config.in +1 -1
index e0abe040fc..30e42928e4 100644
@@ -4,4 +4,4 @@ config BR2_PACKAGE_DHCPDUMP
 	help
 	  A tool for monitoring dhcp requests using tcpdump.
 
-	  http://www.mavetju.org/unix/general.php
+	  https://github.com/bbonev/dhcpdump
package/dhcpdump/dhcpdump.hash +1 -1
index a24db5b275..fdf3243ad1 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  6d5eb9418162fb738bc56e4c1682ce7f7392dd96e568cc996e44c28de7f77190  dhcpdump-1.8.tar.gz
+sha256  3658ac21cc33e79e72bed070454e49c543017991cb6c37f4253c85e9176869d1  dhcpdump-1.9.tar.xz
 sha256  bab6ca76b7e93885396513689b1248dfb0e8fd662695b8bd1b26784ef71a0192  LICENSE
package/dhcpdump/dhcpdump.mk +3 -2
index ec9571c0af..4ce5047b2e 100644
@@ -4,8 +4,9 @@
 #
 ################################################################################
 
-DHCPDUMP_VERSION = 1.8
-DHCPDUMP_SITE = http://www.mavetju.org/download
+DHCPDUMP_VERSION = 1.9
+DHCPDUMP_SITE = https://github.com/bbonev/dhcpdump/releases/download/v$(DHCPDUMP_VERSION)
+DHCPDUMP_SOURCE = dhcpdump-$(DHCPDUMP_VERSION).tar.xz
 DHCPDUMP_DEPENDENCIES = libpcap
 DHCPDUMP_LICENSE = BSD-2-Clause
 DHCPDUMP_LICENSE_FILES = LICENSE
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Kadambini, All,

On 2024-02-17 17:33 -0800, Kadambini Nema spake thusly:

Quoted 1 line

- Change the site to a well maintained - https://github.com/bbonev/dhcpdump

At least Fedora 39 is using that fork, so I guess it is OK to switch ot it. Maybe then we should also update the homepage in the Config.in?

Quoted 1 line

- Fix some of the reported build failures - autobuild.buildroot.org/?reason=dhcpdump-1.8

The last build failiure was in 2022-06-18, almost two years ago now...

Also, we need pointers to actual failures, like:

    http://autobuild.buildroot.org/results/a34/a347363cbc611080d2a0f7f4882802d15f587250/

package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch

Quoted 24 lines

- Build test results
./utils/test-pkg -d br_test -k -c dhcpdump.config -p dhcpdump

                    bootlin-armv5-uclibc [1/6]: OK
                     bootlin-armv7-glibc [2/6]: OK
                   bootlin-armv7m-uclibc [3/6]: OK
                     bootlin-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: OK
                            sourcery-arm [6/6]: OK

6 builds, 0 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed

---
 ...Fix-build-with-gcc4.8-use-br-fortify.patch | 10 ++++++++
 .../0001-use-non-bsd-structures.patch         | 23 -------------------
 package/dhcpdump/Config.in                    |  2 +-
 package/dhcpdump/dhcpdump.hash                |  2 +-
 package/dhcpdump/dhcpdump.mk                  |  5 ++--
 5 files changed, 15 insertions(+), 27 deletions(-)
 create mode 100644 package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch
 delete mode 100644 package/dhcpdump/0001-use-non-bsd-structures.patch
package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch new file +0 -0
new file mode 100644
index 0000000000..a5c1218c99

This new patch needs to be git-formatted, with an actual commit log, your SoB line, and an upstream status. If you got that from somewhere else, then we also need that to be recorded in the patch too.

Regards,
Yann E. MORIN.

Quoted 84 lines
package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch new file +10 -0
@@ -0,0 +1,10 @@
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile	2024-02-17 13:57:08.166161973 -0800
++++ b/Makefile	2024-02-17 13:57:45.055153969 -0800
+@@ -1,5 +1,5 @@
+ CFLAGS+=${CPPFLAGS}
+-CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O3 -fPIE
++CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -g -O3 -fPIE
+ LDFLAGS+=-g -Wl,-z,relro -Wl,-z,now -fPIE -pie
+ LIBS+=-lpcap
+ 
package/dhcpdump/0001-use-non-bsd-structures.patch deleted +0 -23
deleted file mode 100644
index 40115fb640..0000000000
@@ -1,23 +0,0 @@
-The udphdr structure has uh_* fields when _FAVOR_BSD is
-defined. Otherwise, the fields are just named source, dest, len and
-check. See <netinet/udp.h>.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-
-Index: dhcpdump-1.8/dhcpdump.c
-===================================================================
---- dhcpdump-1.8.orig/dhcpdump.c	2011-05-17 20:20:46.506980003 +0200
-+++ dhcpdump-1.8/dhcpdump.c	2011-05-17 20:20:59.338979999 +0200
-@@ -163,10 +163,10 @@
- 	strcpy(ip_origin, (u_char *)inet_ntoa(ip->ip_src));
- 	strcpy(ip_destination, (u_char *)inet_ntoa(ip->ip_dst));
- 
--	if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->uh_ulen)))
-+	if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->len)))
- 		return;
- 
--	printdata((u_char *)(sp + offset), ntohs(udp->uh_ulen));
-+	printdata((u_char *)(sp + offset), ntohs(udp->len));
- }
- 
- // check for matching CHADDR (Peter Apian-Bennewitz <[email protected]>)
package/dhcpdump/Config.in +1 -1
index e0abe040fc..30e42928e4 100644
@@ -4,4 +4,4 @@ config BR2_PACKAGE_DHCPDUMP
 	help
 	  A tool for monitoring dhcp requests using tcpdump.
 
-	  http://www.mavetju.org/unix/general.php
+	  https://github.com/bbonev/dhcpdump
package/dhcpdump/dhcpdump.hash +1 -1
index a24db5b275..fdf3243ad1 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  6d5eb9418162fb738bc56e4c1682ce7f7392dd96e568cc996e44c28de7f77190  dhcpdump-1.8.tar.gz
+sha256  3658ac21cc33e79e72bed070454e49c543017991cb6c37f4253c85e9176869d1  dhcpdump-1.9.tar.xz
 sha256  bab6ca76b7e93885396513689b1248dfb0e8fd662695b8bd1b26784ef71a0192  LICENSE
package/dhcpdump/dhcpdump.mk +3 -2
index ec9571c0af..4ce5047b2e 100644
@@ -4,8 +4,9 @@
 #
 ################################################################################
 
-DHCPDUMP_VERSION = 1.8
-DHCPDUMP_SITE = http://www.mavetju.org/download
+DHCPDUMP_VERSION = 1.9
+DHCPDUMP_SITE = https://github.com/bbonev/dhcpdump/releases/download/v$(DHCPDUMP_VERSION)
+DHCPDUMP_SOURCE = dhcpdump-$(DHCPDUMP_VERSION).tar.xz
 DHCPDUMP_DEPENDENCIES = libpcap
 DHCPDUMP_LICENSE = BSD-2-Clause
 DHCPDUMP_LICENSE_FILES = LICENSE
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 1/1 package dhcpdump: bump to version 1.9

- Change the site to a well maintained fork - https://github.com/bbonev/dhcpdump

---
- Build test results
./utils/test-pkg -d br_test -k -c dhcpdump.config -p dhcpdump

                    bootlin-armv5-uclibc [1/6]: OK
                     bootlin-armv7-glibc [2/6]: OK
                   bootlin-armv7m-uclibc [3/6]: OK
                     bootlin-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: OK
                            sourcery-arm [6/6]: OK

6 builds, 0 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
---

---
 ...Fix-build-with-gcc4.8-use-br-fortify.patch | 12 ++++++++++
 .../0001-use-non-bsd-structures.patch         | 23 -------------------
 package/dhcpdump/Config.in                    |  2 +-
 package/dhcpdump/dhcpdump.hash                |  2 +-
 package/dhcpdump/dhcpdump.mk                  |  5 ++--
 5 files changed, 17 insertions(+), 27 deletions(-)
 create mode 100644 package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch
 delete mode 100644 package/dhcpdump/0001-use-non-bsd-structures.patch
package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch new file +12 -0
new file mode 100644
index 0000000000..c48d28c23d
@@ -0,0 +1,12 @@
+Upstream: None
+Signed-off-by: Kadambini Nema <[email protected]>
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile	2024-02-17 13:57:08.166161973 -0800
++++ b/Makefile	2024-02-17 13:57:45.055153969 -0800
+@@ -1,5 +1,5 @@
+ CFLAGS+=${CPPFLAGS}
+-CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O3 -fPIE
++CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -g -O3 -fPIE
+ LDFLAGS+=-g -Wl,-z,relro -Wl,-z,now -fPIE -pie
+ LIBS+=-lpcap
+ 
package/dhcpdump/0001-use-non-bsd-structures.patch deleted +0 -23
deleted file mode 100644
index 40115fb640..0000000000
@@ -1,23 +0,0 @@
-The udphdr structure has uh_* fields when _FAVOR_BSD is
-defined. Otherwise, the fields are just named source, dest, len and
-check. See <netinet/udp.h>.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-
-Index: dhcpdump-1.8/dhcpdump.c
-===================================================================
---- dhcpdump-1.8.orig/dhcpdump.c	2011-05-17 20:20:46.506980003 +0200
-+++ dhcpdump-1.8/dhcpdump.c	2011-05-17 20:20:59.338979999 +0200
-@@ -163,10 +163,10 @@
- 	strcpy(ip_origin, (u_char *)inet_ntoa(ip->ip_src));
- 	strcpy(ip_destination, (u_char *)inet_ntoa(ip->ip_dst));
- 
--	if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->uh_ulen)))
-+	if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->len)))
- 		return;
- 
--	printdata((u_char *)(sp + offset), ntohs(udp->uh_ulen));
-+	printdata((u_char *)(sp + offset), ntohs(udp->len));
- }
- 
- // check for matching CHADDR (Peter Apian-Bennewitz <[email protected]>)
package/dhcpdump/Config.in +1 -1
index e0abe040fc..30e42928e4 100644
@@ -4,4 +4,4 @@ config BR2_PACKAGE_DHCPDUMP
 	help
 	  A tool for monitoring dhcp requests using tcpdump.
 
-	  http://www.mavetju.org/unix/general.php
+	  https://github.com/bbonev/dhcpdump
package/dhcpdump/dhcpdump.hash +1 -1
index a24db5b275..fdf3243ad1 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  6d5eb9418162fb738bc56e4c1682ce7f7392dd96e568cc996e44c28de7f77190  dhcpdump-1.8.tar.gz
+sha256  3658ac21cc33e79e72bed070454e49c543017991cb6c37f4253c85e9176869d1  dhcpdump-1.9.tar.xz
 sha256  bab6ca76b7e93885396513689b1248dfb0e8fd662695b8bd1b26784ef71a0192  LICENSE
package/dhcpdump/dhcpdump.mk +3 -2
index ec9571c0af..4ce5047b2e 100644
@@ -4,8 +4,9 @@
 #
 ################################################################################
 
-DHCPDUMP_VERSION = 1.8
-DHCPDUMP_SITE = http://www.mavetju.org/download
+DHCPDUMP_VERSION = 1.9
+DHCPDUMP_SITE = https://github.com/bbonev/dhcpdump/releases/download/v$(DHCPDUMP_VERSION)
+DHCPDUMP_SOURCE = dhcpdump-$(DHCPDUMP_VERSION).tar.xz
 DHCPDUMP_DEPENDENCIES = libpcap
 DHCPDUMP_LICENSE = BSD-2-Clause
 DHCPDUMP_LICENSE_FILES = LICENSE
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Kadambini, All,

On 2024-02-19 13:54 -0800, Kadambini Nema spake thusly:

Quoted 1 line

- Change the site to a well maintained fork - https://github.com/bbonev/dhcpdump

You could also add a blurb that Fedora 39, at least, also uses that as an upstream.

Quoted 1 line

[--SNIP--]

Quoted 1 line
 delete mode 100644 package/dhcpdump/0001-use-non-bsd-structures.patch
    $ ./utils/docker-run make check-package
    .checkpackageignore:290: ignored file package/dhcpdump/0001-use-non-bsd-structures.patch is missing

Since the file is no longer present, there is no longer any need to exclude it from being checked.

package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch line 1

Quoted 7 lines
package/dhcpdump/0001-Fix-build-with-gcc4.8-use-br-fortify.patch new file +1 -0
new file mode 100644
index 0000000000..c48d28c23d
@@ -0,0 +1,12 @@
+Upstream: None

Why? Ideally, we want patches to be submitted upstream, so that they get applied there, and so we can drop them in the future when we bump to a future version that carries that patch.

Also, as I explained in my previous review: patches should be git-formatted (at least when the upstream is git-hosted), with a proper commit log. Having such a commit log will help make an argument for upstream to accept the patch, or to sucggest an alternative.

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot