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

Update: redhat_base



This update fixes a few PLIST issues and also tries to address the
issues that arise when building or installing this port with Linux
emulation disabled.  ld.so.cache generation has been moved to install
time instead of build time and will only be done if kern.emul.linux=1
otherwise a message will be displayed to the user.  A more generic
solution for emulation dependencies would be ideal but this is better
than the current situation until that time.

Note: The @unexec rm -f ... are because ldconfig creates some symlinks
at install time.

Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/redhat/base/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile	2003/09/02 18:49:50	1.18
+++ Makefile	2003/09/24 05:47:38
@@ -2,7 +2,7 @@
 
 COMMENT=	"Linux compatibility package based on RedHat 8.0"
 
-PKGNAME=	redhat_base-8.0p2
+PKGNAME=	redhat_base-8.0p3
 
 MAINTAINER=	Jason Ish <ish_(_at_)_openbsd_(_dot_)_org>
 
@@ -71,13 +71,14 @@
 	@elf2olf -o linux ${PREFIX}/sbin/ldconfig
 	@elf2olf -o linux ${PREFIX}/bin/rpm
 
+# rename ldconfig and install wrapper
+	@cp -p ${PREFIX}/sbin/ldconfig ${PREFIX}/sbin/ldconfig.bin
+	${INSTALL_SCRIPT} ${FILESDIR}/ldconfig ${PREFIX}/sbin
+
 # make a copy of ld.so, convert to olf and then patch
 	@cp -p ${PREFIX}/lib/ld-2.3.2.so ${PREFIX}/usr/bin/ld-2.3.2-olf.so
 	@elf2olf -o linux ${PREFIX}/usr/bin/ld-2.3.2-olf.so
 	@perl ${FILESDIR}/fix-ldd.pl ${PREFIX}/usr/bin/ld-2.3.2-olf.so
-
-# run ldconfig
-	-chroot ${PREFIX} /sbin/ldconfig
 
 post-install:
 # remove setuid root bits
Index: pkg/INSTALL
===================================================================
RCS file: /cvs/ports/emulators/redhat/base/pkg/INSTALL,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 INSTALL
--- pkg/INSTALL	2001/09/16 16:47:32	1.1.1.1
+++ pkg/INSTALL	2003/09/24 05:47:38
@@ -27,6 +27,24 @@
     echo "|"
 }
 
+do_notice_sysctl()
+{
+    echo "| *** Warning: Linux compatibility not enabled."
+    echo "|"
+    echo "| Before this port will work you must:"
+    echo "|"
+    echo "|   1. Enable Linux compatibility:"
+    echo "|"
+    echo "|      Documentation on how to enable Linux compatibility can be"
+    echo "|      found in the compat_linux(8) man page."
+    echo "|"
+    echo "|   2. Update the Linux ld.so.cache file:"
+    echo "|"
+    echo "|       Once Linux compatibility has been enabled, run"
+    echo "|       /emul/linux/sbin/ldconfig as root."
+    echo "|"
+}
+
 do_notice_bottom()
 {
     echo "| Installation of $1 complete. See compat_linux(8)"
@@ -59,8 +77,15 @@
 	    fi
 	else
 	    ln -sf $PREFIX /emul/linux
+	fi
+
+	# Only run ldconfig if kern.emul.linux = 1.
+	if [ x`sysctl -n kern.emul.linux` = x1 ]; then
+		${PREFIX}/sbin/ldconfig
+	else
+		do_notice_sysctl
 	fi
-	
+
 	do_notice_bottom $1
 	;;
     *)
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/emulators/redhat/base/pkg/PLIST,v
retrieving revision 1.6
diff -u -r1.6 PLIST
--- pkg/PLIST	2003/09/02 18:49:50	1.6
+++ pkg/PLIST	2003/09/24 05:47:46
@@ -10,6 +10,14 @@
 @exec ln -sf /dev/sound %D/dev/dsp
 @exec ln -sf /dev/null %D/dev/null
 @unexec rm -rf %D/dev
+_(_at_)_unexec rm -f %D/etc/ld.so.cache
+_(_at_)_unexec rm -f %D/lib/libtermcap.so.2
+_(_at_)_unexec rm -f %D/usr/lib/libstdc++.so.2.9
+_(_at_)_unexec rm -f %D/usr/lib/libstdc++.so.2.8
+_(_at_)_unexec rm -f %D/usr/lib/libstdc++.so.2.7.2
+_(_at_)_unexec rm -f %D/usr/lib/libstdc++-libc6.1-1.so.2
+_(_at_)_unexec rm -f %D/usr/lib/libjpeg.so.62
+_(_at_)_unexec rm -f %D/usr/lib/libg++.so.2.7.2
 bin/basename
 bin/bash
 bin/bash2
