Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2013 16:12:48 +0000 (UTC)
From:      Rene Ladan <rene@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r330014 - head/emulators/linux_base-c6
Message-ID:  <201310101612.r9AGCmWE020371@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rene
Date: Thu Oct 10 16:12:48 2013
New Revision: 330014
URL: http://svnweb.freebsd.org/changeset/ports/330014

Log:
  - Add staging support
  - Properly handle yp.conf and krb5.conf
  - Remove some assignments with default values
  
  Note that staging warns about etc/*shadow not being readable, because their
  permissions are 0.

Modified:
  head/emulators/linux_base-c6/Makefile
  head/emulators/linux_base-c6/pkg-plist

Modified: head/emulators/linux_base-c6/Makefile
==============================================================================
--- head/emulators/linux_base-c6/Makefile	Thu Oct 10 15:25:03 2013	(r330013)
+++ head/emulators/linux_base-c6/Makefile	Thu Oct 10 16:12:48 2013	(r330014)
@@ -106,7 +106,6 @@ NO_WRKSUBDIR=		yes
 DISTINFO_FILE?=		${MASTERDIR}/distinfo.${LINUX_RPM_ARCH}
 PLIST_SUB=		GLIBCVER="2.12"
 
-NO_STAGE=	yes
 # TODO:
 # - move master sites to bsd.sites.mk
 # - add 2-3 mirrors from each country (http://www.centos.org/modules/tinycontent/index.php?id=31)
@@ -116,9 +115,6 @@ NO_STAGE=	yes
 #   if we need to add something to the linuxulator
 
 EXTRACT_ONLY=		${BIN_DISTFILES}
-EXTRACT_CMD?=		${TAR}
-EXTRACT_BEFORE_ARGS?=	-xf
-EXTRACT_AFTER_ARGS?=
 
 .include <bsd.port.pre.mk>
 
@@ -198,35 +194,25 @@ do-build:
 
 do-install:
 #
-# Handle the loading of the linux loadable kernel module if required.
-#
-	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-#
 # Do install without using linux rpm system
 #
-	@cd ${WRKSRC} && ${FIND} * -type d -exec ${MKDIR} "${PREFIX}/{}" \;
-	@cd ${WRKSRC} && ${FIND} * ! -type d \
-		| ${CPIO} -pm -R root:wheel ${PREFIX}
-
-	@${LN} -sf /var/tmp ${PREFIX}/usr/tmp
-	@${CHOWN} root:wheel ${PREFIX}/var/lock ${PREFIX}/var/spool/mail
-	@${CHMOD} 755 ${PREFIX}/var/lock ${PREFIX}/var/spool/mail
+	@cd ${WRKSRC} && ${FIND} * ! -path "stage*" -type d -exec ${MKDIR} "${STAGEDIR}${PREFIX}/{}" \;
+	@cd ${WRKSRC} && ${FIND} * ! -path "stage/*" ! -type d \
+		| ${CPIO} -pm -R root:wheel ${STAGEDIR}${PREFIX}
+
+	@${LN} -sf /var/tmp ${STAGEDIR}${PREFIX}/usr/tmp
+	@${CHMOD} 755 ${STAGEDIR}${PREFIX}/var/lock ${STAGEDIR}${PREFIX}/var/spool/mail
 #
 # Let some linux applications (e.g. print/acroread8) print with default settings
 #
-	@${INSTALL_SCRIPT} ${FILESDIR}/lp ${PREFIX}/usr/bin
+	@${INSTALL_SCRIPT} ${FILESDIR}/lp ${STAGEDIR}${PREFIX}/usr/bin
 
 post-install:
-#
-# Handle mounting linux procfs if exists at /etc/fstab and
-# installing etc/nsswitch.conf, etc/yp.conf if so far they don't exist
-#
-	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-#
-# And finally show the pkg-message
-#
-	@${ECHO} ''
-	@${CAT} ${PKGMESSAGE}
-	@${ECHO} ''
+	if [ ! -f ${PREFIX}/etc/krb5.conf ] ; then \
+		${CP} -p ${STAGEDIR}${PREFIX}/etc/krb5.conf.dist ${STAGEDIR}${PREFIX}/etc/krb5.conf ; \
+	fi
+	if [ ! -f ${PREFIX}/etc/yp.conf ] ; then \
+		${CP} -p ${STAGEDIR}${PREFIX}/etc/yp.conf.sample ${STAGEDIR}${PREFIX}/etc/yp.conf ; \
+	fi
 
 .include <bsd.port.post.mk>

Modified: head/emulators/linux_base-c6/pkg-plist
==============================================================================
--- head/emulators/linux_base-c6/pkg-plist	Thu Oct 10 15:25:03 2013	(r330013)
+++ head/emulators/linux_base-c6/pkg-plist	Thu Oct 10 16:12:48 2013	(r330014)
@@ -58,8 +58,9 @@ etc/hosts.deny
 etc/inputrc
 etc/issue
 etc/issue.net
-etc/krb5.conf
+@unexec if cmp -s %D/etc/krb5.conf.dist %D/etc/krb5.conf ; then rm -f %D/etc/krb5.conf ; fi
 etc/krb5.conf.dist
+@exec if [ ! -f %D/etc/krb5.conf ] ; then cp -p %D/%F %B/krb5.conf ; fi
 etc/ld.so.cache
 etc/ld.so.conf
 etc/mke2fs.conf
@@ -90,8 +91,9 @@ etc/skel/.bash_profile
 etc/skel/.bashrc
 etc/system-release
 etc/system-release-cpe
-etc/yp.conf
+@unexec if cmp -s %D/etc/yp.conf.sample %D/etc/yp.conf ; then rm -f %D/etc/yp.cpnf ; fi
 etc/yp.conf.sample
+@exec if [ ! -f %D/etc/yp.conf ] ; then cp -p %D/%F %B/yp.conf ; fi
 etc/yum.repos.d/CentOS-Base.repo
 etc/yum.repos.d/CentOS-Debuginfo.repo
 etc/yum.repos.d/CentOS-Media.repo
@@ -1878,7 +1880,7 @@ usr/share/man/man8/resize2fs.8.gz
 usr/share/man/man8/setcap.8.gz
 usr/share/man/man8/setserial.8.gz
 usr/share/man/man8/tune2fs.8.gz
-var/cache/ldconfig/aux-cache
+@unexec rm -f %D/var/cache/ldconfig/aux-cache
 var/mail
 @dirrm bin
 @dirrm var/yp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310101612.r9AGCmWE020371>