public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/packit/, net-analyzer/packit/files/
@ 2020-01-26 23:46 Jeroen Roovers
  0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2020-01-26 23:46 UTC (permalink / raw
  To: gentoo-commits

commit:     6860d33861e30d5cce2c81297ca3988b1b0e7f29
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 26 23:45:58 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 23:46:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6860d338

net-analyzer/packit: Fix CFLAGS=-fno-common

Package-Manager: Portage-2.3.85, Repoman-2.3.20
Closes: https://bugs.gentoo.org/show_bug.cgi?id=706520
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../packit/files/packit-1.0-fno-common.patch       | 251 +++++++++++++++++++++
 net-analyzer/packit/packit-1.6.1.ebuild            |   1 +
 2 files changed, 252 insertions(+)

diff --git a/net-analyzer/packit/files/packit-1.0-fno-common.patch b/net-analyzer/packit/files/packit-1.0-fno-common.patch
new file mode 100644
index 00000000000..f4813d868ab
--- /dev/null
+++ b/net-analyzer/packit/files/packit-1.0-fno-common.patch
@@ -0,0 +1,251 @@
+--- a/src/capture_defs.h
++++ b/src/capture_defs.h
+@@ -30,12 +30,12 @@
+ #define READ_TIMEOUT                    500
+ #define SNAPLEN_DEFAULT                 68
+ 
+-u_int16_t g_display;
+-u_int16_t g_link_layer;
+-u_int16_t g_dump_pkt;
+-u_int16_t g_time_gmt;
+-u_int16_t g_t_rst;
+-u_int16_t g_snap_len;
+-u_int32_t g_pkt_rst;
++extern u_int16_t g_display;
++extern u_int16_t g_link_layer;
++extern u_int16_t g_dump_pkt;
++extern u_int16_t g_time_gmt;
++extern u_int16_t g_t_rst;
++extern u_int16_t g_snap_len;
++extern u_int32_t g_pkt_rst;
+ 
+ #endif /* __CAPTURE_DEFS_H */
+--- a/src/error.c
++++ b/src/error.c
+@@ -26,6 +26,8 @@
+ 
+ #include "error.h"
+ 
++char error_buf[ERRBUF_MAXLEN];
++
+ void
+ fatal_error(char *err,...)
+ {
+--- a/src/error.h
++++ b/src/error.h
+@@ -33,7 +33,7 @@
+ #define SUCCESS           		1
+ #define FAILURE           		-1
+ 
+-char error_buf[ERRBUF_MAXLEN];
++extern char error_buf[ERRBUF_MAXLEN];
+ 
+ void fatal_error(char *,...);
+ 
+--- a/src/globals.h
++++ b/src/globals.h
+@@ -138,20 +138,20 @@
+ #define P_INT64                         0x7FFFFFFFFFFFFFFF
+ #define P_UINT64                        0xFFFFFFFFFFFFFFFF
+ 
+-char g_w_file[OPT_MAXLEN];
+-char g_r_file[OPT_MAXLEN];
++extern char g_w_file[OPT_MAXLEN];
++extern char g_r_file[OPT_MAXLEN];
+ 
+-pcap_t *g_pkt;
+-u_int8_t g_tr_fin;
+-char *g_filter;
+-char *g_device;
+-u_int16_t g_hdr_len;
+-u_int16_t g_pkt_len;
+-u_int16_t g_verbose;
+-u_int16_t g_resolve;
+-u_int16_t g_p_mode;
+-u_int64_t g_cnt;
+-u_int64_t g_inj_cnt;
+-u_int64_t g_cap_cnt;
++extern pcap_t *g_pkt;
++extern u_int8_t g_tr_fin;
++extern char *g_filter;
++extern char *g_device;
++extern u_int16_t g_hdr_len;
++extern u_int16_t g_pkt_len;
++extern u_int16_t g_verbose;
++extern u_int16_t g_resolve;
++extern u_int16_t g_p_mode;
++extern u_int64_t g_cnt;
++extern u_int64_t g_inj_cnt;
++extern u_int64_t g_cap_cnt;
+ 
+ #endif /* __GLOBALS_H */
+--- a/src/inject_defs.h
++++ b/src/inject_defs.h
+@@ -30,7 +30,7 @@
+ #ifndef __INJECTION_STRUCTS_H
+ #define __INJECTION_STRUCTS_H
+ 
+-struct ip4hdr_opts
++extern struct ip4hdr_opts
+ {
+     u_int16_t p;                   /* protocol type */
+     u_int16_t rand_p;
+@@ -59,7 +59,7 @@
+     u_int16_t rand_d_addr;
+ } g_ip4hdr_o;
+ 
+-struct tcphdr_opts
++extern struct tcphdr_opts
+ {
+     u_int16_t s_port;              /* tcp source port */
+     u_int16_t d_port;              /* tcp destination port */
+@@ -82,7 +82,7 @@
+ 
+ } g_thdr_o;
+ 
+-struct udphdr_opts
++extern struct udphdr_opts
+ {
+     u_int16_t s_port;              /* udp source port */
+     u_int16_t d_port;              /* udp destination port */
+@@ -90,7 +90,7 @@
+     u_int16_t sum;                      /* udp checksum */
+ } g_uhdr_o;
+ 
+-struct icmp4hdr_opts
++extern struct icmp4hdr_opts
+ {
+     u_int16_t type;                /* icmp4 type */
+     u_int16_t code;                /* icmp4 code */
+@@ -132,7 +132,7 @@
+     u_int32_t ttime;                    /* transmit timestamp */
+ } g_i4hdr_o;
+ 
+-struct enethdr_opts
++extern struct enethdr_opts
+ {
+     u_int16_t rand_s_addr;
+     u_int16_t rand_d_addr;
+@@ -143,7 +143,7 @@
+     u_int8_t dhw_addr[18];
+ } g_ehdr_o;
+ 
+-struct arphdr_opts
++extern struct arphdr_opts
+ {
+     u_int16_t op_type;                  /* arp operation */
+ 
+@@ -163,28 +163,28 @@
+     u_int8_t rhw_addr[18];
+ } g_ahdr_o;
+ 
+-libnet_t *g_pkt_d;
++extern libnet_t *g_pkt_d;
+ 
+-u_int16_t g_init_type;
+-u_int16_t g_rand_d_port;
+-u_int16_t g_rand_s_port;
+-u_int16_t g_s_port;
+-u_int16_t g_d_port;
+-u_int16_t g_port_range;
+-u_int16_t g_interval_sec;
+-u_int16_t g_interval_usec;
+-u_int16_t g_injection_type;
+-u_int16_t g_r_timeout;
+-u_int16_t g_burst_rate;
+-u_int16_t g_payload_len;
+-u_int8_t *g_payload;
+-u_int8_t g_hex_payload;
+-u_int8_t *g_s_d_port;
+-u_int8_t g_hwaddr_p[18];
+-u_int8_t g_rawip;
++extern u_int16_t g_init_type;
++extern u_int16_t g_rand_d_port;
++extern u_int16_t g_rand_s_port;
++extern u_int16_t g_s_port;
++extern u_int16_t g_d_port;
++extern u_int16_t g_port_range;
++extern u_int16_t g_interval_sec;
++extern u_int16_t g_interval_usec;
++extern u_int16_t g_injection_type;
++extern u_int16_t g_r_timeout;
++extern u_int16_t g_burst_rate;
++extern u_int16_t g_payload_len;
++extern u_int8_t *g_payload;
++extern u_int8_t g_hex_payload;
++extern u_int8_t *g_s_d_port;
++extern u_int8_t g_hwaddr_p[18];
++extern u_int8_t g_rawip;
+ 
+-struct timeval g_bf_pcap;
+-struct timeval g_af_pcap;
++extern struct timeval g_bf_pcap;
++extern struct timeval g_af_pcap;
+ 
+ 
+ #endif /* __INJECTION_STRUCTS_H */
+--- a/src/main.c
++++ b/src/main.c
+@@ -30,6 +30,62 @@
+ 
+ #include "main.h"
+ 
++char g_w_file[OPT_MAXLEN];
++char g_r_file[OPT_MAXLEN];
++
++pcap_t *g_pkt;
++u_int8_t g_tr_fin;
++char *g_filter;
++char *g_device;
++u_int16_t g_hdr_len;
++u_int16_t g_pkt_len;
++u_int16_t g_verbose;
++u_int16_t g_resolve;
++u_int16_t g_p_mode;
++u_int64_t g_cnt;
++u_int64_t g_inj_cnt;
++u_int64_t g_cap_cnt;
++
++/* capture_defs.h */
++u_int16_t g_display;
++u_int16_t g_link_layer;
++u_int16_t g_dump_pkt;
++u_int16_t g_time_gmt;
++u_int16_t g_t_rst;
++u_int16_t g_snap_len;
++u_int32_t g_pkt_rst;
++
++/* inject_defs.h */
++u_int16_t g_init_type;
++u_int16_t g_rand_d_port;
++u_int16_t g_rand_s_port;
++u_int16_t g_s_port;
++u_int16_t g_d_port;
++u_int16_t g_port_range;
++u_int16_t g_interval_sec;
++u_int16_t g_interval_usec;
++u_int16_t g_injection_type;
++u_int16_t g_r_timeout;
++u_int16_t g_burst_rate;
++u_int16_t g_payload_len;
++u_int8_t *g_payload;
++u_int8_t g_hex_payload;
++u_int8_t *g_s_d_port;
++u_int8_t g_hwaddr_p[18];
++u_int8_t g_rawip;
++
++struct timeval g_bf_pcap;
++struct timeval g_af_pcap;
++
++struct arphdr_opts g_ahdr_o;
++struct enethdr_opts g_ehdr_o;
++struct icmp4hdr_opts g_i4hdr_o;
++struct ip4hdr_opts g_ip4hdr_o;
++struct tcphdr_opts g_thdr_o;
++struct udphdr_opts g_uhdr_o;
++
++libnet_t *g_pkt_d;
++
+ void
+ parse_capture_options(int argc, char *argv[])
+ {

diff --git a/net-analyzer/packit/packit-1.6.1.ebuild b/net-analyzer/packit/packit-1.6.1.ebuild
index ddeeeb77d2b..9a88e995d22 100644
--- a/net-analyzer/packit/packit-1.6.1.ebuild
+++ b/net-analyzer/packit/packit-1.6.1.ebuild
@@ -18,6 +18,7 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 PATCHES=(
+	"${FILESDIR}"/${PN}-1.0-fno-common.patch
 	"${FILESDIR}"/${PN}-1.0-noopt.patch
 )
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/packit/, net-analyzer/packit/files/
@ 2021-10-14  7:23 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-10-14  7:23 UTC (permalink / raw
  To: gentoo-commits

commit:     349d5ffff39b4f54eec062cb77445db094462d26
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 14 07:15:27 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 14 07:23:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=349d5fff

net-analyzer/packit: fix autoreconf with newer automake

Closes: https://bugs.gentoo.org/816753
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../packit/files/packit-1.7-configure.patch        | 67 ++++++++++++++++++++++
 net-analyzer/packit/packit-1.7.ebuild              |  2 +
 2 files changed, 69 insertions(+)

diff --git a/net-analyzer/packit/files/packit-1.7-configure.patch b/net-analyzer/packit/files/packit-1.7-configure.patch
new file mode 100644
index 00000000000..0f87f0408d8
--- /dev/null
+++ b/net-analyzer/packit/files/packit-1.7-configure.patch
@@ -0,0 +1,67 @@
+https://github.com/resurrecting-open-source-projects/packit/pull/19
+https://bugs.gentoo.org/816753
+
+From 030cdc3f6ded1d206ca16dacc19aef181adba708 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 14 Oct 2021 08:11:24 +0100
+Subject: [PATCH 1/2] configure.ac: fix autoreconf with newer automake
+
+Newer automake forbids repeated calls to AM_INIT_AUTOMAKE.
+
+Bug: https://bugs.gentoo.org/816753
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -29,7 +29,6 @@
+ AC_PREREQ([2.69])
+ AC_INIT([packit], [1.7], [https://github.com/resurrecting-open-source-projects/packit/issues])
+ AC_CONFIG_SRCDIR([src/main.c])
+-AM_INIT_AUTOMAKE
+ AC_CONFIG_HEADERS(config.h)
+ AC_MSG_RESULT(beginning auto-configuration process for packit...)
+ AC_PREFIX_DEFAULT(/usr/local)
+
+From f62d3d40ff99ac39e7cbdea9991bec639a16d3a0 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 14 Oct 2021 08:12:14 +0100
+Subject: [PATCH 2/2] configure.ac: don't ignore failure to find packages
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -146,7 +146,7 @@ AC_CHECK_HEADERS(libnet.h,, LIBNET="no")
+ if test "$LIBNET" = "no"; then
+     echo ""
+     echo "Error: Can't find libnet 1.1.0 or greater. Visit https://github.com/sam-github/libnet for the latest version."
+-    exit;
++    exit 1;
+ fi
+ 
+ AC_ARG_WITH(libpcap_includes,
+@@ -161,7 +161,7 @@ AC_CHECK_HEADERS(pcap.h,, LIBPCAP="no")
+ if test "$LIBNET" = "no"; then
+     echo ""
+     echo "Error: Can't find Libpcap. Visit https://github.com/the-tcpdump-group/libpcap for the latest version."
+-    exit;
++    exit 1;
+ fi
+ 
+ dnl Checks for library functions.
+@@ -181,7 +181,7 @@ AC_CHECK_LIB(net, libnet_build_ipv4,, LIBNET="no")
+ if test "$LIBNET" = "no"; then
+     echo ""
+     echo "Error: Can't find libnet 1.1.0 or greater. Visit https://github.com/sam-github/libnet for the latest version."
+-    exit;
++    exit 1;
+ fi
+ 
+ AC_ARG_WITH(libpcap_libraries,
+@@ -196,7 +196,7 @@ AC_CHECK_LIB(pcap, pcap_open_live,, LIBPCAP="no")
+ if test "$LIBPCAP" = "no"; then
+     echo ""
+     echo "Error: Can't find Libpcap. Visit https://github.com/the-tcpdump-group/libpcap for the latest version."
+-    exit;
++    exit 1;
+ else
+     AC_CHECK_LIB(pcap, pcap_setnonblock,, SETNONBLOCK="no")
+     if test "$SETNONBLOCK" = "no"; then

diff --git a/net-analyzer/packit/packit-1.7.ebuild b/net-analyzer/packit/packit-1.7.ebuild
index 6f454fbc9ba..a1576a6b050 100644
--- a/net-analyzer/packit/packit-1.7.ebuild
+++ b/net-analyzer/packit/packit-1.7.ebuild
@@ -2,6 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
+
 inherit autotools
 
 DESCRIPTION="network packet generator and capture tool"
@@ -19,6 +20,7 @@ DEPEND="
 RDEPEND="${DEPEND}"
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.0-noopt.patch
+	"${FILESDIR}"/${PN}-1.7-configure.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-14  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-26 23:46 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/packit/, net-analyzer/packit/files/ Jeroen Roovers
  -- strict thread matches above, loose matches on Subject: below --
2021-10-14  7:23 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox