aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/cracklib/APKBUILD9
-rw-r--r--main/cracklib/fix-trigger-warning.patch39
2 files changed, 45 insertions, 3 deletions
diff --git a/main/cracklib/APKBUILD b/main/cracklib/APKBUILD
index 87bdd5f032..814eebe04b 100644
--- a/main/cracklib/APKBUILD
+++ b/main/cracklib/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=cracklib
pkgver=2.9.7
-pkgrel=3
+pkgrel=4
pkgdesc="A library used to enforce strong passwords"
url="https://github.com/cracklib/cracklib"
arch="all"
@@ -11,7 +11,9 @@ triggers="$pkgname.trigger=/usr/share/cracklib"
makedepends="zlib-dev"
subpackages="$pkgname-dev $pkgname-words::noarch"
source="https://github.com/cracklib/cracklib/releases/download/v$pkgver/cracklib-$pkgver.tar.bz2
- https://github.com/cracklib/cracklib/releases/download/v$pkgver/cracklib-words-$pkgver.gz"
+ https://github.com/cracklib/cracklib/releases/download/v$pkgver/cracklib-words-$pkgver.gz
+ fix-trigger-warning.patch
+ "
# secfixes:
# 2.9.7-r0:
@@ -53,4 +55,5 @@ words() {
}
sha512sums="f6bf65ac092ba46ff78ddbc115692260fb76dc71219cd679d2ea935ebfb9e709fbb30259a7406743ed00dbdc415335b3ac9d9fcba1d204ea36d5eb96bf1333a2 cracklib-2.9.7.tar.bz2
-1fa34b0a2e16d6906982b248f1757bf5bf8154d8d7e8bab94a4ac25080c41434d3828a2c8dd5065e9be586f36480ab70375f09e0bb64eb495d96a460619e2bae cracklib-words-2.9.7.gz"
+1fa34b0a2e16d6906982b248f1757bf5bf8154d8d7e8bab94a4ac25080c41434d3828a2c8dd5065e9be586f36480ab70375f09e0bb64eb495d96a460619e2bae cracklib-words-2.9.7.gz
+f9cececd7ba4636bc5d2b9b2acf7c40563a32c1725f6bdcc0f7604ecc4c8cb31656972bfb17a302427bb17b5b8be24c44fd3fd9e1a891745c02f3243e0087216 fix-trigger-warning.patch"
diff --git a/main/cracklib/fix-trigger-warning.patch b/main/cracklib/fix-trigger-warning.patch
new file mode 100644
index 0000000000..21ec638b27
--- /dev/null
+++ b/main/cracklib/fix-trigger-warning.patch
@@ -0,0 +1,39 @@
+From: Dermot Bradley <dermot_bradley@yahoo.com>
+Date: Sat, 12 Sep 2020 20:03 +0100
+Subject: [PATCH] cracklib: prevent "line out of order" warnings
+
+Workaround for handling excessively long lines in cracklib-words.gz file.
+Ensure that all lines read from any words files are truncated to 1023
+characters as the cracklib-packer utility (run by the Alpine package trigger)
+breaks up long lines on this boundary and processes them separately as if
+they were seperate lines and it can potentially generate "line out of order"
+warnings.
+
+It also ignores blank lines in word files, this prevents "skipping line"
+warnings when blank lines are encountered.
+
+Upstream PR 33 has been raised with this fix.
+
+---
+
+--- a/util/cracklib-format
++++ b/util/cracklib-format
+@@ -3,8 +3,17 @@
+ # This preprocesses a set of word lists into a suitable form for input
+ # into cracklib-packer
+ #
++# Truncates lines longer than 1022 characters long as cracklib-packer
++# does not handle them correctly.
++#
++# The last part of the pipeline uses 'grep -v' to remove any blank
++# lines (possibly introduced by earlier parts of the pipeline) as
++# cracklib-packer will generate "skipping line" warnings otherwise.
++#
+ gzip -cdf "$@" |
+- grep -v '^\(#\|$\)' |
++ grep -a -v '^#' |
+ tr '[A-Z]' '[a-z]' |
+ tr -cd '\012[a-z][0-9]' |
++ cut -c 1-1022 |
++ grep -v '^$' |
+ env LC_ALL=C sort -u