Skip to content

Commit ce04686

Browse files
committed
move to base64-13.1.0, remote LD_LIBRARY_PATH evil
1 parent ec3d40a commit ce04686

File tree

6 files changed

+11
-19
lines changed

6 files changed

+11
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ Build scripts for building Spice-enabled QEMU for SmartOS
66
Full documentation is kept on the wiki Page:
77
http://wiki.smartos.org/display/DOC/Spice+on+SmartOS
88

9-
1. Create a multiarch-12.4.1 zone with a delegated dataset and log in to it as root.
9+
1. Create a base64-13.1.0 zone with a delegated dataset and log in to it as root.
1010
1. curl -k https://raw.github.com/nshalman/qemu-smartos-build/master/full-build | bash

config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
export MAKEFLAGS="-j$(psrinfo | wc -l)"
22
export LC_ALL=C
33
export MY_PREFIX=/opt/local
4-
export MY_LIBS=${MY_PREFIX}/lib/amd64
4+
export MY_LIBS=${MY_PREFIX}/lib
55
export MY_INCS=${MY_PREFIX}/include
66
export LDFLAGS="-m64 -L${MY_LIBS}"
77
export CFLAGS="-m64 -I${MY_INCS}"
88
export CXXLAGS=${CFLAGS}
99
export CPPFLAGS="-I${MY_INCS}"
10-
export SMARTDC=/smartdc2
10+
export SMARTDC=/opt/local
1111

1212
export QEMU_VERSION=qemu-kvm-1.1.2
1313
export VERSION=1.0.1

dataset-built.do

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash -x
2-
redo-ifchange config.sh qemu-built
2+
redo-ifchange config.sh qemu-built || exit 1
33
exec >&2
44
set -o xtrace
55
. ./config.sh
@@ -24,8 +24,6 @@ mkdir ${ZONEDIR}/root
2424

2525
( cd qemu.source && gmake DESTDIR="${ZONEDIR}/root" install ; ) || exit 1
2626

27-
mkdir -p ${ZONEDIR}/root/${SMARTDC}/lib
28-
2927
#
3028
# Now figure out the libs we need to copy...
3129
#
@@ -35,7 +33,7 @@ for LIB in $LIBS; do
3533
ISOPT=$(echo "${LIB}" | egrep -e "^/opt/")
3634
if test -n "$ISOPT"; then
3735
echo "Copying ${LIB}"
38-
cp ${LIB} ${ZONEDIR}/root/${SMARTDC}/lib || exit 1
36+
rsync -LR ${LIB} ${ZONEDIR}/root/ || exit 1
3937
fi
4038
done
4139

full-build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
sm-summary | grep -q "base64 13.1.0" || { echo "Only the base64 13.1.0 is currently supported for building" ; exit 1 ;}
4+
35
# need git to get code
46
pkgin up && pkgin -y in scmgit
57
cd /root

prep.do

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
#!/bin/bash -x
22
exec 1>&2
33

4-
cat > /opt/local/etc/pkgin/repositories.conf <<EOF
5-
http://pkgsrc.smartos.org/packages/SmartOS/2012Q4-multiarch/All
6-
http://www.shalman.org/spice/2012Q4-multiarch-spice
7-
http://www.shalman.org/spice/2012Q4-multiarch-onbld
8-
EOF
9-
10-
rm -rf /var/db/pkgin/
114
pkgin -y up
125

136
# need git to get code
@@ -16,8 +9,8 @@ pkgin -y in scmgit bsdtar
169
# build tools
1710
pkgin -y in gcc47 gmake libtool-base automake pkg-config
1811

19-
# build tools I provide
20-
pkgin -y in onbld
12+
# onbld tools from illumos
13+
curl http://www.shalman.org/spice/2012Q4-multiarch-onbld/onbld-0.0.1.tgz | tar xzv -C /opt/local bin lib
2114

2215
# dependencies
2316
pkgin -y in png spice-protocol libspice usbredir

startvm.zone

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# This is a vm start script that processes the standard arguments from vmadmd
44
# and translates them to work with the new qemu.
55
#
6-
export LD_LIBRARY_PATH=/lib/64:/usr/lib/64:/smartdc2/lib
76

87
#
98
# We need to build the list of arguments... we need to inject
@@ -13,7 +12,7 @@ export LD_LIBRARY_PATH=/lib/64:/usr/lib/64:/smartdc2/lib
1312
ARGV[0]="-machine"
1413
ARGV[1]="pc,accel=kvm,kernel_irqchip=on"
1514
ARGV[2]="-readconfig"
16-
ARGV[3]="/smartdc2/etc/qemu/usbredir.cfg"
15+
ARGV[3]="/opt/local/etc/qemu/usbredir.cfg"
1716
argc=4
1817
for ARG in "$@"; do
1918
echo "ARG=$ARG"
@@ -25,4 +24,4 @@ done
2524

2625
echo "FINAL ARGS: " ${ARGV[@]}
2726

28-
exec /smartdc2/bin/qemu-system-x86_64 "${ARGV[@]}"
27+
exec /opt/local/bin/qemu-system-x86_64 "${ARGV[@]}"

0 commit comments

Comments
 (0)