View | Details | Raw Unified | Return to bug 281306 | Differences between
and this patch

Collapse All | Expand All

(-)b/sysutils/ipmitool/Makefile (-9 / +18 lines)
Lines 1-25 Link Here
1
PORTNAME=	ipmitool
1
PORTNAME=	ipmitool
2
PORTVERSION=	1.8.18
2
PORTVERSION=	1.8.19
3
PORTREVISION=	4
4
CATEGORIES=	sysutils
3
CATEGORIES=	sysutils
5
MASTER_SITES=	SF
4
MASTER_SITES=	https://codeberg.org/IPMITOOL/${PORTNAME}/archive/ \
5
		http://www.iana.org/assignments/:iana
6
DISTFILES=	IPMITOOL_${PORTVERSION:S/./_/g}${EXTRACT_SUFX} \
7
		enterprise-numbers.txt:iana
6
8
7
MAINTAINER=	zi@FreeBSD.org
9
MAINTAINER=	zi@FreeBSD.org
8
COMMENT=	CLI to manage IPMI systems
10
COMMENT=	CLI to manage IPMI systems
9
WWW=		https://sourceforge.net/projects/ipmitool/
11
WWW=		https://codeberg.org/IPMITool/ipmitool
10
12
11
LICENSE=	BSD3CLAUSE
13
LICENSE=	BSD3CLAUSE
12
LICENSE_FILE=	${WRKSRC}/COPYING
14
LICENSE_FILE=	${WRKSRC}/COPYING
13
15
14
USES=		cpe tar:bzip2 gmake readline ssl
16
USES=		autoreconf libtool cpe gmake readline ssl
15
CPE_VENDOR=	sun
17
CPE_VENDOR=	sun
16
GNU_CONFIGURE=	yes
18
GNU_CONFIGURE=	yes
17
GNU_CONFIGURE_MANPREFIX=   ${PREFIX}/share
19
GNU_CONFIGURE_MANPREFIX=	${PREFIX}/share
18
PLIST_FILES=	bin/ipmitool \
20
PLIST_FILES=	bin/ipmitool \
19
		share/man/man1/ipmitool.1.gz \
21
		share/man/man1/ipmitool.1.gz \
20
		share/man/man8/ipmievd.8.gz \
22
		share/man/man8/ipmievd.8.gz \
21
		sbin/ipmievd \
23
		sbin/ipmievd \
22
		share/ipmitool/oem_ibm_sel_map \
24
		share/ipmitool/oem_ibm_sel_map \
25
		share/misc/enterprise-numbers \
23
		${PERIODIC_DIR}/400.status-ipmi
26
		${PERIODIC_DIR}/400.status-ipmi
24
SUB_FILES=	status-ipmi.sh
27
SUB_FILES=	status-ipmi.sh
25
PORTDOCS=	AUTHORS COPYING ChangeLog README
28
PORTDOCS=	AUTHORS COPYING ChangeLog README
Lines 29-34 PERIODIC_DIR= etc/periodic/daily Link Here
29
OPTIONS_DEFINE=	FREEIPMI DOCS
32
OPTIONS_DEFINE=	FREEIPMI DOCS
30
FREEIPMI_DESC=	Enable support for freeipmi
33
FREEIPMI_DESC=	Enable support for freeipmi
31
34
35
WRKSRC=		${WRKDIR}/${PORTNAME}
36
32
CFLAGS+=	-I${OPENSSLINC}
37
CFLAGS+=	-I${OPENSSLINC}
33
LDFLAGS+=	-L${OPENSSLLIB}
38
LDFLAGS+=	-L${OPENSSLLIB}
34
39
Lines 51-62 FREEIPMI_CONFIGURE_ENABLE= intf-free Link Here
51
56
52
.include <bsd.port.options.mk>
57
.include <bsd.port.options.mk>
53
58
54
.if ${OPSYS} == FreeBSD || ${SSL_DEFAULT} == openssl
59
do-extract:
55
EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-src_plugins_lanplus_lanplus__crypt__impl.c
60
	@(cd ${WRKDIR} && ${TAR} -xf ${DISTDIR}/IPMITOOL_${PORTVERSION:S/./_/g}${EXTRACT_SUFX})
