Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit e54c22d

Browse files
committed
makerel: use 4 cores/threads
disable bzip2 as default try pzig, parallel gzip add COPYFILE_DISABLE=1 for darwin stabilize on existing builddir
1 parent a687c2a commit e54c22d

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

Porting/do-make-srctarball

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/bin/sh
22

3+
COPYFILE_DISABLE=1
34
cd /usr/src/perl/blead/cperl
45
ver=$(../perl_version)
56

6-
mkdir ../cperl-${ver}-build 2>/dev/null \
7-
|| rm -rf ../cperl-${ver}-build ../cperl-${ver}
7+
rm -rf ../cperl-${ver}-build ../cperl-${ver} 2>/dev/null
8+
mkdir ../cperl-${ver}-build 2>/dev/null
89
cp -frp .git ../cperl-${ver}-build/
910
cd ../cperl-${ver}-build
1011
git reset --hard
1112
git clean -dxf
13+
#rm -rf .git
1214
#cp ../cperl/Porting/makerel Porting/
13-
perl Porting/makerel -bx
15+
perl Porting/makerel -x

Porting/makerel

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,28 @@ my $src = (-e $perl) ? $perl : 'perl'; # 'perl' in maint branch
189189
print "Checking if you have 7z...\n";
190190
my $output_7z = `7z 2>&1`;
191191
my $have_7z = defined $output_7z && $output_7z =~ /7-Zip/;
192+
my ($cmd7z, $have_pigz);
193+
194+
if (!$have_7z) {
195+
print "Checking if you have pigz...\n";
196+
my $output_pz = `pigz --help 2>&1`;
197+
$have_pigz = defined $output_pz && $output_pz =~ /Usage: pigz/;
198+
} else {
199+
# 4 threads
200+
$cmd7z = '7z a -mx9 -bd -si -mmt4 ';
201+
}
192202

193203
print "Checking if you have advdef...\n";
194204
my $output_advdef = `advdef --version 2>&1`;
195205
my $have_advdef = defined $output_advdef && $output_advdef =~ /advancecomp/;
196206

197207
if ($have_7z) {
198208
print "Creating and compressing the tar.gz file with 7z...\n";
199-
$cmd = "tar cf - $reldir | 7z a -tgzip -mx9 -bd -si $reldir.tar.gz";
209+
$cmd = "tar cf - $reldir | $cmd7z -tgzip $reldir.tar.gz";
210+
system($cmd) == 0 or die "$cmd failed";
211+
} elsif ($have_pigz) {
212+
print "Creating and compressing the tar.gz file with pigz...\n";
213+
$cmd = "tar cf - $reldir | pigz -9 -- $reldir.tar.gz";
200214
system($cmd) == 0 or die "$cmd failed";
201215
} else {
202216
print "Creating and compressing the tar.gz file...\n";
@@ -212,7 +226,8 @@ if ($have_7z) {
212226
if ($opts{b}) {
213227
if ($have_7z) {
214228
print "Creating and compressing the tar.bz2 file with 7z...\n";
215-
$cmd = "tar cf - $reldir | 7z a -tbzip2 -mx9 -bd -si $reldir.tar.bz2";
229+
# 4 threads
230+
$cmd = "tar cf - $reldir | $cmd7z -tbzip2 $reldir.tar.bz2";
216231
system($cmd) == 0 or die "$cmd failed";
217232
} else {
218233
print "Creating and compressing the tar.bz2 file...\n";
@@ -223,7 +238,8 @@ if ($opts{b}) {
223238

224239
if ($opts{x}) {
225240
print "Creating and compressing the tar.xz file with xz...\n";
226-
$cmd = "tar cf - $reldir | xz -z -c > $reldir.tar.xz";
241+
# -T0 use as many threads as there are processor cores
242+
$cmd = "tar cf - $reldir | xz -T0 -z -c > $reldir.tar.xz";
227243
system($cmd) == 0 or die "$cmd failed";
228244
}
229245

Porting/release_managers_guide.pod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,8 @@ the tarball and directory name:
937937
# git clean should not output anything!
938938
$ git status # and there's nothing lying around
939939

940-
$ perl Porting/makerel -bx -s RC1 # for a release candidate
941-
$ perl Porting/makerel -bx # for the release itself
940+
$ perl Porting/makerel -x -s RC1 # for a release candidate
941+
$ perl Porting/makerel -x # for the release itself
942942

943943
This creates the directory F<../perl-x.y.z-RC1> or similar, copies all
944944
the MANIFEST files into it, sets the correct permissions on them, then
@@ -948,7 +948,7 @@ C<tar.bz2> file. The C<-x> also produces a C<tar.xz> file.
948948
If you're getting your tarball suffixed with -uncommitted and you're sure
949949
your changes were all committed, you can override the suffix with:
950950

951-
$ perl Porting/makerel -b -s ''
951+
$ perl Porting/makerel -x -s ''
952952

953953
XXX if we go for extra tags and branches stuff, then add the extra details
954954
here

0 commit comments

Comments
 (0)