diff options
| author | Holger Levsen <holger@debian.org> | 2025-11-30 10:59:09 +0100 |
|---|---|---|
| committer | git-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com> | 2025-11-30 16:28:39 +0000 |
| commit | 1a0a913d777321ca59034c8ffff977cadd3ef1af (patch) | |
| tree | 0487ff2384297b50558a1bd423cabdb6273e42d4 /scripts | |
| parent | 6d666c8731998cdbcb7933787f47a7be291616ee (diff) | |
2.25.28 (patches unapplied)HEADimport/2.25.28ubuntu/resolute-proposedubuntu/resolute-develubuntu/develdebian/sid
Imported using git-ubuntu import.
Notes
Notes:
[ Guillem Jover ]
* debdiff: Add support for new --no-check option. Closes: #1016135.
* Pass also no_check to Dpkg::IPC spawn() and wait_child().
[ Hugh McMaster ]
* uscan/Git.pm:
- Set $newfile as a remote reference in upstream mode. Closes: #1120533.
- Remove 'eval' wrapper.
- Update 'git upstream' code path and debug output.
- Call 'show-ref' and 'ls-remote' with '--tags'.
* uscan/WatchSource.pm: Update some output messages.
[ Yadd ]
* uscan:
- accept also "Dist" into Github template like other templates.
- improve default Uversion-Mangle to cover trailing dot or dash and
uppercase. Thanks to Jonas Smedegaard. Closes: #1112452.
* Update French translations.
[ Daniel Gröber ]
* bts: browse:
- Push down $caching check. Closes: #1121335.
- Fix background download with blocking browsers.
- Fix background child inadvertently executing commands.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/bts.pl | 34 | ||||
| -rwxr-xr-x | scripts/build-rdeps.pl | 8 | ||||
| -rwxr-xr-x | scripts/dd-list.pl | 8 | ||||
| -rw-r--r-- | scripts/debdiff.1 | 18 | ||||
| -rwxr-xr-x | scripts/debdiff.pl | 12 | ||||
| -rwxr-xr-x | scripts/mk-build-deps.pl | 13 |
6 files changed, 73 insertions, 20 deletions
diff --git a/scripts/bts.pl b/scripts/bts.pl index 5a97d67e..c6508ed6 100755 --- a/scripts/bts.pl +++ b/scripts/bts.pl @@ -3822,20 +3822,23 @@ Use \"bts [--cache-mode=...] cache\" to update the cache.\n"; } } # else we're in online mode - elsif ($caching && have_lwp() && $thing ne '') { + elsif (have_lwp() && $thing ne '') { my ($thingurl, $thingtype) = thing_to_url($thing); + my $pid; if (!$mboxmode) { - if ($thgopts ne '') { - runbrowser($thingurl . $thgopts); - } else { - # let the BTS be intelligent - runbrowser($btsurl . $thing); - } - # Download cache in background since runbrowser() may or may not # block (www-browser vs x-www-browser). - my $pid = fork(); - if ($pid) { # Parnet + $pid = fork() + // die "$progname: fork()ing into background failed!"; + if ($pid) { + # Foreground (parent) process + if ($thgopts ne '') { + runbrowser($thingurl . $thgopts); + } else { + # let the BTS be intelligent + runbrowser($btsurl . $thing); + } + waitpid($pid, 0); warn "bts debug: child $pid exited $?" if $debug; @@ -3844,23 +3847,26 @@ Use \"bts [--cache-mode=...] cache\" to update the cache.\n"; warn "bts debug: child $$: Doing background download()" if $debug; # Now in background child } + # May be in background child my $tempmbox = $mboxmode && $thingtype ne 'bug'; - if (-d $cachedir || make_path($cachedir)) { + if ($caching && (-d $cachedir || make_path($cachedir))) { download($thing, $thgopts, 0, $mboxmode); } else { - warn "$progname: couldn't create cache $cachedir: $!\n"; + $caching + && warn "$progname: couldn't create cache $cachedir: $!\n"; warn "$progname: Falling back to mbox tempfile download\n" if $debug; $tempmbox = 1; } - if ($tempmbox) { + if (defined $pid) { # Exit if background child + exit(0); + } elsif ($tempmbox) { read_many_bugs($thing, $thgopts, $thingtype); } elsif ($mboxmode) { runmailreader(mboxfile($thing)); - return; } } } diff --git a/scripts/build-rdeps.pl b/scripts/build-rdeps.pl index f28da8b2..569cd4bd 100755 --- a/scripts/build-rdeps.pl +++ b/scripts/build-rdeps.pl @@ -403,7 +403,13 @@ sub findreversebuilddeps { $ftbfs{$src} = 1; } close($debftbfs); - wait_child($debftbfs_pid, nocheck => 1, cmdline => "debftbfs"); + wait_child( + $debftbfs_pid, + cmdline => "debftbfs", + no_check => 1, + # XXX: Backwards compatibility, remove after dpkg 1.24.0. + nocheck => 1, + ); } my $source_file = $info->{$comp}->{sources}; diff --git a/scripts/dd-list.pl b/scripts/dd-list.pl index 3947eef0..85581193 100755 --- a/scripts/dd-list.pl +++ b/scripts/dd-list.pl @@ -241,7 +241,9 @@ if ($use_dctrl) { exec => ['dpkg-query', '-W', '-f', '${source:Version}', 'apt'], to_string => \$apt_version, wait_child => 1, - nocheck => 1 + no_check => 1, + # XXX: Backwards compatibility, remove after dpkg 1.24.0. + nocheck => 1, ); my $useAptHelper = 0; @@ -262,7 +264,9 @@ if ($use_dctrl) { to_string => \$sources, error_to_string => \$err, wait_child => 1, - nocheck => 1 + no_check => 1, + # XXX: Backwards compatibility, remove after dpkg 1.24.0. + nocheck => 1, ); if ($? >> 8) { die "Unable to get list of Sources files from apt: $err\n"; diff --git a/scripts/debdiff.1 b/scripts/debdiff.1 index b2781a78..cadb127b 100644 --- a/scripts/debdiff.1 +++ b/scripts/debdiff.1 @@ -132,6 +132,17 @@ behaviour, so only the basename of the file is considered: in particular, \fB--exclude='*.patch'\fR will work, but \fB--exclude='debian/patches/*'\fR will have no practical effect. .TP +.B \-\-no\-check +Do no check signatures and checksums before unpacking the source archives. +This is intended to be used when the caller has guaranteed the provenance +of the source package, +for example when a package manager downloads the source package from a +repository with metadata indices that contain signatures and checksums that +get rotated and updated so that it is guaranteed to be already validated +before we extract the source package. + +Supported since 2.25.27. +.TP .B \-\-diffstat Include the result of \fBdiffstat\fR before the generated diff. .TP @@ -214,6 +225,13 @@ If this is set to \fIyes\fR, then it is the same as the This option will be passed to \fBwdiff\fR; it should be one of \fB\-p\fR, \fB\-l\fR or \fB\-t\fR. .TP +.B DEBDIFF_CHECK_SOURCE +If this is set to \fIno\fR, +then it is the same as the \fB\-\-no\-check\fR command line parameter +being used. + +Supported since 2.25.27. +.TP .B DEBDIFF_SHOW_DIFFSTAT If this is set to \fIyes\fR, then it is the same as the \fB\-\-diffstat\fR command line parameter being used. diff --git a/scripts/debdiff.pl b/scripts/debdiff.pl index 9158f93f..20bc1bfa 100755 --- a/scripts/debdiff.pl +++ b/scripts/debdiff.pl @@ -87,6 +87,7 @@ Valid options are: --quiet, -q Be quiet if no differences were found --exclude PATTERN Exclude files whose basenames match PATTERN --ignore-space, -w Ignore whitespace in diffs + --no-check Do not check signatures and checksums before unpacking --diffstat Include the result of diffstat before the diff --no-diffstat Do not do so (default) --auto-ver-sort When comparing source packages, ensure the @@ -127,6 +128,7 @@ my $controlfiles = 'control'; my $show_moved = 0; my $wdiff_opt = ''; my @diff_opts = (); +my $check_source = 1; my $show_diffstat = 0; my $wdiff_source_control = 0; my $auto_ver_sort = 0; @@ -149,6 +151,7 @@ if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) { 'DEBDIFF_CONTROLFILES' => 'control', 'DEBDIFF_SHOW_MOVED' => 'no', 'DEBDIFF_WDIFF_OPT' => '', + 'DEBDIFF_CHECK_SOURCE' => 'yes', 'DEBDIFF_SHOW_DIFFSTAT' => 'no', 'DEBDIFF_WDIFF_SOURCE_CONTROL' => 'no', 'DEBDIFF_AUTO_VER_SORT' => 'no', @@ -177,6 +180,8 @@ if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) { or $config_vars{'DEBDIFF_CONTROL'} = 'yes'; $config_vars{'DEBDIFF_SHOW_MOVED'} =~ /^(yes|no)$/ or $config_vars{'DEBDIFF_SHOW_MOVED'} = 'no'; + $config_vars{'DEBDIFF_CHECK_SOURCE'} =~ /^(yes|no)$/ + or $config_vars{'DEBDIFF_CHECK_SOURCE'} = 'yes'; $config_vars{'DEBDIFF_SHOW_DIFFSTAT'} =~ /^(yes|no)$/ or $config_vars{'DEBDIFF_SHOW_DIFFSTAT'} = 'no'; $config_vars{'DEBDIFF_WDIFF_SOURCE_CONTROL'} =~ /^(yes|no)$/ @@ -208,6 +213,7 @@ if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) { $controlfiles = $config_vars{'DEBDIFF_CONTROLFILES'}; $show_moved = $config_vars{'DEBDIFF_SHOW_MOVED'} eq 'yes' ? 1 : 0; $wdiff_opt = $config_vars{'DEBDIFF_WDIFF_OPT'} =~ /^-([plt])$/ ? $1 : ''; + $check_source = $config_vars{'DEBDIFF_CHECK_SOURCE'} eq 'yes' ? 1 : 0; $show_diffstat = $config_vars{'DEBDIFF_SHOW_DIFFSTAT'} eq 'yes' ? 1 : 0; $wdiff_source_control = $config_vars{'DEBDIFF_WDIFF_SOURCE_CONTROL'} eq 'yes' ? 1 : 0; @@ -320,6 +326,9 @@ while (@ARGV) { } elsif ($ARGV[0] =~ /^(--ignore-space|-w)$/) { push @diff_opts, "-w"; shift; + } elsif ($ARGV[0] eq '--no-check') { + $check_source = 0; + shift; } elsif ($ARGV[0] eq '--diffstat') { $show_diffstat = 1; shift; @@ -714,6 +723,9 @@ if ($type eq 'deb') { for my $i (1, 2) { no strict 'refs'; my @opts = ('-x'); + if ($check_source eq 'no') { + push @opts, '--no-check'; + } if ($dscformats[$i] eq '3.0 (quilt)' && !$apply_patches) { push @opts, '--skip-patches'; } diff --git a/scripts/mk-build-deps.pl b/scripts/mk-build-deps.pl index ade0ad5f..2de4db4c 100755 --- a/scripts/mk-build-deps.pl +++ b/scripts/mk-build-deps.pl @@ -403,7 +403,12 @@ while ($control = shift) { version => $ctrl->{Version} }); } } - wait_child($pid, nocheck => 1) if defined $pid; + wait_child( + $pid, + no_check => 1, + # XXX: Backwards compatibility, remove after dpkg 1.24.0. + nocheck => 1, + ) if defined $pid; # Only use the newest version. We'll only have this if processing showsrc # output or a dsc file. if (@versions) { @@ -453,8 +458,10 @@ if ($opt_install) { ['dpkg-query', '-W', '-f', '${db:Status-Status}', $pkg], to_string => \$status, error_to_file => '/dev/null', - nocheck => 1, - wait_child => 1 + wait_child => 1, + no_check => 1, + # XXX: Backwards compatibility, remove after dpkg 1.24.0. + nocheck => 1, ); if ($status ne 'installed' || ($? >> 8)) { # Restore system to previous state, since $install_tool wasn't |
