Skip to content

Commit 0d39c59

Browse files
authored
Auto merge of rust-lang#384 - semarie:openbsd-6.0-without-pkgs, r=alexcrichton
use new openbsd-6.0 qcow2 image this version is using `openbsd-6.0-without-pkgs` image.
2 parents b987f0c + 9199394 commit 0d39c59

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

ci/docker/x86_64-unknown-freebsd/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ RUN apt-get install -y --no-install-recommends \
88
ENTRYPOINT ["sh"]
99

1010
ENV PATH=$PATH:/rust/bin \
11-
QEMU=freebsd.qcow2 \
11+
QEMU=freebsd.qcow2.gz \
1212
CAN_CROSS=1 \
1313
CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER=x86_64-unknown-freebsd10-gcc

ci/docker/x86_64-unknown-openbsd/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ RUN apt-get update
44
RUN apt-get install -y --no-install-recommends \
55
gcc libc6-dev qemu qemu-kvm curl ca-certificates kmod cpu-checker
66
ENV PATH=$PATH:/rust/bin \
7-
QEMU=openbsd.qcow2
7+
QEMU=2016-09-07/openbsd-6.0-without-pkgs.qcow2

ci/run-qemu.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ export CARGO_TARGET_DIR=/tmp
1919

2020
case $TARGET in
2121
*-openbsd)
22-
pkg_add rust curl gcc-4.8.4p4
23-
curl https://static.rust-lang.org/cargo-dist/2015-04-02/cargo-nightly-x86_64-unknown-openbsd.tar.gz | \
24-
tar xzf - -C /tmp
25-
export PATH=$PATH:/tmp/cargo-nightly-x86_64-unknown-openbsd/cargo/bin
22+
pkg_add cargo gcc%4.9 rust
2623
export CC=egcc
2724
;;
2825

ci/run.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,21 @@ TARGET=$1
1616
if [ "$QEMU" != "" ]; then
1717
tmpdir=/tmp/qemu-img-creation
1818
mkdir -p $tmpdir
19-
if [ ! -f $tmpdir/$QEMU ]; then
20-
curl https://people.mozilla.org/~acrichton/libc-test/qemu/$QEMU.gz | \
21-
gunzip -d > $tmpdir/$QEMU
19+
20+
if [ -z "${QEMU#*.gz}" ]; then
21+
# image is .gz : download and uncompress it
22+
qemufile=$(echo ${QEMU%.gz} | sed 's/\//__/g')
23+
if [ ! -f $tmpdir/$qemufile ]; then
24+
curl https://people.mozilla.org/~acrichton/libc-test/qemu/$QEMU | \
25+
gunzip -d > $tmpdir/$qemufile
26+
fi
27+
else
28+
# plain qcow2 image: just download it
29+
qemufile=$(echo ${QEMU} | sed 's/\//__/g')
30+
if [ ! -f $tmpdir/$qemufile ]; then
31+
curl https://people.mozilla.org/~acrichton/libc-test/qemu/$QEMU \
32+
> $tmpdir/$qemufile
33+
fi
2234
fi
2335

2436
# Create a mount a fresh new filesystem image that we'll later pass to QEMU.
@@ -80,7 +92,7 @@ if [ "$QEMU" != "" ]; then
8092
$program \
8193
-m 1024 \
8294
-snapshot \
83-
-drive if=virtio,file=$tmpdir/$QEMU \
95+
-drive if=virtio,file=$tmpdir/$qemufile \
8496
-drive if=virtio,file=$tmpdir/libc-test.img \
8597
-net nic,model=virtio \
8698
-net user \

src/unix/bsd/openbsdlike/openbsd.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ pub const KERN_OSVERSION: ::c_int = 27;
360360
pub const KERN_SOMAXCONN: ::c_int = 28;
361361
pub const KERN_SOMINCONN: ::c_int = 29;
362362
pub const KERN_USERMOUNT: ::c_int = 30;
363-
pub const KERN_RND: ::c_int = 31;
364363
pub const KERN_NOSUIDCOREDUMP: ::c_int = 32;
365364
pub const KERN_FSYNC: ::c_int = 33;
366365
pub const KERN_SYSVMSG: ::c_int = 34;

0 commit comments

Comments
 (0)