From: cinerea0 <cinerea0@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: opensnitch-1.3.6
Date: Mon, 13 Sep 2021 05:57:17 +0200 [thread overview]
Message-ID: <20210913035717.S7M9JLeTDj_rHHYtzCqhJLH7LUv1FuuBLGABnR8zEqg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-32730@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]
There is an updated pull request by cinerea0 against master on the void-packages repository
https://github.com/cinerea0/void-packages snitch
https://github.com/void-linux/void-packages/pull/32730
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
-->
---
Closes #28819. Picks up where #29849 left off before being closed by the author.
A patch file from https://github.com/void-linux/void-packages/pull/32730.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-snitch-32730.patch --]
[-- Type: text/x-diff, Size: 5097 bytes --]
From 82f0bb3e8ab05d8c80f0326caa8372c5099ff32f Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Sun, 12 Sep 2021 23:56:55 -0400
Subject: [PATCH] New package: opensnitch-1.4.0
---
srcpkgs/opensnitch/files/opensnitchd/run | 4 ++
srcpkgs/opensnitch/patches/cc-check.patch | 13 ++++
srcpkgs/opensnitch/patches/musl-int.patch | 16 +++++
srcpkgs/opensnitch/template | 80 +++++++++++++++++++++++
4 files changed, 113 insertions(+)
create mode 100644 srcpkgs/opensnitch/files/opensnitchd/run
create mode 100644 srcpkgs/opensnitch/patches/cc-check.patch
create mode 100644 srcpkgs/opensnitch/patches/musl-int.patch
create mode 100644 srcpkgs/opensnitch/template
diff --git a/srcpkgs/opensnitch/files/opensnitchd/run b/srcpkgs/opensnitch/files/opensnitchd/run
new file mode 100644
index 000000000000..2c1855eef621
--- /dev/null
+++ b/srcpkgs/opensnitch/files/opensnitchd/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+[ -r conf ] && . ./conf
+exec opensnitchd ${OPTS:--rules-path /etc/opensnitchd/rules}
diff --git a/srcpkgs/opensnitch/patches/cc-check.patch b/srcpkgs/opensnitch/patches/cc-check.patch
new file mode 100644
index 000000000000..004f0861a7d9
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/cc-check.patch
@@ -0,0 +1,13 @@
+diff --git a/daemon/netfilter/queue.go b/daemon/netfilter/queue.go
+index 3797486baf..4ee09d68b5 100644
+--- a/daemon/netfilter/queue.go
++++ b/daemon/netfilter/queue.go
+@@ -3,7 +3,7 @@ package netfilter
+ /*
+ #cgo pkg-config: libnetfilter_queue
+ #cgo CFLAGS: -Wall -I/usr/include
+-#cgo LDFLAGS: -L/usr/lib64/ -ldl
++#cgo LDFLAGS: -L/usr/lib64 -ldl
+
+ #include "queue.h"
+ */
diff --git a/srcpkgs/opensnitch/patches/musl-int.patch b/srcpkgs/opensnitch/patches/musl-int.patch
new file mode 100644
index 000000000000..99a23ff22674
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/musl-int.patch
@@ -0,0 +1,16 @@
+diff --git a/daemon/netfilter/queue.h b/daemon/netfilter/queue.h
+index 64c3ea7c0c..2ced3bb39e 100644
+--- a/daemon/netfilter/queue.h
++++ b/daemon/netfilter/queue.h
+@@ -14,6 +14,11 @@
+ #include <linux/netfilter.h>
+ #include <libnetfilter_queue/libnetfilter_queue.h>
+
++typedef unsigned int uint;
++typedef uint8_t u_int8_t;
++typedef uint16_t u_int16_t;
++typedef uint32_t u_int32_t;
++
+ typedef struct {
+ uint verdict;
+ uint mark;
diff --git a/srcpkgs/opensnitch/template b/srcpkgs/opensnitch/template
new file mode 100644
index 000000000000..43b570c59091
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,80 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.4.0
+revision=1
+build_wrksrc="daemon"
+build_style=go
+go_import_path="github.com/evilsocket/opensnitch/daemon"
+go_package="${go_import_path}"
+go_mod_mode="mod"
+hostmakedepends="git pkg-config protobuf28 python3-PyQt5-devel-tools
+ python3-setuptools"
+makedepends="libnetfilter_queue-devel python3-devel python3-grpcio-tools"
+depends="python3-googleapis-common-protos python3-grpcio python3-slugify
+ python3-inotify python3-PyQt5 python3-PyQt5-sql qt5-wayland qt5-plugin-sqlite"
+conf_files="/etc/opensnitchd/default-config.json
+ /etc/opensnitchd/system-fw.json"
+make_dirs="/etc/opensnitchd/rules/ 0755 root root
+ /etc/opensnitchd/ 0755 root root"
+short_desc="GNU/Linux port of the Little Snitch application firewall"
+maintainer="cinerea0 <cinerea0@protonmail.com>"
+license="GPL-3.0-only"
+homepage="https://github.com/evilsocket/opensnitch"
+distfiles="https://github.com/evilsocket/opensnitch/archive/refs/tags/v${version}.tar.gz"
+checksum=bd8e4a15653de22121ce2a5013952c8becb2cb965448780ca53da7a453a74be1
+
+_py() {
+ 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
+}
+
+pre_build() {
+ cd ..
+ go get github.com/golang/protobuf/protoc-gen-go
+ export PATH=$PATH:$GOPATH/bin
+ make protocol
+ cd ui
+ pyrcc5 -o opensnitch/resources_rc.py opensnitch/res/resources.qrc
+ cd ../daemon
+ go mod vendor
+}
+
+post_build() {
+ # build ui
+ _py build
+}
+
+do_install() {
+ # rename bin daemon to opensnitchd
+ for f in ${GOPATH}/bin/* ${GOPATH}/bin/**/*; do
+ if [ -f "$f" ] && [ -x "$f" ]; then
+ vbin "$f" opensnitchd
+ break
+ fi
+ done
+
+ vinstall "default-config.json" 644 "/etc/opensnitchd/"
+ vinstall "system-fw.json" 644 "/etc/opensnitchd/"
+ vsv opensnitchd
+
+ #install ui
+ _py
+}
next prev parent reply other threads:[~2021-09-13 3:57 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-28 5:25 [PR PATCH] " cinerea0
2021-09-12 12:23 ` apirusKde
2021-09-13 3:57 ` cinerea0 [this message]
2021-09-21 18:36 ` [PR PATCH] [Updated] New package: opensnitch-1.4.0 cinerea0
2021-09-21 18:40 ` cinerea0
2021-10-07 18:53 ` cinerea0
2021-10-07 19:01 ` [PR PATCH] [Updated] New package: opensnitch-1.4.1 cinerea0
2021-10-07 19:08 ` cinerea0
2021-10-08 5:23 ` cinerea0
2021-10-12 3:42 ` cinerea0
2021-10-12 3:49 ` cinerea0
2021-10-12 3:56 ` cinerea0
2021-10-12 4:12 ` cinerea0
2021-10-12 4:26 ` cinerea0
2021-10-12 16:07 ` cinerea0
2021-10-12 17:52 ` cinerea0
2021-10-13 0:09 ` cinerea0
2021-10-13 0:19 ` cinerea0
2021-10-13 0:52 ` ericonr
2021-10-13 3:09 ` [PR PATCH] [Updated] " cinerea0
2021-10-13 4:50 ` cinerea0
2021-10-27 14:12 ` [PR PATCH] [Updated] " cinerea0
2021-10-27 14:17 ` cinerea0
2021-11-05 2:56 ` cinerea0
2021-11-12 4:54 ` New package: opensnitch-1.4.2 cinerea0
2021-11-25 0:20 ` [PR PATCH] [Updated] " cinerea0
2022-02-05 2:25 ` [PR PATCH] [Updated] New package: opensnitch-1.4.3 cinerea0
2022-02-05 3:12 ` [PR PATCH] [Updated] New package: opensnitch-1.5.0 cinerea0
2022-02-06 22:59 ` [PR REVIEW] " ericonr
2022-02-06 22:59 ` ericonr
2022-02-06 22:59 ` ericonr
2022-02-07 1:30 ` cinerea0
2022-02-07 2:27 ` ericonr
2022-02-07 2:27 ` ericonr
2022-02-07 4:23 ` [PR PATCH] [Updated] " cinerea0
2022-02-07 4:42 ` cinerea0
2022-02-07 4:52 ` [PR REVIEW] " cinerea0
2022-02-20 2:30 ` cinerea0
2022-06-03 2:11 ` github-actions
2022-06-04 2:40 ` [PR PATCH] [Updated] " cinerea0
2022-06-04 2:56 ` [PR PATCH] [Updated] New package: opensnitch-1.5.1 cinerea0
2022-06-04 3:11 ` cinerea0
2022-06-05 22:14 ` cinerea0
2022-09-04 2:16 ` github-actions
2022-09-05 3:02 ` cinerea0
2022-12-06 2:29 ` github-actions
2022-12-16 0:35 ` cinerea0
2023-03-16 1:57 ` github-actions
2023-06-16 1:59 ` github-actions
2023-06-29 14:24 ` [PR PATCH] [Updated] " cinerea0
2023-06-29 14:25 ` cinerea0
2023-09-29 1:45 ` New package: opensnitch-1.6.0 github-actions
2023-10-13 1:46 ` [PR PATCH] [Closed]: " github-actions
2024-01-26 2:41 ` jchook
2024-01-26 2:43 ` cinerea0
-- strict thread matches above, loose matches on Subject: below --
2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
2021-03-29 13:48 ` [PR PATCH] [Updated] " itsanubhavkini
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=20210913035717.S7M9JLeTDj_rHHYtzCqhJLH7LUv1FuuBLGABnR8zEqg@z \
--to=cinerea0@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).