Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: opensnitch-1.3.6
@ 2021-03-29 11:16 itsanubhavkini
  2021-03-29 12:19 ` FollieHiyuki
                   ` (24 more replies)
  0 siblings, 25 replies; 27+ messages in thread
From: itsanubhavkini @ 2021-03-29 11:16 UTC (permalink / raw)
  To: ml

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

There is a new 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

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: 3802 bytes --]

From 67d378c3bc72743397662585460bcec3e7d27b9e Mon Sep 17 00:00:00 2001
From: Anubhav Kini <anubhavkini@gmail.com>
Date: Mon, 29 Mar 2021 16:39:00 +0530
Subject: [PATCH] Add opensnitch packages

---
 srcpkgs/opensnitch-ui/template            | 16 +++++++++++++
 srcpkgs/opensnitch/template               | 10 ++++++++
 srcpkgs/opensnitchd/files/opensnitchd/run |  2 ++
 srcpkgs/opensnitchd/template              | 29 +++++++++++++++++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/opensnitch-ui/template
 create mode 100644 srcpkgs/opensnitch/template
 create mode 100644 srcpkgs/opensnitchd/files/opensnitchd/run
 create mode 100644 srcpkgs/opensnitchd/template

diff --git a/srcpkgs/opensnitch-ui/template b/srcpkgs/opensnitch-ui/template
new file mode 100644
index 000000000000..f8f881c1c98c
--- /dev/null
+++ b/srcpkgs/opensnitch-ui/template
@@ -0,0 +1,16 @@
+# Template file for 'opensnitch-ui'
+pkgname=opensnitch-ui
+version=1.3.6
+revision=1
+wrksrc="opensnitch-${version}"
+build_wrksrc="ui"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="opensnitchd-${version}_${revision} python3-grpcio-tools python3-slugify
+ python3-inotify python3-PyQt5 python3-PyQt5-sql qt5-wayland qt5-plugin-sqlite"
+short_desc="GNU/Linux port of the Little Snitch application firewall - UI"
+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
diff --git a/srcpkgs/opensnitch/template b/srcpkgs/opensnitch/template
new file mode 100644
index 000000000000..047701709735
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,10 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.3.6
+revision=1
+build_style=meta
+depends="opensnitchd-${version}_${revision} opensnitch-ui-${version}_${revision}"
+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"
diff --git a/srcpkgs/opensnitchd/files/opensnitchd/run b/srcpkgs/opensnitchd/files/opensnitchd/run
new file mode 100644
index 000000000000..17d593fc5238
--- /dev/null
+++ b/srcpkgs/opensnitchd/files/opensnitchd/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec opensnitchd -rules-path /etc/opensnitchd/rules
diff --git a/srcpkgs/opensnitchd/template b/srcpkgs/opensnitchd/template
new file mode 100644
index 000000000000..0c8c1ee8d73b
--- /dev/null
+++ b/srcpkgs/opensnitchd/template
@@ -0,0 +1,29 @@
+# Template file for 'opensnitchd'
+pkgname=opensnitchd
+version=1.3.6
+revision=1
+wrksrc="opensnitch-${version}"
+build_wrksrc="daemon"
+build_style=go
+go_import_path="github.com/evilsocket/opensnitch/daemon"
+go_package="${go_import_path} ${go_import_path}/firewall ${go_import_path}/ui
+ ${go_import_path}/ui/protocol ${go_import_path}/dns ${go_import_path}/conman
+ ${go_import_path}/netlink"
+go_mod_mode="mod"
+hostmakedepends="pkg-config"
+makedepends="libnetfilter_queue-devel"
+conf_files="/etc/${pkgname}/default-config.json
+ /etc/${pkgname}/system-fw.json"
+make_dirs="/etc/${pkgname}/rules 0755 root root"
+short_desc="GNU/Linux port of the Little Snitch application firewall - daemon"
+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_install() {
+	vbin ${GOPATH}/bin/daemon opensnitchd
+	vinstall "default-config.json" 644 "/etc/${pkgname}/"
+	vinstall "system-fw.json" 644 "/etc/${pkgname}/"
+	vsv opensnitchd
+}

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
@ 2021-03-29 12:19 ` FollieHiyuki
  2021-03-29 12:24 ` ericonr
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: FollieHiyuki @ 2021-03-29 12:19 UTC (permalink / raw)
  To: ml

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

New comment by FollieHiyuki on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809331508

