Your message dated Tue, 26 Feb 2019 12:49:19 +0000
with message-id <e1gycah-0004r4...@fasolo.debian.org>
and subject line Bug#915559: fixed in coreutils 8.30-2
has caused the Debian Bug report #915559,
regarding coreutils: Use renameat2 from glibc instead of syscall
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.)


-- 
915559: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=915559
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: coreutils
Version: 8.30-1
Severity: normal
Tags: patch

Control: block #909612 by -1

Hi,

recently (2018-11-29), glibc 2.28 was accepted in unstable. It adds a
wrapper for the renameat2 syscall. That wrapper is necessary for
fakechroot because fakechroot cannot intercept system calls but uses a
preloaded library to intercept library calls.

Up to coreutils 8.30, mv(1) uses the renameat2 syscall which makes mv(1)
fail under fakechroot. See #909612.

Now that glibc 2.28 offers the renameat2 library function as a wrapper
to the syscall, coreutils added support for choosing the library
function instead of the syscall if the former is available:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=c50cf67bd7ff70525f3cb4074f0d9cc1f5c6cf9c

I don't know if another coreutils release is likely to happen before the
freeze but if it isn't please consider the attached patch which
backports the commit from the gnulib git to coreutils 8.30.

Without this patch, fakechroot is currently not very useful because the
mv(1) tool is unusable inside fakechroot. Most prominently, apt uses
mv(1) inside its postinst script, so its impossible to install apt
inside fakechroot and thus one cannot setup a sensible system.

Thanks!

