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

Bug#31466: marked as done (patches to build glibc on m68k)



Your message dated Sun, 7 Feb 1999 19:54:09 -0800
with message-id <v04104418b2decee150a6@[206.163.71.146]>
and subject line Closing fixed bugs.
has caused the attached bug report 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 I'm
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Ian Jackson
(administrator, Debian bugs database)

Received: (at submit) by bugs.debian.org; 4 Jan 1999 15:51:58 +0000
Received: (qmail 12282 invoked from network); 4 Jan 1999 15:51:57 -0000
Received: from falbala.informatik.uni-kiel.de (?yWOc0Lo2fi8OcL043Y+HBOjKFvv3kac/?@134.245.252.14)
  by master.debian.org with SMTP; 4 Jan 1999 15:51:57 -0000
Received: from ap031.experimentalphysik.uni-kiel.de (root@ap031.experimentalphysik.uni-kiel.de [134.245.68.31])
	by falbala.informatik.uni-kiel.de (8.9.1/8.9.1) with ESMTP id QAA27095
	for <submit@bugs.debian.org>; Mon, 4 Jan 1999 16:52:20 +0100 (MET)
Received: from localhost by ap031.experimentalphysik.uni-kiel.de
	via sendmail with smtp
	id <m0zxCJU-0005lIC@ap031.experimentalphysik.uni-kiel.de> (Debian Smail3.2.0.101)
	for <submit@bugs.debian.org>; Mon, 4 Jan 1999 16:53:04 +0100 (CET) 
Date: Mon, 4 Jan 1999 16:53:03 +0100 (CET)
From: "Christian T. Steigies" <cts@ap031.experimentalphysik.uni-kiel.de>
Reply-To: "Christian T. Steigies" <steigies@physik.uni-kiel.de>
To: submit@bugs.debian.org
Subject: patches to build glibc on m68k
Message-ID: <Pine.LNX.3.96.990104165210.20002A-100000@ap031.experimentalphysik.uni-kiel.de>
Return-Receipt-To: steigies@physik.uni-kiel.de
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Package: libc6
Version: 2.0.7v-1

The following patch is needed to build glibc on m68k:
1. hunk
- debian/guessvers is not executable after unpacking the source
- there are no and will never be kernel-headers-2.0.35 for m68k
2. hunk
lchown patch (see bug #29497) to make debian usable under 2.1 kernels

Ciao,
Christian.

--- glibc-2.0.7v/debian/rules.orig	Tue Dec 22 17:18:37 1998
+++ glibc-2.0.7v/debian/rules	Tue Dec 22 17:31:16 1998
@@ -16,8 +16,8 @@
 builddir   := $(srcdir)/builddir
 
 arch       := $(shell dpkg --print-architecture)
-version     = $(shell debian/guessvers libc)
-pthreadver  = $(shell debian/guessvers linuxthreads $(glibc))
+version     = $(shell sh debian/guessvers libc)
+pthreadver  = $(shell sh debian/guessvers linuxthreads $(glibc))
 loader      = $(shell sed -n 's/^.*ld.so-version=\(.*.[0-9]\).*$$/\1/p' \
 		$(builddir)/soversions.mk)
 
@@ -36,7 +36,11 @@
   kernel_version := 2.1.131
   glibc := glibc-pre2.1
 else
-  kernel_version := 2.0.35
+  ifeq ($(arch), m68k)
+    kernel_version := 2.0.33
+  else
+    kernel_version := 2.0.35
+  endif
   glibc := glibc
 endif
 
--- glibc-2.0.7v/sysdeps/unix/sysv/linux/m68k/lchown.c.orig	Tue Dec 22 17:29:40 1998
+++ glibc-2.0.7v/sysdeps/unix/sysv/linux/m68k/lchown.c	Tue Dec 22 17:30:33 1998
@@ -0,0 +1,58 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+/*
+  [ from ../x86/chown.c: ]
+  In Linux 2.1.x the chown functions have been changed.  A new function lchown
+  was introduced.  The new chown now follows symlinks - the old chown and the
+  new lchown do not follow symlinks.
+
+  Let's try autodetecting. 980909 dichro-libc@rcpt.to
+*/
+
+#undef __NR_chown
+#define __NR_chown 16
+#undef __NR_lchown
+#define __NR_lchown 182
+
+int
+__lchown (const char *file, uid_t owner, gid_t group)
+{
+       static int state = 0;
+       int ret;
+
+       switch(state) {
+               case 0:
+                       ret = syscall(__NR_lchown, file, owner, group);
+                       if((ret != -1) || (errno != ENOSYS)) {
+                               state = 2;
+                               return ret;
+                       }
+                       state = 1;
+               case 1:
+                       return syscall(__NR_chown, file, owner, group);
+               case 2:
+                       return syscall(__NR_lchown, file, owner, group);
+       }
+}
+
+weak_alias (__lchown, lchown)



Reply to: