ports/97082: [maintainer update] emulators/linux_base-gentoo-stage1
Gabor Kovesdan
gkovesdan at t-hosting.hu
Wed May 10 11:00:34 UTC 2006
>Number: 97082
>Category: ports
>Synopsis: [maintainer update] emulators/linux_base-gentoo-stage1
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Wed May 10 11:00:28 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Gabor Kovesdan
>Release: FreeBSD 5.3-RELEASE-p17 amd64
>Organization:
n/a
>Environment:
>Description:
This patch is supposed to fix this port on pointyhat. The pkg-install and pkg-deinstall
scripts were incorporated from the fc3 port. A lot of thanks to Erwin Lansing, who
worked on this while I was busy.
>How-To-Repeat:
>Fix:
--- gentoo.diff begins here ---
diff -Nur /usr/ports/emulators/linux_base-gentoo-stage1/Makefile ./Makefile
--- /usr/ports/emulators/linux_base-gentoo-stage1/Makefile Sat May 6 14:29:49 2006
+++ ./Makefile Tue May 9 21:43:19 2006
@@ -7,6 +7,7 @@
PORTNAME= linux_base-gentoo-stage1
PORTVERSION= 2006.0
+PORTREVISION= 1
CATEGORIES= emulators linux
MASTER_SITES= ${MASTER_SITE_GENTOO}
EXTRACT_ONLY=
@@ -46,7 +47,7 @@
do-extract:
@${MKDIR} ${WRKSRC}
- @${TAR} --exclude=./dev -xpy -C ${WRKSRC} \
+ @${TAR} --exclude=./dev --exclude=./proc -xpy -C ${WRKSRC} \
-f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
@${ECHO_CMD} etc/resolv.conf > ${PLIST}
@cd ${WRKSRC} && ${FIND} * -type f -o -type l >> ${PLIST} \
@@ -57,9 +58,9 @@
do-install:
- ${MKDIR} ${PREFIX}
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
- @${TAR} --exclude=./dev -xpy -C ${PREFIX} \
+ @${TAR} --exclude=./dev -xpy --exclude=./proc -C ${PREFIX} \
-f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
- @${FIND} ${PREFIX} -type d -exec ${CHMOD} 755 \{\} \;
+ @${FIND} ${PREFIX} -fstype ufs -type d -exec ${CHMOD} 755 \{\} \;
@${CP} -p /etc/resolv.conf ${PREFIX}/etc/
@${BRANDELF} -t Linux ${PREFIX}/sbin/ldconfig ${PREFIX}/sbin/sln
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
diff -Nur /usr/ports/emulators/linux_base-gentoo-stage1/pkg-deinstall ./pkg-deinstall
--- /usr/ports/emulators/linux_base-gentoo-stage1/pkg-deinstall Thu Jan 1 01:00:00 1970
+++ ./pkg-deinstall Tue May 9 21:30:51 2006
@@ -0,0 +1,18 @@
+#!/bin/sh
+# a deinstallation script for linux_base
+
+case "$2" in
+DEINSTALL)
+ if [ -n "`mount | grep ^linproc`" ] || \
+ [ -d /compat/linux/proc ]; then
+ echo ""
+ echo "You may need to do by hands:"
+ echo " o unmount linprocfs;"
+ echo " o delete ${PKG_PREFIX}/proc;"
+ echo " o remove the description of linprocfs from /etc/fstab."
+ echo ""
+ fi
+ ;;
+esac
+
+exit 0
diff -Nur /usr/ports/emulators/linux_base-gentoo-stage1/pkg-install ./pkg-install
--- /usr/ports/emulators/linux_base-gentoo-stage1/pkg-install Mon Oct 13 23:13:42 2003
+++ ./pkg-install Tue May 9 21:30:51 2006
@@ -12,22 +12,31 @@
exit 1
fi
fi
- if [ -n "`mount | grep -w ^linprocfs`" ]; then
- echo 'Un-mounting linprocfs...'
- umount linprocfs
- fi
;;
POST-INSTALL)
- if [ -n "`grep -w ^linprocfs /etc/fstab`" ]; then
- echo 'Re-mounting linprocfs...'
- mount linprocfs
+ if [ -z "`grep ^linproc /etc/fstab`" ]; then
+ echo ''
+ echo '+++ Some programs may need the linprocfs, please add it to /etc/fstab! +++'
+ else
+ if [ -z "`mount | grep -w ^linprocfs`" ]; then
+ echo ''
+ echo '+++ Please mount linprocfs manually! +++'
+ fi
fi
- ;;
-DEINSTALL)
- if [ -n "`mount | grep -w ^linprocfs`" ]; then
- echo 'Un-mounting linprocfs...'
- umount linprocfs
+ if [ ! -f ${PKG_PREFIX}/etc/nsswitch.conf ]; then
+ cp ${PKG_PREFIX}/etc/nsswitch.conf.dist \
+ ${PKG_PREFIX}/etc/nsswitch.conf
+ fi
+ if [ ! -f ${PKG_PREFIX}/etc/yp.conf ]; then
+ cp ${PKG_PREFIX}/etc/yp.conf.sample ${PKG_PREFIX}/etc/yp.conf
fi
+#
+# This is needed for updating to ensure that
+# already installed libraries get to ${PKG_PREFIX}/etc/ld.so.cache
+#
+ echo ''
+ echo 'Running linux ldconfig...'
+ ${PKG_PREFIX}/sbin/ldconfig -r ${PKG_PREFIX}
;;
esac
--- gentoo.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list