Bug#745540: Workaround found

2016-08-13 Thread Matthias Buecher / Germany
I was do some testing with older releases, also 7.0.0, and found a
workaround:
Do not define the usage/mount of a partition before the complete
infrastructure is set.
First define RAID, LUKS and LVM, and *then* define the usage and
filesystem of each partition.

If you define RAID, then already define the /boot partition and continue
with LUKS, LVM and the other partitions, then this issue will occur.

Regards
Matthias



Bug#680283: makejail: packages= option is broken with 64-bit packages

2016-05-26 Thread Matthias Buecher / Germany
Still an issue in Debian 8.0 "Jessie".



Bug#755202: Workaround - network-manager: keeps creating and using new connection eth0

2015-07-14 Thread Matthias Buecher / Germany
To avoid this issue for now I defined eth0 as wanted in
/etc/network/interfaces and have managed=false in
/etc/NetworkManager/NetworkManager.conf
See [1]

[1] https://wiki.debian.org/NetworkManager#Wired_Networks_are_Unmanaged


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680283: [PATCH] makejail: packages= option is broken with 64-bit packages

2015-04-06 Thread Matthias Buecher / Germany
Hi,

the issue is still present in the latest Debian 7 Wheezy packages.
My patch is a little bit different and should work with all architectures.

Kind regards
Matthias

--- /usr/sbin/makejail2015-01-22 19:19:43.0 +0100
+++ /usr/sbin/makejail2015-01-22 20:00:25.0 +0100
@@ -88,6 +88,8 @@ installedFiles={}
 indentLevel=0
 doNotKillPids=[]
 tmpOut=None
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680283
+archs=[]
  import stat
 import sys
@@ -225,7 +227,12 @@ def readFileLines(fileName):
 f.close()
 return map(string.strip,lines)
 -def dpkgInfoFiles(package):
+def dpkgInfoFiles(packagename):
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680283
+for arch in archs:
+package = %s%s % (packagename,arch)
+if os.path.exists(config.debianDpkgInfoFile % package):
+break
 return readFileLines(config.debianDpkgInfoFile % package)
  def copyStatAndOwner(source,target):
@@ -1037,6 +1044,13 @@ if __name__==__main__:
 except IndexError:
 abort(Usage: %s package\n\tpackage is the name of an installed
package\n\t(a configuration file must exist in %s) %
(sys.argv[0],config.etcFile))
 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680283
+dpkg_stdout = os.popen(dpkg --print-architecture)
+dpkg_arch = dpkg_stdout.readline().rsplit()[0]
+if ( dpkg_arch != '' ):
+archs.append(':' + dpkg_arch)
+archs.append('')# fallback
+
 if os.path.isfile(config.etcFile):
 loadConfig(config.etcFile)



--- /usr/sbin/makejail  2015-01-22 19:19:43.0 +0100
+++ /usr/sbin/makejail  2015-01-22 20:00:25.0 +0100
@@ -88,6 +88,8 @@ installedFiles={}
 indentLevel=0
 doNotKillPids=[]
 tmpOut=None
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680283
+archs=[]
 
 import stat
 import sys
@@ -225,7 +227,12 @@ def readFileLines(fileName):
f.close()
return map(string.strip,lines)
 
-def dpkgInfoFiles(package):
+def dpkgInfoFiles(packagename):
+   # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680283
+   for arch in archs:
+   package = %s%s % (packagename,arch)
+   if os.path.exists(config.debianDpkgInfoFile % package):
+   break
return readFileLines(config.debianDpkgInfoFile % package)
 
 def copyStatAndOwner(source,target):
@@ -1037,6 +1044,13 @@ if __name__==__main__:
except IndexError:
abort(Usage: %s package\n\tpackage is the name of an installed 
package\n\t(a configuration file must exist in %s) % 
(sys.argv[0],config.etcFile))
 
