Skip to content

Commit 0f67635

Browse files
authored
Try #1201:
2 parents 4645d93 + f79a7f0 commit 0f67635

File tree

14 files changed

+112
-64
lines changed

14 files changed

+112
-64
lines changed

.changes/962.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"description": "fix SELinux labels to allow use in multiple containers and/or the host filesystem.",
3+
"type": "fixed",
4+
"issues": [961]
5+
}

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased] - ReleaseDate
99

10+
## [v0.2.5] - 2023-02-03
11+
12+
## Fixed
13+
14+
- #962 - fix SELinux labels to allow use in multiple containers and/or the host filesystem.
15+
- #1166 - freebsd: include memstat in build image to fix build with libc 0.2.138 and up.
16+
1017
## [v0.2.4] - 2022-07-10
1118

1219
## Fixed
@@ -364,7 +371,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
364371
<!-- prettier-ignore-start -->
365372
<!-- next-url -->
366373

367-
[Unreleased]: https://github.com/cross-rs/cross/compare/v0.2.4...HEAD
374+
[Unreleased]: https://github.com/cross-rs/cross/compare/v0.2.5...HEAD
375+
376+
[v0.2.5]: https://github.com/cross-rs/cross/compare/v0.2.4...v0.2.5
368377

369378
[v0.2.4]: https://github.com/cross-rs/cross/compare/v0.2.3...v0.2.4
370379

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords = ["cross", "compilation", "testing", "tool"]
66
license = "MIT OR Apache-2.0"
77
name = "cross"
88
repository = "https://github.com/cross-rs/cross"
9-
version = "0.2.4"
9+
version = "0.2.5"
1010
edition = "2021"
1111
include = [
1212
"src/**/*",
@@ -66,7 +66,6 @@ once_cell = "1"
6666
walkdir = "2"
6767

6868
[package.metadata.release]
69-
dev-version = false
7069
push = false
7170
publish = false
7271
tag = false

deny.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vulnerability = "deny"
1212
unmaintained = "deny"
1313
notice = "deny"
1414
unsound = "deny"
15-
ignore = []
15+
ignore = ["RUSTSEC-2021-0145"]
1616

1717
[bans]
1818
multiple-versions = "deny"

docker/Dockerfile.i686-unknown-freebsd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ RUN /cmake.sh
1010
COPY xargo.sh /
1111
RUN /xargo.sh
1212

13+
RUN echo "export ARCH=i686" > /freebsd-arch.sh
1314
COPY freebsd-common.sh /
1415
COPY freebsd.sh /
15-
RUN /freebsd.sh i686
16+
RUN /freebsd.sh
1617

18+
COPY freebsd-install.sh /
1719
COPY freebsd-extras.sh /
18-
RUN /freebsd-extras.sh i686
20+
RUN /freebsd-extras.sh
1921

2022
ENV CARGO_TARGET_I686_UNKNOWN_FREEBSD_LINKER=i686-unknown-freebsd12-gcc \
2123
CC_i686_unknown_freebsd=i686-unknown-freebsd12-gcc \

docker/Dockerfile.x86_64-unknown-freebsd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ RUN /cmake.sh
1010
COPY xargo.sh /
1111
RUN /xargo.sh
1212

13+
RUN echo "export ARCH=x86_64" > /freebsd-arch.sh
1314
COPY freebsd-common.sh /
1415
COPY freebsd.sh /
15-
RUN /freebsd.sh x86_64
16+
RUN /freebsd.sh
1617

18+
COPY freebsd-install.sh /
1719
COPY freebsd-extras.sh /
18-
RUN /freebsd-extras.sh x86_64
20+
RUN /freebsd-extras.sh
1921

2022
ENV CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER=x86_64-unknown-freebsd12-gcc \
2123
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd12-gcc \

docker/dragonfly.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ EOF
105105
cp "${td}/dragonfly/usr/lib/libexecinfo.so.1" "${destdir}/lib"
106106
cp "${td}/dragonfly/usr/lib/libpthread.so" "${destdir}/lib/libpthread.so"
107107
cp "${td}/dragonfly/usr/lib/librt.so.0" "${destdir}/lib"
108-
cp "${td}"/dragonfly/usr/lib/lib{c,m,util}.a "${destdir}/lib"
108+
cp "${td}"/dragonfly/usr/lib/lib{c,m,util,kvm}.a "${destdir}/lib"
109109
cp "${td}/dragonfly/usr/lib/thread/libthread_xu.so.2" "${destdir}/lib/libpthread.so.0"
110110
cp "${td}"/dragonfly/usr/lib/{crt1,Scrt1,crti,crtn}.o "${destdir}/lib/"
111111

docker/freebsd-common.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
set -x
44
set -euo pipefail
55

6+
# shellcheck disable=SC1091
7+
. freebsd-arch.sh
8+
69
export BSD_ARCH=
710
case "${ARCH}" in
811
x86_64)

