Check-in [330b125360]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use proper ${HOME}/.ccache for CCACHE_DIR and fix usage of it
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 330b125360fcb1cd506ac0cc1301e4bf29d4e78d
User & Date: bdrewery 2013-05-25 14:42:10
Context
2013-05-26
01:26
jail: Add support for -m url= Submitted by: Will Andrews check-in: f6b53cdb63 user: bdrewery tags: trunk
2013-05-25
14:42
Use proper ${HOME}/.ccache for CCACHE_DIR and fix usage of it check-in: 330b125360 user: bdrewery tags: trunk
14:29
Mount CCACHE_DIR in /root/.ccache as not all ports pass MAKE_ENV into the build. I am testing various patches for bsd.port.mk to fix this and other WITH_CCACHE_BUILD issues, but for now workaround this in poudriere check-in: 80f2d8c237 user: bdrewery tags: trunk
Changes

Changes to src/share/poudriere/common.sh.

584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
...
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
...
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
...
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
...
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
...
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
		zfs snapshot ${fs}@${name}
	fi

	[ $domtree -eq 0 ] && return 0
	mkdir -p ${mnt}/poudriere/
	if [ "${name}" = "prepkg" ]; then
		cat > ${mnt}/poudriere/mtree.${name}exclude << EOF
./ccache/*
./compat/linux/proc
./dev/*
./distfiles/*
./new_packages/*
./packages/*
./poudriere/*
./proc/*
................................................................................
./usr/ports/*
./usr/src
./var/db/ports/*
./wrkdirs/*
EOF
	elif [ "${name}" = "prebuild" ]; then
		cat > ${mnt}/poudriere/mtree.${name}exclude << EOF
./ccache/*
./compat/linux/proc
./dev/*
./distfiles/*
./new_packages/*
./packages/*
./poudriere/*
./proc/*
................................................................................
./usr/src
./var/db/ports/*
./wrkdirs/*
EOF
	elif [ "${name}" = "preinst" ]; then
		cat >  ${mnt}/poudriere/mtree.${name}exclude << EOF
.${HOME}/*
./ccache/*
./compat/linux/proc/*
./dev/*
./distfiles/*
./etc/group
./etc/make.conf
./etc/make.conf.bak
./etc/master.passwd
................................................................................
		mkdir -p ${mnt}/compat/linux/proc
		mkdir -p ${mnt}/usr/ports
		mkdir -p ${mnt}/wrkdirs
		mkdir -p ${mnt}/${LOCALBASE:-/usr/local}
		mkdir -p ${mnt}/distfiles
		mkdir -p ${mnt}/packages
		mkdir -p ${mnt}/new_packages
		mkdir -p ${mnt}/ccache
		mkdir -p ${mnt}/var/db/ports
	fi

	# ref jail only needs devfs
	mount -t devfs devfs ${mnt}/dev
	devfs -m ${mnt}/dev rule apply hide
	for p in ${devfspath} ; do
................................................................................

	[ "$(realpath ${DISTFILES_CACHE})" != \
		"$(realpath -q ${portsdir}/distfiles)" ] || err 1 \
		"DISTFILES_CACHE cannot be in the portsdir as the portsdir will be mounted read-only"

	mkdir -p ${POUDRIERE_DATA}/packages/${MASTERNAME}/All
	[ -d "${CCACHE_DIR:-/nonexistent}" ] &&
		mount -t nullfs ${CCACHE_DIR} ${mnt}/root/.ccache
	[ -n "${MFSSIZE}" ] && mdmfs -M -S -o async -s ${MFSSIZE} md ${mnt}/wrkdirs
	[ ${TMPFS_WRKDIR} -eq 1 ] && mount -t tmpfs tmpfs ${mnt}/wrkdirs
	# Only show mounting messages once, not for every builder
	if [ ${mnt##*/} = "ref" ]; then
		[ -d "${CCACHE_DIR:-/nonexistent}" ] &&
			msg "Mounting ccache from: ${CCACHE_DIR}"
		msg "Mounting packages from: ${POUDRIERE_DATA}/packages/${MASTERNAME}"
................................................................................

	if [ -n "${POUDRIERE_BUILD_TYPE}" ]; then
		show_log_info
	fi

	if [ -d "${CCACHE_DIR:-/nonexistent}" ]; then
		echo "WITH_CCACHE_BUILD=yes" >> ${tomnt}/etc/make.conf
		echo "CCACHE_DIR=/root/.ccache" >> ${tomnt}/etc/make.conf
	fi
	echo "PACKAGES=/packages" >> ${tomnt}/etc/make.conf
	echo "DISTDIR=/distfiles" >> ${tomnt}/etc/make.conf

	setup_makeconf ${tomnt}/etc/make.conf ${name} ${ptname} ${setname}

	test -n "${RESOLV_CONF}" && cp -v "${RESOLV_CONF}" "${tomnt}/etc/"