@@ -101,7 +109,7 @@
 etc/gtk/gtkrc.yi
 etc/gtk/gtkrc.zh_CN
 etc/gtk/gtkrc.zh_TW.big5
-etc/ld.so.cache
+_(_at_)_comment no checksum
 etc/ld.so.conf
 etc/logrotate.d/rpm
 etc/nsswitch.conf
@@ -166,14 +174,16 @@
 lib/libresolv.so.2
 lib/librt-2.3.2.so
 lib/librt.so.1
-lib/libtermcap.so.2
 lib/libtermcap.so.2.0.8
 lib/libthread_db-1.0.so
 lib/libthread_db.so.1
 lib/libutil-2.3.2.so
 lib/libutil.so.1
 sbin/ldconfig
+sbin/ldconfig.bin
 sbin/sln
+usr/X11R6/lib/X11/XErrorDB
+usr/X11R6/lib/X11/XKeysymDB
 usr/X11R6/lib/X11/locale/C/XI18N_OBJS
 usr/X11R6/lib/X11/locale/C/XLC_LOCALE
 usr/X11R6/lib/X11/locale/armscii-8/Compose
@@ -307,6 +317,7 @@
 usr/X11R6/lib/X11/locale/zh_TW/Compose
 usr/X11R6/lib/X11/locale/zh_TW/XI18N_OBJS
 usr/X11R6/lib/X11/locale/zh_TW/XLC_LOCALE
+usr/X11R6/lib/X11/rgb.txt
 usr/X11R6/lib/libICE.so.6
 usr/X11R6/lib/libOSMesa.so.3
 usr/X11R6/lib/libSM.so.6
@@ -618,7 +629,6 @@
 usr/lib/libform.so.5
 usr/lib/libfreetype.so.6
 usr/lib/libfreetype.so.6.3.1
-usr/lib/libg++.so.2.7.2
 usr/lib/libg++.so.2.7.2.8
 usr/lib/libgdk-1.2.so.0
 usr/lib/libgdk-1.2.so.0.9.1
@@ -632,7 +642,6 @@
 usr/lib/libgtk-1.2.so.0.9.1
 usr/lib/libhistory.so.4
 usr/lib/libiberty.a
-usr/lib/libjpeg.so.62
 usr/lib/libjpeg.so.62.0.0
 usr/lib/libmenu.so.5
 usr/lib/libncurses.so.5
@@ -652,9 +661,7 @@
 usr/lib/librpmio-4.1.so
 usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
 usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
-usr/lib/libstdc++-libc6.1-1.so.2
 usr/lib/libstdc++-libc6.2-2.so.3
-usr/lib/libstdc++.so.2.7.2
 usr/lib/libstdc++.so.2.7.2.8
 usr/lib/libstdc++.so.2.8.0
 usr/lib/libstdc++.so.2.9.dummy
@@ -4821,6 +4828,7 @@
 usr/share/locale/zh_TW/LC_MESSAGES/libc.mo
 usr/share/man/ja/man8/rpm.8.gz
 usr/share/man/ja/man8/rpm2cpio.8.gz
+usr/share/man/man1/..1.gz
 usr/share/man/man1/:.1.gz
 usr/share/man/man1/[.1.gz
 usr/share/man/man1/addr2line.1.gz
@@ -7337,8 +7345,6 @@
 usr/lib/libncurses.so.5.2
 usr/lib/libpanel.so.5.2
 usr/lib/libreadline.so.4.3
-usr/lib/libstdc++.so.2.8
-usr/lib/libstdc++.so.2.9
 @exec mkdir -p %D/var/spool/repackage
 @dirrm var/spool/repackage
 @dirrm var/spool
--- /dev/null	Tue Sep 23 23:48:56 2003
+++ files/ldconfig	Mon Sep 22 23:33:40 2003
@@ -0,0 +1,13 @@
+#! /bin/sh
+#
+# $Id$
+#
+
+if [ x`sysctl -n kern.emul.linux` = x1 ]; then
+    /emul/linux/sbin/ldconfig.bin $@
+else
+    echo "ERROR: kern.emul.linux must be 1"
+    exit 1
+fi
+
+exit 0



Visit your host, monkey.org