+   # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680283
+   dpkg_stdout = os.popen(dpkg --print-architecture)
+   dpkg_arch = dpkg_stdout.readline().rsplit()[0]
+   if ( dpkg_arch != '' ):
+   archs.append(':' + dpkg_arch)
+   archs.append('')# fallback
+
if os.path.isfile(config.etcFile):
loadConfig(config.etcFile)
 


Bug#782024: cryptsetup: [patch] fix remote unlock of encrypted root when plymouth is installed

2015-04-06 Thread Matthias Buecher / Germany
Package: cryptsetup
Version: 2:1.4.3-4
Severity: important
Tags: patch

Dear Maintainer,

The cryptroot script always uses plymouth if present (plymouth is
installed by default on Ubuntu).
Unfortunately this prevents to unlock an encrypted root from console
(e.g. via SSH).
Attached is a patch with a solution to this issue.


Changes in /usr/share/initramfs-tools/scripts/local-top/cryptroot
- new parameter noplymouth: possible to use during boot time to avoid
usage of plymouth even if present
- kill all processes which ask for the password after encrypted root is
available

New file /usr/share/initramfs-tools/hooks/cryptroot_unlock.sh
- creates /bin/unlock script in initramfs to define correct PATH and
call cryptroot script with correct parameter
- creates /etc/motd file in initramfs to inform user about unlock script


-- Package-specific info:
-- /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.2.0-4-amd64 root=/dev/mapper/zulu1959-root ro quiet

-- /etc/crypttab
# target namesource devicekey fileoptions
md1_crypt UUID=033d63d6-3939-4908-803d-532ca73b77af none luks
md2_crypt UUID=305b4437-d583-497b-9b66-1cd118746982 md1_crypt
luks,keyscript=/lib/cryptsetup/scripts/decrypt_derived

-- /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# file system mount point   type  options   dump  pass
# / was on /dev/mapper/zulu1959-root during installation
UUID=2294b0ce-084e-4999-b5ed-60fb23d62842 /   ext4
errors=remount-ro,usrquota 0   1
# /boot was on /dev/md0 during installation
UUID=683249e6-e34e-4beb-91b1-bd0ff6f46a20 /boot   ext2
defaults0   2
# swap was on /dev/mapper/zulu1959-swap_1 during installation
UUID=a4d49eb1-3697-4d43-a912-ff242b17e71b noneswap   sw
 0   0
/dev/mapper/zulu1959data-maddes_home /home/maddes ext4 defaults 0 0
/dev/mapper/zulu1959data-maddes_mail /home/maddes/mail ext4 defaults 0 0
/dev/mapper/zulu1959data-chrisse_home /home/chrisse ext4 defaults 0 0
/dev/mapper/zulu1959data-chrisse_mail /home/chrisse/mail ext4 defaults 0 0
/dev/mapper/zulu1959data-svn_home /home/svn ext4 defaults 0 0

