NetBSD Problem Report #45041
From www@NetBSD.org Fri Jun 10 14:19:33 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 07BBB63BEFB
for <gnats-bugs@gnats.NetBSD.org>; Fri, 10 Jun 2011 14:19:33 +0000 (UTC)
Message-Id: <20110610141932.6FFA863B970@www.NetBSD.org>
Date: Fri, 10 Jun 2011 14:19:32 +0000 (UTC)
From: tcort@minix3.org
Reply-To: tcort@minix3.org
To: gnats-bugs@NetBSD.org
Subject: bootstrap/bootstrap minix support
X-Send-Pr-Version: www-1.0
>Number: 45041
>Category: pkg
>Synopsis: bootstrap/bootstrap minix support
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Jun 10 14:20:01 +0000 2011
>Closed-Date: Mon Mar 11 22:54:25 +0000 2013
>Last-Modified: Mon Mar 11 22:54:25 +0000 2013
>Originator: Thomas Cort
>Release: N/A
>Organization:
Minix3
>Environment:
Minix 192.168.122.210 3.2.0 i686
>Description:
Minix isn't supported by the bootstrap script.
>How-To-Repeat:
Run the bootstrap script on a minix system.
>Fix:
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index a60c90b..9f4d5b4 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -614,6 +614,22 @@ Linux)
set_opsys=no
machine_arch=`uname -m | sed -e 's/i.86/i386/'`
;;
+Minix)
+ root_group=operator
+ need_bsd_install=yes
+ need_sed=no
+ need_awk=no
+ set_opsys=no
+ groupsprog="id -gn"
+ machine_arch=`uname -p`
+ check_compiler=yes
+ export CC="gcc"
+ export CPPFLAGS="-D_MINIX -D_POSIX_SOURCE"
+ export AR="ar"
+ export LD="ld"
+ export NM="nm"
+ [ -z "$fetch_cmd" ] && fetch_cmd=/usr/bin/fetch
+ ;;
MirBSD)
root_group=wheel
need_pax=yes
>Release-Note:
>Audit-Trail:
From: Thomas Cort <tcort@minix3.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/45041: bootstrap/bootstrap minix support
Date: Tue, 19 Jul 2011 07:30:09 -0400
After submitting the original patch, Minix got a new C library and headers.
The C library and headers were ported from NetBSD. There are changes to
CPPFLAGS to add some definitions needed for the new headers. LDFLAGS is
set to include -lcompat_minix and -lminlib, two compatibility libraries
that go with our new libc.
The other change is to the configure flags for libnbcompat. Since our
new C library has the db stuff, we pass the --disable-db parameter to
libnbcompat's configure script. Other systems still pass --enable-db.
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 8a417be..9007d86 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -448,6 +448,7 @@ overpath=""
root_user=root
bmakexenv=
bmakexargs=
+enable_db=yes
need_extras=no
case "$opsys" in
AIX)
@@ -598,6 +599,24 @@ Linux)
set_opsys=no
machine_arch=`uname -m | sed -e 's/i.86/i386/'`
;;
+Minix)
+ root_group=operator
+ need_bsd_install=yes
+ need_sed=no
+ need_awk=no
+ enable_db=no
+ set_opsys=no
+ groupsprog="id -gn"
+ machine_arch=`uname -p`
+ check_compiler=yes
+ export CC="gcc"
+ export CPPFLAGS="-D_NETBSD_SOURCE -D_MINIX -D_POSIX_SOURCE -D_COMPAT_MINIX"
+ export LDFLAGS="-lcompat_minix -lminlib"
+ export AR="ar"
+ export LD="ld"
+ export NM="nm"
+ [ -z "$fetch_cmd" ] && fetch_cmd=/usr/bin/fetch
+ ;;
MirBSD)
root_group=wheel
need_pax=yes
@@ -928,7 +947,16 @@ bmake="$wrkdir/bin/bmake $make_quiet_flags"
# build libnbcompat
echo_msg "Building libnbcompat"
copy_src $pkgsrcdir/pkgtools/libnbcompat/files libnbcompat
-run_cmd "(cd $wrkdir/libnbcompat; $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --mandir=$mandir --sysconfdir=$sysconfdir --enable-bsd-getopt --enable-db && $bmake $make_quiet_flags)"
+
+db_flag=""
+if [ "$enable_db" = "yes" ]
+then
+ db_flag="--enable-db"
+else
+ db_flag="--disable-db"
+fi
+
+run_cmd "(cd $wrkdir/libnbcompat; $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --mandir=$mandir --sysconfdir=$sysconfdir --enable-bsd-getopt $db_flag && $bmake $make_quiet_flags)"
# bootstrap ksh if necessary
case "$need_ksh" in
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/45041: bootstrap/bootstrap minix support
Date: Sat, 23 Jul 2011 22:00:23 +0900
On Tue, 19 Jul 2011 20:35:01 +0900, Thomas Cort <tcort@minix3.org> wrote:
> After submitting the original patch, Minix got a new C library and headers.
> The C library and headers were ported from NetBSD. There are changes to
> CPPFLAGS to add some definitions needed for the new headers. LDFLAGS is
> set to include -lcompat_minix and -lminlib, two compatibility libraries
> that go with our new libc.
Do you have a plan that header files will be changed to not require -D_NETBSD_SOURCE,
and libcompat_minix and libminlib will be merged into libc?
> The other change is to the configure flags for libnbcompat. Since our
> new C library has the db stuff, we pass the --disable-db parameter to
> libnbcompat's configure script. Other systems still pass --enable-db.
On Minix, any failure happen with --enable-db?
--
OBATA Akio / obache@NetBSD.org
From: Thomas Cort <tcort@minix3.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/45041: bootstrap/bootstrap minix support
Date: Mon, 25 Jul 2011 09:37:26 -0400
> Do you have a plan that header files will be changed to not require -D_NETBSD_SOURCE,
I don't think we have a plan to not require -D_NETBSD_SOURCE.
> libcompat_minix and libminlib will be merged into libc?
Yes, there are plans to have the compatibility stuff eliminated. It
won't be really soon -- there are still a lot of big changes that need
to be done (example: changing Minix's passwd and mtab formats to match
the NetBSD formats), but there are developers actively working on it.
> On Minix, any failure happen with --enable-db?
Yes, during the part of bootstrap that builds pkg_install we get this failure:
gcc -lcompat_minix -lminlib -L../libnbcompat -L../../libnbcompat
-L../lib -o pkg_admin check.o main.o -linstall -lnbcompat
/usr/lib/libc.a(db.o): In function `__dbpanic':
/usr/src/lib/nbsd_libc/db/db/db.c:(.text+0xd0): multiple definition of
`__dbpanic'
../../libnbcompat/libnbcompat.a(db.o):db.c:(.text+0xed): first defined here
/usr/pkg/bin/ld: Warning: size of symbol `__dbpanic' changed from 71
in ../../libnbcompat/libnbcompat.a(db.o) to 47 in
/usr/lib/libc.a(db.o)
collect2: ld returned 1 exit status
*** Error code 1
From: "Thomas Cort" <tcort@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45041 CVS commit: pkgsrc/bootstrap
Date: Mon, 11 Mar 2013 22:48:23 +0000
Module Name: pkgsrc
Committed By: tcort
Date: Mon Mar 11 22:48:23 UTC 2013
Modified Files:
pkgsrc/bootstrap: bootstrap
Added Files:
pkgsrc/bootstrap: README.Minix3
Log Message:
bootstrap: Minix support. OK by agc. PR pkg/45041
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/bootstrap/README.Minix3
cvs rdiff -u -r1.190 -r1.191 pkgsrc/bootstrap/bootstrap
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: tcort@NetBSD.org
State-Changed-When: Mon, 11 Mar 2013 22:54:25 +0000
State-Changed-Why:
Minix support has been added to bootstrap.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.