From d76f8c142d0d117471c55fd5e2955950e6fcc992 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Dec 21 2017 16:41:50 +0000 Subject: Merge remote-tracking branch 'origin' into private-kdudka-coreutils-next --- diff --git a/coreutils-8.27.tar.xz.sig b/coreutils-8.27.tar.xz.sig deleted file mode 100644 index 7555c00..0000000 --- a/coreutils-8.27.tar.xz.sig +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIcBAABAgAGBQJYwOwaAAoJEN9v2XEwYDfZQrUP/RdXj/ug35e+u+VD1ts9/b8n -7JihJmxngEZQAJECNTMbJ7mNj6DhpMY0Jg/Hwg7zJT28T6QDeS1Iuk3Id4uM5eFa -CgHKAZumntSMTkQdNvnCEFEIqu+L8BtBYGcOaw66wAFNFw3jdJUUs2sOST2r46jR -N7aY9oARKJuHfgTZ2BI2zL0Q+poXM1O0k/U+BScE6c139zJsbg+1uM9kGVtJWPkM -EPLFWkbTgjYnt+qEFrDlWL0YFOS42sgR7P1sVfBC1nAu5lwgzPy62OtGv9WCEBhm -3+PRNZ0KLW8CKp06llG/0bG4QwssWs6p/vPwrRGeAg6pKsRNN1ni27AnDThiPgvz -YbBLgU+EZj1HuibvYArHXNKY2+O5ZC3nYU6bdAffl3TAtrGFA1ncZXGiFD5UgOQ2 -V9Q38S41FUEwKGtf9tWGCRTxrb4FQ1CDzJglV9vHKetn4mgH/HpEG/q07k4RNW5d -ikfrS0xFxbqtLjlY3UqvtkrFyVQFY093ozsP7fKsq53JAtEWc3YvXR8UCbliU+gV -5qug0REBQafe9EAyH+oq0dzD2BZ3KtFcjtKI/2UzAf3idcyygsHgcEPQObqI8BfD -NscEMjdFY7+Zh5w2shQlyq4xr2aI2nXCX3+AMcS/6Yfg6W6fBvgIjtmXBrQsbWpV -DBcx50TVDa/ERBX1+FI1 -=skPR ------END PGP SIGNATURE----- diff --git a/coreutils-8.28.tar.xz.sig b/coreutils-8.28.tar.xz.sig new file mode 100644 index 0000000..4a76f06 --- /dev/null +++ b/coreutils-8.28.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIcBAABAgAGBQJZqhkfAAoJEN9v2XEwYDfZZEQP/REePQxk2OXPSRSyYSaazIeP +gDno1D4tcHXHhvl210ouOEvCGux6tJtHmCQ5Y43Dkt56DJ3Eb9dk2JYrisvcrJhv +3m098YY2hseVLJ7M3jnf9slAXBrS23i+mUWHADeRpFIJZQQz1KEZVb1gsI0FO9Ch +Qp64hBPB4X1Ydxz57KywUpEgBC9Cj0KwWW9L6jIHK+V1izLoI1JslUxHXkyTy9as +WjmDuJp1nMewjbAza//HHNiqote59JewuLcxiA9EdK8jzQZXF+fbRasFO3XEobMl +0WYtN0MwYN2576xSGwTyp7IakFcNHjWciE9SuvPmg/VCLELV6vl4VJXAmv/kQKeE +whVq7kfdzRAKDwUXdXyCqzYSEi1+N+2izJaI4twgExDwm89OApe6aka8UBbqClyz +cn4UmqYMgjwvKXPJtqMUmzEwAzDxuXQJL6Uj5kY8RJLCqBv/eN+YoxODTZz3oDGU +988K6K2Q9QaOGSNJHiBrgddCARuxeRVizbDSi2GcSQdPRbTM4g7YK//KE8LoKdil +ngIeam0vomPJnJqI03U1wGKhxsDqOEEQ3CFch7mQ2S1eWtqeag3arcBVALZUdCzX +hckiSXd0Yuks8AyHb8LH7/3h1BJUWVg/v7iQ2E3UMHAE78Ww28MyppMhy+4U9knU +Dp2VXtxBOJVXJETdVFXY +=7Q/5 +-----END PGP SIGNATURE----- diff --git a/coreutils-df-direct.patch b/coreutils-df-direct.patch index a69d896..248a6ae 100644 --- a/coreutils-df-direct.patch +++ b/coreutils-df-direct.patch @@ -112,7 +112,7 @@ index 8f760db..a7385fd 100644 { if (posix_format) diff --git a/tests/df/direct.sh b/tests/df/direct.sh -new file mode 100644 +new file mode 100755 index 0000000..8e4cfb8 --- /dev/null +++ b/tests/df/direct.sh diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index b6f317f..747772d 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -3119,7 +3119,7 @@ index 87a0c93..9f755d9 100644 skip_fields = 0; check_chars = SIZE_MAX; diff --git a/tests/i18n/sort.sh b/tests/i18n/sort.sh -new file mode 100644 +new file mode 100755 index 0000000..26c95de --- /dev/null +++ b/tests/i18n/sort.sh @@ -3403,7 +3403,7 @@ index 4d399d8..07f2823 100755 my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/sort-mb-tests.sh b/tests/misc/sort-mb-tests.sh -new file mode 100644 +new file mode 100755 index 0000000..11836ba --- /dev/null +++ b/tests/misc/sort-mb-tests.sh diff --git a/coreutils.spec b/coreutils.spec index 77dba3c..34c5f48 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils -Version: 8.27 -Release: 9999.2%{?dist} +Version: 8.28 +Release: 9999.1%{?dist} License: GPLv3+ Group: System Environment/Base Url: https://www.gnu.org/software/coreutils/ @@ -119,19 +119,6 @@ Requires: ncurses Provides: bundled(gnulib) Provides: coreutils-full = %{version}-%{release} -Provides: fileutils = %{version}-%{release} -Provides: sh-utils = %{version}-%{release} -Provides: stat = %{version}-%{release} -Provides: textutils = %{version}-%{release} - -#old mktemp package had epoch 3, so we have to use 4 for coreutils -Provides: mktemp = 4:%{version}-%{release} -Obsoletes: mktemp < 4:%{version}-%{release} - -Obsoletes: fileutils <= 4.1.9 -Obsoletes: sh-utils <= 2.0.12 -Obsoletes: stat <= 3.3 -Obsoletes: textutils <= 2.0.21 Obsoletes: %{name} < 8.24-100 %description @@ -285,6 +272,12 @@ fi %license COPYING %changelog +* Tue Nov 07 2017 Igor Gnatenko - 8.28-2 +- Remove very old Provides (mktemp, sh-utils, textwrap, fileutils, stat) + +* Mon Sep 04 2017 Kamil Dudka - 8.28-1 +- new upstream release 8.28 + * Tue Aug 22 2017 Ville Skyttä - 8.27-16 - Own the %%{_libexecdir}/coreutils dir diff --git a/tests/readlink-cannot-handle-recursive-symlinks/Makefile b/tests/readlink-cannot-handle-recursive-symlinks/Makefile new file mode 100644 index 0000000..49d37a7 --- /dev/null +++ b/tests/readlink-cannot-handle-recursive-symlinks/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/coreutils/readlink-cannot-handle-recursive-symlink s +# Description: Test for readlink cannot handle recursive symlinks +# Author: Jan Scotka +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2010 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/coreutils/readlink-cannot-handle-recursive-symlinks +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) + chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Jan Scotka " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for readlink cannot handle recursive symlinks" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: coreutils" >> $(METADATA) + @echo "Requires: coreutils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/readlink-cannot-handle-recursive-symlinks/PURPOSE b/tests/readlink-cannot-handle-recursive-symlinks/PURPOSE new file mode 100644 index 0000000..b9fd740 --- /dev/null +++ b/tests/readlink-cannot-handle-recursive-symlinks/PURPOSE @@ -0,0 +1,54 @@ +PURPOSE of /CoreOS/coreutils/readlink-cannot-handle-recursive-symlinks +Description: Test for readlink cannot handle recursive symlinks +Author: Jan Scotka +Bug summary: readlink cannot handle recursive symlinks + +Description: + +Description of problem: +The readlink command fails with an error "Too many levels of symbolic links", even if there are only 2 levels. + +The readlink command from RHEL 3 and RHEL 4 and from Fedora 11 all work fine. + +Among other changes between RHEL 4 and RHEL 5, RHEL 5's coreutils added calls to cycle_check() in lib/canonicalize.c, but in upstream canonicalize.c (now in gnulib instead of coreutils), we see the comment: + /* Detect loops. We cannot use the cycle-check module here, + since it's actually possible to encounter the same symlink + more than once in a given traversal. However, encountering + the same symlink,NAME pair twice does indicate a loop. */ + +http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/canonicalize.c;h=4f348398fd69ae516396313d18ac294a4ca3dde3;hb=b653eda3ac4864de205419d9f41eec267cb89eeb#l262 + +The latest canonicalize.c uses seen_triple() instead of cycle_check(). + + +Version-Release number of selected component (if applicable): +coreutils-5.97-19.el5 + +How reproducible: +every time + +Steps to Reproduce: +1. Create a directory with a symlink to itself + mkdir /tmp/dir + cd /tmp/dir + ln -s ../dir dirlink + +2. Run readlink using the 'dirlink' symlink recursively + readlink -v -f dirlink + readlink -v -f dirlink/dirlink + readlink -v -f dirlink/dirlink/dirlink + +Actual results: +The first readlink command on just dirlink succeeds, but the 2nd and 3rd commands fail with + readlink: dirlink/dirlink: Too many levels of symbolic links + +Expected results: +$ readlink -v -f dirlink +/tmp/dir +$ readlink -v -f dirlink/dirlink +/tmp/dir +$ readlink -v -f dirlink/dirlink/dirlink +/tmp/dir + + +Additional info: diff --git a/tests/readlink-cannot-handle-recursive-symlinks/runtest.sh b/tests/readlink-cannot-handle-recursive-symlinks/runtest.sh new file mode 100755 index 0000000..6ee251f --- /dev/null +++ b/tests/readlink-cannot-handle-recursive-symlinks/runtest.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/coreutils/readlink-cannot-handle-recursive-symlinks +# Description: Test for readlink cannot handle recursive symlinks +# Author: Jan Scotka +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2010 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 rhts environment +. /usr/bin/rhts-environment.sh +. /usr/lib/beakerlib/beakerlib.sh + +PACKAGE="coreutils" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "mkdir link" 0 "Creating test directory" + rlRun "cd link" 0 "cd to this dir" + rlRun "ln -s ../link link" 0 "creating symlink to ../link -> link" + rlPhaseEnd + + rlPhaseStartTest + rlLog "Test of readlink up to 20 iteration" + export TMPVAR="link" + for foo in `seq 20` + do echo $TMPVAR + rlRun "readlink -v -f $TMPVAR" 0 "readlink of $TMPVAR" + TMPVAR="$TMPVAR/link" + done + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/test-basics b/tests/test-basics new file mode 100755 index 0000000..7324553 --- /dev/null +++ b/tests/test-basics @@ -0,0 +1,39 @@ +#!/bin/sh + +# Checks that touch ls rm and foo work +# https://www.mankier.com/1/beakerlib#Examples +. /usr/share/beakerlib/beakerlib.sh + +# Set the full test name +TEST="/examples/beakerlib/Sanity/phases" + +# Package being tested +PACKAGE="coreutils" + +rlJournalStart + # Setup phase: Prepare test directory + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun 'TmpDir=$(mktemp -d)' 0 'Creating tmp directory' # no-reboot + rlRun "pushd $TmpDir" + rlPhaseEnd + + # Test phase: Testing touch, ls and rm commands + rlPhaseStartTest + rlRun "touch foo" 0 "Creating the foo test file" + rlAssertExists "foo" + rlRun "ls -l foo" 0 "Listing the foo test file" + rlRun "rm foo" 0 "Removing the foo test file" + rlAssertNotExists "foo" + rlRun "ls -l foo" 2 "Listing foo should now report an error" + rlPhaseEnd + + # Cleanup phase: Remove test directory + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalEnd + +# Print the test report +rlJournalPrintText diff --git a/tests/test_basics.yml b/tests/test_basics.yml new file mode 100644 index 0000000..d5727cf --- /dev/null +++ b/tests/test_basics.yml @@ -0,0 +1,9 @@ +--- +# This first play always runs on the local staging system +- hosts: localhost + tags: + - atomic + - classic + - container + roles: + - { role: standard-test-beakerlib, tests: [ test-basics, readlink-cannot-handle-recursive-symlinks ] } diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..529263d --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,2 @@ +# Fedora Continuous Integration: https://fedoraproject.org/wiki/CI +- include: test_basics.yml