Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/argus/files/, net-analyzer/argus/
Date: Mon, 27 Jan 2020 18:40:54
Message-Id: 1580150442.fd4bed892c78dd78b0441dfa99b69bd3bd6812d0.jer@gentoo
1 commit: fd4bed892c78dd78b0441dfa99b69bd3bd6812d0
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 27 18:38:56 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 27 18:40:42 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd4bed89
7
8 net-analyzer/argus: Fix CFLAGS=-fno-common
9
10 - EAPI=7
11 - Set new HOMEPAGE
12 - Remove unneeded definitions to fix CFLAGS=-fno-common
13
14 Package-Manager: Portage-2.3.85, Repoman-2.3.20
15 Closes: https://bugs.gentoo.org/706668
16 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
17
18 net-analyzer/argus/argus-3.0.8.2-r2.ebuild | 93 ++++++++++++++++++++++
19 .../argus/files/argus-3.0.8.2-fno-common.patch | 45 +++++++++++
20 2 files changed, 138 insertions(+)
21
22 diff --git a/net-analyzer/argus/argus-3.0.8.2-r2.ebuild b/net-analyzer/argus/argus-3.0.8.2-r2.ebuild
23 new file mode 100644
24 index 00000000000..73a6fd17e88
25 --- /dev/null
26 +++ b/net-analyzer/argus/argus-3.0.8.2-r2.ebuild
27 @@ -0,0 +1,93 @@
28 +# Copyright 1999-2020 Gentoo Authors
29 +# Distributed under the terms of the GNU General Public License v2
30 +
31 +EAPI=7
32 +inherit autotools user
33 +
34 +DESCRIPTION="network Audit Record Generation and Utilization System"
35 +HOMEPAGE="https://openargus.org/"
36 +SRC_URI="https://www.qosient.com/argus/dev/${P/_rc/.rc.}.tar.gz"
37 +
38 +LICENSE="GPL-3"
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
41 +IUSE="debug +libtirpc sasl tcpd"
42 +
43 +RDEPEND="
44 + net-libs/libnsl:=
45 + net-libs/libpcap
46 + sys-libs/zlib
47 + !libtirpc? ( sys-libs/glibc[rpc(-)] )
48 + libtirpc? ( net-libs/libtirpc )
49 + sasl? ( dev-libs/cyrus-sasl )
50 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
51 +"
52 +
53 +DEPEND="
54 + ${RDEPEND}
55 + >=sys-devel/bison-1.28
56 + >=sys-devel/flex-2.4.6
57 +"
58 +PATCHES=(
59 + "${FILESDIR}"/${PN}-3.0.8.1-disable-tcp-wrappers-automagic.patch
60 + "${FILESDIR}"/${PN}-3.0.5-Makefile.patch
61 + "${FILESDIR}"/${PN}-3.0.7.3-DLT_IPNET.patch
62 + "${FILESDIR}"/${PN}-3.0.8.2-rpc.patch
63 + "${FILESDIR}"/${PN}-3.0.8.2-fno-common.patch
64 +)
65 +S=${WORKDIR}/${P/_rc/.rc.}
66 +
67 +pkg_setup() {
68 + enewgroup argus
69 + enewuser argus -1 -1 /var/lib/argus argus
70 +}
71 +
72 +src_prepare() {
73 + find . -type f -execdir chmod +w {} \; #561360
74 + sed -e 's:/etc/argus.conf:/etc/argus/argus.conf:' \
75 + -i argus/argus.c \
76 + -i support/Config/argus.conf \
77 + -i man/man8/argus.8 \
78 + -i man/man5/argus.conf.5 || die
79 +
80 + sed -e 's:#\(ARGUS_SETUSER_ID=\).*:\1argus:' \
81 + -e 's:#\(ARGUS_SETGROUP_ID=\).*:\1argus:' \
82 + -e 's:\(#ARGUS_CHROOT_DIR=\).*:\1/var/lib/argus:' \
83 + -i support/Config/argus.conf || die
84 +
85 + default
86 + eautoreconf
87 +}
88 +
89 +src_configure() {
90 + use debug && touch .debug # enable debugging
91 + econf $(use_with libtirpc) $(use_with tcpd wrappers) $(use_with sasl)
92 +}
93 +
94 +src_compile() {
95 + emake CCOPT="${CFLAGS} ${LDFLAGS}"
96 +}
97 +
98 +src_install () {
99 + doman man/man5/*.5 man/man8/*.8
100 +
101 + dosbin bin/argus{,bug}
102 +
103 + dodoc ChangeLog CREDITS README
104 +
105 + insinto /etc/argus
106 + doins support/Config/argus.conf
107 +
108 + newinitd "${FILESDIR}/argus.initd" argus
109 + keepdir /var/lib/argus
110 +}
111 +
112 +pkg_preinst() {
113 + enewgroup argus
114 + enewuser argus -1 -1 /var/lib/argus argus
115 +}
116 +
117 +pkg_postinst() {
118 + elog "Note, if you modify ARGUS_DAEMON value in argus.conf it's quite"
119 + elog "possible that the init script will fail to work."
120 +}
121
122 diff --git a/net-analyzer/argus/files/argus-3.0.8.2-fno-common.patch b/net-analyzer/argus/files/argus-3.0.8.2-fno-common.patch
123 new file mode 100644
124 index 00000000000..66f950d0c04
125 --- /dev/null
126 +++ b/net-analyzer/argus/files/argus-3.0.8.2-fno-common.patch
127 @@ -0,0 +1,45 @@
128 +--- a/include/argus/bootp.h
129 ++++ b/include/argus/bootp.h
130 +@@ -45,6 +45,8 @@
131 + unsigned char bp_vend[64]; /* vendor-specific area */
132 + };
133 +
134 ++extern struct bootp *bp;
135 ++
136 + /*
137 + * UDP port numbers, server and client.
138 + */
139 +--- a/argus/ArgusUdp.c
140 ++++ b/argus/ArgusUdp.c
141 +@@ -40,9 +40,6 @@
142 + #include <argus_compat.h>
143 + #include <ArgusModeler.h>
144 +
145 +-#include <argus/bootp.h>
146 +-struct bootp *bp;
147 +-
148 + void ArgusUpdateUDPState (struct ArgusModelerStruct *, struct ArgusFlowStruct *, unsigned char *);
149 +
150 + void
151 +--- a/argus/ArgusUdt.c
152 ++++ b/argus/ArgusUdt.c
153 +@@ -40,9 +40,6 @@
154 + #include <argus_compat.h>
155 + #include <ArgusModeler.h>
156 +
157 +-#include <argus/bootp.h>
158 +-struct bootp *bp;
159 +-
160 + struct ArgusSystemFlow *
161 + ArgusCreateUDTFlow (struct ArgusModelerStruct *model, struct udt_header *udt)
162 + {
163 +--- a/argus/ArgusModeler.c
164 ++++ b/argus/ArgusModeler.c
165 +@@ -43,7 +43,6 @@
166 +
167 + #include <argus.h>
168 +
169 +-#include <argus/bootp.h>
170 + #include <signal.h>
171 +
172 + #include <sched.h>