File: can-configure-cross-compilation

package info (click to toggle)
ca-certificates-java 20240118
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: java: 309; sh: 255; xml: 30; makefile: 24
file content (49 lines) | stat: -rwxr-xr-x 1,425 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
47
48
49
#!/bin/bash
set -ex

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

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131
gpg --output unstable.pgp --export 6ED0E7B82643E131 0E98404D386FA1D9

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 unstable.pgp \
            --mode=root \
            --variant=essential \
            --architectures=amd64,armhf \
            --include=openjdk-21-jdk-headless:armhf \
            unstable /tmp/test-root sources.list