Initial Commit
- initial default booting image
This commit is contained in:
57
package/sscep/0001-Fix-getopt-linking-error.patch
Normal file
57
package/sscep/0001-Fix-getopt-linking-error.patch
Normal file
@@ -0,0 +1,57 @@
|
||||
From 65561b53344b834877e6b63320066a1e26038a3c Mon Sep 17 00:00:00 2001
|
||||
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
||||
Date: Fri, 9 Dec 2022 18:18:27 +0100
|
||||
Subject: [PATCH] Fix getopt linking error
|
||||
|
||||
The buildroot project, to which the sscep application was added, has
|
||||
configurations that raise the following linking error:
|
||||
buildroot/output/host/lib/gcc/arc-buildroot-linux-uclibc/11.3.0/../../../../arc-buildroot-linux-uclibc/bin/ld: buildroot/output/host/bin/../arc-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(getopt.os):(.data+0x8): multiple definition of `optind'; src/getopt.o:(.data+0x0): first defined here
|
||||
buildroot/output/host/lib/gcc/arc-buildroot-linux-uclibc/11.3.0/../../../../arc-buildroot-linux-uclibc/bin/ld: buildroot/output/host/bin/../arc-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(getopt.os): in function `__GI_getopt':
|
||||
getopt.c:(.text+0x5a4): multiple definition of `getopt'; src/getopt.o:getopt.c:(.text+0x0): first defined here
|
||||
buildroot/output/host/lib/gcc/arc-buildroot-linux-uclibc/11.3.0/../../../../arc-buildroot-linux-uclibc/bin/ld: buildroot/output/host/bin/../arc-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(getopt.os): in function `getopt_long':
|
||||
getopt.c:(.text+0x5b0): multiple definition of `getopt_long'; src/getopt.o:getopt.c:(.text+0x128): first defined here
|
||||
collect2: error: ld returned 1 exit status
|
||||
make[2]: *** [Makefile:507: sscep] Error 1
|
||||
make[1]: *** [package/pkg-generic.mk:293: buildroot/output/build/sscep-0.10.0/.stamp_built] Error 2
|
||||
|
||||
The patch re-added a check that commit
|
||||
81f56f635259b9 ("Replaced GNU getopt by a BSD licensed alternative")
|
||||
removed.
|
||||
|
||||
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
||||
[yann.morin.1998@free.fr: make that an actual backport]
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
---
|
||||
src/getopt.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/getopt.c b/src/getopt.c
|
||||
index eae36a6..0109406 100644
|
||||
--- a/src/getopt.c
|
||||
+++ b/src/getopt.c
|
||||
@@ -31,6 +31,16 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
+#define GETOPT_INTERFACE_VERSION 2
|
||||
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
|
||||
+# include <gnu-versions.h>
|
||||
+# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
|
||||
+# define ELIDE_CODE
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+#ifndef ELIDE_CODE
|
||||
+
|
||||
char* optarg;
|
||||
int optopt;
|
||||
/* The variable optind [...] shall be initialized to 1 by the system. */
|
||||
@@ -226,3 +236,5 @@ int getopt_long(int argc, char* const argv[], const char* optstring,
|
||||
++optind;
|
||||
return retval;
|
||||
}
|
||||
+
|
||||
+#endif /* Not ELIDE_CODE. */
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From db7fab775d03438b4cfce6b49fab2d3176ecb1d3 Mon Sep 17 00:00:00 2001
|
||||
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
||||
Date: Sat, 11 May 2024 19:38:01 +0200
|
||||
Subject: [PATCH] Fix getopt linking error with musl-libc
|
||||
|
||||
The buildroot project, to which the sscep application was added, has
|
||||
configurations that raise the following linking error:
|
||||
buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: buildroot/output/host/i586-buildroot-linux-musl/sysroot/lib/libc.a(getopt.o): in function `getopt':
|
||||
getopt.c:(.text.getopt+0x0): multiple definition of `getopt'; src/getopt.o:getopt.c:(.text+0x0): first defined here
|
||||
buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: buildroot/output/host/i586-buildroot-linux-musl/sysroot/lib/libc.a(getopt.o):(.data.optind+0x0): multiple definition of `optind'; src/getopt.o:(.data+0x0): first defined here
|
||||
collect2: error: ld returned 1 exit status
|
||||
|
||||
The commit 65561b53344b8 ("Fix getopt linking error") actually fixed the
|
||||
linking error only for uclibc, but not for musl-libc. The patch fixes
|
||||
the error for both uclibc and musl-libc.
|
||||
|
||||
Link: http://autobuild.buildroot.net/results/d5b1b4e5e9d9c8eca5e75c345db4d1f3f0cd84ed/build-end.log
|
||||
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
||||
Upstream: https://github.com/certnanny/sscep/pull/181
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
src/getopt.c | 12 ++----------
|
||||
2 files changed, 3 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9f3ee15686a2..7a968d97dcaa 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -34,7 +34,7 @@ AC_TYPE_SIZE_T
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_REALLOC
|
||||
-AC_CHECK_FUNCS([alarm gethostbyname memset socket strchr strdup strstr])
|
||||
+AC_CHECK_FUNCS([alarm gethostbyname getopt memset socket strchr strdup strstr])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_SUBST([LIBTOOL_DEPS])
|
||||
diff --git a/src/getopt.c b/src/getopt.c
|
||||
index 0109406ba4ac..8793052845ed 100644
|
||||
--- a/src/getopt.c
|
||||
+++ b/src/getopt.c
|
||||
@@ -31,15 +31,7 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
-#define GETOPT_INTERFACE_VERSION 2
|
||||
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
|
||||
-# include <gnu-versions.h>
|
||||
-# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
|
||||
-# define ELIDE_CODE
|
||||
-# endif
|
||||
-#endif
|
||||
-
|
||||
-#ifndef ELIDE_CODE
|
||||
+#ifndef HAVE_GETOPT
|
||||
|
||||
char* optarg;
|
||||
int optopt;
|
||||
@@ -237,4 +229,4 @@ int getopt_long(int argc, char* const argv[], const char* optstring,
|
||||
return retval;
|
||||
}
|
||||
|
||||
-#endif /* Not ELIDE_CODE. */
|
||||
+#endif /* HAVE_GETOPT */
|
||||
--
|
||||
2.43.0
|
||||
|
||||
10
package/sscep/Config.in
Normal file
10
package/sscep/Config.in
Normal file
@@ -0,0 +1,10 @@
|
||||
config BR2_PACKAGE_SSCEP
|
||||
bool "sscep"
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH if BR2_PACKAGE_LIBOPENSSL
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
SSCEP is a client-only implementation of the SCEP
|
||||
(Cisco System's Simple Certificate Enrollment Protocol).
|
||||
|
||||
https://github.com/certnanny/sscep
|
||||
3
package/sscep/sscep.hash
Normal file
3
package/sscep/sscep.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# locally computed
|
||||
sha256 489cc8e093986776eb3f15082bf766778f707176f3cd604bf0ef1008da06b8e5 sscep-0.10.0.tar.gz
|
||||
sha256 e1328c292102a22c10e8dcfbfda33740f603767c73f8c5b5189c5513eb6b4dea COPYING
|
||||
14
package/sscep/sscep.mk
Normal file
14
package/sscep/sscep.mk
Normal file
@@ -0,0 +1,14 @@
|
||||
################################################################################
|
||||
#
|
||||
# sscep
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SSCEP_VERSION = 0.10.0
|
||||
SSCEP_SITE = $(call github,certnanny,sscep,v$(SSCEP_VERSION))
|
||||
SSCEP_LICENSE = BSD-2-Clause, OpenSSL, OpenOSP
|
||||
SSCEP_LICENSE_FILES = COPYING
|
||||
SSCEP_AUTORECONF = YES
|
||||
SSCEP_DEPENDENCIES = host-pkgconf openssl
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user