|







 







|







 







|







 







|







 







|







 







|







584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
...
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
...
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
...
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
...
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
...
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
		zfs snapshot ${fs}@${name}
	fi

	[ $domtree -eq 0 ] && return 0
	mkdir -p ${mnt}/poudriere/
	if [ "${name}" = "prepkg" ]; then
		cat > ${mnt}/poudriere/mtree.${name}exclude << EOF
.${HOME}/.ccache/*
./compat/linux/proc
./dev/*
./distfiles/*
./new_packages/*
./packages/*
./poudriere/*
./proc/*
................................................................................
./usr/ports/*
./usr/src
./var/db/ports/*
./wrkdirs/*
EOF
	elif [ "${name}" = "prebuild" ]; then
		cat > ${mnt}/poudriere/mtree.${name}exclude << EOF
.${HOME}/.ccache/*
./compat/linux/proc
./dev/*
./distfiles/*
./new_packages/*
./packages/*
./poudriere/*
./proc/*
................................................................................
./usr/src
./var/db/ports/*
./wrkdirs/*
EOF
	elif [ "${name}" = "preinst" ]; then
		cat >  ${mnt}/poudriere/mtree.${name}exclude << EOF
.${HOME}/*
.${HOME}/.ccache/*
./compat/linux/proc/*
./dev/*
./distfiles/*
./etc/group
./etc/make.conf
./etc/make.conf.bak
./etc/master.passwd
................................................................................
		mkdir -p ${mnt}/compat/linux/proc
		mkdir -p ${mnt}/usr/ports
		mkdir -p ${mnt}/wrkdirs
		mkdir -p ${mnt}/${LOCALBASE:-/usr/local}
		mkdir -p ${mnt}/distfiles
		mkdir -p ${mnt}/packages
		mkdir -p ${mnt}/new_packages
		mkdir -p ${mnt}${HOME}/.ccache
		mkdir -p ${mnt}/var/db/ports
	fi

	# ref jail only needs devfs
	mount -t devfs devfs ${mnt}/dev
	devfs -m ${mnt}/dev rule apply hide
	for p in ${devfspath} ; do
................................................................................

	[ "$(realpath ${DISTFILES_CACHE})" != \
		"$(realpath -q ${portsdir}/distfiles)" ] || err 1 \
		"DISTFILES_CACHE cannot be in the portsdir as the portsdir will be mounted read-only"

	mkdir -p ${POUDRIERE_DATA}/packages/${MASTERNAME}/All
	[ -d "${CCACHE_DIR:-/nonexistent}" ] &&
		mount -t nullfs ${CCACHE_DIR} ${mnt}${HOME}/.ccache
	[ -n "${MFSSIZE}" ] && mdmfs -M -S -o async -s ${MFSSIZE} md ${mnt}/wrkdirs
	[ ${TMPFS_WRKDIR} -eq 1 ] && mount -t tmpfs tmpfs ${mnt}/wrkdirs
	# Only show mounting messages once, not for every builder
	if [ ${mnt##*/} = "ref" ]; then
		[ -d "${CCACHE_DIR:-/nonexistent}" ] &&
			msg "Mounting ccache from: ${CCACHE_DIR}"
		msg "Mounting packages from: ${POUDRIERE_DATA}/packages/${MASTERNAME}"
................................................................................

	if [ -n "${POUDRIERE_BUILD_TYPE}" ]; then
		show_log_info
	fi

	if [ -d "${CCACHE_DIR:-/nonexistent}" ]; then
		echo "WITH_CCACHE_BUILD=yes" >> ${tomnt}/etc/make.conf
		echo "CCACHE_DIR=${HOME}/.ccache" >> ${tomnt}/etc/make.conf
	fi
	echo "PACKAGES=/packages" >> ${tomnt}/etc/make.conf
	echo "DISTDIR=/distfiles" >> ${tomnt}/etc/make.conf

	setup_makeconf ${tomnt}/etc/make.conf ${name} ${ptname} ${setname}

	test -n "${RESOLV_CONF}" && cp -v "${RESOLV_CONF}" "${tomnt}/etc/"