diff --git a/0001-Avoid-hangs-when-calling-ldd.fakechroot-with-unknown.patch b/0001-Avoid-hangs-when-calling-ldd.fakechroot-with-unknown.patch new file mode 100644 index 0000000..bbbce2f --- /dev/null +++ b/0001-Avoid-hangs-when-calling-ldd.fakechroot-with-unknown.patch @@ -0,0 +1,46 @@ +From d5e00bd29828468673420c552e7f027be8c43e02 Mon Sep 17 00:00:00 2001 +From: Alastair Hughes +Date: Fri, 24 Aug 2018 21:57:44 +1200 +Subject: [PATCH] Avoid hangs when calling ldd.fakechroot with unknown + arguments + +--- + scripts/ldd.fakechroot.pl | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/scripts/ldd.fakechroot.pl b/scripts/ldd.fakechroot.pl +index a4dfe70..69c9b6c 100755 +--- a/scripts/ldd.fakechroot.pl ++++ b/scripts/ldd.fakechroot.pl +@@ -155,11 +155,6 @@ sub load_ldsoconf { + MAIN: { + my @args = @ARGV; + +- if (not @args) { +- print STDERR "fakeldd: missing file arguments\n"; +- exit 1; +- } +- + if (not `sh -c 'command -v objdump'`) { + print STDERR "fakeldd: objdump: command not found: install binutils package\n"; + exit 1; +@@ -170,10 +165,15 @@ MAIN: { + + while ($args[0] =~ /^-/) { + my $arg = $args[0]; +- shift @ARGV; ++ shift @args; + last if $arg eq "--"; + } + ++ if (not @args) { ++ print STDERR "fakeldd: missing file arguments\n"; ++ exit 1; ++ } ++ + foreach my $file (@args) { + %Libs = (); + $Dynamic = 0; +-- +2.33.0 + diff --git a/fakechroot.spec b/fakechroot.spec index 634882c..d22a9cc 100644 --- a/fakechroot.spec +++ b/fakechroot.spec @@ -1,12 +1,13 @@ Name: fakechroot Version: 2.19 -Release: 8 +Release: 9 Summary: Gives a fake chroot environment License: LGPLv2+ URL: https://github.com/dex4er/fakechroot Source0: https://github.com/dex4er/fakechroot/archive/%{version}/fakechroot-%{version}.tar.gz Patch0000: 0001-Add-support-of-LFS-compatible-fts-functions.patch +Patch0001: 0001-Avoid-hangs-when-calling-ldd.fakechroot-with-unknown.patch Requires: binutils Provides: fakechroot-libs = %{version}-%{release} @@ -52,6 +53,9 @@ autoreconf -vfi %{_mandir}/man1/fakechroot.1* %changelog +* Fri Dec 22 2023 liyuanyuan - 2.19-9 +- Avoid hangs when calling ldd.fakechroot with unknown arguments + * Wed Jan 22 2020 gulining - 2.19-8 - Disable test