Bug#890622: vbackup: mbr backup fails on block devices with / in path

2018-02-18 Thread Stefanos Harhalakis
Good point. Fixed.


On Sun, Feb 18, 2018 at 12:16 PM, Dominik George 
wrote:

> On Sun, Feb 18, 2018 at 12:03:09PM +, Stefanos Harhalakis wrote:
> > Ended up with a slightly different approach that converts / to _.
> > This should work:
> > https://github.com/sharhalakis/vbackup/commit/
> 52971d7b5e034f8bb939e2c1b23fbdc6c88b45d7
>
> OK. I wanted to keep the patch as small as possible for
> stetch-proposed-updates.
>
> That echo | sed also looks strange given that bash has built-in tools for
> that: foo=${foo//\//_}
>
> -nik
>
> --
> Dominik George (1. Vorstandsvorsitzender, pädagogische Leitung)
> Teckids e.V. - Erkunden, Entdecken, Erfinden.
> https://www.teckids.org/
>


Bug#890622: vbackup: mbr backup fails on block devices with / in path

2018-02-18 Thread Dominik George
On Sun, Feb 18, 2018 at 12:03:09PM +, Stefanos Harhalakis wrote:
> Ended up with a slightly different approach that converts / to _.
> This should work:
> https://github.com/sharhalakis/vbackup/commit/52971d7b5e034f8bb939e2c1b23fbdc6c88b45d7

OK. I wanted to keep the patch as small as possible for stetch-proposed-updates.

That echo | sed also looks strange given that bash has built-in tools for that: 
foo=${foo//\//_}

-nik

-- 
Dominik George (1. Vorstandsvorsitzender, pädagogische Leitung)
Teckids e.V. - Erkunden, Entdecken, Erfinden.
https://www.teckids.org/



Bug#890622: vbackup: mbr backup fails on block devices with / in path

2018-02-18 Thread Stefanos Harhalakis
Ended up with a slightly different approach that converts / to _.
This should work:
https://github.com/sharhalakis/vbackup/commit/52971d7b5e034f8bb939e2c1b23fbdc6c88b45d7


2018-02-16 20:56 GMT+00:00 Dominik George :

> > Find attached a patch with a simple fix.
>
> Sorry, the patch was broken. Here's the correct one.
>
> --
> Dominik George (1. Vorstandsvorsitzender, pädagogischer Leiter)
> Teckids e.V. - Erkunden, Entdecken, Erfinden.
> https://www.teckids.org/
>


Bug#890622: vbackup: mbr backup fails on block devices with / in path

2018-02-16 Thread Dominik George
> Find attached a patch with a simple fix.

Sorry, the patch was broken. Here's the correct one.

-- 
Dominik George (1. Vorstandsvorsitzender, pädagogischer Leiter)
Teckids e.V. - Erkunden, Entdecken, Erfinden.
https://www.teckids.org/
--- mbr.orig	2018-02-16 21:47:46.415903625 +0100
+++ mbr	2018-02-16 21:53:46.631944775 +0100
@@ -133,6 +133,7 @@
 
 	for p in $DISKS ; do
 		h_msg 12 "Backing up $p"
+		mkdir -p "$(dirname "$TDIR2/$p")"
 		dd if=/dev/$p "of=$TDIR2/$p.mbr" bs=512 count=1 >/dev/null 2>&1
 		[ -z "$FDISK" ] || $FDISK -l /dev/$p > "$TDIR2/$p.fdisk-l" \
 			2> >(h_filter 6 >&2)


signature.asc
Description: PGP signature


Bug#890622: vbackup: mbr backup fails on block devices with / in path

2018-02-16 Thread Dominik George
Package: vbackup
Version: 1.0.1-1
Severity: important

The mbr script misses on / characters in device paths (like, when the device
is /dev/cciss/c0d0 in an HP array).  It inserts the part after /dev/
verbatim into its temp filenames.

A fix in the next stretch point release would be most welcome.

Find attached a patch with a simple fix.

-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

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

-- no debconf information
--- mbr.orig2018-02-16 21:47:46.415903625 +0100
+++ mbr 2018-02-16 21:49:49.710561189 +0100
@@ -133,6 +133,7 @@
 
for p in $DISKS ; do
h_msg 12 "Backing up $p"
+   mkdir -p "$TDIR2/$p"
dd if=/dev/$p "of=$TDIR2/$p.mbr" bs=512 count=1 >/dev/null 2>&1
[ -z "$FDISK" ] || $FDISK -l /dev/$p > "$TDIR2/$p.fdisk-l" \
2> >(h_filter 6 >&2)