Github messages for voidlinux
 help / color / mirror / Atom feed
From: itsanubhavkini <itsanubhavkini@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] New package: opensnitch-1.3.6
Date: Thu, 01 Apr 2021 07:45:53 +0200	[thread overview]
Message-ID: <20210401054553.waKw-eYOwq6m5OQKCW6sFfccL91g3Fs8KlYOOhc0YRM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29849@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]

There is an updated pull request by itsanubhavkini against master on the void-packages repository

https://github.com/itsanubhavkini/void-packages opensnitch
https://github.com/void-linux/void-packages/pull/29849

[WIP] New package: opensnitch-1.3.6
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29849.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opensnitch-29849.patch --]
[-- Type: text/x-diff, Size: 4215 bytes --]

From ec626db8d960df9d195e4c2248149dfefcb7019c Mon Sep 17 00:00:00 2001
From: Anubhav Kini <anubhavkini@gmail.com>
Date: Thu, 1 Apr 2021 11:11:34 +0530
Subject: [PATCH] New package: opensnitch-1.3.6

---
 srcpkgs/opensnitch-ui                    |  1 +
 srcpkgs/opensnitch/files/opensnitchd/run |  2 +
 srcpkgs/opensnitch/template              | 84 ++++++++++++++++++++++++
 3 files changed, 87 insertions(+)
 create mode 120000 srcpkgs/opensnitch-ui
 create mode 100644 srcpkgs/opensnitch/files/opensnitchd/run
 create mode 100644 srcpkgs/opensnitch/template

diff --git a/srcpkgs/opensnitch-ui b/srcpkgs/opensnitch-ui
new file mode 120000
index 000000000000..86476d82b103
--- /dev/null
+++ b/srcpkgs/opensnitch-ui
@@ -0,0 +1 @@
+opensnitch
\ No newline at end of file
diff --git a/srcpkgs/opensnitch/files/opensnitchd/run b/srcpkgs/opensnitch/files/opensnitchd/run
new file mode 100644
index 000000000000..17d593fc5238
--- /dev/null
+++ b/srcpkgs/opensnitch/files/opensnitchd/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec opensnitchd -rules-path /etc/opensnitchd/rules
diff --git a/srcpkgs/opensnitch/template b/srcpkgs/opensnitch/template
new file mode 100644
index 000000000000..3fecfee9d699
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,84 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.3.6
+revision=1
+conf_files="/etc/${pkgname}d/default-config.json
+ /etc/${pkgname}d/system-fw.json"
+make_dirs="/etc/${pkgname}d/rules/ 0755 root root
+ /etc/${pkgname}d/ 0755 root root"
+hostmakedepends="go pkg-config python3-setuptools"
+makedepends="libnetfilter_queue-devel"
+short_desc="GNU/Linux port of the Little Snitch application firewall"
+maintainer="Anubhav Kini <anubhavkini@gmail.com>"
+license="GPL-3.0-only"
+homepage="https://github.com/evilsocket/opensnitch"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=a02e49a5ed79db8f21788188f16a28684d5f54f583bb4d338e3386484ee1663a
+
+do_build() {
+	# opensnitchd
+	cd daemon
+	go build -p "$XBPS_MAKEJOBS" -buildmode pie -mod mod -x -o opensnitchd
+
+	# opensnitch-ui
+	cd ../ui
+	if [ -n "$CROSS_BUILD" ]; then
+		PYPREFIX="$XBPS_CROSS_BASE"
+		CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include"
+		LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_lib} -L${XBPS_CROSS_BASE}/usr/lib"
+		CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
+		LDSHARED="${CC} -shared $LDFLAGS"
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			_PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+		env CC="$CC" LDSHARED="$LDSHARED" \
+			PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \
+			PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib} \
+			_PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME" \
+			LDFLAGS="$LDFLAGS" python3 setup.py build ${make_build_args}
+	else
+		python3 setup.py build ${make_build_args}
+	fi
+}
+
+do_install() {
+	# opensnitchd
+	vbin daemon/opensnitchd
+	vsv opensnitchd
+	vinstall daemon/default-config.json 0644 "/etc/${pkgname}d/"
+	vinstall daemon/system-fw.json 0644 "/etc/${pkgname}d/"
+
+	# opensnitch-ui
+	cd ui
+	if [ -n "$CROSS_BUILD" ]; then
+		PYPREFIX="$XBPS_CROSS_BASE"
+		CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include"
+		LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_lib} -L${XBPS_CROSS_BASE}/usr/lib"
+		CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
+		LDSHARED="${CC} -shared $LDFLAGS"
+		for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
+			f=${f##*/}
+			_PYTHON_SYSCONFIGDATA_NAME=${f%.py}
+		done
+		env CC="$CC" LDSHARED="$LDSHARED" \
+			PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \
+			PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib} \
+			_PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME" \
+			LDFLAGS="$LDFLAGS" python3 setup.py \
+				install --prefix=/usr --root=${DESTDIR} ${make_install_args}
+	else
+		python3 setup.py install --prefix=/usr --root=${DESTDIR} ${make_install_args}
+	fi
+}
+
+opensnitch-ui_package() {
+	short_desc+=" - UI"
+	depends="${sourcepkg}-${version}_${revision} python3-grpcio-tools python3-slugify
+	 python3-inotify python3-PyQt5 python3-PyQt5-sql qt5-wayland qt5-plugin-sqlite"
+	pkg_install() {
+		vmove usr/bin/opensnitch-ui
+		vmove usr/lib
+		vmove usr/share
+	}
+}

  parent reply	other threads:[~2021-04-01  5:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 11:16 [PR PATCH] " itsanubhavkini
2021-03-29 12:19 ` FollieHiyuki
2021-03-29 12:24 ` ericonr
2021-03-29 12:24 ` ericonr
2021-03-29 12:24 ` ericonr
2021-03-29 13:48 ` [PR PATCH] [Updated] " itsanubhavkini
2021-03-29 13:50 ` Duncaen
2021-03-29 13:54 ` itsanubhavkini
2021-03-29 13:55 ` itsanubhavkini
2021-03-29 13:58 ` itsanubhavkini
2021-03-29 14:02 ` itsanubhavkini
2021-03-29 14:05 ` Duncaen
2021-03-29 14:07 ` itsanubhavkini
2021-03-29 14:24 ` ericonr
2021-03-29 14:34 ` Duncaen
2021-03-29 14:35 ` Duncaen
2021-04-01  5:45 ` itsanubhavkini [this message]
2021-05-12  6:39 ` [PR PATCH] [Updated] [WIP] " anubhavkini
2021-05-12  7:02 ` anubhavkini
2021-05-12  7:27 ` anubhavkini
2021-05-12  8:34 ` anubhavkini
2021-05-12  8:53 ` anubhavkini
2021-05-12  8:59 ` anubhavkini
2021-05-13  4:15 ` anubhavkini
2021-05-13  6:07 ` ericonr
2021-06-03  5:54 ` [PR PATCH] [Closed]: " anubhavkini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210401054553.waKw-eYOwq6m5OQKCW6sFfccL91g3Fs8KlYOOhc0YRM@z \
    --to=itsanubhavkini@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).