Bug#833238: Do not set CONFIG_FAT_DEFAULT_IOCHARSET="utf8", use FAT_DEFAULT_UTF8 instead

2016-08-01 Thread Martin Pitt
Package: linux-image-4.6.0-1-amd64
Version: 4.6.4-1

Hello,

The Debian kernel currently has CONFIG_FAT_DEFAULT_IOCHARSET="utf8"
enabled. This is not recommended [1]:

| config FAT_DEFAULT_IOCHARSET
|   string "Default iocharset for FAT"
|   depends on VFAT_FS
|   default "iso8859-1"
|   help
| Set this to the default input/output character set you'd
| like FAT to use. It should probably match the character set
| that most of your FAT filesystems use, and can be overridden
| with the "iocharset" mount option for FAT filesystems.
| Note that "utf8" is not recommended for FAT filesystems.
| If unsure, you shouldn't set "utf8" here - select the next option
| instead if you would like to use UTF-8 encoded file names by default.
| See  for more information.

This leads to irritating bugs [2][3] and misleading
stat()/open()/mkdir() as it seems that a file or dir simultaneously
exists and not exists:

  $ mkdir FOO
  $ test -e Foo && echo yes || echo no
  no
  $ mkdir -p Foo
  mkdir: cannot create directory ‘Foo’: File exists

This is on a VFAT partition with the default mount options:

  
(rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)

This can be worked around by always using all uppercase file names,
but this is not very obvious and prone to get wrong.

It behaves much better with mount -o utf8,iocharset=ascii:

  $ test -e Foo && echo yes || echo no yes
  yes
  $ mkdir -p Foo  # succeeds
  $

With the first try and the default mount options I created a file
"Hällé€". This still appears correctly with utf8,iocharset=ascii.

So I suggest to set

  CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
  FAT_DEFAULT_UTF8=y

instead.

Thanks for considering,

Martin

[1] 
https://github.com/torvalds/linux/blob/38739380683795354b3f0f1a1e80614e311b8617/fs/fat/Kconfig#L86
[2] https://bugs.debian.org/745280
[3] https://github.com/systemd/systemd/issues/3740

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: PGP signature


Bug#829127: systemd: Please make sure /lib/systemd/systemd is not linked with something in /usr

2016-07-02 Thread Martin Pitt
Hello Eric,

Eric Valette [2016-07-02  9:40 +0200]:
> Turns out I did it and it produced no trace (no file just systemd was
> printing like crasy). As I've been using my own kernel without initramfs for
> so long, I simply forgot to enable initrd support in this kernel. I enabled
> it and voilà, /usr is mounted.

Haha, glad you solved the mystery! :-)

Thanks,

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



Bug#804990: nfs-common: Please drop versioned dependency on initscripts package

2016-06-22 Thread Martin Pitt
Control: tag -1 patch

bi...@debian.org [2015-11-13  8:48 +0100]:
> your package nfs-common declares a versioned dependency on the
> initscripts package. Most likely, it was added for the
> /run-transition in wheezy.

git archeology shows that this was introduced in 2007 for ensuring a
recent enough /etc/init.d/mountnfs:

  http://anonscm.debian.org/cgit/kernel/nfs-utils.git/commit/?id=b81d81eb57

and bumped in 2011 for the /run transition:

  http://anonscm.debian.org/cgit/kernel/nfs-utils.git/commit/?id=9ac1a6fef

