re-import sources as agreed with the maintainer

This commit is contained in:
Adam Samalik 2023-07-11 10:37:50 +02:00
parent f50ffc4c92
commit d466c8f444
7 changed files with 291 additions and 0 deletions

66
.gitignore vendored
View File

@ -1 +1,67 @@
/floppy-0.16.tar.bz2
/util-linux-2.19-rc1.tar.bz2
/util-linux-2.19-rc1-32-gbded43d.tar.bz2
/util-linux-2.19-rc2.tar.bz2
/util-linux-2.19-rc3.tar.bz2
/util-linux-2.19.tar.bz2
*~
.*.log
*.rpm
/floppy-0.18.tar.bz2
/util-linux-2.19.1-rc1.tar.bz2
/util-linux-2.19.1.tar.bz2
/util-linux-2.20-rc1.tar.bz2
/util-linux-2.20-rc2.tar.bz2
/util-linux-2.20.tar.bz2
/util-linux-2.20.1.tar.bz2
/util-linux-2.21-rc2.tar.xz
/util-linux-2.21.tar.xz
/util-linux-2.21.1.tar.xz
/util-linux-2.21.2.tar.xz
/util-linux-2.22-rc2.tar.xz
/util-linux-2.22.tar.xz
/util-linux-2.22.1.tar.xz
/util-linux-2.22.2.tar.xz
/util-linux-2.23-rc1.tar.xz
/util-linux-2.23-rc2.tar.xz
/util-linux-2.23.tar.xz
/util-linux-2.23.1.tar.xz
/util-linux-2.23.2.tar.xz
/util-linux-2.24-rc1.tar.xz
/util-linux-2.24.tar.xz
/util-linux-2.24.1.tar.xz
/util-linux-2.24.2.tar.xz
/util-linux-2.25-rc1.tar.xz
/util-linux-2.25-rc2.tar.xz
/util-linux-2.25.tar.xz
/util-linux-2.25.1-rc1.tar.xz
/util-linux-2.25.1.tar.xz
/util-linux-2.25.2.tar.xz
/util-linux-2.26-rc1.tar.xz
/util-linux-2.26-rc2.tar.xz
/util-linux-2.26.tar.xz
/util-linux-2.26.2.tar.xz
/util-linux-2.27-rc1.tar.xz
/util-linux-2.27-rc2.tar.xz
/util-linux-2.27.tar.xz
/util-linux-2.27.1.tar.xz
/util-linux-2.28-rc1.tar.xz
/util-linux-2.28-rc2.tar.xz
/util-linux-2.28.tar.xz
/util-linux-2.28.1.tar.xz
/util-linux-2.28.2.tar.xz
/util-linux-2.29-rc1.tar.xz
/util-linux-2.29-rc2.tar.xz
/util-linux-2.29.tar.xz
/util-linux-2.29.1.tar.xz
/util-linux-2.29.2.tar.xz
/util-linux-2.30-rc1.tar.xz
/util-linux-2.30.tar.xz
/util-linux-2.30.1.tar.xz
/util-linux-2.30.2.tar.xz
/util-linux-2.31-rc1.tar.xz
/util-linux-2.31-rc2.tar.xz
/util-linux-2.31.tar.xz
/util-linux-2.32-rc1.tar.xz
/util-linux-2.32.tar.xz
/util-linux-2.32.1.tar.xz

12
STAGE1-util-linux Normal file
View File

@ -0,0 +1,12 @@
srpm util-linux
mcd $BUILDDIR/$1
cat <<EOF > config.cache
ax_cv_have_tls=yes
scanf_cv_alloc_modifier=ms
EOF
$SRC/${1}-*/configure $TCONFIGARGS --without-ncurses --without-tinfo \
--prefix=/usr --libexecdir=/usr/lib${SUFFIX} --libdir=/usr/lib${SUFFIX} \
--disable-wall --cache-file=config.cache --without-python --without-systemd
notparallel
make $J V=1
make $J install DESTDIR=${ROOTFS}

57
tests/tests.yml Normal file
View File

@ -0,0 +1,57 @@
- hosts: localhost
tags:
- classic
- container
- atomic
vars:
# standard-test-basic directory for tests are relative to {{ tenv_workdir }}
tenv_workdir: /var/test
pre_tasks:
- import_role:
name: standard-test-source
vars:
fetch_only: True
- name: Copy files including source to test environment
synchronize:
src: "{{ playbook_dir }}/.."
dest: "{{ tenv_workdir }}"
mode: push
ssh_args: "-o UserKnownHostsFile=/dev/null"
roles:
- role: standard-test-beakerlib
required_packages:
- util-linux
- util-linux-user
tests:
- various
- role: standard-test-basic
required_packages:
- util-linux
- util-linux-user
- coreutils
- bzip2
- xz
- bc
- device-mapper
- iproute
- mdadm
- e2fsprogs
- binutils
- procps-ng
- sed
- gawk
- file
- git
- rpm-build
tests:
- prepare-source:
dir: ./
run: rpmbuild -bp {{tenv_workdir}}/*.spec --nodeps --define "_sourcedir {{tenv_workdir}}" --define "_builddir {{tenv_workdir}}/source"
- flatten-source:
dir: ./
run: shopt -s dotglob; mv {{tenv_workdir}}/source/*/* {{tenv_workdir}}/source
- upstream:
dir: upstream
run: ./runtest.sh

37
tests/upstream/runtest.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/bash
# Copyright (C) 2019 Karel Zak <kzak@redhat.com>
srcdir="../source"
testdir="${srcdir}/tests"
if [ ! -x "${testdir}/run.sh" ]; then
echo "upstream tests not found"
exit 1
fi
# We don't compile the tests, but it still needs some hints.
#
echo > ${srcdir}/config.h
echo "#define HAVE_WIDECHAR 1" >> ${srcdir}/config.h
echo "#define HAVE_LINUX_NET_NAMESPACE_H 1" >> ${srcdir}/config.h
# Remove stuff we don't have in RHEL
#
rm -rf ${testdir}/ts/misc/line
version_tests=$(cat ${srcdir}/.version)
version_system=$(rpm -q util-linux)
echo
echo "Used versions: "
echo " upstream tests: $version_tests"
echo " installed util-linux: $version_system"
echo
# Run upstream tests
#
${testdir}/run.sh --use-system-commands --noskip-commands --show-diff
exit $?

64
tests/various/Makefile Normal file
View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/util-linux/various
# Description: This test groups small sanity and regression tests for util-linux
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/util-linux/Sanity/various
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: Miroslav Vadkerti <mvadkert@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: This test groups small sanity and regression tests for util-linux" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: util-linux" >> $(METADATA)
@echo "Requires: util-linux util-linux-user" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL3 -RHEL4 -RHEL5Server -RHEL5Client -RHEL6" >> $(METADATA)
rhts-lint $(METADATA)

3
tests/various/PURPOSE Normal file
View File

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/util-linux/various
Description: This test groups small sanity and regression tests for util-linux
Author: Miroslav Vadkerti <mvadkert@redhat.com>

52
tests/various/runtest.sh Executable file
View File

@ -0,0 +1,52 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/util-linux/various
# Description: This test groups small sanity and regression tests for util-linux
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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="util-linux"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlPhaseEnd
rlPhaseStartTest "return code of chfn should be always 1 in case failure"
rlRun "chfn -f a:b" 1
rlRun "chfn -o a:b" 1
rlRun "chfn -p a:b" 1
rlRun "chfn -h a:b" 1
rlRun "chfn -x a:b" 1
rlRun "chfn -f a -o b -p c -h d unknown-user" 1
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd