From 017a05b72286e1557cb16dfe2cf3d01f425d0e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 4 Mar 2022 02:24:54 +0000 Subject: [PATCH] add patch to fix cp test on 32bits --- fakechroot.spec | 6 ++++-- fix_test_on_32bits.patch | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 fix_test_on_32bits.patch diff --git a/fakechroot.spec b/fakechroot.spec index ed84cc7..7a32d75 100644 --- a/fakechroot.spec +++ b/fakechroot.spec @@ -10,6 +10,8 @@ Patch2: https://github.com/dex4er/fakechroot/pull/85/commits/534e6d55573 Patch3: https://github.com/dex4er/fakechroot/pull/85/commits/75d7e6fa191c11a791faff06a0de86eaa7801d05.patch Patch4: https://github.com/dex4er/fakechroot/pull/85/commits/693a3597ea7fccfb62f357503ff177bd3e3d5a89.patch Patch5: https://github.com/dex4er/fakechroot/pull/86.patch +Patch6: fix_test_on_32bits.patch + Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -47,10 +49,10 @@ chmod -x scripts/{relocatesymlinks,restoremode,savemode}.sh %build autoreconf -vfi -%if "%{_libdir}" == "/usr/lib64" +%if 0%{?__isa_bits} == 64 %configure --disable-static --disable-silent-rules --with-libpath="%{_libdir}/fakechroot:/usr/lib/fakechroot" %else -%configure --disable-static --disable-silent-rules --with-libpath="%{_libdir}/fakechroot" +%configure --disable-static --disable-silent-rules --with-libpath="%{_libdir}/fakechroot:/usr/lib64/fakechroot" %endif %make_build diff --git a/fix_test_on_32bits.patch b/fix_test_on_32bits.patch new file mode 100644 index 0000000..79fde03 --- /dev/null +++ b/fix_test_on_32bits.patch @@ -0,0 +1,21 @@ +removing leading / for some reason cp doesn't like it +--- fakechroot-2.20.1/test/t/cp.t 2019-03-22 21:02:42.000000000 +0000 ++++ fakechroot-2.20.1/test/t/cp.t 2022-03-04 02:07:11.511455404 +0000 +@@ -19,13 +19,13 @@ for chroot in chroot fakechroot; do + else + + echo 'something' > $testtree/file-$chroot +- ln -s /file-$chroot $testtree/symlink-$chroot ++ ln -s file-$chroot $testtree/symlink-$chroot + +- t=`$srcdir/$chroot.sh $testtree /bin/sh -c "cp $CP_ARGS /file-$chroot /file2-$chroot; cat /file2-$chroot" 2>&1` ++ t=`$srcdir/$chroot.sh $testtree /bin/sh -c "cp $CP_ARGS file-$chroot file2-$chroot; cat /file2-$chroot" 2>&1` + test "$t" = "something" || not +- ok "$chroot cp $CP_ARGS /file-$chroot /file2-$chroot:" $t ++ ok "$chroot cp $CP_ARGS file-$chroot file2-$chroot:" $t + +- t=`$srcdir/$chroot.sh $testtree /bin/sh -c "cp $CP_ARGS /symlink-$chroot /symlink2-$chroot; cat /symlink2-$chroot" 2>&1` ++ t=`$srcdir/$chroot.sh $testtree /bin/sh -c "cp $CP_ARGS symlink-$chroot symlink2-$chroot; cat /symlink2-$chroot" 2>&1` + test "$t" = "something" || not + ok "$chroot cp $CP_ARGS /symlink-$chroot /symlink2-$chroot:" $t +