ports/79021: New port: linux_base-fedora

Sangwoo Shim ssw at neo.redjade.org
Sat Mar 19 18:40:07 UTC 2005


>Number:         79021
>Category:       ports
>Synopsis:       New port: linux_base-fedora
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 19 18:40:06 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Sangwoo Shim
>Release:        6-CURRENT
>Organization:
Seoul Natl' Univ.
>Environment:
FreeBSD ssw.dyndns.org 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Thu Feb 24 12:27:10 KST 2005     root at ssw.dyndns.org:/usr/obj/usr/src/sys/SSW-SMP  i386
>Description:
      Added new port: linux_base-fedora, which is needed for install/run some recent linux programs.
>How-To-Repeat:
      
>Fix:
      Unified diff against empty dir attached.

%%%

diff -urN linux_base-fedora/Makefile linux_base-fedora-new/Makefile
--- linux_base-fedora/Makefile  Thu Jan  1 09:00:00 1970
+++ linux_base-fedora-new/Makefile      Sun Mar 20 03:24:47 2005
@@ -0,0 +1,156 @@
+# New ports collection makefile for:   linux_base-rh-7.3
+# Date created:                                2005-01-11
+# Whom:                                        trevor
+# based on ports/emulators/linux_base by Marcel Moolenaar and others
+#
+# $FreeBSD: ports/emulators/linux_base/Makefile,v 1.102 2005/01/30 17:26:42 krion Exp $
+#
+
+PORTNAME=              linux_base-fedora
+PORTVERSION=           3
+CATEGORIES=            emulators linux
+MASTER_SITES=          ${MASTER_SITE_FEDORA_LINUX}
+MASTER_SITE_SUBDIR=    3/i386/os/Fedora/RPMS
+DISTFILES=     \
+       glibc-common-2.3.3-74.i386.rpm \
+       glibc-2.3.3-74.i386.rpm \
+       fedora-release-3-8.i386.rpm \
+       setup-2.5.36-1.noarch.rpm \
+       filesystem-2.3.0-1.i386.rpm \
+       basesystem-8.0-4.noarch.rpm \
+       zlib-1.2.1.2-1.i386.rpm \
+       libattr-2.4.16-3.i386.rpm \
+       libacl-2.2.23-5.i386.rpm \
+       elfutils-libelf-0.96-1.i386.rpm \
+       bzip2-libs-1.0.2-13.i386.rpm \
+       termcap-5.4-3.noarch.rpm \
+       db4-4.2.52-6.i386.rpm \
+       gdbm-1.8.0-24.i386.rpm \
+       glib-1.2.10-15.i386.rpm \
+       glib2-2.4.7-1.i386.rpm \
+       libtermcap-2.0.8-39.i386.rpm \
+       bash-3.0-17.i386.rpm \
+       bzip2-1.0.2-13.i386.rpm \
+       compat-libstdc++-8-3.3.4.2.i386.rpm \
+       ncurses-5.4-13.i386.rpm \
+       info-4.7-5.i386.rpm \
+       pcre-4.5-3.i386.rpm \
+       findutils-4.1.20-7.i386.rpm \
+       grep-2.5.1-31.i386.rpm \
+       libselinux-1.17.14-1.i386.rpm \
+       coreutils-5.2.1-31.i386.rpm \
+       popt-1.9.1-21.i386.rpm \
+       readline-4.3-13.i386.rpm \
+       setserial-2.17-17.i386.rpm \
+       libstdc++-3.4.2-6.fc3.i386.rpm \
+       slang-1.4.9-6.i386.rpm \
+       rpm-4.3.2-21.i386.rpm \
+       libgcc-3.4.2-6.fc3.i386.rpm \
+       freetype-2.1.9-1.i386.rpm \
+       xorg-x11-libs-6.8.1-12.i386.rpm \
+       openssl-0.9.7a-40.i386.rpm \
+       libmng-1.0.8-1.i386.rpm \
+       libjpeg-6b-33.i386.rpm \
+       libpng-1.2.7-1.i386.rpm \
+       fontconfig-2.2.3-5.i386.rpm \
+       krb5-libs-1.3.4-7.i386.rpm \
+       e2fsprogs-1.35-11.2.i386.rpm \
+       expat-1.95.7-4.i386.rpm
+
+MAINTAINER=    (Maybe perky@)
+COMMENT=       Basic packages for Linux mode from Fedora core 3/i386
+
+EXTRACT_DEPENDS=       rpm:${PORTSDIR}/archivers/rpm4
+
+CONFLICTS=     linux_base-6* linux_base-7.1* linux_base-debian* \
+               linux_base-gentoo* linux_base-rh-9* linux_base-suse-9* \
+               linux-XFree86-libs*
+
+NO_LATEST_LINK=                yes
+ONLY_FOR_ARCHS=                amd64 i386
+DIST_SUBDIR=           rpm/fedora
+PREFIX=                        ${LINUXBASE}
+NO_BUILD=              yes
+NO_FILTER_SHLIBS=      yes
+NO_MTREE=              yes
+PLIST=                 ${WRKDIR}/plist
+
+.undef USE_LINUX
+
+.include <bsd.port.pre.mk>
+DBPATH=                        /var/lib/rpm
+RPM=                   LC_ALL=C rpm
+RPMFLAGS=              --root ${WRKSRC} --dbpath ${DBPATH} --nodeps \
+                       --replacepkgs --ignoreos --ignorearch
+RPMDIR=                        ${DISTDIR}/${DIST_SUBDIR}
+
+REMOVE_DIRS=           boot dev home initrd root tmp var/tmp usr/local usr/tmp
+REMOVE_FILES=          bin/df bin/su etc/exports etc/group etc/localtime \
+                       etc/motd etc/passwd etc/printcap etc/services \
+                       etc/protocols
+BRAND_FILES=           bin/rpm sbin/ldconfig sbin/sln
+
+.if (${ARCH} == "amd64")
+LATEST_LINK:=  ${LATEST_LINK:C/linux/linux32/}
+FALLBACK_ELF_MIB=      kern.elf32.fallback_brand
+.else
+FALLBACK_ELF_MIB=      kern.fallback_elf_brand
+.endif
+LINUX_ELF=             3
+PREVIOUS_ELF!=         /sbin/sysctl -n ${FALLBACK_ELF_MIB}
+
+do-extract:
+#
+# Handle the loading of the linux loadable kernel module if required.
+       @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+       @${MKDIR} ${WRKSRC}/${DBPATH} ${WRKSRC}/var/tmp ${WRKSRC}/lib
+       @cd ${WRKSRC}/lib && ${LN} -sf libtermcap.so.2.0.8 libtermcap.so.2
+       ${RPM} --initdb --root ${WRKSRC} --dbpath ${DBPATH}
+#
+# Install all packages. Ignore dependencies just like the Red Hat installer.
+# Also, set the ELF fallback brand to Linux, so that we don't have to do
+# anything special to run statically linked binaries.
+       @/sbin/sysctl -w ${FALLBACK_ELF_MIB}=${LINUX_ELF}
+       @for R in ${DISTFILES:S/:new//}; do \
+               ${ECHO} $$R; \
+               ${RPM} -U ${RPMFLAGS} ${RPMDIR}/$$R; \
+       done
+       @for F in ${BRAND_FILES}; do \
+               ${BRANDELF} -t Linux ${WRKSRC}/$$F; \
+       done
+       @/sbin/sysctl -w ${FALLBACK_ELF_MIB}=${PREVIOUS_ELF}
+#
+# Install yp.conf as a hint to NIS users and make sure there's an
+# mtab in etc, albeit an empty one. This is needed in a couple of
+# cases, notably staroffice6.
+#
+       ${INSTALL} ${COPY} -m 644 ${FILESDIR}/yp.conf ${WRKSRC}/etc
+       ${TOUCH} ${WRKSRC}/etc/mtab ${WRKSRC}/etc/host.conf
+#
+# Finish
+#
+       @for D in ${REMOVE_DIRS}; do \
+               ${RM} -rf ${WRKSRC}/$$D; \
+       done
+       @for F in ${REMOVE_FILES}; do \
+               ${RM} -f ${WRKSRC}/$$F; \
+       done
+       @${LN} -sf /var/tmp ${WRKSRC}/usr/tmp
+
+pre-install:
+       ${RM} -f ${PLIST}
+       cd ${WRKSRC} && ${FIND} -s . -type f -o -type l | \
+               ${CUT} -c3-999 >> ${PLIST} \
+               && ${FIND} -d * -type d | ${SED} -e 's:^:@dirrm :' >> ${PLIST}
+
+do-install:
+       cd ${WRKSRC} && ${FIND} * | ${CPIO} -dlmp ${PREFIX}
+       ${FIND} ${PREFIX} -type d -exec ${CHMOD} 755 \{\} \;
+
+post-install:
+       @${ECHO} ''
+       @fmt ${PKGMESSAGE}
+       @${ECHO} ''
+
+.include <bsd.port.post.mk>
diff -urN linux_base-fedora/distinfo linux_base-fedora-new/distinfo
--- linux_base-fedora/distinfo  Thu Jan  1 09:00:00 1970
+++ linux_base-fedora-new/distinfo      Sun Mar 20 03:23:54 2005
@@ -0,0 +1,88 @@
+MD5 (rpm/fedora/glibc-common-2.3.3-74.i386.rpm) = 41d56fbdc1a3ff18c3002676d3fbb343
+SIZE (rpm/fedora/glibc-common-2.3.3-74.i386.rpm) = 14256382
+MD5 (rpm/fedora/glibc-2.3.3-74.i386.rpm) = bbb7c89c975866c6a6ea87b0820349ba
+SIZE (rpm/fedora/glibc-2.3.3-74.i386.rpm) = 4362040
+MD5 (rpm/fedora/fedora-release-3-8.i386.rpm) = 20553b29336b1394776daf5ba92fc199
+SIZE (rpm/fedora/fedora-release-3-8.i386.rpm) = 93728
+MD5 (rpm/fedora/setup-2.5.36-1.noarch.rpm) = bb911224b36329be95d84e03a04aad29
+SIZE (rpm/fedora/setup-2.5.36-1.noarch.rpm) = 30677
+MD5 (rpm/fedora/filesystem-2.3.0-1.i386.rpm) = 1cca06d7ad0eea0ed6c277391a6dc8b6
+SIZE (rpm/fedora/filesystem-2.3.0-1.i386.rpm) = 15679
+MD5 (rpm/fedora/basesystem-8.0-4.noarch.rpm) = 590ffac4154564dbf101a4adaae2e634
+SIZE (rpm/fedora/basesystem-8.0-4.noarch.rpm) = 2777
+MD5 (rpm/fedora/zlib-1.2.1.2-1.i386.rpm) = 11f8c759861207845a2725c3ab068e31
+SIZE (rpm/fedora/zlib-1.2.1.2-1.i386.rpm) = 44358
+MD5 (rpm/fedora/libattr-2.4.16-3.i386.rpm) = 89ccb14578301b7e5ebda8c33f83bfd4
+SIZE (rpm/fedora/libattr-2.4.16-3.i386.rpm) = 13711
+MD5 (rpm/fedora/libacl-2.2.23-5.i386.rpm) = 27cd1286b8b157e5b9d45ab9623d9770
+SIZE (rpm/fedora/libacl-2.2.23-5.i386.rpm) = 16023
+MD5 (rpm/fedora/elfutils-libelf-0.96-1.i386.rpm) = 9ebe97e40da45ed2836b0d04b8437665
+SIZE (rpm/fedora/elfutils-libelf-0.96-1.i386.rpm) = 37647
+MD5 (rpm/fedora/bzip2-libs-1.0.2-13.i386.rpm) = 32c36c5a6f82c9e2398557b42ce777bb
+SIZE (rpm/fedora/bzip2-libs-1.0.2-13.i386.rpm) = 34363
+MD5 (rpm/fedora/termcap-5.4-3.noarch.rpm) = 69f13feb84eaa760234a207d3b143f95
+SIZE (rpm/fedora/termcap-5.4-3.noarch.rpm) = 260989
+MD5 (rpm/fedora/db4-4.2.52-6.i386.rpm) = 4139238bb1e93b18b45a2578249ac444
+SIZE (rpm/fedora/db4-4.2.52-6.i386.rpm) = 1576482
+MD5 (rpm/fedora/gdbm-1.8.0-24.i386.rpm) = 190cb0e98b618500579bc1f2dc266b8b
+SIZE (rpm/fedora/gdbm-1.8.0-24.i386.rpm) = 26322
+MD5 (rpm/fedora/glib-1.2.10-15.i386.rpm) = 8bc7de68fa760472867ef36ebc399c7b
+SIZE (rpm/fedora/glib-1.2.10-15.i386.rpm) = 131470
+MD5 (rpm/fedora/glib2-2.4.7-1.i386.rpm) = 5d7543e95fa8291d8d1bf913462f6567
+SIZE (rpm/fedora/glib2-2.4.7-1.i386.rpm) = 488043
+MD5 (rpm/fedora/libtermcap-2.0.8-39.i386.rpm) = 57077f4f4dd55d2eaa9b707d52f6912e
+SIZE (rpm/fedora/libtermcap-2.0.8-39.i386.rpm) = 12513
+MD5 (rpm/fedora/bash-3.0-17.i386.rpm) = 5b2585a783f2a3190e3531679f826603
+SIZE (rpm/fedora/bash-3.0-17.i386.rpm) = 1823081
+MD5 (rpm/fedora/bzip2-1.0.2-13.i386.rpm) = 3b9105d659ca339c681517a8f9487990
+SIZE (rpm/fedora/bzip2-1.0.2-13.i386.rpm) = 48359
+MD5 (rpm/fedora/compat-libstdc++-8-3.3.4.2.i386.rpm) = bed3429452b6d1a392ba3e8f5f5a8687
+SIZE (rpm/fedora/compat-libstdc++-8-3.3.4.2.i386.rpm) = 666891
+MD5 (rpm/fedora/ncurses-5.4-13.i386.rpm) = 33a216189c6992b24b2ce7d0ef4d583a
+SIZE (rpm/fedora/ncurses-5.4-13.i386.rpm) = 1585476
+MD5 (rpm/fedora/info-4.7-5.i386.rpm) = 0d3e7e452288e37e12cb58e37a24d6c5
+SIZE (rpm/fedora/info-4.7-5.i386.rpm) = 148631
+MD5 (rpm/fedora/pcre-4.5-3.i386.rpm) = 54ff33ad935321fb0233b48fde5cb35b
+SIZE (rpm/fedora/pcre-4.5-3.i386.rpm) = 61061
+MD5 (rpm/fedora/findutils-4.1.20-7.i386.rpm) = 34b1ea259baa203d7561fc6f973d3fa4+SIZE (rpm/fedora/findutils-4.1.20-7.i386.rpm) = 110323
+MD5 (rpm/fedora/grep-2.5.1-31.i386.rpm) = ddf74d66549aac0af0021f4214d7b57a
+SIZE (rpm/fedora/grep-2.5.1-31.i386.rpm) = 171630
+MD5 (rpm/fedora/libselinux-1.17.14-1.i386.rpm) = 5585b1a4c44d8ce787c0601fb42f420e
+SIZE (rpm/fedora/libselinux-1.17.14-1.i386.rpm) = 61298
+MD5 (rpm/fedora/coreutils-5.2.1-31.i386.rpm) = 5cb75e56e2962cd4eb3f1ed7496e54b0
+SIZE (rpm/fedora/coreutils-5.2.1-31.i386.rpm) = 2996248
+MD5 (rpm/fedora/popt-1.9.1-21.i386.rpm) = 43c5d117670ba81b7a644009556a7f16
+SIZE (rpm/fedora/popt-1.9.1-21.i386.rpm) = 61743
+MD5 (rpm/fedora/readline-4.3-13.i386.rpm) = ef62a05e296f07f570290ab544764654
+SIZE (rpm/fedora/readline-4.3-13.i386.rpm) = 179559
+MD5 (rpm/fedora/setserial-2.17-17.i386.rpm) = 8e1023ae052cf18cddc54fdc6a5e3d3e
+SIZE (rpm/fedora/setserial-2.17-17.i386.rpm) = 21238
+MD5 (rpm/fedora/libstdc++-3.4.2-6.fc3.i386.rpm) = 19ef917aa47e8b765574437f43bbcb63
+SIZE (rpm/fedora/libstdc++-3.4.2-6.fc3.i386.rpm) = 274034
+MD5 (rpm/fedora/slang-1.4.9-6.i386.rpm) = 373b1bfeb81a55f1a9a709124113c156
+SIZE (rpm/fedora/slang-1.4.9-6.i386.rpm) = 389467
+MD5 (rpm/fedora/rpm-4.3.2-21.i386.rpm) = b4d13a5bb80a4ad9482071417a850029
+SIZE (rpm/fedora/rpm-4.3.2-21.i386.rpm) = 570648
+MD5 (rpm/fedora/libgcc-3.4.2-6.fc3.i386.rpm) = 5244b2dd2d123cc5ef2d633ac8e28777+SIZE (rpm/fedora/libgcc-3.4.2-6.fc3.i386.rpm) = 35016
+MD5 (rpm/fedora/freetype-2.1.9-1.i386.rpm) = 4ce383d651b8692d38a71c76547842ac
+SIZE (rpm/fedora/freetype-2.1.9-1.i386.rpm) = 774256
+MD5 (rpm/fedora/xorg-x11-libs-6.8.1-12.i386.rpm) = a7ce4a10a03c180ece6075faddde5cd2
+SIZE (rpm/fedora/xorg-x11-libs-6.8.1-12.i386.rpm) = 2652431
+MD5 (rpm/fedora/openssl-0.9.7a-40.i386.rpm) = 8571e8be7bedd32072da9874d954940c
+SIZE (rpm/fedora/openssl-0.9.7a-40.i386.rpm) = 1130039
+MD5 (rpm/fedora/libmng-1.0.8-1.i386.rpm) = 846d913eaa6bfca6b0c631689e11cc5c
+SIZE (rpm/fedora/libmng-1.0.8-1.i386.rpm) = 139241
+MD5 (rpm/fedora/libjpeg-6b-33.i386.rpm) = a7c91c619462c521ba27b6caad50bd41
+SIZE (rpm/fedora/libjpeg-6b-33.i386.rpm) = 129589
+MD5 (rpm/fedora/libpng-1.2.7-1.i386.rpm) = 47d1b7cfeb21648e620127adbf036150
+SIZE (rpm/fedora/libpng-1.2.7-1.i386.rpm) = 158081
+MD5 (rpm/fedora/fontconfig-2.2.3-5.i386.rpm) = eb0363e0c829ce9d13ba4e0c68ea8458
+SIZE (rpm/fedora/fontconfig-2.2.3-5.i386.rpm) = 118946
+MD5 (rpm/fedora/krb5-libs-1.3.4-7.i386.rpm) = dcf7abe905273e2e374a9d7d4701321f
+SIZE (rpm/fedora/krb5-libs-1.3.4-7.i386.rpm) = 487003
+MD5 (rpm/fedora/e2fsprogs-1.35-11.2.i386.rpm) = d364912aeb58a1650402fe6412c7a627
+SIZE (rpm/fedora/e2fsprogs-1.35-11.2.i386.rpm) = 783189
+MD5 (rpm/fedora/expat-1.95.7-4.i386.rpm) = 2df48545d73e0a20c56d8c727fa606a8
+SIZE (rpm/fedora/expat-1.95.7-4.i386.rpm) = 72430
diff -urN linux_base-fedora/files/yp.conf linux_base-fedora-new/files/yp.conf
--- linux_base-fedora/files/yp.conf     Thu Jan  1 09:00:00 1970
+++ linux_base-fedora-new/files/yp.conf Sun Mar 20 00:52:13 2005
@@ -0,0 +1,15 @@
+# sample yp.conf file
+#
+# Legal entries are:
+#
+#      domainname <domain>             Override the default YP domain
+#                                      (If not set uses the one from
+#                                      the getdomainname() syscall)
+#
+#      ypserver <grape> [<domain>]     Define which host to contact
+#                                      for YP service. If the <domain>
+#                                      argument is included then this
+#                                      host service the specified YP
+#                                      domain.
+#domainname    my.domain
+#ypserver      localhost
diff -urN linux_base-fedora/pkg-descr linux_base-fedora-new/pkg-descr
--- linux_base-fedora/pkg-descr Thu Jan  1 09:00:00 1970
+++ linux_base-fedora-new/pkg-descr     Sun Mar 20 03:20:27 2005
@@ -0,0 +1,7 @@
+This port contains Linux binary packages from Fedora core 3.  These
+packages, in conjunction with the linux.ko kernel module, form the basis of the
+Linux compatibility environment.
+
+This port is available for the i386 architecture and experimentally for amd64.
+If you use an Alpha computer, please install the linux_base-debian or
+linux_base-gentoo-stage1 port instead.
diff -urN linux_base-fedora/pkg-install linux_base-fedora-new/pkg-install
--- linux_base-fedora/pkg-install       Thu Jan  1 09:00:00 1970
+++ linux_base-fedora-new/pkg-install   Sun Mar 20 00:52:13 2005
@@ -0,0 +1,47 @@
+#!/bin/sh
+# $FreeBSD: ports/emulators/linux_base/pkg-install,v 1.8 2005/01/14 05:45:40 trevor Exp $
+# an installation script for linux_base
+
+case "$2" in
+PRE-INSTALL)
+       if [ -z "`kldstat -v | grep linux`" ]; then
+               echo 'Linux mode is not enabled.'
+               echo 'Loading linux kernel module now...'
+               if ! kldload linux; then
+                       echo 'The linux kernel module could not be loaded.'
+                       echo 'Please enable linux mode manually and retry.'
+                       exit 1
+               fi
+       fi
+       if [ -n "`mount | grep -w ^linprocfs`" ]; then
+               echo 'Un-mounting linprocfs...'
+               umount linprocfs
+       fi
+       if [ -n "`mount | grep -w ^linproc`" ]; then
+               echo 'Un-mounting linproc...'
+               umount linproc
+       fi
+       ;;
+POST-INSTALL)
+       if [ -n "`grep -w ^linprocfs /etc/fstab`" ]; then
+               echo 'Re-mounting linprocfs...'
+               mount linprocfs
+       fi
+       if [ -n "`grep -w ^linproc /etc/fstab`" ]; then
+               echo 'Re-mounting linproc...'
+               mount linproc
+       fi
+       ;;
+DEINSTALL)
+       if [ -n "`mount | grep -w ^linprocfs`" ]; then
+               echo 'Un-mounting linprocfs...'
+               umount linprocfs
+       fi
+       if [ -n "`mount | grep -w ^linproc`" ]; then
+               echo 'Un-mounting linproc...'
+               umount linproc
+       fi
+       ;;
+esac
+
+exit 0
diff -urN linux_base-fedora/pkg-message linux_base-fedora-new/pkg-message
--- linux_base-fedora/pkg-message       Thu Jan  1 09:00:00 1970
+++ linux_base-fedora-new/pkg-message   Sun Mar 20 01:31:54 2005
@@ -0,0 +1,15 @@
+This software is based in part on the work of the FreeType Team.
+See <URL:http://www.freetype.org/>.
+
+Installation of the Linux base system is finished. The Linux kernel mode, which
+must be enabled for Linux binaries to run, is now enabled.  Linux mode can be
+enabled permanently with the linux_enable variable of rc.conf(5).
+
+When using NIS, be sure to edit yp.conf in /compat/linux/etc/.
+
+You may wish to create and populate /compat/linux/dev/ if you plan to chroot
+into your Linux installation.  For example:
+
+       mkdir /compat/linux/dev
+       mknod /compat/linux/dev/null c 2 2
+       chmod 666 /compat/linux/dev/null

%%%
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list