Comment:
Should closes #28819

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
  2021-03-29 12:19 ` FollieHiyuki
@ 2021-03-29 12:24 ` ericonr
  2021-03-29 12:24 ` ericonr
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-03-29 12:24 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809334719

Comment:
Should be one `New package: pkgname-version` commit per package.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 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
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-03-29 12:24 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809334749

Comment:
Should be one `New package: pkgname-version` commit per package.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (2 preceding siblings ...)
  2021-03-29 12:24 ` ericonr
@ 2021-03-29 12:24 ` ericonr
  2021-03-29 13:48 ` [PR PATCH] [Updated] " itsanubhavkini
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-03-29 12:24 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809334749

Comment:
Should be one `New package: pkgname-version` commit per package.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (3 preceding siblings ...)
  2021-03-29 12:24 ` ericonr
@ 2021-03-29 13:48 ` itsanubhavkini
  2021-03-29 13:50 ` Duncaen
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: itsanubhavkini @ 2021-03-29 13:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1613 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

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: 3802 bytes --]

From 67d378c3bc72743397662585460bcec3e7d27b9e Mon Sep 17 00:00:00 2001
From: Anubhav Kini <anubhavkini@gmail.com>
Date: Mon, 29 Mar 2021 16:39:00 +0530
Subject: [PATCH] Add opensnitch packages

---
 srcpkgs/opensnitch-ui/template            | 16 +++++++++++++
 srcpkgs/opensnitch/template               | 10 ++++++++
 srcpkgs/opensnitchd/files/opensnitchd/run |  2 ++
 srcpkgs/opensnitchd/template              | 29 +++++++++++++++++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/opensnitch-ui/template
 create mode 100644 srcpkgs/opensnitch/template
 create mode 100644 srcpkgs/opensnitchd/files/opensnitchd/run
 create mode 100644 srcpkgs/opensnitchd/template

diff --git a/srcpkgs/opensnitch-ui/template b/srcpkgs/opensnitch-ui/template
new file mode 100644
index 000000000000..f8f881c1c98c
--- /dev/null
+++ b/srcpkgs/opensnitch-ui/template
@@ -0,0 +1,16 @@
+# Template file for 'opensnitch-ui'
+pkgname=opensnitch-ui
+version=1.3.6
+revision=1
+wrksrc="opensnitch-${version}"
+build_wrksrc="ui"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="opensnitchd-${version}_${revision} python3-grpcio-tools python3-slugify
+ python3-inotify python3-PyQt5 python3-PyQt5-sql qt5-wayland qt5-plugin-sqlite"
+short_desc="GNU/Linux port of the Little Snitch application firewall - UI"
+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
diff --git a/srcpkgs/opensnitch/template b/srcpkgs/opensnitch/template
new file mode 100644
index 000000000000..047701709735
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,10 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.3.6
+revision=1
+build_style=meta
+depends="opensnitchd-${version}_${revision} opensnitch-ui-${version}_${revision}"
+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"
diff --git a/srcpkgs/opensnitchd/files/opensnitchd/run b/srcpkgs/opensnitchd/files/opensnitchd/run
new file mode 100644
index 000000000000..17d593fc5238
--- /dev/null
+++ b/srcpkgs/opensnitchd/files/opensnitchd/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec opensnitchd -rules-path /etc/opensnitchd/rules
diff --git a/srcpkgs/opensnitchd/template b/srcpkgs/opensnitchd/template
new file mode 100644
index 000000000000..0c8c1ee8d73b
--- /dev/null
+++ b/srcpkgs/opensnitchd/template
@@ -0,0 +1,29 @@
+# Template file for 'opensnitchd'
+pkgname=opensnitchd
+version=1.3.6
+revision=1
+wrksrc="opensnitch-${version}"
+build_wrksrc="daemon"
+build_style=go
+go_import_path="github.com/evilsocket/opensnitch/daemon"
+go_package="${go_import_path} ${go_import_path}/firewall ${go_import_path}/ui
+ ${go_import_path}/ui/protocol ${go_import_path}/dns ${go_import_path}/conman
+ ${go_import_path}/netlink"
+go_mod_mode="mod"
+hostmakedepends="pkg-config"
+makedepends="libnetfilter_queue-devel"
+conf_files="/etc/${pkgname}/default-config.json
+ /etc/${pkgname}/system-fw.json"
+make_dirs="/etc/${pkgname}/rules 0755 root root"
+short_desc="GNU/Linux port of the Little Snitch application firewall - daemon"
+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_install() {
+	vbin ${GOPATH}/bin/daemon opensnitchd
+	vinstall "default-config.json" 644 "/etc/${pkgname}/"
+	vinstall "system-fw.json" 644 "/etc/${pkgname}/"
+	vsv opensnitchd
+}

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (4 preceding siblings ...)
  2021-03-29 13:48 ` [PR PATCH] [Updated] " itsanubhavkini
