Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/ipmiutil/files/, sys-apps/ipmiutil/
Date: Thu, 17 Sep 2020 13:52:20
Message-Id: 1600350731.e5f2c614cd1b0ef5297567127fabee9c3f88fccc.polynomial-c@gentoo
1 commit: e5f2c614cd1b0ef5297567127fabee9c3f88fccc
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 17 13:30:36 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 17 13:52:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5f2c614
7
8 sys-apps/ipmiutil: Bump to version 3.1.7
9
10 Package-Manager: Portage-3.0.7, Repoman-3.0.1
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-apps/ipmiutil/Manifest | 1 +
14 .../files/ipmiutil-3.1.7-fix-configure.patch | 184 +++++++++++++++++++++
15 sys-apps/ipmiutil/files/ipmiutil-3.1.7-flags.patch | 20 +++
16 sys-apps/ipmiutil/ipmiutil-3.1.7.ebuild | 72 ++++++++
17 4 files changed, 277 insertions(+)
18
19 diff --git a/sys-apps/ipmiutil/Manifest b/sys-apps/ipmiutil/Manifest
20 index 1f4bf92209b..831feb27415 100644
21 --- a/sys-apps/ipmiutil/Manifest
22 +++ b/sys-apps/ipmiutil/Manifest
23 @@ -2,3 +2,4 @@ DIST ipmiutil-3.0.6.tar.gz 1692679 BLAKE2B dcc02dbb5467b824005dbc95c8f5231b2e275
24 DIST ipmiutil-3.0.9.tar.gz 1697688 BLAKE2B 93ed8865cae1cea0ea4f7de4683f4698e3f75e9190cc7e0af1832ca44a08f52aa149393761f1ede3994827db78841061d54058bbe4178b5930accd3a4c225ba7 SHA512 c2c0a516216a46a52621159e665a77d96cf81f385fc9cf19877e72283be3e1a4dad5a4826454727b71576c22cc4de3c73ff428d26f35bf496c7dc1511305cda3
25 DIST ipmiutil-3.1.5.tar.gz 1703583 BLAKE2B 5e96659387b3e11e5f7867156d0079e06f19676099e8ff2a212f7e28550f9dde2079a4d527439489e1a710d878e7eb79a68b0e11b531f92d986aa7687273d462 SHA512 a9bd4d99d5bcad8a9f64c3636d6774d09e1d4c20927a6803891777ba035ee3c114b06295185cf00fb0c5d4b4b9afd335fd19c06f64298130e42945dc5f6e8010
26 DIST ipmiutil-3.1.6.tar.gz 1693461 BLAKE2B efc2b283d7655b8afb9d3d8da2e5458deea1c1b939f3ccdf2be0cdf3792ea60229099cce1b8e32f087972385feb01d604f1c63bddbfd031210d5acf8a6b1b9d7 SHA512 9bccfa2e0bba7f30e422d67f93ee6cff50c08cc8bceab5ba5bfd1b0a91e1af8a4a98a2eaa81364e8a1f38e0bd1ce6b99717d86957c6f689aa7329e7013f5b0ef
27 +DIST ipmiutil-3.1.7.tar.gz 1726396 BLAKE2B 7fa31f8aca61462fc08dd4fe420e27eecce2ee9fa5fb2676eb944e2ae6c09598aec5f06d59e4ed02faab077003b14085f944b6cf0b63f90b10f2660f363e997b SHA512 7522808e4a94c8627de0a95dde0e3eb463ba05948159b5181129b573ce8f9feba3543ef603c14e7cdcafcbd58ca5319536cc5534ea8191cce0ef9d33cc548274
28
29 diff --git a/sys-apps/ipmiutil/files/ipmiutil-3.1.7-fix-configure.patch b/sys-apps/ipmiutil/files/ipmiutil-3.1.7-fix-configure.patch
30 new file mode 100644
31 index 00000000000..16435dacd6b
32 --- /dev/null
33 +++ b/sys-apps/ipmiutil/files/ipmiutil-3.1.7-fix-configure.patch
34 @@ -0,0 +1,184 @@
35 +--- ipmiutil-3.1.7/configure.ac
36 ++++ ipmiutil-3.1.7/configure.ac
37 +@@ -80,40 +80,46 @@
38 + # fi]
39 +
40 + drv_landesk=0
41 ++LANDESK_CFLAGS=""
42 ++LANDESK_LDADD=""
43 + dnl configure for LANDESK libipmiapi or not
44 + AC_ARG_ENABLE([landesk],
45 +- [ --enable-landesk adds landesk library support [[default=no]]],
46 +- [if test "x$enableval" = "xyes"; then
47 +- drv_landesk=1
48 +- LANDESK_CFLAGS="-DLINK_LANDESK"
49 +- LANDESK_LDADD="-lipmiapi -L../lib"
50 +- AC_SUBST(LANDESK_CFLAGS)
51 +- AC_SUBST(LANDESK_LDADD)
52 +- fi]
53 +- )
54 ++ AS_HELP_STRING([--enable-landesk], [enable landesk support (default=no)]),
55 ++ [],
56 ++ [enable_landesk=no])
57 ++
58 ++AS_IF([test "x$enable_landesk" = "xyes"], [
59 ++ drv_landesk=1
60 ++ LANDESK_CFLAGS="-DLINK_LANDESK"
61 ++ LANDESK_LDADD="-lipmiapi -L../lib"
62 ++ AC_SUBST(LANDESK_CFLAGS)
63 ++ AC_SUBST(LANDESK_LDADD)
64 ++ ])
65 +
66 + dnl Configure ipmiutil for lanplus (libipmi_lanplus.a) or not (default yes)
67 + AC_ARG_ENABLE([lanplus],
68 +- [ --enable-lanplus enable lanplus support (default=yes)],[default=yes],
69 +-[if test "x$enableval" = "xno"; then
70 +- drv_lanplus=""
71 +- LANPLUS_CFLAGS=""
72 +- LANPLUS_LDADD=""
73 +- LANPLUS_LIB=""
74 +- LANPLUS_CRYPTO=""
75 +- LANPLUS_SAM="no"
76 +- LD_SAMX=""
77 +-else
78 ++ AS_HELP_STRING([--disable-lanplus], [enable lanplus support (default=yes)]),
79 ++ [],
80 ++ [enable_lanplus=yes])
81 ++
82 ++drv_lanplus=""
83 ++LANPLUS_CFLAGS=""
84 ++LANPLUS_LDADD=""
85 ++LANPLUS_LIB=""
86 ++LANPLUS_CRYPTO=""
87 ++LANPLUS_SAM="no"
88 ++LD_SAMX=""
89 ++AS_IF([test "x$enable_lanplus" = "xyes"], [
90 + drv_lanplus="lanplus"
91 + LANPLUS_CFLAGS="-DHAVE_LANPLUS"
92 + # LANPLUS_CFLAGS="-DHAVE_LANPLUS -I${projdir}/lib/lanplus/inc"
93 + # LANPLUS_LDADD="-L../lib -lintf_lanplus -L/usr/local/lib -lcrypto"
94 + LANPLUS_LDADD="-L../lib -lipmi_lanplus -L/usr/local/lib -lcrypto"
95 +- LANPLUS_LIB="../lib/libipmi_lanplus.a"
96 ++ LANPLUS_LIB="../lib/libipmi_lanplus.a"
97 + LANPLUS_CRYPTO="-lcrypto"
98 + LANPLUS_SAM="yes"
99 + LD_SAMX="../lib/libipmi_lanplus.a -lcrypto"
100 +-fi ])
101 ++])
102 +
103 + dnl Configure libipmiutil.a for lanplus or not
104 + dnl Only SOL requires lanplus, so usually build libipmiutil.a without lanplus
105 +@@ -128,21 +134,28 @@
106 + #fi
107 +
108 + # strings /lib/libssl.so* |grep EVP_sha256
109 +-dnl configure for SHA256, build lanplus with SHA256 support, uses later openssl.
110 ++dnl configure for SHA256, build lanplus with SHA256 support
111 ++dnl requires openssl-1.0.1 which was released in 2012/03
112 + AC_ARG_ENABLE([sha256],
113 +- [ --enable-sha256 build with SHA256 support, requires later openssl.],
114 +- [if test "x$enableval" = "xyes"; then
115 +- LANPLUS_CFLAGS="$LANPLUS_CFLAGS -DHAVE_SHA256"
116 +- fi]
117 +- )
118 ++ AS_HELP_STRING([--disable-sha256], [build with SHA256 support (default=yes)]),
119 ++ dnl action if passed
120 ++ [],
121 ++ dnl action if not passed
122 ++ [enable_sha256=yes]
123 ++ )
124 ++AS_IF([test "x$enable_sha256" = "xyes"], [
125 ++ LANPLUS_CFLAGS="$LANPLUS_CFLAGS -DHAVE_SHA256"
126 ++])
127 +
128 + dnl configure for EKANALYZER, build with ekanalyzer function enabled
129 + AC_ARG_ENABLE([ekanalyzer],
130 +- [ --enable-ekanalyzer build with ekanalyzer function enabled.],
131 +- [if test "x$enableval" = "xyes"; then
132 ++ AS_HELP_STRING([--enable-ekanalyzer], [build with ekanalyzer function enabled.]),
133 ++ [],
134 ++ [enable_ekanalyzer=no]
135 ++ )
136 ++AS_IF([test "x$enable_ekanalyzer" = "xyes"], [
137 + OS_CFLAGS="$OS_CFLAGS -DHAVE_EKANAL"
138 +- fi]
139 +- )
140 ++ ])
141 +
142 + GPL_CFLAGS=""
143 + CROSS_LFLAGS=""
144 +@@ -152,17 +165,20 @@
145 + SYSTEMD_DIR=/usr/share/ipmiutil
146 +
147 + AC_ARG_ENABLE([useflags],
148 +- [ --enable-useflags include environment CFLAGS and LDFLAGS.],
149 +- [if test "x$enableval" = "xyes"; then
150 ++ AS_HELP_STRING([--enable-useflags], [include environment CFLAGS and LDFLAGS.]),
151 ++ [],
152 ++ [enable_useflags=no])
153 ++AS_IF([test "x$enable_useflags" = "xyes"], [
154 + CROSS_CFLAGS="$CFLAGS"
155 + CROSS_LFLAGS="$LDFLAGS"
156 +- fi]
157 +- )
158 ++])
159 +
160 + dnl configure for standalone, with no lanplus or GPL libs
161 + AC_ARG_ENABLE([standalone],
162 +- [ --enable-standalone build standalone, with no GPL or LanPlus libs.],
163 +- [if test "x$enableval" = "xyes"; then
164 ++ AS_HELP_STRING([--enable-standalone], [build standalone, with no GPL or LanPlus libs.]),
165 ++ [],
166 ++ [enable_standalone=no])
167 ++AS_IF([test "x$enable_standalone" = "xyes"], [
168 + GPL_CFLAGS=""
169 + LANPLUS_CFLAGS=""
170 + LANPLUS_LDADD=""
171 +@@ -176,10 +192,11 @@
172 + # cross-compiling, so link with -static (e.g. Android ARM)
173 + CROSS_LFLAGS="-static"
174 + CROSS_CFLAGS="-DCROSS_COMPILE"
175 ++ # TODO: how can this be effective? Configure only converts Makefile.in -> Makefile
176 ++ # Configure does not convert Makefile.am->Makefile.in
177 + sed -i -e 's/^# ipmiutil: $(METASOURCE:.c=.o)/ipmiutil:\t$(METASOURCE:.c=.o)\n\t$(CC) $(CFLAGS) $(LDFLAGS) -o ipmiutil $(METASOURCE:.c=.o) $(LDADD)/' util/Makefile.am
178 + fi
179 +- fi]
180 +- )
181 ++ ])
182 +
183 + AC_ARG_ENABLE([doc],
184 + [ --enable-doc build with documentation [[default=yes]]],
185 +@@ -192,20 +209,22 @@
186 +
187 + dnl build libipmiutil with sensor modules
188 + AC_ARG_ENABLE([libsensors],
189 +- [ --enable-libsensors build libipmiutil with sensor modules [[default=no]]],
190 +- [if test "x$enableval" = "xyes"; then
191 +- LIBSENSORS="isensor2.o ievents2.o"
192 +- SAM2OBJ=""
193 +- fi]
194 +- )
195 ++ AS_HELP_STRING([--enable-libsensors], [build libipmiutil with sensor modules (default=no)]),
196 ++ [],
197 ++ [enable_libsensors=no])
198 ++AS_IF([test "x$enable_libsensors" = "xyes"], [
199 ++ LIBSENSORS="isensor2.o ievents2.o"
200 ++ SAM2OBJ=""
201 ++ ])
202 +
203 + dnl configure for GPL build or not (GPL files: md2.h, ipmi_ioctl.h)
204 + AC_ARG_ENABLE([gpl],
205 +- [ --enable-gpl build with some GPL code [[default=no]]],
206 +- [if test "x$enableval" = "xyes"; then
207 +- GPL_CFLAGS="-DALLOW_GPL"
208 +- fi]
209 +- )
210 ++ AS_HELP_STRING([--enable-gpl], [build with some GPL code (default=no)]),
211 ++ [],
212 ++ [enable_gpl=no])
213 ++AS_IF([test "x$enable_gpl" = "xyes"], [
214 ++ GPL_CFLAGS="-DALLOW_GPL"
215 ++ ])
216 +
217 + dnl Does this Linux have systemd enabled? Otherwise use sysv init.
218 + AC_ARG_ENABLE([systemd],
219
220 diff --git a/sys-apps/ipmiutil/files/ipmiutil-3.1.7-flags.patch b/sys-apps/ipmiutil/files/ipmiutil-3.1.7-flags.patch
221 new file mode 100644
222 index 00000000000..7ef804bc11d
223 --- /dev/null
224 +++ b/sys-apps/ipmiutil/files/ipmiutil-3.1.7-flags.patch
225 @@ -0,0 +1,20 @@
226 +--- ipmiutil-3.1.7/configure.ac
227 ++++ ipmiutil-3.1.7/configure.ac
228 +@@ -170,7 +170,7 @@
229 + LANPLUS_CRYPTO=""
230 + LANPLUS_SAM="no"
231 + LD_SAMX=""
232 +- CFLAGS="-O2"
233 ++ #CFLAGS="-O2"
234 + SUBDIR_S="scripts util"
235 + if test "x$cross_compiling" = "xyes"; then
236 + # cross-compiling, so link with -static (e.g. Android ARM)
237 +@@ -363,7 +363,7 @@
238 + fi
239 + rm -f $tmpc $tmpo >/dev/null 2>&1
240 + echo $ECHO_N "checking compile fortify flags ... $ECHO_C"
241 +- cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
242 ++ #cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
243 + echo "int main() { alloca(100); return(1); }" >$tmpc
244 + $CC -o $tmpo $cfhard $tmpc >/dev/null 2>&1
245 + if test $? -ne 0 ; then
246
247 diff --git a/sys-apps/ipmiutil/ipmiutil-3.1.7.ebuild b/sys-apps/ipmiutil/ipmiutil-3.1.7.ebuild
248 new file mode 100644
249 index 00000000000..5bf9b0440aa
250 --- /dev/null
251 +++ b/sys-apps/ipmiutil/ipmiutil-3.1.7.ebuild
252 @@ -0,0 +1,72 @@
253 +# Copyright 1999-2020 Gentoo Authors
254 +# Distributed under the terms of the GNU General Public License v2
255 +
256 +EAPI=7
257 +inherit autotools systemd
258 +
259 +DESCRIPTION="IPMI Management Utilities"
260 +HOMEPAGE="http://ipmiutil.sourceforge.net/"
261 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
262 +
263 +LICENSE="BSD"
264 +SLOT="0"
265 +KEYWORDS="~amd64 ~hppa ~ppc ~x86"
266 +IUSE="static-libs"
267 +
268 +RDEPEND=">=dev-libs/openssl-1:0="
269 +DEPEND="${RDEPEND}
270 + virtual/os-headers"
271 +
272 +PATCHES=(
273 + "${FILESDIR}"/${PN}-3.1.7-flags.patch
274 + "${FILESDIR}"/${PN}-2.9.9-lib_symlink.patch
275 + "${FILESDIR}"/${PN}-3.1.7-fix-configure.patch
276 +)
277 +
278 +src_prepare() {
279 + default
280 +
281 + sed -i -e 's|-O2 -g|$(CFLAGS)|g;s|-g -O2|$(CFLAGS)|g' util/Makefile.am* || die
282 + sed -i -e 's|which rpm |which we_are_gentoo_rpm_is_a_guest |' configure.ac || die
283 +
284 + # Don't compress man pages
285 + sed '/gzip -nf/d' -i doc/Makefile.am || die
286 +
287 + eautoreconf
288 +}
289 +
290 +src_configure() {
291 + local myeconfargs=(
292 + --disable-systemd
293 + --enable-sha256
294 + --enable-lanplus
295 + )
296 + econf "${myeconfargs[@]}"
297 +}
298 +
299 +src_compile() {
300 + # Ulgy workaround. Upstream is misusing the make system here
301 + # and it doesn't even work.
302 + # Please check on each bump if this workaround is still required.
303 + pushd lib/lanplus &>/dev/null || die
304 + emake
305 + cp libipmi_lanplus.a .. || die
306 + popd &>/dev/null || die
307 +
308 + emake
309 +}
310 +
311 +src_install() {
312 + emake DESTDIR="${D}" sysdto="${D}/$(systemd_get_systemunitdir)" install
313 + dodoc -r AUTHORS ChangeLog NEWS README TODO doc/UserGuide
314 +
315 + # Init scripts are only for Fedora
316 + rm -r "${ED}"/etc/init.d || die 'remove initscripts failed'
317 +
318 + # --disable-static has no effect
319 + if ! use static-libs ; then
320 + find "${ED}" -type f -name '*.a' -delete || die
321 + fi
322 +
323 + keepdir /var/lib/ipmiutil
324 +}