File: can-configure-cross-compilation

package info (click to toggle)
ca-certificates-java 20260311
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 188 kB
  • sloc: java: 309; sh: 305; xml: 30; makefile: 24
file content (46 lines) | stat: -rwxr-xr-x 1,336 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -ex

if [ $(dpkg --print-architecture) != 'amd64' ]; then
    echo "The test is only valid for amd64"
    exit 0
fi

echo "Host architecture ${host_arch}"
echo "Foreign architecture ${foreign_arch}"

echo deb http://deb.debian.org/debian unstable main > sources.list
echo deb [ trusted=yes ] file:///tmp/binaries / >> sources.list

where=/tmp/binaries
mkdir -p ${where}

pushd ${where}
apt download ca-certificates-java
apt-ftparchive sources . \
    | tee "$where"/Sources \
    | gzip -9 > "$where"/Sources.gz

apt-ftparchive packages "$where" \
    | sed "s@$where@@" \
    | tee "$where"/Packages \
    | gzip -9 > "$where"/Packages.gz

# sponge comes from moreutils
apt-ftparchive \
    -o"APT::FTPArchive::Release::Origin=$origin" \
    -o"APT::FTPArchive::Release::Label=$label" \
    -o"APT::FTPArchive::Release::Codename=$where" release "$where" \
    | sponge "$where"/Release
popd

mmdebstrap  --setup-hook='copy-in /tmp/binaries /tmp' \
            --keyring /usr/share/keyrings/debian-archive-bullseye-automatic.gpg \
            --keyring /usr/share/keyrings/debian-archive-bookworm-automatic.gpg \
            --mode=root \
            --variant=essential \
            --architectures=amd64,armhf \
            --include=openjdk-21-jdk-headless:armhf \
            unstable /tmp/test-root sources.list