From c7549ca9abcda486a881f917ed43f299667d717d96182fecccdb2e03e7046d15 Mon Sep 17 00:00:00 2001 From: Antonio Teixeira Date: Wed, 17 Apr 2024 19:45:07 +0000 Subject: [PATCH 1/2] Accepting request 1168648 from home:jeff_mahoney:branches:security:sensor - Restore velociraptor group for client - Add %{name}(project:%_project) Provides for SLE15 and newer - Fixed SLE12-SP5 build OBS-URL: https://build.opensuse.org/request/show/1168648 OBS-URL: https://build.opensuse.org/package/show/security:sensor/velociraptor?expand=0&rev=69 --- velociraptor.changes | 7 +++++++ velociraptor.spec | 24 ++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/velociraptor.changes b/velociraptor.changes index 47dd053..fb0e8ca 100644 --- a/velociraptor.changes +++ b/velociraptor.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 17 15:52:52 UTC 2024 - Jeff Mahoney + +- Restore velociraptor group for client +- Add %{name}(project:%_project) Provides for SLE15 and newer +- Fixed SLE12-SP5 build + ------------------------------------------------------------------- Fri Apr 5 13:01:05 UTC 2024 - Antonio Teixeira diff --git a/velociraptor.spec b/velociraptor.spec index bf3d2ce..bd0582e 100644 --- a/velociraptor.spec +++ b/velociraptor.spec @@ -103,7 +103,6 @@ Patch3: velociraptor-reproducible-timestamp.diff Patch4: CVE-2024-28849-follow-redirects-drop-proxy-authorization.patch BuildRequires: fileb0x %if 0%{?suse_version} -BuildRequires: golang-packaging BuildRequires: systemd-rpm-macros BuildRequires: golang(API) >= 1.19 BuildRequires: pkgconfig(libsystemd) @@ -163,17 +162,22 @@ Obsoletes: velociraptor-kafka-humio-gateway < %{version} %{?sysusers_requires} %endif -%if 0%{?suse_version} -%if %{build_server} -ExclusiveArch: x86_64 -%endif +# SLE12 doesn't support sysusers +%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 +Requires(pre): pwdutils %else +Requires: group(velociraptor) +%endif + %if %{build_server} +%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400 +ExclusiveArch: x86_64 +%else ExclusiveArch: do_not_build +%endif %else ExclusiveArch: x86_64 ppc64le aarch64 s390x %endif -%endif %if 0%{?rhel} # RHEL builds aren't working yet @@ -183,6 +187,10 @@ ExclusiveArch: do_not_build # Not *required* but without it, we spam the system log Recommends: auditd +%if 0%{?_project:1} && (0%{?suse_version} > 1500 || 0%{?sle_version} > 150000) +Provides: %{name}(project:%_project) +%endif + %if "%{vendor}" == "debbuild" %define mtag Packager: https://www.suse.com %mtag @@ -346,6 +354,10 @@ install -D -m 0755 output/velociraptor-v%{VERSION}-linux-* %buildroot/%{_bindir} %if 0%{?suse_version} %pre +%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 +# create velociraptor group if it doesn't exist +groupadd -f -r velociraptor 2>/dev/null || : +%endif %service_add_pre %{name}.service %post From 9b9a6402e4b417918b1c6e24453d7c22dad842318952a652fd2e6171d8ef7163 Mon Sep 17 00:00:00 2001 From: Antonio Teixeira Date: Thu, 18 Apr 2024 12:45:01 +0000 Subject: [PATCH 2/2] Accepting request 1168666 from home:jeff_mahoney:branches:security:sensor - Fix unresolveable Debian group-velociraptor dependency. OBS-URL: https://build.opensuse.org/request/show/1168666 OBS-URL: https://build.opensuse.org/package/show/security:sensor/velociraptor?expand=0&rev=70 --- velociraptor.changes | 5 +++++ velociraptor.spec | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/velociraptor.changes b/velociraptor.changes index fb0e8ca..9f16f76 100644 --- a/velociraptor.changes +++ b/velociraptor.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 17 21:53:20 UTC 2024 - Jeff Mahoney + +- Fix unresolveable Debian group-velociraptor dependency. + ------------------------------------------------------------------- Wed Apr 17 15:52:52 UTC 2024 - Jeff Mahoney diff --git a/velociraptor.spec b/velociraptor.spec index bd0582e..728167f 100644 --- a/velociraptor.spec +++ b/velociraptor.spec @@ -162,12 +162,15 @@ Obsoletes: velociraptor-kafka-humio-gateway < %{version} %{?sysusers_requires} %endif +%if 0%{?suse_version} # SLE12 doesn't support sysusers %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 Requires(pre): pwdutils +%define pre_create_group 1 %else Requires: group(velociraptor) %endif +%endif %if %{build_server} %if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400 @@ -354,7 +357,7 @@ install -D -m 0755 output/velociraptor-v%{VERSION}-linux-* %buildroot/%{_bindir} %if 0%{?suse_version} %pre -%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 +%if 0%{?pre_create_group} # create velociraptor group if it doesn't exist groupadd -f -r velociraptor 2>/dev/null || : %endif