Your message dated Sun, 09 Apr 2017 06:00:00 +0000
with message-id <9b9c240c-f48c-64d1-2b5f-5a2ae1cf5...@thykier.net>
and subject line Re: Bug#859905: unblock: kup/0.3.4-3
has caused the Debian Bug report #859905,
regarding unblock: kup/0.3.4-3
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
859905: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859905
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package kup

The upload service at kernel.org will soon be changed in a way that is
incompatible with the current kup client.  The changes in unstable add
support for this new configuration, and have been tested against a
test server.

diff -Nru kup-0.3.4/debian/changelog kup-0.3.4/debian/changelog
--- kup-0.3.4/debian/changelog  2015-08-30 13:33:51.000000000 +0100
+++ kup-0.3.4/debian/changelog  2017-04-09 02:18:56.000000000 +0100
@@ -1,3 +1,12 @@
+kup (0.3.4-3) unstable; urgency=medium
+
+  * kup: Backport changes needed to work with kernel.org in future
+    (Closes: #859143):
+    - Add support for subcmd config option
+    - Make sure we use sanitized KUP_SUBCMD
+
+ -- Ben Hutchings <b...@decadent.org.uk>  Sun, 09 Apr 2017 02:18:56 +0100
+
 kup (0.3.4-2) unstable; urgency=medium
 
   * debian/control: Change Vcs-Git, Vcs-Browser and Homepage to canonical
diff -Nru kup-0.3.4/debian/patches/add-support-for-subcmd-config-option.patch 
kup-0.3.4/debian/patches/add-support-for-subcmd-config-option.patch
--- kup-0.3.4/debian/patches/add-support-for-subcmd-config-option.patch 
1970-01-01 01:00:00.000000000 +0100
+++ kup-0.3.4/debian/patches/add-support-for-subcmd-config-option.patch 
2017-04-09 02:18:56.000000000 +0100
@@ -0,0 +1,119 @@
+From: Konstantin Ryabitsev <konstan...@linuxfoundation.org>
+Date: Tue, 14 Mar 2017 16:30:43 -0400
+Subject: Add support for subcmd config option
+Origin: 
https://git.kernel.org/pub/scm/utils/kup/kup.git/commit?id=f91f3ef0affcfcd96cc8882c10f988d5ef0e79a7
+Bug-Debian: https://bugs.debian.org/859143
+
+It is possible to use kup in conjunction with another authorization
+system that already relies on ssh for authentication (e.g. gitolite),
+in which case we need to be able to specify a subcommand to specifically
+invoke the kup server.
+
+If no subcmd is specified, the default standalone kup behaviour is used.
+
+Signed-off-by: Konstantin Ryabitsev <konstan...@linuxfoundation.org>
+---
+ kup   | 30 +++++++++++++++++++++++++-----
+ kup.1 |  7 +++++++
+ 2 files changed, 32 insertions(+), 5 deletions(-)
+
+diff --git a/kup b/kup
+index b00dbb348f99..aa9778976cf1 100755
+--- a/kup
++++ b/kup
+@@ -28,6 +28,7 @@ my $blksiz = 1024*1024;
+ my %opt = (
+       'rsh'     => 'ssh -a -x -k -T',
+       'host'    => undef,
++      'subcmd'  => undef,
+       'batch'   => 0,
+       'verbose' => 0,
+       );
+@@ -37,13 +38,17 @@ my $cfg_file = $ENV{'HOME'}.'/.kuprc';
+ my $cfg = new Config::Simple($cfg_file);
+ 
+ if (defined($cfg)) {
+-      # Update %opt with cfgfile settings (only rsh and host vars)
++      # Update %opt with cfgfile settings (only rsh, subcmd, and host vars)
+       my %cfg_opt = $cfg->vars();
+ 
+       if (defined($cfg_opt{'default.host'})) {
+               $opt{'host'} = $cfg_opt{'default.host'};
+       }
+ 
++      if (defined($cfg_opt{'default.subcmd'})) {
++              $opt{'subcmd'} = $cfg_opt{'default.subcmd'};
++      }
++
+       if (defined($cfg_opt{'default.rsh'})) {
+               $opt{'rsh'} = $cfg_opt{'default.rsh'};
+       }
+@@ -61,6 +66,9 @@ if (defined $ENV{'KUP_RSH'}) {
+ if (defined $ENV{'KUP_HOST'}) {
+       $opt{'host'} = $ENV{'KUP_HOST'};
+ }
++if (defined $ENV{'KUP_SUBCMD'}) {
++      $opt{'subcmd'} = $ENV{'KUP_SUBCMD'};
++}
+ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};   # Make %ENV safer
+ 
+ # We process the command set twice, once as a dry run and one for real,
+@@ -75,10 +83,11 @@ sub usage($) {
+       print STDERR "Usage: $0 [global options] command [-- command...]\n";
+       print STDERR "\n";
+       print STDERR "Global options:\n";
+-      print STDERR "   -b  --batch                     Output command stream 
to stdout\n";
+-      print STDERR "   -e  --rsh=command         Send output to command, 
override KUP_RSH\n";
+-      print STDERR "   -o  --host=[user@]host  Connect to [user@]host, 
override KUP_HOST\n";
+-      print STDERR "   -v  --verbose             Print each command to stderr 
as it is sent\n";
++      print STDERR "   -b  --batch            Output command stream to 
stdout\n";
++      print STDERR "   -e  --rsh=command      Send output to command, 
override KUP_RSH\n";
++      print STDERR "   -o  --host=[user@]host Connect to [user@]host, 
override KUP_HOST\n";
++      print STDERR "   -c  --subcmd=cmd       After connecting via ssh, issue 
this subcommand\n";
++      print STDERR "   -v  --verbose          Print each command to stderr as 
it is sent\n";
+       print STDERR "\n";
+       print STDERR "Commands:\n";
+       print STDERR "   put local_file signature remote_path\n";
+@@ -219,6 +228,10 @@ sub parse_global_options()
+                       $opt{'host'} = shift(@ARGV);
+               } elsif ($arg =~ /^--host=(.+)$/) {
+                       $opt{'host'} = $1;
++              } elsif ($arg eq '-c' || $arg eq '--subcmd') {
++                      $opt{'subcmd'} = shift(@ARGV);
++              } elsif ($arg =~ /^--subcmd=(.+)$/) {
++                      $opt{'subcmd'} = $1;
+               } elsif ($arg eq '-v' || $arg eq '--verbose') {
+                       $opt{'verbose'}++;
+               } elsif ($arg eq '-h' || $arg eq '--help') {
+@@ -266,6 +279,13 @@ sub setup_output()
+                       die "$0: suspicious KUP_HOST\n";
+               }
+               $rsh .= " \Q$1";
++              if ($opt{'subcmd'}) {
++                      if ($opt{'subcmd'} !~ /^([-a-zA-Z0-9_]+)$/) {
++                              die "$0: suspicious KUP_SUBCMD\n";
++                      }
++                      # Add the subcommand for the receiving server
++                      $rsh .= " " . $opt{'subcmd'}
++              }
+               open(STDOUT, '|-', $rsh)
+                       or die "$0: cannot execute rsh command ", $rsh, "\n";
+       }
+diff --git a/kup.1 b/kup.1
+index 509deac3416b..811afb3cdeb5 100644
+--- a/kup.1
++++ b/kup.1
+@@ -57,6 +57,13 @@ is set by the environment variable
+ .B KUP_HOST
+ or if that is not set,
+ \fIkup.kernel.org\fP.
++.TP
++\fB\-c\fP, \fB\-\-subcmd\fP \fIsubcommand\fP
++After establishing the ssh connection, issue a subcommand in case the remote
++server is used in conjunction with an AuthZ tool like gitolite. Can also be 
set
++using the env variable
++.B KUP_SUBCMD
++or if not set, no subcommand will be used (default kup-server behavior).
+ .SH COMMANDS
+ A series of commands can be specified on a single command line,
+ separated by a double dash argument (\fB\-\-\fP).
diff -Nru kup-0.3.4/debian/patches/make-sure-we-use-sanitized-kup_subcmd.patch 
kup-0.3.4/debian/patches/make-sure-we-use-sanitized-kup_subcmd.patch
--- kup-0.3.4/debian/patches/make-sure-we-use-sanitized-kup_subcmd.patch        
1970-01-01 01:00:00.000000000 +0100
+++ kup-0.3.4/debian/patches/make-sure-we-use-sanitized-kup_subcmd.patch        
2017-04-09 02:18:56.000000000 +0100
@@ -0,0 +1,24 @@
+From: Konstantin Ryabitsev <konstan...@linuxfoundation.org>
+Date: Tue, 28 Mar 2017 14:01:18 -0400
+Subject: Make sure we use sanitized KUP_SUBCMD
+Origin: 
https://git.kernel.org/pub/scm/utils/kup/kup.git/commit?id=0ff2c2a5d25046a8f0bb8da431449206c8d702bc
+Bug-Debian: https://bugs.debian.org/859143
+
+Otherwise we break the -T mode
+
+Signed-off-by: Konstantin Ryabitsev <konstan...@linuxfoundation.org>
+---
+ kup | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kup
++++ b/kup
+@@ -284,7 +284,7 @@ sub setup_output()
+                               die "$0: suspicious KUP_SUBCMD\n";
+                       }
+                       # Add the subcommand for the receiving server
+-                      $rsh .= " " . $opt{'subcmd'}
++                      $rsh .= " \Q$1";
+               }
+               open(STDOUT, '|-', $rsh)
+                       or die "$0: cannot execute rsh command ", $rsh, "\n";
diff -Nru kup-0.3.4/debian/patches/series kup-0.3.4/debian/patches/series
--- kup-0.3.4/debian/patches/series     2015-08-28 01:47:32.000000000 +0100
+++ kup-0.3.4/debian/patches/series     2017-04-09 02:18:56.000000000 +0100
@@ -1 +1,3 @@
+add-support-for-subcmd-config-option.patch
+make-sure-we-use-sanitized-kup_subcmd.patch
 debian-paths.patch
--- END ---

unblock kup/0.3.4-3

-- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

--- End Message ---
--- Begin Message ---
Ben Hutchings:
> Package: release.debian.org
> Severity: normal
> User: release.debian....@packages.debian.org
> Usertags: unblock
> 
> Please unblock package kup
> 
> The upload service at kernel.org will soon be changed in a way that is
> incompatible with the current kup client.  The changes in unstable add
> support for this new configuration, and have been tested against a
> test server.
> 
> [...]
> 
> unblock kup/0.3.4-3
> 
> [...]

Unblocked, thanks.

~Niels

--- End Message ---

Reply via email to