Bug#788114: dpkg-source: cannot unpack on tmpfs - 'Invalid cross-device link'

2015-06-11 Thread Guillem Jover
Control: found -1 1.17.23

On Mon, 2015-06-08 at 23:08:09 -0500, Adam Majer wrote:
 On Tue, Jun 09, 2015 at 02:09:35AM +0200, Guillem Jover wrote:
  On Mon, 2015-06-08 at 14:00:28 -0500, Adam Majer wrote:
   When unpacking in /tmp, which is a tmpfs,
   
   $ dpkg-source -x ipsec-tools_0.8.2+20140711-3.dsc
   dpkg-source: info: extracting ipsec-tools in ipsec-tools-0.8.2+20140711
   dpkg-source: info: unpacking ipsec-tools_0.8.2+20140711.orig.tar.gz
   dpkg-source: error: unable to rename
   /tmp/ipsec-tools_0.8.2+20140711.orig.tar.gz.tmp-extract.30RfU/ipsec-tools-0.8.2
to ipsec-tools-0.8.2+20140711: Invalid cross-device link
  
  I tried this on a system with Linux 4.0.0, with a tmpfs /tmp (with
  mount options: rw,nosuid,nodev,relatime), and I cannot reproduce it.
  So I'd appreciate more details.
  
  Can you also reproduce it with dpkg-dev 1.17.25? Just to discard if
  this is perhaps a regression, but I doubt it.
  
  Hmm, is this with some kind of per user tmpfs /tmp, and if yes, does
  it work if you switch to a normal global tmpfs /tmp?
 
 This is not a regression. I upgraded from another version that I had
 earlier to make sure it wasn't happening before.
 
 2015-06-08 12:55:47 upgrade dpkg-dev:all 1.17.23 1.18.1

Thanks, marked as such.

 Furthermore, this wasn't a problem in the past so something must have
 changed recently (TM) and I'm not sure what.

Ok, could you try with an older kernel? Preferably the one from before
the upgrade? Do you have any security modules loaded and active?

 /tmp is mounted globally
 
 adamm@mira:/tmp$ touch a
 adamm@mira:/tmp$ ln a b
 adamm@mira:/tmp$ ls -ltr a b
 -rw-r--r-- 2 adamm adamm 0 Jun  8 22:57 b
 -rw-r--r-- 2 adamm adamm 0 Jun  8 22:57 a

Could you also try (w/ your current setup) in /tmp:

  $ touch a
  $ perl -e 'rename a, b or die $!'
  $ rm b

and

  $ mkdir -p d/a
  $ perl -e 'rename d/a, d-a or die $!'
  $ rmdir d d-a

Thanks,
Guillem


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



Bug#788114: dpkg-source: cannot unpack on tmpfs - 'Invalid cross-device link'

2015-06-08 Thread Adam Majer
Package: dpkg-dev
Version: 1.18.1
Severity: normal

When unpacking in /tmp, which is a tmpfs,

$ dpkg-source -x ipsec-tools_0.8.2+20140711-3.dsc
dpkg-source: info: extracting ipsec-tools in ipsec-tools-0.8.2+20140711
dpkg-source: info: unpacking ipsec-tools_0.8.2+20140711.orig.tar.gz
dpkg-source: error: unable to rename
/tmp/ipsec-tools_0.8.2+20140711.orig.tar.gz.tmp-extract.30RfU/ipsec-tools-0.8.2 
to ipsec-tools-0.8.2+20140711: Invalid cross-device link