@ 2021-03-29 13:50 ` Duncaen
  2021-03-29 13:54 ` itsanubhavkini
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2021-03-29 13:50 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809393124

Comment:
Is there a reason to split this into a meta package and a `d` package?
IMHO should should just be `opensnitch` containing the daemon and maybe a subpackage for the ui.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (5 preceding siblings ...)
  2021-03-29 13:50 ` Duncaen
@ 2021-03-29 13:54 ` itsanubhavkini
  2021-03-29 13:55 ` itsanubhavkini
                   ` (17 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: itsanubhavkini @ 2021-03-29 13:54 UTC (permalink / raw)
  To: ml

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

New comment by itsanubhavkini on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809396068

Comment:
It was easier since opensnitchd uses the go build-style and opensnitch-ui uses python3-module build-style.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (6 preceding siblings ...)
  2021-03-29 13:54 ` itsanubhavkini
@ 2021-03-29 13:55 ` itsanubhavkini
  2021-03-29 13:58 ` itsanubhavkini
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: itsanubhavkini @ 2021-03-29 13:55 UTC (permalink / raw)
  To: ml

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

New comment by itsanubhavkini on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809396068

Comment:
It was easier since `opensnitchd` uses the `go` build-style and `opensnitch-ui` uses `python3-module` build-style.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (7 preceding siblings ...)
  2021-03-29 13:55 ` itsanubhavkini
@ 2021-03-29 13:58 ` itsanubhavkini
  2021-03-29 14:02 ` itsanubhavkini
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: itsanubhavkini @ 2021-03-29 13:58 UTC (permalink / raw)
  To: ml

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

New comment by itsanubhavkini on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809399136

Comment:
> IMHO should should just be `opensnitch` containing the daemon and maybe a subpackage for the ui.

Can subpackages have a different build-style from the source package?


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (8 preceding siblings ...)
  2021-03-29 13:58 ` itsanubhavkini
@ 2021-03-29 14:02 ` itsanubhavkini
  2021-03-29 14:05 ` Duncaen
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: itsanubhavkini @ 2021-03-29 14:02 UTC (permalink / raw)
  To: ml

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

New comment by itsanubhavkini on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809396068

Comment:
>Is there a reason to split this into a meta package and a d package?

It was easier since `opensnitchd` uses the `go` build-style and `opensnitch-ui` uses `python3-module` build-style.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (9 preceding siblings ...)
  2021-03-29 14:02 ` itsanubhavkini
@ 2021-03-29 14:05 ` Duncaen
  2021-03-29 14:07 ` itsanubhavkini
                   ` (13 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2021-03-29 14:05 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809404452

Comment:
No subpackages just move files from the main package, you would have to build it in the main package so you would have to do your own do_configure/do_build/do_install to build both and then move files into sub packages.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (10 preceding siblings ...)
  2021-03-29 14:05 ` Duncaen
@ 2021-03-29 14:07 ` itsanubhavkini
  2021-03-29 14:24 ` ericonr
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: itsanubhavkini @ 2021-03-29 14:07 UTC (permalink / raw)
  To: ml

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

New comment by itsanubhavkini on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809406394

Comment:
Alright, I'll try that.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (11 preceding siblings ...)
  2021-03-29 14:07 ` itsanubhavkini
@ 2021-03-29 14:24 ` ericonr
  2021-03-29 14:34 ` Duncaen
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-03-29 14:24 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809421922

Comment:
@Duncaen maybe make one package for daemon and one for UI, to avoid having to duplicate most of the build logic? And make the daemon depend on the UI, if that makes sense.

I agree on the meta not being necessary. It's unfortunate that they use the same distfiles for both... If we go the route of separate packages, I'd add a comment to each template about keeping in sync with the other.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (12 preceding siblings ...)
  2021-03-29 14:24 ` ericonr
@ 2021-03-29 14:34 ` Duncaen
  2021-03-29 14:35 ` Duncaen
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2021-03-29 14:34 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809430607

Comment:
The separation between ui and daemon doesn't make a lot of sense and becomes cyclic if we add the dependencies on each other, which would be the only correct way to ensure that both are installed and at the same way.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (13 preceding siblings ...)
  2021-03-29 14:34 ` Duncaen
@ 2021-03-29 14:35 ` Duncaen
  2021-04-01  5:45 ` [PR PATCH] [Updated] [WIP] " itsanubhavkini
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2021-03-29 14:35 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-809430607

Comment:
The separation between ui and daemon doesn't make a lot of sense and becomes cyclic if we add the dependencies on each other, which would be the only correct way to ensure that both are installed and at the same version.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (14 preceding siblings ...)
  2021-03-29 14:35 ` Duncaen
@ 2021-04-01  5:45 ` itsanubhavkini
  2021-05-12  6:39 ` anubhavkini
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: itsanubhavkini @ 2021-04-01  5:45 UTC (permalink / raw)
  To: ml

[-- 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
+	}
+}

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (15 preceding siblings ...)
  2021-04-01  5:45 ` [PR PATCH] [Updated] [WIP] " itsanubhavkini
@ 2021-05-12  6:39 ` anubhavkini
  2021-05-12  7:02 ` anubhavkini
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: anubhavkini @ 2021-05-12  6:39 UTC (permalink / raw)
  To: ml

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

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

https://github.com/anubhavkini/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: 3303 bytes --]

From 8af27cd619d47c3a250fdb83b6b09b971aa5d263 Mon Sep 17 00:00:00 2001
From: Anubhav Kini <anubhavkini@gmail.com>
Date: Wed, 12 May 2021 12:08:45 +0530
Subject: [PATCH] New package: opensnitch-1.3.6

---
 srcpkgs/opensnitch/files/opensnitch/run |  3 ++
 srcpkgs/opensnitch/template             | 72 +++++++++++++++++++++++++
 2 files changed, 75 insertions(+)
 create mode 100644 srcpkgs/opensnitch/files/opensnitch/run
 create mode 100644 srcpkgs/opensnitch/template

diff --git a/srcpkgs/opensnitch/files/opensnitch/run b/srcpkgs/opensnitch/files/opensnitch/run
new file mode 100644
index 000000000000..d9aa34169f54
--- /dev/null
+++ b/srcpkgs/opensnitch/files/opensnitch/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec opensnitchd ${OPTS:--rules-path /etc/opensnitchd/rules}
diff --git a/srcpkgs/opensnitch/template b/srcpkgs/opensnitch/template
new file mode 100644
index 000000000000..a150e7850d9f
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,72 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.3.6
+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="pkg-config python3-setuptools"
+makedepends="libnetfilter_queue-devel"
+depends="python3-grpcio-tools python3-slugify python3-inotify
+ python3-PyQt5 python3-PyQt5-sql qt5-wayland qt5-plugin-sqlite"
+conf_files="/etc/opensnitch/default-config.json
+ /etc/opensnitch/system-fw.json"
+make_dirs="/etc/opensnitch/rules/ 0755 root root
+ /etc/opensnitch/ 0755 root root"
+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
+
+_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
+}
+
+post_build() {
+	# build ui
+	_py build
+}
+
+do_install() {
+	# rename bin daemon to opensnitch
+	if [ -f "${GOPATH}/bin/daemon" ]; then
+		vbin "${GOPATH}/bin/daemon" opensnitch
+	else
+		for d in ${GOPATH}/bin/**; do
+			if [ -f "${GOPATH}/bin/$d/daemon" ]; then
+				vbin "${GOPATH}/bin/$d/daemon" opensnitch
+				break
+			fi
+		done
+	fi
+
+	vinstall "default-config.json" 644 "/etc/${pkgname}/"
+	vinstall "system-fw.json" 644 "/etc/${pkgname}/"
+	vsv opensnitch
+
+	#install ui
+	_py
+}

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (16 preceding siblings ...)
  2021-05-12  6:39 ` anubhavkini
