diff --git a/_servicedata b/_servicedata
index 6fe6233..e7205c6 100644
--- a/_servicedata
+++ b/_servicedata
@@ -1,4 +1,4 @@
https://github.com/SUSE/linux-security-sensor
- af7fdb00f16fd3feb082e1ccb55097e82053ed22
\ No newline at end of file
+ 03bd1d74b26a6f6593068bb6a4e80782e9e690a9
\ No newline at end of file
diff --git a/update-vendoring.sh b/update-vendoring.sh
index 47dd1e4..f0cd7ab 100644
--- a/update-vendoring.sh
+++ b/update-vendoring.sh
@@ -1,7 +1,7 @@
#!/bin/bash
cleanup() {
- test -n "$dir" && rm -rf "$dir"
+ test -n "${dir}" && rm -rf "${dir}"
}
error() {
@@ -12,40 +12,47 @@ trap error ERR SIGINT
trap cleanup EXIT
set -e
-version=$(rpmspec -q --queryformat="%{VERSION}" velociraptor.spec)
+version=$(rpmspec -q --queryformat="%{VERSION}\n" velociraptor.spec|head -1)
dir="$(realpath "$(mktemp -d vendoring.XXXXXX)")"
+topdir="$(realpath "$(dirname "$0")")"
rpmspec -P velociraptor.spec --define "_sourcedir $PWD" | \
awk '
BEGIN { go=0; };
/^%build/ { go=0; };
{ if (go) print };
-/^%setup/ { go=1 }' > $dir/setup.sh
+/^%setup/ { go=1 }' > ${dir}/setup.sh
echo "Expanding archive..."
-cpio -D "$dir" -id < velociraptor-${version}.obscpio
+cpio -D "${dir}" -id < velociraptor-${version}.obscpio
echo "Running %prep"
-cd "$dir/velociraptor-${version}"
-sh ../setup.sh
+cd "${dir}/velociraptor-${version}"
+sh ${dir}/setup.sh
echo "Re-vendoring Go code..."
rm -rf vendor
go mod vendor
-tar Jcf ../vendor-golang-${version}.tar.xz vendor
+tar Jcf ${dir}/vendor-golang-${version}.tar.xz vendor
+
+cd "${dir}/velociraptor-${version}/contrib/kafka-humio-gateway"
+rm -rf vendor
+go mod vendor
+cd "${dir}/velociraptor-${version}"
+tar Jcf "${dir}/vendor-golang-kafka-humio-gateway-${version}.tar.xz" "contrib/kafka-humio-gateway/vendor"
echo "Re-vendoring nodejs code..."
-cd gui/velociraptor
+cd "${dir}/velociraptor-${version}/gui/velociraptor"
rm -rf node_modules
npm install
cd ../..
-tar Jcf ../vendor-nodejs-${version}.tar.xz gui/velociraptor/node_modules
+tar Jcf ${dir}/vendor-nodejs-${version}.tar.xz gui/velociraptor/node_modules
-cd ..
-mv vendor-golang-${version}.tar.xz vendor-nodejs-${version}.tar.xz ..
+cd "${dir}"
+mv vendor-golang-*${version}.tar.xz vendor-nodejs-${version}.tar.xz ${topdir}
-for spec in ../*.spec; do
+for spec in ${topdir}/*.spec; do
sed -i "s/^%define vendor_version.*/%define vendor_version %{version}/" ${spec}
done
diff --git a/velociraptor-client.changes b/velociraptor-client.changes
index 94676c8..f319ad8 100644
--- a/velociraptor-client.changes
+++ b/velociraptor-client.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Tue Mar 15 13:31:21 UTC 2022 - jeffm@suse.com
+
+- Update to version 0.6.3~git17.741ebb59:
+ * kafka-humio-gateway: update README.md
+ * kafka-humio-gateway: Fix missing variable rename
+ * Add Kafka-Humio Gateway [Depends on PR#10] (#8)
+
-------------------------------------------------------------------
Tue Mar 15 01:04:29 UTC 2022 - jeffm@suse.com
diff --git a/velociraptor-client.spec b/velociraptor-client.spec
index 4725e7c..e12064a 100644
--- a/velociraptor-client.spec
+++ b/velociraptor-client.spec
@@ -19,7 +19,7 @@
%define vendor_version %{version}
Name: velociraptor-client
-Version: 0.6.3~git13.af7fdb00
+Version: 0.6.3~git17.741ebb59
Release: 0
Summary: Endpoint visibility and collection tool (endpoint only)
diff --git a/velociraptor.changes b/velociraptor.changes
index def26e8..aca12d2 100644
--- a/velociraptor.changes
+++ b/velociraptor.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Tue Mar 15 13:31:21 UTC 2022 - jeffm@suse.com
+
+- Update to version 0.6.3~git17.741ebb59:
+ * kafka-humio-gateway: update README.md
+ * kafka-humio-gateway: Fix missing variable rename
+ * Add Kafka-Humio Gateway [Depends on PR#10] (#8)
+
-------------------------------------------------------------------
Tue Mar 15 01:04:29 UTC 2022 - jeffm@suse.com
diff --git a/velociraptor.obsinfo b/velociraptor.obsinfo
index 9a3038a..25f8c7b 100644
--- a/velociraptor.obsinfo
+++ b/velociraptor.obsinfo
@@ -1,4 +1,4 @@
name: velociraptor
-version: 0.6.3~git13.af7fdb00
-mtime: 1647305633
-commit: af7fdb00f16fd3feb082e1ccb55097e82053ed22
+version: 0.6.3~git17.741ebb59
+mtime: 1647349936
+commit: 741ebb59371cb031ae50997187d0497130a4bb5a
diff --git a/velociraptor.spec b/velociraptor.spec
index 2800368..f6c9b7b 100644
--- a/velociraptor.spec
+++ b/velociraptor.spec
@@ -19,7 +19,7 @@
%define vendor_version %{version}
Name: velociraptor
-Version: 0.6.3~git13.af7fdb00
+Version: 0.6.3~git17.741ebb59
Release: 0
Summary: Endpoint visibility and collection tool
@@ -28,11 +28,12 @@ License: AGPL-3.0-only
URL: https://github.com/Velocidex/velociraptor
Source: %{projname}-%{version}.tar.xz
Source1: vendor-golang-%{vendor_version}.tar.xz
-Source2: vendor-nodejs-%{vendor_version}.tar.xz
-Source3: %{name}.service
-Source4: %{name}-server.config.placeholder
-Source5: %{name}-client.service
-Source6: %{name}-client.config.placeholder
+Source2: vendor-golang-kafka-humio-gateway-%{vendor_version}.tar.xz
+Source3: vendor-nodejs-%{vendor_version}.tar.xz
+Source4: %{name}.service
+Source5: %{name}-server.config.placeholder
+Source6: %{name}-client.service
+Source7: %{name}-client.config.placeholder
Patch1: velociraptor-golang-mage-vendoring.diff
BuildRequires: golang-packaging
BuildRequires: systemd-rpm-macros
@@ -56,9 +57,16 @@ https://docs.velociraptor.app/
This package contains the endpoint agent and full console GUI.
For just the endpoint agent, please install the 'velociraptor-client' package.
+%package kafka-humio-gateway
+Summary: Gateway between Kafka and Humio for Velociraptor Artifacts
+Version: %{version}
+
+%description kafka-humio-gateway
+This tool is used to consume events generated by the Kafka Velociraptor plugin
+and post them to a Humio cluster.
%prep
-%setup -q -a 1 -a 2 -n %{projname}-%{version}
+%setup -q -a 1 -a 2 -a 3 -n %{projname}-%{version}
%autopatch -p1
# Set the version to something more specific than -dev
@@ -73,6 +81,8 @@ sed -ie "s/\(VERSION *= \).*/\1 \"%{version}\"/" constants/constants.go
(cd gui/velociraptor ; npm run build)
make linux
+(cd contrib/kafka-humio-gateway; go build -o velociraptor-kafka-humio-gateway)
+
%install
mkdir -p %buildroot/%{_bindir}
mkdir -p %buildroot/%{_sysconfdir}/velociraptor
@@ -81,10 +91,11 @@ mkdir -p %buildroot/%{_sharedstatedir}/velociraptor/data
mkdir -p %buildroot/%{_sharedstatedir}/velociraptor/logs
mkdir -p %buildroot/%{_sharedstatedir}/velociraptor-client
install -m 755 output/velociraptor-v%{version}-linux-* %buildroot/%{_bindir}/velociraptor
-install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
-install -m 0600 %{SOURCE4} %{buildroot}%{_sysconfdir}/velociraptor/server.config
-install -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}-client.service
-install -m 0600 %{SOURCE6} %{buildroot}%{_sysconfdir}/velociraptor/client.config
+install -m 755 contrib/kafka-humio-gateway/velociraptor-kafka-humio-gateway %buildroot/%{_bindir}
+install -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
+install -m 0600 %{SOURCE5} %{buildroot}%{_sysconfdir}/velociraptor/server.config
+install -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}-client.service
+install -m 0600 %{SOURCE7} %{buildroot}%{_sysconfdir}/velociraptor/client.config
%files
%license LICENSE
@@ -100,6 +111,11 @@ install -m 0600 %{SOURCE6} %{buildroot}%{_sysconfdir}/velociraptor/client.config
%dir %{_sharedstatedir}/velociraptor/logs
%dir %{_sharedstatedir}/velociraptor-client
+%files kafka-humio-gateway
+%license LICENSE
+%doc contrib/kafka-humio-gateway/README.md
+%{_bindir}/velociraptor-kafka-humio-gateway
+
%pre
%service_add_pre %{name}.service
%service_add_pre %{name}-client.service