From 46d57e69241a7ff25e92867dabcb488d3ca03f78 Mon Sep 17 00:00:00 2001 From: Wryyyong Date: Wed, 25 Oct 2023 15:32:16 +0800 Subject: [PATCH] Update parallel to version 20231022 --- parallel/0001-support-MSys2.patch | 213 ++++++++++++++---------------- parallel/PKGBUILD | 11 +- 2 files changed, 107 insertions(+), 117 deletions(-) diff --git a/parallel/0001-support-MSys2.patch b/parallel/0001-support-MSys2.patch index 4c4fe304..8ab868a5 100644 --- a/parallel/0001-support-MSys2.patch +++ b/parallel/0001-support-MSys2.patch @@ -1,5 +1,8 @@ ---- /dev/null 2018-10-04 17:34:38.000000000 +0200 -+++ a/AX_SYS_PERLSHARPBANG.m4 2018-10-04 17:10:05.042511300 +0200 +diff --git a/AX_SYS_PERLSHARPBANG.m4 b/AX_SYS_PERLSHARPBANG.m4 +new file mode 100644 +index 0000000..9f4a87b +--- /dev/null ++++ b/AX_SYS_PERLSHARPBANG.m4 @@ -0,0 +1,138 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_sys_perlsharpbang.html @@ -139,12 +142,12 @@ + fi dnl + +])dnl EOMACRO DEF -diff --git old/configure.ac 001/configure.ac -index 8672d83..76c7405 100644 ---- old/configure.ac -+++ 001/configure.ac +diff --git a/configure.ac b/configure.ac +index 3770d7f..070e56e 100644 +--- a/configure.ac ++++ b/configure.ac @@ -1,4 +1,16 @@ - AC_INIT([parallel], [20200322], [bug-parallel@gnu.org]) + AC_INIT([parallel],[20231022],[bug-parallel@gnu.org]) + +# on MSys2 prefer msys to native programs, especially perl +# native windows perl does not work for the time being @@ -160,23 +163,26 @@ index 8672d83..76c7405 100644 AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ -diff --git old/src/Makefile.am 001/src/Makefile.am -index 20e5bd0..8f0c78a 100644 ---- old/src/Makefile.am -+++ 001/src/Makefile.am -@@ -1,4 +1,6 @@ --bin_SCRIPTS = parallel sql niceload parcat parset env_parallel \ +diff --git a/src/Makefile.am b/src/Makefile.am +index c113c4f..bf72a65 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -2,7 +2,9 @@ + # + # SPDX-License-Identifier: GPL-3.0-or-later + +-bin_SCRIPTS = parallel sql niceload parcat parset parsort \ +PERL_BINS = parallel sql niceload parcat parset + -+bin_SCRIPTS = $(PERL_BINS) env_parallel \ - env_parallel.ash env_parallel.bash env_parallel.csh \ - env_parallel.dash env_parallel.fish env_parallel.ksh \ - env_parallel.mksh env_parallel.pdksh env_parallel.sh \ -@@ -7,6 +9,12 @@ bin_SCRIPTS = parallel sql niceload parcat parset env_parallel \ ++bin_SCRIPTS = $(PERL_BINS) \ + env_parallel env_parallel.ash env_parallel.bash \ + env_parallel.csh env_parallel.dash env_parallel.fish \ + env_parallel.ksh env_parallel.mksh env_parallel.pdksh \ +@@ -47,6 +49,12 @@ HTML_FILES = parallel.html env_parallel.html sem.html sql.html \ install-exec-hook: - rm $(DESTDIR)$(bindir)/sem || true - $(LN_S) parallel $(DESTDIR)$(bindir)/sem -+ @cd $(DESTDIR)$(bindir); \ + rm "$(DESTDIR)$(bindir)"/sem || true + $(LN_S) parallel "$(DESTDIR)$(bindir)"/sem ++ @cd "$(DESTDIR)$(bindir)"; \ + for bin in $(PERL_BINS); do \ + mv $$bin "$$bin".tmp; \ + sed '1s|.*|#!$(PERL_SHEBANG)|' "$$bin".tmp > $$bin; \ @@ -184,12 +190,12 @@ index 20e5bd0..8f0c78a 100644 + done if DOCUMENTATION - man_MANS = parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 \ -diff --git old/src/niceload 001/src/niceload -index b17ceef..2667fff 100644 ---- old/src/niceload -+++ 001/src/niceload -@@ -148,11 +148,8 @@ exit($::exitstatus); + man_MANS = $(MAN_FILES) +diff --git a/src/niceload b/src/niceload +index 3085b87..3cbaf98 100755 +--- a/src/niceload ++++ b/src/niceload +@@ -150,11 +150,8 @@ exit($::exitstatus); if(not %pid_parentpid_cmd) { # Filter for SysV-style `ps` @@ -202,7 +208,7 @@ index b17ceef..2667fff 100644 # BSD-style `ps` my $bsd = q(ps -o pid,ppid,command -ax); %pid_parentpid_cmd = -@@ -167,7 +164,7 @@ exit($::exitstatus); +@@ -169,7 +166,7 @@ exit($::exitstatus); 'hpux' => $sysv, 'linux' => $sysv, 'mirbsd' => $bsd, @@ -211,7 +217,7 @@ index b17ceef..2667fff 100644 'MSWin32' => $sysv, 'netbsd' => $bsd, 'nto' => $sysv, -@@ -591,7 +588,7 @@ sub netsensor_script { +@@ -593,7 +590,7 @@ sub netsensor_script { $self->{'remedian'} = (sort @{$rref->[2]})[$#{$rref->[2]}/2]; } }; @@ -220,11 +226,11 @@ index b17ceef..2667fff 100644 } -diff --git old/src/parallel 001/src/parallel -index fd61160..d53bd0c 100644 ---- old/src/parallel -+++ 001/src/parallel -@@ -444,7 +444,7 @@ sub cat_partial { +diff --git a/src/parallel b/src/parallel +index b2dba64..ea03de0 100755 +--- a/src/parallel ++++ b/src/parallel +@@ -934,7 +934,7 @@ sub cat_partial($@) { } }); return "<". Q($file) . @@ -232,35 +238,35 @@ index fd61160..d53bd0c 100644 + " $^X -e '$script' @start_len |"; } - sub spreadstdin { -@@ -5560,7 +5557,7 @@ sub limit { - (tmp=$(tempfile); - LANG=C iostat -x 1 2 > $tmp; - mv $tmp $io_file) & -- perl -e '-e $ARGV[0] or exit(1); -+ !.$^X.q! -e '-e $ARGV[0] or exit(1); - for(reverse <>) { - /Device:/ and last; - /(\S+)$/ and $max = $max > $1 ? $max : $1; } -@@ -5587,7 +5584,7 @@ sub limit { - ps ax -o state,command | - grep -E '^[DOR].[^[]' | - wc -l | -- perl -ne 'exit ('$limit' < $_)'; -+ !.$^X.q! -ne 'exit ('$limit' < $_)'; + sub column_perlexpr($$$) { +@@ -7489,7 +7489,7 @@ sub limit($) { + ((tmp=$(tempfile); + LANG=C iostat -x 1 2 > $tmp; + mv $tmp $io_file) /dev/null & ); +- perl -e '-e $ARGV[0] or exit(1); ++ !.$^X.q! -e '-e $ARGV[0] or exit(1); + for(reverse <>) { + /Device/ and last; + /(\S+)$/ and $max = $max > $1 ? $max : $1; } +@@ -7514,7 +7514,7 @@ sub limit($) { + ps ax -o state,command | + grep -E '^[DOR].[^[]' | + wc -l | +- perl -ne 'exit ('$limit' < $_)'; ++ !.$^X.q! -ne 'exit ('$limit' < $_)'; }; - export -f load; - load %s; -@@ -5841,7 +5838,7 @@ sub loadavg_too_high { + load %s + !, +@@ -7787,7 +7787,7 @@ sub loadavg($) { # aix => "ps -ae -o state,command" # state wrong # bsd => "ps ax -o state,command" # sysv => "ps -ef -o s -o comm" - # cygwin => perl -ne 'close STDERR; /Name/ and print"\n"; \ + # cygwin => $^X -ne 'close STDERR; /Name/ and print"\n"; \ - # /(Name|Pid|Ppid|State):\s+(\S+)/ and print "$2\t";' /proc/*/status | - # awk '{print $2,$1}' + # /(Name|Pid|Ppid|State):\s+(\S+)/ and print "$2\t";' /proc/*/status | + # awk '{print $2,$1}' # dec_osf => bsd -@@ -5859,14 +5856,14 @@ sub loadavg_too_high { +@@ -7805,14 +7805,14 @@ sub loadavg($) { # svr5 => sysv # ultrix => ps -ax | awk '{print $3,$5}' # unixware => ps -el|awk '{print $2,$14,$15}' @@ -274,28 +280,28 @@ index fd61160..d53bd0c 100644 $psel="ps -el|awk '{ print \$2,\$14,\$15 }'"; - $cygwin=q{ perl -ne 'close STDERR; /Name/ and print"\n"; + $cygwin=q{ ].$^X.q[ -ne 'close STDERR; /Name/ and print"\n"; - /(Name|Pid|Ppid|State):\s+(\S+)/ and print "$2\t";' /proc/*/status | - awk '{print $2,$1}' }; + /(Name|Pid|Ppid|State):\s+(\S+)/ and print "$2\t";' /proc/*/status | + awk '{print $2,$1}' }; $dummy="echo S COMMAND;echo R dummy"; -@@ -5894,7 +5891,7 @@ sub loadavg_too_high { - 'ultrix' => "ps -ax | awk '{print \$3,\$5}'", +@@ -7841,7 +7841,7 @@ sub loadavg($) { + 'MSWin32' => $sysv, ); print `$ps{$^O}`; - }); -+ ]); ++ ]); # The command is too long for csh, so base64_wrap the command - $cmd = Job::base64_wrap($ps); + $Global::loadavg_cmd = $self->hexwrap($ps); } -@@ -6794,7 +6794,7 @@ sub sct_hpux() { +@@ -8785,7 +8785,7 @@ sub sct_hpux($) { $cpu->{'cores'} ||= - ::qqx(qq{ /usr/bin/mpsched -s 2>&1 | grep 'Locality Domain Count' | awk '{ print \$4 }'}); + ::qqx(qq{ /usr/bin/mpsched -s 2>&1 | grep 'Locality Domain Count' | awk '{ print \$4 }'}); $cpu->{'threads'} ||= -- ::qqx(qq{ /usr/bin/mpsched -s 2>&1 | perl -ne '/Processor Count\\D+(\\d+)/ and print "\$1"'}); -+ ::qqx(qq{ /usr/bin/mpsched -s 2>&1 | $^X -ne '/Processor Count\\D+(\\d+)/ and print "\$1"'}); +- ::qqx(qq{ /usr/bin/mpsched -s 2>&1 | perl -ne '/Processor Count\\D+(\\d+)/ and print "\$1"'}); ++ ::qqx(qq{ /usr/bin/mpsched -s 2>&1 | $^X -ne '/Processor Count\\D+(\\d+)/ and print "\$1"'}); return $cpu; } -@@ -7522,19 +7522,19 @@ sub empty_input_wrapper { +@@ -9503,19 +9503,19 @@ sub empty_input_wrapper($) { exit ($?&127 ? 128+($?&127) : 1+$?>>8) } }); @@ -308,9 +314,9 @@ index fd61160..d53bd0c 100644 - # $command = "perl -e '".base64_zip_eval()."' ". + # $command = "$^X -e '".base64_zip_eval()."' ". # join" ",string_zip_base64( - # 'exec "'.::perl_quote_scalar($command).'"'); -- return 'perl -e '.::Q($script)." ". -+ return '$^X -e '.::Q($script)." ". + # 'exec "'.::perl_quote_scalar($command).'"'); +- return 'perl -e '.::Q($script)." ". ++ return '$^X -e '.::Q($script)." ". base64_wrap("exec \"$Global::shell\",'-c',\"". ::perl_quote_scalar($command).'"'); } else { @@ -319,7 +325,7 @@ index fd61160..d53bd0c 100644 $Global::shell." -c ".::Q($command); } } -@@ -7827,7 +7827,7 @@ sub total_failed { +@@ -9887,7 +9887,7 @@ sub total_failed($) { # Command to remove files and dirs (given as args) without # affecting the exit value in $?/$status. if(not $script) { @@ -328,35 +334,35 @@ index fd61160..d53bd0c 100644 ::spacefree(0,q{ $bash=shift; $csh=shift; -@@ -7861,7 +7861,7 @@ sub total_failed { - # * cat > fifo - # * waitpid to get the exit code from $command - # * be less than 1000 chars long +@@ -9927,7 +9927,7 @@ sub total_failed($) { + # It has been measured on: + # AMD 6376: 4095 + # ppar -a big --pipepart --block -1 --test $1 --fifo 'cat {} >/dev/null'; - $script = "perl -e '". + $script = "$^X -e '". (::spacefree (0, q{ ($s,$c,$f) = @ARGV; -@@ -7963,7 +7960,7 @@ sub wrapped { +@@ -10034,7 +10034,7 @@ sub wrapped($) { $command = $self->sshlogin_wrap($command); if(@Global::cat_prepends) { # --pipepart: prepend: - # < /tmp/foo perl -e 'while(@ARGV) { + # < /tmp/foo $^X -e 'while(@ARGV) { - # sysseek(STDIN,shift,0) || die; $left = shift; - # while($read = sysread(STDIN,$buf, ($left > 131072 ? 131072 : $left))){ - # $left -= $read; syswrite(STDOUT,$buf); -@@ -7989,7 +7986,7 @@ sub wrapped { + # sysseek(STDIN,shift,0) || die; $left = shift; + # while($read = sysread(STDIN,$buf, ($left > 60800 ? 60800 : $left))){ + # $left -= $read; syswrite(STDOUT,$buf); +@@ -10063,7 +10063,7 @@ sub wrapped($) { and length $command > 499) { # csh does not like words longer than 1000 (499 quoted) - # $command = "perl -e '".base64_zip_eval()."' ". + # $command = "$^X -e '".base64_zip_eval()."' ". # join" ",string_zip_base64( - # 'exec "'.::perl_quote_scalar($command).'"'); + # 'exec "'.::perl_quote_scalar($command).'"'); $command = base64_wrap("exec \"$Global::shell\",'-c',\"". -@@ -8111,7 +8108,7 @@ sub base64_wrap { - # $shell_command = shell command that runs $eval_string +@@ -10183,7 +10183,7 @@ sub base64_wrap($) { + # $shell_command = shell command that runs $eval_string my $eval_string = shift; return - "perl -e ". @@ -364,7 +370,7 @@ index fd61160..d53bd0c 100644 ::Q(base64_zip_eval())." ". join" ",::shell_quote(string_zip_base64($eval_string)); } -@@ -8312,7 +8312,7 @@ sub sshlogin_wrap { +@@ -10434,7 +10434,7 @@ sub sshlogin_wrap($) { # csh does not deal well with $ENV with \n $self->{'sshlogin_wrap'}{$command} = base64_wrap($perl_code); } else { @@ -373,47 +379,30 @@ index fd61160..d53bd0c 100644 } } else { $self->{'sshlogin_wrap'}{$command} = $command; -@@ -8329,7 +8329,7 @@ sub sshlogin_wrap { - my $remote_command = $pwd.$envset.$bashfuncset. - '@ARGV="'.::perl_quote_scalar($command).'";'. - monitor_parent_sshd_script(); -- $quoted_remote_command = "perl -e ". ::Q($remote_command); -+ $quoted_remote_command = "$^X -e ". ::Q($remote_command); - my $dq_remote_command = ::Q($quoted_remote_command); - if(length $dq_remote_command > 999 - or -@@ -8339,7 +8339,7 @@ sub sshlogin_wrap { - # csh does not deal well with > 1000 chars in one word - # csh does not deal well with $ENV with \n - $quoted_remote_command = -- "perl -e ". ::Q(::Q(base64_zip_eval()))." ". -+ "$^X -e ". ::Q(::Q(base64_zip_eval()))." ". - join" ",::shell_quote(::shell_quote(string_zip_base64($remote_command))); - } else { - $quoted_remote_command = $dq_remote_command; -@@ -8664,7 +8664,7 @@ sub start { +@@ -10830,7 +10830,7 @@ sub start($) { my $bash = ::shell_quote_scalar_default( "testfun() { rm $name; }; export -f testfun; ". - "perl -MIPC::Open3 -e ". + "$^X -MIPC::Open3 -e ". - ::shell_quote_scalar_default($script) + ::Q(::Q($script)) ); - # Redirect STDERR temporarily, -@@ -8876,14 +8876,14 @@ sub interactive_start { + my $redefine_eval; +@@ -11081,7 +11081,7 @@ sub interactive_start($) { ( "(".$actual_command.');'. # The triple print is needed - otherwise the testsuite fails -- q[ perl -e 'while($t++<3){ print $ARGV[0],"\n" }' $?h/$status >> ].$tmpfifo."&". -+ " $^X".q[ -e 'while($t++<3){ print $ARGV[0],"\n" }' $?h/$status >> ].$tmpfifo."&". +- q[ perl -e 'while($t++<3){ print $ARGV[0],"\n" }' $?h/$status >> ]. ++ " $^X".q[ -e 'while($t++<3){ print $ARGV[0],"\n" }' $?h/$status >> ]. + ::Q($tmpfifo)."&". "echo $title; echo \007Job finished at: `date`;sleep 10" ). - # Run outside tmux +@@ -11089,7 +11089,7 @@ sub interactive_start($) { # Read a / separated line: 0h/2 for csh, 2/0 for bash. # If csh the first will be 0h, so use the second as exit value. # Otherwise just use the first value as exit value. -- q{; exec perl -e '$/="/";$_=<>;$c=<>;unlink $ARGV; /(\d+)h/ and exit($1);exit$c' }.$tmpfifo; -+ "; exec $^X ".q{-e '$/="/";$_=<>;$c=<>;unlink $ARGV; /(\d+)h/ and exit($1);exit$c' }.$tmpfifo; +- q{; exec perl -e '$/="/";$_=<>;$c=<>;unlink $ARGV; }. ++ "; exec $^X ".q{-e '$/="/";$_=<>;$c=<>;unlink $ARGV; }; + q{/(\d+)h/ and exit($1);exit$c' }.::Q($tmpfifo); } } - diff --git a/parallel/PKGBUILD b/parallel/PKGBUILD index 5596733e..b93545d4 100644 --- a/parallel/PKGBUILD +++ b/parallel/PKGBUILD @@ -2,19 +2,20 @@ # Contributor: Niklas Holm pkgname='parallel' -pkgver=20200322 +pkgver=20231022 pkgrel='1' pkgdesc="A shell tool for executing jobs in parallel" arch=('any') url='https://www.gnu.org/software/parallel/' license=('GPL3') depends=('perl') +makedepends=('autotools') source=("https://ftpmirror.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,".sig"} "0001-support-MSys2.patch") validpgpkeys=('CDA01A4208C4F74506107E7BD1AB451688888888') -sha256sums=('207484e124860e215cc3e4d7aff48b3b1c4376c95b3c7c7888453c67e92be94d' +sha256sums=('93f2b94f1850798a4b5dda22bdae86dab6a6565e3525860e08e46f2563f3268c' 'SKIP' - 'cf965da42afed45653e937868b667d5e20b785f69ecbb512de50d4aa855aa8a2') + 'e6b4cf54ede3509dc3c6d118b93d149a5f344b94844773cbe4124e495652729a') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -28,8 +29,8 @@ build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure \ --build="${CHOST}" \ - --host=${CHOST} \ - --target=${CHOST} \ + --host="${CHOST}" \ + --target="${CHOST}" \ --prefix="/usr" make }