From 0ec1e1dd7867c3dedcbea76c9b6e847d6b388c03 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 11 Feb 2025 00:12:38 +0000 Subject: gentoo auto-resync : 11:02:2025 - 00:12:37 --- net-analyzer/ippl/Manifest | 2 + net-analyzer/ippl/files/ippl-1.4.14-musl.patch | 301 +++++++++++++++++++++++++ net-analyzer/ippl/ippl-1.4.14-r7.ebuild | 53 +++++ 3 files changed, 356 insertions(+) create mode 100644 net-analyzer/ippl/files/ippl-1.4.14-musl.patch create mode 100644 net-analyzer/ippl/ippl-1.4.14-r7.ebuild (limited to 'net-analyzer/ippl') diff --git a/net-analyzer/ippl/Manifest b/net-analyzer/ippl/Manifest index 73d9f93cca9d..e07fcd1cefd8 100644 --- a/net-analyzer/ippl/Manifest +++ b/net-analyzer/ippl/Manifest @@ -2,9 +2,11 @@ AUX ippl-1.4.14-fix-build-system.patch 1031 BLAKE2B 93a35f8dcd2955e3189b459b3758 AUX ippl-1.4.14-format-warnings.patch 645 BLAKE2B 24d9d12e456fc5686c04ed003dcf7c7b4e3c3c9188fda4c36c14a052740d0286c6c617c36965f06ab212c73c6ac2ef330ab39d2bb8eb3c60802f451b0399db1b SHA512 e3b247d5628883c4bbc5ae24e39bf4ef0910ed15dbcc7a13d586eddbea6ee1dfa5de1c4252c07fa87564da60febbb200f0e78a58cf29547db4b7446eebc73544 AUX ippl-1.4.14-includes.patch 374 BLAKE2B 8f870033fa01978bba0d0e950c74ddc6e06a5d82bdd411aa1b561cdae8f5ff6c901dc0b70db638bc91176038e156a0ecc3fd588f3d8898a77a4722b7b746cee1 SHA512 5e7c8ab27770e3f50d09ee7e1f68246828d1b540a87c50c5c1afb3bbbe646af3b3d71369dfe2e41a1f04c306d88b8ef20f2be80edca8c201f7cb6d8c5539dfc9 AUX ippl-1.4.14-manpage.patch 306 BLAKE2B 46c9901a4f365bceb67610bf1ecc4fb5be0011320af552a7afcaf2ec863de972d523f81436c60a81bcbeada3056f1e246c3ec5bf125c518ab03e637c6f74332e SHA512 4dc5b6ad12875c94a5b86ca380aeabb003734aabfd54b97edba20614b449dab35d8ba748e8faeda8a2bf2608158d4dd5c6e34c82b664ddf4fd12710ab81498ef +AUX ippl-1.4.14-musl.patch 9098 BLAKE2B 1ebcdf025cfa07f41cd1f375b2572851fb016554f40d3728eaea8b28a640e1d563cd3e1d66622cf9987babf7b5cf17c1a2c839ffbf05bb0c8075a2ef0724785b SHA512 e7937981575548d43e114adb9535f0a3c3f2d1ae503bd46992c53804706053c8b7ce0006eaf491ac2d15554edb80c6d64534f5c6b28bf6a1f0c793f1687ec8d2 AUX ippl-1.4.14-noportresolve.patch 10610 BLAKE2B 94061b2dac8aeb383b149ced13d8a6e4119bf16060326f19f04525a02b423fbf2f6a4c7ad8631e597e744986ec7b27c2032746affa0a2693bcdc90928b26a19b SHA512 591a0aaaac11f80087e2f7a53a18434c065a2d29ba6a09893f2927edbd9b0622925e5bc441657f283fe4689c21bb669bfdfd71faf900d8ff9309e25885adc7e3 AUX ippl-1.4.14-privilege-drop.patch 4289 BLAKE2B 456854f3a9df7d802a5a18ba98a657cb61ddbf52fbeb05a9098c7854dc3f7fe0c6a93a525bfd2d0c02b69092d491effe8099dfefebca08fd9a0c08c8c8ff7bcb SHA512 7b711bd0ac56867a6936035f63b047c1e86fe072f215dcc18eb8dada58d1087964a29b05c1eadef0303d203329a91a053e747c997d78ecd1697788e9f7a15f2f AUX ippl.rc 573 BLAKE2B c70512acb076fc08e0106bcac078463e7e0d37697c2dee7cc6ebd1cffb726239838d7da4794ce1e70a5b4a9e2169019b7b463c1d3a28778afc03daad8b163673 SHA512 2aadbb7cf33c83addef03e7815dd5d6c6a983ee0b269677d251a3b4550e2c038db4436b03a27024ea5ce12f0ca1eb2b87f33ba267e78f70afb06436119b99396 DIST ippl-1.4.14.tar.gz 54030 BLAKE2B 384747ea50e55e52695606538850958320afe53dbe3c71e42c90302dff0b535d2167d18a40f0b2953f941cda1aa238490bfe7b7fde8f675071668ea5f561af74 SHA512 3d71afc3ec7a0420cc9b269bf67dc008a777464c68d233dfbad4ee7a2dd2b960e114500e42866977e31b9dbeee26bbefea937fef8a09aa41cf87f96361ba0088 EBUILD ippl-1.4.14-r6.ebuild 953 BLAKE2B ff3d6e99cce87edb22968f1242059695dfb5ce75dc8ebef76c481a0b66cb8def6494b29404874e2b6bb6a659a984af67127ab28c09376b67fabb59bc1fc857fb SHA512 c6d89fb61baa8fc0def2dbc6d5a41ea3e4f84b205f733d728d1bdc7450c885cd951d826c363004fec79d24773d72d64653d06cc49369f614ff024436b8d7d76b +EBUILD ippl-1.4.14-r7.ebuild 1083 BLAKE2B ccd3f55d10a26ab91543df0ee65aa408489cc5f369552808bcde1807f42a8dd794f13ba243fd97ce43e4f9f94c56bb484f338289adef186d8b2d39bf33559949 SHA512 67e99f2fda8c5548997affc966747b174c656aa03c99ee7ae6345adb8e76ff640cf68ff2e68d77833c8f0b53402be5911f7946986a757e7070431645f01a95b5 MISC metadata.xml 277 BLAKE2B 57fc90092c4674e5c4dfe38b0d79c983990fce4e8208b70c2ebb218aebb6d2135537f927115f3a7b7eb8c1ddb596461c17e60acb3e6a11b289796f20f3c80a33 SHA512 5ac67e6beabab60f83ac521249c6d1f021988d522fc86ab12ec98fbaa9d47a50157c10c7b9a39554e66a02b141cdc6dc6669e5e7c9c02c8b36ad404aa790d619 diff --git a/net-analyzer/ippl/files/ippl-1.4.14-musl.patch b/net-analyzer/ippl/files/ippl-1.4.14-musl.patch new file mode 100644 index 000000000000..44596aac3b4a --- /dev/null +++ b/net-analyzer/ippl/files/ippl-1.4.14-musl.patch @@ -0,0 +1,301 @@ +Add missing includes. For some non-POSIX integer types and open() +Rename global logging facility so it won't try to shadow musl-provided symbol +and cause build failures +udphdr union has two variants - RFC and BSD flavors, glibc uses union, +musl uses BSD flavor in netinet/udp.h with linux/udp.h for RFC flavor. +Switched header to linux. +https://bugs.gentoo.org/716916 +https://bugs.gentoo.org/731184 +--- a/Source/defines.h ++++ b/Source/defines.h +@@ -62,6 +62,7 @@ + + /* Useful types */ + #ifndef _I386_TYPES_H ++#include + typedef u_int32_t __u32; + typedef u_int16_t __u16; + typedef u_int8_t __u8; +--- a/Source/pidfile.c ++++ b/Source/pidfile.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + /* read_pid + * +--- a/Source/configuration.c ++++ b/Source/configuration.c +@@ -39,11 +39,11 @@ + + FILE *open_configuration(char *name) { + FILE *configfile; +- extern struct loginfo log; ++ extern struct loginfo local_log; + + configfile = fopen(name, "r"); + if (configfile == NULL) { +- log.log(log.level_or_fd, "Cannot open configuration file %s.\n", name); ++ local_log.log(local_log.level_or_fd, "Cannot open configuration file %s.\n", name); + exit(1); + } + return configfile; +--- a/Source/icmp.c ++++ b/Source/icmp.c +@@ -46,7 +46,7 @@ + int icmp_socket; + + struct loginfo icmp_log; +-extern struct loginfo log; ++extern struct loginfo local_log; + extern unsigned short resolve_protocols; + + /* +@@ -299,7 +299,7 @@ + icmp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); + if (icmp_socket <= 0) { + int error = errno; +- log.log(log.level_or_fd, "FATAL: Unable to open icmp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error)); ++ local_log.log(local_log.level_or_fd, "FATAL: Unable to open icmp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error)); + exit(1); + } + +@@ -311,7 +311,7 @@ + + for(;;) { + if (read(icmp_socket, (__u8 *) &pkt, ICMP_CAPTURE_LENGTH) == -1) { +- log.log(log.level_or_fd, "FATAL: Unable to read icmp raw socket"); ++ local_log.log(local_log.level_or_fd, "FATAL: Unable to read icmp raw socket"); + exit(1); + } + +--- a/Source/log.c ++++ b/Source/log.c +@@ -32,7 +32,7 @@ + + #include "log.h" + +-extern struct loginfo log; ++extern struct loginfo local_log; + + /* Mutex either for stdout or for a file */ + pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER; +@@ -193,7 +193,7 @@ + + *fd = open((const char *) filename, O_WRONLY | O_APPEND | O_CREAT, 0640); + if (*fd == 0) { +- log.log(log.level_or_fd, "Can't open log file %s.", filename); ++ local_log.log(local_log.level_or_fd, "Can't open log file %s.", filename); + } + } + +--- a/Source/main.c ++++ b/Source/main.c +@@ -54,7 +54,7 @@ + #endif + + /* Logging mechanism */ +-struct loginfo log; ++struct loginfo local_log; + + /* Do we have to run as a daemon? */ + int run_as_daemon = TRUE; +@@ -127,17 +127,17 @@ + + account = getpwnam(used_user); + if (!account) { +- log.log(log.level_or_fd, "WARNING: I cannot find the \"%s\" account. Not spawning threads.", used_user); ++ local_log.log(local_log.level_or_fd, "WARNING: I cannot find the \"%s\" account. Not spawning threads.", used_user); + log_protocols = NONE; + return; + } + + if (!strcmp(used_user, "root")) { +- log.log(log.level_or_fd, "WARNING: Using root account to run threads!"); ++ local_log.log(local_log.level_or_fd, "WARNING: Using root account to run threads!"); + } + + if (log_protocols == NONE) { +- log.log(log.level_or_fd, "WARNING: Nothing to log."); ++ local_log.log(local_log.level_or_fd, "WARNING: Nothing to log."); + return; + } + +@@ -309,7 +309,7 @@ + + /* Check PID */ + if (check_pid(PID_FILE)) { +- log.log(log.level_or_fd, "Already running. Exiting..."); ++ local_log.log(local_log.level_or_fd, "Already running. Exiting..."); + exit(1); + } + +@@ -323,7 +323,7 @@ + + /* Write PID file */ + if (!write_pid(PID_FILE)) { +- log.log(log.level_or_fd, "Can't write pid.\n"); ++ local_log.log(local_log.level_or_fd, "Can't write pid.\n"); + exit(1); + } + +@@ -360,7 +360,7 @@ + (void) remove_pid(PID_FILE); + } + +- log.log(log.level_or_fd, "IP Protocols Logger: stopped (signal %d).", sig); ++ local_log.log(local_log.level_or_fd, "IP Protocols Logger: stopped (signal %d).", sig); + + exit(0); + } +@@ -372,8 +372,8 @@ + */ + void sighup(int sig) { + // DEPRECATED - reload_configuration(); +- // log.log(log.level_or_fd, "IP Protocols Logger: reloaded configuration."); +- log.log(log.level_or_fd, "IP Protocols Logger: reload configuration is unsupported."); ++ // local_log.log(local_log.level_or_fd, "IP Protocols Logger: reloaded configuration."); ++ local_log.log(local_log.level_or_fd, "IP Protocols Logger: reload configuration is unsupported."); + die(sig); + signal(SIGHUP, sighup); + } +@@ -412,15 +412,15 @@ + if (configuration_file == NULL) + configuration_file = strdup(CONFIGURATION_FILE); + +- init_loginfo(&log); +- log.open(&log.level_or_fd, log.file); ++ init_loginfo(&local_log); ++ local_log.open(&local_log.level_or_fd, local_log.file); + + if (run_as_daemon) { + go_background(); + } + + start_all_threads(); +- log.log(log.level_or_fd, "IP Protocols Logger: started."); ++ local_log.log(local_log.level_or_fd, "IP Protocols Logger: started."); + + for(;;) { + sleep(dns_expire); +--- a/Source/netutils.c ++++ b/Source/netutils.c +@@ -34,7 +34,7 @@ + #include "netutils.h" + #include "log.h" + +-extern struct loginfo log; ++extern struct loginfo local_log; + + /* Mutexes */ + pthread_mutex_t service_mutex = PTHREAD_MUTEX_INITIALIZER; +@@ -96,7 +96,7 @@ + pthread_mutex_unlock(&dns_mutex); + + #ifdef CACHE_DEBUG +- log.log(log.level_or_fd, "DEBUG cache: cleared %d entries", dbg_freed); ++ local_log.log(local_log.level_or_fd, "DEBUG cache: cleared %d entries", dbg_freed); + #endif + } + +@@ -121,7 +121,7 @@ + + #ifdef CACHE_DEBUG + if (dbg_calls % DUMP_EVERY == 0) +- log.log(log.level_or_fd, "DEBUG cache: %d calls - %d misses", dbg_calls, dbg_missed); ++ local_log.log(local_log.level_or_fd, "DEBUG cache: %d calls - %d misses", dbg_calls, dbg_missed); + + dbg_calls++; + #endif +@@ -165,8 +165,8 @@ + #endif + res = perform_lookup(host, in); + #ifdef CACHE_DEBUG +- log.log(log.level_or_fd, "DEBUG cache: result of lookup - %s", host); +- log.log(log.level_or_fd, "DEBUG cache: replacing (%d; %d; %d; %s)", key, table[key].ip, table[key].dirty, table[key].name); ++ local_log.log(local_log.level_or_fd, "DEBUG cache: result of lookup - %s", host); ++ local_log.log(local_log.level_or_fd, "DEBUG cache: replacing (%d; %d; %d; %s)", key, table[key].ip, table[key].dirty, table[key].name); + #endif + /* Now host contains the correct value; store it in the table */ + table[key].ip = in; +--- a/Source/tcp.c ++++ b/Source/tcp.c +@@ -51,7 +51,7 @@ + int tcp_socket; + + struct loginfo tcp_log; +-extern struct loginfo log; ++extern struct loginfo local_log; + extern unsigned short resolve_protocols; + extern unsigned short portresolve_protocols; + +@@ -262,7 +262,7 @@ + tcp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_TCP); + if (tcp_socket <= 0) { + int error = errno; +- log.log(log.level_or_fd, "FATAL: Unable to open tcp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error)); ++ local_log.log(local_log.level_or_fd, "FATAL: Unable to open tcp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error)); + exit(1); + } + +@@ -274,7 +274,7 @@ + + for(;;) { + if (read(tcp_socket, (__u8 *) &pkt, TCP_CAPTURE_LENGTH) == -1) { +- log.log(log.level_or_fd, "FATAL: Unable to read tcp raw socket"); ++ local_log.log(local_log.level_or_fd, "FATAL: Unable to read tcp raw socket"); + exit(1); + } + +--- a/Source/ippl.y ++++ b/Source/ippl.y +@@ -535,7 +535,7 @@ + */ + + void print_error(char *s, int l) { +- extern struct loginfo log; ++ extern struct loginfo local_log; + +- log.log(log.level_or_fd, "CFG: Parse error line %d: %s",l,s); ++ local_log.log(local_log.level_or_fd, "CFG: Parse error line %d: %s",l,s); + } +--- a/Source/udp.c ++++ b/Source/udp.c +@@ -21,7 +21,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -48,7 +48,7 @@ + extern unsigned short resolve_protocols; + + struct loginfo udp_log; +-extern struct loginfo log; ++extern struct loginfo local_log; + + /* + * Structure of a UDP packet +@@ -141,7 +141,7 @@ + udp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_UDP); + if (udp_socket <= 0) { + int error = errno; +- log.log(log.level_or_fd, "FATAL: Unable to open udp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error)); ++ local_log.log(local_log.level_or_fd, "FATAL: Unable to open udp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error)); + exit(1); + } + +@@ -153,7 +153,7 @@ + + for(;;) { + if (read(udp_socket, (__u8 *) &pkt, UDP_CAPTURE_LENGTH) == -1) { +- log.log(log.level_or_fd, "FATAL: Unable to read udp raw socket"); ++ local_log.log(local_log.level_or_fd, "FATAL: Unable to read udp raw socket"); + exit(1); + } + diff --git a/net-analyzer/ippl/ippl-1.4.14-r7.ebuild b/net-analyzer/ippl/ippl-1.4.14-r7.ebuild new file mode 100644 index 000000000000..ec2bb459a1c6 --- /dev/null +++ b/net-analyzer/ippl/ippl-1.4.14-r7.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs autotools + +DESCRIPTION="A daemon which logs TCP/UDP/ICMP packets" +HOMEPAGE="http://pltplp.net/ippl/" +SRC_URI="http://pltplp.net/ippl/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +BDEPEND=" + app-alternatives/yacc + app-alternatives/lex" +RDEPEND="acct-user/ippl" + +PATCHES=( + "${FILESDIR}"/${PN}-1.4.14-noportresolve.patch + "${FILESDIR}"/${PN}-1.4.14-manpage.patch + "${FILESDIR}"/${PN}-1.4.14-privilege-drop.patch + "${FILESDIR}"/${PN}-1.4.14-includes.patch + "${FILESDIR}"/${PN}-1.4.14-format-warnings.patch + # bug #351287 + "${FILESDIR}"/${PN}-1.4.14-fix-build-system.patch + "${FILESDIR}"/${PN}-1.4.14-musl.patch +) + +src_prepare() { + default + # bug https://bugs.gentoo.org/875665 + eautoreconf +} + +src_configure() { + tc-export CC + default +} + +src_install() { + dosbin Source/ippl + + insinto /etc + doins ippl.conf + + doman Docs/{ippl.8,ippl.conf.5} + dodoc BUGS CREDITS HISTORY README TODO + + newinitd "${FILESDIR}"/ippl.rc ippl +} -- cgit v1.2.3