summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta SATOH <nigoro@gentoo.gr.jp>2015-07-12 08:07:55 +0900
committerYuta SATOH <nigoro@gentoo.gr.jp>2015-07-12 08:07:55 +0900
commitb54c1fed2e973a321f5292b654e7a1934fee8770 (patch)
tree9adcd608c5e163929b34b928f0d260100e2bfb82 /scripts
parentadded sample script to automatic update. (diff)
downloadgentoo-bsd-b54c1fed2e973a321f5292b654e7a1934fee8770.tar.gz
gentoo-bsd-b54c1fed2e973a321f5292b654e7a1934fee8770.tar.bz2
gentoo-bsd-b54c1fed2e973a321f5292b654e7a1934fee8770.zip
stages_builder.sh: some issue fix.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkstages/stages_builder.sh76
1 files changed, 11 insertions, 65 deletions
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 3317cc7..3414edb 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -6,7 +6,7 @@ export WORKARCH="${WORKARCH:-$(uname -m)}"
export FORCESTAGE3="${FORCESTAGE3:-}"
export EXTRAOVERLAY="${EXTRAOVERLAY:-}"
OLDVER="${OLDVER:-9.0}"
-OVERLAY_SNAPSHOT="http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=snapshot;h=HEAD;sf=tgz"
+OVERLAY_SNAPSHOT="https://gitweb.gentoo.org/proj/gentoo-bsd.git/snapshot/gentoo-bsd-master.tar.gz"
prepare(){
local MAJORVER=`echo ${TARGETVER} | awk -F \. '{ print $1 }'`
@@ -68,7 +68,7 @@ prepare(){
echo "Clone gentoo-bsd overlay snapshot..."
type -P git
[[ $? -ne 0 ]] && emerge git
- git clone git://git.overlays.gentoo.org/proj/gentoo-bsd.git
+ git clone git://anongit.gentoo.org/proj/gentoo-bsd.git
[[ $? -ne 0 ]] && exit 1
fi
if [ -n "${EXTRAOVERLAY}" ] ; then
@@ -87,11 +87,8 @@ prepare(){
fi
echo "emerging catalyst..."
- PORTDIR_OVERLAY=${WORKDIR}/gentoo-bsd ACCEPT_KEYWORDS=~x86-fbsd emerge -uq app-cdr/cdrtools app-text/build-docbook-catalog dev-util/catalyst::gentoo-bsd || exit 1
- grep "^export MAKEOPTS" /etc/catalyst/catalystrc > /dev/null 2>&1
- if [ $? -ne 0 ] ; then
- echo "export MAKEOPTS=\"-j`sysctl hw.ncpu | awk '{ print $2 + 1 }'`"\" >> /etc/catalyst/catalystrc
- fi
+ PORTDIR_OVERLAY=${WORKDIR}/gentoo-bsd ACCEPT_KEYWORDS=~x86-fbsd emerge -uq app-cdr/cdrtools app-text/build-docbook-catalog || exit 1
+ PORTDIR_OVERLAY=${WORKDIR}/gentoo-bsd ACCEPT_KEYWORDS=~x86-fbsd emerge -q dev-util/catalyst::gentoo-bsd || exit 1
if [ ! -e /usr/portage/profiles/releases/freebsd-${TARGETVER} ] ; then
echo "prepare new ${TARGETVER} profiles"
@@ -107,35 +104,6 @@ prepare(){
_EOF_
fi
- if [ "${MKSRC}" != "NONE" ] ; then
- if [ "${MKSRC}" = "release" ] ; then
- MY_MKSRC=""
- else
- MY_MKSRC="_${MKSRC}"
- fi
- local DISTDIR="`emerge --info | grep DISTDIR | awk -F= '{print $2}' | sed 's:\"::g'`"
- if [[ ${MAJORVER} -ge 10 ]]; then
- local TAREXT=xz
- else
- local TAREXT=bz2
- fi
- if [ ! -e "${DISTDIR}/freebsd-lib-${TARGETVER}${MY_MKSRC}.tar.${TAREXT}" ] ; then
- echo "create src tarball"
- mkdir ${WORKDIR}/${TARGETVER}${MY_MKSRC}_src
- cd ${WORKDIR}/${TARGETVER}${MY_MKSRC}_src
- ${WORKDIR}/gentoo-bsd/scripts/extract-9.0.sh ${TARGETVER}${MY_MKSRC}
- mkdir -p "${DISTDIR}"
- mv *${TARGETVER}${MY_MKSRC}*${TAREXT} "${DISTDIR}/"
- fi
-
- ls -1 /usr/portage/sys-freebsd/freebsd-lib/freebsd-lib-${TARGETVER}*.ebuild > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
- create_manifest /usr/portage/sys-freebsd
- export WORKDATE="local"
- fi
- create_manifest ${WORKDIR}/gentoo-bsd/sys-freebsd
- fi
-
if [ "${WORKDATE}" = "remote" ] ; then
wget -q -O ${WORKDIR}/snapshot_list.html http://distfiles.gentoo.org/snapshots/
export WORKDATE=`grep -e 'portage-[0-9]\+.*bz2' ${WORKDIR}/snapshot_list.html | tail -n 1 | gsed 's:.*portage-\([0-9]\+\).*:\1:g'`
@@ -153,8 +121,10 @@ prepare(){
else
export WORKDATE="`date +%Y%m%d`"
fi
- else
+ elif [ "${WORKDATE}" = "local" ] ; then
export WORKDATE="`date +%Y%m%d`"
+ else
+ export WORKDATE="${WORKDATE}"
fi
if [ -n "${STABLE}" ] ; then
@@ -170,34 +140,6 @@ prepare(){
fi
}
-create_manifest(){
- local rootdir=$1
-
- if [ -d ${rootdir} ] ; then
- cd ${rootdir}
- echo "re-create Manifest"
- for dir in `ls -1 | grep freebsd-` boot0;
- do
- cd ${dir}
- ls -1 *${TARGETVER}*.ebuild > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
- EBUILDFILE=`ls -1 *${TARGETVER}*.ebuild | tail -n 1`
- echo "copy ${EBUILDFILE} to ${TARGETVER}${MY_MKSRC}.ebuild"
- cp ${EBUILDFILE} ${dir}-${TARGETVER}${MY_MKSRC}.ebuild
-
- ls -1 *.ebuild > /dev/null 2>&1
-
- if [ $? -eq 0 ] ; then
- EBUILDFILE=`ls -1 *.ebuild | tail -n 1`
- echo ${EBUILDFILE}
- ebuild ${EBUILDFILE} digest
- fi
- fi
- cd ..
- done
- fi
-}
-
check_ecompressdir() {
# dirty solution
# /dev is still mounted; performing auto-bind-umount...
@@ -297,6 +239,10 @@ if [ ! -e "/var/tmp/catalyst/snapshots/portage-${WORKDATE}.tar.bz2" ] ; then
catalyst -C target=snapshot version_stamp=${WORKDATE} || exit 1
fi
+if [ -e /var/tmp/catalyst/snapshot_cache/${WORKDATE}/portage/eclass/toolchain.eclass ] ; then
+ gsed -i 's:SLOT="${GCC_CONFIG_VER}":SLOT="${GCC_BRANCH_VER}":g' /var/tmp/catalyst/snapshot_cache/${WORKDATE}/portage/eclass/toolchain.eclass
+fi
+
mk_stages