cheers, josch
diff -Nru coreutils-8.30/debian/changelog coreutils-8.30/debian/changelog
--- coreutils-8.30/debian/changelog     2018-08-29 22:20:06.000000000 +0200
+++ coreutils-8.30/debian/changelog     2018-12-04 20:49:07.000000000 +0100
@@ -1,3 +1,11 @@
+coreutils (8.30-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch that uses renameat2 from glibc instead of the syscall if
+    available (closes: #XXXXXX)
+
+ -- Johannes 'josch' Schauer <jo...@debian.org>  Tue, 04 Dec 2018 20:49:07 
+0100
+
 coreutils (8.30-1) unstable; urgency=low
 
   * New upstream version
diff -Nru 
coreutils-8.30/debian/patches/prefer-renameat2-from-glibc-over-syscall.patch 
coreutils-8.30/debian/patches/prefer-renameat2-from-glibc-over-syscall.patch
--- 
coreutils-8.30/debian/patches/prefer-renameat2-from-glibc-over-syscall.patch    
    1970-01-01 01:00:00.000000000 +0100
+++ 
coreutils-8.30/debian/patches/prefer-renameat2-from-glibc-over-syscall.patch    
    2018-12-04 20:49:07.000000000 +0100
@@ -0,0 +1,40 @@
+From: Johannes 'josch' Schauer <jo...@debian.org>
+Date: Tue, 4 Dec 2018 20:57:48 +0100
+X-Dgit-Generated: 8.30-1.1 318c43f7b611cf7d81a45a768482227ac7500832
+Subject: Prefer renameat2 from glibc over syscall if available
+
+This is necessary for fakechroot to be able to overwrite renameat2 which
+is used by mv(1) from coreutils. See #909612
+
+This patch is based on a patch by Andreas Henriksson <andr...@fatal.se>
+which was accepted in gnulib git:
+
+https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=c50cf67bd7ff70525f3cb4074f0d9cc1f5c6cf9c
+
+---
+
+--- coreutils-8.30.orig/lib/renameat2.c
++++ coreutils-8.30/lib/renameat2.c
+@@ -77,7 +77,10 @@ renameat2 (int fd1, char const *src, int
+   int ret_val = -1;
+   int err = EINVAL;
+ 
+-#ifdef SYS_renameat2
++#ifdef HAVE_RENAMEAT2
++  ret_val = renameat2 (fd1, src, fd2, dst, flags);
++  err = errno;
++#elif defined SYS_renameat2
+   ret_val = syscall (SYS_renameat2, fd1, src, fd2, dst, flags);
+   err = errno;
+ #elif defined RENAME_EXCL
+--- coreutils-8.30.orig/m4/renameat.m4
++++ coreutils-8.30/m4/renameat.m4
+@@ -15,7 +15,7 @@ AC_DEFUN([gl_FUNC_RENAMEAT],
+   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+   AC_CHECK_HEADERS([linux/fs.h])
+-  AC_CHECK_FUNCS_ONCE([renameat])
++  AC_CHECK_FUNCS_ONCE([renameat renameat2])
+   if test $ac_cv_func_renameat = no; then
+     HAVE_RENAMEAT=0
+   elif test $REPLACE_RENAME = 1; then
diff -Nru coreutils-8.30/debian/patches/series 
coreutils-8.30/debian/patches/series
--- coreutils-8.30/debian/patches/series        2017-10-02 19:31:47.000000000 
+0200
+++ coreutils-8.30/debian/patches/series        2018-12-04 20:49:07.000000000 
+0100
@@ -3,3 +3,4 @@
 72_id_checkngroups.patch
 85_timer_settime.patch
 99_kfbsd_fstat_patch.patch
+prefer-renameat2-from-glibc-over-syscall.patch

--- End Message ---
--- Begin Message ---
Source: coreutils
Source-Version: 8.30-2

We believe that the bug you reported is fixed in the latest version of
coreutils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 915...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Stone <mst...@debian.org> (supplier of updated coreutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 26 Feb 2019 07:15:19 -0500
Source: coreutils
Binary: coreutils coreutils-dbgsym
Architecture: source amd64
Version: 8.30-2
Distribution: unstable
Urgency: medium
Maintainer: Michael Stone <mst...@debian.org>
Changed-By: Michael Stone <mst...@debian.org>
Description:
 coreutils  - GNU core utilities
Closes: 915559
Changes:
 coreutils (8.30-2) unstable; urgency=medium
 .
   * Use renameat glibc function that can be intercepted by fakechroot
     (Closes: #915559)
   * Above requires autoreconf turned on again
Checksums-Sha1:
 07343587915d2976873e066fed2284a58260c50e 1861 coreutils_8.30-2.dsc
 74c27198720a3025d3caa5504c4d13e9e1e7d72e 32368 coreutils_8.30-2.debian.tar.xz
 86cefd574b3891e00b1ba49c21a885ed1df1a6c1 7164580 
coreutils-dbgsym_8.30-2_amd64.deb
 4d9378ddfeb4f3b9f1ef4dbca0c87d4b5cd7df52 7078 coreutils_8.30-2_amd64.buildinfo
 35863c2c0ae6275d6d3f30dc637608bf336d859a 2706740 coreutils_8.30-2_amd64.deb
Checksums-Sha256:
 450506ba6b417a827344d2083b1d0e00dfef2ca9546a1eec645652f068b84aeb 1861 
coreutils_8.30-2.dsc
 58bea49dc60fcbc89fcdf86c46dd3ebd2cba0c15b92daf699dc9f5c3c78bd362 32368 
coreutils_8.30-2.debian.tar.xz
 a4284a0094e197e5aea0561b22c8ab6ce2f6e634d91cbb6a1ce021ea8ab7bbf5 7164580 
coreutils-dbgsym_8.30-2_amd64.deb
 45cd84262a4b6d5b3057130c8437d32deb08dfab6a4d2537d49bb400aec29cca 7078 
coreutils_8.30-2_amd64.buildinfo
 1d1fbed93b80b4ed2b236ea33a49bfbad3a110de46479bb10f6722eda620a994 2706740 
coreutils_8.30-2_amd64.deb
Files:
 df8f803183d6783726fbc47eb06e75fe 1861 utils required coreutils_8.30-2.dsc
 efce4b43803d108ad4a65f3c16ce4643 32368 utils required 
coreutils_8.30-2.debian.tar.xz
 f563a47f7ff3b5c7043f7bc5feb0f6d7 7164580 debug optional 
coreutils-dbgsym_8.30-2_amd64.deb
 2ad479e422aee83e1c71dda4ac51321c 7078 utils required 
coreutils_8.30-2_amd64.buildinfo
 35f4d378eafcc91e413354cd81ec6b12 2706740 utils required 
coreutils_8.30-2_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEAtUxX/EfGGGGDh4C9hqs3PoR/94FAlx1MawACgkQ9hqs3PoR
/97pBBAAwIVbhBn4MVnAeUx2RWRTp/dJDZInxX/zy+b9hYsPAlZW6C0ik6+3njzu
dnjXUdFMllIp2ox/suqHhm+p0osJJjzf4L57H1cI25f4LM9ny3xg+AggBz5Lb1Ls
+3fstZPh1902kiZtLGtqXEjQ+Eb0BZaM9r4XS8BuYxDtwBgd+t667hrNDclLoNKB
urMtHOLaX0MxRYvGEpgf9JYjT9uCNbgvJEUvqjaaWcNjuqjco2iboCc818wC+KjA
YkCFLvSfKxEpbJUTO8hiTIteoTITWvhX/fUagZsO+80Wr9FuvTDjeEO53p4NilHP
Dor3Leycf0UKU5tUfiapaTSm4S7qz3xvEkOHbC2rK4bV95sH3ySKIv3nZmYzhY3e
ChO4lnaiXVCBbWxcMlstwwhyCuzjYywNu8wuT9yoRNvLNTdlkw0Imvf1sGKOoyhM
CrPNqXNgmqiM1LA1scDE7247ysv9eLQUUhQbTHF7WDh/4cVMaKLOTEauPF5y85DG
Rsf/gkygMQEoC7TunZWuBAaNrXnpmdZM6x8lf3VaKBNbchW3F3hIVNNKlP5zR/ek
aZN+6MSobKpPIw0fMun4iwZyaAjev2CF3cA41d4VTJRDpHv0Uo3uJuLL1nXQyMk5
vunpFKoW5WRB4IK3IOz+Zja3jpLz68Iw27+fwSDIJnroZBS9yHg=
=skoj
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to