56
.endif
61
62
pre-configure:
63
	cd ${WRKSRC} && ./bootstrap
57
64
58
post-install:
65
post-install:
59
	@${MKDIR} ${STAGEDIR}${PREFIX}/${PERIODIC_DIR}
66
	@${MKDIR} ${STAGEDIR}${PREFIX}/${PERIODIC_DIR}
60
	${INSTALL_SCRIPT} ${WRKDIR}/status-ipmi.sh ${STAGEDIR}${PREFIX}/${PERIODIC_DIR}/400.status-ipmi
67
	${INSTALL_SCRIPT} ${WRKDIR}/status-ipmi.sh ${STAGEDIR}${PREFIX}/${PERIODIC_DIR}/400.status-ipmi
68
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/misc
69
	@${INSTALL_DATA} ${DISTDIR}/enterprise-numbers.txt ${STAGEDIR}${PREFIX}/share/misc/enterprise-numbers
61
70
62
.include <bsd.port.mk>
71
.include <bsd.port.mk>
(-)b/sysutils/ipmitool/distinfo (-3 / +5 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1478173088
1
TIMESTAMP = 1725570826
2
SHA256 (ipmitool-1.8.18.tar.bz2) = 0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01
2
SHA256 (IPMITOOL_1_8_19.tar.gz) = ce13c710fea3c728ba03a2a65f2dd45b7b13382b6f57e25594739f2e4f20d010
3
SIZE (ipmitool-1.8.18.tar.bz2) = 795278
3
SIZE (IPMITOOL_1_8_19.tar.gz) = 641027
4
SHA256 (enterprise-numbers.txt) = b1d9523f804c388d7570d69d5d6897cc54954b7612bd36099b7fed521ba20638
5
SIZE (enterprise-numbers.txt) = 4773100
(-)b/sysutils/ipmitool/files/extra-patch-Makefile.in (-6 / +6 lines)
Lines 1-11 Link Here
1
--- Makefile.in.orig	Fri Aug  8 04:33:51 2008
1
--- Makefile.am.orig	2024-09-05 20:15:43 UTC
2
+++ Makefile.in	Sun Aug 10 11:12:54 2008
2
+++ Makefile.am
3
@@ -688,8 +688,6 @@
3
@@ -80,8 +80,6 @@ install-data-local: install-pen-database
4
 	cp control/ipmitool.spec $(distdir)
4
 endif
5
 
5
 
6
 install-data-local:
6
 install-data-local: install-pen-database
7
-	mkdir -p $(DESTDIR)$(DOCDIR)
7
-	mkdir -p $(DESTDIR)$(DOCDIR)
8
-	$(INSTALL_DATA) $(DOCLIST) $(DESTDIR)$(DOCDIR)
8
-	$(INSTALL_DATA) $(DOCLIST) $(DESTDIR)$(DOCDIR)
9
 
9
 
10
 uninstall-local:
10
 uninstall-local: uninstall-pen-database
11
 	-rm -rf $(DESTDIR)$(DOCDIR)
11
 	-rm -rf $(DESTDIR)$(DOCDIR)
(-)a/sysutils/ipmitool/files/extra-patch-src_plugins_lanplus_lanplus__crypt__impl.c (-140 lines)
Removed Link Here
1
--- src/plugins/lanplus/lanplus_crypt_impl.c.orig	2016-05-28 08:20:20 UTC
2
+++ src/plugins/lanplus/lanplus_crypt_impl.c
3
@@ -164,11 +164,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
4
 							uint8_t       * output,
5
 							uint32_t        * bytes_written)
