summaryrefslogtreecommitdiff
path: root/net-misc/vmpsd
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/vmpsd')
-rw-r--r--net-misc/vmpsd/Manifest4
-rw-r--r--net-misc/vmpsd/files/vmpsd-1.4-C23.patch159
-rw-r--r--net-misc/vmpsd/files/vmpsd-1.4-missing-includes.patch80
-rw-r--r--net-misc/vmpsd/vmpsd-1.4-r1.ebuild (renamed from net-misc/vmpsd/vmpsd-1.4.ebuild)14
4 files changed, 249 insertions, 8 deletions
diff --git a/net-misc/vmpsd/Manifest b/net-misc/vmpsd/Manifest
index 72237052b302..c07df45a4662 100644
--- a/net-misc/vmpsd/Manifest
+++ b/net-misc/vmpsd/Manifest
@@ -1,6 +1,8 @@
AUX vmpsd-1.3-64bit.patch 910 BLAKE2B 1f4fc71e6a0e1f7f0c51938d7e25487ac364054f517bba350ed2805c09059674d706fa7b536ec29a5d5ce836ebf72ffae4342dfdf3e883bb88680f032627b7b0 SHA512 45fc49fe1412760ecb45811c01e86406c4103492c5a29b99d8953dcca388c58ad157b4200a2fb9adaf73488746b8d16b168cad9dc5ae95e1e618de7490fb8b7d
+AUX vmpsd-1.4-C23.patch 3449 BLAKE2B a308c472046593b0c750258afed0b06d57d56d8006863325b31ea74809e122b8ce5f005d3ab8a6c24f438acd8f0816982a4fee3ea80b45cc0d7d6c4f7ca1efb6 SHA512 9829fb47a51e678bd7a80b635eb2c5f6e157f903af8b50a29a7588e90534dcb0bbb0972685fd15402b013f99884758300172cf6a27d05efb23b06843bbfa9c82
AUX vmpsd-1.4-Wreturn-type.patch 174 BLAKE2B 4d016ef840c7bef378b1350d48809935ee603bc0ac914b62fd377251145cc35bd0b3920193e58c93e2436f7cec58b57e7f1f61c6d5a39cd065952eada48dc9d3 SHA512 bf62ca7d214e5fe0e09ed7f645c36abff299db7cf3360244a881e34048b24a35c17a4d1288a1d97e4c1ef8fd9dd042c400eb9623b2eacae95264332e0910c137
+AUX vmpsd-1.4-missing-includes.patch 1819 BLAKE2B efcaeacc9f56f63cac1fdf29fb811a43c888bdea4a1d78b91c72f76975043d72b85e9032d94ce339735770f1c6fe8e40c67e2fb2569bbea9253186e9d63e05b2 SHA512 ca557eba825ef074a25e72a30cf78dce79bac683edecb6c0013c209e6ba8decaa2e02352570c6b6fe83fdce1345c546a8ab310799c3cb37a6ebaf790a305cb53
AUX vmpsd-1.4-snmp-support.patch 2237 BLAKE2B ef6f80dcdd72435d40ff36509c3aa82f71d78312575db02697b7d3dc9c3cceeeee737d8154cbb798deae89a9a24a5070f4d09835fd8d7fa6069f70358f225cc9 SHA512 fd3b9327b07d87d04d9b2f407ceb1e6c1ef64fca0ba63ae040c10e1c46739a487423a3e54fdb228a3210573fbe76faf5a0d4c7f3a4e84eeb80fb74543e42c027
DIST vmpsd-1.4.tar.gz 92138 BLAKE2B 5fdca60762eb1fca02d95c5022a81b9d28a0266d694dbb40adc1a70e109295ab2f2914f2083f356b372161467df78c35ba28984e6febc4857501e73bd54bb860 SHA512 341a86f8db28f1f7a03b5581ec8f8319a175a2c5dc9c7ff5df880f4416cf048ef9e32afd6600220e48f8713d6c72c4ffae7d1e8d31c73ded466f084711580efd
-EBUILD vmpsd-1.4.ebuild 912 BLAKE2B ad3ab0c1f281f7c0b080b575f19ba45f6bc9d3954a8e8b28e2eafa752be1d9e26882865055f0c8b038006be6a7de8b4fc5b569ee830fd8a8a25320c0f56cc198 SHA512 1bff491605dda799554b41f3384e0791ba4b7419e0319a973e74ededa49fffeaefdfe639f99d8cf80806892099a34ef9fa0e32481765d0afc097de11fc299d81
+EBUILD vmpsd-1.4-r1.ebuild 923 BLAKE2B ea8293b178c90bd4e91d60a0ccccfcb5c8a49c4215bcda8744059f84b4843c75e8c5c7027c5905e4c2cc8ab125b0eba30cc54bdaaeb4763182ac14ba74b57d9b SHA512 6b730c59c0cc7073e2ba2b9d2e66048a74c2f6ad53fe442218fb06931178ca00ce37d0123bfed9fd2d34de9224e7aeb2f2038c9f1ee5052526dff40c46e56214
MISC metadata.xml 301 BLAKE2B 39ef770a2e4525e825e67e65ca5e7a79e7dfab94ea5415ab9b13d0786eedb1e416a1ecedd40cf9b8a6d45da82bc4b852024225e9977187733804d25e15734a8c SHA512 08e5ab8cc34df4444d89f8d375a2f62fce9d444fcd89d2a2378293de8066983e8019b1319e19f56d3ae3072af83f7b7230c018544794d2845bd2e2bbb401a117
diff --git a/net-misc/vmpsd/files/vmpsd-1.4-C23.patch b/net-misc/vmpsd/files/vmpsd-1.4-C23.patch
new file mode 100644
index 000000000000..39dd06249fa0
--- /dev/null
+++ b/net-misc/vmpsd/files/vmpsd-1.4-C23.patch
@@ -0,0 +1,159 @@
+Fix compilation with -std=gnu23: missing function decls,
+wrong prototypes, old-style prototypes, incorrect function
+pointer types.
+https://bugs.gentoo.org/887249
+https://bugs.gentoo.org/883125
+--- a/daemon.c
++++ b/daemon.c
+@@ -40,14 +40,11 @@
+
+ #endif
+
+ }
+
+-void daemon_start(ignsigcld)
+-
+- int ignsigcld;
+-
++void daemon_start(int ignsigcld)
+ {
+ register int childpid;
+
+ #ifdef VMPS_CHECK_BSD
+ int fd;
+--- a/data.c
++++ b/data.c
+@@ -5,10 +5,12 @@
+ #include <string.h>
+
+ #include "data.h"
+ #include "log.h"
+
++extern void parse_error(const char *token); // from parser.c
++
+ void *macs = NULL;
+ void *vlans = NULL;
+ void *ports = NULL;
+ void *vlan_groups = NULL;
+ void *port_groups = NULL;
+@@ -35,13 +37,14 @@
+ exit(1);
+ }
+
+ void *xfree(void *p) {
+
+- if (p == NULL) return;
++ if (p == NULL) return NULL;
+ vmps_log(DEBUG|SYSTEM, "FREE: %x",p);
+ free(p);
++ return NULL;
+ }
+
+ /* --------------------------------------------------------------------------- */
+
+ int compare_mac(const void *pa, const void *pb) {
+--- a/external.c
++++ b/external.c
+@@ -20,11 +20,11 @@
+ pid_t external_pid = 0;
+
+ int tocli[2];
+ int fromcli[2];
+
+-RETSIGTYPE sig_term()
++RETSIGTYPE sig_term(int)
+ {
+
+ vmps_log(SYSTEM|INFO, "Terminating external program (%d).", external_pid);
+ if ( kill(external_pid, SIGTERM) < 0 ) {
+ vmps_log(SYSTEM|FATAL, "Cannot send TERM signal to external program (%s).", strerror(errno));
+@@ -33,21 +33,21 @@
+
+ vmps_log(SYSTEM|INFO, "VMPSD TERMINATING.");
+ exit(0);
+ }
+
+-RETSIGTYPE sig_child_e()
++RETSIGTYPE sig_child_e(int)
+ {
+ int pid;
+ int status;
+
+ pid = wait3(&status, WNOHANG, (struct rusage *) 0);
+ vmps_log(SYSTEM|INFO, "VMPSD EXITING (external program terminating prematurely)[%d].",pid);
+ exit(1);
+ }
+
+-int spawn_external()
++int spawn_external(void)
+ {
+
+ pid_t chpid;
+
+ signal(SIGCHLD, sig_child_e);
+--- a/external.h
++++ b/external.h
+@@ -6,7 +6,8 @@
+ extern char external_prog[256];
+ extern pid_t external_pid;
+
+ int get_vlan_external(VQP_REQUEST *r, char *vlan_name);
+ void do_request_external(int sock, VQP_REQUEST *r );
++int spawn_external(void);
+
+ #endif
+--- a/vmpsd.c
++++ b/vmpsd.c
+@@ -11,10 +11,13 @@
+
+ #include "vqp.h"
+ #include "log.h"
+ #include "external.h"
+
++extern void parse_db_file(const char *fname); //from parse.c
++extern void daemon_start(int ignsigcld); //from daemon.c
++
+ struct in_addr bind_address;
+ unsigned int port_number = 1589;
+ char db_fname[256];
+ int default_behaviour = 0;
+
+@@ -93,11 +96,11 @@
+ printf("\t 0x0004 - vqp\n");
+ printf("\t-p port port to listen on (1589)\n");
+ printf("\n");
+ }
+
+-RETSIGTYPE handle_sighup() {
++RETSIGTYPE handle_sighup(int, siginfo_t *, void *) {
+
+ if ( external_logic ) return;
+ vmps_log(PARSER|INFO, "RECEIVED SIGHUP. Re-reading config file");
+ drop_data();
+ parse_db_file(db_fname);
+--- a/vqp.c
++++ b/vqp.c
+@@ -3,10 +3,11 @@
+ #include <string.h>
+ #include <netdb.h>
+
+ #include "log.h"
+ #include "data.h"
++#include "snmp.h"
+ #include "vqp.h"
+ #include "external.h"
+
+ int get_request(int sock, VQP_REQUEST *r)
+ {
+--- a/vqp.h
++++ b/vqp.h
+@@ -50,7 +50,9 @@
+ extern int default_behaviour;
+
+ int get_request(int sock, VQP_REQUEST *r);
+ void print_request(VQP_REQUEST *r);
+ void do_request(int sock, VQP_REQUEST *r );
++int send_response(int sock, u_char action, VQP_REQUEST *r, char *vlan_name);
++void print_action(VQP_REQUEST *r, char *str, char *vlan_name);
+
+ #endif
diff --git a/net-misc/vmpsd/files/vmpsd-1.4-missing-includes.patch b/net-misc/vmpsd/files/vmpsd-1.4-missing-includes.patch
new file mode 100644
index 000000000000..842432cf560d
--- /dev/null
+++ b/net-misc/vmpsd/files/vmpsd-1.4-missing-includes.patch
@@ -0,0 +1,80 @@
+From: Jocelyn Mayer <l_indien@mailmagic.fr>
+Patches missing includes and other C99 compilation errors
+https://bugs.gentoo.org/887249
+--- a/daemon.c 2005-12-29 16:32:02.000000000 +0100
++++ b/daemon.c 2019-06-07 09:50:06.839448716 +0200
+@@ -2,10 +2,14 @@
+
+ #include "log.h"
+
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <signal.h>
++#include <sys/types.h>
+ #include <sys/param.h>
++#include <sys/stat.h>
+ #include <sys/wait.h>
++#include <unistd.h>
+ #include <errno.h>
+
+ #ifdef SETPGRP_VOID
+@@ -38,7 +42,7 @@ RETSIGTYPE sig_child()
+
+ }
+
+-daemon_start(ignsigcld)
++void daemon_start(ignsigcld)
+
+ int ignsigcld;
+
+--- a/data.c 2004-07-08 22:58:20.000000000 +0200
++++ b/data.c 2019-06-07 09:46:32.896814247 +0200
+@@ -2,7 +2,7 @@
+
+ #include <stdlib.h>
+ #include <search.h>
+-#include <stdlib.h>
++#include <string.h>
+
+ #include "data.h"
+ #include "log.h"
+--- a/external.c 2004-11-10 14:10:04.000000000 +0100
++++ b/external.c 2019-06-07 09:42:38.903931334 +0200
+@@ -1,5 +1,7 @@
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <signal.h>
++#include <string.h>
+ #include <sys/param.h>
+ #include <sys/wait.h>
+ #include <sys/types.h>
+--- a/parser.c 2004-07-08 15:57:30.000000000 +0200
++++ b/parser.c 2019-06-07 09:41:00.534719377 +0200
+@@ -1,5 +1,6 @@
+ #include "config.h"
+
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
+--- a/vmpsd.c 2019-06-07 09:28:33.013509568 +0200
++++ b/vmpsd.c 2019-06-07 09:44:38.800408508 +0200
+@@ -1,7 +1,9 @@
+ #include "config.h"
+
+ #include <stdlib.h>
++#include <stdio.h>
+ #include <signal.h>
++#include <string.h>
+
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+--- a/vqp.c 2019-06-07 09:28:33.085510455 +0200
++++ b/vqp.c 2019-06-07 09:41:48.839314511 +0200
+@@ -1,5 +1,6 @@
+ #include "config.h"
+
++#include <string.h>
+ #include <netdb.h>
+
+ #include "log.h"
diff --git a/net-misc/vmpsd/vmpsd-1.4.ebuild b/net-misc/vmpsd/vmpsd-1.4-r1.ebuild
index 899cb2c1f2f7..f61d6801eb16 100644
--- a/net-misc/vmpsd/vmpsd-1.4.ebuild
+++ b/net-misc/vmpsd/vmpsd-1.4-r1.ebuild
@@ -1,13 +1,14 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools
DESCRIPTION="An open-source VLAN management system"
-HOMEPAGE="http://vmps.sourceforge.net"
+HOMEPAGE="https://vmps.sourceforge.net"
SRC_URI="https://downloads.sourceforge.net/vmps/${P}.tar.gz"
+S="${WORKDIR}/${PN}"
LICENSE="GPL-2"
SLOT="0"
@@ -18,17 +19,16 @@ DEPEND="
${RDEPEND}
dev-libs/openssl"
-S="${WORKDIR}/${PN}"
-
PATCHES=(
"${FILESDIR}"/${PN}-1.4-snmp-support.patch
"${FILESDIR}"/${PN}-1.3-64bit.patch
- "${FILESDIR}"/${PN}-1.4-Wreturn-type.patch
+ "${FILESDIR}"/${PN}-1.4-missing-includes.patch
+ "${FILESDIR}"/${PN}-1.4-C23.patch
)
src_prepare() {
default
- mv configure.{in,ac} || die
+
eautoreconf
}