Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/ubridge/, net-misc/ubridge/files/
Date: Wed, 21 Mar 2018 10:32:56
Message-Id: 1521628080.39abda0e971135151278cef6aad8acf83d02b881.mgorny@gentoo
1 commit: 39abda0e971135151278cef6aad8acf83d02b881
2 Author: Garri Djavadyan <g.djavadyan <AT> gmail <DOT> com>
3 AuthorDate: Sat Dec 23 14:27:31 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 21 10:28:00 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39abda0e
7
8 net-misc/ubridge: New package
9
10 uBridge is a simple application to create user-land bridges between
11 various technologies. Currently bridging between UDP tunnels, Ethernet
12 and TAP interfaces is supported. Packet capture is also supported.
13
14 Closes: https://bugs.gentoo.org/642070
15 Closes: https://github.com/gentoo/gentoo/pull/6611
16 Package-Manager: Portage-2.3.24, Repoman-2.3.6
17
18 net-misc/ubridge/Manifest | 1 +
19 .../files/ubridge-0.9.14-respect-flags.patch | 20 +++++++++
20 net-misc/ubridge/metadata.xml | 17 ++++++++
21 net-misc/ubridge/ubridge-0.9.14.ebuild | 51 ++++++++++++++++++++++
22 4 files changed, 89 insertions(+)
23
24 diff --git a/net-misc/ubridge/Manifest b/net-misc/ubridge/Manifest
25 new file mode 100644
26 index 00000000000..9af6c7d67bd
27 --- /dev/null
28 +++ b/net-misc/ubridge/Manifest
29 @@ -0,0 +1 @@
30 +DIST ubridge-0.9.14.tar.gz 63492 BLAKE2B 4c19bb79c264c9bec2ca39fea8b386817f6eb41d23b35f9fbd0a1407b45398ad5362bd76cbb81597438367a2af8d80308f13d3e8faa4e75c6173bbeb23da177d SHA512 7e92ca6ee8dd5815991c5d157278487cfad69710f0a63fc217d5d0e61678d272bf5a0d31b6afe25b1060df1ad13e229f1d573c03fecb1453167a9ff364283a5f
31
32 diff --git a/net-misc/ubridge/files/ubridge-0.9.14-respect-flags.patch b/net-misc/ubridge/files/ubridge-0.9.14-respect-flags.patch
33 new file mode 100644
34 index 00000000000..ab64aa7d6be
35 --- /dev/null
36 +++ b/net-misc/ubridge/files/ubridge-0.9.14-respect-flags.patch
37 @@ -0,0 +1,20 @@
38 +--- a/Makefile 2018-03-16 09:15:10.528245830 +0500
39 ++++ b/Makefile 2018-03-21 08:52:45.984204240 +0500
40 +@@ -40,7 +40,7 @@
41 +
42 + CC ?= gcc
43 +
44 +-CFLAGS = -O3 -Wall
45 ++CFLAGS += -Wall
46 +
47 + BINDIR = /usr/local/bin
48 +
49 +@@ -76,7 +76,7 @@
50 + ##############################
51 +
52 + $(NAME) : $(OBJ)
53 +- $(CC) -o $(NAME) $(OBJ) $(LIBS)
54 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(NAME) $(OBJ) $(LIBS)
55 +
56 + .PHONY: clean
57 +
58
59 diff --git a/net-misc/ubridge/metadata.xml b/net-misc/ubridge/metadata.xml
60 new file mode 100644
61 index 00000000000..fe85611a44d
62 --- /dev/null
63 +++ b/net-misc/ubridge/metadata.xml
64 @@ -0,0 +1,17 @@
65 +<?xml version="1.0" encoding="UTF-8"?>
66 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
67 +<pkgmetadata>
68 + <maintainer type="person">
69 + <email>g.djavadyan@×××××.com</email>
70 + <name>Garri Djavadyan</name>
71 + </maintainer>
72 + <maintainer type="project">
73 + <email>proxy-maint@g.o</email>
74 + <name>Proxy Maintainers</name>
75 + </maintainer>
76 + <longdescription>
77 + uBridge is a simple application to create user-land bridges between
78 + various technologies. Currently bridging between UDP tunnels, Ethernet
79 + and TAP interfaces is supported. Packet capture is also supported.
80 + </longdescription>
81 +</pkgmetadata>
82
83 diff --git a/net-misc/ubridge/ubridge-0.9.14.ebuild b/net-misc/ubridge/ubridge-0.9.14.ebuild
84 new file mode 100644
85 index 00000000000..48fb218aebb
86 --- /dev/null
87 +++ b/net-misc/ubridge/ubridge-0.9.14.ebuild
88 @@ -0,0 +1,51 @@
89 +# Copyright 1999-2018 Gentoo Foundation
90 +# Distributed under the terms of the GNU General Public License v2
91 +
92 +EAPI=6
93 +
94 +inherit fcaps toolchain-funcs user
95 +
96 +DESCRIPTION="Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces"
97 +HOMEPAGE="https://github.com/GNS3/ubridge"
98 +SRC_URI="https://github.com/GNS3/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
99 +
100 +LICENSE="GPL-3"
101 +SLOT="0"
102 +KEYWORDS="~amd64"
103 +
104 +RDEPEND="
105 + net-libs/libpcap
106 + dev-libs/iniparser:=
107 +"
108 +DEPEND="
109 + ${RDEPEND}
110 +"
111 +
112 +PATCHES=( "${FILESDIR}"/${P}-respect-flags.patch )
113 +
114 +pkg_setup() {
115 + enewgroup ubridge
116 +}
117 +
118 +src_configure() {
119 + export SYSTEM_INIPARSER=1
120 +}
121 +
122 +src_compile() {
123 + emake CC="$(tc-getCC)"
124 +}
125 +
126 +src_install() {
127 + exeinto /usr/bin
128 + exeopts -m 710 -g ubridge
129 + doexe ubridge
130 + dodoc README.rst
131 +}
132 +
133 +pkg_postinst() {
134 + fcaps -g ubridge -m 4710 -M 0710 cap_net_raw,cap_net_admin \
135 + "${EROOT}"/usr/bin/ubridge
136 +
137 + ewarn "NOTE: To read packets from the network interfaces with ubridge as"
138 + ewarn "normal user you have to add trusted users to the ubridge group."
139 +}