From 3cf7c3ef441822c889356fd1812ebf2944a59851 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 25 Aug 2020 10:45:55 +0100 Subject: gentoo resync : 25.08.2020 --- net-dialup/openl2tp/Manifest | 7 +- net-dialup/openl2tp/files/openl2tp-1.8-musl.patch | 55 +++++++++ .../openl2tp/files/openl2tp-1.8-native-tc.patch | 23 ++++ .../files/openl2tp-1.8-parallelbuild.patch | 21 +++- .../openl2tp/files/openl2tp-1.8-strings.patch | 114 ++++++++++++++++++ net-dialup/openl2tp/openl2tp-1.8-r1.ebuild | 126 -------------------- net-dialup/openl2tp/openl2tp-1.8-r2.ebuild | 129 +++++++++++++++++++++ 7 files changed, 341 insertions(+), 134 deletions(-) create mode 100644 net-dialup/openl2tp/files/openl2tp-1.8-musl.patch create mode 100644 net-dialup/openl2tp/files/openl2tp-1.8-native-tc.patch create mode 100644 net-dialup/openl2tp/files/openl2tp-1.8-strings.patch delete mode 100644 net-dialup/openl2tp/openl2tp-1.8-r1.ebuild create mode 100644 net-dialup/openl2tp/openl2tp-1.8-r2.ebuild (limited to 'net-dialup/openl2tp') diff --git a/net-dialup/openl2tp/Manifest b/net-dialup/openl2tp/Manifest index e32e325d708e..98f020a25678 100644 --- a/net-dialup/openl2tp/Manifest +++ b/net-dialup/openl2tp/Manifest @@ -8,15 +8,18 @@ AUX openl2tp-1.8-configure-Makefile.patch 1608 BLAKE2B 6c2a21be9aaabc6e60216c749 AUX openl2tp-1.8-l2tpconfig.patch 621 BLAKE2B 31e224b78b7727c71657c3c35160e36b213cd9ae8067d4f0248c2ace649c6747d3f1a88cef43dc40daa3bba493e2a7e452fd147c6a581595214abc33b2e2cb44 SHA512 0832c38fc55169dc86e1267ef693852d93ab4cd551e4b4155d66433db551fa22ce2d044505157bd9bb5ad55b1ec357f9cd948af370d608276cbba5cdb96b97b3 AUX openl2tp-1.8-ldflags.patch 2620 BLAKE2B bbde9a44adfb6b9ca905c88e2c0867541823b8b5adb61286562640a8c6ec9fb1b8fe60242a0a4be561a3a48743ff370115e357f23b4ac6a7bd78dc8e7ffb49ac SHA512 3c7f192c4553cc9ff68b724e9e2121452ed24c6eeb0b23ecd9a3011defc2b0b6d2f26babfdb010464ab60db2094135deed6e44759cb2fe2833c990769a9f900b AUX openl2tp-1.8-man.patch 1345 BLAKE2B 21db3ec18c62e44090a19e7e2c7f64987ce17abf331ed3a01f05c1ea3dde4e265469e139bb2f67bf0ef6cae4923fc669d8366835c99e753566bab267f55f18a5 SHA512 5e4cd2efc1b4edf479446a9f865f987542b38c96396fe4b107fdf3423b099818a1a48d84084606650d5bd4cf7ba90ae43f09114f98e35ee41f4d9df139a39e42 +AUX openl2tp-1.8-musl.patch 1384 BLAKE2B bfeaa27eece3ddf87eea990e0c699186b5fd6d249617c2d152274e237f87a4d9d1fb5d01983e99d75957d94ecdc94c109c501a6d1cf8a5a5183db48d9ef0b04c SHA512 8dc0c5afd4efbdce243c4826cb52578d079f62681bc41f2a2f7ad61834992b384c30c1c5b2cf12e4917fdf28f028cc788480ec4d587e2f7398ad4adbca5bb4ad +AUX openl2tp-1.8-native-tc.patch 657 BLAKE2B 2abaed246922347424e2c7ce8809f2ccb817303c5a83a9ea210b8f543e0ab62a2434f0997c0c0accc5ffb92b1f59734b5b95cdd7f72da57b82e39e5c86d0e9cd SHA512 da32092362799e504b991170b757200bd5e81aa356e2ccdfb2123e748c074c111344f43fce33138bb450d9972a3385a42f419e482dedf656e47adfa38a3ccf12 AUX openl2tp-1.8-optionsfile.patch 10143 BLAKE2B f1044ae2c833e7775b1152d1acd00ea44d57060897827a915dabf2c172b151a8b46d93fce75b10b8844d189ca6514b0bdbf037011edcc2c56433835fed7e844b SHA512 2a0612a6effc0a82323c904c7b51e8eabf96fedbef6024e6d6a5e02daa945c20c95540b6420443854e35ad62acc5d359bfee6e6280f68d51e2c328a34807027f -AUX openl2tp-1.8-parallelbuild.patch 935 BLAKE2B e1a3aaeea2d53bac083518c6f3b230f9eb4523db34a0473ddd16602edf74b0d31e381928b456c751e87028cc42d4d2d02b8b5851fd5955c737e4db13cad13226 SHA512 5741e1db53c6d41cc87205283f7048f83a6873b56a749a041fc4268a67ed344e48b417be3bbd978dfc14f67c0dd9fc69291844efddb9208b7554974b7f0133b7 +AUX openl2tp-1.8-parallelbuild.patch 1310 BLAKE2B e379f046111662f21fca21eaa04279413f49d9d806438d38b9ce7b964beba2174caffbc0ae75353df6c4c5e2ffff75cf5c4dc67b409e39762b5eeecc06976330 SHA512 a67e0a0d3fcdd8c4a2ca1a37e88b6eba8f81834b4ce3e0a5f92546ec033f158ca811e9cc5f0396ccf6142df4c4b15679cf53b5b306a3eb3c2389d929d32148a5 AUX openl2tp-1.8-pppd-2.patch 485 BLAKE2B 587a655b884b92bff9915c8f5d3a38801f843363d0585930192ff0daafff68b2d2855ea19ae7bcdeb92fff8dc191dd22fb945576a44e1ea9ce375860dc68262e SHA512 5c7007a4920d24f9fdf39dd36e3d435708793954c3dbb897969664a03bbd6bf220319a9c794180f91d42130ae177ff18d227a77eaf40a357cfb0d1b81459db47 AUX openl2tp-1.8-setkey.patch 483 BLAKE2B be8d6d3911426494bbfdc5949762168cc3b0a486e23364a13eb7138e3668d5c533736618109b64f3631d90518745145378d5f749145e6ee209036223e7f44f6e SHA512 da1935e969d8100230434cf6393696563220ecf3785712e1ceb0922e34034624e5a9999671721e530ad74368fab9d89d403677b417934e379fedd5060463e3ab +AUX openl2tp-1.8-strings.patch 3658 BLAKE2B dfb8ebc747b68ea1bde4885fb82b0bef91071d16587d9acb436befe7469a3f0f53812ab1a3d4966c00fd802b111638c186d2636a9a65cef4cc02a1bb583f43a0 SHA512 7d4fd950ad738959ce9190a48f4b3cfa0be4b315ffa080bd437add78fcfba3c7be38a8ee6e8389419fd0def2dff1467f8bdbbc24dccc0a7af88eed737f726441 AUX openl2tp-1.8-tirpc.patch 2017 BLAKE2B 981a394dda194b4359e9f39148cc8b210cc3e90c826a17af87910b760ff3070d12b46ad865be72dd2fc9c1dc9fccfa543192b6c0924f837322b6e5259c549a60 SHA512 2325e4d2bb43975c244f0e77c607a2864746242cd8fc1ff0ff9b6cf9af3ef93d256b934e1a3465650658e8793e77cb32f1dab734dfb6d45535cb821cf60bec82 AUX openl2tp-1.8-unused-var.patch 605 BLAKE2B 886f407aebd5b2479068b26550f7c2377baa6d44a8a7187b153a96ba684f3f05d396fb25cff5371487b63b0fa01c12e63878ce419d2acfa861378323db04d117 SHA512 2ac1f04004a06e6a97224a04395a72cc2699e398efaafbdd74773819dc148d8d314ac3e4865722886db53d70eff1a4f021e4a39fb3e5d18011ef1b473ded9ac9 AUX openl2tp-1.8-werror.patch 1466 BLAKE2B 44003bec2469c04dfa80ee4a87080723f57bb443832eb09fe5f27b8bf3d7e82d3f33f786773a7fb376a7390dc3a60720fcb4567ccc98f36c2bf6a7261e168be8 SHA512 99967159458f9ee806b72372142a5895793daad46b4aa9a6f0876eafc9c89b2016d72883c6c77adee6cebd4126fb9ba463b2b8bf7119456a4ea72d86374fb10d AUX openl2tpd.confd 717 BLAKE2B 7c92d47880c57c39deee6eebe458f0a1367fff616af3377145a0938e073068630f76245299b4c6886b34c06a975d41996adf05c6c145194e6af00abc66a317a0 SHA512 b120c80c352cfb810f808722a5fbbc63519e07b72f16a1b42f4e577da9a4607b24e8ce82bf25ccd90c69ad640ad929be89c7e1e3fb429c61088ce93ddab2ceb4 AUX openl2tpd.initd 1788 BLAKE2B cccc7e9f907ccf5abe5dc84d0e3228b8e5a542e6f864325cf5eb7fd2d84e50e0d5cf86ec276a59bef7bf576d52b4b9c00bb34c1ec706dd6ee719030f64ba55e0 SHA512 8f84e847eb9b3f7d6c07bef1d6e8a051a0ded8ec6c4d21be26c55eacdb3d12fce60dce7b4c94d4e9358c4d724c868bf84c2a6262772f8fdfb3e54931cee0ce10 DIST openl2tp-1.8.tar.gz 491160 BLAKE2B 70c78cd4d7daba600f9a9115025acb38b82adc0a04bbf6e9d46daebf2c7c37cc8fe9df6fa7157a05525e998063f5200a85893bb5b33dbe3e66ca7b6a4d2c7972 SHA512 360f9032b2bb104cfaa41a18fc37005510ab604b31a34a3412563e0de3e8dad946ca61840cd41a19f0202d92d758d812f45479659c9fa4d4e9e13dd226f03fda -EBUILD openl2tp-1.8-r1.ebuild 3370 BLAKE2B c9f3cf228938e4a836fd3a0cbd906450cf3070b7d78dfda858c795f714a9bd80bc974944bfb693d51a2e48a73f35a1dcef112a1665400247f4b02b4abb41f247 SHA512 9d708627a2892163c9ecc56182fab61db5cab098b4f5a010dd41d671a14fa6eacd87d55bc91713c8fb67dc31f70d2a652c9a0a39218866f10fa48d32185be0ed +EBUILD openl2tp-1.8-r2.ebuild 3486 BLAKE2B becd16fc76b639d6fb62b3103951c1bd21d366e03f8074a552ed00c820d5843f9a5750265c773cce018b80a68f7601ca9d5a129f3ddccd76a5c2a78e74d06c0c SHA512 9bc441671c71a407b55551680018f48b7b8d4b5aeb5e94b1657df591ebc2a84d31e653638ceccc17b4f40b3577fe4610b2c61664504e0ed41998f6f7ffde7eaf MISC metadata.xml 669 BLAKE2B 98bd7762042c36ccfc4219807014ec3c6a9c65827820d174ae87eeb16a5ae64212a68fea18ebd46c2ff7ea3b4996aa63b383ab14dbd4009e491b76437b234e67 SHA512 1d4880fea1badcdbbdf6e7259e968907c4d74ece0c309e8bbd556763e377b6bda56d1d2e1de67177c9867de1fcb36e294723d02b2c6ee22c7cdcb99973b6b8e4 diff --git a/net-dialup/openl2tp/files/openl2tp-1.8-musl.patch b/net-dialup/openl2tp/files/openl2tp-1.8-musl.patch new file mode 100644 index 000000000000..437f96f4d6fc --- /dev/null +++ b/net-dialup/openl2tp/files/openl2tp-1.8-musl.patch @@ -0,0 +1,55 @@ +diff -u openl2tp-1.8/cli/cli_readline.c openl2tp-1.8/cli/cli_readline.c +--- openl2tp-1.8/cli/cli_readline.c 2020-07-12 11:16:13.583798412 +0300 ++++ openl2tp-1.8/cli/cli_readline.c 2020-07-12 11:35:50.872615494 +0300 +@@ -18,12 +18,15 @@ + * + *****************************************************************************/ + ++#define _GNU_SOURCE ++ + #include + #include + #include + #include + #include +-#include ++#include ++#include + #include + + #include +@@ -633,7 +636,7 @@ + + static int cli_rl_install_signal_handlers(void) + { +- __sighandler_t handler; ++ sighandler_t handler; + + rl_catch_signals = 0; + rl_clear_signals(); +unchanged: +--- openl2tp-1.8.orig/usl/usl_pid.c 2008-05-08 00:44:20.000000000 +0400 ++++ openl2tp-1.8/usl/usl_pid.c 2020-07-12 10:29:47.047052036 +0300 +@@ -26,6 +26,10 @@ + + #include "usl.h" + ++#ifndef WAIT_ANY ++#define WAIT_ANY (-1) ++#endif ++ + /* We maintain a list of child process pids and functions to call when + * they exit. + */ +unchanged: +--- openl2tp-1.8.orig/l2tp_main.c 2010-02-12 22:09:23.000000000 +0300 ++++ openl2tp-1.8/l2tp_main.c 2020-07-12 10:58:59.343655159 +0300 +@@ -42,7 +42,7 @@ + #include + #include + +-#include ++#include + + #include "usl.h" + #include "l2tp_private.h" diff --git a/net-dialup/openl2tp/files/openl2tp-1.8-native-tc.patch b/net-dialup/openl2tp/files/openl2tp-1.8-native-tc.patch new file mode 100644 index 000000000000..9e5ff3411af5 --- /dev/null +++ b/net-dialup/openl2tp/files/openl2tp-1.8-native-tc.patch @@ -0,0 +1,23 @@ +--- openl2tp-1.8/Makefile.orig 2020-07-11 10:04:54.485853377 +0300 ++++ openl2tp-1.8/Makefile 2020-07-11 10:21:10.616327547 +0300 +@@ -69,13 +69,13 @@ + + # END CONFIGURABLE SETTINGS + +-AS = $(CROSS_COMPILE)as +-LD = $(CROSS_COMPILE)ld +-CC = $(CROSS_COMPILE)gcc +-AR = $(CROSS_COMPILE)ar +-NM = $(CROSS_COMPILE)nm +-STRIP = $(CROSS_COMPILE)strip +-INSTALL = $(CROSS_COMPILE)install ++AS ?= $(CROSS_COMPILE)as ++LD ?= $(CROSS_COMPILE)ld ++CC ?= $(CROSS_COMPILE)gcc ++AR ?= $(CROSS_COMPILE)ar ++NM ?= $(CROSS_COMPILE)nm ++STRIP ?= $(CROSS_COMPILE)strip ++INSTALL ?= $(CROSS_COMPILE)install + + ifneq ($(READLINE_DIR),) + READLINE_LDFLAGS= -L $(READLINE_DIR)/lib diff --git a/net-dialup/openl2tp/files/openl2tp-1.8-parallelbuild.patch b/net-dialup/openl2tp/files/openl2tp-1.8-parallelbuild.patch index fb6b9f96b354..8851f321f27a 100644 --- a/net-dialup/openl2tp/files/openl2tp-1.8-parallelbuild.patch +++ b/net-dialup/openl2tp/files/openl2tp-1.8-parallelbuild.patch @@ -1,6 +1,5 @@ -diff -rau openl2tp-1.8.o/Makefile openl2tp-1.8/Makefile ---- openl2tp-1.8.o/Makefile 2011-06-03 18:21:09.000000000 +0200 -+++ openl2tp-1.8/Makefile 2011-06-03 18:54:43.000000000 +0200 +--- openl2tp-1.8/Makefile.orig 2020-07-12 12:53:31.484055262 +0300 ++++ openl2tp-1.8/Makefile 2020-07-12 12:56:45.783822669 +0300 @@ -197,7 +197,7 @@ .PHONY: $(SUBDIRS:%=subdir-%) @@ -19,9 +18,19 @@ diff -rau openl2tp-1.8.o/Makefile openl2tp-1.8/Makefile $(CC) -I. -MMD -w $(CFLAGS.optimize) -c -DYY_NO_UNPUT $< l2tp_config_parse.o: l2tp_config_parse.c l2tp_config_parse.h -@@ -271,7 +271,7 @@ - l2tpconfig: $(L2TPCONFIG_SRCS.o) - $(CC) $(LDFLAGS) -o $@ $^ $(LDFLAGS.l2tpconfig) +@@ -265,13 +265,13 @@ + @for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) $@; done + etags $(wildcard *.c) $(wildcard *.h) + +-openl2tpd: $(L2TPD_SRCS.o) +- $(CC) $(LDFLAGS) -o $@ $^ $(LDFLAGS.l2tpd) ++openl2tpd: generated-files $(SUBDIRS:%=subdir-%) $(L2TPD_SRCS.o) ++ $(CC) $(LDFLAGS) -o $@ $(L2TPD_SRCS.o) $(LDFLAGS.l2tpd) + +-l2tpconfig: $(L2TPCONFIG_SRCS.o) +- $(CC) $(LDFLAGS) -o $@ $^ $(LDFLAGS.l2tpconfig) ++l2tpconfig: openl2tpd $(L2TPCONFIG_SRCS.o) ++ $(CC) $(LDFLAGS) -o $@ $(L2TPCONFIG_SRCS.o) $(LDFLAGS.l2tpconfig) -%.o: %.c +%.o: %.c generated-files diff --git a/net-dialup/openl2tp/files/openl2tp-1.8-strings.patch b/net-dialup/openl2tp/files/openl2tp-1.8-strings.patch new file mode 100644 index 000000000000..16b7beffb212 --- /dev/null +++ b/net-dialup/openl2tp/files/openl2tp-1.8-strings.patch @@ -0,0 +1,114 @@ +diff '--color=auto' -Naurd openl2tp-1.8.orig/l2tp_plugin.c openl2tp-1.8/l2tp_plugin.c +--- openl2tp-1.8.orig/l2tp_plugin.c 2008-09-25 19:00:55.000000000 +0400 ++++ openl2tp-1.8/l2tp_plugin.c 2020-07-12 11:55:23.292225206 +0300 +@@ -85,16 +85,20 @@ + + if (strchr(name, '/') == 0) { + const char *base = L2TP_PLUGIN_DIR; +- int len = strlen(base) + strlen(name) + 2; ++ size_t len_base, len_name, len; ++ len_base = strlen(base); ++ len_name = strlen(name); ++ len = len_base + len_name + 2; + path = malloc(len); + if (path == NULL) { + l2tp_log(LOG_ERR, "OOM: plugin file path"); + return -ENOMEM; + } + +- strncpy(path, base, len); +- strncat(path, "/", len); +- strncat(path, name, len); ++ memcpy(path, base, len_base); ++ path[len_base] = '/'; ++ memcpy(path + len_base + 1, name, len_name); ++ path[len - 1] = '\0'; + } else { + path = strdup(name); + if (path == NULL) { +diff '--color=auto' -Naurd openl2tp-1.8.orig/plugins/ppp_unix.c openl2tp-1.8/plugins/ppp_unix.c +--- openl2tp-1.8.orig/plugins/ppp_unix.c 2020-07-12 11:37:06.287914337 +0300 ++++ openl2tp-1.8/plugins/ppp_unix.c 2020-07-12 12:31:26.042810957 +0300 +@@ -811,7 +811,7 @@ + { + pid_t pid; + int result = 0; +- char str[10]; ++ char str[11]; + struct l2tp_session_config const *scfg; + + pid = usl_pid_safe_fork(); +@@ -1362,7 +1362,8 @@ + tmp_fd = socket(AF_INET, SOCK_DGRAM, 0); + if (tmp_fd >= 0) { + memset (&ifr, '\0', sizeof (ifr)); +- strncpy(ifr.ifr_name, ppp->interface_name, sizeof (ifr.ifr_name)); ++ strncpy(ifr.ifr_name, ppp->interface_name, sizeof (ifr.ifr_name) - 1); ++ ifr.ifr_name[sizeof(ifr.ifr_name)-1] = '\0'; + ifr.ifr_mtu = mtu; + + result = ioctl(tmp_fd, SIOCSIFMTU, (caddr_t) &ifr); +diff '--color=auto' -Naurd openl2tp-1.8.orig/l2tp_statusfile.c openl2tp-1.8/l2tp_statusfile.c +--- openl2tp-1.8.orig/l2tp_statusfile.c 2020-07-12 15:58:52.279211936 +0300 ++++ openl2tp-1.8/l2tp_statusfile.c 2020-07-12 15:59:07.949273953 +0300 +@@ -48,7 +48,7 @@ + + static FILE *l2tp_statusfile_file_create(const char *parent, const char *name) + { +- char filename[256]; ++ char filename[257]; + FILE *file; + + if (name != NULL) { +@@ -66,7 +66,7 @@ + static int l2tp_statusfile_file_delete(const char *root, const char *parent, const char *name) + { + int result; +- char filename[256]; ++ char filename[257]; + + if (root == NULL) { + if (name != NULL) { +@@ -102,7 +102,7 @@ + static int l2tp_statusfile_dir_create(const char *parent, const char *name) + { + int result; +- char dirname[256]; ++ char dirname[257]; + + if (name != NULL) { + sprintf(dirname, L2TP_STATUSFILE_DIR "/%s/%s", parent, name); +@@ -127,8 +127,8 @@ + static int l2tp_statusfile_dir_delete(const char *root, const char *parent, const char *name, int recursive) + { + int result; +- char dirname[256]; +- char filename[256]; ++ char dirname[257]; ++ char filename[257]; + DIR *dir; + struct dirent *entry; + struct stat statbuf; +diff '--color=auto' -Naurd openl2tp-1.8.orig/l2tp_config.c openl2tp-1.8/l2tp_config.c +--- openl2tp-1.8.orig/l2tp_config.c 2020-07-12 16:03:00.062192426 +0300 ++++ openl2tp-1.8/l2tp_config.c 2020-07-12 16:07:00.035142012 +0300 +@@ -135,7 +135,8 @@ + goto out; + } + if (strcmp(server_name, &server[0])) { +- strncpy(&server[0], server_name, sizeof(server)); ++ strncpy(&server[0], server_name, sizeof(server) - 1); ++ server[sizeof(server) - 1] = '\0'; + + clnt_destroy(cl); + cl = clnt_create(server, L2TP_PROG, L2TP_VERSION, opt_rpc_protocol); +@@ -6629,7 +6630,8 @@ + arg++; + break; + case 'R': +- strncpy(server, optarg, sizeof(server)); ++ strncpy(server, optarg, sizeof(server) - 1); ++ server[sizeof(server) - 1] = '\0'; + arg += 2; + l2tp_set_prompt(server); + break; diff --git a/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild b/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild deleted file mode 100644 index fb5611675f4e..000000000000 --- a/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit linux-info - -DESCRIPTION="Userspace tools for kernel L2TP implementation" -HOMEPAGE="http://www.openl2tp.org/" -SRC_URI="mirror://sourceforge/openl2tp/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="+client debug dmalloc doc +examples rpc server stats" - -REQUIRED_USE="|| ( client server )" - -BDEPEND=" - >=net-libs/rpcsvc-proto-1.3.1-r1 - sys-devel/bison - sys-devel/flex -" -DEPEND=" - >=net-dialup/ppp-2.4.5 - >=net-libs/libtirpc-1.0.3 - sys-libs/readline:= - dmalloc? ( dev-libs/dmalloc ) -" -RDEPEND="${DEPEND} - rpc? ( net-nds/rpcbind ) -" - -CONFIG_CHECK="~PPPOL2TP" - -PATCHES=( - "${FILESDIR}/${P}-werror.patch" - "${FILESDIR}/${P}-ldflags.patch" - "${FILESDIR}/${P}-pppd-2.patch" - "${FILESDIR}/${P}-man.patch" - "${FILESDIR}/${P}-l2tpconfig.patch" - "${FILESDIR}/${P}-parallelbuild.patch" - "${FILESDIR}/${P}-optionsfile.patch" - "${FILESDIR}/${P}-clientip_as_ipparam.patch" - "${FILESDIR}/${P}-setkey.patch" - "${FILESDIR}/${P}-unused-var.patch" - "${FILESDIR}/${P}-configure-Makefile.patch" - "${FILESDIR}/${P}-cflags.patch" - "${FILESDIR}/${P}-tirpc.patch" -) - -src_prepare() { - default - sed -i 's/CFLAGS.optimize/CFLAGS_optimize/g' Makefile */Makefile || die "Makefile sed failed" -} - -src_configure() { - myconf= - - use client || myconf+=" L2TP_FEATURE_LAC_SUPPORT=n - L2TP_FEATURE_LAIC_SUPPORT=n - L2TP_FEATURE_LAOC_SUPPORT=n " - - use server || myconf+=" L2TP_FEATURE_LNS_SUPPORT=n - L2TP_FEATURE_LNIC_SUPPORT=n - L2TP_FEATURE_LNOC_SUPPORT=n " - - use rpc || myconf+=" L2TP_FEATURE_RPC_MANAGEMENT=n " - - use stats && myconf+=" L2TP_FEATURE_LOCAL_STAT_FILE=y " - use debug && myconf+=" L2TP_DEBUG=y " - use dmalloc && myconf+=" USE_DMALLOC=y " - - echo ${myconf} > "${T}/myconf" -} - -src_compile() { - emake $(cat "${T}/myconf") -} - -src_install() { - emake $(cat "${T}/myconf") DESTDIR="${D}" install - - if use examples; then - docinto event_socket - dodoc doc/{event_sock_example.c,README.event_sock} - docinto - dodoc -r "${FILESDIR}"/examples - fi - - if use doc; then - dodoc doc/*.txt - newdoc plugins/README README.plugins - dodoc -r ipsec - fi - - newinitd "${FILESDIR}"/openl2tpd.initd openl2tpd - # init.d script is quite different for RPC and non-RPC versions. - use rpc || sed -i s/userpc=\"yes\"/userpc=\"no\"/ "${D}/etc/init.d/openl2tpd" || die "sed failed" - newconfd "${FILESDIR}"/openl2tpd.confd openl2tpd -} - -pkg_postinst() { - if use rpc; then - ewarn - ewarn "RPC control does not provide any auth checks for control connection." - ewarn "Unless you need this you should disable it, for reference:" - ewarn "http://forums.openl2tp.org/viewtopic.php?f=4&t=41" - ewarn - ewarn "Therefore DO NOT USE RPC IN INSECURE ENVIRONMENTS!" - else - ewarn - ewarn "Without RPC support you won't be able to use l2tpconfig." - ewarn "Please read http://forums.openl2tp.org/viewtopic.php?f=4&t=41" - ewarn "for more information about the security risk before enabling." - ewarn - ewarn "If you are using numerical strings (e.g. login name containing only" - ewarn "digits) or special characters in password, please use double quotes" - ewarn "to enclose them." - fi - if use stats; then - ewarn - ewarn "To enable status files openl2tpd must be started with -S option." - ewarn "Upstream warns about runtime overhead with status files enabled." - fi -} diff --git a/net-dialup/openl2tp/openl2tp-1.8-r2.ebuild b/net-dialup/openl2tp/openl2tp-1.8-r2.ebuild new file mode 100644 index 000000000000..31d207b45529 --- /dev/null +++ b/net-dialup/openl2tp/openl2tp-1.8-r2.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit linux-info + +DESCRIPTION="Userspace tools for kernel L2TP implementation" +HOMEPAGE="https://sourceforge.net/projects/openl2tp/" +SRC_URI="mirror://sourceforge/openl2tp/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+client debug dmalloc doc +examples rpc server stats" + +REQUIRED_USE="|| ( client server )" + +BDEPEND=" + >=net-libs/rpcsvc-proto-1.3.1-r1 + sys-devel/bison + sys-devel/flex +" +DEPEND=" + >=net-dialup/ppp-2.4.5 + >=net-libs/libtirpc-1.0.3 + sys-libs/readline:= + dmalloc? ( dev-libs/dmalloc ) +" +RDEPEND="${DEPEND} + rpc? ( net-nds/rpcbind ) +" + +CONFIG_CHECK="~PPPOL2TP" + +PATCHES=( + "${FILESDIR}/${P}-werror.patch" + "${FILESDIR}/${P}-ldflags.patch" + "${FILESDIR}/${P}-pppd-2.patch" + "${FILESDIR}/${P}-man.patch" + "${FILESDIR}/${P}-l2tpconfig.patch" + "${FILESDIR}/${P}-parallelbuild.patch" + "${FILESDIR}/${P}-optionsfile.patch" + "${FILESDIR}/${P}-clientip_as_ipparam.patch" + "${FILESDIR}/${P}-setkey.patch" + "${FILESDIR}/${P}-unused-var.patch" + "${FILESDIR}/${P}-configure-Makefile.patch" + "${FILESDIR}/${P}-cflags.patch" + "${FILESDIR}/${P}-tirpc.patch" + "${FILESDIR}/${P}-native-tc.patch" + "${FILESDIR}/${P}-musl.patch" + "${FILESDIR}/${P}-strings.patch" +) + +src_prepare() { + default + sed -i 's/CFLAGS.optimize/CFLAGS_optimize/g' Makefile */Makefile || die "Makefile sed failed" +} + +src_configure() { + myconf= + + use client || myconf+=" L2TP_FEATURE_LAC_SUPPORT=n + L2TP_FEATURE_LAIC_SUPPORT=n + L2TP_FEATURE_LAOC_SUPPORT=n " + + use server || myconf+=" L2TP_FEATURE_LNS_SUPPORT=n + L2TP_FEATURE_LNIC_SUPPORT=n + L2TP_FEATURE_LNOC_SUPPORT=n " + + use rpc || myconf+=" L2TP_FEATURE_RPC_MANAGEMENT=n " + + use stats && myconf+=" L2TP_FEATURE_LOCAL_STAT_FILE=y " + use debug && myconf+=" L2TP_DEBUG=y " + use dmalloc && myconf+=" USE_DMALLOC=y " + + echo ${myconf} > "${T}/myconf" +} + +src_compile() { + emake $(cat "${T}/myconf") +} + +src_install() { + emake $(cat "${T}/myconf") DESTDIR="${D}" install + + if use examples; then + docinto event_socket + dodoc doc/{event_sock_example.c,README.event_sock} + docinto + dodoc -r "${FILESDIR}"/examples + fi + + if use doc; then + dodoc doc/*.txt + newdoc plugins/README README.plugins + dodoc -r ipsec + fi + + newinitd "${FILESDIR}"/openl2tpd.initd openl2tpd + # init.d script is quite different for RPC and non-RPC versions. + use rpc || sed -i s/userpc=\"yes\"/userpc=\"no\"/ "${D}/etc/init.d/openl2tpd" || die "sed failed" + newconfd "${FILESDIR}"/openl2tpd.confd openl2tpd +} + +pkg_postinst() { + if use rpc; then + ewarn + ewarn "RPC control does not provide any auth checks for control connection." + ewarn "Unless you need this you should disable it, for reference:" + ewarn "http://forums.openl2tp.org/viewtopic.php?f=4&t=41" + ewarn + ewarn "Therefore DO NOT USE RPC IN INSECURE ENVIRONMENTS!" + else + ewarn + ewarn "Without RPC support you won't be able to use l2tpconfig." + ewarn "Please read http://forums.openl2tp.org/viewtopic.php?f=4&t=41" + ewarn "for more information about the security risk before enabling." + ewarn + ewarn "If you are using numerical strings (e.g. login name containing only" + ewarn "digits) or special characters in password, please use double quotes" + ewarn "to enclose them." + fi + if use stats; then + ewarn + ewarn "To enable status files openl2tpd must be started with -S option." + ewarn "Upstream warns about runtime overhead with status files enabled." + fi +} -- cgit v1.2.3