aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSertonix <sertonix@posteo.net>2024-04-23 11:08:41 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2024-04-23 15:25:58 +0000
commit0bf585114fda9d755d1775e830104cbf246cc1d1 (patch)
tree32cee1b88387872577470f6859767e9301277c3c
parent18e71cb9bae08dfc67619588ed093f357d0b4a3e (diff)
main/logcheck: update path of lock dirHEADmaster
Upstream has moved the default lock directory to /run/lock ([6da4b04f8b5]) but forgot to change the Makefile so patching it ([logcheck!21]). Also removing 2 'mkdir -p' lines since 'make install' already creates the directories. Ref [#15930] Fixes [#16050] [6da4b04f8b5]: https://salsa.debian.org/debian/logcheck/-/commit/6da4b04f8b5b0584908c5a13000bb0c90ef87029 [logcheck!21]: https://salsa.debian.org/debian/logcheck/-/merge_requests/21 [#15930]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15930 [#16050]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/16050
-rw-r--r--main/logcheck/APKBUILD11
-rw-r--r--main/logcheck/logcheck.post-install2
-rw-r--r--main/logcheck/run-lock.patch16
3 files changed, 22 insertions, 7 deletions
diff --git a/main/logcheck/APKBUILD b/main/logcheck/APKBUILD
index 4436d301d8a..d95bb53d563 100644
--- a/main/logcheck/APKBUILD
+++ b/main/logcheck/APKBUILD
@@ -2,11 +2,10 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=logcheck
pkgver=1.4.3
-pkgrel=0
+pkgrel=1
pkgdesc="Bash scripts used to monitor system log files for anomalies"
# !check: Requires writing to root owned paths but can't run as root
-# !fhs: Directory under /var/lock created in package()
-options="!check !fhs"
+options="!check"
url="https://packages.debian.org/source/sid/logcheck"
arch="noarch"
license="GPL-2.0-or-later"
@@ -19,21 +18,21 @@ install="$pkgname.pre-install"
subpackages="$pkgname-doc"
pkgusers="logcheck"
source="https://deb.debian.org/debian/pool/main/l/logcheck/logcheck_$pkgver.tar.xz
+ run-lock.patch
logcheck.cron.d
"
package() {
make DESTDIR="$pkgdir" install
- mkdir -p "$pkgdir"/var/lib/$pkgname
- mkdir -p "$pkgdir"/var/lock/$pkgname
install -D -m 644 "$srcdir"/logcheck.cron.d "$pkgdir"/etc/logcheck/logcheck.cron.sample
install -d "$pkgdir"/usr/share/man
cp -a "$builddir"/docs/* "$pkgdir"/usr/share/man
- chown -R $pkgusers "$pkgdir"/etc/logcheck "$pkgdir"/var/lock/logcheck "$pkgdir"/var/lib/logcheck
+ chown -R $pkgusers "$pkgdir"/etc/logcheck "$pkgdir"/run/lock/logcheck "$pkgdir"/var/lib/logcheck
}
sha512sums="
e6c3ef20b44e23099a6b9054f210c8baead6f6a6a84d2d2f0bc465ef95bdf9b267a85f59ec876d1854e0e76f1fb4263a30036caf84b4c8bff15763fb6f9ff6a2 logcheck_1.4.3.tar.xz
+543575733f935d6f959a9eaf873dd800846e21f810b4041e6cbf6b64ec8fede2cf9672faeb8b44acbf1c8cd184edb5e44b5aeadb646d65dc93fa60f8d85c48a7 run-lock.patch
a177388f18c220323eea6f5413f76873e6ad2a2334f58a05727c7b94a793fcb98bd605cefc6fe44aca6afe5c50a9ef851abcc439aefe5b7545d5d6bb584c0a8b logcheck.cron.d
"
diff --git a/main/logcheck/logcheck.post-install b/main/logcheck/logcheck.post-install
index c3439021c39..35fca4de3fd 100644
--- a/main/logcheck/logcheck.post-install
+++ b/main/logcheck/logcheck.post-install
@@ -1,3 +1,3 @@
#!/bin/sh
-chown -R logcheck /etc/logcheck /var/lock/logcheck /var/lib/logcheck
+chown -R logcheck /etc/logcheck /run/lock/logcheck /var/lib/logcheck
diff --git a/main/logcheck/run-lock.patch b/main/logcheck/run-lock.patch
new file mode 100644
index 00000000000..8b884fa1b04
--- /dev/null
+++ b/main/logcheck/run-lock.patch
@@ -0,0 +1,16 @@
+logcheck uses /run/lock by default so fix the path for systems without
+/var/lock -> /run/lock symlink
+
+diff --git a/Makefile b/Makefile
+index fded3699..2a992473 100644
+--- a/Makefile
++++ b/Makefile
+@@ -13,7 +13,7 @@ install:
+ install -d $(DESTDIR)/var/lib/logcheck
+ install -d $(DESTDIR)/$(SBINDIR)
+ install -d $(DESTDIR)/$(BINDIR)
+- install -d $(DESTDIR)/var/lock/logcheck
++ install -d $(DESTDIR)/run/lock/logcheck
+ install -d $(DESTDIR)/$(SHAREDIR)
+
+ # Create directories for rules logcheck-database \ No newline at end of file