diff --git a/.gitignore b/.gitignore index 2997dd5..bee2d82 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,56 @@ -SOURCES/cracklib-2.9.6.tar.gz -SOURCES/cracklib-words-2.9.6.gz -SOURCES/cracklib2_2.8.19-1.debian.tar.gz -SOURCES/missing-words.gz +ASSurnames.gz +Congress.gz +Domains.gz +Dosref.gz +Family-Names.gz +Ftpsites.gz +Given-Names.gz +Jargon.gz +LCarrol.gz +Movies.gz +Paradise.Lost.gz +Python.gz +Trek.gz +cartoon.gz +common-passwords.txt.gz +cracklib,2.7.tgz +etc-hosts.gz +famous.gz +fast-names.gz +female-names.gz +male-names.gz +myths-legends.gz +names.french.gz +names.hp.gz +other-names.gz +sf.gz +shakespeare.gz +surnames.finnish.gz +cracklib-words.gz +cracklib-2.8.1.tar.gz +cracklib-2.8.2.tar.gz +cracklib-2.8.3.tar.gz +cracklib-2.8.4.tar.gz +cracklib-2.8.5.tar.gz +cracklib-2.8.6.tar.gz +cracklib-2.8.9.tar.gz +pass_file.gz +cracklib-2.8.10.tar.gz +cracklib-2.8.12.tar.gz +cracklib-2.8.13.tar.gz +cracklib-2.8.15.tar.gz +cracklib-words-20080507.gz +cracklib-2.8.16.tar.gz +/cracklib2_2.8.18-1.debian.tar.gz +/cracklib-2.8.18.tar.gz +/cracklib-2.8.19.tar.gz +/cracklib2_2.8.19-1.debian.tar.gz +/cracklib2_2.8.19-1.dsc +/cracklib-2.8.20.tar.gz +/cracklib-2.8.21.tar.gz +/cracklib-2.8.22.tar.gz +/cracklib-2.9.0.tar.gz +/cracklib-2.9.1.tar.gz /cracklib-2.9.6.tar.gz /cracklib-words-2.9.6.gz -/cracklib2_2.8.19-1.debian.tar.gz /missing-words.gz diff --git a/cracklib2_2.8.19-1.dsc b/cracklib2_2.8.19-1.dsc deleted file mode 100644 index daae2e2..0000000 --- a/cracklib2_2.8.19-1.dsc +++ /dev/null @@ -1,48 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -Format: 3.0 (quilt) -Source: cracklib2 -Binary: libcrack2, libcrack2-dev, cracklib-runtime, python-cracklib, python3-cracklib -Architecture: any -Version: 2.8.19-1 -Maintainer: Jan Dittberner -Uploaders: Martin Pitt -Homepage: http://sourceforge.net/projects/cracklib -Standards-Version: 3.9.3 -Vcs-Browser: http://git.debian.org/?p=pkg-cracklib/pkg-cracklib.git -Vcs-Git: git://git.debian.org/pkg-cracklib/pkg-cracklib.git -Build-Depends: debhelper (>= 7.0.50), python-all-dev (>= 2.6.6-3~), python3-all-dev (>= 3.1.3-2~), chrpath, xmlto, automake (>= 1.10), autoconf (>= 2.61), libtool, python-setuptools, python3-setuptools, dpkg-dev (>= 1.16.1~), autotools-dev -Package-List: - cracklib-runtime deb admin optional - libcrack2 deb libs optional - libcrack2-dev deb libdevel extra - python-cracklib deb python optional - python3-cracklib deb python optional -Checksums-Sha1: - 29224f51db85e1946c209f6ef6c38da699a9c7cc 611602 cracklib2_2.8.19.orig.tar.gz - b3b701e951362b23c8abb948936e8534d0c9b9a2 29349 cracklib2_2.8.19-1.debian.tar.gz -Checksums-Sha256: - 7086b0ca23f875c9cd9ea2a993c262384b274dba9c4ea1da845ec8ac290748a9 611602 cracklib2_2.8.19.orig.tar.gz - 2f9570faa47bf5ec8bae4bf9d0e6dfacbab6369ab27ff5c28da34396c0dca85c 29349 cracklib2_2.8.19-1.debian.tar.gz -Files: - ca0ec168d9c6466612204e8dfb2df8a9 611602 cracklib2_2.8.19.orig.tar.gz - 12936e97cc34a28f2efec62e115a60e1 29349 cracklib2_2.8.19-1.debian.tar.gz - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.12 (GNU/Linux) - -iQIcBAEBCAAGBQJPuCxeAAoJEKc+AFVVj7jdf6cP/RyYW8CusiTv7PZGbjOjrorT -/tA7O1UCr+Cpij+PySXh2Nzcq//PBr41wkPftIJRvFd9CPjP5deBCnoSnvPhrZ3b -enRF/xR/42D2M51leoUMcwTpgTXFhjfhUBXwL459zzlnT8X2jHOmRSNTEN9zaBXZ -HiTna67w4sRbtOzemzkTM1HMwHjYCIZO+yK5/gO5klre+jM19zNIqJAu41CsTjmC -mRK2/9Qc6q96VAKwGEVaB14/cEUuMu6rBhgpT5rMcD26EjtXi4QZsfjjx/COhhsC -/MpaKn8re5LVEWyi13onpWgZPwfxkBOtyWyr9iDcSOWRETkLdJJCSL8P2aS+FBUW -ju9Am3Yip1Y7VrlcmAlwmARCofaM/7q1cW4YnFn2vYG7Ogh43P8qu4q889TeXKP7 -p+3W2m0CqCMU7FN1PhLs8fSNmvn/Bj+4R2XPU1WSOCbwN78ePpwdzUWQrYWSBAYa -i9GTVUYIILPeGfyTApFwjON2bAK/RrO0WyEjNljSB6QU4h3xrKHIi3eGxJFcnZMH -RFHkNwZInzTAxjz78W3zxfu//GxL+VfxzVZ/QFwclrDr5rDtott767GOoej83RHp -GrUK51OO31hXiP/hEF0pXJpdFkpJ7tvU90W/cwMB3EXqOuqrZ7+woOJFJWNfMpjT -9pqXxvvTYhf4g8Btov9S -=M0t3 ------END PGP SIGNATURE----- diff --git a/sources b/sources index 8d8e61a..0b9806b 100644 --- a/sources +++ b/sources @@ -1,4 +1,5 @@ +SHA512 (cracklib2_2.8.19-1.debian.tar.gz) = c6b2ac40e25b69566a9e8728ac2686c559e3c932da0d43b7e63aa32f154caae9d1d0067f8ce3629361826b92d5315df3456c2390c351b387a3dbe149baed6511 +SHA512 (cracklib2_2.8.19-1.dsc) = 13a52cdbfaa81b625f5deeb3fbd7acde77a4a5e6fbe3cd6a0e4d541b61b7a7d41909e3d48bb27145dcb6f0e4681fa7fcf61acff10977d6b7675db23fa3816469 SHA512 (cracklib-2.9.6.tar.gz) = 2b09672e5b412d670e7ed911ebf0c0023fe2901ea05c9c02eefb7a58a13cddbc27a65d75bb20be9f8cebf4c90a9a56dfe1a3b656dff62b1d6048f5376e671786 SHA512 (cracklib-words-2.9.6.gz) = fc5bbe7699c9c9e3f39f5c82f53ec8a4ea85e08d5513188a2f6423f92779008b87d85cfcf87a9a5d13a49b04c30f73890cd4d3fa7cd4a6bdac5c1ebc18e18bc3 -SHA512 (cracklib2_2.8.19-1.debian.tar.gz) = c6b2ac40e25b69566a9e8728ac2686c559e3c932da0d43b7e63aa32f154caae9d1d0067f8ce3629361826b92d5315df3456c2390c351b387a3dbe149baed6511 SHA512 (missing-words.gz) = 50afb5538ddd15de997883f5ff6925d9084117851cfdcfc02f05c28304d6c17b46ea669fe626ad819e732b6f291f308194300c9db9b110a5c15a4e5d97ca6caa diff --git a/tests/ABI-compatibility/Makefile b/tests/ABI-compatibility/Makefile new file mode 100644 index 0000000..964c3e5 --- /dev/null +++ b/tests/ABI-compatibility/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/cracklib/Sanity/ABI-compatibility +# Description: Test if the ABI hasn't changed +# Author: Hubert Kario +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/cracklib/Sanity/ABI-compatibility +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Hubert Kario " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test if the ABI hasn't changed" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: cracklib" >> $(METADATA) + @echo "Requires: cracklib cracklib-devel gcc words ltrace" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL3 -RHEL4" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/ABI-compatibility/PURPOSE b/tests/ABI-compatibility/PURPOSE new file mode 100644 index 0000000..f256265 --- /dev/null +++ b/tests/ABI-compatibility/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/cracklib/Sanity/ABI-compatibility +Description: Test if the ABI hasn't changed +Author: Hubert Kario diff --git a/tests/ABI-compatibility/runtest.sh b/tests/ABI-compatibility/runtest.sh new file mode 100755 index 0000000..58f6400 --- /dev/null +++ b/tests/ABI-compatibility/runtest.sh @@ -0,0 +1,81 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/cracklib/Sanity/ABI-compatibility +# Description: Test if the ABI hasn't changed +# Author: Hubert Kario +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="cracklib" + +if rlIsRHEL 5; then +PACKAGES="cracklib gcc words ltrace" +else +PACKAGES="cracklib cracklib-devel gcc words ltrace" +fi + +rlJournalStart + rlPhaseStartSetup + for PKG in $PACKAGES; do + rlAssertRpm $PKG + done + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "if [ ! -e /usr/share/cracklib/pw_dict.pwi ]; then create-cracklib-dict /usr/share/dict/words; fi" 0 "Create a cracklib dictionary if not already present" + rlRun "pushd $TmpDir" + rlRun "cat > test.c <<_EOF_ +#include +#include + +int main(int argc, char **argv) +{ + char const *dict = \"/usr/share/cracklib/pw_dict\"; + char const *msg = NULL; + msg = FascistCheck(\"AAAAAAAA\", dict); + if (msg == 0) + return 1; + else + { + printf(\"%s\\n\", msg); + return 0; + } +} +_EOF_" 0 "Create test application" + rlPhaseEnd + + rlPhaseStartTest + rlRun "gcc -O0 test.c -lcrack -Wall -o test" 0 "Compile the program" + rlRun "./test" 0 "Run the program" + rlRun "ltrace -o ltrace.out ./test" 0 "Run the program with ltrace" + rlRun "grep FascistCheck ltrace.out" 0 "Check if it actually uses the library function" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Localization/Makefile b/tests/Localization/Makefile new file mode 100644 index 0000000..37c4135 --- /dev/null +++ b/tests/Localization/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/cracklib/Sanity/Localization +# Description: Check if package localization is correct +# Author: Hubert Kario +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/cracklib/Sanity/Localization +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Hubert Kario " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Check if package localization is correct" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: cracklib" >> $(METADATA) + @echo "Requires: cracklib" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Localization/PURPOSE b/tests/Localization/PURPOSE new file mode 100644 index 0000000..83d8e81 --- /dev/null +++ b/tests/Localization/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/cracklib/Sanity/Localization +Description: Check if package localization is correct +Author: Hubert Kario diff --git a/tests/Localization/runtest.sh b/tests/Localization/runtest.sh new file mode 100755 index 0000000..6afb4ab --- /dev/null +++ b/tests/Localization/runtest.sh @@ -0,0 +1,125 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/cracklib/Sanity/Localization +# Description: Check if package localization is correct +# Author: Hubert Kario +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="cracklib" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlAssertRpm grep + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + + rlPhaseStartTest "Sanity" + rlRun "echo 'aVk(|vDTRz$xVE-W6(Z2' | LANG=C cracklib-check | grep ': OK'" 0 "Check if cracklib-check accepts complex passwords" + rlRun "echo AAAAAAAAAAAA | LANG=C cracklib-check | grep ': OK'" 1 "Verify that cracklib-check rejects simple passwords" + rlRun "echo AAAAAAAAAAAA | LANG=C cracklib-check | grep 'DIFFERENT'" 0 "Verify that rejection message contains string 'DIFFERENT'" + rlPhaseEnd + +NAME[0]="Assamese" +CODE[0]="as_IN.utf8" + +NAME[1]="Bengali" +CODE[1]="bn_IN.utf8" + +NAME[2]="German" +CODE[2]="de_DE.utf8" + +NAME[3]="Spanish" +CODE[3]="es_ES.utf8" + +NAME[4]="French" +CODE[4]="fr_FR.utf8" + +NAME[5]="Gujarati" +CODE[5]="gu_IN.utf8" + +NAME[6]="Hindi" +CODE[6]="hi_IN.utf8" + +NAME[7]="Italian" +CODE[7]="it_IT.utf8" + +NAME[8]="Japanese" +CODE[8]="ja_JP.utf8" + +NAME[9]="Kannada" +CODE[9]="kn_IN.utf8" + +NAME[10]="Korean" +CODE[10]="ko_KR.utf8" + +NAME[11]="Malayalam" +CODE[11]="ml_IN.utf8" + +NAME[12]="Marathi" +CODE[12]="mr_IN.utf8" + +NAME[13]="Oriya" +CODE[13]="or_IN.utf8" + +NAME[14]="Punjabi" +CODE[14]="pa_IN.utf8" + +NAME[15]="Brazil Portugese" +CODE[15]="pt_BR.utf8" + +NAME[16]="Russian" +CODE[16]="ru_RU.utf8" + +NAME[17]="Tamil" +CODE[17]="ta_IN.utf8" + +NAME[18]="Telugu" +CODE[18]="te_IN.utf8" + +NAME[19]="Chinese" +CODE[19]="zh_CN.utf8" + +NAME[20]="Taiwanese Chinese" +CODE[20]="zh_TW.utf8" + +for i in ${!NAME[@]}; do + rlPhaseStartTest "${NAME[$i]}" + rlRun "echo AAAAAAAAAAAA | LANG=${CODE[$i]} cracklib-check | grep -Ev DIFFERENT\>" 0 "Check if fallback message isn't used" + rlRun "echo AAAAAAAAAAAA | LANG=${CODE[$i]} cracklib-check | grep '???????'" 1 "Check if message isn't clobbered" + rlPhaseEnd +done + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/inventory b/tests/inventory new file mode 100755 index 0000000..6238138 --- /dev/null +++ b/tests/inventory @@ -0,0 +1,3 @@ +#!/bin/bash +export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined" +exec merge-standard-inventory "$@" diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..ac40fef --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,25 @@ +--- +# Tests for Docker and Classic Context +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + - container + tests: + - ABI-compatibility + - Localization + required_packages: + - words # required for ABI-compatibility + - cracklib-devel # required for ABI-compatibility + - ltrace # required for ABI-compatibility + - gcc # required for ABI-compatibility + +# Tests for Atomic +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - atomic + tests: + - Localization