summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2017-05-17 16:04:26 +0300
committerSergey Popov <pinkbyte@gentoo.org>2017-05-17 16:04:26 +0300
commit7ff14d70ffe25bdf0053c5764ff07a4b723a6fe1 (patch)
tree4fac9a62c3f8024805f13c3155080e5cabb833a4 /net-dialup/accel-ppp
parentnet-dialup/accel-ppp: update live ebuilds (diff)
downloadgentoo-7ff14d70ffe25bdf0053c5764ff07a4b723a6fe1.tar.gz
gentoo-7ff14d70ffe25bdf0053c5764ff07a4b723a6fe1.tar.bz2
gentoo-7ff14d70ffe25bdf0053c5764ff07a4b723a6fe1.zip
net-dialup/accel-ppp: version bump
Fix vlan handling. Fix building with kernel 4.10. Fix building postgresql log driver. Gentoo-Bug: 591572 Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'net-dialup/accel-ppp')
-rw-r--r--net-dialup/accel-ppp/Manifest1
-rw-r--r--net-dialup/accel-ppp/accel-ppp-1.11.1_p20170508.ebuild107
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch80
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp-1.11.1-socklen.patch18
4 files changed, 206 insertions, 0 deletions
diff --git a/net-dialup/accel-ppp/Manifest b/net-dialup/accel-ppp/Manifest
index 386a23315798..10bbee8ec999 100644
--- a/net-dialup/accel-ppp/Manifest
+++ b/net-dialup/accel-ppp/Manifest
@@ -1 +1,2 @@
DIST accel-ppp-1.11.0.tar.bz2 1594327 SHA256 1b4f02fb0b264d7144c2b3f81c002983aae5b26bcf26af9cd2cd8492222efffe SHA512 907b484e73a4d70757a3991e6f33873aad5f10f6d5180307ee2f3eb0caacc576795d0e9c7666172a00842e6d31563503250f0e8165f6adb2bc88a1270814ea3c WHIRLPOOL 3975b076961c8ed7e3f207309e941785de26452f6ef5490f0668aca19e404e9f2b4ffa978b2af95897fdb339289d578c52f24493a8130ea38ccabe6846363587
+DIST accel-ppp-1.11.1_p20170508.tar.bz2 1609904 SHA256 672a32b990afd970e21188d65b68b1fa067cb272a35686808f21ac66d74e66c3 SHA512 79f928c9d07891957d12443eaf32e96e826d5bebf241dcfcb31a7777fbce2332078bf0c1dd1e1a55cf96154be1fec610f1afd088fc018f54ebd5d265c037c07a WHIRLPOOL 47faf7ee243385c135766a018a51f322b6a1ea2a522d4d0aad674e157ef86e9aa0c1feb1778f17e5c69e89b944652e45f7631fdae48161290fb1a7e4ee66ccd2
diff --git a/net-dialup/accel-ppp/accel-ppp-1.11.1_p20170508.ebuild b/net-dialup/accel-ppp/accel-ppp-1.11.1_p20170508.ebuild
new file mode 100644
index 000000000000..9bfa8e3834d9
--- /dev/null
+++ b/net-dialup/accel-ppp/accel-ppp-1.11.1_p20170508.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic linux-info linux-mod
+
+DESCRIPTION="High performance PPTP, PPPoE and L2TP server"
+HOMEPAGE="http://accel-ppp.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~pinkbyte/distfiles/snapshots/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc ipoe lua postgres radius shaper snmp valgrind"
+
+RDEPEND="lua? ( dev-lang/lua:0 )
+ postgres? ( dev-db/postgresql:* )
+ snmp? ( net-analyzer/net-snmp )
+ dev-libs/libpcre
+ dev-libs/openssl:0"
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )"
+PDEPEND="net-dialup/ppp-scripts"
+
+DOCS=( README )
+
+CONFIG_CHECK="~L2TP ~PPPOE ~PPTP"
+
+REQUIRED_USE="valgrind? ( debug )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.11.1-linux-4.10.patch"
+ "${FILESDIR}/${PN}-1.11.1-socklen.patch"
+)
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ if use ipoe; then
+ linux-mod_pkg_setup
+ set_arch_to_kernel
+ else
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ sed -i -e "/mkdir/d" \
+ -e "/echo/d" \
+ -e "s: RENAME accel-ppp.conf.dist::" accel-pppd/CMakeLists.txt || die 'sed on accel-pppd/CMakeLists.txt failed'
+
+ # Do not install kernel modules like that - breaks sandbox!
+ sed -i -e '/modules_install/d' \
+ drivers/ipoe/CMakeLists.txt \
+ drivers/vlan_mon/CMakeLists.txt || die
+
+ # Bug #549918
+ append-ldflags -Wl,-z,lazy
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local libdir="$(get_libdir)"
+ # There must be also dev-libs/tomcrypt (TOMCRYPT) as crypto alternative to OpenSSL
+ local mycmakeargs=(
+ -DLIB_PATH_SUFFIX="${libdir#lib}"
+ -DBUILD_IPOE_DRIVER="$(usex ipoe)"
+ -DBUILD_PPTP_DRIVER=no
+ -DBUILD_VLAN_MON_DRIVER="$(usex ipoe)"
+ -DCRYPTO=OPENSSL
+ -DLOG_PGSQL="$(usex postgres)"
+ -DLUA="$(usex lua)"
+ -DMEMDEBUG="$(usex debug)"
+ -DNETSNMP="$(usex snmp)"
+ -DRADIUS="$(usex radius)"
+ -DSHAPER="$(usex shaper)"
+ -DVALGRIND="$(usex valgrind)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ if use ipoe; then
+ local MODULE_NAMES="ipoe(accel-ppp:${BUILD_DIR}/drivers/ipoe/driver) vlan_mon(accel-ppp:${BUILD_DIR}/drivers/vlan_mon/driver)"
+ linux-mod_src_install
+ fi
+
+ cmake-utils_src_install
+
+ use doc && dodoc -r rfc
+
+ if use snmp; then
+ insinto /usr/share/snmp/mibs
+ doins accel-pppd/extra/net-snmp/ACCEL-PPP-MIB.txt
+ fi
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}d
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}d
+
+ dodir /var/log/accel-ppp
+}
diff --git a/net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch
new file mode 100644
index 000000000000..568a405fd69c
--- /dev/null
+++ b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch
@@ -0,0 +1,80 @@
+--- ./drivers/ipoe/ipoe.c.orig 2016-11-28 14:28:33.000000000 +0300
++++ ./drivers/ipoe/ipoe.c 2017-05-17 11:27:42.030000000 +0300
+@@ -52,6 +52,27 @@
+ #define DEFINE_SEMAPHORE(name) struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++static inline int
++_genl_register_family_with_ops_grps(struct genl_family *family,
++ const struct genl_ops *ops, size_t n_ops,
++ const struct genl_multicast_group *mcgrps,
++ size_t n_mcgrps)
++{
++ family->module = THIS_MODULE;
++ family->ops = ops;
++ family->n_ops = n_ops;
++ family->mcgrps = mcgrps;
++ family->n_mcgrps = n_mcgrps;
++ return genl_register_family(family);
++}
++
++#define genl_register_family_with_ops_groups(family, ops, grps) \
++ _genl_register_family_with_ops_grps((family), \
++ (ops), ARRAY_SIZE(ops), \
++ (grps), ARRAY_SIZE(grps))
++#endif
++
+ struct ipoe_stats {
+ struct u64_stats_sync sync;
+ u64 packets;
+@@ -1668,7 +1689,9 @@
+ };
+
+ static struct genl_family ipoe_nl_family = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+ .id = GENL_ID_GENERATE,
++#endif
+ .name = IPOE_GENL_NAME,
+ .version = IPOE_GENL_VERSION,
+ .hdrsize = 0,
+--- ./drivers/vlan_mon/vlan_mon.c.orig 2017-05-17 11:28:23.320000000 +0300
++++ ./drivers/vlan_mon/vlan_mon.c 2017-05-17 11:29:41.660000000 +0300
+@@ -39,6 +39,27 @@
+ #define vlan_tx_tag_present(skb) skb_vlan_tag_present(skb)
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++static inline int
++_genl_register_family_with_ops_grps(struct genl_family *family,
++ const struct genl_ops *ops, size_t n_ops,
++ const struct genl_multicast_group *mcgrps,
++ size_t n_mcgrps)
++{
++ family->module = THIS_MODULE;
++ family->ops = ops;
++ family->n_ops = n_ops;
++ family->mcgrps = mcgrps;
++ family->n_mcgrps = n_mcgrps;
++ return genl_register_family(family);
++}
++
++#define genl_register_family_with_ops_groups(family, ops, grps) \
++ _genl_register_family_with_ops_grps((family), \
++ (ops), ARRAY_SIZE(ops), \
++ (grps), ARRAY_SIZE(grps))
++#endif
++
+ struct vlan_dev {
+ unsigned int magic;
+ int ifindex;
+@@ -660,7 +681,9 @@
+ };
+
+ static struct genl_family vlan_mon_nl_family = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+ .id = GENL_ID_GENERATE,
++#endif
+ .name = VLAN_MON_GENL_NAME,
+ .version = VLAN_MON_GENL_VERSION,
+ .hdrsize = 0,
diff --git a/net-dialup/accel-ppp/files/accel-ppp-1.11.1-socklen.patch b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-socklen.patch
new file mode 100644
index 000000000000..79f76cae98a3
--- /dev/null
+++ b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-socklen.patch
@@ -0,0 +1,18 @@
+commit 68008248259dfaa2fde91f8697db889971056bb3
+Author: lmwangi <lmwangi@gmail.com>
+Date: Tue Jun 7 13:55:04 2016 +0300
+
+ fix build issue where socketlen is not found
+
+diff --git a/accel-pppd/logs/log_pgsql.c b/accel-pppd/logs/log_pgsql.c
+index e4b5a9e..78fa72d 100644
+--- a/accel-pppd/logs/log_pgsql.c
++++ b/accel-pppd/logs/log_pgsql.c
+@@ -1,6 +1,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/socket.h>
+
+ #include <postgresql/libpq-fe.h>
+