summaryrefslogtreecommitdiff
path: root/net-libs/libnetfilter_cttimeout
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-libs/libnetfilter_cttimeout
reinit the tree, so we can have metadata
Diffstat (limited to 'net-libs/libnetfilter_cttimeout')
-rw-r--r--net-libs/libnetfilter_cttimeout/Manifest7
-rw-r--r--net-libs/libnetfilter_cttimeout/files/libnetfilter_cttimeout-1.0.0-clang-export.patch266
-rw-r--r--net-libs/libnetfilter_cttimeout/libnetfilter_cttimeout-1.0.0-r1.ebuild30
-rw-r--r--net-libs/libnetfilter_cttimeout/libnetfilter_cttimeout-1.0.0.ebuild25
-rw-r--r--net-libs/libnetfilter_cttimeout/metadata.xml8
5 files changed, 336 insertions, 0 deletions
diff --git a/net-libs/libnetfilter_cttimeout/Manifest b/net-libs/libnetfilter_cttimeout/Manifest
new file mode 100644
index 000000000000..ac1cb4e9c699
--- /dev/null
+++ b/net-libs/libnetfilter_cttimeout/Manifest
@@ -0,0 +1,7 @@
+AUX libnetfilter_cttimeout-1.0.0-clang-export.patch 8628 SHA256 cbce5cbe4eb636e78184b23f4969fc3b6274f8a5ce4b477ac665201cf96b4dd6 SHA512 d288dc0ad2fe6e15fa425a5e125e2d953e34bd6fbb7f57f7b7fadec030e7caefa39a4fbe9e7be90ce5aa7f5b4a44ad0e9df1c98ff6100f134ac3839653a542b1 WHIRLPOOL daac0edacb35e35777acabddcc61bf30449ddf30db034291b8da29d7215a574f570a0ce73709b58e5d0b767e258657d1bfbfa4bc657c3030cfcc1f9ebda2873b
+DIST libnetfilter_cttimeout-1.0.0.tar.bz2 275065 SHA256 aeab12754f557cba3ce2950a2029963d817490df7edb49880008b34d7ff8feba SHA512 d64f592be022d02b6e6627470f9aed75114b0c7177012d31d868ee7eb39fca330a7638c9a209ff489d4a8c0549b8fcfd33582c6d36ee519b920cf27429301c85 WHIRLPOOL a40a7b41ba118ff7868b8cf04f2653319d6ca242703c0b944d896336de80029ea2dd579eb706406035f57976c4890b7f984d6c9bba6fb240e78c6afa9f128c51
+EBUILD libnetfilter_cttimeout-1.0.0-r1.ebuild 762 SHA256 35627e5183114637e67022d7d7af4afb748a7cd1833c14bcb40293771dc6c313 SHA512 3c771710d5f4575081d7dc548a0cf45b0a5b9bf1f81f9971d4027b6904b94f3db5e39a770de430f36d5874d111ee9a1d1542d64ff7f57192d6021fdfedfd3d58 WHIRLPOOL a238e87d1556d9cea19b880c3b78b153779d85bbe5d17fc285d44d2bf354afe723296d8bbf0f4c2ba1af1e64f21645dc3e6ce135df0500e2a915b088072843d2
+EBUILD libnetfilter_cttimeout-1.0.0.ebuild 694 SHA256 76ba0db502110aa0971aef6e781cf9e43347875ad89b3efdc5de234dc899479d SHA512 b64d282499ecc3d93a3df9eb0ab7a2775e19d27ebc692ee753094ca954b26d494c88253d04ff8342609eea88ff251e2b4d7c2856dd1e08cd6a2e56595b582d2b WHIRLPOOL 26071b47b9b7b660223b5704ff1451e5f581628d62813b5655e03661a9ab2c25e93882cb0d4ff52115916304dfafb8cd56908d69dd92f1ee6f8778e2a181f248
+MISC ChangeLog 3038 SHA256 b69df8ea9b1b981bd6173b9d80ffc8f7760094f1fd05f38cab8b206d5be5c0c4 SHA512 81a0dbe9714050053bf408ce2277861eb814b7aa807de9d788ccb41fbac0e466d88abb5b7cc7136510cc6be86cc6f8b89de7802d36c8bcb88bfcbf53a8afe6ce WHIRLPOOL 6f3a3096a8bcd67d052331c4abbc8a4478243ff02d10233002d4e4173115e23d379f5b35e9ce9bfe08475092afda0d8a54babe50cd63498113391ce64217aa2f
+MISC ChangeLog-2015 1141 SHA256 b923adc1885721039996ce324d0fe34547392bf1f346e8fe22b5d18b42651424 SHA512 a4ada53fccb05e67326362b3000617a5f4e9f3e7be4a4bd9c2260782747bf5369bc709af38c4896f686ef22150dbda16dc838408241167c1745526810462bb89 WHIRLPOOL 2ae22afe3dfc7f8c8636d1a697dc7d6991b046837d47f7061b822f4c771ec823de081cf68257ea9fd030a0e01e1613edd528f554ab182802db00fc9dfb076fa0
+MISC metadata.xml 276 SHA256 d15d6b6bd9ffc8a642c7469d01788ba9158efb4ca27fcf3324d9e52d1b70ec93 SHA512 f0e6c6bc89659e01e157d9bf30d0a2f3fd2d71bc26c8d12489c4a44fc5237159946e25b46e7295ab4676aea63559194977a0b1e76aced31d81cf6387dd0f4250 WHIRLPOOL 26b9e81575f613b751f76234013c30a8da84a1c0dd75c12b8df32706ee753691bbc889a2dec5001cc8c4b05c47aca49ed9fabbb5a6fefed74aaa86d6c3f56cee
diff --git a/net-libs/libnetfilter_cttimeout/files/libnetfilter_cttimeout-1.0.0-clang-export.patch b/net-libs/libnetfilter_cttimeout/files/libnetfilter_cttimeout-1.0.0-clang-export.patch
new file mode 100644
index 000000000000..ba706d3807df
--- /dev/null
+++ b/net-libs/libnetfilter_cttimeout/files/libnetfilter_cttimeout-1.0.0-clang-export.patch
@@ -0,0 +1,266 @@
+fix from upstream
+
+From d0c4e39d12f903e06db262656cff2e24d267bed7 Mon Sep 17 00:00:00 2001
+From: Kevin Cernekee <cernekee@chromium.org>
+Date: Wed, 4 Jan 2017 14:30:25 -0800
+Subject: [PATCH] Use __EXPORTED rather than EXPORT_SYMBOL
+
+clang is sensitive to the ordering of
+__attribute__((visibility("default"))) relative to the function
+body. gcc is not. So if we try to re-declare an existing function
+with default visibility, clang prints a warning and generates
+a broken .so file in which nfct_timeout_* are not exported to library
+callers.
+
+Move the attribute up into the function definition to make clang happy.
+
+Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ doxygen.cfg.in | 2 +-
+ src/internal.h | 5 ++---
+ src/libnetfilter_cttimeout.c | 44 +++++++++++++++++---------------------------
+ 3 files changed, 20 insertions(+), 31 deletions(-)
+
+diff --git a/doxygen.cfg.in b/doxygen.cfg.in
+index 8e5d4495eb41..09c3ce00e422 100644
+--- a/doxygen.cfg.in
++++ b/doxygen.cfg.in
+@@ -72,7 +72,7 @@ RECURSIVE = YES
+ EXCLUDE =
+ EXCLUDE_SYMLINKS = NO
+ EXCLUDE_PATTERNS = */.git/* .*.d
+-EXCLUDE_SYMBOLS = EXPORT_SYMBOL nfct_timeout _container_policy_cb
++EXCLUDE_SYMBOLS = nfct_timeout _container_policy_cb
+ EXAMPLE_PATH =
+ EXAMPLE_PATTERNS =
+ EXAMPLE_RECURSIVE = NO
+diff --git a/src/internal.h b/src/internal.h
+index 3a88d1a1f7d8..5d781718ddad 100644
+--- a/src/internal.h
++++ b/src/internal.h
+@@ -3,10 +3,9 @@
+
+ #include "config.h"
+ #ifdef HAVE_VISIBILITY_HIDDEN
+-# define __visible __attribute__((visibility("default")))
+-# define EXPORT_SYMBOL(x) typeof(x) (x) __visible
++# define __EXPORTED __attribute__((visibility("default")))
+ #else
+-# define EXPORT_SYMBOL
++# define __EXPORTED
+ #endif
+
+ #endif
+diff --git a/src/libnetfilter_cttimeout.c b/src/libnetfilter_cttimeout.c
+index 7844a1f9c19a..a0a71851b0eb 100644
+--- a/src/libnetfilter_cttimeout.c
++++ b/src/libnetfilter_cttimeout.c
+@@ -187,7 +187,7 @@ struct nfct_timeout {
+ * In case of success, this function returns a valid pointer, otherwise NULL
+ * s returned and errno is appropriately set.
+ */
+-struct nfct_timeout *nfct_timeout_alloc(void)
++struct nfct_timeout __EXPORTED *nfct_timeout_alloc(void)
+ {
+ struct nfct_timeout *t;
+
+@@ -197,19 +197,17 @@ struct nfct_timeout *nfct_timeout_alloc(void)
+
+ return t;
+ }
+-EXPORT_SYMBOL(nfct_timeout_alloc);
+
+ /**
+ * nfct_timeout_free - release one conntrack timeout object
+ * \param t pointer to the conntrack timeout object
+ */
+-void nfct_timeout_free(struct nfct_timeout *t)
++void __EXPORTED nfct_timeout_free(struct nfct_timeout *t)
+ {
+ if (t->timeout)
+ free(t->timeout);
+ free(t);
+ }
+-EXPORT_SYMBOL(nfct_timeout_free);
+
+ /**
+ * nfct_timeout_attr_set - set one attribute of the conntrack timeout object
+@@ -217,7 +215,7 @@ EXPORT_SYMBOL(nfct_timeout_free);
+ * \param type attribute type you want to set
+ * \param data pointer to data that will be used to set this attribute
+ */
+-int
++int __EXPORTED
+ nfct_timeout_attr_set(struct nfct_timeout *t, uint32_t type, const void *data)
+ {
+ switch(type) {
+@@ -236,7 +234,6 @@ nfct_timeout_attr_set(struct nfct_timeout *t, uint32_t type, const void *data)
+ t->attrset |= (1 << type);
+ return 0;
+ }
+-EXPORT_SYMBOL(nfct_timeout_attr_set);
+
+ /**
+ * nfct_timeout_attr_set_u8 - set one attribute of the conntrack timeout object
+@@ -244,12 +241,11 @@ EXPORT_SYMBOL(nfct_timeout_attr_set);
+ * \param type attribute type you want to set
+ * \param data pointer to data that will be used to set this attribute
+ */
+-int
++int __EXPORTED
+ nfct_timeout_attr_set_u8(struct nfct_timeout *t, uint32_t type, uint8_t data)
+ {
+ return nfct_timeout_attr_set(t, type, &data);
+ }
+-EXPORT_SYMBOL(nfct_timeout_attr_set_u8);
+
+ /**
+ * nfct_timeout_attr_set_u16 - set one attribute of the conntrack timeout object
+@@ -257,23 +253,21 @@ EXPORT_SYMBOL(nfct_timeout_attr_set_u8);
+ * \param type attribute type you want to set
+ * \param data pointer to data that will be used to set this attribute
+ */
+-int
++int __EXPORTED
+ nfct_timeout_attr_set_u16(struct nfct_timeout *t, uint32_t type, uint16_t data)
+ {
+ return nfct_timeout_attr_set(t, type, &data);
+ }
+-EXPORT_SYMBOL(nfct_timeout_attr_set_u16);
+
+ /**
+ * nfct_timeout_attr_unset - unset one attribute of the conntrack timeout object
+ * \param t pointer to the conntrack timeout object
+ * \param type attribute type you want to set
+ */
+-void nfct_timeout_attr_unset(struct nfct_timeout *t, uint32_t type)
++void __EXPORTED nfct_timeout_attr_unset(struct nfct_timeout *t, uint32_t type)
+ {
+ t->attrset &= ~(1 << type);
+ }
+-EXPORT_SYMBOL(nfct_timeout_attr_unset);
+
+ /**
+ * nfct_timeout_policy_attr_set_u32 - set one attribute of the policy
+@@ -281,7 +275,7 @@ EXPORT_SYMBOL(nfct_timeout_attr_unset);
+ * \param type attribute type you want to set
+ * \param data data that will be used to set this attribute
+ */
+-int
++int __EXPORTED
+ nfct_timeout_policy_attr_set_u32(struct nfct_timeout *t,
+ uint32_t type, uint32_t data)
+ {
+@@ -319,18 +313,17 @@ nfct_timeout_policy_attr_set_u32(struct nfct_timeout *t,
+
+ return 0;
+ }
+-EXPORT_SYMBOL(nfct_timeout_policy_attr_set_u32);
+
+ /**
+ * nfct_timeout_policy_attr_unset - unset one attribute of the policy
+ * \param t pointer to the conntrack timeout object
+ * \param type attribute type you want to set
+ */
+-void nfct_timeout_policy_attr_unset(struct nfct_timeout *t, uint32_t type)
++void __EXPORTED
++nfct_timeout_policy_attr_unset(struct nfct_timeout *t, uint32_t type)
+ {
+ t->attrset &= ~(1 << type);
+ }
+-EXPORT_SYMBOL(nfct_timeout_policy_attr_unset);
+
+ /**
+ * nfct_timeout_policy_attr_to_name - get state name from protocol state number
+@@ -340,7 +333,8 @@ EXPORT_SYMBOL(nfct_timeout_policy_attr_unset);
+ * This function returns NULL if unsupported protocol or state number is passed.
+ * Otherwise, a pointer to valid string is returned.
+ */
+-const char *nfct_timeout_policy_attr_to_name(uint8_t l4proto, uint32_t state)
++const char __EXPORTED *
++nfct_timeout_policy_attr_to_name(uint8_t l4proto, uint32_t state)
+ {
+ if (timeout_protocol[l4proto].state_to_name == NULL) {
+ printf("no array state name\n");
+@@ -354,7 +348,6 @@ const char *nfct_timeout_policy_attr_to_name(uint8_t l4proto, uint32_t state)
+
+ return timeout_protocol[l4proto].state_to_name[state];
+ }
+-EXPORT_SYMBOL(nfct_timeout_policy_attr_to_name);
+
+ /**
+ * @}
+@@ -438,8 +431,9 @@ nfct_timeout_snprintf_default(char *buf, size_t size,
+ * This function returns -1 in case that some mandatory attributes are
+ * missing. On sucess, it returns 0.
+ */
+-int nfct_timeout_snprintf(char *buf, size_t size, const struct nfct_timeout *t,
+- unsigned int type, unsigned int flags)
++int __EXPORTED
++nfct_timeout_snprintf(char *buf, size_t size, const struct nfct_timeout *t,
++ unsigned int type, unsigned int flags)
+ {
+ int ret = 0;
+
+@@ -454,7 +448,6 @@ int nfct_timeout_snprintf(char *buf, size_t size, const struct nfct_timeout *t,
+
+ return ret;
+ }
+-EXPORT_SYMBOL(nfct_timeout_snprintf);
+
+ /**
+ * @}
+@@ -477,7 +470,7 @@ EXPORT_SYMBOL(nfct_timeout_snprintf);
+ * - CTNL_MSG_TIMEOUT_GET: get conntrack timeout object.
+ * - CTNL_MSG_TIMEOUT_DEL: delete conntrack timeout object.
+ */
+-struct nlmsghdr *
++struct nlmsghdr __EXPORTED *
+ nfct_timeout_nlmsg_build_hdr(char *buf, uint8_t cmd,
+ uint16_t flags, uint32_t seq)
+ {
+@@ -496,14 +489,13 @@ nfct_timeout_nlmsg_build_hdr(char *buf, uint8_t cmd,
+
+ return nlh;
+ }
+-EXPORT_SYMBOL(nfct_timeout_nlmsg_build_hdr);
+
+ /**
+ * nfct_timeout_nlmsg_build_payload - build payload from ct timeout object
+ * \param nlh: netlink message that you want to use to add the payload.
+ * \param t: pointer to a conntrack timeout object
+ */
+-void
++void __EXPORTED
+ nfct_timeout_nlmsg_build_payload(struct nlmsghdr *nlh,
+ const struct nfct_timeout *t)
+ {
+@@ -532,7 +524,6 @@ nfct_timeout_nlmsg_build_payload(struct nlmsghdr *nlh,
+ }
+
+ }
+-EXPORT_SYMBOL(nfct_timeout_nlmsg_build_payload);
+
+ static int
+ timeout_nlmsg_parse_attr_cb(const struct nlattr *attr, void *data)
+@@ -629,7 +620,7 @@ timeout_parse_attr_data(struct nfct_timeout *t, const struct nlattr *nest)
+ * This function returns -1 in case that some mandatory attributes are
+ * missing. On sucess, it returns 0.
+ */
+-int
++int __EXPORTED
+ nfct_timeout_nlmsg_parse_payload(const struct nlmsghdr *nlh,
+ struct nfct_timeout *t)
+ {
+@@ -654,7 +645,6 @@ nfct_timeout_nlmsg_parse_payload(const struct nlmsghdr *nlh,
+ }
+ return 0;
+ }
+-EXPORT_SYMBOL(nfct_timeout_nlmsg_parse_payload);
+
+ /**
+ * @}
+--
+2.11.0
+
diff --git a/net-libs/libnetfilter_cttimeout/libnetfilter_cttimeout-1.0.0-r1.ebuild b/net-libs/libnetfilter_cttimeout/libnetfilter_cttimeout-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..fbaffa60b74a
--- /dev/null
+++ b/net-libs/libnetfilter_cttimeout/libnetfilter_cttimeout-1.0.0-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit linux-info autotools-utils
+
+DESCRIPTION="netlink interface to the connection tracking timeout infrastructure in the kernel packet filter"
+HOMEPAGE="http://www.netfilter.org/projects/libnetfilter_cttimeout"
+SRC_URI="http://www.netfilter.org/projects/${PN}/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~x86"
+IUSE="static-libs"
+
+RDEPEND="net-libs/libmnl:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-clang-export.patch
+)
+
+CONFIG_CHECK="~NF_CT_NETLINK_TIMEOUT"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ kernel_is lt 3 4 0 && ewarn "requires at least 3.4.0 kernel version"
+}
diff --git a/net-libs/libnetfilter_cttimeout/libnetfilter_cttimeout-1.0.0.ebuild b/net-libs/libnetfilter_cttimeout/libnetfilter_cttimeout-1.0.0.ebuild
new file mode 100644
index 000000000000..e976c50c787e
--- /dev/null
+++ b/net-libs/libnetfilter_cttimeout/libnetfilter_cttimeout-1.0.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit linux-info autotools-utils
+
+DESCRIPTION="netlink interface to the connection tracking timeout infrastructure in the kernel packet filter"
+HOMEPAGE="http://www.netfilter.org/projects/libnetfilter_cttimeout"
+SRC_URI="http://www.netfilter.org/projects/${PN}/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa x86"
+IUSE="static-libs"
+
+RDEPEND="net-libs/libmnl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NF_CT_NETLINK_TIMEOUT"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ kernel_is lt 3 4 0 && ewarn "requires at least 3.4.0 kernel version"
+}
diff --git a/net-libs/libnetfilter_cttimeout/metadata.xml b/net-libs/libnetfilter_cttimeout/metadata.xml
new file mode 100644
index 000000000000..74c2baebb4ec
--- /dev/null
+++ b/net-libs/libnetfilter_cttimeout/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+</maintainer>
+</pkgmetadata>