packages: dietlibc/dietlibc.spec, dietlibc/umount-arch.patch (NEW)=?UTF-8?Q?=20?=- add um...

glen glen at pld-linux.org
Tue Mar 27 09:06:37 CEST 2012


Author: glen                         Date: Tue Mar 27 07:06:37 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add umount-arch.patch from debian, fixing umount syscalls for alpha, ia64

---- Files affected:
packages/dietlibc:
   dietlibc.spec (1.106 -> 1.107) , umount-arch.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/dietlibc/dietlibc.spec
diff -u packages/dietlibc/dietlibc.spec:1.106 packages/dietlibc/dietlibc.spec:1.107
--- packages/dietlibc/dietlibc.spec:1.106	Wed Aug 31 21:47:40 2011
+++ packages/dietlibc/dietlibc.spec	Tue Mar 27 09:06:31 2012
@@ -13,7 +13,7 @@
 Summary(pt_BR.UTF-8):	libc pequena otimizada para tamanho
 Name:		dietlibc
 Version:	0.32
-Release:	15
+Release:	16
 Epoch:		2
 License:	GPL v2
 Group:		Development/Libraries
@@ -34,6 +34,7 @@
 Patch11:	%{name}-_syscall-no-arch.patch
 
 Patch13:	%{name}-strcoll.patch
+Patch14:	umount-arch.patch
 Patch15:	%{name}-memalign.patch
 Patch16:	%{name}-getsubopt.patch
 Patch17:	%{name}-devmacros.patch
@@ -125,6 +126,7 @@
 %patch11 -p1
 
 %patch13 -p1
+%patch14 -p1
 %patch15 -p1
 %patch16 -p1
 %patch17 -p1
@@ -212,6 +214,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.107  2012/03/27 07:06:31  glen
+- add umount-arch.patch from debian, fixing umount syscalls for alpha, ia64
+
 Revision 1.106  2011/08/31 19:47:40  arekm
 - rel 15; use -Wa,--noexecstack instead of patching tons of files
 

================================================================
Index: packages/dietlibc/umount-arch.patch
diff -u /dev/null packages/dietlibc/umount-arch.patch:1.1
--- /dev/null	Tue Mar 27 09:06:37 2012
+++ packages/dietlibc/umount-arch.patch	Tue Mar 27 09:06:31 2012
@@ -0,0 +1,121 @@
+Debian patches
+
+0011-Add-new-defines-to-indicate-which-syscall-is-umount-3.diff
+0012-Add-an-implementation-of-umount-3-for-ia64.diff .
+
+From a35138d49e022dd94fd91974fa2ed2ef6dd58a90 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv at debian.org>
+Date: Sat, 3 Jan 2009 12:04:48 +0000
+Subject: [PATCH 11/13] 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      |    2 ++
+ syscalls.s/umount.S  |    4 ++++
+ syscalls.s/umount2.S |    4 +++-
+ 4 files changed, 11 insertions(+), 1 deletions(-)
+
+diff --git a/alpha/syscalls.h b/alpha/syscalls.h
+index 1ab37e8..7636b0c 100644
+--- a/alpha/syscalls.h
++++ b/alpha/syscalls.h
+@@ -413,6 +413,8 @@
+ #define __NR_timerfd			477
+ #define __NR_eventfd			478
+ 
++#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 907cb5c..7e86174 100644
+--- a/ia64/syscalls.h
++++ b/ia64/syscalls.h
+@@ -290,6 +290,8 @@
+ #define __NR_timerfd_settime		1311
+ #define __NR_timerfd_gettime		1312
+ 
++#define __NR_umount_with_flags __NR_umount
++
+ #define syscall(name, sym) \
+ .text; \
+ .globl sym; \
+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_umount_without_flags)
++syscall(umount_without_flags,umount)
++#elif !defined(__NR_umount_with_flags) || (__NR_umount != __NR_umount_with_flags)
+ syscall(umount,umount)
++#endif
+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_umount_with_flags)
++syscall(umount_with_flags,umount2)
++#elif defined(__NR_umount2)
+ syscall(umount2,umount2)
+ #endif
+-- 
+1.7.0.3
+
+From 4510d9f53bd77bc8b97d37c78b499d85d0a97d4f Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv at debian.org>
+Date: Sat, 3 Jan 2009 12:11:42 +0000
+Subject: [PATCH 12/13] 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.7.0.3
+
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/dietlibc/dietlibc.spec?r1=1.106&r2=1.107



More information about the pld-cvs-commit mailing list