From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebBVD-00049Z-11 for guix-patches@gnu.org; Mon, 15 Jan 2018 15:37:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebBV8-0006dz-U9 for guix-patches@gnu.org; Mon, 15 Jan 2018 15:37:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebBV8-0006dr-PA for guix-patches@gnu.org; Mon, 15 Jan 2018 15:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ebBV8-0007tq-IO for guix-patches@gnu.org; Mon, 15 Jan 2018 15:37:02 -0500 Subject: [bug#28973] [PATCH 1/1] gnu: Add strongswan. Resent-Message-ID: From: Adam Van Ymeren References: <87r2tsbcer.fsf@vany.ca> <555ac710-dd1f-4c74-036a-ad14683e1e5e@tobias.gr> <87a80gb0us.fsf@vany.ca> <87k1ylzy6y.fsf@gnu.org> <87fu7cm5h8.fsf@gnu.org> <87wp0nf17i.fsf@vany.ca> <2cee2d58-f645-487f-eda6-9714eaad5e9f@tobias.gr> Date: Mon, 15 Jan 2018 15:36:05 -0500 In-Reply-To: <2cee2d58-f645-487f-eda6-9714eaad5e9f@tobias.gr> (Tobias Geerinckx-Rice's message of "Sat, 13 Jan 2018 15:00:51 +0100") Message-ID: <87mv1eeu6i.fsf@vany.ca> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28973@debbugs.gnu.org Okay updated patch below. I pulled all the copyright information from the debian package. Added configure arguments to avoid compiling source files which are 4-clause BSD licensed. There is one file who's license I am not sure what to name. src/libstrongswan/plugins/pkcs11.h The text of the license is: "This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved." Debian listed this as "MIT" but I don't believe that is correct. I can't find text of any "MIT" license like this, and it doesn't match the expat license either. So, not really sure what to do there. diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 2c55d6793..c0f66cfcc 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -66,6 +66,7 @@ #:use-module (gnu packages libidn) #:use-module (gnu packages linux) #:use-module (gnu packages lua) + #:use-module (gnu packages multiprecision) #:use-module (gnu packages kerberos) #:use-module (gnu packages ncurses) #:use-module (gnu packages pcre) @@ -1498,6 +1499,60 @@ interface and a programmable text output for scripting.") (license (list license:bsd-2 license:expat)))) +(define-public strongswan + (package + (name "strongswan") + (version "5.6.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://download.strongswan.org/strongswan-" version ".tar.bz2")) + (sha256 + (base32 "0lxbyiary8iapx3ysw40czrmxf983fhfzs5mvz2hk1j1mpc85hp0")) + (patches + (search-patches "strongswan-test_process-disable-all.patch" + "strongswan-test_time_printf_hook-pass-in-utc.patch")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list + ;; Disable bsd-4 licensed plugins + "--disable-des" + "--disable-blowfish"))) + (inputs + `(("curl" ,curl) + ("gmp" ,gmp) + ("libgcrypt" ,libgcrypt) + ("openssl" ,openssl))) + (synopsis "IKEv1/v2 keying daemon") + (description "StrongSwan is an IPsec implementation originally based upon +the FreeS/WAN project. It contains support for IKEv1, IKEv2, MOBIKE, IPv6, +NAT-T and more.") + (home-page "https://strongswan.org/") + (license + (list license:gpl2+ + ;; src/aikgen/* + ;; src/libcharon/plugins/dnscert/* + ;; src/libcharon/plugins/ext_auth/* + ;; src/libcharon/plugins/vici/ruby/* + ;; src/libcharon/plugins/xauth_pam/xauth_pam_listener.[ch] + license:expat + ;; src/inclue/sys/* + license:bsd-3 + ;; src/libstrongswan/plugins/sha3/sha3_keccak.c + license:public-domain + ;; These files are not included in the + ;; build, they are disabled through + ;; options to ./configure + ;; + ;; src/libstrongswan/plugins/blowfish/bf_enc.c + ;; src/libstrongswan/plugins/blowfish/bf_locl.h + ;; src/libstrongswan/plugins/blowfish/bf_pi.h + ;; src/libstrongswan/plugins/blowfish/bf_skey.c + ;; src/libstrongswan/plugins/blowfish/blowfish_crypter.c + ;; src/libstrongswan/plugins/des/des_crypter.c + license:bsd-4)))) + (define-public libnet (package (name "libnet") diff --git a/gnu/packages/patches/strongswan-test_process-disable-all.patch b/gnu/packages/patches/strongswan-test_process-disable-all.patch new file mode 100644 index 000000000..df3d1f3be --- /dev/null +++ b/gnu/packages/patches/strongswan-test_process-disable-all.patch @@ -0,0 +1,48 @@ + +diff -Naur strongswan-5.6.0-original/src/libstrongswan/tests/suites/test_process.c strongswan-5.6.0/src/libstrongswan/tests/suites/test_process.c +--- strongswan-5.6.0-original/src/libstrongswan/tests/suites/test_process.c 2016-04-22 16:01:35.000000000 -0400 ++++ strongswan-5.6.0/src/libstrongswan/tests/suites/test_process.c 2017-10-23 15:10:12.753837342 -0400 +@@ -201,27 +201,27 @@ + + s = suite_create("process"); + +- tc = tcase_create("return values"); +- tcase_add_test(tc, test_retval_true); +- tcase_add_test(tc, test_retval_false); +- suite_add_tcase(s, tc); ++ /* tc = tcase_create("return values"); */ ++ /* tcase_add_test(tc, test_retval_true); */ ++ /* tcase_add_test(tc, test_retval_false); */ ++ /* suite_add_tcase(s, tc); */ + + tc = tcase_create("not found"); + tcase_add_test(tc, test_not_found); + suite_add_tcase(s, tc); + +- tc = tcase_create("echo"); +- tcase_add_test(tc, test_echo); +- tcase_add_test(tc, test_echo_err); +- suite_add_tcase(s, tc); +- +- tc = tcase_create("env"); +- tcase_add_test(tc, test_env); +- suite_add_tcase(s, tc); +- +- tc = tcase_create("shell"); +- tcase_add_test(tc, test_shell); +- suite_add_tcase(s, tc); ++ /* tc = tcase_create("echo"); */ ++ /* tcase_add_test(tc, test_echo); */ ++ /* tcase_add_test(tc, test_echo_err); */ ++ /* suite_add_tcase(s, tc); */ ++ ++ /* tc = tcase_create("env"); */ ++ /* tcase_add_test(tc, test_env); */ ++ /* suite_add_tcase(s, tc); */ ++ ++ /* tc = tcase_create("shell"); */ ++ /* tcase_add_test(tc, test_shell); */ ++ /* suite_add_tcase(s, tc); */ + + return s; + } diff --git a/gnu/packages/patches/strongswan-test_time_printf_hook-pass-in-utc.patch b/gnu/packages/patches/strongswan-test_time_printf_hook-pass-in-utc.patch new file mode 100644 index 000000000..a1d80cb3a --- /dev/null +++ b/gnu/packages/patches/strongswan-test_time_printf_hook-pass-in-utc.patch @@ -0,0 +1,14 @@ +diff -Naur strongswan-5.6.0-original/src/libstrongswan/tests/suites/test_utils.c strongswan-5.6.0/src/libstrongswan/tests/suites/test_utils.c +--- strongswan-5.6.0-original/src/libstrongswan/tests/suites/test_utils.c 2017-10-23 14:50:49.744343308 -0400 ++++ strongswan-5.6.0/src/libstrongswan/tests/suites/test_utils.c 2017-10-23 14:51:07.911880335 -0400 +@@ -750,9 +750,9 @@ + } time_data[] = { + {UNDEFINED_TIME, FALSE, "--- -- --:--:-- ----"}, + {UNDEFINED_TIME, TRUE , "--- -- --:--:-- UTC ----"}, +- {1, FALSE, "Jan 01 01:00:01 1970"}, ++ {1, FALSE, "Jan 01 00:00:01 1970"}, + {1, TRUE , "Jan 01 00:00:01 UTC 1970"}, +- {1341150196, FALSE, "Jul 01 15:43:16 2012"}, ++ {1341150196, FALSE, "Jul 01 13:43:16 2012"}, + {1341150196, TRUE , "Jul 01 13:43:16 UTC 2012"}, + };