* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-08-03 13:58 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-08-03 13:58 UTC (permalink / raw
To: gentoo-commits
commit: 83011ae7ae1c1b41c2cfa183aecc5c9ceb5e388d
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Fri Aug 3 13:57:40 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Fri Aug 3 13:57:40 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=83011ae7
added sample script to create new stages
---
scripts/mkstages/chroot_prepare_upgrade.sh | 27 ++++
scripts/mkstages/stages_builder.sh | 187 ++++++++++++++++++++++++++++
2 files changed, 214 insertions(+), 0 deletions(-)
diff --git a/scripts/mkstages/chroot_prepare_upgrade.sh b/scripts/mkstages/chroot_prepare_upgrade.sh
new file mode 100755
index 0000000..3938cc3
--- /dev/null
+++ b/scripts/mkstages/chroot_prepare_upgrade.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# fixes bug #412319
+emerge -q sys-devel/gcc-config
+gcc-config 1
+
+# fixes bug #413865
+emerge -q app-arch/libarchive
+
+# upgrade sys-freebsd packages
+rm /etc/make.profile
+ln -s ../usr/portage/profiles/default/bsd/fbsd/${TARGETARCH}/${TARGETVER} /etc/make.profile
+emerge -1q sys-freebsd/freebsd-mk-defs
+USE=build emerge -1q --nodeps sys-freebsd/freebsd-lib
+emerge -Cq sys-freebsd/boot0
+USE=symlink emerge -1q freebsd-bin freebsd-cddl freebsd-contrib freebsd-lib freebsd-libexec freebsd-mk-defs freebsd-pam-modules freebsd-sbin freebsd-share freebsd-ubin freebsd-usbin || exit
+
+# sys-libs/zlib will request ${CHOST}-gcc.
+# different ${CHOST}-gcc fails to install
+CHOST=${CATALYST_CHOST} emerge -q sys-devel/gcc || exit
+
+# libtool has the old CHOST. Need to be updated
+CHOST=${CATALYST_CHOST} emerge -q sys-devel/libtool || exit
+
+rm -rf /usr/local/portage.bsd-overlay
+gsed -i '/PORTDIR_OVERLAY=.*/d' /etc/make.conf
+touch /tmp/prepare_done
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
new file mode 100755
index 0000000..4184601
--- /dev/null
+++ b/scripts/mkstages/stages_builder.sh
@@ -0,0 +1,187 @@
+#!/bin/bash
+export TARGETVER="${TARGETVER:-9.1}"
+export MKSRC="${MKSRC:-beta1}"
+export WORKDATE="`date +%Y%m%d`"
+export ARCH="`uname -m`"
+OLDVER="9.0"
+OVERLAY_SNAPSHOT="http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=snapshot;h=HEAD;sf=tgz"
+
+prepare(){
+ if [ "$1" = "x86" ] || [ "${ARCH}" = "i386" ] ; then
+ export CATALYST_CHOST="i686-gentoo-freebsd${TARGETVER}"
+ export TARGETARCH="x86"
+ export TARGETSUBARCH="i686"
+ else
+ export CATALYST_CHOST="x86_64-gentoo-freebsd${TARGETVER}"
+ export TARGETARCH="amd64"
+ export TARGETSUBARCH="amd64"
+ fi
+
+ export WORKDIR="/tmp/mk_stages_${TARGETARCH}_${TARGETVER}"
+
+ if [ -e ${WORKDIR} ] ; then
+ echo "WORKDIR ${WORKDIR} is already exists."
+ echo "Please remove manually it."
+ echo ""
+ echo "chflags -R noschg ${WORKDIR} && rm -rf ${WORKDIR}"
+ exit 1
+ else
+ mkdir -p ${WORKDIR}
+ fi
+
+ if [ ! -e "/var/tmp/catalyst/builds/default" ] ; then
+ mkdir -p /var/tmp/catalyst/builds/default
+ fi
+
+ if [ ! -e "/var/tmp/catalyst/builds/default/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2" ] ; then
+ echo "Downloading aballier's ${TARGETSUBARCH} stage3 file..."
+ wget -q -P /var/tmp/catalyst/builds/default http://dev.gentoo.org/~aballier/fbsd${OLDVER}/${TARGETARCH}/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2
+ if [ $? -ne 0 ] ; then
+ exit 1
+ fi
+ fi
+
+ cd ${WORKDIR}
+ echo "Downloading gentoo-bsd overlay snapshot..."
+ wget -q -O bsd-overlay.tar.gz "${OVERLAY_SNAPSHOT}"
+ if [ $? -ne 0 ] ; then
+ exit 1
+ fi
+
+ if [ -e "${WORKDIR}/portage.bsd-overlay" ] ; then
+ rm -rf ${WORKDIR}/portage.bsd-overlay
+ fi
+
+ tar xzf bsd-overlay.tar.gz
+ mv gentoo-bsd-* ${WORKDIR}/portage.bsd-overlay
+
+ echo "emerging catalyst..."
+ PORTDIR_OVERLAY=${WORKDIR}/portage.bsd-overlay ACCEPT_KEYWORDS=~x86-fbsd emerge -uq =app-cdr/cdrtools-3.00 '<app-text/build-docbook-catalog-1.19' =dev-util/catalyst-2.0.10.1 =app-arch/libarchive-3.0.3 || 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
+
+ if [ ! -e /usr/portage/profiles/releases/freebsd-${TARGETVER} ] ; then
+ echo "prepare new ${TARGETVER} profiles"
+ cp -a ${WORKDIR}/portage.bsd-overlay/profiles/default/bsd/fbsd/amd64/${TARGETVER} /usr/portage/profiles/default/bsd/fbsd/amd64/
+ cp -a ${WORKDIR}/portage.bsd-overlay/profiles/default/bsd/fbsd/x86/${TARGETVER} /usr/portage/profiles/default/bsd/fbsd/x86/
+ cp -a ${WORKDIR}/portage.bsd-overlay/profiles/releases/freebsd-${TARGETVER} /usr/portage/profiles/releases/
+ fi
+
+ if [ -n "${MKSRC}" ] ; then
+ if [ "${MKSRC}" = "release" ] ; then
+ MY_MKSRC=""
+ else
+ MY_MKSRC="_${MKSRC}"
+ fi
+ if [ ! -e /usr/portage/distfiles/freebsd-lib-${TARGETVER}${MY_MKSRC}.tar.bz2 ] ; then
+ echo "create src tarball"
+ mkdir ${WORKDIR}/${TARGETVER}${MY_MKSRC}_src
+ cd ${WORKDIR}/${TARGETVER}${MY_MKSRC}_src
+ ${WORKDIR}/portage.bsd-overlay/scripts/extract-9.0.sh ${TARGETVER}${MY_MKSRC}
+ mv *${TARGETVER}${MY_MKSRC}*bz2 /usr/portage/distfiles/
+ fi
+
+ cd ${WORKDIR}/portage.bsd-overlay/sys-freebsd
+ echo "re-create Manifest"
+ for dir in `ls -1 | grep freebsd-` boot0;
+ do
+ cd ${dir}
+ gsed -i "/${TARGETVER}/d" Manifest
+ rm *8.1*.ebuild
+ ls -1 *.ebuild > /dev/null 2>&1
+
+ if [ $? -eq 0 ] ; then
+ EBUILDFILE=`ls -1 *.ebuild | head -n 1`
+ echo ${EBUILDFILE}
+ ebuild ${EBUILDFILE} digest
+ fi
+
+ cd ..
+ done
+ fi
+}
+
+upgrade_src_stage3(){
+ if [ -e ${WORKDIR}/stage3tmp ] ; then
+ chflags -R noschg ${WORKDIR}/stage3tmp
+ rm -rf ${WORKDIR}/stage3tmp
+ fi
+ mkdir ${WORKDIR}/stage3tmp
+ tar xjpf /var/tmp/catalyst/builds/default/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2 -C ${WORKDIR}/stage3tmp
+ mount -t devfs devfs ${WORKDIR}/stage3tmp/dev
+ mkdir ${WORKDIR}/stage3tmp/usr/portage
+ kldload nullfs
+ mount -t nullfs /usr/portage ${WORKDIR}/stage3tmp/usr/portage
+ mount -t nullfs /usr/portage/distfiles ${WORKDIR}/stage3tmp/usr/portage/distfiles
+
+ cp -a ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/chroot_prepare_upgrade.sh ${WORKDIR}/stage3tmp/tmp
+ cp -a ${WORKDIR}/portage.bsd-overlay ${WORKDIR}/stage3tmp/usr/local/
+ echo 'PORTDIR_OVERLAY="/usr/local/portage.bsd-overlay"' >> ${WORKDIR}/stage3tmp/etc/make.conf
+
+ if [ -e /etc/resolv.conf ]; then
+ cp /etc/resolv.conf ${WORKDIR}/stage3tmp/etc/
+ else
+ echo "nameserver 8.8.8.8" > ${WORKDIR}/stage3tmp/etc/resolv.conf
+ fi
+ chroot ${WORKDIR}/stage3tmp /tmp/chroot_prepare_upgrade.sh
+ umount ${WORKDIR}/stage3tmp/usr/portage/distfiles || exit 1
+ umount ${WORKDIR}/stage3tmp/usr/portage || exit 1
+ umount ${WORKDIR}/stage3tmp/dev || exit 1
+ if [ ! -e ${WORKDIR}/stage3tmp/tmp/prepare_done ] ; then
+ exit 1
+ fi
+ cd ${WORKDIR}/stage3tmp
+ tar cjpf /var/tmp/catalyst/builds/default/stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}.tar.bz2 .
+ cd ${WORKDIR}
+ chflags -R noschg ${WORKDIR}/stage3tmp
+ rm -rf ${WORKDIR}/stage3tmp
+}
+
+mk_stages_tmp() {
+ if [ "${OLDVER}" != "${TARGETVER}" ] ; then
+ local SOURCE_STAGE3="stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}"
+ else
+ local SOURCE_STAGE3="stage3-${TARGETSUBARCH}-freebsd-${OLDVER}"
+ fi
+
+ catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${SOURCE_STAGE3} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
+
+ local PID=`ps auxw | grep portage/bin/ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs`
+ kill -9 ${PID}
+ rm -rf /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/usr/local/portage || exit 1
+
+ catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${SOURCE_STAGE3} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+
+ ### Added when the library was upgraded
+ ln -s libmpfr.so.5 /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/tmp/stage1root/usr/lib/libmpfr.so.4 || exit 1
+
+
+ catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+}
+
+mk_stages(){
+ catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
+
+ local PID=`ps auxw | grep portage/bin/ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs`
+ kill -9 ${PID}
+ rm -rf /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}/usr/local/portage || exit 1
+
+ catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+
+ catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+}
+
+prepare
+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/builds/default/stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}.tar.bz2 ] && [ "${OLDVER}" != "${TARGETVER}" ] ; then
+ upgrade_src_stage3
+fi
+mk_stages_tmp
+mk_stages
+
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-08-25 1:24 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-08-25 1:24 UTC (permalink / raw
To: gentoo-commits
commit: f67c16998237645cee2d5e43b816c803d6dca47c
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Aug 25 01:22:08 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sat Aug 25 01:22:08 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=f67c1699
stages_builder.sh -- added code, catalyst after running of all, check whether ecompressdir running.
tested, create 9.1_rc1 stages on amd64-fbsd/x86-fbsd.
---
scripts/mkstages/stages_builder.sh | 70 ++++++++++++++++++++++++++++--------
1 files changed, 55 insertions(+), 15 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index c422076..e4a03e5 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -138,6 +138,20 @@ upgrade_src_stage3(){
rm -rf ${WORKDIR}/stage3tmp
}
+check_ecompressdir() {
+ # dirty solution
+ # /dev is still mounted; performing auto-bind-umount...
+ local PID=`ps auxw | grep portage/bin/ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs`
+ if [ -n "${PID}" ] ; then
+ echo "kill ecompressdir"
+ kill -9 ${PID}
+ rm -rf "/var/tmp/catalyst/tmp/default/$1" || exit 1
+ return 1
+ else
+ return 0
+ fi
+}
+
mk_stages_tmp() {
if [ "${OLDVER}" != "${TARGETVER}" ] ; then
local SOURCE_STAGE3="stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}"
@@ -146,32 +160,58 @@ mk_stages_tmp() {
fi
catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${SOURCE_STAGE3} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
-
- local PID=`ps auxw | grep portage/bin/ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs`
- kill -9 ${PID}
- rm -rf /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/usr/local/portage || exit 1
-
- catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${SOURCE_STAGE3} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ if [ $? -ne 0 ] ; then
+ check_ecompressdir "stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/usr/local/portage"
+ if [ $? -ne 0 ] ; then
+ catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${SOURCE_STAGE3} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ fi
+ fi
### Added when the library was upgraded
ln -s libmpfr.so.5 /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/tmp/stage1root/usr/lib/libmpfr.so.4 || exit 1
- catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
- catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
+ if [ $? -ne 0 ] ; then
+ check_ecompressdir "stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/usr/local/portage"
+ if [ $? -ne 0 ] ; then
+ catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ fi
+ fi
+
+ catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
+ if [ $? -ne 0 ] ; then
+ check_ecompressdir "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/usr/local/portage"
+ if [ $? -ne 0 ] ; then
+ catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ fi
+ fi
}
mk_stages(){
catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
+ if [ $? -ne 0 ] ; then
+ check_ecompressdir "stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}/usr/local/portage"
+ if [ $? -ne 0 ] ; then
+ catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ fi
+ fi
- local PID=`ps auxw | grep portage/bin/ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs`
- kill -9 ${PID}
- rm -rf /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}/usr/local/portage || exit 1
-
- catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
+ if [ $? -ne 0 ] ; then
+ check_ecompressdir "stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}/usr/local/portage"
+ if [ $? -ne 0 ] ; then
+ catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ fi
+ fi
- catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
- catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
+ if [ $? -ne 0 ] ; then
+ check_ecompressdir "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}/usr/local/portage"
+ if [ $? -ne 0 ] ; then
+ catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ fi
+ fi
}
prepare $1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-10-06 7:13 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-10-06 7:13 UTC (permalink / raw
To: gentoo-commits
commit: 8153c33158e0aad4bbdc9de788b70d867fd57032
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Oct 6 07:13:10 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sat Oct 6 07:13:10 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=8153c331
gfbsd stages builder, updated for latest portage tree
---
scripts/mkstages/chroot_prepare_upgrade.sh | 18 ++++++++++++++----
scripts/mkstages/stages_builder.sh | 6 ++++--
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/scripts/mkstages/chroot_prepare_upgrade.sh b/scripts/mkstages/chroot_prepare_upgrade.sh
index 3938cc3..89c01d6 100755
--- a/scripts/mkstages/chroot_prepare_upgrade.sh
+++ b/scripts/mkstages/chroot_prepare_upgrade.sh
@@ -1,15 +1,21 @@
#!/bin/bash
# fixes bug #412319
-emerge -q sys-devel/gcc-config
+emerge -q sys-devel/gcc-config || exit
gcc-config 1
# fixes bug #413865
-emerge -q app-arch/libarchive
+emerge -q app-arch/libarchive || exit
# upgrade sys-freebsd packages
-rm /etc/make.profile
-ln -s ../usr/portage/profiles/default/bsd/fbsd/${TARGETARCH}/${TARGETVER} /etc/make.profile
+emerge -q sys-apps/portage || exit
+emerge -q sys-devel/libtool || exit
+# fixes bug 425530
+emerge -q app-admin/eselect || exit
+
+rm /etc/make.profile /etc/portage/make.profile
+ln -s ../../usr/portage/profiles/default/bsd/fbsd/${TARGETARCH}/${TARGETVER} /etc/portage/make.profile
+
emerge -1q sys-freebsd/freebsd-mk-defs
USE=build emerge -1q --nodeps sys-freebsd/freebsd-lib
emerge -Cq sys-freebsd/boot0
@@ -22,6 +28,10 @@ CHOST=${CATALYST_CHOST} emerge -q sys-devel/gcc || exit
# libtool has the old CHOST. Need to be updated
CHOST=${CATALYST_CHOST} emerge -q sys-devel/libtool || exit
+# fixes bug 425530
+emerge -q app-admin/eselect || exit
+
rm -rf /usr/local/portage.bsd-overlay
gsed -i '/PORTDIR_OVERLAY=.*/d' /etc/make.conf
+gsed -i '/PORTDIR_OVERLAY=.*/d' /etc/portage/make.conf
touch /tmp/prepare_done
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index e4a03e5..0050e74 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -55,8 +55,10 @@ prepare(){
tar xzf bsd-overlay.tar.gz
mv gentoo-bsd-* ${WORKDIR}/portage.bsd-overlay
+ # <app-text/build-docbook-catalog-1.19, Bug 412201
+ # =app-arch/libarchive-3.0.3, Bug 421191
echo "emerging catalyst..."
- PORTDIR_OVERLAY=${WORKDIR}/portage.bsd-overlay ACCEPT_KEYWORDS=~x86-fbsd emerge -uq app-cdr/cdrtools '<app-text/build-docbook-catalog-1.19' =dev-util/catalyst-2.0.10.1 =app-arch/libarchive-3.0.3 || exit 1
+ PORTDIR_OVERLAY=${WORKDIR}/portage.bsd-overlay ACCEPT_KEYWORDS=~x86-fbsd emerge -uq app-cdr/cdrtools '<app-text/build-docbook-catalog-1.19' =dev-util/catalyst-2.0.11 =app-arch/libarchive-3.0.3 || 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
@@ -69,7 +71,7 @@ prepare(){
cp -a ${WORKDIR}/portage.bsd-overlay/profiles/releases/freebsd-${TARGETVER} /usr/portage/profiles/releases/
fi
- if [ -n "${MKSRC}" ] ; then
+ if [ "${MKSRC}" != "NONE" ] ; then
if [ "${MKSRC}" = "release" ] ; then
MY_MKSRC=""
else
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-10-12 15:25 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-10-12 15:25 UTC (permalink / raw
To: gentoo-commits
commit: d27f0560f584e5c0906240c5d1ec3a011ec2df01
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Fri Oct 12 15:04:50 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Fri Oct 12 15:04:50 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=d27f0560
updated gfbsd stages builder, bug fixes 436560, 437986 and using catalyst-2.0.11
---
scripts/mkstages/chroot_prepare_upgrade.sh | 25 +++++
scripts/mkstages/stages_builder.sh | 145 +++++++++++++++-------------
2 files changed, 101 insertions(+), 69 deletions(-)
diff --git a/scripts/mkstages/chroot_prepare_upgrade.sh b/scripts/mkstages/chroot_prepare_upgrade.sh
index 89c01d6..8224f05 100755
--- a/scripts/mkstages/chroot_prepare_upgrade.sh
+++ b/scripts/mkstages/chroot_prepare_upgrade.sh
@@ -1,5 +1,12 @@
#!/bin/bash
+if [ -e /etc/make.conf ] ; then
+ echo "MAKEOPTS=\"-j`sysctl hw.ncpu | awk '{ print $2 + 1 }'`"\" >> /etc/make.conf
+fi
+if [ -e /etc/portage/make.conf ] ; then
+ echo "MAKEOPTS=\"-j`sysctl hw.ncpu | awk '{ print $2 + 1 }'`"\" >> /etc/portage/make.conf
+fi
+
# fixes bug #412319
emerge -q sys-devel/gcc-config || exit
gcc-config 1
@@ -25,6 +32,24 @@ USE=symlink emerge -1q freebsd-bin freebsd-cddl freebsd-contrib freebsd-lib free
# different ${CHOST}-gcc fails to install
CHOST=${CATALYST_CHOST} emerge -q sys-devel/gcc || exit
+# fixes bug 436560
+fixes436560(){
+ local rootdir=$1
+
+ if [ -d "${rootdir}lib64" ] && [ -L "${rootdir}lib" ] ; then
+ rm "${rootdir}lib"
+ LD_LIBRARY_PATH="${rootdir}lib64" mv "${rootdir}lib64" "${rootdir}lib"
+ ln -s lib ${rootdir}lib64
+ fi
+}
+
+fixes436560 /
+fixes436560 /usr/
+fixes436560 /usr/local/
+
+emerge -q sys-apps/baselayout
+emerge -q sys-apps/portage || exit
+
# libtool has the old CHOST. Need to be updated
CHOST=${CATALYST_CHOST} emerge -q sys-devel/libtool || exit
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 0050e74..5ce92bc 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -1,13 +1,13 @@
#!/bin/bash
export TARGETVER="${TARGETVER:-9.1}"
-export MKSRC="${MKSRC:-rc1}"
+export MKSRC="${MKSRC:-rc2}"
export WORKDATE="`date +%Y%m%d`"
-export ARCH="`uname -m`"
+export WORKARCH="`uname -m`"
OLDVER="${OLDVER:-9.0}"
OVERLAY_SNAPSHOT="http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=snapshot;h=HEAD;sf=tgz"
prepare(){
- if [ "$1" = "x86" ] || [ "${ARCH}" = "i386" ] ; then
+ if [ "$1" = "x86" ] || [ "${WORKARCH}" = "i386" ] ; then
export CATALYST_CHOST="i686-gentoo-freebsd${TARGETVER}"
export TARGETARCH="x86"
export TARGETSUBARCH="i686"
@@ -42,18 +42,23 @@ prepare(){
fi
cd ${WORKDIR}
- echo "Downloading gentoo-bsd overlay snapshot..."
- wget -q -O bsd-overlay.tar.gz "${OVERLAY_SNAPSHOT}"
- if [ $? -ne 0 ] ; then
- exit 1
- fi
+ if [ -d "${HOME}/portage.bsd-overlay" ] ; then
+ echo "Copy from ${HOME}/portage.bsd-overlay to ${WORKDIR}/"
+ cp -a "${HOME}/portage.bsd-overlay" ${WORKDIR}/
+ else
+ echo "Downloading gentoo-bsd overlay snapshot..."
+ wget -q -O bsd-overlay.tar.gz "${OVERLAY_SNAPSHOT}"
+ if [ $? -ne 0 ] ; then
+ exit 1
+ fi
- if [ -e "${WORKDIR}/portage.bsd-overlay" ] ; then
- rm -rf ${WORKDIR}/portage.bsd-overlay
- fi
+ if [ -e "${WORKDIR}/portage.bsd-overlay" ] ; then
+ rm -rf ${WORKDIR}/portage.bsd-overlay
+ fi
- tar xzf bsd-overlay.tar.gz
- mv gentoo-bsd-* ${WORKDIR}/portage.bsd-overlay
+ tar xzf bsd-overlay.tar.gz
+ mv gentoo-bsd-* ${WORKDIR}/portage.bsd-overlay
+ fi
# <app-text/build-docbook-catalog-1.19, Bug 412201
# =app-arch/libarchive-3.0.3, Bug 421191
@@ -85,20 +90,41 @@ prepare(){
mv *${TARGETVER}${MY_MKSRC}*bz2 /usr/portage/distfiles/
fi
- cd ${WORKDIR}/portage.bsd-overlay/sys-freebsd
+ 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
+ fi
+ create_manifest ${WORKDIR}/portage.bsd-overlay/sys-freebsd
+ 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}
- gsed -i "/${TARGETVER}/d" Manifest
- ls -1 *.ebuild > /dev/null 2>&1
-
+ ls -1 *${TARGETVER}*.ebuild > /dev/null 2>&1
if [ $? -eq 0 ] ; then
- EBUILDFILE=`ls -1 *.ebuild | head -n 1`
- echo ${EBUILDFILE}
- ebuild ${EBUILDFILE} digest
+ gsed -i "/${TARGETVER}/d" Manifest
+ ls -1 *${TARGETVER}${MY_MKSRC}*.ebuild > /dev/null 2>&1
+ if [ $? -ne 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
+ fi
+
+ 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
@@ -154,66 +180,48 @@ check_ecompressdir() {
fi
}
-mk_stages_tmp() {
- if [ "${OLDVER}" != "${TARGETVER}" ] ; then
- local SOURCE_STAGE3="stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}"
- else
- local SOURCE_STAGE3="stage3-${TARGETSUBARCH}-freebsd-${OLDVER}"
- fi
+run_catalyst() {
+ local C_TARGET="$1"
+ local C_SOURCE="$2"
+ local C_APPEND_VERSION="$3"
- catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${SOURCE_STAGE3} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
if [ $? -ne 0 ] ; then
- check_ecompressdir "stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/usr/local/portage"
+ check_ecompressdir "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}/usr/local/portage"
if [ $? -ne 0 ] ; then
- catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${SOURCE_STAGE3} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
fi
fi
- ### Added when the library was upgraded
- ln -s libmpfr.so.5 /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/tmp/stage1root/usr/lib/libmpfr.so.4 || exit 1
+ if [ ! -e /var/tmp/catalyst/builds/default/${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 ] ; then
+ exit 1
+ fi
+}
+mk_stages() {
+ local C_TMP_APPEND_VERSION="t"
- catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
- if [ $? -ne 0 ] ; then
- check_ecompressdir "stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/usr/local/portage"
- if [ $? -ne 0 ] ; then
- catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
- fi
+ if [ "${OLDVER}" != "${TARGETVER}" ] ; then
+ local SOURCE_STAGE3="stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}"
+ else
+ local SOURCE_STAGE3="stage3-${TARGETSUBARCH}-freebsd-${OLDVER}"
fi
- catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
- if [ $? -ne 0 ] ; then
- check_ecompressdir "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t/usr/local/portage"
- if [ $? -ne 0 ] ; then
- catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE}t profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
- fi
- fi
-}
+ run_catalyst stage1 ${SOURCE_STAGE3} ${C_TMP_APPEND_VERSION}
-mk_stages(){
- catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
- if [ $? -ne 0 ] ; then
- check_ecompressdir "stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}/usr/local/portage"
- if [ $? -ne 0 ] ; then
- catalyst -C target=stage1 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}t subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
- fi
- fi
+ ### Added when the library was upgraded
+ ln -s libmpfr.so.5 /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}/tmp/stage1root/usr/lib/libmpfr.so.4
+ ln -s libmpc.so /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}/tmp/stage1root/usr/lib/libmpc.so.2
+ ln -s libmpc.so /var/tmp/catalyst/tmp/default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}/tmp/stage1root/usr/lib/libmpc.so.2.0.0
- catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
- if [ $? -ne 0 ] ; then
- check_ecompressdir "stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}/usr/local/portage"
- if [ $? -ne 0 ] ; then
- catalyst -C target=stage2 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
- fi
- fi
+ run_catalyst stage2 stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION} ${C_TMP_APPEND_VERSION}
+ run_catalyst stage3 stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION} ${C_TMP_APPEND_VERSION}
+
+
+ run_catalyst stage1 stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}
+ run_catalyst stage2 stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}
+ run_catalyst stage3 stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}
- catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
- if [ $? -ne 0 ] ; then
- check_ecompressdir "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}/usr/local/portage"
- if [ $? -ne 0 ] ; then
- catalyst -C target=stage3 version_stamp=fbsd-${TARGETVER}-${WORKDATE} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
- fi
- fi
}
prepare $1
@@ -227,6 +235,5 @@ if [ ! -e "/var/tmp/catalyst/builds/default/stage3tmp-${TARGETSUBARCH}-freebsd-$
echo "upgrade done"
fi
-mk_stages_tmp
mk_stages
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-10-13 9:33 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-10-13 9:33 UTC (permalink / raw
To: gentoo-commits
commit: 48327aea8fdad70836e2e79a8b1e83ce99fb963b
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Oct 13 08:49:46 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sat Oct 13 08:49:46 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=48327aea
stages_builder.sh -- Change the standard way to create stage3.
tested, create 9.1_rc2 stages on amd64-fbsd with 20121011 snapshot.
---
scripts/mkstages/stages_builder.sh | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 5ce92bc..08a1f0f 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -185,11 +185,16 @@ run_catalyst() {
local C_SOURCE="$2"
local C_APPEND_VERSION="$3"
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST}
+ if [ "${C_TARGET}" != "stage3" ] ; then
+ local C_APPEND_CHOST="chost=${CATALYST_CHOST}"
+ fi
+
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_CHOST}
+
if [ $? -ne 0 ] ; then
check_ecompressdir "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}/usr/local/portage"
if [ $? -ne 0 ] ; then
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay chost=${CATALYST_CHOST} || exit 1
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_CHOST} || exit 1
fi
fi
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-11-22 12:26 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-11-22 12:26 UTC (permalink / raw
To: gentoo-commits
commit: dd35f15f0ea80cc07f839b8b5a9a2f29731d4c50
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Thu Nov 22 11:45:08 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Thu Nov 22 11:45:08 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=dd35f15f
gfbsd stages builder, added the function that create stable + minimal unstable stages that I normally use.
---
scripts/mkstages/chroot_prepare_upgrade.sh | 9 ++++++++-
scripts/mkstages/minimal-fbsd-list | 24 ++++++++++++++++++++++++
scripts/mkstages/stages_builder.sh | 27 ++++++++++++++++++++++-----
3 files changed, 54 insertions(+), 6 deletions(-)
diff --git a/scripts/mkstages/chroot_prepare_upgrade.sh b/scripts/mkstages/chroot_prepare_upgrade.sh
index 8224f05..dee7991 100755
--- a/scripts/mkstages/chroot_prepare_upgrade.sh
+++ b/scripts/mkstages/chroot_prepare_upgrade.sh
@@ -6,7 +6,9 @@ fi
if [ -e /etc/portage/make.conf ] ; then
echo "MAKEOPTS=\"-j`sysctl hw.ncpu | awk '{ print $2 + 1 }'`"\" >> /etc/portage/make.conf
fi
-
+if [ -e /tmp/catalystrc ] ; then
+ source /tmp/catalystrc
+fi
# fixes bug #412319
emerge -q sys-devel/gcc-config || exit
gcc-config 1
@@ -56,6 +58,11 @@ CHOST=${CATALYST_CHOST} emerge -q sys-devel/libtool || exit
# fixes bug 425530
emerge -q app-admin/eselect || exit
+if [ -e /etc/portage/profile ] ; then
+ rm -rf /etc/portage/profile
+ rm /etc/portage/package.keywords
+fi
+
rm -rf /usr/local/portage.bsd-overlay
gsed -i '/PORTDIR_OVERLAY=.*/d' /etc/make.conf
gsed -i '/PORTDIR_OVERLAY=.*/d' /etc/portage/make.conf
diff --git a/scripts/mkstages/minimal-fbsd-list b/scripts/mkstages/minimal-fbsd-list
new file mode 100644
index 0000000..7ca109f
--- /dev/null
+++ b/scripts/mkstages/minimal-fbsd-list
@@ -0,0 +1,24 @@
+app-admin/eselect ~x86-fbsd
+app-arch/libarchive ~x86-fbsd
+dev-libs/libedit ~x86-fbsd
+dev-libs/libelf ~x86-fbsd
+dev-libs/libiconv ~x86-fbsd
+sys-apps/baselayout ~x86-fbsd
+sys-apps/more ~x86-fbsd
+sys-auth/openpam ~x86-fbsd
+sys-freebsd/boot0 ~x86-fbsd
+sys-freebsd/freebsd-bin ~x86-fbsd
+sys-freebsd/freebsd-cddl ~x86-fbsd
+sys-freebsd/freebsd-contrib ~x86-fbsd
+sys-freebsd/freebsd-lib ~x86-fbsd
+sys-freebsd/freebsd-libexec ~x86-fbsd
+sys-freebsd/freebsd-mk-defs ~x86-fbsd
+sys-freebsd/freebsd-pam-modules ~x86-fbsd
+sys-freebsd/freebsd-sbin ~x86-fbsd
+sys-freebsd/freebsd-shar ~x86-fbsd
+sys-freebsd/freebsd-share ~x86-fbsd
+sys-freebsd/freebsd-sources ~x86-fbsd
+sys-freebsd/freebsd-ubin ~x86-fbsd
+sys-freebsd/freebsd-usbin ~x86-fbsd
+sys-process/fuser-bsd ~x86-fbsd
+sys-process/pidof-bsd ~x86-fbsd
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 08a1f0f..6a8a86f 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -1,6 +1,6 @@
#!/bin/bash
export TARGETVER="${TARGETVER:-9.1}"
-export MKSRC="${MKSRC:-rc2}"
+export MKSRC="${MKSRC:-rc3}"
export WORKDATE="`date +%Y%m%d`"
export WORKARCH="`uname -m`"
OLDVER="${OLDVER:-9.0}"
@@ -63,7 +63,7 @@ prepare(){
# <app-text/build-docbook-catalog-1.19, Bug 412201
# =app-arch/libarchive-3.0.3, Bug 421191
echo "emerging catalyst..."
- PORTDIR_OVERLAY=${WORKDIR}/portage.bsd-overlay ACCEPT_KEYWORDS=~x86-fbsd emerge -uq app-cdr/cdrtools '<app-text/build-docbook-catalog-1.19' =dev-util/catalyst-2.0.11 =app-arch/libarchive-3.0.3 || exit 1
+ PORTDIR_OVERLAY=${WORKDIR}/portage.bsd-overlay ACCEPT_KEYWORDS=~x86-fbsd emerge -uq app-cdr/cdrtools '<app-text/build-docbook-catalog-1.19' dev-util/catalyst::gentoo-bsd =app-arch/libarchive-3.0.3 || 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
@@ -96,6 +96,13 @@ prepare(){
fi
create_manifest ${WORKDIR}/portage.bsd-overlay/sys-freebsd
fi
+
+ if [ -n "${STABLE}" ] ; then
+ echo "create stages, mixed stable ${TARGETARCH} and minimal ${TARGETARCH}-fbsd flag on"
+ mkdir -p ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile
+ cp -a ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/minimal-fbsd-list ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.keywords
+ echo "ACCEPT_KEYWORDS=\"-${TARGETARCH}-fbsd -~${TARGETARCH}-fbsd ${TARGETARCH}\"" > ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
+ fi
}
create_manifest(){
@@ -145,6 +152,12 @@ upgrade_src_stage3(){
cp -a ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/chroot_prepare_upgrade.sh ${WORKDIR}/stage3tmp/tmp
cp -a ${WORKDIR}/portage.bsd-overlay ${WORKDIR}/stage3tmp/usr/local/
+ if [ -e ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage ] ; then
+ cp -a ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/* ${WORKDIR}/stage3tmp/etc/portage/
+ fi
+ if [ -e /etc/catalyst/catalystrc ] ; then
+ cp -a /etc/catalyst/catalystrc ${WORKDIR}/stage3tmp/tmp
+ fi
echo 'PORTDIR_OVERLAY="/usr/local/portage.bsd-overlay"' >> ${WORKDIR}/stage3tmp/etc/make.conf
if [ -e /etc/resolv.conf ]; then
@@ -184,17 +197,21 @@ run_catalyst() {
local C_TARGET="$1"
local C_SOURCE="$2"
local C_APPEND_VERSION="$3"
+ local C_APPEND_OPT=""
if [ "${C_TARGET}" != "stage3" ] ; then
- local C_APPEND_CHOST="chost=${CATALYST_CHOST}"
+ C_APPEND_OPT="${C_APPEND_OPT} chost=${CATALYST_CHOST}"
+ fi
+ if [ -n "${STABLE}" ] ; then
+ C_APPEND_OPT="${C_APPEND_OPT} portage_confdir=${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage"
fi
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_CHOST}
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT}
if [ $? -ne 0 ] ; then
check_ecompressdir "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}/usr/local/portage"
if [ $? -ne 0 ] ; then
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_CHOST} || exit 1
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT} || exit 1
fi
fi
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-11-22 14:32 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-11-22 14:32 UTC (permalink / raw
To: gentoo-commits
commit: 6a0bfb7ed650a81cee7051471ad309b143ac2928
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Thu Nov 22 14:32:18 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Thu Nov 22 14:32:18 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=6a0bfb7e
gfbsd stages builder, some fix to the success of build stages
---
scripts/mkstages/chroot_prepare_upgrade.sh | 1 +
scripts/mkstages/minimal-fbsd-list | 1 +
scripts/mkstages/stages_builder.sh | 2 ++
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/scripts/mkstages/chroot_prepare_upgrade.sh b/scripts/mkstages/chroot_prepare_upgrade.sh
index dee7991..fe44c0b 100755
--- a/scripts/mkstages/chroot_prepare_upgrade.sh
+++ b/scripts/mkstages/chroot_prepare_upgrade.sh
@@ -61,6 +61,7 @@ emerge -q app-admin/eselect || exit
if [ -e /etc/portage/profile ] ; then
rm -rf /etc/portage/profile
rm /etc/portage/package.keywords
+ rm /etc/portage/package.use
fi
rm -rf /usr/local/portage.bsd-overlay
diff --git a/scripts/mkstages/minimal-fbsd-list b/scripts/mkstages/minimal-fbsd-list
index 7ca109f..2787328 100644
--- a/scripts/mkstages/minimal-fbsd-list
+++ b/scripts/mkstages/minimal-fbsd-list
@@ -3,6 +3,7 @@ app-arch/libarchive ~x86-fbsd
dev-libs/libedit ~x86-fbsd
dev-libs/libelf ~x86-fbsd
dev-libs/libiconv ~x86-fbsd
+net-misc/openssh ~x86-fbsd
sys-apps/baselayout ~x86-fbsd
sys-apps/more ~x86-fbsd
sys-auth/openpam ~x86-fbsd
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 6a8a86f..edf4410 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -102,6 +102,8 @@ prepare(){
mkdir -p ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile
cp -a ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/minimal-fbsd-list ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.keywords
echo "ACCEPT_KEYWORDS=\"-${TARGETARCH}-fbsd -~${TARGETARCH}-fbsd ${TARGETARCH}\"" > ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
+ echo "FEATURES=\"preserve-libs\"" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
+ echo "sys-apps/portage python3" > ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.use
fi
}
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-11-23 13:06 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-11-23 13:06 UTC (permalink / raw
To: gentoo-commits
commit: 98a488a3d379a2e2b2826ceed617c6cd8a3c33ab
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Fri Nov 23 12:58:47 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Fri Nov 23 12:58:47 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=98a488a3
gfbsd stages builder, added WORKDATE=remote, local, resume support
---
scripts/mkstages/minimal-fbsd-list | 8 +++-
scripts/mkstages/stages_builder.sh | 83 ++++++++++++++++++++++++++++--------
2 files changed, 72 insertions(+), 19 deletions(-)
diff --git a/scripts/mkstages/minimal-fbsd-list b/scripts/mkstages/minimal-fbsd-list
index 2787328..ad8d73c 100644
--- a/scripts/mkstages/minimal-fbsd-list
+++ b/scripts/mkstages/minimal-fbsd-list
@@ -2,7 +2,9 @@ app-admin/eselect ~x86-fbsd
app-arch/libarchive ~x86-fbsd
dev-libs/libedit ~x86-fbsd
dev-libs/libelf ~x86-fbsd
+dev-libs/libexecinfo ~x86-fbsd
dev-libs/libiconv ~x86-fbsd
+dev-libs/libvolume_id ~x86-fbsd
net-misc/openssh ~x86-fbsd
sys-apps/baselayout ~x86-fbsd
sys-apps/more ~x86-fbsd
@@ -15,11 +17,15 @@ sys-freebsd/freebsd-lib ~x86-fbsd
sys-freebsd/freebsd-libexec ~x86-fbsd
sys-freebsd/freebsd-mk-defs ~x86-fbsd
sys-freebsd/freebsd-pam-modules ~x86-fbsd
+sys-freebsd/freebsd-pf ~x86-fbsd
+sys-freebsd/freebsd-rescue ~x86-fbsd
sys-freebsd/freebsd-sbin ~x86-fbsd
-sys-freebsd/freebsd-shar ~x86-fbsd
sys-freebsd/freebsd-share ~x86-fbsd
sys-freebsd/freebsd-sources ~x86-fbsd
sys-freebsd/freebsd-ubin ~x86-fbsd
sys-freebsd/freebsd-usbin ~x86-fbsd
+sys-freebsd/ubin-wrappers ~x86-fbsd
+sys-freebsd/virtio-kmod ~x86-fbsd
+sys-fs/fuse4bsd ~x86-fbsd
sys-process/fuser-bsd ~x86-fbsd
sys-process/pidof-bsd ~x86-fbsd
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index edf4410..51b2721 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -1,18 +1,27 @@
#!/bin/bash
export TARGETVER="${TARGETVER:-9.1}"
export MKSRC="${MKSRC:-rc3}"
-export WORKDATE="`date +%Y%m%d`"
+export WORKDATE="${WORKDATE:-local}"
export WORKARCH="`uname -m`"
OLDVER="${OLDVER:-9.0}"
OVERLAY_SNAPSHOT="http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=snapshot;h=HEAD;sf=tgz"
prepare(){
+ if [ -n "${STABLE}" ] ; then
+ local MAJORVER=`echo ${TARGETVER} | awk -F \. '{ print $1 }'`
+ fi
+ if [ -n "${MAJORVER}" ] ; then
+ local CHOSTVER="${MAJORVER}.0"
+ else
+ local CHOSTVER="${TARGETVER}"
+ fi
+
if [ "$1" = "x86" ] || [ "${WORKARCH}" = "i386" ] ; then
- export CATALYST_CHOST="i686-gentoo-freebsd${TARGETVER}"
+ export CATALYST_CHOST="i686-gentoo-freebsd${CHOSTVER}"
export TARGETARCH="x86"
export TARGETSUBARCH="i686"
else
- export CATALYST_CHOST="x86_64-gentoo-freebsd${TARGETVER}"
+ export CATALYST_CHOST="x86_64-gentoo-freebsd${CHOSTVER}"
export TARGETARCH="amd64"
export TARGETSUBARCH="amd64"
fi
@@ -93,17 +102,46 @@ prepare(){
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}/portage.bsd-overlay/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'`
+ mkdir -p /var/tmp/catalyst/snapshots
+ if [ ! -e "/var/tmp/catalyst/snapshots/portage-${WORKDATE}.tar.bz2" ] ; then
+ wget -q -P /var/tmp/catalyst/snapshots "http://distfiles.gentoo.org/snapshots/portage-${WORKDATE}.tar.bz2"
+ if [ $? -ne 0 ] ; then
+ export WORKDATE="`date +%Y%m%d`"
+ fi
+ fi
+ elif [ "${WORKDATE}" = "resume" ] ; then
+ ls -1 /var/tmp/catalyst/snapshots/*bz2 > /dev/null 2>&1
+ if [ $? -eq 0 ] ; then
+ export WORKDATE="`ls -1 /var/tmp/catalyst/snapshots/*bz2 | tail -n 1 | gsed 's:.*portage-\([0-9]\+\).*:\1:g'`"
+ else
+ export WORKDATE="`date +%Y%m%d`"
+ fi
+ else
+ export WORKDATE="`date +%Y%m%d`"
+ fi
+
if [ -n "${STABLE}" ] ; then
echo "create stages, mixed stable ${TARGETARCH} and minimal ${TARGETARCH}-fbsd flag on"
mkdir -p ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile
cp -a ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/minimal-fbsd-list ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.keywords
- echo "ACCEPT_KEYWORDS=\"-${TARGETARCH}-fbsd -~${TARGETARCH}-fbsd ${TARGETARCH}\"" > ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
+ echo "ACCEPT_KEYWORDS=\"-${TARGETARCH}-fbsd -~${TARGETARCH}-fbsd ${TARGETARCH}\"" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
+ echo "CHOST=\"${CATALYST_CHOST}\"" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
echo "FEATURES=\"preserve-libs\"" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
- echo "sys-apps/portage python3" > ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.use
+ echo "sys-apps/portage python2" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.use
+
+ #fixes bug 443810
+ grep "app-editors/nano" /usr/portage/profiles/default/bsd/fbsd/packages > /dev/null 2>&1
+ if [ $? -ne 0 ] ; then
+ echo "*app-editors/nano" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/packages
+ fi
fi
}
@@ -201,24 +239,29 @@ run_catalyst() {
local C_APPEND_VERSION="$3"
local C_APPEND_OPT=""
- if [ "${C_TARGET}" != "stage3" ] ; then
- C_APPEND_OPT="${C_APPEND_OPT} chost=${CATALYST_CHOST}"
- fi
- if [ -n "${STABLE}" ] ; then
- C_APPEND_OPT="${C_APPEND_OPT} portage_confdir=${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage"
- fi
+ if [ ! -e /var/tmp/catalyst/builds/default/${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 ] ; then
+ if [ "${C_TARGET}" != "stage3" ] ; then
+ C_APPEND_OPT="${C_APPEND_OPT} chost=${CATALYST_CHOST}"
+ fi
+ if [ -n "${STABLE}" ] ; then
+ C_APPEND_OPT="${C_APPEND_OPT} portage_confdir=${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage"
+ fi
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT}
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT}
- if [ $? -ne 0 ] ; then
- check_ecompressdir "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}/usr/local/portage"
if [ $? -ne 0 ] ; then
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT} || exit 1
+ check_ecompressdir "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}/usr/local/portage"
+ if [ $? -ne 0 ] ; then
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT} || exit 1
+ fi
fi
- fi
- if [ ! -e /var/tmp/catalyst/builds/default/${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 ] ; then
- exit 1
+ if [ ! -e /var/tmp/catalyst/builds/default/${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 ] ; then
+ exit 1
+ fi
+ else
+ echo "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 is exist."
+ echo "skip the creation of ${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}"
fi
}
@@ -248,6 +291,10 @@ mk_stages() {
}
+if [ -e /etc/catalyst/catalystrc ] ; then
+ source /etc/catalyst/catalystrc
+fi
+
prepare $1
if [ ! -e "/var/tmp/catalyst/snapshots/portage-${WORKDATE}.tar.bz2" ] ; then
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-12-11 13:21 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-12-11 13:21 UTC (permalink / raw
To: gentoo-commits
commit: 91863da04ba7728f5358122c85d74e1798568697
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Tue Dec 11 13:08:38 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Tue Dec 11 13:08:38 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=91863da0
gfbsd stages builder, ready to build 9.1-RELEASE
---
scripts/mkstages/stages_builder.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 51b2721..3903c61 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -1,6 +1,6 @@
#!/bin/bash
export TARGETVER="${TARGETVER:-9.1}"
-export MKSRC="${MKSRC:-rc3}"
+export MKSRC="${MKSRC:-NONE}"
export WORKDATE="${WORKDATE:-local}"
export WORKARCH="`uname -m`"
OLDVER="${OLDVER:-9.0}"
@@ -155,7 +155,7 @@ create_manifest(){
do
cd ${dir}
ls -1 *${TARGETVER}*.ebuild > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
+ if [ "${MKSRC}" = "release" ] || [ $? -eq 0 ] ; then
gsed -i "/${TARGETVER}/d" Manifest
ls -1 *${TARGETVER}${MY_MKSRC}*.ebuild > /dev/null 2>&1
if [ $? -ne 0 ] ; then
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-12-12 11:34 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-12-12 11:34 UTC (permalink / raw
To: gentoo-commits
commit: 99b89767898efb04f172223f676fd81180134d8d
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Wed Dec 12 11:33:43 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Wed Dec 12 11:33:43 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=99b89767
gfbsd stages builder, fixed a conditional branch
tested, create 9.1-RELEASE stages on amd64-fbsd/x86-fbsd with 20121211 snapshot.
---
scripts/mkstages/stages_builder.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 3903c61..93251d6 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -155,7 +155,7 @@ create_manifest(){
do
cd ${dir}
ls -1 *${TARGETVER}*.ebuild > /dev/null 2>&1
- if [ "${MKSRC}" = "release" ] || [ $? -eq 0 ] ; then
+ if [[ "${MKSRC}" = "release" || $? -ne 0 ]] ; then
gsed -i "/${TARGETVER}/d" Manifest
ls -1 *${TARGETVER}${MY_MKSRC}*.ebuild > /dev/null 2>&1
if [ $? -ne 0 ] ; then
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-12-24 14:26 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-12-24 14:26 UTC (permalink / raw
To: gentoo-commits
commit: a0eba7ce25872c9960fc417b3b3267ba31ed3224
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Mon Dec 24 14:25:42 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Mon Dec 24 14:25:42 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=a0eba7ce
added cleanup-old-fbsd-list, old filelist 7.2, 8.0, and 8.2 related
---
scripts/mkstages/cleanup-old-fbsd-list | 112 ++++++++++++++++++++++++++++++++
1 files changed, 112 insertions(+), 0 deletions(-)
diff --git a/scripts/mkstages/cleanup-old-fbsd-list b/scripts/mkstages/cleanup-old-fbsd-list
new file mode 100644
index 0000000..ad715b4
--- /dev/null
+++ b/scripts/mkstages/cleanup-old-fbsd-list
@@ -0,0 +1,112 @@
+sys-freebsd/boot0/boot0-7.2.ebuild
+sys-freebsd/boot0/boot0-8.0.ebuild
+sys-freebsd/boot0/boot0-8.2.ebuild
+sys-freebsd/boot0/files/boot0-7.0-gentoo.patch
+sys-freebsd/boot0/files/boot0-8.2-zfsboot-makefile.patch
+sys-freebsd/freebsd-bin/files/freebsd-bin-6.0-flex-2.5.31.patch
+sys-freebsd/freebsd-bin/freebsd-bin-7.2.ebuild
+sys-freebsd/freebsd-bin/freebsd-bin-8.0.ebuild
+sys-freebsd/freebsd-bin/freebsd-bin-8.2.ebuild
+sys-freebsd/freebsd-cddl/files/freebsd-cddl-7.1-libpaths.patch
+sys-freebsd/freebsd-cddl/files/freebsd-cddl-7.1-xdr_header.patch
+sys-freebsd/freebsd-cddl/files/freebsd-cddl-8.0-libpaths.patch
+sys-freebsd/freebsd-cddl/files/freebsd-cddl-8.2-libpaths.patch
+sys-freebsd/freebsd-cddl/files/zvol.initd
+sys-freebsd/freebsd-cddl/freebsd-cddl-7.2.ebuild
+sys-freebsd/freebsd-cddl/freebsd-cddl-8.0.ebuild
+sys-freebsd/freebsd-cddl/freebsd-cddl-8.2.ebuild
+sys-freebsd/freebsd-contrib/freebsd-contrib-7.2.ebuild
+sys-freebsd/freebsd-contrib/freebsd-contrib-8.0.ebuild
+sys-freebsd/freebsd-contrib/freebsd-contrib-8.2.ebuild
+sys-freebsd/freebsd-lib/files/freebsd-lib-6.2-bluetooth.patch
+sys-freebsd/freebsd-lib/files/freebsd-lib-7.0-CVE-2008-1391.patch
+sys-freebsd/freebsd-lib/files/freebsd-lib-7.2-rtldnoload.patch
+sys-freebsd/freebsd-lib/files/freebsd-lib-8.0-log2.patch
+sys-freebsd/freebsd-lib/files/freebsd-lib-8.2-liblink.patch
+sys-freebsd/freebsd-lib/files/freebsd-lib-8.2-nlm_syscall.patch
+sys-freebsd/freebsd-lib/files/freebsd-lib-bsdxml.patch
+sys-freebsd/freebsd-lib/files/freebsd-lib-new_as.patch
+sys-freebsd/freebsd-lib/freebsd-lib-7.2-r1.ebuild
+sys-freebsd/freebsd-lib/freebsd-lib-8.0.ebuild
+sys-freebsd/freebsd-lib/freebsd-lib-8.2-r1.ebuild
+sys-freebsd/freebsd-libexec/files/freebsd-libexec-7.0-libfallback.patch
+sys-freebsd/freebsd-libexec/files/freebsd-libexec-7.2-pic.patch
+sys-freebsd/freebsd-libexec/files/freebsd-libexec-7.2-rtld7.patch
+sys-freebsd/freebsd-libexec/files/freebsd-libexec-7.2-rtldnoload.patch
+sys-freebsd/freebsd-libexec/files/freebsd-libexec-8.2-rtld.patch
+sys-freebsd/freebsd-libexec/files/freebsd-libexec-nossp.patch
+sys-freebsd/freebsd-libexec/files/freebsd-libexec-setXid.patch
+sys-freebsd/freebsd-libexec/files/ftpd.pamd
+sys-freebsd/freebsd-libexec/freebsd-libexec-7.2-r2.ebuild
+sys-freebsd/freebsd-libexec/freebsd-libexec-8.0.ebuild
+sys-freebsd/freebsd-libexec/freebsd-libexec-8.2-r1.ebuild
+sys-freebsd/freebsd-libexec/freebsd-libexec-8.2.ebuild
+sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gentoo.patch
+sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gnu.patch
+sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-8.0-gentoo.patch
+sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-8.0-gnu.patch
+sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-7.2.ebuild
+sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-8.0.ebuild
+sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-8.2.ebuild
+sys-freebsd/freebsd-pam-modules/files/freebsd-pam-modules-6.0-gentoo.patch
+sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-7.2.ebuild
+sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-8.0.ebuild
+sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-8.2.ebuild
+sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-libevent.patch
+sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-pcap_pollution.patch
+sys-freebsd/freebsd-pf/freebsd-pf-7.2.ebuild
+sys-freebsd/freebsd-pf/freebsd-pf-8.0.ebuild
+sys-freebsd/freebsd-pf/freebsd-pf-8.2.ebuild
+sys-freebsd/freebsd-rescue/files/freebsd-rescue-5.4-gentoo.patch
+sys-freebsd/freebsd-rescue/freebsd-rescue-7.2.ebuild
+sys-freebsd/freebsd-rescue/freebsd-rescue-8.0.ebuild
+sys-freebsd/freebsd-rescue/freebsd-rescue-8.2.ebuild
+sys-freebsd/freebsd-sbin/files/devd.conf
+sys-freebsd/freebsd-sbin/files/devd.initd
+sys-freebsd/freebsd-sbin/files/devd_queue
+sys-freebsd/freebsd-sbin/files/ipfw.confd
+sys-freebsd/freebsd-sbin/files/ipfw.initd
+sys-freebsd/freebsd-sbin/files/sysctl.initd
+sys-freebsd/freebsd-sbin/freebsd-sbin-7.2.ebuild
+sys-freebsd/freebsd-sbin/freebsd-sbin-8.0.ebuild
+sys-freebsd/freebsd-sbin/freebsd-sbin-8.2-r1.ebuild
+sys-freebsd/freebsd-share/files/freebsd-share-gnu-miscfiles.patch
+sys-freebsd/freebsd-share/freebsd-share-7.2-r1.ebuild
+sys-freebsd/freebsd-share/freebsd-share-8.0.ebuild
+sys-freebsd/freebsd-share/freebsd-share-8.2.ebuild
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-gentoo.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-werror.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-asm.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-binutils_link.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-subnet-route-pr40133.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-debug-O2.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-devfs7.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-ipv6.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-null.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-pipe.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-sparc64.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-zfs712.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-8.0-arpresolve_panic.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-8.0-gentoo.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-8.0-mf626.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-8.0-sparc64.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-8.0-werror.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-8.0-zfs.patch
+sys-freebsd/freebsd-sources/files/freebsd-sources-8.2-unix2.patch
+sys-freebsd/freebsd-sources/freebsd-sources-7.2-r3.ebuild
+sys-freebsd/freebsd-sources/freebsd-sources-8.0.ebuild
+sys-freebsd/freebsd-sources/freebsd-sources-8.2-r2.ebuild
+sys-freebsd/freebsd-ubin/files/freebsd-ubin-6.0-fixmakefiles.patch
+sys-freebsd/freebsd-ubin/files/freebsd-ubin-8.2-compress.patch
+sys-freebsd/freebsd-ubin/freebsd-ubin-7.2.ebuild
+sys-freebsd/freebsd-ubin/freebsd-ubin-8.0-r1.ebuild
+sys-freebsd/freebsd-ubin/freebsd-ubin-8.0.ebuild
+sys-freebsd/freebsd-ubin/freebsd-ubin-8.2-r1.ebuild
+sys-freebsd/freebsd-usbin/files/freebsd-usbin-7.0-nowrap.patch
+sys-freebsd/freebsd-usbin/files/freebsd-usbin-8.2-newsyslog.patch
+sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.0-libarchive.patch
+sys-freebsd/freebsd-usbin/files/mountd.patch
+sys-freebsd/freebsd-usbin/freebsd-usbin-7.2-r1.ebuild
+sys-freebsd/freebsd-usbin/freebsd-usbin-8.0-r1.ebuild
+sys-freebsd/freebsd-usbin/freebsd-usbin-8.2-r1.ebuild
+sys-freebsd/freebsd-usbin/freebsd-usbin-8.2-r2.ebuild
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2012-12-29 9:16 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2012-12-29 9:16 UTC (permalink / raw
To: gentoo-commits
commit: 6a5e666e45eb900b6dd230ad650871269d6470c7
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Dec 29 09:16:30 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sat Dec 29 09:16:30 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=6a5e666e
gfbsd stages builder, fixed bug 447808, 447810.
---
scripts/mkstages/chroot_prepare_upgrade.sh | 4 ++++
scripts/mkstages/stages_builder.sh | 17 ++++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/scripts/mkstages/chroot_prepare_upgrade.sh b/scripts/mkstages/chroot_prepare_upgrade.sh
index fe44c0b..298c7fb 100755
--- a/scripts/mkstages/chroot_prepare_upgrade.sh
+++ b/scripts/mkstages/chroot_prepare_upgrade.sh
@@ -9,6 +9,9 @@ fi
if [ -e /tmp/catalystrc ] ; then
source /tmp/catalystrc
fi
+# fixes bug #447810
+MAKEOPTS=-j1 emerge -q app-shells/bash || exit
+
# fixes bug #412319
emerge -q sys-devel/gcc-config || exit
gcc-config 1
@@ -62,6 +65,7 @@ if [ -e /etc/portage/profile ] ; then
rm -rf /etc/portage/profile
rm /etc/portage/package.keywords
rm /etc/portage/package.use
+ rm -rf /etc/portage/patches
fi
rm -rf /usr/local/portage.bsd-overlay
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 93251d6..e6285cd 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -96,6 +96,7 @@ prepare(){
mkdir ${WORKDIR}/${TARGETVER}${MY_MKSRC}_src
cd ${WORKDIR}/${TARGETVER}${MY_MKSRC}_src
${WORKDIR}/portage.bsd-overlay/scripts/extract-9.0.sh ${TARGETVER}${MY_MKSRC}
+ mkdir -p /usr/portage/distfiles
mv *${TARGETVER}${MY_MKSRC}*bz2 /usr/portage/distfiles/
fi
@@ -128,6 +129,12 @@ prepare(){
export WORKDATE="`date +%Y%m%d`"
fi
+ #fixes bug 447808
+ grep "python_targets_python2_7" /usr/portage/profiles/default/bsd/fbsd/make.defaults > /dev/null 2>&1
+ if [ $? -ne 0 ] ; then
+ gsed -i 's:BOOTSTRAP_USE="\(.*\)":BOOTSTRAP_USE="\1 python_targets_python2_7":g' /usr/portage/profiles/default/bsd/fbsd/make.defaults
+ fi
+
if [ -n "${STABLE}" ] ; then
echo "create stages, mixed stable ${TARGETARCH} and minimal ${TARGETARCH}-fbsd flag on"
mkdir -p ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile
@@ -142,6 +149,9 @@ prepare(){
if [ $? -ne 0 ] ; then
echo "*app-editors/nano" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/packages
fi
+ #fixes bug 447810
+ mkdir -p ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/patches/app-shells/bash
+ wget -q -O ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/patches/app-shells/bash/bash-4.2-redir-fbsd.patch "https://447810.bugs.gentoo.org/attachment.cgi?id=333210"
fi
}
@@ -155,12 +165,13 @@ create_manifest(){
do
cd ${dir}
ls -1 *${TARGETVER}*.ebuild > /dev/null 2>&1
- if [[ "${MKSRC}" = "release" || $? -ne 0 ]] ; then
+ if [ $? -eq 0 ] ; then
gsed -i "/${TARGETVER}/d" Manifest
ls -1 *${TARGETVER}${MY_MKSRC}*.ebuild > /dev/null 2>&1
- if [ $? -ne 0 ] ; then
+ if [[ "${MKSRC}" = "release" || $? -ne 0 ]] ; then
EBUILDFILE=`ls -1 *${TARGETVER}*.ebuild | tail -n 1`
echo "copy ${EBUILDFILE} to ${TARGETVER}${MY_MKSRC}.ebuild"
+ gsed -i '/cve-2012-4576.patch/d' ${EBUILDFILE}
cp ${EBUILDFILE} ${dir}-${TARGETVER}${MY_MKSRC}.ebuild
fi
@@ -206,7 +217,7 @@ upgrade_src_stage3(){
echo "nameserver 8.8.8.8" > ${WORKDIR}/stage3tmp/etc/resolv.conf
fi
chroot ${WORKDIR}/stage3tmp /tmp/chroot_prepare_upgrade.sh
- umount ${WORKDIR}/stage3tmp/usr/portage/distfiles || exit 1
+ umount ${WORKDIR}/stage3tmp/usr/portage/distfiles
umount ${WORKDIR}/stage3tmp/usr/portage || exit 1
umount ${WORKDIR}/stage3tmp/dev || exit 1
if [ ! -e ${WORKDIR}/stage3tmp/tmp/prepare_done ] ; then
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2013-03-09 16:20 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2013-03-09 16:20 UTC (permalink / raw
To: gentoo-commits
commit: ef230a77a6fc96b57928a8edb92244bb9f4c6413
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Mar 9 16:20:35 2013 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sat Mar 9 16:20:35 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=ef230a77
minimal-fbsd-list: updated
---
scripts/mkstages/minimal-fbsd-list | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/scripts/mkstages/minimal-fbsd-list b/scripts/mkstages/minimal-fbsd-list
index ad8d73c..35f6190 100644
--- a/scripts/mkstages/minimal-fbsd-list
+++ b/scripts/mkstages/minimal-fbsd-list
@@ -1,5 +1,6 @@
app-admin/eselect ~x86-fbsd
app-arch/libarchive ~x86-fbsd
+app-misc/getopt ~x86-fbsd
dev-libs/libedit ~x86-fbsd
dev-libs/libelf ~x86-fbsd
dev-libs/libexecinfo ~x86-fbsd
@@ -7,8 +8,10 @@ dev-libs/libiconv ~x86-fbsd
dev-libs/libvolume_id ~x86-fbsd
net-misc/openssh ~x86-fbsd
sys-apps/baselayout ~x86-fbsd
+sys-apps/flock ~x86-fbsd
sys-apps/more ~x86-fbsd
sys-auth/openpam ~x86-fbsd
+sys-block/eject-bsd ~x86-fbsd
sys-freebsd/boot0 ~x86-fbsd
sys-freebsd/freebsd-bin ~x86-fbsd
sys-freebsd/freebsd-cddl ~x86-fbsd
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2013-06-23 14:20 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2013-06-23 14:20 UTC (permalink / raw
To: gentoo-commits
commit: 147e9272ec50e62335b62e28f73cbc9934c3f145
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sun Jun 23 14:20:06 2013 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sun Jun 23 14:20:06 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=147e9272
gfbsd stages builder, added clang profile support.
---
scripts/mkstages/stages_builder.sh | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index e6285cd..97db9ca 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -27,6 +27,7 @@ prepare(){
fi
export WORKDIR="/tmp/mk_stages_${TARGETARCH}_${TARGETVER}"
+ [[ -n ${CLANG} ]] && WORKDIR="${WORKDIR}_clang"
if [ -e ${WORKDIR} ] ; then
echo "WORKDIR ${WORKDIR} is already exists."
@@ -69,10 +70,8 @@ prepare(){
mv gentoo-bsd-* ${WORKDIR}/portage.bsd-overlay
fi
- # <app-text/build-docbook-catalog-1.19, Bug 412201
- # =app-arch/libarchive-3.0.3, Bug 421191
echo "emerging catalyst..."
- PORTDIR_OVERLAY=${WORKDIR}/portage.bsd-overlay ACCEPT_KEYWORDS=~x86-fbsd emerge -uq app-cdr/cdrtools '<app-text/build-docbook-catalog-1.19' dev-util/catalyst::gentoo-bsd =app-arch/libarchive-3.0.3 || exit 1
+ PORTDIR_OVERLAY=${WORKDIR}/portage.bsd-overlay 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
@@ -129,12 +128,6 @@ prepare(){
export WORKDATE="`date +%Y%m%d`"
fi
- #fixes bug 447808
- grep "python_targets_python2_7" /usr/portage/profiles/default/bsd/fbsd/make.defaults > /dev/null 2>&1
- if [ $? -ne 0 ] ; then
- gsed -i 's:BOOTSTRAP_USE="\(.*\)":BOOTSTRAP_USE="\1 python_targets_python2_7":g' /usr/portage/profiles/default/bsd/fbsd/make.defaults
- fi
-
if [ -n "${STABLE}" ] ; then
echo "create stages, mixed stable ${TARGETARCH} and minimal ${TARGETARCH}-fbsd flag on"
mkdir -p ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile
@@ -256,14 +249,20 @@ run_catalyst() {
fi
if [ -n "${STABLE}" ] ; then
C_APPEND_OPT="${C_APPEND_OPT} portage_confdir=${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage"
+ else
+ if [ -e ${WORKDIR}/portage.bsd-overlay/etc/portage ] ; then
+ C_APPEND_OPT="${C_APPEND_OPT} portage_confdir=${WORKDIR}/portage.bsd-overlay/etc/portage"
+ fi
fi
-
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT}
+ if [ -n "${CLANG}" ] ; then
+ C_APPEND_PROFILE="/clang"
+ fi
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER}${C_APPEND_PROFILE} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT}
if [ $? -ne 0 ] ; then
check_ecompressdir "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}/usr/local/portage"
if [ $? -ne 0 ] ; then
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT} || exit 1
+ catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER}${C_APPEND_PROFILE} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/portage.bsd-overlay ${C_APPEND_OPT} || exit 1
fi
fi
@@ -277,8 +276,10 @@ run_catalyst() {
}
mk_stages() {
- local C_TMP_APPEND_VERSION="t"
-
+ if [ -n "${CLANG}" ] ; then
+ local C_CLANG_APPEND_VERSION="-cl"
+ fi
+ local C_TMP_APPEND_VERSION="${C_CLANG_APPEND_VERSION}t"
if [ "${OLDVER}" != "${TARGETVER}" ] ; then
local SOURCE_STAGE3="stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}"
else
@@ -296,9 +297,9 @@ mk_stages() {
run_catalyst stage3 stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION} ${C_TMP_APPEND_VERSION}
- run_catalyst stage1 stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}
- run_catalyst stage2 stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}
- run_catalyst stage3 stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}
+ run_catalyst stage1 stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION} ${C_CLANG_APPEND_VERSION}
+ run_catalyst stage2 stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_CLANG_APPEND_VERSION} ${C_CLANG_APPEND_VERSION}
+ run_catalyst stage3 stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_CLANG_APPEND_VERSION} ${C_CLANG_APPEND_VERSION}
}
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2013-07-29 11:41 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2013-07-29 11:41 UTC (permalink / raw
To: gentoo-commits
commit: dc262df199411359bfeb69a4d9381190ba2e88eb
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Mon Jul 29 11:40:52 2013 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Mon Jul 29 11:40:52 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=dc262df1
gfbsd stages builder, added FORCESTAGE3 env
---
scripts/mkstages/stages_builder.sh | 35 ++++++++++++++---------------------
1 file changed, 14 insertions(+), 21 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 97db9ca..183d2da 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -3,6 +3,7 @@ export TARGETVER="${TARGETVER:-9.1}"
export MKSRC="${MKSRC:-NONE}"
export WORKDATE="${WORKDATE:-local}"
export WORKARCH="`uname -m`"
+export FORCESTAGE3="${FORCESTAGE3:-}"
OLDVER="${OLDVER:-9.0}"
OVERLAY_SNAPSHOT="http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=snapshot;h=HEAD;sf=tgz"
@@ -11,9 +12,9 @@ prepare(){
local MAJORVER=`echo ${TARGETVER} | awk -F \. '{ print $1 }'`
fi
if [ -n "${MAJORVER}" ] ; then
- local CHOSTVER="${MAJORVER}.0"
+ export CHOSTVER="${MAJORVER}.0"
else
- local CHOSTVER="${TARGETVER}"
+ export CHOSTVER="${TARGETVER}"
fi
if [ "$1" = "x86" ] || [ "${WORKARCH}" = "i386" ] ; then
@@ -43,12 +44,10 @@ prepare(){
mkdir -p /var/tmp/catalyst/builds/default
fi
- if [ ! -e "/var/tmp/catalyst/builds/default/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2" ] ; then
+ if [ ! -e "/var/tmp/catalyst/builds/default/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2" ] && [ -z "${FORCESTAGE3}" ]; then
echo "Downloading aballier's ${TARGETSUBARCH} stage3 file..."
wget -q -P /var/tmp/catalyst/builds/default http://dev.gentoo.org/~aballier/fbsd${OLDVER}/${TARGETARCH}/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2
- if [ $? -ne 0 ] ; then
- exit 1
- fi
+ [[ $? -ne 0 ] && exit 1
fi
cd ${WORKDIR}
@@ -58,9 +57,7 @@ prepare(){
else
echo "Downloading gentoo-bsd overlay snapshot..."
wget -q -O bsd-overlay.tar.gz "${OVERLAY_SNAPSHOT}"
- if [ $? -ne 0 ] ; then
- exit 1
- fi
+ [[ $? -ne 0 ]] && exit 1
if [ -e "${WORKDIR}/portage.bsd-overlay" ] ; then
rm -rf ${WORKDIR}/portage.bsd-overlay
@@ -131,20 +128,17 @@ prepare(){
if [ -n "${STABLE}" ] ; then
echo "create stages, mixed stable ${TARGETARCH} and minimal ${TARGETARCH}-fbsd flag on"
mkdir -p ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile
- cp -a ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/minimal-fbsd-list ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.keywords
+ mkdir -p ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.keywords
+ cp -a ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/minimal-fbsd-list ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.keywords/
echo "ACCEPT_KEYWORDS=\"-${TARGETARCH}-fbsd -~${TARGETARCH}-fbsd ${TARGETARCH}\"" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
echo "CHOST=\"${CATALYST_CHOST}\"" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
+ echo 'CHOST_amd64_fbsd="${CHOST}"' >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
+ echo "CHOST_x86_fbsd=\"i686-gentoo-freebsd${CHOSTVER}\"" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
echo "FEATURES=\"preserve-libs\"" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/make.defaults
- echo "sys-apps/portage python2" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/package.use
- #fixes bug 443810
- grep "app-editors/nano" /usr/portage/profiles/default/bsd/fbsd/packages > /dev/null 2>&1
- if [ $? -ne 0 ] ; then
- echo "*app-editors/nano" >> ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/profile/packages
- fi
#fixes bug 447810
mkdir -p ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/patches/app-shells/bash
- wget -q -O ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/patches/app-shells/bash/bash-4.2-redir-fbsd.patch "https://447810.bugs.gentoo.org/attachment.cgi?id=333210"
+ wget -q -O ${WORKDIR}/portage.bsd-overlay/scripts/mkstages/etc/portage/patches/app-shells/bash/bash-4.2-fbsd-EINTR.patch "http://git.savannah.gnu.org/cgit/bash.git/patch/redir.c?id=208fdb509e072977ae7a621e916dfcd32c76047d"
fi
}
@@ -276,15 +270,14 @@ run_catalyst() {
}
mk_stages() {
- if [ -n "${CLANG}" ] ; then
- local C_CLANG_APPEND_VERSION="-cl"
- fi
+ [[ -n "${CLANG}" ]] && local C_CLANG_APPEND_VERSION="-cl"
local C_TMP_APPEND_VERSION="${C_CLANG_APPEND_VERSION}t"
if [ "${OLDVER}" != "${TARGETVER}" ] ; then
local SOURCE_STAGE3="stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}"
else
local SOURCE_STAGE3="stage3-${TARGETSUBARCH}-freebsd-${OLDVER}"
fi
+ [[ -n ${FORCESTAGE3} ]] && SOURCE_STAGE3="${FORCESTAGE3}"
run_catalyst stage1 ${SOURCE_STAGE3} ${C_TMP_APPEND_VERSION}
@@ -313,7 +306,7 @@ 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/builds/default/stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}.tar.bz2" ] && [ "${OLDVER}" != "${TARGETVER}" ] ; then
+if [ ! -e "/var/tmp/catalyst/builds/default/stage3tmp-${TARGETSUBARCH}-freebsd-${TARGETVER}.tar.bz2" ] && [ "${OLDVER}" != "${TARGETVER}" ] && [ -z "${FORCESTAGE3}" ]; then
upgrade_src_stage3
echo "upgrade done"
fi
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2013-08-29 13:46 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2013-08-29 13:46 UTC (permalink / raw
To: gentoo-commits
commit: 14559e6fb747d5c803d57b88f212b6e0aafd3158
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Thu Aug 29 11:08:10 2013 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Thu Aug 29 11:08:10 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=14559e6f
gfbsd stages builder, fix typo.
---
scripts/mkstages/stages_builder.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 183d2da..27b338d 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -47,7 +47,7 @@ prepare(){
if [ ! -e "/var/tmp/catalyst/builds/default/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2" ] && [ -z "${FORCESTAGE3}" ]; then
echo "Downloading aballier's ${TARGETSUBARCH} stage3 file..."
wget -q -P /var/tmp/catalyst/builds/default http://dev.gentoo.org/~aballier/fbsd${OLDVER}/${TARGETARCH}/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2
- [[ $? -ne 0 ] && exit 1
+ [[ $? -ne 0 ]] && exit 1
fi
cd ${WORKDIR}
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2014-10-28 12:03 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2014-10-28 12:03 UTC (permalink / raw
To: gentoo-commits
commit: b497f0699d949af24c21c638b2d30e54380e6db1
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Mon Oct 20 11:24:02 2014 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Mon Oct 20 11:24:02 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=b497f069
gfbsd stages builder, added update_seed=yes
---
scripts/mkstages/stages_builder.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 27b338d..82c7d32 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -76,9 +76,12 @@ prepare(){
if [ ! -e /usr/portage/profiles/releases/freebsd-${TARGETVER} ] ; then
echo "prepare new ${TARGETVER} profiles"
+ cp -a ${WORKDIR}/portage.bsd-overlay/profiles/arch/amd64-fbsd/clang /usr/portage/profiles/arch/amd64-fbsd/
cp -a ${WORKDIR}/portage.bsd-overlay/profiles/default/bsd/fbsd/amd64/${TARGETVER} /usr/portage/profiles/default/bsd/fbsd/amd64/
cp -a ${WORKDIR}/portage.bsd-overlay/profiles/default/bsd/fbsd/x86/${TARGETVER} /usr/portage/profiles/default/bsd/fbsd/x86/
cp -a ${WORKDIR}/portage.bsd-overlay/profiles/releases/freebsd-${TARGETVER} /usr/portage/profiles/releases/
+ echo "amd64-fbsd default/bsd/fbsd/amd64/${TARGETVER} dev" >> /usr/portage/profiles/profiles.desc
+ echo "x86-fbsd default/bsd/fbsd/x86/${TARGETVER} dev" >> /usr/portage/profiles/profiles.desc
fi
if [ "${MKSRC}" != "NONE" ] ; then
@@ -238,6 +241,9 @@ run_catalyst() {
local C_APPEND_OPT=""
if [ ! -e /var/tmp/catalyst/builds/default/${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 ] ; then
+ if [ "${C_TARGET}" = "stage1" ] ; then
+ C_APPEND_OPT="${C_APPEND_OPT} update_seed=yes"
+ fi
if [ "${C_TARGET}" != "stage3" ] ; then
C_APPEND_OPT="${C_APPEND_OPT} chost=${CATALYST_CHOST}"
fi
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2014-10-29 12:16 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2014-10-29 12:16 UTC (permalink / raw
To: gentoo-commits
commit: 86c82e0b35fba3367729496d2b028e43ba26307a
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Wed Oct 29 12:14:47 2014 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Wed Oct 29 12:14:47 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=86c82e0b
stages_builder.sh: ebuild-helpers/ecompressdir path update.
---
scripts/mkstages/stages_builder.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index f3021ca..09055d0 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -176,7 +176,7 @@ create_manifest(){
check_ecompressdir() {
# dirty solution
# /dev is still mounted; performing auto-bind-umount...
- local PID=`ps auxw | grep portage/bin/ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs`
+ local PID=`ps auxw | grep ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs`
if [ -n "${PID}" ] ; then
echo "kill ecompressdir"
kill -9 ${PID}
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2014-11-15 16:31 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2014-11-15 16:31 UTC (permalink / raw
To: gentoo-commits
commit: bd1e7006c588ac340805cf09736b33e8a12a7395
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Nov 15 12:07:34 2014 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sat Nov 15 12:07:34 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=bd1e7006
stages_builder.sh: added URL support, EXTRAOVERLAY
---
scripts/mkstages/stages_builder.sh | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 09055d0..a4eeff0 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -61,8 +61,18 @@ prepare(){
[[ $? -ne 0 ]] && exit 1
fi
if [ -n "${EXTRAOVERLAY}" ] ; then
- echo "Copy from ${EXTRAOVERLAY} to ${WORKDIR}/gentoo-bsd"
- cp -a ${EXTRAOVERLAY}/* ${WORKDIR}/gentoo-bsd/
+ if [[ "${EXTRAOVERLAY}" =~ ^http ]]; then
+ echo "Downloading extra overlay."
+ wget -q -O ${WORKDIR}/extraoverlay.tar.bz2 "${EXTRAOVERLAY}"
+ [[ $? -ne 0 ]] && exit 1
+ echo "Copy from ${WORKDIR}/extraoverlay to ${WORKDIR}/gentoo-bsd"
+ mkdir ${WORKDIR}/extraoverlay
+ tar xjf ${WORKDIR}/extraoverlay.tar.bz2 --strip-components=1 -C ${WORKDIR}/extraoverlay
+ cp -a ${WORKDIR}/extraoverlay/* ${WORKDIR}/gentoo-bsd/
+ else
+ echo "Copy from ${EXTRAOVERLAY} to ${WORKDIR}/gentoo-bsd"
+ cp -a ${EXTRAOVERLAY}/* ${WORKDIR}/gentoo-bsd/
+ fi
fi
echo "emerging catalyst..."
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2014-11-15 16:31 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2014-11-15 16:31 UTC (permalink / raw
To: gentoo-commits
commit: 093a6ac384d993ca66e78607bfce91923d57395c
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Nov 15 16:24:53 2014 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sat Nov 15 16:24:53 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=093a6ac3
stages_builder.sh: Add the code to download clang stage3.
---
scripts/mkstages/stages_builder.sh | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index a4eeff0..d95eb85 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -43,10 +43,21 @@ prepare(){
mkdir -p /var/tmp/catalyst/builds/default
fi
- if [ ! -e "/var/tmp/catalyst/builds/default/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2" ] && [ -z "${FORCESTAGE3}" ]; then
- echo "Downloading aballier's ${TARGETSUBARCH} stage3 file..."
- wget -q -P /var/tmp/catalyst/builds/default http://dev.gentoo.org/~aballier/fbsd${OLDVER}/${TARGETARCH}/stage3-${TARGETSUBARCH}-freebsd-${OLDVER}.tar.bz2
- [[ $? -ne 0 ]] && exit 1
+ if [ -z "${FORCESTAGE3}" ] ; then
+ if [ -z "${CLANG}" ] ; then
+ local oldstage3fn="stage3-${TARGETSUBARCH}-freebsd-${OLDVER}"
+ local oldstage3url="http://dev.gentoo.org/~aballier/fbsd${OLDVER}/${TARGETARCH}/${oldstage3fn}.tar.bz2"
+ else
+ local oldstage3fn="stage3-${TARGETSUBARCH}-clangfbsd-${OLDVER}"
+ local oldstage3url="http://dev.gentoo.org/~aballier/fbsd${OLDVER}/${TARGETARCH}/clang/${oldstage3fn}.tar.bz2"
+ fi
+
+ if [ ! -e "/var/tmp/catalyst/builds/default/${oldstage3fn}.tar.bz2" ] ; then
+ echo "Downloading aballier's ${TARGETSUBARCH} stage3 file..."
+ wget -q -P /var/tmp/catalyst/builds/default "${oldstage3url}"
+ [[ $? -ne 0 ]] && exit 1
+ export FORCESTAGE3="${oldstage3fn}"
+ fi
fi
cd ${WORKDIR}
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2014-11-16 7:44 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2014-11-16 7:44 UTC (permalink / raw
To: gentoo-commits
commit: 982c5145b50d15e4444755f9ff09f8f24d1aac59
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sun Nov 16 07:31:59 2014 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sun Nov 16 07:31:59 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=982c5145
stages_builder.sh: When check_ecompressdir fails, set update_seed=no
---
scripts/mkstages/stages_builder.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index d95eb85..856742a 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -236,6 +236,9 @@ run_catalyst() {
if [ $? -ne 0 ] ; then
check_ecompressdir "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}/usr/local/portage"
if [ $? -ne 0 ] ; then
+ if [ "${C_TARGET}" = "stage1" ] && [ "${C_SOURCE}" != "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}" ]; then
+ C_APPEND_OPT="${C_APPEND_OPT} update_seed=no"
+ fi
catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER}${C_APPEND_PROFILE} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/gentoo-bsd ${C_APPEND_OPT} || exit 1
fi
fi
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2015-02-12 15:09 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2015-02-12 15:09 UTC (permalink / raw
To: gentoo-commits
commit: 9bd0cc4e4d36f74120e6c938d9efe6e9889c2226
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Thu Feb 12 15:09:48 2015 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Thu Feb 12 15:09:48 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=9bd0cc4e
stages_builder.sh, move FORCESTAGE3 env. fixed issus that does not find a previous clang stage3.
---
scripts/mkstages/stages_builder.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 856742a..58af37e 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -56,8 +56,8 @@ prepare(){
echo "Downloading aballier's ${TARGETSUBARCH} stage3 file..."
wget -q -P /var/tmp/catalyst/builds/default "${oldstage3url}"
[[ $? -ne 0 ]] && exit 1
- export FORCESTAGE3="${oldstage3fn}"
fi
+ export FORCESTAGE3="${oldstage3fn}"
fi
cd ${WORKDIR}
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2015-02-13 11:27 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2015-02-13 11:27 UTC (permalink / raw
To: gentoo-commits
commit: 29986d119cb7fa2a16b06649ac0e1e4e20281b9b
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Fri Feb 13 11:27:44 2015 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Fri Feb 13 11:27:44 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=29986d11
stages_builder.sh, Change to the method of using catalyst spec, fixed CXXFLAGS of CLANG stages
---
scripts/mkstages/stages_builder.sh | 36 ++++++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 58af37e..3317cc7 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -99,8 +99,12 @@ prepare(){
cp -a ${WORKDIR}/gentoo-bsd/profiles/default/bsd/fbsd/amd64/${TARGETVER} /usr/portage/profiles/default/bsd/fbsd/amd64/
cp -a ${WORKDIR}/gentoo-bsd/profiles/default/bsd/fbsd/x86/${TARGETVER} /usr/portage/profiles/default/bsd/fbsd/x86/
cp -a ${WORKDIR}/gentoo-bsd/profiles/releases/freebsd-${TARGETVER} /usr/portage/profiles/releases/
- echo "amd64-fbsd default/bsd/fbsd/amd64/${TARGETVER} dev" >> /usr/portage/profiles/profiles.desc
- echo "x86-fbsd default/bsd/fbsd/x86/${TARGETVER} dev" >> /usr/portage/profiles/profiles.desc
+
+ cat <<- _EOF_ >> /usr/portage/profiles/profiles.desc
+ amd64-fbsd default/bsd/fbsd/amd64/${TARGETVER} dev
+ amd64-fbsd default/bsd/fbsd/amd64/${TARGETVER}/clang dev
+ x86-fbsd default/bsd/fbsd/x86/${TARGETVER} dev
+ _EOF_
fi
if [ "${MKSRC}" != "NONE" ] ; then
@@ -215,23 +219,39 @@ run_catalyst() {
local C_APPEND_OPT=""
if [ ! -e /var/tmp/catalyst/builds/default/${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 ] ; then
+ local specfile="${WORKDIR}/${C_TARGET}.spec"
+ [[ -e "${specfile}" ]] && rm "${specfile}"
+
if [ "${C_TARGET}" = "stage1" ] && [ "${C_SOURCE}" != "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}" ]; then
- C_APPEND_OPT="${C_APPEND_OPT} update_seed=yes"
+ echo "update_seed: yes" >> "${specfile}"
fi
if [ "${C_TARGET}" != "stage3" ] ; then
- C_APPEND_OPT="${C_APPEND_OPT} chost=${CATALYST_CHOST}"
+ echo "chost: ${CATALYST_CHOST}" >> "${specfile}"
fi
if [ -n "${STABLE}" ] ; then
- C_APPEND_OPT="${C_APPEND_OPT} portage_confdir=${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage"
+ echo "portage_confdir: ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage" >> "${specfile}"
else
if [ -e ${WORKDIR}/gentoo-bsd/etc/portage ] ; then
- C_APPEND_OPT="${C_APPEND_OPT} portage_confdir=${WORKDIR}/gentoo-bsd/etc/portage"
+ echo "portage_confdir: ${WORKDIR}/gentoo-bsd/etc/portage" >> "${specfile}"
fi
fi
if [ -n "${CLANG}" ] ; then
C_APPEND_PROFILE="/clang"
+ echo 'cxxflags: -stdlib=libc++ ${CFLAGS}' >> "${specfile}"
fi
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER}${C_APPEND_PROFILE} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/gentoo-bsd ${C_APPEND_OPT}
+
+ cat <<- _EOF_ >> "${specfile}"
+ target: ${C_TARGET}
+ version_stamp: fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}
+ profile: default/bsd/fbsd/${TARGETARCH}/${TARGETVER}${C_APPEND_PROFILE}
+ snapshot: ${WORKDATE}
+ source_subpath: default/${C_SOURCE}
+ subarch: ${TARGETSUBARCH}
+ rel_type: default
+ portage_overlay: ${WORKDIR}/gentoo-bsd
+ _EOF_
+
+ catalyst -f "${specfile}"
if [ $? -ne 0 ] ; then
check_ecompressdir "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}/usr/local/portage"
@@ -239,7 +259,7 @@ run_catalyst() {
if [ "${C_TARGET}" = "stage1" ] && [ "${C_SOURCE}" != "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}" ]; then
C_APPEND_OPT="${C_APPEND_OPT} update_seed=no"
fi
- catalyst -C target=${C_TARGET} version_stamp=fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION} profile=default/bsd/fbsd/${TARGETARCH}/${TARGETVER}${C_APPEND_PROFILE} snapshot=${WORKDATE} source_subpath=default/${C_SOURCE} subarch=${TARGETSUBARCH} rel_type=default portage_overlay=${WORKDIR}/gentoo-bsd ${C_APPEND_OPT} || exit 1
+ catalyst -f "${specfile}" ${C_APPEND_OPT}
fi
fi
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2015-07-11 23:32 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2015-07-11 23:32 UTC (permalink / raw
To: gentoo-commits
commit: b54c1fed2e973a321f5292b654e7a1934fee8770
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Jul 11 23:07:55 2015 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Sat Jul 11 23:07:55 2015 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=b54c1fed
stages_builder.sh: some issue fix.
scripts/mkstages/stages_builder.sh | 76 ++++++--------------------------------
1 file 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
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2015-07-12 4:43 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2015-07-12 4:43 UTC (permalink / raw
To: gentoo-commits
commit: 6bb2b0d6c1f288c71cf95941e06efc4d75031563
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sun Jul 12 03:56:36 2015 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Sun Jul 12 03:56:36 2015 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=6bb2b0d6
stages_builder.sh: When it contains forcestage3 in FORCESTAGE3, disables update_seed.
scripts/mkstages/stages_builder.sh | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 3414edb..f8e4a79 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -66,10 +66,10 @@ prepare(){
cp -a "${HOME}/gentoo-bsd" ${WORKDIR}/
else
echo "Clone gentoo-bsd overlay snapshot..."
- type -P git
- [[ $? -ne 0 ]] && emerge git
- git clone git://anongit.gentoo.org/proj/gentoo-bsd.git
+ wget -q -O "${WORKDIR}"/gentoo-bsd.tar.gz "${OVERLAY_SNAPSHOT}"
[[ $? -ne 0 ]] && exit 1
+ mkdir -p ${WORKDIR}/gentoo-bsd
+ tar xzf "${WORKDIR}"/gentoo-bsd.tar.gz --strip-components=1 -C "${WORKDIR}/gentoo-bsd"
fi
if [ -n "${EXTRAOVERLAY}" ] ; then
if [[ "${EXTRAOVERLAY}" =~ ^http ]]; then
@@ -142,7 +142,7 @@ prepare(){
check_ecompressdir() {
# dirty solution
- # /dev is still mounted; performing auto-bind-umount...
+ # /dev is still mounted; performing auto-bind-umount...
local PID=`ps auxw | grep ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs`
if [ -n "${PID}" ] ; then
echo "kill ecompressdir"
@@ -164,7 +164,7 @@ run_catalyst() {
local specfile="${WORKDIR}/${C_TARGET}.spec"
[[ -e "${specfile}" ]] && rm "${specfile}"
- if [ "${C_TARGET}" = "stage1" ] && [ "${C_SOURCE}" != "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}" ]; then
+ if [ "${C_TARGET}" = "stage1" ] && [ "${C_SOURCE}" != "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}" ] && [[ ! "${C_SOURCE}" =~ .*forcestage3.* ]]; then
echo "update_seed: yes" >> "${specfile}"
fi
if [ "${C_TARGET}" != "stage3" ] ; then
@@ -190,9 +190,12 @@ run_catalyst() {
source_subpath: default/${C_SOURCE}
subarch: ${TARGETSUBARCH}
rel_type: default
- portage_overlay: ${WORKDIR}/gentoo-bsd
_EOF_
+ if [ ! -n "${NOOVERLAY}" ] ; then
+ echo "portage_overlay: ${WORKDIR}/gentoo-bsd" >> "${specfile}"
+ fi
+
catalyst -f "${specfile}"
if [ $? -ne 0 ] ; then
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2015-07-12 4:43 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2015-07-12 4:43 UTC (permalink / raw
To: gentoo-commits
commit: 988ba7cc9b1f74d8657a1248524af4fabeafdc7c
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sun Jul 12 04:43:16 2015 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Sun Jul 12 04:43:16 2015 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=988ba7cc
create_forcestage3.sh: added sample script.
scripts/mkstages/create_forcestage3.sh | 107 +++++++++++++++++++++++++++++++++
1 file changed, 107 insertions(+)
diff --git a/scripts/mkstages/create_forcestage3.sh b/scripts/mkstages/create_forcestage3.sh
new file mode 100644
index 0000000..0d8954e
--- /dev/null
+++ b/scripts/mkstages/create_forcestage3.sh
@@ -0,0 +1,107 @@
+#!/bin/bash
+set -eu
+
+TARGETVER="${TARGETVER:-10.1}"
+TARGETARCH="${TARGETARCH:-amd64}"
+OLDSTAGE3="${OLDSTAGE3:-http://distfiles.gentoo.org/experimental/bsd/freebsd/stages/amd64-fbsd-9.1/stage3-amd64-freebsd-9.1.tar.bz2}"
+WORKDIR="/${TARGETVER}-forcestage3/${TARGETARCH}"
+PORTDIR="${PORTDIR:-/usr/portage}"
+TMPFS=${TMPFS:-0}
+CLANG=${CLANG:-0}
+[[ ${CLANG} -ne 0 ]] && WORKDIR="${WORKDIR}_clang"
+
+prepare(){
+ local distdir="$(emerge --info | grep DISTDIR | sed s:DISTDIR=::g | sed 's:"::g')"
+ if [[ ! -d "${WORKDIR}" ]]; then
+ mkdir -p "${WORKDIR}"
+ fi
+
+ if [[ "${OLDSTAGE3}" =~ ^http ]]; then
+ wget -P /tmp "${OLDSTAGE3}"
+ else
+ cp "${OLDSTAGE3}" /tmp
+ fi
+
+ tar xjpf /tmp/$(basename ${OLDSTAGE3}) -C "${WORKDIR}"
+
+ mkdir -p "${WORKDIR}"/usr/portage/distfiles
+ mkdir -p "${WORKDIR}"/var/tmp/portage
+
+ mount -t devfs devfs "${WORKDIR}"/dev
+ mount -t nullfs "${PORTDIR}" "${WORKDIR}"/usr/portage
+ if [[ ! "${distdir}" =~ ${PORTDIR}.* ]]; then
+ echo "mount DISTDIR"
+ mount -t nullfs "${WORKDIR}"/usr/portage/distfiles
+ fi
+ if [[ "${TMPFS}" -ne 0 ]] ; then
+ echo "mount TMPFS"
+ mount -t tmpfs tmpfs "${WORKDIR}"/var/tmp/portage
+ fi
+ wget -P "${WORKDIR}" https://gitweb.gentoo.org/proj/gentoo-bsd.git/plain/scripts/automatic_updater.sh
+ cp /etc/resolv.conf "${WORKDIR}"/etc
+}
+
+chroot_update(){
+ if [[ -e "${WORKDIR}"/etc/make.conf ]]; then
+ local makeconf="${WORKDIR}"/etc/make.conf
+ else
+ local makeconf="${WORKDIR}"/etc/portage/make.conf
+ fi
+
+ echo "MAKEOPTS=\"-j$(sysctl hw.ncpu | awk '{ print $2 + 1 }')"\" >> "${makeconf}"
+ echo 'USE="${USE} -fortran -build-kernel"' >> "${makeconf}"
+
+ export EMERGE_DEFAULT_OPTS="-q"
+ chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} kernel
+ chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} freebsd_userland
+ chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} world
+ unset EMERGE_DEFAULT_OPTS
+}
+
+check_ecompressdir() {
+ # dirty solution
+ # /dev is still mounted; performing auto-bind-umount...
+ local PID=$(ps auxw | grep ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs)
+ if [[ -n "${PID}" ]] ; then
+ echo "kill ecompressdir"
+ kill -9 ${PID} && :
+ return 0
+ else
+ return 0
+ fi
+}
+
+cleanup(){
+ check_ecompressdir
+ umount "${WORKDIR}"/usr/portage/distfiles
+ umount "${WORKDIR}"/usr/portage
+ if [[ "${TMPFS}" -ne 0 ]] ; then
+ umount "${WORKDIR}"/var/tmp/portage
+ fi
+ umount "${WORKDIR}"/dev
+}
+
+create_stage3(){
+ local tarfile
+
+ cd "${WORKDIR}"
+ if [[ ! -e /var/tmp/catalyst/builds/default ]] ; then
+ mkdir -p /var/tmp/catalyst/builds/default
+ fi
+ if [[ ${CLANG} -ne 0 ]]; then
+ tarfile="stage3-${TARGETARCH}-fbsd-${TAGETVER}-forcestage3-cl"
+ else
+ tarfile="stage3-${TARGETARCH}-fbsd-${TAGETVER}-forcestage3"
+ fi
+
+ tar cjpf /var/tmp/catalyst/builds/default/"${tarfile}".tar.bz2 .
+
+ echo "Complete !"
+ echo "Set FORCESTAGE3=${tarfile}"
+}
+
+prepare
+chroot_update
+cleanup
+create_stage3
+
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2015-07-12 7:49 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2015-07-12 7:49 UTC (permalink / raw
To: gentoo-commits
commit: 02f6bb63dd00fdd5181b885746f8bbf9e2abc7b5
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sun Jul 12 07:49:47 2015 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Sun Jul 12 07:49:47 2015 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=02f6bb63
create_forcestage3.sh: added check OLDSTAGE3 file exists.
scripts/mkstages/create_forcestage3.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/mkstages/create_forcestage3.sh b/scripts/mkstages/create_forcestage3.sh
index 0d8954e..e30be09 100644
--- a/scripts/mkstages/create_forcestage3.sh
+++ b/scripts/mkstages/create_forcestage3.sh
@@ -17,7 +17,9 @@ prepare(){
fi
if [[ "${OLDSTAGE3}" =~ ^http ]]; then
- wget -P /tmp "${OLDSTAGE3}"
+ if [[ ! -e $(basename ${OLDSTAGE3}) ]]; then
+ wget -P /tmp "${OLDSTAGE3}"
+ fi
else
cp "${OLDSTAGE3}" /tmp
fi
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2015-07-12 7:55 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2015-07-12 7:55 UTC (permalink / raw
To: gentoo-commits
commit: 3d0f050caab91226fe78eff4665c0b7c627e8dab
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sun Jul 12 07:55:50 2015 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Sun Jul 12 07:55:50 2015 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=3d0f050c
create_forcestage3.sh: added /tmp.
scripts/mkstages/create_forcestage3.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/mkstages/create_forcestage3.sh b/scripts/mkstages/create_forcestage3.sh
index e30be09..4edead8 100644
--- a/scripts/mkstages/create_forcestage3.sh
+++ b/scripts/mkstages/create_forcestage3.sh
@@ -17,7 +17,7 @@ prepare(){
fi
if [[ "${OLDSTAGE3}" =~ ^http ]]; then
- if [[ ! -e $(basename ${OLDSTAGE3}) ]]; then
+ if [[ ! -e /tmp/$(basename ${OLDSTAGE3}) ]]; then
wget -P /tmp "${OLDSTAGE3}"
fi
else
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2015-07-13 12:38 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2015-07-13 12:38 UTC (permalink / raw
To: gentoo-commits
commit: 3e4b2faf25edc29cd6194fbb202b5e1271d9e856
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Mon Jul 13 12:38:31 2015 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Mon Jul 13 12:38:31 2015 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=3e4b2faf
create_forcestage3.sh: fixed some issues. tested amd64/10.1, amd64/10.1/clang, x86/10.1.
scripts/mkstages/create_forcestage3.sh | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/scripts/mkstages/create_forcestage3.sh b/scripts/mkstages/create_forcestage3.sh
index 515aae2..e0aff8c 100644
--- a/scripts/mkstages/create_forcestage3.sh
+++ b/scripts/mkstages/create_forcestage3.sh
@@ -14,6 +14,15 @@ prepare(){
local distdir="$(emerge --info | grep DISTDIR | sed s:DISTDIR=::g | sed 's:"::g')"
if [[ ! -d "${WORKDIR}" ]]; then
mkdir -p "${WORKDIR}"
+ else
+ echo "${WORKDIR} exists."
+ echo "Please remove the following steps."
+ echo ""
+ echo "kill -9 $(ps auxw | grep ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs)"
+ echo "umount $(mount | grep ${WORKDIR} | awk '{print $3}' | xargs)"
+ echo "umount $(mount | grep ${WORKDIR} | awk '{print $3}' | xargs)"
+ echo "chflags -R noschg \"${WORKDIR}\" && rm -rf \"${WORKDIR}\""
+ exit 1
fi
if [[ "${OLDSTAGE3}" =~ ^http ]]; then
@@ -56,6 +65,9 @@ chroot_update(){
export EMERGE_DEFAULT_OPTS="-q"
chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} kernel
chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} freebsd_userland
+ if [[ -e "${WORKDIR}"/usr/bin/git ]]; then
+ chroot "${WORKDIR}" emerge -C dev-vcs/git
+ fi
REMOVEPERL=1 chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} world
unset EMERGE_DEFAULT_OPTS
}
@@ -74,8 +86,13 @@ check_ecompressdir() {
}
cleanup(){
+ local distdir="$(emerge --info | grep DISTDIR | sed s:DISTDIR=::g | sed 's:"::g')"
+
check_ecompressdir
- umount "${WORKDIR}"/usr/portage/distfiles
+ if [[ ! "${distdir}" =~ ${PORTDIR}.* ]]; then
+ echo "unmount DISTDIR"
+ umount "${WORKDIR}"/usr/portage/distfiles
+ fi
umount "${WORKDIR}"/usr/portage
if [[ "${TMPFS}" -ne 0 ]] ; then
umount "${WORKDIR}"/var/tmp/portage
@@ -91,12 +108,13 @@ create_stage3(){
mkdir -p /var/tmp/catalyst/builds/default
fi
if [[ ${CLANG} -ne 0 ]]; then
- tarfile="stage3-${TARGETARCH}-fbsd-${TAGETVER}-forcestage3-cl"
+ tarfile="stage3-${TARGETARCH}-fbsd-${TARGETVER}-forcestage3-cl"
else
- tarfile="stage3-${TARGETARCH}-fbsd-${TAGETVER}-forcestage3"
+ tarfile="stage3-${TARGETARCH}-fbsd-${TARGETVER}-forcestage3"
fi
- tar cjpf /var/tmp/catalyst/builds/default/"${tarfile}".tar.bz2 .
+ echo "Compress with tar."
+ LANG="en_US.UTF-8" tar cjpf /var/tmp/catalyst/builds/default/"${tarfile}".tar.bz2 .
echo "Complete !"
echo "Set FORCESTAGE3=${tarfile}"
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2017-12-07 13:39 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2017-12-07 13:39 UTC (permalink / raw
To: gentoo-commits
commit: a55cb5b680153dd98c0118b5e28a13dc81b7bbb9
Author: Yuta SATOH <nigoro.dev <AT> gmail <DOT> com>
AuthorDate: Thu Dec 7 13:33:34 2017 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Thu Dec 7 13:33:34 2017 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=a55cb5b6
stages_builder.sh: updated. It targets 11.1.
scripts/mkstages/stages_builder.sh | 238 +++++++++++++------------------------
1 file changed, 84 insertions(+), 154 deletions(-)
diff --git a/scripts/mkstages/stages_builder.sh b/scripts/mkstages/stages_builder.sh
index 964e41e..4254c25 100755
--- a/scripts/mkstages/stages_builder.sh
+++ b/scripts/mkstages/stages_builder.sh
@@ -1,155 +1,95 @@
#!/bin/bash
-export TARGETVER="${TARGETVER:-9.1}"
-export MKSRC="${MKSRC:-NONE}"
+set -eu
+
+PORTDIR="${PORTDIR:-/usr/portage}"
+export TARGETVER="${TARGETVER:-11.1}"
export WORKDATE="${WORKDATE:-local}"
export WORKARCH="${WORKARCH:-$(uname -m)}"
-export FORCESTAGE3="${FORCESTAGE3:-}"
+export SOURCE_STAGE="${SOURCE_STAGE}"
+export TARGETARCH="${TARGETARCH:-}"
export EXTRAOVERLAY="${EXTRAOVERLAY:-}"
-OLDVER="${OLDVER:-9.0}"
-OVERLAY_SNAPSHOT="https://gitweb.gentoo.org/proj/gentoo-bsd.git/snapshot/gentoo-bsd-master.tar.gz"
+export CLANG="${CLANG:-0}"
prepare(){
- local MAJORVER=`echo ${TARGETVER} | awk -F \. '{ print $1 }'`
- if [ -n "${STABLE}" ] ; then
- export CHOSTVER="${MAJORVER}.0"
- else
- export CHOSTVER="${TARGETVER}"
- fi
-
- if [ "$1" = "x86" ] || [ "${WORKARCH}" = "i386" ] ; then
- export CATALYST_CHOST="i686-gentoo-freebsd${CHOSTVER}"
+ if [[ ${TARGETARCH} == x86 ]] || [[ ${WORKARCH} == i386 ]] ; then
+ export CATALYST_CHOST="i686-gentoo-freebsd${TARGETVER}"
export TARGETARCH="x86"
export TARGETSUBARCH="i686"
else
- export CATALYST_CHOST="x86_64-gentoo-freebsd${CHOSTVER}"
+ export CATALYST_CHOST="x86_64-gentoo-freebsd${TARGETVER}"
export TARGETARCH="amd64"
export TARGETSUBARCH="amd64"
fi
export WORKDIR="/tmp/mk_stages_${TARGETARCH}_${TARGETVER}"
- [[ -n ${CLANG} ]] && WORKDIR="${WORKDIR}_clang"
+ [[ ${CLANG} -ne 0 ]] && WORKDIR="${WORKDIR}_clang"
- if [ -e ${WORKDIR} ] ; then
- echo "WORKDIR ${WORKDIR} is already exists."
- echo "Please remove manually it."
+ if [[ -e "${WORKDIR}" ]] ; then
+ echo "WORKDIR ${WORKDIR} already exists."
+ echo "Please remove it:"
echo ""
echo "chflags -R noschg ${WORKDIR} && rm -rf ${WORKDIR}"
exit 1
else
- mkdir -p ${WORKDIR}
+ mkdir -p "${WORKDIR}"
fi
- if [ ! -e "/var/tmp/catalyst/builds/default" ] ; then
- mkdir -p /var/tmp/catalyst/builds/default
+ if [[ ! -e "/var/tmp/catalyst/builds/default" ]] ; then
+ mkdir -p "/var/tmp/catalyst/builds/default"
fi
- if [ -z "${FORCESTAGE3}" ] ; then
- if [ -z "${CLANG}" ] ; then
- local oldstage3fn="stage3-${TARGETSUBARCH}-freebsd-${OLDVER}"
- local oldstage3url="http://dev.gentoo.org/~aballier/fbsd${OLDVER}/${TARGETARCH}/${oldstage3fn}.tar.bz2"
- else
- local oldstage3fn="stage3-${TARGETSUBARCH}-clangfbsd-${OLDVER}"
- local oldstage3url="http://dev.gentoo.org/~aballier/fbsd${OLDVER}/${TARGETARCH}/clang/${oldstage3fn}.tar.bz2"
- fi
-
- if [ ! -e "/var/tmp/catalyst/builds/default/${oldstage3fn}.tar.bz2" ] ; then
- echo "Downloading aballier's ${TARGETSUBARCH} stage3 file..."
- wget -q -P /var/tmp/catalyst/builds/default "${oldstage3url}"
- [[ $? -ne 0 ]] && exit 1
- fi
- export FORCESTAGE3="${oldstage3fn}"
- fi
+ cd "${WORKDIR}"
- cd ${WORKDIR}
- if [ -d "${HOME}/gentoo-bsd" ] ; then
- echo "Copy from ${HOME}/gentoo-bsd to ${WORKDIR}/"
- cp -a "${HOME}/gentoo-bsd" ${WORKDIR}/
- else
- echo "Clone gentoo-bsd overlay snapshot..."
- wget -q -O "${WORKDIR}"/gentoo-bsd.tar.gz "${OVERLAY_SNAPSHOT}"
- [[ $? -ne 0 ]] && exit 1
- mkdir -p ${WORKDIR}/gentoo-bsd
- tar xzf "${WORKDIR}"/gentoo-bsd.tar.gz --strip-components=1 -C "${WORKDIR}/gentoo-bsd"
- fi
- if [ -n "${EXTRAOVERLAY}" ] ; then
+ if [[ -n "${EXTRAOVERLAY}" ]] ; then
+ mkdir -p "${WORKDIR}"/gentoo-bsd
if [[ "${EXTRAOVERLAY}" =~ ^http ]]; then
- echo "Downloading extra overlay."
+ echo "Downloading extra overlay..."
wget -q -O ${WORKDIR}/extraoverlay.tar.bz2 "${EXTRAOVERLAY}"
- [[ $? -ne 0 ]] && exit 1
echo "Copy from ${WORKDIR}/extraoverlay to ${WORKDIR}/gentoo-bsd"
- mkdir ${WORKDIR}/extraoverlay
- tar xjf ${WORKDIR}/extraoverlay.tar.bz2 --strip-components=1 -C ${WORKDIR}/extraoverlay
- cp -a ${WORKDIR}/extraoverlay/* ${WORKDIR}/gentoo-bsd/
+ mkdir "${WORKDIR}/extraoverlay"
+ tar xjf "${WORKDIR}/extraoverlay.tar.bz2" --strip-components=1 -C "${WORKDIR}/extraoverlay"
+ cp -a "${WORKDIR}"/extraoverlay/* "${WORKDIR}"/gentoo-bsd/
else
echo "Copy from ${EXTRAOVERLAY} to ${WORKDIR}/gentoo-bsd"
- cp -a ${EXTRAOVERLAY}/* ${WORKDIR}/gentoo-bsd/
+ cp -a "${EXTRAOVERLAY}"/* "${WORKDIR}"/gentoo-bsd/
fi
+ else
+ export NOOVERLAY=1
fi
- if [[ ! -e /usr/bin/catalyst ]] ; then
- echo "emerging catalyst..."
- 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
- fi
-
- if [ ! -e /usr/portage/profiles/releases/freebsd-${TARGETVER} ] ; then
- echo "prepare new ${TARGETVER} profiles"
- cp -a ${WORKDIR}/gentoo-bsd/profiles/arch/amd64-fbsd/clang /usr/portage/profiles/arch/amd64-fbsd/
- cp -a ${WORKDIR}/gentoo-bsd/profiles/default/bsd/fbsd/amd64/${TARGETVER} /usr/portage/profiles/default/bsd/fbsd/amd64/
- cp -a ${WORKDIR}/gentoo-bsd/profiles/default/bsd/fbsd/x86/${TARGETVER} /usr/portage/profiles/default/bsd/fbsd/x86/
- cp -a ${WORKDIR}/gentoo-bsd/profiles/releases/freebsd-${TARGETVER} /usr/portage/profiles/releases/
-
- cat <<- _EOF_ >> /usr/portage/profiles/profiles.desc
- amd64-fbsd default/bsd/fbsd/amd64/${TARGETVER} dev
- amd64-fbsd default/bsd/fbsd/amd64/${TARGETVER}/clang dev
- x86-fbsd default/bsd/fbsd/x86/${TARGETVER} dev
- _EOF_
- fi
-
- if [ "${WORKDATE}" = "remote" ] ; then
+ 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'`
+ export WORKDATE=$(grep -e 'portage-[0-9]\+.*bz2' "${WORKDIR}"/snapshot_list.html | tail -n 1 | gsed 's:.*portage-\([0-9]\+\).*:\1:g')
mkdir -p /var/tmp/catalyst/snapshots
- if [ ! -e "/var/tmp/catalyst/snapshots/portage-${WORKDATE}.tar.bz2" ] ; then
- wget -q -P /var/tmp/catalyst/snapshots "http://distfiles.gentoo.org/snapshots/portage-${WORKDATE}.tar.bz2"
- if [ $? -ne 0 ] ; then
- export WORKDATE="`date +%Y%m%d`"
+ if [[ ! -e "/var/tmp/catalyst/snapshots/portage-${WORKDATE}.tar.bz2" ]] ; then
+ wget -q -P /var/tmp/catalyst/snapshots "http://distfiles.gentoo.org/snapshots/portage-${WORKDATE}.tar.bz2" && :
+ if [[ $? -ne 0 ]] ; then
+ export WORKDATE="$(date +%Y%m%d)"
fi
fi
- elif [ "${WORKDATE}" = "resume" ] ; then
- ls -1 /var/tmp/catalyst/snapshots/*bz2 > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
- export WORKDATE="`ls -1 /var/tmp/catalyst/snapshots/*bz2 | tail -n 1 | gsed 's:.*portage-\([0-9]\+\).*:\1:g'`"
+ elif [[ "${WORKDATE}" == "resume" ]] ; then
+ ls -1 /var/tmp/catalyst/snapshots/*bz2 > /dev/null 2>&1 && :
+ if [[ $? -eq 0 ]] ; then
+ export WORKDATE="$(ls -1 /var/tmp/catalyst/snapshots/*bz2 | tail -n 1 | gsed 's:.*portage-\([0-9]\+\).*:\1:g')"
else
- export WORKDATE="`date +%Y%m%d`"
+ export WORKDATE="$(date +%Y%m%d)"
fi
- elif [ "${WORKDATE}" = "local" ] ; then
- export WORKDATE="`date +%Y%m%d`"
+ elif [[ "${WORKDATE}" = "local" ]] ; then
+ export WORKDATE="$(date +%Y%m%d)"
else
export WORKDATE="${WORKDATE}"
fi
-
- if [ -n "${STABLE}" ] ; then
- echo "create stages, mixed stable ${TARGETARCH} and minimal ${TARGETARCH}-fbsd flag on"
- mkdir -p ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage/profile
- mkdir -p ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage/package.keywords
- cp -a ${WORKDIR}/gentoo-bsd/scripts/mkstages/minimal-fbsd-list ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage/package.keywords/
- echo "ACCEPT_KEYWORDS=\"-${TARGETARCH}-fbsd -~${TARGETARCH}-fbsd ${TARGETARCH}\"" >> ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage/profile/make.defaults
- echo "CHOST=\"${CATALYST_CHOST}\"" >> ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage/profile/make.defaults
- echo 'CHOST_amd64_fbsd="${CHOST}"' >> ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage/profile/make.defaults
- echo "CHOST_x86_fbsd=\"i686-gentoo-freebsd${CHOSTVER}\"" >> ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage/profile/make.defaults
- echo "FEATURES=\"preserve-libs\"" >> ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage/profile/make.defaults
- fi
}
check_ecompressdir() {
# dirty solution
# /dev is still mounted; performing auto-bind-umount...
- local PID=`ps auxw | grep ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs`
- if [ -n "${PID}" ] ; then
+ local pid=$(ps auxw | grep ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs)
+
+ if [[ -n "${pid}" ]] ; then
echo "kill ecompressdir"
- kill -9 ${PID}
- rm -rf "/var/tmp/catalyst/tmp/default/$1" || exit 1
+ kill -9 ${pid}
+ rm -rf "/var/tmp/catalyst/tmp/default/$1"
return 1
else
return 0
@@ -157,91 +97,81 @@ check_ecompressdir() {
}
run_catalyst() {
- local C_TARGET="$1"
- local C_SOURCE="$2"
- local C_APPEND_VERSION="$3"
- local C_APPEND_OPT=""
-
- if [ ! -e /var/tmp/catalyst/builds/default/${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 ] ; then
- local specfile="${WORKDIR}/${C_TARGET}.spec"
+ local c_target="$1"
+ local c_source="$2"
+ local c_append_version="$3"
+ local c_append_opt=""
+ local c_append_profile=""
+
+ if [[ ! -e /var/tmp/catalyst/builds/default/${c_target}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${c_append_version}.tar.bz2 ]] ; then
+ local specfile="${WORKDIR}/${c_target}.spec"
[[ -e "${specfile}" ]] && rm "${specfile}"
- if [ "${C_TARGET}" != "stage3" ] ; then
+ if [[ "${c_target}" != "stage3" ]] ; then
echo "chost: ${CATALYST_CHOST}" >> "${specfile}"
fi
- if [ -n "${STABLE}" ] ; then
- echo "portage_confdir: ${WORKDIR}/gentoo-bsd/scripts/mkstages/etc/portage" >> "${specfile}"
- else
- if [ -e ${WORKDIR}/gentoo-bsd/etc/portage ] ; then
- echo "portage_confdir: ${WORKDIR}/gentoo-bsd/etc/portage" >> "${specfile}"
- fi
- fi
- if [ -n "${CLANG}" ] ; then
- C_APPEND_PROFILE="/clang"
- echo 'cxxflags: -stdlib=libc++ ${CFLAGS}' >> "${specfile}"
+ if [[ "${CLANG}" -ne 0 ]] ; then
+ c_append_profile="/clang"
+# echo 'cxxflags: -stdlib=libc++ ${CFLAGS}' >> "${specfile}"
fi
cat <<- _EOF_ >> "${specfile}"
- target: ${C_TARGET}
- version_stamp: fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}
- profile: default/bsd/fbsd/${TARGETARCH}/${TARGETVER}${C_APPEND_PROFILE}
+ target: ${c_target}
+ version_stamp: fbsd-${TARGETVER}-${WORKDATE}${c_append_version}
+ profile: default/bsd/fbsd/${TARGETARCH}/${TARGETVER}${c_append_profile}
snapshot: ${WORKDATE}
- source_subpath: default/${C_SOURCE}
+ source_subpath: default/${c_source}
subarch: ${TARGETSUBARCH}
rel_type: default
_EOF_
- if [ ! -n "${NOOVERLAY}" ] ; then
+ if [[ ! -n "${NOOVERLAY}" ]] ; then
echo "portage_overlay: ${WORKDIR}/gentoo-bsd" >> "${specfile}"
fi
catalyst -f "${specfile}"
- if [ $? -ne 0 ] ; then
- check_ecompressdir "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}/usr/local/portage"
- if [ $? -ne 0 ] ; then
- catalyst -f "${specfile}" ${C_APPEND_OPT}
+ if [[ $? -ne 0 ]] ; then
+ check_ecompressdir "${c_target}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${c_append_version}/usr/local/portage"
+ if [[ $? -ne 0 ]] ; then
+ catalyst -f "${specfile}" ${c_append_opt}
fi
fi
- if [ ! -e /var/tmp/catalyst/builds/default/${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 ] ; then
+ if [[ ! -e /var/tmp/catalyst/builds/default/${c_target}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${c_append_version}.tar.bz2 ]] ; then
exit 1
fi
else
- echo "${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}.tar.bz2 is exist."
- echo "skip the creation of ${C_TARGET}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_APPEND_VERSION}"
+ echo "${c_target}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${c_append_version}.tar.bz2 exists."
+ echo "skip the creation of ${c_target}-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${c_append_version}"
fi
}
mk_stages() {
- [[ -n "${CLANG}" ]] && local C_CLANG_APPEND_VERSION="-cl"
+ local C_CLANG_APPEND_VERSION=""
+ [[ "${CLANG}" -ne 0 ]] && C_CLANG_APPEND_VERSION="-cl"
local C_TMP_APPEND_VERSION="${C_CLANG_APPEND_VERSION}t"
- local SOURCE_STAGE3="stage3-${TARGETSUBARCH}-freebsd-${OLDVER}"
- [[ -n ${FORCESTAGE3} ]] && SOURCE_STAGE3="${FORCESTAGE3}"
+ local SOURCE_STAGE3="${SOURCE_STAGE}"
- run_catalyst stage1 ${SOURCE_STAGE3} ${C_TMP_APPEND_VERSION}
- run_catalyst stage2 stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION} ${C_TMP_APPEND_VERSION}
- run_catalyst stage3 stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION} ${C_TMP_APPEND_VERSION}
+ run_catalyst "stage1" "${SOURCE_STAGE3}" "${C_TMP_APPEND_VERSION}"
+ run_catalyst "stage2" "stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}" "${C_TMP_APPEND_VERSION}"
+ run_catalyst "stage3" "stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}" "${C_TMP_APPEND_VERSION}"
- run_catalyst stage1 stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION} ${C_CLANG_APPEND_VERSION}
- run_catalyst stage2 stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_CLANG_APPEND_VERSION} ${C_CLANG_APPEND_VERSION}
- run_catalyst stage3 stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_CLANG_APPEND_VERSION} ${C_CLANG_APPEND_VERSION}
+ run_catalyst "stage1" "stage3-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_TMP_APPEND_VERSION}" "${C_CLANG_APPEND_VERSION}"
+ run_catalyst "stage2" "stage1-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_CLANG_APPEND_VERSION}" "${C_CLANG_APPEND_VERSION}"
+ run_catalyst "stage3" "stage2-${TARGETSUBARCH}-fbsd-${TARGETVER}-${WORKDATE}${C_CLANG_APPEND_VERSION}" "${C_CLANG_APPEND_VERSION}"
}
-if [ -e /etc/catalyst/catalystrc ] ; then
- source /etc/catalyst/catalystrc
+if [[ ! -e /usr/bin/catalyst ]] ; then
+ echo "The catalyst doesn't exist."
+ echo "Please emerge dev-util/catalyst first."
+ exit 1
fi
-prepare $1
+prepare "${TARGETARCH}"
-if [ ! -e "/var/tmp/catalyst/snapshots/portage-${WORKDATE}.tar.bz2" ] ; then
+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
-
-
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2017-12-07 13:39 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2017-12-07 13:39 UTC (permalink / raw
To: gentoo-commits
commit: b85ab4b4483a6ac0f55fcccb7f3c3c2cdef29242
Author: Yuta SATOH <nigoro.dev <AT> gmail <DOT> com>
AuthorDate: Thu Dec 7 13:24:28 2017 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Thu Dec 7 13:24:28 2017 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=b85ab4b4
create_forcestage3.sh: updated. It targets 11.1.
scripts/mkstages/create_forcestage3.sh | 56 ++++++++++++++++++++++++++--------
1 file changed, 43 insertions(+), 13 deletions(-)
diff --git a/scripts/mkstages/create_forcestage3.sh b/scripts/mkstages/create_forcestage3.sh
old mode 100644
new mode 100755
index 516f95b..c34631e
--- a/scripts/mkstages/create_forcestage3.sh
+++ b/scripts/mkstages/create_forcestage3.sh
@@ -1,22 +1,34 @@
#!/bin/bash
set -eu
-TARGETVER="${TARGETVER:-10.1}"
+TARGETVER="${TARGETVER:-11.1}"
TARGETARCH="${TARGETARCH:-amd64}"
OLDSTAGE3="${OLDSTAGE3:-http://distfiles.gentoo.org/experimental/bsd/freebsd/stages/amd64-fbsd-9.1/stage3-amd64-freebsd-9.1.tar.bz2}"
WORKDIR="/${TARGETVER}-forcestage3/${TARGETARCH}"
PORTDIR="${PORTDIR:-/usr/portage}"
TMPFS=${TMPFS:-0}
CLANG=${CLANG:-0}
+SET_MAKEOPTS=${SET_MAKEOPTS:-1}
+# DISTDIR will be set automatically if your environment have the emerge command.
+# This setting exists for vanilla FreeBSD.
+DISTDIR="${DISTDIR:-/usr/portage/distfiles}"
+
[[ ${CLANG} -ne 0 ]] && WORKDIR="${WORKDIR}_clang"
prepare(){
- local distdir="$(emerge --info | grep DISTDIR | sed s:DISTDIR=::g | sed 's:"::g')"
+ local distdir
+
+ if type -P emerge &> /dev/null ; then
+ distdir="$(emerge --info | grep DISTDIR | sed s:DISTDIR=::g | sed 's:"::g')"
+ else
+ distdir="${DISTDIR}"
+ fi
+
if [[ ! -d "${WORKDIR}" ]]; then
mkdir -p "${WORKDIR}"
else
- echo "${WORKDIR} exists."
- echo "Please remove the following steps."
+ echo "Error: ${WORKDIR} exists."
+ echo "Please remove the following steps:"
echo ""
echo "kill -9 $(ps auxw | grep ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs)"
echo "umount $(mount | grep ${WORKDIR} | awk '{print $3}' | xargs)"
@@ -27,10 +39,11 @@ prepare(){
if [[ "${OLDSTAGE3}" =~ ^http ]]; then
if [[ ! -e /tmp/$(basename ${OLDSTAGE3}) ]]; then
- wget -P /tmp "${OLDSTAGE3}"
+ cd /tmp
+ fetch "${OLDSTAGE3}"
fi
else
- cp "${OLDSTAGE3}" /tmp
+ cp -a "${OLDSTAGE3}" /tmp
fi
tar xjpf /tmp/$(basename ${OLDSTAGE3}) -C "${WORKDIR}"
@@ -40,6 +53,7 @@ prepare(){
mount -t devfs devfs "${WORKDIR}"/dev
mount -t nullfs "${PORTDIR}" "${WORKDIR}"/usr/portage
+
if [[ ! "${distdir}" =~ ${PORTDIR}.* ]]; then
echo "mount DISTDIR"
if [[ ! -e "${WORKDIR}"/usr/portage/distfiles ]]; then
@@ -51,8 +65,10 @@ prepare(){
echo "mount TMPFS"
mount -t tmpfs tmpfs "${WORKDIR}"/var/tmp/portage
fi
- wget -P "${WORKDIR}" https://gitweb.gentoo.org/proj/gentoo-bsd.git/plain/scripts/automatic_updater.sh
- cp /etc/resolv.conf "${WORKDIR}"/etc
+
+ cd "${WORKDIR}"
+ fetch https://gitweb.gentoo.org/proj/gentoo-bsd.git/plain/scripts/automatic_updater.sh
+ cp -a /etc/resolv.conf "${WORKDIR}"/etc
}
chroot_update(){
@@ -62,15 +78,24 @@ chroot_update(){
local makeconf="${WORKDIR}"/etc/portage/make.conf
fi
- echo "MAKEOPTS=\"-j$(sysctl hw.ncpu | awk '{ print $2 + 1 }')"\" >> "${makeconf}"
+ case ${SET_MAKEOPTS} in
+ [1-9]|[1-9][0-9])
+ echo "MAKEOPTS=\"-j${SET_MAKEOPTS}\"" >> "${makeconf}"
+ ;;
+ *) exit 1 ;;
+ esac
+
echo 'USE="${USE} -fortran -build-kernel"' >> "${makeconf}"
export EMERGE_DEFAULT_OPTS="-q"
+ mkdir -p "${WORKDIR}"/etc/portage/patches/sys-apps
+ cp -a /etc/portage/patches/sys-apps/portage "${WORKDIR}"/etc/portage/patches/sys-apps
chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} kernel
chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} freebsd_userland
if [[ -e "${WORKDIR}"/usr/bin/git ]]; then
chroot "${WORKDIR}" emerge -C dev-vcs/git
fi
+
REMOVEPERL=1 chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} world
unset EMERGE_DEFAULT_OPTS
}
@@ -89,7 +114,13 @@ check_ecompressdir() {
}
cleanup(){
- local distdir="$(emerge --info | grep DISTDIR | sed s:DISTDIR=::g | sed 's:"::g')"
+ local distdir
+
+ if type -P emerge &> /dev/null ; then
+ distdir="$(emerge --info | grep DISTDIR | sed s:DISTDIR=::g | sed 's:"::g')"
+ else
+ distdir="${DISTDIR}"
+ fi
check_ecompressdir
if [[ ! "${distdir}" =~ ${PORTDIR}.* ]]; then
@@ -116,10 +147,10 @@ create_stage3(){
tarfile="stage3-${TARGETARCH}-fbsd-${TARGETVER}-forcestage3"
fi
- echo "Compress with tar."
+ echo "Compressing with tar."
LANG="en_US.UTF-8" tar cjpf /var/tmp/catalyst/builds/default/"${tarfile}".tar.bz2 .
- echo "Complete !"
+ echo "Complete!"
echo "Set FORCESTAGE3=${tarfile}"
}
@@ -127,4 +158,3 @@ prepare
chroot_update
cleanup
create_stage3
-
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2017-12-07 13:39 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2017-12-07 13:39 UTC (permalink / raw
To: gentoo-commits
commit: 53789eceebb7150f68090669635b9eedb7eeea60
Author: Yuta SATOH <nigoro.dev <AT> gmail <DOT> com>
AuthorDate: Thu Dec 7 13:35:06 2017 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Thu Dec 7 13:35:06 2017 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=53789ece
remove old script.
scripts/mkstages/chroot_prepare_upgrade.sh | 74 ------------------------------
1 file changed, 74 deletions(-)
diff --git a/scripts/mkstages/chroot_prepare_upgrade.sh b/scripts/mkstages/chroot_prepare_upgrade.sh
deleted file mode 100755
index 298c7fb..0000000
--- a/scripts/mkstages/chroot_prepare_upgrade.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/bash
-
-if [ -e /etc/make.conf ] ; then
- echo "MAKEOPTS=\"-j`sysctl hw.ncpu | awk '{ print $2 + 1 }'`"\" >> /etc/make.conf
-fi
-if [ -e /etc/portage/make.conf ] ; then
- echo "MAKEOPTS=\"-j`sysctl hw.ncpu | awk '{ print $2 + 1 }'`"\" >> /etc/portage/make.conf
-fi
-if [ -e /tmp/catalystrc ] ; then
- source /tmp/catalystrc
-fi
-# fixes bug #447810
-MAKEOPTS=-j1 emerge -q app-shells/bash || exit
-
-# fixes bug #412319
-emerge -q sys-devel/gcc-config || exit
-gcc-config 1
-
-# fixes bug #413865
-emerge -q app-arch/libarchive || exit
-
-# upgrade sys-freebsd packages
-emerge -q sys-apps/portage || exit
-emerge -q sys-devel/libtool || exit
-# fixes bug 425530
-emerge -q app-admin/eselect || exit
-
-rm /etc/make.profile /etc/portage/make.profile
-ln -s ../../usr/portage/profiles/default/bsd/fbsd/${TARGETARCH}/${TARGETVER} /etc/portage/make.profile
-
-emerge -1q sys-freebsd/freebsd-mk-defs
-USE=build emerge -1q --nodeps sys-freebsd/freebsd-lib
-emerge -Cq sys-freebsd/boot0
-USE=symlink emerge -1q freebsd-bin freebsd-cddl freebsd-contrib freebsd-lib freebsd-libexec freebsd-mk-defs freebsd-pam-modules freebsd-sbin freebsd-share freebsd-ubin freebsd-usbin || exit
-
-# sys-libs/zlib will request ${CHOST}-gcc.
-# different ${CHOST}-gcc fails to install
-CHOST=${CATALYST_CHOST} emerge -q sys-devel/gcc || exit
-
-# fixes bug 436560
-fixes436560(){
- local rootdir=$1
-
- if [ -d "${rootdir}lib64" ] && [ -L "${rootdir}lib" ] ; then
- rm "${rootdir}lib"
- LD_LIBRARY_PATH="${rootdir}lib64" mv "${rootdir}lib64" "${rootdir}lib"
- ln -s lib ${rootdir}lib64
- fi
-}
-
-fixes436560 /
-fixes436560 /usr/
-fixes436560 /usr/local/
-
-emerge -q sys-apps/baselayout
-emerge -q sys-apps/portage || exit
-
-# libtool has the old CHOST. Need to be updated
-CHOST=${CATALYST_CHOST} emerge -q sys-devel/libtool || exit
-
-# fixes bug 425530
-emerge -q app-admin/eselect || exit
-
-if [ -e /etc/portage/profile ] ; then
- rm -rf /etc/portage/profile
- rm /etc/portage/package.keywords
- rm /etc/portage/package.use
- rm -rf /etc/portage/patches
-fi
-
-rm -rf /usr/local/portage.bsd-overlay
-gsed -i '/PORTDIR_OVERLAY=.*/d' /etc/make.conf
-gsed -i '/PORTDIR_OVERLAY=.*/d' /etc/portage/make.conf
-touch /tmp/prepare_done
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2017-12-09 22:29 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2017-12-09 22:29 UTC (permalink / raw
To: gentoo-commits
commit: 05c5df43befd234a462824bc4bd604c687ca4878
Author: Yuta SATOH <nigoro.dev <AT> gmail <DOT> com>
AuthorDate: Sat Dec 9 21:44:56 2017 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Sat Dec 9 21:44:56 2017 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=05c5df43
create_forcestage3.sh: use wget to get the old stage3.
scripts/mkstages/create_forcestage3.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/mkstages/create_forcestage3.sh b/scripts/mkstages/create_forcestage3.sh
index 26210d9..a70a174 100755
--- a/scripts/mkstages/create_forcestage3.sh
+++ b/scripts/mkstages/create_forcestage3.sh
@@ -40,7 +40,11 @@ prepare(){
if [[ "${OLDSTAGE3}" =~ ^http ]]; then
if [[ ! -e /tmp/$(basename ${OLDSTAGE3}) ]]; then
cd /tmp
- fetch "${OLDSTAGE3}"
+ if type -P wget &> /dev/null ; then
+ wget -q "${OLDSTAGE3}"
+ else
+ fetch "${OLDSTAGE3}"
+ fi
fi
else
cp -a "${OLDSTAGE3}" /tmp
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
@ 2017-12-09 22:29 Yuta SATOH
0 siblings, 0 replies; 34+ messages in thread
From: Yuta SATOH @ 2017-12-09 22:29 UTC (permalink / raw
To: gentoo-commits
commit: 08210ba682ff8d7344958fd9f2cfb2059d01297a
Author: Yuta SATOH <nigoro.dev <AT> gmail <DOT> com>
AuthorDate: Sat Dec 9 21:43:02 2017 +0000
Commit: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Sat Dec 9 21:43:02 2017 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=08210ba6
create_forcestage3.sh: remove unnecessary code.
scripts/mkstages/create_forcestage3.sh | 2 --
1 file changed, 2 deletions(-)
diff --git a/scripts/mkstages/create_forcestage3.sh b/scripts/mkstages/create_forcestage3.sh
index c34631e..26210d9 100755
--- a/scripts/mkstages/create_forcestage3.sh
+++ b/scripts/mkstages/create_forcestage3.sh
@@ -88,8 +88,6 @@ chroot_update(){
echo 'USE="${USE} -fortran -build-kernel"' >> "${makeconf}"
export EMERGE_DEFAULT_OPTS="-q"
- mkdir -p "${WORKDIR}"/etc/portage/patches/sys-apps
- cp -a /etc/portage/patches/sys-apps/portage "${WORKDIR}"/etc/portage/patches/sys-apps
chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} kernel
chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} freebsd_userland
if [[ -e "${WORKDIR}"/usr/bin/git ]]; then
^ permalink raw reply related [flat|nested] 34+ messages in thread
end of thread, other threads:[~2017-12-09 22:29 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22 14:32 [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/ Yuta SATOH
-- strict thread matches above, loose matches on Subject: below --
2017-12-09 22:29 Yuta SATOH
2017-12-09 22:29 Yuta SATOH
2017-12-07 13:39 Yuta SATOH
2017-12-07 13:39 Yuta SATOH
2017-12-07 13:39 Yuta SATOH
2015-07-13 12:38 Yuta SATOH
2015-07-12 7:55 Yuta SATOH
2015-07-12 7:49 Yuta SATOH
2015-07-12 4:43 Yuta SATOH
2015-07-12 4:43 Yuta SATOH
2015-07-11 23:32 Yuta SATOH
2015-02-13 11:27 Yuta SATOH
2015-02-12 15:09 Yuta SATOH
2014-11-16 7:44 Yuta SATOH
2014-11-15 16:31 Yuta SATOH
2014-11-15 16:31 Yuta SATOH
2014-10-29 12:16 Yuta SATOH
2014-10-28 12:03 Yuta SATOH
2013-08-29 13:46 Yuta SATOH
2013-07-29 11:41 Yuta SATOH
2013-06-23 14:20 Yuta SATOH
2013-03-09 16:20 Yuta SATOH
2012-12-29 9:16 Yuta SATOH
2012-12-24 14:26 Yuta SATOH
2012-12-12 11:34 Yuta SATOH
2012-12-11 13:21 Yuta SATOH
2012-11-23 13:06 Yuta SATOH
2012-11-22 12:26 Yuta SATOH
2012-10-13 9:33 Yuta SATOH
2012-10-12 15:25 Yuta SATOH
2012-10-06 7:13 Yuta SATOH
2012-08-25 1:24 Yuta SATOH
2012-08-03 13:58 Yuta SATOH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox