Skip to content

Commit 8c78ee8

Browse files
authored
move hubupdate.sh to libexec (#4000)
1 parent cbdc2d4 commit 8c78ee8

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

debian/crowdsec-hubupdate.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ Description=CrowdSec Hub update
44
[Service]
55
Type=oneshot
66
Environment=LC_ALL=C LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
7-
ExecStart=/usr/lib/crowdsec/hubupdate.sh
7+
ExecStart=/usr/libexec/crowdsec/hubupdate.sh
88

debian/rules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ override_dh_auto_install:
2424

2525
mkdir -p debian/crowdsec/usr/lib/crowdsec/plugins/
2626
mkdir -p debian/crowdsec/etc/crowdsec/notifications/
27+
mkdir -p debian/crowdsec/usr/libexec/crowdsec/
28+
29+
# keep the plugin dir in /usr/lib/crowdsec as it's referenced in config.yaml
2730

2831
install -m 551 \
2932
cmd/notification-slack/notification-slack \
@@ -52,7 +55,7 @@ override_dh_auto_install:
5255
cp config/console.yaml debian/crowdsec/etc/crowdsec/console.yaml
5356
cp -a config/patterns debian/crowdsec/etc/crowdsec
5457
cp config/detect.yaml debian/crowdsec/var/lib/crowdsec/data/detect.yaml
55-
install -m 755 debian/hubupdate.sh debian/crowdsec/usr/lib/crowdsec/hubupdate.sh
58+
install -m 755 debian/hubupdate.sh debian/crowdsec/usr/libexec/crowdsec/hubupdate.sh
5659

5760
override_dh_fixperms:
5861
dh_fixperms

rpm/SPECS/crowdsec.spec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ mkdir -p %{buildroot}%{_libdir}/%{name}/plugins/
5050

5151
install -m 755 -D cmd/crowdsec/crowdsec %{buildroot}%{_bindir}/%{name}
5252
install -m 755 -D cmd/crowdsec-cli/cscli %{buildroot}%{_bindir}/cscli
53-
install -m 755 -D debian/hubupdate.sh %{buildroot}%{_libdir}/%{name}/
53+
install -m 755 -D debian/hubupdate.sh %{buildroot}%{_libexecdir}/%{name}/
5454
install -m 644 -D debian/crowdsec.service %{buildroot}%{_unitdir}/%{name}.service
5555
install -m 644 -D debian/crowdsec-hubupdate.service %{buildroot}%{_unitdir}/%{name}-hubupdate.service
5656
install -m 644 -D debian/crowdsec-hubupdate.timer %{buildroot}%{_unitdir}/%{name}-hubupdate.timer
@@ -63,6 +63,8 @@ install -m 644 -D config/console.yaml %{buildroot}%{_sysconfdir}/crowdsec
6363
install -m 644 -D config/context.yaml %{buildroot}%{_sysconfdir}/crowdsec/console/
6464
install -m 644 -D %{SOURCE1} %{buildroot}%{_presetdir}
6565

66+
# plugins could go to _libexecdir but we'll leave them in _libdir because it's referenced in config.yaml
67+
6668
install -m 551 cmd/notification-slack/notification-slack %{buildroot}%{_libdir}/%{name}/plugins/
6769
install -m 551 cmd/notification-http/notification-http %{buildroot}%{_libdir}/%{name}/plugins/
6870
install -m 551 cmd/notification-splunk/notification-splunk %{buildroot}%{_libdir}/%{name}/plugins/
@@ -84,7 +86,7 @@ rm -rf %{buildroot}
8486
%defattr(-,root,root,-)
8587
%{_bindir}/%{name}
8688
%{_bindir}/cscli
87-
%{_libdir}/%{name}/hubupdate.sh
89+
%{_libexecdir}/%{name}/hubupdate.sh
8890
%{_libdir}/%{name}/plugins/notification-slack
8991
%{_libdir}/%{name}/plugins/notification-http
9092
%{_libdir}/%{name}/plugins/notification-splunk

0 commit comments

Comments
 (0)