-- lsmod
Module  Size  Used by
cpuid  12708  0
ip6t_REJECT12512  3
nf_conntrack_ipv6  13316  5
nf_defrag_ipv6 12832  1 nf_conntrack_ipv6
ip6table_filter12540  1
ip6table_raw   12528  1
ip6table_mangle12540  0
ip6_tables 22175  3 ip6table_mangle,ip6table_raw,ip6table_filter
xt_comment 12427  26
ipt_REJECT 12502  3
xt_tcpudp  12570  28
nf_conntrack_ipv4  14078  5
nf_defrag_ipv4 12483  1 nf_conntrack_ipv4
xt_conntrack   12681  10
nf_conntrack   52720  3
xt_conntrack,nf_conntrack_ipv4,nf_conntrack_ipv6
iptable_filter 12536  1
ip_tables  22042  1 iptable_filter
x_tables   19118  11
ip_tables,iptable_filter,xt_conntrack,xt_tcpudp,ipt_REJECT,xt_comment,ip6_tables,ip6table_mangle,ip6table_raw,ip6table_filter,ip6t_REJECT
nfsd  216181  2
nfs   308353  0
nfs_acl12511  2 nfs,nfsd
auth_rpcgss37143  2 nfs,nfsd
fscache36739  1 nfs
lockd  67306  2 nfs,nfsd
sunrpc173730  6 lockd,auth_rpcgss,nfs_acl,nfs,nfsd
ext2   59231  1
radeon722295  1
snd_hda_codec_hdmi 30824  1
ttm53664  1 radeon
drm_kms_helper 31370  1 radeon
snd_hda_intel  26259  0
snd_hda_codec  78031  2 snd_hda_intel,snd_hda_codec_hdmi
snd_hwdep  13186  1 snd_hda_codec
drm   183952  3 drm_kms_helper,ttm,radeon
power_supply   13475  1 radeon
snd_pcm68083  3
snd_hda_codec,snd_hda_intel,snd_hda_codec_hdmi
i2c_algo_bit   12841  1 radeon
fam15h_power   12677  0
sp5100_tco 12900  0
snd_page_alloc 13003  2 snd_pcm,snd_hda_intel
shpchp 31293  0
k10temp12611  0
i2c_piix4  12536  0
edac_mce_amd   17103  0
snd_timer  22917  1 snd_pcm
snd52893  6
snd_timer,snd_pcm,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_hdmi
powernow_k817618  0
mperf  12453  1 powernow_k8
i2c_core   23876  5
i2c_piix4,i2c_algo_bit,drm,drm_kms_helper,radeon
soundcore  13065  1 snd
pcspkr 12579  0
edac_core  35258  0
psmouse69265  0
processor  28149  9 powernow_k8
evdev  17562  3
serio_raw  12931  0
button 12937  0
thermal_sys18040  1 processor
ext4  350804  6
crc16  12343  1 ext4
jbd2 

Bug#697156: [patch] maybe a better solution

2015-04-06 Thread Matthias Buecher / Germany
Goal is to be able to unlock root partition via an SSH shell remotely,
while plymouth is installed and used in initramfs.

I sent a patch that works well for me on Debian 7.8 Wheezy when
plymouth is asking for password on local screen and I connect remotely
via SSH.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782024

--- /usr/share/initramfs-tools/scripts/local-top/cryptroot  2012-11-07 
16:28:47.0 +0100
+++ /usr/share/initramfs-tools/scripts/local-top/cryptroot  2015-03-11 
23:25:18.0 +0100
@@ -16,11 +16,15 @@ prereqs()
done
 }
 
+NOPLYMOUTH=0
+
 case $1 in
 prereqs)
prereqs
exit 0
;;
+noplymouth)
+   NOPLYMOUTH=1
 esac
 
 # source for log_*_msg() functions, see LP: #272301
