aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2013-10-11 00:12:48 +0800
committerrene <rene@FreeBSD.org>2013-10-11 00:12:48 +0800
commit60fbfb3e15ccf5b47a248107a084cf055196747a (patch)
treee4a24a65c18ba9ddd9de367fe1a3c54a91079970
parent98b74f31d5910c92b9dac7c5f5094ea3bcd12be9 (diff)
downloadfreebsd-ports-graphics-60fbfb3e15ccf5b47a248107a084cf055196747a.tar.gz
freebsd-ports-graphics-60fbfb3e15ccf5b47a248107a084cf055196747a.tar.zst
freebsd-ports-graphics-60fbfb3e15ccf5b47a248107a084cf055196747a.zip
- 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.
-rw-r--r--emulators/linux_base-c6/Makefile38
-rw-r--r--emulators/linux_base-c6/pkg-plist8
2 files changed, 17 insertions, 29 deletions
diff --git a/emulators/linux_base-c6/Makefile b/emulators/linux_base-c6/Makefile
index 12b5630a960..b5e24096329 100644
--- a/emulators/linux_base-c6/Makefile
+++ b/emulators/linux_base-c6/Makefile
@@ -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}
+ @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 ${PREFIX}/usr/tmp
- @${CHOWN} root:wheel ${PREFIX}/var/lock ${PREFIX}/var/spool/mail
- @${CHMOD} 755 ${PREFIX}/var/lock ${PREFIX}/var/spool/mail
+ @${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>
diff --git a/emulators/linux_base-c6/pkg-plist b/emulators/linux_base-c6/pkg-plist
index b9f354838d3..8dc9374b8ab 100644
--- a/emulators/linux_base-c6/pkg-plist
+++ b/emulators/linux_base-c6/pkg-plist
@@ -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