6
 {
7
-	EVP_CIPHER_CTX ctx;
8
-	EVP_CIPHER_CTX_init(&ctx);
9
-	EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
10
-	EVP_CIPHER_CTX_set_padding(&ctx, 0);
11
-	
12
+	EVP_CIPHER_CTX *ctx = NULL;
13
 
14
 	*bytes_written = 0;
15
 
16
@@ -182,6 +178,13 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
17
 		printbuf(input, input_length, "encrypting this data");
18
 	}
19
 
20
+	ctx = EVP_CIPHER_CTX_new();
21
+	if (ctx == NULL) {
22
+		lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
23
+		return;
24
+	}
25
+	EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
26
+	EVP_CIPHER_CTX_set_padding(ctx, 0);
27
 
28
 	/*
29
 	 * The default implementation adds a whole block of padding if the input
30
@@ -191,28 +194,28 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
31
 	assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0);
32
 
33
 
34
-	if(!EVP_EncryptUpdate(&ctx, output, (int *)bytes_written, input, input_length))
35
+	if(!EVP_EncryptUpdate(ctx, output, (int *)bytes_written, input, input_length))
36
 	{
37
 		/* Error */
38
 		*bytes_written = 0;
39
-		return;
40
 	}
41
 	else
42
 	{
43
 		uint32_t tmplen;
44
 
45
-		if(!EVP_EncryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen))
46
+		if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
47
 		{
48
+			/* Error */
49
 			*bytes_written = 0;
50
-			return; /* Error */
51
 		}
52
 		else
53
 		{
54
 			/* Success */
55
 			*bytes_written += tmplen;
56
-			EVP_CIPHER_CTX_cleanup(&ctx);
57
 		}
58
 	}
59
+	/* performs cleanup and free */
60
+	EVP_CIPHER_CTX_free(ctx);
61
 }
62
 
63
 
64
@@ -239,12 +242,8 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
65
 							uint8_t       * output,
66
 							uint32_t        * bytes_written)
67
 {
68
-	EVP_CIPHER_CTX ctx;
69
-	EVP_CIPHER_CTX_init(&ctx);
70
-	EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
71
-	EVP_CIPHER_CTX_set_padding(&ctx, 0);
72
+	EVP_CIPHER_CTX *ctx;
73
 
74
-
75
 	if (verbose >= 5)
76
 	{
77
 		printbuf(iv,  16, "decrypting with this IV");
78
@@ -252,12 +251,19 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
79
 		printbuf(input, input_length, "decrypting this data");
80
 	}
81
 
82
-
83
 	*bytes_written = 0;
84
 
85
 	if (input_length == 0)
86
 		return;
87
 
88
+	ctx = EVP_CIPHER_CTX_new();
89
+	if (ctx == NULL) {
90
+		*bytes_written = 0;
91
+		return;
92
+	}
93
+	EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
94
+	EVP_CIPHER_CTX_set_padding(ctx, 0);
95
+
96
 	/*
97
 	 * The default implementation adds a whole block of padding if the input
98
 	 * data is perfectly aligned.  We would like to keep that from happening.
99
@@ -266,31 +272,29 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
100
 	assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0);
101
 
102
 
103
-	if (!EVP_DecryptUpdate(&ctx, output, (int *)bytes_written, input, input_length))
104
+	if (!EVP_DecryptUpdate(ctx, output, (int *)bytes_written, input, input_length))
105
 	{
106
 		/* Error */
107
 		lprintf(LOG_DEBUG, "ERROR: decrypt update failed");
108
 		*bytes_written = 0;
109
-		return;
110
 	}
111
 	else
112
 	{
113
 		uint32_t tmplen;
114
 
115
-		if (!EVP_DecryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen))
116
+		if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
117
 		{
118
+			/* Error */
119
 			char buffer[1000];
120
 			ERR_error_string(ERR_get_error(), buffer);
121
 			lprintf(LOG_DEBUG, "the ERR error %s", buffer);
122
 			lprintf(LOG_DEBUG, "ERROR: decrypt final failed");
123
 			*bytes_written = 0;
124
-			return; /* Error */
125
 		}
