Commit a6caef63 authored by Stuart Cardall's avatar Stuart Cardall Committed by Natanael Copa

community/psad: use patches not sed in APKBUILD

* fixes https://github.com/alpinelinux/aports/pull/4964#pullrequestreview-151034227
parent d8592b9b
--- psad-2.4.6/install.pl
+++ psad-2.4.6/install.new
@@ -780,19 +780,6 @@
}
}
- if ($init_dir and &is_root()) {
- &logr("[+] Copying $init_file -> ${init_dir}/$init_name\n");
- copy $init_file, "${init_dir}/$init_name" or die "[*] Could not copy ",
- "$init_file -> ${init_dir}/$init_name: $!";
- if ($is_systemd) {
- &perms_ownership("${init_dir}/$init_name", 0644);
- } else {
- &perms_ownership("${init_dir}/$init_name", 0744);
- }
- &enable_psad_at_boot($distro);
- $installed_init_script = 1;
- }
-
&logr("\n========================================================\n");
if ($archived_old) {
&logr("[+] Copies of your original configs have been made " .
--- psad-2.4.6/install.pl
+++ psad-2.4.6/install.new
@@ -247,7 +247,7 @@
my $distro = &get_distro();
### handle systems with systemd
-my $is_systemd = &look_for_process(qr|/systemd|);
+my $is_systemd = 0;
if ($is_systemd) {
$init_dir = $systemd_init_dir;
......@@ -2,7 +2,7 @@
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=psad
pkgver=2.4.6
pkgrel=0
pkgrel=1
pkgdesc="3 lightweight system daemons that analyze iptables log messages to detect port scans and other suspicious traffic"
url="http://cipherdyne.org/psad/"
arch="all"
......@@ -14,7 +14,10 @@ depends="perl iptables ip6tables ssmtp mailx psmisc perl-bit-vector
subpackages="$pkgname-doc $pkgname-openrc"
source="http://cipherdyne.org/psad/download/$pkgname-nodeps-$pkgver.tar.gz
psad.initd
psad.confd"
psad.confd
01-disable-init-install.patch
02-travis-build.patch
"
builddir="$srcdir/$pkgname-$pkgver"
build() {
......@@ -41,15 +44,6 @@ build() {
# Set mail command to mailx.
sed -e 's|/bin/mail;|/usr/bin/mail;|g' -i ./psad.conf
# Disable install of generic init script & setting numeric run level.
local start=$(sed -n '/if ($init_dir and &is_root()) {/=' ./install.pl)
local end=$(expr $start + 11)
# Busybox sed does not support +11d.
sed ''$start','$end'd' ./install.pl -i
# fix for building on Travis
sed -i "s|^my \$is_systemd =.*|my \$is_systemd = 0;|" ./install.pl
# Populate install.answers so build does not wait for them.
cat >./install.answers <<-EOF
Would you like to merge the config from the existing psad installation: y;
......@@ -109,4 +103,6 @@ package() {
sha512sums="95ddd18da2b9c6703b0d156873622740517cad62fda8d69ddb0686c43c4e306155dd646965cd52081dbd0d6c235bd3c794f6b004e3ee3bfa3e6150eb5f617c56 psad-nodeps-2.4.6.tar.gz
ec709b1ba1df36dad5c1c2cfb5fc45765ac4ccdd6fc7a3e2f23c972c7dfb8e5910aeb1ba42437abd0d2c766bb99bcb790301c7b8ba3ee7e6593dcae13e9efc3a psad.initd
a80666f59356cc6157a9f5dca132991d4f1e0afda8f673d602de2557219d5521bec9ae148330e98d9483175d14d96e4cc2ccd11541d8b187b0e47f44ba4ada54 psad.confd"
a80666f59356cc6157a9f5dca132991d4f1e0afda8f673d602de2557219d5521bec9ae148330e98d9483175d14d96e4cc2ccd11541d8b187b0e47f44ba4ada54 psad.confd
6ecbb376e5eae2b68fb1e3d65d3a105cac698abd4f65b9e3892efa2aba30b68445aa17ff31f2799d36f6a7e5bc1ba2566f12c9b7ab2864dc210ead1a3f974412 01-disable-init-install.patch
6117125b7efe9557be1f6af9ce786100e1c81968a2b28878f8a63058a4349e9430ae2dc58778221f9704b57360224233a76fc7cf4fe5c1693bd43c6c83107ac8 02-travis-build.patch"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment