mirror of
https://github.com/xcat2/xcat-dep.git
synced 2026-09-22 00:49:31 +00:00
fix: Add missing files
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
Description: Rename 'true' variable to 'reuse' to fix GCC 15 / C23 build error
|
||||
In C23 (and GCC 15 defaults), 'true' is a keyword and cannot be used as a
|
||||
variable name. Rename the setsockopt flag variable from 'true' to 'reuse'
|
||||
in both group.c and master.c.
|
||||
Author: Daniel Hilst <danielhilst@gmail.com>
|
||||
---
|
||||
diff -ruN a/conserver/group.c b/conserver/group.c
|
||||
--- a/conserver/group.c
|
||||
+++ b/conserver/group.c
|
||||
@@ -5036,7 +5036,7 @@
|
||||
struct sockaddr_in lstn_port;
|
||||
# endif
|
||||
# if HAVE_SETSOCKOPT
|
||||
- int true = 1;
|
||||
+ int reuse = 1;
|
||||
# endif
|
||||
unsigned short portInc = 0;
|
||||
#else
|
||||
@@ -5063,8 +5063,8 @@
|
||||
}
|
||||
# if HAVE_SETSOCKOPT
|
||||
if (setsockopt
|
||||
- (sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true,
|
||||
- sizeof(true)) < 0) {
|
||||
+ (sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&reuse,
|
||||
+ sizeof(reuse)) < 0) {
|
||||
Error("Spawn(): setsockopt(%u,SO_REUSEADDR): %s", sfd,
|
||||
strerror(errno));
|
||||
return;
|
||||
@@ -5195,7 +5195,7 @@
|
||||
}
|
||||
# if HAVE_SETSOCKOPT
|
||||
if (setsockopt
|
||||
- (sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true, sizeof(true)) < 0) {
|
||||
+ (sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&reuse, sizeof(reuse)) < 0) {
|
||||
Error("Spawn(): setsockopt(%u,SO_REUSEADDR): %s", sfd,
|
||||
strerror(errno));
|
||||
Bye(EX_OSERR);
|
||||
diff -ruN a/conserver/master.c b/conserver/master.c
|
||||
--- a/conserver/master.c
|
||||
+++ b/conserver/master.c
|
||||
@@ -687,7 +687,7 @@
|
||||
struct sockaddr_in master_port;
|
||||
# endif
|
||||
# if HAVE_SETSOCKOPT
|
||||
- int true = 1;
|
||||
+ int reuse = 1;
|
||||
# endif
|
||||
#else
|
||||
struct sockaddr_un master_port;
|
||||
@@ -747,8 +747,8 @@
|
||||
|
||||
# if HAVE_SETSOCKOPT
|
||||
if (setsockopt
|
||||
- (msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true,
|
||||
- sizeof(true)) < 0)
|
||||
+ (msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&reuse,
|
||||
+ sizeof(reuse)) < 0)
|
||||
goto fail;
|
||||
# endif
|
||||
if (!SetFlags(msfd, O_NONBLOCK, 0))
|
||||
@@ -818,8 +818,8 @@
|
||||
}
|
||||
# if HAVE_SETSOCKOPT
|
||||
if (setsockopt
|
||||
- (msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true,
|
||||
- sizeof(true)) < 0) {
|
||||
+ (msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&reuse,
|
||||
+ sizeof(reuse)) < 0) {
|
||||
Error("Master(): setsockopt(%u,SO_REUSEADDR): %s", msfd,
|
||||
strerror(errno));
|
||||
return;
|
||||
@@ -0,0 +1,106 @@
|
||||
--- a/conserver/main.c 2026-05-11 12:58:13
|
||||
+++ b/conserver/main.c 2026-05-11 13:01:10
|
||||
@@ -112,12 +112,25 @@
|
||||
|
||||
if ((dh = DH_new()) == NULL)
|
||||
return (NULL);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L /* OpenSSL >= 1.1.0 */
|
||||
+ {
|
||||
+ BIGNUM *p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL);
|
||||
+ BIGNUM *g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL);
|
||||
+ if (p == NULL || g == NULL || !DH_set0_pqg(dh, p, NULL, g)) {
|
||||
+ BN_free(p);
|
||||
+ BN_free(g);
|
||||
+ DH_free(dh);
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL);
|
||||
dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL);
|
||||
if ((dh->p == NULL) || (dh->g == NULL)) {
|
||||
DH_free(dh);
|
||||
return (NULL);
|
||||
}
|
||||
+#endif
|
||||
return (dh);
|
||||
}
|
||||
|
||||
@@ -146,12 +159,25 @@
|
||||
|
||||
if ((dh = DH_new()) == NULL)
|
||||
return (NULL);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L /* OpenSSL >= 1.1.0 */
|
||||
+ {
|
||||
+ BIGNUM *p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
|
||||
+ BIGNUM *g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
|
||||
+ if (p == NULL || g == NULL || !DH_set0_pqg(dh, p, NULL, g)) {
|
||||
+ BN_free(p);
|
||||
+ BN_free(g);
|
||||
+ DH_free(dh);
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
|
||||
dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
|
||||
if ((dh->p == NULL) || (dh->g == NULL)) {
|
||||
DH_free(dh);
|
||||
return (NULL);
|
||||
}
|
||||
+#endif
|
||||
return (dh);
|
||||
}
|
||||
|
||||
@@ -193,12 +219,25 @@
|
||||
|
||||
if ((dh = DH_new()) == NULL)
|
||||
return (NULL);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L /* OpenSSL >= 1.1.0 */
|
||||
+ {
|
||||
+ BIGNUM *p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
|
||||
+ BIGNUM *g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
|
||||
+ if (p == NULL || g == NULL || !DH_set0_pqg(dh, p, NULL, g)) {
|
||||
+ BN_free(p);
|
||||
+ BN_free(g);
|
||||
+ DH_free(dh);
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
|
||||
dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
|
||||
if ((dh->p == NULL) || (dh->g == NULL)) {
|
||||
DH_free(dh);
|
||||
return (NULL);
|
||||
}
|
||||
+#endif
|
||||
return (dh);
|
||||
}
|
||||
|
||||
@@ -266,12 +305,25 @@
|
||||
|
||||
if ((dh = DH_new()) == NULL)
|
||||
return (NULL);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L /* OpenSSL >= 1.1.0 */
|
||||
+ {
|
||||
+ BIGNUM *p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), NULL);
|
||||
+ BIGNUM *g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), NULL);
|
||||
+ if (p == NULL || g == NULL || !DH_set0_pqg(dh, p, NULL, g)) {
|
||||
+ BN_free(p);
|
||||
+ BN_free(g);
|
||||
+ DH_free(dh);
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
dh->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), NULL);
|
||||
dh->g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), NULL);
|
||||
if ((dh->p == NULL) || (dh->g == NULL)) {
|
||||
DH_free(dh);
|
||||
return (NULL);
|
||||
}
|
||||
+#endif
|
||||
return (dh);
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
initscript_8.2.1.patch
|
||||
initscript_8.2.1.patch
|
||||
openssl3-dh-opaque.patch
|
||||
fix-true-keyword-gcc15.patch
|
||||
@@ -1,3 +1,9 @@
|
||||
grub2-xcat (2.12-1) unstable; urgency=low
|
||||
|
||||
* Bump version to satisfy xcat-server dependency (>= 2.02)
|
||||
|
||||
-- XCAT <xcat-user@lists.sourceforge.net> Wed, 21 May 2025 12:00:00 +0000
|
||||
|
||||
grub2-xcat (1.0-2) unstable; urgency=low
|
||||
|
||||
* update core.elf to support ppc64le
|
||||
|
||||
Reference in New Issue
Block a user