126
 		else
127
 		{
128
 			/* Success */
129
 			*bytes_written += tmplen;
130
-			EVP_CIPHER_CTX_cleanup(&ctx);
131
 		}
132
 	}
133
 
134
@@ -299,4 +303,6 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
135
 		lprintf(LOG_DEBUG, "Decrypted %d encrypted bytes", input_length);
136
 		printbuf(output, *bytes_written, "Decrypted this data");
137
 	}
138
+	/* performs cleanup and free */
139
+	EVP_CIPHER_CTX_free(ctx);
140
 }
(-)b/sysutils/ipmitool/files/patch-configure.ac (+23 lines)
Added Link Here
1
--- configure.ac.orig	2024-09-06 00:08:41 UTC
2
+++ configure.ac
3
@@ -56,19 +56,7 @@ fi
4
 	exec_prefix="$prefix"
5
 fi
6
 
7
-if test "x$WGET" = "x"; then
8
-	if test "x$CURL" = "x"; then
9
-		AC_MSG_WARN([** Neither wget nor curl could be found.])
10
-		AC_MSG_WARN([** IANA PEN database will not be installed by `make install` !])
11
-	else
12
-		DOWNLOAD="$CURL --location --progress-bar"
13
-		AM_CONDITIONAL([DOWNLOAD], [true])
14
-	fi
15
-else
16
-	DOWNLOAD="$WGET -c -nd -O -"
17
-	AM_CONDITIONAL([DOWNLOAD], [true])
18
-fi
19
-
20
+AM_CONDITIONAL([DOWNLOAD], [false])
21
 AC_MSG_WARN([** Download is:])
22
 AC_MSG_WARN($DOWNLOAD)
23
 AC_SUBST(DOWNLOAD, $DOWNLOAD)
(-)a/sysutils/ipmitool/files/patch-include_ipmitool_ipmi__hpmfwupg.h (-11 lines)
Removed Link Here
1
--- include/ipmitool/ipmi_hpmfwupg.h.orig	2016-06-29 18:01:49 UTC
2
+++ include/ipmitool/ipmi_hpmfwupg.h
3
@@ -800,7 +800,7 @@ typedef struct _VERSIONINFO {
4
 	char descString[HPMFWUPG_DESC_STRING_LENGTH + 1];
5
 }VERSIONINFO, *PVERSIONINFO;
6
 
7
-VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
8
+extern VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
9
 
10
 #define TARGET_VER (0x01)
11
 #define ROLLBACK_VER (0x02)
(-)a/sysutils/ipmitool/files/patch-lib_ipmi__cfgp.c (-11 lines)
Removed Link Here
1
--- lib/ipmi_cfgp.c.orig	2016-08-21 06:59:27 UTC
2
+++ lib/ipmi_cfgp.c
3
@@ -30,7 +30,7 @@
4
  * POSSIBILITY OF SUCH DAMAGE.
5
  */
6
 
7
-#include <malloc.h>
8
+#include <stdlib.h>
9
 #include <string.h>
10
 
11
 #include <ipmitool/helper.h>
(-)a/sysutils/ipmitool/files/patch-src_ipmitool.c (-10 lines)
Removed Link Here
1
--- src/ipmitool.c.orig	2016-08-21 06:59:27 UTC
2
+++ src/ipmitool.c
3
@@ -79,6 +79,7 @@ extern int ipmi_set_main(struct ipmi_intf * intf, int 
4
 extern int ipmi_exec_main(struct ipmi_intf * intf, int argc, char ** argv);
5
 extern int ipmi_lan6_main(struct ipmi_intf *intf, int argc, char **argv);
6
 
7
+VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
8
 
9
 int csv_output = 0;
10
 int verbose = 0;

Return to bug 281306