FS#11894 - coreutils-6.12-1 has /bin/touch that fails on kernel <2.6.22

Attached to Project: Arch Linux
Opened by Vesa Kaihlavirta (vegai) - Sunday, 26 October 2008, 18:42 GMT
Last edited by Andreas Radke (AndyRTR) - Thursday, 18 December 2008, 14:54 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

$ /bin/touch foo
/bin/touch: setting times of `foo': Function not implemented
$ uname -a
Linux the.hn 2.6.18.8-linode10 #2 SMP Sat Jul 19 20:24:32 EDT 2008 i686 Intel(R) Xeon(R) CPU L5420 @ 2.50GHz GenuineIntel GNU/Linux


Not a problem for regular desktop users with latest kernels, but a bit nasty for us VPS users.

Also mentioned here (and x86_64 fix provided by cactus):

http://bbs.archlinux.org/viewtopic.php?pid=385644


Should we perhaps downgrade coreutils until the world catches up? Or might there be a patch...
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Thursday, 18 December 2008, 14:54 GMT
Reason for closing:  Won't fix
Comment by Vesa Kaihlavirta (vegai) - Sunday, 26 October 2008, 19:13 GMT
I quickfixed this for myself by editing lib/config.h thus:

/* Define to 1 if you have the `futimens' function. */
#define HAVE_FUTIMENS 0

/* Define to 1 if you have the `futimes' function. */
#define HAVE_FUTIMES 0

/* Define to 1 if you have the `futimesat' function. */
#define HAVE_FUTIMESAT 0

And compiled my own /bin/touch. Not without its loss, though. the fut* functions are said to have greater accuracy.
Comment by Vesa Kaihlavirta (vegai) - Monday, 27 October 2008, 06:46 GMT
libarchive's bsdtar has the same problem
Comment by Jan de Groot (JGC) - Monday, 27 October 2008, 10:55 GMT
For coreutils, this patch should be applied to make it run on older kernels while making use of the new features in newer kernels:
http://www.linuxfromscratch.org/patches/lfs/development/coreutils-6.12-old_build_kernel-1.patch
Comment by Jan de Groot (JGC) - Monday, 27 October 2008, 11:04 GMT
As for libarchive: yes, it probably will return warnings about unimplemented syscalls, but libarchive handles this thing different. It tries to restore the time by using futimes, if that succeeds, it returns from the function. If it doesn't, either because of an error or because the syscall is not implemented, it has a fallback to other ways to set the file time.

Loading...