-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (50, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

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

Versions of packages dpkg-dev depends on:
ii  base-files8
ii  binutils  2.25-4
ii  bzip2 1.0.6-7+b2
ii  libdpkg-perl  1.18.1
ii  make  4.0-8.1
ii  patch 2.7.3-1
ii  xz-utils  5.1.1alpha+20120614-2+b3

Versions of packages dpkg-dev recommends:
ii  build-essential  11.7
ii  clang-3.5 [c-compiler]   1:3.5-9
ii  fakeroot 1.20.2-1
ii  gcc [c-compiler] 4:4.9.2-1
ii  gcc-4.4 [c-compiler] 4.4.7-8
ii  gcc-4.6 [c-compiler] 4.6.4-7
ii  gcc-4.7 [c-compiler] 4.7.4-3
ii  gcc-4.8 [c-compiler] 4.8.4-1
ii  gcc-4.9 [c-compiler] 4.9.2-10
ii  gcc-5 [c-compiler]   5-20150205-1
ii  gnupg1.4.18-6
ii  gnupg2   2.0.26-4
ii  gpgv 1.4.18-6
ii  libalgorithm-merge-perl  0.08-2

Versions of packages dpkg-dev suggests:
ii  debian-keyring  2014.12.10

-- no debconf information


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



Bug#788114: dpkg-source: cannot unpack on tmpfs - 'Invalid cross-device link'

2015-06-08 Thread Guillem Jover
Control: tags -1 unreproducible moreinfo

On Mon, 2015-06-08 at 14:00:28 -0500, Adam Majer wrote:
 Package: dpkg-dev
 Version: 1.18.1
 Severity: normal

 When unpacking in /tmp, which is a tmpfs,
 
 $ dpkg-source -x ipsec-tools_0.8.2+20140711-3.dsc
 dpkg-source: info: extracting ipsec-tools in ipsec-tools-0.8.2+20140711
 dpkg-source: info: unpacking ipsec-tools_0.8.2+20140711.orig.tar.gz
 dpkg-source: error: unable to rename
 /tmp/ipsec-tools_0.8.2+20140711.orig.tar.gz.tmp-extract.30RfU/ipsec-tools-0.8.2
  to ipsec-tools-0.8.2+20140711: Invalid cross-device link

I tried this on a system with Linux 4.0.0, with a tmpfs /tmp (with
mount options: rw,nosuid,nodev,relatime), and I cannot reproduce it.
So I'd appreciate more details.

Can you also reproduce it with dpkg-dev 1.17.25? Just to discard if
this is perhaps a regression, but I doubt it.

Hmm, is this with some kind of per user tmpfs /tmp, and if yes, does
it work if you switch to a normal global tmpfs /tmp?

Thanks,
Guillem


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



Bug#788114: dpkg-source: cannot unpack on tmpfs - 'Invalid cross-device link'

2015-06-08 Thread Adam Majer
On Tue, Jun 09, 2015 at 02:09:35AM +0200, Guillem Jover wrote:
 Control: tags -1 unreproducible moreinfo
 
 On Mon, 2015-06-08 at 14:00:28 -0500, Adam Majer wrote:
  Package: dpkg-dev
  Version: 1.18.1
  Severity: normal
 
  When unpacking in /tmp, which is a tmpfs,
  
  $ dpkg-source -x ipsec-tools_0.8.2+20140711-3.dsc
  dpkg-source: info: extracting ipsec-tools in ipsec-tools-0.8.2+20140711
  dpkg-source: info: unpacking ipsec-tools_0.8.2+20140711.orig.tar.gz
  dpkg-source: error: unable to rename
  /tmp/ipsec-tools_0.8.2+20140711.orig.tar.gz.tmp-extract.30RfU/ipsec-tools-0.8.2
   to ipsec-tools-0.8.2+20140711: Invalid cross-device link
 
 I tried this on a system with Linux 4.0.0, with a tmpfs /tmp (with
 mount options: rw,nosuid,nodev,relatime), and I cannot reproduce it.
 So I'd appreciate more details.
 
 Can you also reproduce it with dpkg-dev 1.17.25? Just to discard if
 this is perhaps a regression, but I doubt it.
 
 Hmm, is this with some kind of per user tmpfs /tmp, and if yes, does
 it work if you switch to a normal global tmpfs /tmp?

This is not a regression. I upgraded from another version that I had
earlier to make sure it wasn't happening before.

2015-06-08 12:55:47 upgrade dpkg-dev:all 1.17.23 1.18.1

Furthermore, this wasn't a problem in the past so something must have
changed recently (TM) and I'm not sure what.

/tmp is mounted globally

adamm@mira:/tmp$ touch a
adamm@mira:/tmp$ ln a b
adamm@mira:/tmp$ ls -ltr a b
-rw-r--r-- 2 adamm adamm 0 Jun  8 22:57 b
-rw-r--r-- 2 adamm adamm 0 Jun  8 22:57 a


adamm@mira:~$ mount | grep tmpfs | grep /tmp
tmpfs on /tmp type tmpfs (rw)
tmpfs on /srv/wine32/tmp type tmpfs (rw)
tmpfs on /srv/wine32/tmp type tmpfs (rw)
tmpfs on /tmp type tmpfs (rw)

The extra tmpfs is because I bind mount it into a 32-bit chroot.

/tmp is mounted via /etc/default/rcS

   # mount /tmp as a tmpfs
   RAMTMP=yes

Workaround is to create a subdirectory in /tmp to unpack the sources
into.


-- 
Adam Majer
ad...@zombino.com


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