@ 2021-05-12  7:02 ` anubhavkini
  2021-05-12  7:27 ` anubhavkini
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: anubhavkini @ 2021-05-12  7:02 UTC (permalink / raw)
  To: ml

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

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

https://github.com/anubhavkini/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: 4617 bytes --]

From 1418012b81017959abd739661eeb7572cdc106b7 Mon Sep 17 00:00:00 2001
From: Anubhav Kini <anubhavkini@gmail.com>
Date: Wed, 12 May 2021 12:31:38 +0530
Subject: [PATCH] New package: opensnitch-1.3.6

---
 srcpkgs/opensnitch/files/opensnitch/run   |  3 +
 srcpkgs/opensnitch/patches/cc-check.patch | 11 ++++
 srcpkgs/opensnitch/patches/musl-int.patch | 14 +++++
 srcpkgs/opensnitch/template               | 72 +++++++++++++++++++++++
 4 files changed, 100 insertions(+)
 create mode 100644 srcpkgs/opensnitch/files/opensnitch/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/opensnitch/run b/srcpkgs/opensnitch/files/opensnitch/run
new file mode 100644
index 000000000000..d9aa34169f54
--- /dev/null
+++ b/srcpkgs/opensnitch/files/opensnitch/run
@@ -0,0 +1,3 @@
+#!/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..470dd5ecffb4
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/cc-check.patch
@@ -0,0 +1,11 @@
+--- daemon/netfilter/queue.go
++++ 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..ce6af3c6e4c7
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/musl-int.patch
@@ -0,0 +1,14 @@
+--- daemon/netfilter/queue.h
++++ 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..a150e7850d9f
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,72 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.3.6
+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="pkg-config python3-setuptools"
+makedepends="libnetfilter_queue-devel"
+depends="python3-grpcio-tools python3-slugify python3-inotify
+ python3-PyQt5 python3-PyQt5-sql qt5-wayland qt5-plugin-sqlite"
+conf_files="/etc/opensnitch/default-config.json
+ /etc/opensnitch/system-fw.json"
+make_dirs="/etc/opensnitch/rules/ 0755 root root
+ /etc/opensnitch/ 0755 root root"
+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
+
+_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
+}
+
+post_build() {
+	# build ui
+	_py build
+}
+
+do_install() {
+	# rename bin daemon to opensnitch
+	if [ -f "${GOPATH}/bin/daemon" ]; then
+		vbin "${GOPATH}/bin/daemon" opensnitch
+	else
+		for d in ${GOPATH}/bin/**; do
+			if [ -f "${GOPATH}/bin/$d/daemon" ]; then
+				vbin "${GOPATH}/bin/$d/daemon" opensnitch
+				break
+			fi
+		done
+	fi
+
+	vinstall "default-config.json" 644 "/etc/${pkgname}/"
+	vinstall "system-fw.json" 644 "/etc/${pkgname}/"
+	vsv opensnitch
+
+	#install ui
+	_py
+}

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (17 preceding siblings ...)
  2021-05-12  7:02 ` anubhavkini
@ 2021-05-12  7:27 ` anubhavkini
  2021-05-12  8:34 ` anubhavkini
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: anubhavkini @ 2021-05-12  7:27 UTC (permalink / raw)
  To: ml

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

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

https://github.com/anubhavkini/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: 4631 bytes --]

From 66a30bc8c414fcf75e59444a6fd54347b55a7819 Mon Sep 17 00:00:00 2001
From: Anubhav Kini <anubhavkini@gmail.com>
Date: Wed, 12 May 2021 12:57:03 +0530
Subject: [PATCH] New package: opensnitch-1.3.6

---
 srcpkgs/opensnitch/files/opensnitch/run   |  3 +
 srcpkgs/opensnitch/patches/cc-check.patch | 11 ++++
 srcpkgs/opensnitch/patches/musl-int.patch | 14 +++++
 srcpkgs/opensnitch/template               | 72 +++++++++++++++++++++++
 4 files changed, 100 insertions(+)
 create mode 100644 srcpkgs/opensnitch/files/opensnitch/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/opensnitch/run b/srcpkgs/opensnitch/files/opensnitch/run
new file mode 100644
index 000000000000..d9aa34169f54
--- /dev/null
+++ b/srcpkgs/opensnitch/files/opensnitch/run
@@ -0,0 +1,3 @@
+#!/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..470dd5ecffb4
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/cc-check.patch
@@ -0,0 +1,11 @@
+--- daemon/netfilter/queue.go
++++ 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..ce6af3c6e4c7
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/musl-int.patch
@@ -0,0 +1,14 @@
+--- daemon/netfilter/queue.h
++++ 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..ba7cc66e825b
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,72 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.3.6
+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="pkg-config python3-setuptools"
+makedepends="libnetfilter_queue-devel python3-devel"
+depends="python3-grpcio-tools python3-slugify python3-inotify
+ python3-PyQt5 python3-PyQt5-sql qt5-wayland qt5-plugin-sqlite"
+conf_files="/etc/opensnitch/default-config.json
+ /etc/opensnitch/system-fw.json"
+make_dirs="/etc/opensnitch/rules/ 0755 root root
+ /etc/opensnitch/ 0755 root root"
+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
+
+_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
+}
+
+post_build() {
+	# build ui
+	_py build
+}
+
+do_install() {
+	# rename bin daemon to opensnitch
+	if [ -f "${GOPATH}/bin/daemon" ]; then
+		vbin "${GOPATH}/bin/daemon" opensnitch
+	else
+		for d in ${GOPATH}/bin/**; do
+			if [ -f "${GOPATH}/bin/$d/daemon" ]; then
+				vbin "${GOPATH}/bin/$d/daemon" opensnitch
+				break
+			fi
+		done
+	fi
+
+	vinstall "default-config.json" 644 "/etc/${pkgname}/"
+	vinstall "system-fw.json" 644 "/etc/${pkgname}/"
+	vsv opensnitch
+
+	#install ui
+	_py
+}

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (18 preceding siblings ...)
  2021-05-12  7:27 ` anubhavkini
@ 2021-05-12  8:34 ` anubhavkini
  2021-05-12  8:53 ` anubhavkini
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: anubhavkini @ 2021-05-12  8:34 UTC (permalink / raw)
  To: ml

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

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

https://github.com/anubhavkini/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: 4645 bytes --]

From da9944078cc8b5f94422761026bac7815c8b550d Mon Sep 17 00:00:00 2001
From: Anubhav Kini <anubhavkini@gmail.com>
Date: Wed, 12 May 2021 14:03:59 +0530
Subject: [PATCH] New package: opensnitch-1.3.6

---
 srcpkgs/opensnitch/files/opensnitchd/run  |  3 +
 srcpkgs/opensnitch/patches/cc-check.patch | 11 ++++
 srcpkgs/opensnitch/patches/musl-int.patch | 14 +++++
 srcpkgs/opensnitch/template               | 72 +++++++++++++++++++++++
 4 files changed, 100 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..d9aa34169f54
--- /dev/null
+++ b/srcpkgs/opensnitch/files/opensnitchd/run
@@ -0,0 +1,3 @@
+#!/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..470dd5ecffb4
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/cc-check.patch
@@ -0,0 +1,11 @@
+--- daemon/netfilter/queue.go
++++ 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..ce6af3c6e4c7
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/musl-int.patch
@@ -0,0 +1,14 @@
+--- daemon/netfilter/queue.h
++++ 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..e0d5701c5a7f
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,72 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.3.6
+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="pkg-config python3-setuptools"
+makedepends="libnetfilter_queue-devel python3-devel"
+depends="python3-grpcio-tools 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="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
+
+_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
+}
+
+post_build() {
+	# build ui
+	_py build
+}
+
+do_install() {
+	# rename bin daemon to opensnitchd
+	if [ -f "${GOPATH}/bin/daemon" ]; then
+		vbin "${GOPATH}/bin/daemon" opensnitchd
+	else
+		for d in ${GOPATH}/bin/**; do
+			if [ -f "${GOPATH}/bin/$d/daemon" ]; then
+				vbin "${GOPATH}/bin/$d/daemon" opensnitchd
+				break
+			fi
+		done
+	fi
+
+	vinstall "default-config.json" 644 "/etc/opensnitchd/"
+	vinstall "system-fw.json" 644 "/etc/opensnitchd/"
+	vsv opensnitchd
+
+	#install ui
+	_py
+}

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (19 preceding siblings ...)
  2021-05-12  8:34 ` anubhavkini
@ 2021-05-12  8:53 ` anubhavkini
  2021-05-12  8:59 ` anubhavkini
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: anubhavkini @ 2021-05-12  8:53 UTC (permalink / raw)
  To: ml

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

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

https://github.com/anubhavkini/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: 4551 bytes --]

From 7f19221f10aee4fdcc3db6e5dc23869e0855c3ea Mon Sep 17 00:00:00 2001
From: Anubhav Kini <anubhavkini@gmail.com>
Date: Wed, 12 May 2021 14:21:48 +0530
Subject: [PATCH] New package: opensnitch-1.3.6

---
 srcpkgs/opensnitch/files/opensnitchd/run  |  3 +
 srcpkgs/opensnitch/patches/cc-check.patch | 11 ++++
 srcpkgs/opensnitch/patches/musl-int.patch | 14 +++++
 srcpkgs/opensnitch/template               | 68 +++++++++++++++++++++++
 4 files changed, 96 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..d9aa34169f54
--- /dev/null
+++ b/srcpkgs/opensnitch/files/opensnitchd/run
@@ -0,0 +1,3 @@
+#!/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..470dd5ecffb4
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/cc-check.patch
@@ -0,0 +1,11 @@
+--- daemon/netfilter/queue.go
++++ 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..ce6af3c6e4c7
--- /dev/null
+++ b/srcpkgs/opensnitch/patches/musl-int.patch
@@ -0,0 +1,14 @@
+--- daemon/netfilter/queue.h
++++ 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..889c515e1b29
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,68 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.3.6
+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="pkg-config python3-setuptools"
+makedepends="libnetfilter_queue-devel python3-devel"
+depends="python3-grpcio-tools 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="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
+
+_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
+}
+
+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
+}

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (20 preceding siblings ...)
  2021-05-12  8:53 ` anubhavkini
@ 2021-05-12  8:59 ` anubhavkini
  2021-05-13  4:15 ` anubhavkini
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: anubhavkini @ 2021-05-12  8:59 UTC (permalink / raw)
  To: ml

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

New comment by anubhavkini on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-839598563

Comment:
Finally got it to work

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (21 preceding siblings ...)
  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
  24 siblings, 0 replies; 27+ messages in thread
From: anubhavkini @ 2021-05-13  4:15 UTC (permalink / raw)
  To: ml

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

New comment by anubhavkini on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-840282517

Comment:
@ericonr does this look okay?

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (22 preceding siblings ...)
  2021-05-13  4:15 ` anubhavkini
@ 2021-05-13  6:07 ` ericonr
  2021-06-03  5:54 ` [PR PATCH] [Closed]: " anubhavkini
  24 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-05-13  6:07 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29849#issuecomment-840330051

Comment:
Sorry, I won't be able to review this soon.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PR PATCH] [Closed]: New package: opensnitch-1.3.6
  2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 itsanubhavkini
                   ` (23 preceding siblings ...)
  2021-05-13  6:07 ` ericonr
@ 2021-06-03  5:54 ` anubhavkini
  24 siblings, 0 replies; 27+ messages in thread
From: anubhavkini @ 2021-06-03  5:54 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

New package: opensnitch-1.3.6
https://github.com/void-linux/void-packages/pull/29849

Description:
<!-- 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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PR PATCH] New package: opensnitch-1.3.6
@ 2021-08-28  5:25 cinerea0
  0 siblings, 0 replies; 27+ messages in thread
From: cinerea0 @ 2021-08-28  5:25 UTC (permalink / raw)
  To: ml

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

There is a new 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: 4795 bytes --]

From 863ae42233e901d7d463e74e3c61a00b425572a0 Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Sat, 28 Aug 2021 01:21:23 -0400
Subject: [PATCH] New package: opensnitch-1.3.6

---
 srcpkgs/opensnitch/files/opensnitchd/run  |  4 ++
 srcpkgs/opensnitch/patches/cc-check.patch | 13 +++++
 srcpkgs/opensnitch/patches/musl-int.patch | 16 ++++++
 srcpkgs/opensnitch/template               | 68 +++++++++++++++++++++++
 4 files changed, 101 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..4a9aa09b5e2a
--- /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..360e26c98179
--- /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..77b5a3f2c2ba
--- /dev/null
+++ b/srcpkgs/opensnitch/template
@@ -0,0 +1,68 @@
+# Template file for 'opensnitch'
+pkgname=opensnitch
+version=1.3.6
+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="pkg-config python3-setuptools"
+makedepends="libnetfilter_queue-devel python3-devel"
+depends="python3-grpcio-tools 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=a02e49a5ed79db8f21788188f16a28684d5f54f583bb4d338e3386484ee1663a
+
+_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
+}
+
+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
+}

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2021-08-28  5:25 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 11:16 [PR PATCH] New package: opensnitch-1.3.6 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 ` [PR PATCH] [Updated] [WIP] " itsanubhavkini
2021-05-12  6:39 ` 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
2021-08-28  5:25 [PR PATCH] " cinerea0

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).