diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2017-07-26 16:11:44 +0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2017-07-29 08:55:57 -0700 |
commit | 688ee39075301fc2a8db2176aaa9a2986b72e13f (patch) | |
tree | da6b3eaea367e3f6ea65f5171024e0ebb531087c | |
parent | a93b35192d2a8ab6779d1fdbb1ec1fa4803e1a05 (diff) | |
download | meta-security-688ee39075301fc2a8db2176aaa9a2986b72e13f.tar.gz |
keynote: add new recipe
KeyNote is a simple and flexible trust-management system
designed to work well for a variety of large- and small-
scale Internet-based applications
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
4 files changed, 126 insertions, 0 deletions
diff --git a/recipes-security/keynote/keynote-2.3/configure-remove-hardcode-path.patch b/recipes-security/keynote/keynote-2.3/configure-remove-hardcode-path.patch new file mode 100644 index 0000000..af3ef42 --- /dev/null +++ b/recipes-security/keynote/keynote-2.3/configure-remove-hardcode-path.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Remove the hardcoded lib and include dirs | ||
2 | |||
3 | Upstream-Status: Inappropriate [cross compile specific] | ||
4 | |||
5 | written by: Amy Fong <amy.fong@windriver.com> | ||
6 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
7 | |||
8 | --- keynote-2.3/configure.in.orig 2010-05-24 04:44:16.000000000 -0700 | ||
9 | +++ keynote-2.3/configure.in 2010-05-24 04:44:55.000000000 -0700 | ||
10 | @@ -21,27 +21,16 @@ | ||
11 | AC_PATH_PROG(ECHO, echo, /bin/echo) | ||
12 | AC_PATH_PROG(SED, sed, /usr/bin/sed) | ||
13 | |||
14 | -dnl Checks for libraries. | ||
15 | -LIBS="-L/usr/lib -L/usr/local/lib -L/usr/ssl/lib -L/usr/openssl/lib\ | ||
16 | - -L/usr/local/ssl/lib -L/usr/local/openssl/lib -L/usr/pkg/lib -L/pkg/lib" | ||
17 | - | ||
18 | AC_CHECK_LIB(m, floor, LIBS="$LIBS -lm") | ||
19 | AC_CHECK_LIB(rsaref, RSAPrivateDecrypt, LIBS="$LIBS -lrsaref") | ||
20 | AC_CHECK_LIB(crypto, i2a_ASN1_STRING, LIBS="$LIBS -lcrypto") | ||
21 | AC_CHECK_LIB(RSAglue, RSA_ref_private_encrypt, LIBS="$LIBS -lRSAglue") | ||
22 | |||
23 | -dnl Checks for header files. | ||
24 | -CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/ssl/include\ | ||
25 | - -I/usr/local/ssl/include -I/usr/openssl/include -I/usr/pkg/include\ | ||
26 | - -I/usr/local/openssl/include -I/pkg/include" | ||
27 | - | ||
28 | AC_HEADER_STDC | ||
29 | AC_HEADER_TIME | ||
30 | AC_CHECK_HEADERS(fcntl.h limits.h unistd.h regex.h sys/time.h io.h) | ||
31 | AC_CHECK_HEADERS(ssl/crypto.h openssl/crypto.h crypto.h memory.h) | ||
32 | |||
33 | -dnl Checks for other files | ||
34 | - | ||
35 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
36 | AC_C_CONST | ||
37 | AC_CHECK_TYPE(u_int, unsigned int) | ||
diff --git a/recipes-security/keynote/keynote-2.3/makefile-add-ldflags.patch b/recipes-security/keynote/keynote-2.3/makefile-add-ldflags.patch new file mode 100644 index 0000000..80d87cf --- /dev/null +++ b/recipes-security/keynote/keynote-2.3/makefile-add-ldflags.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this variable. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
6 | |||
7 | diff --git a/Makefile.in b/Makefile.in | ||
8 | index b216648..42b4827 100644 | ||
9 | --- a/Makefile.in | ||
10 | +++ b/Makefile.in | ||
11 | @@ -35,6 +35,7 @@ MKDIR = @MKDIR@ | ||
12 | SED = @SED@ | ||
13 | ECHO = @ECHO@ | ||
14 | TR = @TR@ | ||
15 | +LDFLAGS = @LDFLAGS@ | ||
16 | |||
17 | TARFLAGS = -cvzf ${DISTFILE} | ||
18 | YACCFLAGS2 = -d -p kv -b z | ||
19 | @@ -83,7 +84,7 @@ $(TARGET): $(OBJS) | ||
20 | $(RANLIB) $(TARGET) | ||
21 | |||
22 | $(TARGET2): $(TARGET) $(OBJS2) | ||
23 | - $(CC) $(CFLAGS) -o $(TARGET2) $(OBJS2) $(LIBS) | ||
24 | + $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET2) $(OBJS2) $(LIBS) | ||
25 | |||
26 | k.tab.c: keynote.y header.h keynote.h assertion.h config.h | ||
27 | $(YACC) $(YACCFLAGS) keynote.y | ||
28 | @@ -131,7 +132,7 @@ $(SSLCERT) $(SSLKEY): | ||
29 | -keyout $(SSLKEY) | ||
30 | |||
31 | test-sample: all $(OBJS3) | ||
32 | - $(CC) $(CFLAGS) -o $(TARGET3) $(OBJS3) $(LIBS) | ||
33 | + $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET3) $(OBJS3) $(LIBS) | ||
34 | |||
35 | test-sig: all $(SSLCERT) $(SSLKEY) | ||
36 | $(SED) -e 's/--.*//' < $(SSLCERT) > $(SSLCERT).1 | ||
diff --git a/recipes-security/keynote/keynote-2.3/run-ptest b/recipes-security/keynote/keynote-2.3/run-ptest new file mode 100644 index 0000000..4dc35c9 --- /dev/null +++ b/recipes-security/keynote/keynote-2.3/run-ptest | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd @PTEST_PATH@ | ||
4 | keynote verify -e testsuite/test-env \ | ||
5 | -r false,maybe,probably,true \ | ||
6 | -k testsuite/auth1 -k testsuite/auth2 \ | ||
7 | -k testsuite/auth3 -k testsuite/auth4 \ | ||
8 | -l testsuite/test-assertion1 \ | ||
9 | -l testsuite/test-assertion2 \ | ||
10 | -l testsuite/test-assertion3 \ | ||
11 | -l testsuite/test-assertion4 \ | ||
12 | -l testsuite/test-assertion5 \ | ||
13 | -l testsuite/test-assertion6 \ | ||
14 | -l testsuite/test-assertion7 \ | ||
15 | && echo "PASS: keynote-ptest" \ | ||
16 | || echo "FAIL: keynote-ptest" | ||
diff --git a/recipes-security/keynote/keynote_2.3.bb b/recipes-security/keynote/keynote_2.3.bb new file mode 100644 index 0000000..b1df880 --- /dev/null +++ b/recipes-security/keynote/keynote_2.3.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Keynote tool and library" | ||
2 | DESCRIPTION = "KeyNote is a simple and flexible trust-management \ | ||
3 | system designed to work well for a variety of large- and small- \ | ||
4 | scale Internet-based applications. \ | ||
5 | " | ||
6 | HOMEPAGE = "http://www.cs.columbia.edu/~angelos/keynote.html" | ||
7 | SECTION = "security" | ||
8 | |||
9 | LICENSE = "ISC" | ||
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3a265095c549c1808686a676f2699c98" | ||
11 | |||
12 | SRC_URI = "http://www.cs.columbia.edu/~angelos/Code/${BPN}.tar.gz \ | ||
13 | file://configure-remove-hardcode-path.patch \ | ||
14 | file://makefile-add-ldflags.patch \ | ||
15 | file://run-ptest \ | ||
16 | " | ||
17 | |||
18 | inherit autotools-brokensep ptest | ||
19 | |||
20 | SRC_URI[md5sum] = "ba58a0297c421dc6aa671e6b753ef695" | ||
21 | SRC_URI[sha256sum] = "62f7a9d57ceb6bcdd47b604b637a7ac8ed337cef0ab02f1fa28b7e61c9b15821" | ||
22 | |||
23 | DEPENDS = "flex openssl" | ||
24 | |||
25 | EXTRA_OEMAKE += "test-sample -j1" | ||
26 | |||
27 | do_install() { | ||
28 | install -D -m 0755 ${S}/keynote ${D}${bindir}/keynote | ||
29 | install -D -m 0644 ${S}/libkeynote.a ${D}${libdir}/libkeynote.a | ||
30 | install -D -m 0644 ${S}/keynote.h ${D}${includedir}/keynote.h | ||
31 | } | ||
32 | |||
33 | do_install_ptest() { | ||
34 | install -D -m 0755 ${S}/sample-app ${D}${PTEST_PATH} | ||
35 | cp -r ${S}/testsuite ${D}${PTEST_PATH} | ||
36 | sed -i 's|@PTEST_PATH@|${PTEST_PATH}|' ${D}${PTEST_PATH}/run-ptest | ||
37 | } | ||