* [gentoo-commits] repo/gentoo:master commit in: net-misc/mcproxy/, net-misc/mcproxy/files/
@ 2018-09-29 10:43 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2018-09-29 10:43 UTC (permalink / raw
To: gentoo-commits
commit: 2716879722854bcd457b1ceb7025db16f4f2a179
Author: Conrad Kostecki <conrad <AT> kostecki <DOT> com>
AuthorDate: Wed Sep 5 21:20:07 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Sep 29 10:43:30 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27168797
net-misc/mcproxy: New package
Closes: https://bugs.gentoo.org/665314
Signed-off-by: Conrad Kostecki <conrad <AT> kostecki.com>
Package-Manager: Portage-2.3.49, Repoman-2.3.10
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/9787
net-misc/mcproxy/Manifest | 1 +
.../mcproxy/files/fix_checksum_calculation.patch | 41 ++++++++++++++++
net-misc/mcproxy/files/mcproxy.confd | 5 ++
net-misc/mcproxy/files/mcproxy.initd | 27 +++++++++++
net-misc/mcproxy/files/mcproxy.service | 10 ++++
net-misc/mcproxy/mcproxy-1.1.1.ebuild | 55 ++++++++++++++++++++++
net-misc/mcproxy/metadata.xml | 29 ++++++++++++
7 files changed, 168 insertions(+)
diff --git a/net-misc/mcproxy/Manifest b/net-misc/mcproxy/Manifest
new file mode 100644
index 00000000000..b3c14ff5c82
--- /dev/null
+++ b/net-misc/mcproxy/Manifest
@@ -0,0 +1 @@
+DIST mcproxy-1.1.1.tar.gz 3373209 BLAKE2B 0b54f7c20b9d6d66c5b88daeaa00901918057b449b932656355303a83c4e4f1feb370de0c55e55484b9bafc63bfd82b8ef8179144529f3074e3d94e147cc8ff5 SHA512 408bc27169c9c90080c7842aaeaf260d5349b735e017d1750118f190124f48743fbf15fc05eee16290e38cc2f752e27b28548714a3d0cd2366dfc53dafcda0bb
diff --git a/net-misc/mcproxy/files/fix_checksum_calculation.patch b/net-misc/mcproxy/files/fix_checksum_calculation.patch
new file mode 100644
index 00000000000..2cbfb6590b7
--- /dev/null
+++ b/net-misc/mcproxy/files/fix_checksum_calculation.patch
@@ -0,0 +1,41 @@
+From 93b5ace42268160ebbfff4c61818fb15fa2d9b99 Mon Sep 17 00:00:00 2001
+From: Sebastian Woelke <Sebastian.Woelke@posteo.de>
+Date: Thu, 24 Aug 2017 14:41:50 +0200
+Subject: [PATCH] Fix checksum calculation
+
+---
+ mcproxy/src/utils/mroute_socket.cpp | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/mcproxy/src/utils/mroute_socket.cpp b/mcproxy/src/utils/mroute_socket.cpp
+index 61289dd..3a55359 100644
+--- a/src/utils/mroute_socket.cpp
++++ b/src/utils/mroute_socket.cpp
+@@ -157,17 +157,23 @@ u_int16_t mroute_socket::calc_checksum(const unsigned char* buf, int buf_size) c
+
+ u_int16_t* b = (u_int16_t*)buf;
+ int sum = 0;
++ int csum;
+
+ for (int i = 0; i < buf_size / 2; i++) {
+- ADD_SIGNED_NUM_U16(sum, b[i]);
+- //sum +=b[i];
++ sum +=b[i];
+ }
+
+ if (buf_size % 2 == 1) {
+- //sum += buf[buf_size-1];
+- ADD_SIGNED_NUM_U16(sum, buf[buf_size - 1]);
++ sum += buf[buf_size-1];
+ }
+
++ // fold checksum
++ csum = sum & 0xFFFF;
++ sum = sum >> 16;
++ sum += csum;
++ // fold again in case of overflow.
++ sum += sum >> 16;
++
+ return ~sum;
+ }
+
diff --git a/net-misc/mcproxy/files/mcproxy.confd b/net-misc/mcproxy/files/mcproxy.confd
new file mode 100644
index 00000000000..908bc353d4d
--- /dev/null
+++ b/net-misc/mcproxy/files/mcproxy.confd
@@ -0,0 +1,5 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Additional command line options
+# MCPROXY_OPTS=""
diff --git a/net-misc/mcproxy/files/mcproxy.initd b/net-misc/mcproxy/files/mcproxy.initd
new file mode 100644
index 00000000000..44efd721c54
--- /dev/null
+++ b/net-misc/mcproxy/files/mcproxy.initd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+config="/etc/${RC_SVCNAME}.conf"
+extra_commands="checkconfig"
+name="Mcproxy"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+command="mcproxy"
+command_background="true"
+command_args="${MCPROXY_OPTS} -f ${config}"
+command_args_checkconfig="-c"
+procname="${RC_SVCNAME}"
+
+checkconfig() {
+ ${command} ${command_args_checkconfig}
+}
+
+start_pre() {
+ if [ ! -f "${config}" ]; then
+ eerror "Please create ${config} before starting ${name}!"
+ return 1
+ else
+ return 0
+ fi
+}
diff --git a/net-misc/mcproxy/files/mcproxy.service b/net-misc/mcproxy/files/mcproxy.service
new file mode 100644
index 00000000000..0bad0f19cc8
--- /dev/null
+++ b/net-misc/mcproxy/files/mcproxy.service
@@ -0,0 +1,10 @@
+[Unit]
+After=network-online.target
+Description=Mcproxy
+
+[Service]
+ExecStart=/usr/bin/mcproxy -f /etc/mcproxy.conf
+Type=simple
+
+[Install]
+WantedBy=network.target
diff --git a/net-misc/mcproxy/mcproxy-1.1.1.ebuild b/net-misc/mcproxy/mcproxy-1.1.1.ebuild
new file mode 100644
index 00000000000..463944737b3
--- /dev/null
+++ b/net-misc/mcproxy/mcproxy-1.1.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit linux-info qmake-utils systemd
+
+DESCRIPTION="A multicast proxy for IGMP/MLD"
+HOMEPAGE="https://mcproxy.realmv6.org/ https://github.com/mcproxy/mcproxy"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="doc"
+
+DEPEND="dev-qt/qtcore:5
+ doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}/${P}/${PN}"
+
+PATCHES=( "${FILESDIR}/fix_checksum_calculation.patch" )
+
+CONFIG_CHECK="~IP_MULTICAST ~IP_MROUTE"
+
+src_prepare() {
+ # Change install path from '/usr/local/bin' to '/usr/bin'
+ sed -e 's/local//' -i mcproxy.pro || die
+
+ default
+}
+
+src_configure() {
+ eqmake5
+}
+
+src_compile() {
+ default
+
+ use doc && emake doc
+}
+
+src_install() {
+ emake INSTALL_ROOT="${ED%/}" install
+
+ insinto /etc
+ doins mcproxy.conf
+
+ newinitd "${FILESDIR}"/mcproxy.initd mcproxy
+ systemd_dounit "${FILESDIR}"/mcproxy.service
+
+ newconfd "${FILESDIR}"/mcproxy.confd mcproxy
+
+ use doc && dodoc -r ../docs/.
+}
diff --git a/net-misc/mcproxy/metadata.xml b/net-misc/mcproxy/metadata.xml
new file mode 100644
index 00000000000..e601c26a307
--- /dev/null
+++ b/net-misc/mcproxy/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ck+gentoo@bl4ckb0x.de</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ IGMP/MLD proxies offer the possibility option to combine
+ local multicast networks with a larger multicast infrastructure.
+ In contrast to multicast routers, proxies are lightweight and
+ do not require the support of a multicast routing protocol such as PIM or DVMRP.
+ A common use case is a local stub networks that interconnects with
+ a remote multicast routing domain, e.g. via a tunnel.
+ But it can also be used in PMIPv6 domain to enable multicast for sources and listeners (RFC 6224).
+ The Mcproxy meets the requirements of the IGMP/MLD proxying standard (RFC 4605)
+ and has additional functionalities. The multicast proxy can be instantiated multiple times,
+ is dynamically configurable at runtime, supports multiple upstreams and peering-interfaces
+ for a non hierarchical interconnection of multicast proxies.
+ </longdescription>
+ <upstream>
+ <bugs-to>https://github.com/mcproxy/mcproxy/issues</bugs-to>
+ <remote-id type="github">mcproxy/mcproxy</remote-id>
+ </upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/mcproxy/, net-misc/mcproxy/files/
@ 2020-09-20 16:50 Conrad Kostecki
0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2020-09-20 16:50 UTC (permalink / raw
To: gentoo-commits
commit: d434c5e1300bbfc46969178ab76d0c8471795c9b
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 16:47:52 2020 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 16:47:52 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d434c5e1
net-misc/mcproxy: fix compilation with clang
Closes: https://bugs.gentoo.org/740796
Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
net-misc/mcproxy/files/mcproxy-1.1.1-clang.patch | 93 ++++++++++++++++++++++++
net-misc/mcproxy/mcproxy-1.1.1-r1.ebuild | 5 +-
2 files changed, 97 insertions(+), 1 deletion(-)
diff --git a/net-misc/mcproxy/files/mcproxy-1.1.1-clang.patch b/net-misc/mcproxy/files/mcproxy-1.1.1-clang.patch
new file mode 100644
index 00000000000..e3db8f75409
--- /dev/null
+++ b/net-misc/mcproxy/files/mcproxy-1.1.1-clang.patch
@@ -0,0 +1,93 @@
+From 842e2859669f8a721c10c4f8d019f78f37e29e48 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conrad@kostecki.com>
+Date: Sun, 20 Sep 2020 16:28:39 +0200
+Subject: [PATCH] mcproxy/mcproxy.pro: fix compilation with clang
+
+If -L/usr/lib is being included, this will break compiling on 64-bit with clang.
+
+Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
+---
+ mcproxy/mcproxy.pro | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mcproxy.pro b/mcproxy.pro
+index 5216198..b576b3c 100644
+--- a/mcproxy.pro
++++ b/mcproxy.pro
+@@ -15,7 +15,7 @@ tester {
+ HEADERS += include/tester/config_map.hpp \
+ include/tester/tester.hpp
+
+- LIBS += -L/usr/lib -lboost_regex
++ LIBS += -lboost_regex
+ }
+
+ mcproxy { #default mode
+@@ -123,7 +123,7 @@ HEADERS += include/hamcast_logging.h \
+ include/parser/parser.hpp \
+ include/parser/interface.hpp
+
+-LIBS += -L/usr/lib -lpthread
++LIBS += -lpthread
+
+ QMAKE_CLEAN += thread*
+
+From 5b2f3e3e2ea23c3bb8e72a90e18177f69e350d37 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conrad@kostecki.com>
+Date: Sun, 20 Sep 2020 16:38:03 +0200
+Subject: [PATCH] include/proxy/message_queue.hpp: fix compilation with clang
+
+Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
+---
+ mcproxy/include/proxy/message_queue.hpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/include/proxy/message_queue.hpp b/include/proxy/message_queue.hpp
+index 347a616..ede35ab 100644
+--- a/include/proxy/message_queue.hpp
++++ b/include/proxy/message_queue.hpp
+@@ -101,7 +101,7 @@ bool message_queue<T, Compare>::is_empty() const
+ {
+ HC_LOG_TRACE("");
+
+- std::lock_guard<std::mutex> lock(m_global_lock);
++ std::lock_guard<std::mutex> lock(this->m_global_lock);
+
+ return m_q.empty();
+ }
+@@ -111,7 +111,7 @@ unsigned int message_queue<T, Compare>::size() const
+ {
+ HC_LOG_TRACE("");
+
+- std::lock_guard<std::mutex> lock(m_global_lock);
++ std::lock_guard<std::mutex> lock(this->m_global_lock);
+
+ return m_q.size();
+ }
+@@ -130,7 +130,7 @@ bool message_queue<T, Compare>::enqueue_loseable(const T& t)
+ HC_LOG_TRACE("");
+
+ {
+- std::unique_lock<std::mutex> lock(m_global_lock);
++ std::unique_lock<std::mutex> lock(this->m_global_lock);
+ if (m_q.size() < m_size) {
+ m_q.push(t);
+ } else {
+@@ -148,7 +148,7 @@ void message_queue<T, Compare>::enqueue(const T& t)
+ HC_LOG_TRACE("");
+
+ {
+- std::unique_lock<std::mutex> lock(m_global_lock);
++ std::unique_lock<std::mutex> lock(this->m_global_lock);
+ m_q.push(t);
+ }
+ cond_empty.notify_one();
+@@ -162,7 +162,7 @@ T message_queue<T, Compare>::dequeue(void)
+
+ T t;
+ {
+- std::unique_lock<std::mutex> lock(m_global_lock);
++ std::unique_lock<std::mutex> lock(this->m_global_lock);
+ cond_empty.wait(lock, [&]() {
+ return m_q.size() != 0;
+ });
diff --git a/net-misc/mcproxy/mcproxy-1.1.1-r1.ebuild b/net-misc/mcproxy/mcproxy-1.1.1-r1.ebuild
index 77232c3d992..e69713a190c 100644
--- a/net-misc/mcproxy/mcproxy-1.1.1-r1.ebuild
+++ b/net-misc/mcproxy/mcproxy-1.1.1-r1.ebuild
@@ -21,7 +21,10 @@ DEPEND="
S="${WORKDIR}/${P}/${PN}"
-PATCHES=( "${FILESDIR}/fix_checksum_calculation.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-clang.patch"
+ "${FILESDIR}/fix_checksum_calculation.patch"
+)
CONFIG_CHECK="~IP_MULTICAST ~IP_MROUTE"
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-20 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-20 16:50 [gentoo-commits] repo/gentoo:master commit in: net-misc/mcproxy/, net-misc/mcproxy/files/ Conrad Kostecki
-- strict thread matches above, loose matches on Subject: below --
2018-09-29 10:43 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox