From 423dbd6ff30c04023ac3bdf3c702796b993d0eb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gustavo=20I=C3=B1iguez=20Goia?= <gooffy1@gmail.com>
Date: Sun, 16 May 2021 23:55:34 +0200
Subject: [PATCH] deb,rpm: minor changes to ease packing

---
 daemon/opensnitch.spec    | 6 ++++++
 debian/opensnitch.install | 1 +
 2 files changed, 7 insertions(+)

diff --git a/daemon/opensnitch.spec b/daemon/opensnitch.spec
index 875bbc225b..955c5e58a0 100644
--- a/daemon/opensnitch.spec
+++ b/daemon/opensnitch.spec
@@ -34,7 +34,10 @@ rm -rf %{buildroot}
 mkdir -p go/src/github.com/evilsocket
 ln -s $(pwd) go/src/github.com/evilsocket/opensnitch
 export GOPATH=$(pwd)/go
+cd go/src/github.com/evilsocket/opensnitch/
+make protocol
 cd go/src/github.com/evilsocket/opensnitch/daemon/
+go mod vendor
 go build -o opensnitchd .
 
 %install
@@ -56,6 +59,8 @@ if [ -f /etc/opensnitchd/system-fw.json ]; then
 fi
 install -m 644 -b $B daemon/system-fw.json %{buildroot}/etc/opensnitchd/system-fw.json
 
+install -m 644 ebpf_prog/opensnitch.o %{buildroot}/etc/opensnitchd/opensnitch.o
+
 # upgrade, uninstall
 %preun
 systemctl stop opensnitch.service || true
@@ -88,4 +93,5 @@ rm -rf %{buildroot}
 /usr/lib/systemd/system/opensnitch.service
 %{_sysconfdir}/opensnitchd/default-config.json
 %{_sysconfdir}/opensnitchd/system-fw.json
+%{_sysconfdir}/opensnitchd/opensnitch.o
 %{_sysconfdir}/logrotate.d/opensnitch
diff --git a/debian/opensnitch.install b/debian/opensnitch.install
index 1f2125c3b7..9c79e56e6d 100644
--- a/debian/opensnitch.install
+++ b/debian/opensnitch.install
@@ -1,2 +1,3 @@
 daemon/default-config.json etc/opensnitchd/
 daemon/system-fw.json etc/opensnitchd/
+ebpf_prog/opensnitch.o etc/opensnitchd/