4 |
exit 1 |
exit 1 |
5 |
} |
} |
6 |
|
|
7 |
|
os-arch() |
8 |
|
{ |
9 |
|
local arch="$1" |
10 |
|
local os_arch |
11 |
|
|
12 |
|
case ${arch} in |
13 |
|
i*86|x86_64) os_arch="${arch}" ;; |
14 |
|
src|playground*) os_arch="$(source ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc; echo ${ARCH})";; |
15 |
|
esac |
16 |
|
|
17 |
|
echo "${os_arch}" |
18 |
|
} |
19 |
|
|
20 |
runarch-script() |
runarch-script() |
21 |
{ |
{ |
22 |
local arch="$1" |
local arch="$1" |
35 |
|
|
36 |
setarch "${os_arch}" systemd-nspawn \ |
setarch "${os_arch}" systemd-nspawn \ |
37 |
--directory="${buildroot}" \ |
--directory="${buildroot}" \ |
38 |
--bind=${BUILDROOT}/tmp/mage-tree:/usr/mage \ |
--bind=${BUILDROOT}/mage-tree/${arch}:/usr/mage \ |
39 |
--bind=${BUILDROOT}/svn/mage/include:/usr/mage/include \ |
--bind=${BUILDROOT}/svn/mage/include:/usr/mage/include \ |
40 |
--bind=${BUILDROOT}/svn/mage/profiles:/usr/mage/profiles \ |
--bind=${BUILDROOT}/svn/mage/profiles:/usr/mage/profiles \ |
41 |
--bind=${BUILDROOT}/svn/smage:/var/cache/mage/smage \ |
--bind=${BUILDROOT}/svn/smage:/var/cache/mage/smage \ |
68 |
|
|
69 |
# create runrc |
# create runrc |
70 |
echo "${cmd}" > "${runrc}" |
echo "${cmd}" > "${runrc}" |
71 |
runarch-script "${arch}" .runrc || die "runarch script execition of '${runrc}' failed." |
runarch-script "${arch}" .runrc || die "runarch script execution of '${runrc}' failed." |
72 |
|
|
73 |
if [ -f "${runrc}" ] |
if [ -f "${runrc}" ] |
74 |
then |
then |