docker/freebsd-extras.sh

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,17 @@
33
set -x
44
set -euo pipefail
55

6-
export ARCH="${1}"
76
# shellcheck disable=SC1091
87
. lib.sh
98
# shellcheck disable=SC1091
109
. freebsd-common.sh
10+
# shellcheck disable=SC1091
11+
. freebsd-install.sh
1112

1213
main() {
13-
local pkg_source="https://pkg.freebsd.org/FreeBSD:${BSD_MAJOR}:${BSD_ARCH}/quarterly"
14-
install_packages curl jq xz-utils
15-
16-
local td
17-
td="$(mktemp -d)"
18-
19-
mkdir "${td}"/{openssl,sqlite,packagesite}
20-
21-
pushd "${td}"
22-
23-
curl --retry 3 -sSfL "${pkg_source}/packagesite.txz" -O
24-
tar -C "${td}/packagesite" -xJf packagesite.txz
25-
local openssl_ver
26-
local sqlite_ver
27-
openssl_ver=$(jq -c '. | select ( .name == "openssl" ) | .version' "${td}/packagesite/packagesite.yaml")
28-
sqlite_ver=$(jq -c '. | select ( .name == "sqlite3" ) | .version' "${td}/packagesite/packagesite.yaml")
29-
openssl_ver=${openssl_ver//'"'/}
30-
sqlite_ver=${sqlite_ver//'"'/}
31-
32-
local target="${ARCH}-unknown-freebsd${BSD_MAJOR}"
33-
34-
# Adding openssl lib
35-
curl --retry 3 -sSfL "${pkg_source}/All/openssl-${openssl_ver}.txz" -O
36-
tar -C "${td}/openssl" -xJf "openssl-${openssl_ver}.txz" /usr/local/lib /usr/local/include/
37-
38-
# Adding sqlite3
39-
curl --retry 3 -sSfL "${pkg_source}/All/sqlite3-${sqlite_ver}.txz" -O
40-
tar -C "${td}/sqlite" -xJf "sqlite3-${sqlite_ver}.txz" /usr/local/lib
41-
42-
# Copy the linked library
43-
local destdir="/usr/local/${target}"
44-
cp -r "${td}/openssl/usr/local/include" "${destdir}"
45-
cp "${td}/openssl/usr/local/lib"/lib{crypto,ssl}.a "${destdir}/lib"
46-
cp "${td}/openssl/usr/local/lib"/lib{crypto,ssl}.so* "${destdir}/lib"
47-
cp "${td}/sqlite/usr/local/lib"/libsqlite3.so* "${destdir}/lib"
48-
49-
purge_packages
50-
51-
# clean up
52-
popd
14+
setup_packagesite
15+
install_freebsd_package openssl sqlite3
5316

54-
rm -rf "${td}"
5517
rm "${0}"
5618
}
5719

0 commit comments

Comments
 (0)