Both reasons are long-obsolete now, so this can indeed be dropped.
nfs-common uses sendsigs.omit, but sysvinit-core depends on
initscripts (so it's available there) and sendsigs.service is masked
under systemd so it won't do anything there anyway.

Attaching corresponding patch against current packaging git.

Thanks,

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
From b056c044de251a7e72d2be5eb233a7ecbbc3e8cb Mon Sep 17 00:00:00 2001
From: Martin Pitt 
Date: Wed, 22 Jun 2016 16:04:54 +0200
Subject: [PATCH] Drop obsolete versioned initscripts dependency

It was introduced in 2007 for ensuring a recent enough /etc/init.d/mountnfs
(commit b81d81eb57) and bumped in 2011 for the /run transition (commit
9ac1a6fef).

Closes: #804990
---
 debian/changelog | 4 
 debian/control   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 618d70d..42e73ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,11 @@
 nfs-utils (1:1.2.8-10) UNRELEASED; urgency=medium
 
+  [ Ben Hutchings ]
   * Update debian/watch
 
+  [ Martin Pitt ]
+  * Drop obsolete versioned initscripts dependency. (Closes: #804990)
+
  -- Ben Hutchings   Mon, 23 Mar 2015 16:33:59 +
 
 nfs-utils (1:1.2.8-9) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 51b1a11..24ec0cc 100644
--- a/debian/control
+++ b/debian/control
@@ -32,7 +32,7 @@ Homepage: http://nfs.sourceforge.net/
 
 Package: nfs-common
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, rpcbind, adduser, ucf, lsb-base (>= 1.3-9ubuntu3), initscripts (>= 2.88dsf-13.3), libtirpc1 (>= 0.2.4)
+Depends: ${shlibs:Depends}, ${misc:Depends}, rpcbind, adduser, ucf, lsb-base (>= 1.3-9ubuntu3), libtirpc1 (>= 0.2.4)
 Recommends: python
 Suggests: open-iscsi, watchdog
 Provides: nfs-client
-- 
2.8.1



signature.asc
Description: PGP signature


Bug#809740: initramfs-tools: Completely ignores rootdelay

2016-01-30 Thread Martin Pitt
Hello Ben and Christoph,

Ben Hutchings [2016-01-29 13:50 +]:
> # systemd maintainers do not want to handle ROOTDELAY

For the record, this isn't just a question of *where* to put a "sleep
$ROOTDELAY" -- my point is, the previous sleep was entirely
non-sensical, and moving it around would still be wrong:

 - Sleeping some extra seconds *before* the "wait for root fs" loop in
   local_device_setup() will either be a no-op (if $ROOTDELAY is
   shorter than the actual time that it takes for the root device to
   appear), or it's unnecessary waiting (if $ROOTDELAY is longer than
   necessary). This would have been the case in udev's i-t script, as
   that runs before "local" (IIRC the sleep used to be in init-top/).

 - Sleeping some extra seconds *after* the "wait for root fs" loop
   would be slightly less pointless, as that actually could make a
   difference (like waiting for more RAID mirror members to join
   before you boot the system). Still wrong, but at least not a no-op.
   But if booting a system without it fails, as "I always get a
   degraded array activated" just means that mdadm's initramfs-tools
   hook does not do a thorough enough job to assemble the root
   /dev/md?, or rather, does not wait until enough members are online.
   This should be done properly for every system with a dynamic
   waiting loop, we shouldn't expect users to figure out an
   appropriate $ROOTDELAY by themselves. Static sleeps are never the
   right answer.

So please don't put this into initramfs-tools either -- let's find out
what really goes wrong here and fix it properly?

Thanks,

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



Bug#779830: nfs-utils: add autopkgtest

2015-03-05 Thread Martin Pitt
Package: nfs-utils
Version: 1.2.8-9
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch vivid
User: autopkgtest-de...@lists.alioth.debian.org
Usertags: autopkgtest

Hello,

I was recently systemd'ifying Ubuntu's nfs-utils package (see
https://launchpad.net/bugs/1312976 and https://launchpad.net/bugs/1428487)
and as part of that I wrote an autopkgtest to check that a simple
server and client setup on localhost works. This found a surprising
number of issues with the current upstream systemd units (I sent some
fixes upstream).

The test runs successfully in a sid VM on the current sid
nfs-{common,kernel-server} packages with the init.d scrips:

| $ adt-run -B nfs-utils_1.2.8-10.dsc --- qemu /srv/vm/adt-sid.img
| [...]
| adt-run [11:16:46]: test local-server-client: [---
| bash: line 1:  3223 Killed  
/tmp/adt-run.E6bGah/build.wsp/nfs-utils-1.2.8/debian/tests/local-server-client 
2> >(tee -a /tmp/adt-run.E6bGah/local-server-client-stderr >&2) > >(tee -a 
/tmp/adt-run.E6bGah/local-server-client-stdout)
| adt-run [11:16:47]: test process requested reboot with marker boot1
| localhost:/home on /mnt/nfs_home type nfs4 
(rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp6,port=0,timeo=600,retrans=2,sec=sys,clientaddr=::1,local_lock=none,addr=::1)
| localhost:/var/log on /mnt/nfs_log type nfs4 
(rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp6,port=0,timeo=600,retrans=2,sec=sys,clientaddr=::1,local_lock=none,addr=::1)
| adt-run [11:18:38]: test local-server-client: ---]
| adt-run [11:18:39]: test local-server-client:  - - - - - - - - - - results - 
- - - - - - - - -
| local-server-client  PASS

Thanks for considering,

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
diff -Nru nfs-utils-1.2.8/debian/changelog nfs-utils-1.2.8/debian/changelog
--- nfs-utils-1.2.8/debian/changelog2014-08-13 02:12:43.0 +0200
+++ nfs-utils-1.2.8/debian/changelog2015-03-05 11:15:47.0 +0100
@@ -1,3 +1,10 @@
+nfs-utils (1:1.2.8-10) UNRELEASED; urgency=medium
+
+  * Add autopkgtest for installing server and client on localhost, setting up
+two exports, rebooting, and ensuring that the NFS mounts work.
+
+ -- Martin Pitt   Thu, 05 Mar 2015 11:15:21 +0100
+
 nfs-utils (1:1.2.8-9) unstable; urgency=medium
 
   * debian/patches/22-mountd-fix-segfault-in-add_name-with-newer-gcc-
diff -Nru nfs-utils-1.2.8/debian/tests/control 
nfs-utils-1.2.8/debian/tests/control
--- nfs-utils-1.2.8/debian/tests/control1970-01-01 01:00:00.0 
+0100
+++ nfs-utils-1.2.8/debian/tests/control2015-03-05 11:15:16.0 
+0100
@@ -0,0 +1,4 @@
+Tests: local-server-client
+Depends: nfs-kernel-server
+# we need machine isolation as we need to modprobe stuff
+Restrictions: needs-root, isolation-machine, breaks-testbed
diff -Nru nfs-utils-1.2.8/debian/tests/local-server-client 
nfs-utils-1.2.8/debian/tests/local-server-client
--- nfs-utils-1.2.8/debian/tests/local-server-client1970-01-01 
01:00:00.0 +0100
+++ nfs-utils-1.2.8/debian/tests/local-server-client2015-03-05 
11:15:16.0 +0100
@@ -0,0 +1,65 @@
+#!/bin/sh
+# install server and client, do some mounts, verify that it boots and works
+set -e
+
+if ! [ -x /tmp/autopkgtest-reboot ]; then
+echo "SKIP: testbed does not support rebooting"
+exit 0
+fi
+
+pre_boot_setup() {
+# set up some exports
+cat <> /etc/exports
+/home localhost(rw,no_root_squash,no_subtree_check)
+/var/log/ localhost(ro,no_root_squash,subtree_check)
+EOF
+
+# set up client mounts
+mkdir -p /mnt/nfs_home /mnt/nfs_log
+cat << EOF >> /etc/fstab
+localhost:/home /mnt/nfs_home nfs defaults,nofail 0 0
+localhost:/var/log /mnt/nfs_log nfs defaults,nofail 0 0
+EOF
+}
+
+fail() {
+echo "FAIL: $1" >&2
+exit 1
+}
+
+post_boot_tests() {
+# ensure we have our mounts
+mount | grep 'localhost:.*nfs_home' || fail "nfs_home not mounted"
+mount | grep 'localhost:.*nfs_log' || fail "nfs_log not mounted"
+
+# test that we can write to NFS export and get it in /home
+[ ! -e /home/hello.txt ] || fail "/home/hello.txt already exists"
+echo world > /mnt/nfs_home/hello.txt
+sync
+[ -e /home/hello.txt ] || fail "/home/hello.txt does not exist"
+[ "$(cat /home/hello.txt)" = "world" ] || fail "/home/hello.txt has wrong 
contents"
+
+# test that we can write to /home and get it in NFS
+rm /home/hello.txt
+sync
+[ ! -e /mnt/nfs_home/hello.txt ] || fail "/mnt/nfs_home/hello.txt exists 
after removal"
+
+# read-only, should fail
+! touch /mnt/nfs_log/pwned 2>/dev/null || fail "writing

Bug#622845: please enable IPv6 privacy extension in default configuration

2011-04-17 Thread Martin Pitt
reassign 622845 linux-2.6 2.6.38-3
thanks

Hello Martin,

Martin Würtele [2011-04-15  8:37 +0200]:
> please enable IPv6 privacy extensions in the default configuration:
> 
> # enable IPv6 privacy
> net.ipv6.conf.eth0.use_tempaddr=2

This is not something that should be done in sysfsutils (which isn't
even installed in many cases), but should be done in the kernel
itself. Reassigning to the kernel.

Thanks,

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110417174629.gc2...@piware.de