@@ -31,7 +35,7 @@ esac
 #
 message()
 {
-   if [ -x /bin/plymouth ]  plymouth --ping; then
+   if [ ${NOPLYMOUTH} -eq 0 -a -x /bin/plymouth ]  plymouth --ping; 
then
plymouth message --text=$@
else
echo $@ 2
@@ -269,7 +273,7 @@ setup_mapping()
 
if [ -z $cryptkeyscript ]; then
cryptkey=Unlocking the disk $cryptsource 
($crypttarget)\nEnter passphrase: 
-   if [ -x /bin/plymouth ]  plymouth --ping; then
+   if [ ${NOPLYMOUTH} -eq 0 -a -x /bin/plymouth ]  
plymouth --ping; then
cryptkeyscript=plymouth ask-for-password 
--prompt
cryptkey=$(printf $cryptkey)
else
@@ -291,6 +295,12 @@ setup_mapping()
return 1
fi
 
+   # Kill all remaining processes that ask for the password
+   for PID in $(ps | grep -e '/lib/cryptsetup/askpass' -e 
'plymouth.*ask-for-password' | sed -n -e '/grep/! { 
s#[[:space:]]*\([0-9]\+\)[[:space:]]*.*#\1#p ; }')
+do
+   kill -9 ${PID}
+   done
+
#FSTYPE=''
#eval $(fstype  $NEWROOT)
FSTYPE=$(blkid -s TYPE -o value $NEWROOT)
--- /usr/share/initramfs-tools/hooks/cryptroot_unlock.sh2014-12-28 
22:16:37.909586616 +0100
+++ /usr/share/initramfs-tools/hooks/cryptroot_unlock.sh2015-03-11 
22:33:41.0 +0100
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+#
+# This InitRAMFS hook provides:
+# Simple script to easily unlock LUKS encrypted root partition from remote 
(SSH, Telnet)
+# Intended for Debian 6.0 Squeeze
+#
+# Copyright: Matthias Bücher, see http://www.maddes.net/
+# License: GNU GPL v2 or later, see http://www.gnu.org/licenses/gpl.html
+#
+# Adopted from 
http://www.howtoforge.com/unlock-a-luks-encrypted-root-partition-via-ssh-on-ubuntu#comment-25990
+#
+# Thanks to:
+# - Wulf Coulmann; http://gpl.coulmann.de/ssh_luks_unlock.html
+#   for his tremendeous effort to unlock LUKS root parititon remotely on 
Debian 5.0 Lenny and before
+#
+# History:
+# v1.0 - 2011-02-15
+#  initial release
+# v1.1 - 2011-03-29
+#  fixed some typos
+#  (also thanks to Sven Greuer)
+#
+
+PREREQ=
+
+prereqs()
+{
+   echo ${PREREQ}
+}
+
+case ${1} in
+ prereqs)
+   prereqs
+   exit 0
+   ;;
+esac
+
+. /usr/share/initramfs-tools/hook-functions
+
+#
+# Begin real processing
+#
+
+SCRIPTNAME=unlock
+
+# 1) Create script to unlock luks partitions
+cat  ${DESTDIR}/bin/${SCRIPTNAME}  '__EOF'
+#!/bin/sh
+PATH='/sbin:/bin'
+/scripts/local-top/cryptroot noplymouth
+__EOF
+chmod 700 ${DESTDIR}/bin/${SCRIPTNAME}
+
+
+# 2) Enhance Message Of The Day (MOTD) with info how to unlock luks partition
+cat  ${DESTDIR}/etc/motd  __EOF
+
+To unlock root partition, and maybe others like swap, run ${SCRIPTNAME}
+__EOF


Bug#713805: dash: does not pass/recognize parameters to/in sourced script

2013-06-23 Thread Matthias Buecher / Germany
Ok, understood.

Please add this change to the Wheezy release notes, as this breaks old
scripts that run in previous Debian releases (in Squeeze and later) and
as this behaviour is different to other shells too (bash, busybox's ash,
etc.).

Thanks
Maddes


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#612712: Non-ASCII chars still crash reportbug 6.4.4 in Wheezy

2013-06-22 Thread Matthias Buecher / Germany
Package: reportbug
Version: 6.4.4
Severity: important

Dear Maintainer,
German umlauts, french accents and more cause this when configuring
reportbug the first time.
To reproduce move your ~/.reportbugrc aside, e.g. `mv .reportbugrc
.reportbugrc_old`


#1 German umlauts
root@debian7:~# reportbug
Welcome to reportbug! Since it looks like this is the first time you
have used reportbug, we are configuring its
behavior. These settings will be saved to the file /root/.reportbugrc,
which you will be free to edit further.
Please choose the default operating mode for reportbug.

1 noviceOffer simple prompts, bypassing technical questions.

2 standard  Offer more extensive prompts, including asking about things
that a moderately sophisticated user would
be expected to know about Debian.

3 advanced  Like standard, but assumes you know a bit more about Debian,
including incoming.

4 expertBypass most handholding measures and preliminary triage
routines. This mode should not be used by
people unfamiliar with Debian's policies and operating
procedures.

Select mode: [novice] 2
Will reportbug often have direct Internet access? (You should answer yes
to this question unless you know what you
are doing and plan to check whether duplicate reports have been filed
via some other channel.) [Y|n|q|?]? n
What real name should be used for sending bug reports?
[root] Matthias Bücher
Traceback (most recent call last):
  File /usr/bin/reportbug, line 2206, in module
main()
  File /usr/bin/reportbug, line 1080, in main
return iface.user_interface()
  File /usr/bin/reportbug, line 1196, in user_interface
offer_configuration(self.options)
  File /usr/bin/reportbug, line 576, in offer_configuration
realname = realname.decode(charset, 'replace')
  File /usr/lib/python2.7/encodings/utf_8.py, line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in
position 10: ordinal not in range(128)


#
root@debian7:~# reportbug
Welcome to reportbug! Since it looks like this is the first time you
have used reportbug, we are configuring its
behavior. These settings will be saved to the file /root/.reportbugrc,
which you will be free to edit further.
Please choose the default operating mode for reportbug.

1 noviceOffer simple prompts, bypassing technical questions.

2 standard  Offer more extensive prompts, including asking about things
that a moderately sophisticated user would
be expected to know about Debian.

3 advanced  Like standard, but assumes you know a bit more about Debian,
including incoming.

4 expertBypass most handholding measures and preliminary triage
routines. This mode should not be used by
people unfamiliar with Debian's policies and operating
procedures.

Select mode: [novice] 2
Will reportbug often have direct Internet access? (You should answer yes
to this question unless you know what you
are doing and plan to check whether duplicate reports have been filed
via some other channel.) [Y|n|q|?]? n
What real name should be used for sending bug reports?
[root] Rène
Traceback (most recent call last):
  File /usr/bin/reportbug, line 2206, in module
main()
  File /usr/bin/reportbug, line 1080, in main
return iface.user_interface()
  File /usr/bin/reportbug, line 1196, in user_interface
offer_configuration(self.options)
  File /usr/bin/reportbug, line 576, in offer_configuration
realname = realname.decode(charset, 'replace')
  File /usr/lib/python2.7/encodings/utf_8.py, line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in
position 1: ordinal not in range(128)



-- Package-specific info:
** Environment settings:
EDITOR=nano
INTERFACE=text

** /root/.reportbugrc:
reportbug_version 6.4.4
mode standard
ui text
realname Matthias Buecher
email m...@maddes.net
no-check-uid
no-cc
header X-Debbugs-CC: m...@maddes.net
smtphost reportbug.debian.org

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

Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages reportbug depends on:
ii  apt   0.9.7.8
ii  python2.7.3-4
ii  python-reportbug  6.4.4

reportbug recommends no packages.

Versions of packages reportbug suggests:
pn  claws-mail none
pn  debconf-utils  none
pn  debsumsnone
pn  dlocatenone
pn  emacs22-bin-common | emacs23-bin-commonnone
ii  exim4  4.80-7
ii  exim4-daemon-light [mail-transport-agent]  4.80-7
ii  file   5.11-2
ii  gnupg  

Bug#713805: dash: does not pass/recognize parameters to/in sourced script

2013-06-22 Thread Matthias Buecher / Germany
Package: dash
Version: 0.5.7-3
Severity: important

Dear Maintainer,

I often source scripts with generic variable definitions and/or
functions in my main scripts.
With the dash package of Wheezy my scripts all fail as the parameters do
not get to the sourced scripts.

To reproduce this error just create a simple test script via:
cat  test.sh  __EOF
echo parameter is \\${1}\
__EOF

Execute it on console via:
. ./test.sh DASH test

Results:
dash 0.5.7-3 (Wheezy): parameter is 
bash 4.2+dfsg-0.1 (Wheezy): parameter is DASH test
dash 0.5.5.1-7.4 (Squeeze): parameter is DASH test


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

Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dash depends on:
ii  debianutils  4.3.2
ii  dpkg 1.16.10
ii  libc62.13-38

dash recommends no packages.

dash suggests no packages.

-- debconf information:
* dash/sh: true


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org