[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dietlibc: diff for NMU version 0.31-1.2



tags 508397 + patch
thanks

I've prepared an NMU for dietlibc (versioned as 0.31-1.2) and uploaded it
to unstable. As mentioned above I've verified the syscalls made via
strace on i386, amd64 and alpha. On ia64, strace produces strange output
for both glibc and dietlibc, but I've verified that my trivial umount
can unmount with no flags and with MNT_DETACH (which is umount -l), and
that the presence or absence of the MNT_DETACH flag does make it through
to the kernel.

I've also verified that util-vserver builds against my dietlibc on 4
architectures (i386, amd64, alpha and ia64), so once the buildds have
woken up, this should unblock util-vserver's migration to testing.

Release team, please consider letting dietlibc 0.31-1.2 migrate. Also,
compilation of util-vserver on ia64 will need to be retried once my dietlibc
becomes available to the buildd (let me know if I need to ping you later about
this).

Regards from the Cambridge BSP,
    Simon
diffstat for dietlibc_0.31-1.1 dietlibc_0.31-1.2

 debian/diff/0012-Add-an-implementation-of-umount-3-for-ia64.diff        |   36 ++++
 dietlibc-0.31/debian/changelog                                          |   14 +
 dietlibc-0.31/debian/diff/0011-undefined-symbol-umount2-alpha-ia64.diff |   78 ++++++++--
 3 files changed, 118 insertions(+), 10 deletions(-)

diff -u dietlibc-0.31/debian/changelog dietlibc-0.31/debian/changelog
--- dietlibc-0.31/debian/changelog
+++ dietlibc-0.31/debian/changelog
@@ -1,3 +1,17 @@
+dietlibc (0.31-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload from the Cambridge BSP.
+  * debian/diff/0011-undefined-symbol-umount2-alpha-ia64.diff: treat
+    __NR_umount as the 2-argument version on ia64 (really closes: #508397)
+  * debian/diff/0012-Add-an-implementation-of-umount-3-for-ia64.diff:
+    supply a 1-argument version of umount on ia64
+  * Verified to pass MNT_DETACH to the kernel in the expected way on ia64
+  * Verified with strace to do the same thing as glibc on architectures 
+    representing the other three families mentioned in 0011-*.diff
+    (i386, x86_64 and alpha)
+
+ -- Simon McVittie <smcv@debian.org>  Sat, 03 Jan 2009 17:11:00 +0000
+
 dietlibc (0.31-1.1) unstable; urgency=high
 
   * Non-maintainer upload.
diff -u dietlibc-0.31/debian/diff/0011-undefined-symbol-umount2-alpha-ia64.diff dietlibc-0.31/debian/diff/0011-undefined-symbol-umount2-alpha-ia64.diff
--- dietlibc-0.31/debian/diff/0011-undefined-symbol-umount2-alpha-ia64.diff
+++ dietlibc-0.31/debian/diff/0011-undefined-symbol-umount2-alpha-ia64.diff
@@ -1,21 +1,79 @@
---- a/syscalls.s/umount.S	9 Jan 2001 17:57:49 -0000	1.1
-+++ b/syscalls.s/umount.S	10 Dec 2008 20:21:33 -0000
+From 0f4be8919707fd8bbb0005667f0705f4169696d3 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Sat, 3 Jan 2009 12:04:48 +0000
+Subject: [PATCH] Add new #defines to indicate which syscall is umount(3) and which is umount2(3).
+
+* on architectures where __NR_umount is umount(3) and __NR_umount2 is
+  umount2(3), don't do anything special
+* on architectures where this is not the case, define __NR_umount_with_flags
+  so that it's umount2(3)
+* define __NR_umount_without_flags to be umount(3) on architectures where
+  such a syscall exists
+
+In the currently-supported architectures there are four families:
+
+* on i386, arm etc., __NR_umount takes one argument and __NR_umount2 takes two
+* on x86_64 and parisc __NR_umount2 takes two arguments and there is no
+  1-argument umount
+* on alpha, __NR_oldumount takes one argument and __NR_umount takes two
+* on ia64, __NR_umount takes two arguments and there is no 1-argument umount
+---
+ alpha/syscalls.h     |    2 ++
+ ia64/syscalls.h      |    1 +
+ syscalls.s/umount.S  |    4 ++++
+ syscalls.s/umount2.S |    4 +++-
+ 4 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/alpha/syscalls.h b/alpha/syscalls.h
+index c40a81c..7a78209 100644
+--- a/alpha/syscalls.h
++++ b/alpha/syscalls.h
+@@ -381,6 +381,8 @@
+ #define __NR_inotify_add_watch		445
+ #define __NR_inotify_rm_watch		446
+ 
++#define __NR_umount_without_flags __NR_oldumount
++#define __NR_umount_with_flags __NR_umount
+ 
+ #define syscall_weak(name,wsym,sym) \
+ .text ; \
+diff --git a/ia64/syscalls.h b/ia64/syscalls.h
+index 515242c..e41433a 100644
+--- a/ia64/syscalls.h
++++ b/ia64/syscalls.h
+@@ -280,6 +280,7 @@
+ #define __NR_tee			1301
+ #define __NR_vmsplice			1302
+ 
++#define __NR_umount_with_flags __NR_umount
+ 
+ #define syscall(name, sym) \
+ .text; \
+diff --git a/syscalls.s/umount.S b/syscalls.s/umount.S
+index 4a423d9..89793e2 100644
+--- a/syscalls.s/umount.S
++++ b/syscalls.s/umount.S
 @@ -1,3 +1,7 @@
  #include "syscalls.h"
  
-+#if defined(__NR_oldumount) && defined(__NR_umount)
-+syscall(oldumount,umount)
-+#else
++#if defined(__NR_umount_without_flags)
++syscall(umount_without_flags,umount)
++#elif !defined(__NR_umount_with_flags) || (__NR_umount != __NR_umount_with_flags)
  syscall(umount,umount)
 +#endif
---- a/syscalls.s/umount2.S	4 Jan 2003 22:21:48 -0000	1.2
-+++ b/syscalls.s/umount2.S	10 Dec 2008 20:21:33 -0000
+diff --git a/syscalls.s/umount2.S b/syscalls.s/umount2.S
+index b27b353..5742416 100644
+--- a/syscalls.s/umount2.S
++++ b/syscalls.s/umount2.S
 @@ -1,5 +1,7 @@
  #include "syscalls.h"
  
 -#ifdef __NR_umount2
-+#if defined(__NR_umount2)
++#if defined(__NR_umount_with_flags)
++syscall(umount_with_flags,umount2)
++#elif defined(__NR_umount2)
  syscall(umount2,umount2)
-+#elif defined(__NR_oldumount) && defined(__NR_umount)
-+syscall(umount,umount2)
  #endif
+-- 
+1.5.6.5
+
only in patch2:
unchanged:
--- dietlibc-0.31.orig/debian/diff/0012-Add-an-implementation-of-umount-3-for-ia64.diff
+++ dietlibc-0.31/debian/diff/0012-Add-an-implementation-of-umount-3-for-ia64.diff
@@ -0,0 +1,36 @@
+From b5ffca4c796763829c55df3da9e83fe4052db042 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Sat, 3 Jan 2009 12:11:42 +0000
+Subject: [PATCH] Add an implementation of umount(3) for ia64
+
+Like x86_64 and parisc, ia64 lacks a single-argument umount syscall, so we
+need to provide a stub implementation that just calls umount2(path, 0).
+I don't know ia64 assembler, so this one is in C.
+---
+ ia64/Makefile.add     |    2 +-
+ ia64/umount-wrapper.c |    5 +++++
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+ create mode 100644 ia64/umount-wrapper.c
+
+diff --git a/ia64/Makefile.add b/ia64/Makefile.add
+index f660930..ca00e4d 100644
+--- a/ia64/Makefile.add
++++ b/ia64/Makefile.add
+@@ -1,2 +1,2 @@
+ VPATH:=ia64:syscalls.s:$(VPATH)
+-LIBOBJ+=$(OBJDIR)/__time.o $(OBJDIR)/__waitpid.o $(OBJDIR)/__nice.o $(OBJDIR)/__alarm.o
++LIBOBJ+=$(OBJDIR)/__time.o $(OBJDIR)/__waitpid.o $(OBJDIR)/__nice.o $(OBJDIR)/__alarm.o $(OBJDIR)/umount-wrapper.o
+diff --git a/ia64/umount-wrapper.c b/ia64/umount-wrapper.c
+new file mode 100644
+index 0000000..2ebffd6
+--- /dev/null
++++ b/ia64/umount-wrapper.c
+@@ -0,0 +1,5 @@
++#include <sys/mount.h>
++
++int umount(const char *target) {
++  return umount2(target, 0);
++}
+-- 
+1.5.6.5
+

Attachment: signature.asc
Description: Digital signature


Reply to: