File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 xorriso : 1.5.6
88 numactl : 2.0.19
99 openssl : openssl-3.4.1
10+ nbdkit : 1.39.5
Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ libraries:
1818- libsqlite3
1919packages :
2020 - libnbd
21- - nbd-client
22- - nbd-server
2321binaries :
24- # All nbd binaries
25- - /usr/bin/nbd*
22+ # nbd bins and libs
23+ - /usr/sbin/nbdkit
24+ - /usr/lib/nbdkit/filters/*
25+ - /usr/lib/nbdkit/plugins/*
2626 # Mount
2727 - /usr/bin/mount /usr/bin/umount
2828 # Sqlite libs
29- - /usr/lib64/libsqlite3.so.0
29+ - /usr/lib64/libsqlite3.so.0
3030 # Block device binaries
3131 - /usr/sbin/blockdev
3232 # CDI binaries
@@ -52,6 +52,10 @@ import:
5252 add : /qemu-img
5353 to : /relocate
5454 before : setup
55+ - image : packages/binaries/nbdkit
56+ add : /nbdkit
57+ to : /nbdkit
58+ before : setup
5559shell :
5660 install :
5761 - |
6266 - rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org* /var/cache/apt/*.bin
6367 setup :
6468 - |
69+ cp -a /nbdkit/. /
6570 /relocate_binaries.sh -i "{{ $cdiImporterDependencies.binaries | join " " }}" -o /relocate
Original file line number Diff line number Diff line change 1+ ---
2+ image : {{ $.ImageType }}/{{ $.ImageName }}
3+ final : false
4+ fromImage : builder/scratch
5+ import :
6+ - image : {{ $.ImageType }}/{{ $.ImageName }}-builder
7+ add : /out
8+ to : /nbdkit
9+ before : setup
10+
11+ ---
12+ {{- $version := get $.Package $.ImageName }}
13+ {{- $gitRepoUrl := "nbdkit/nbdkit.git" }}
14+
15+ {{- $name := print $.ImageName "-dependencies" -}}
16+ {{- define "$name" -}}
17+ packages :
18+ - git gcc
19+ - automake autoconf-archive make libtool
20+ # - MAKEDEV
21+ - bash-completion
22+ - curl
23+ - qemu
24+ - libisoburn
25+ - e2fsprogs
26+ - expect
27+ - libgnutls30
28+ - filesystem
29+ - socat
30+ - jq
31+ - iproute2
32+ - xz
33+ - zlib-ng
34+ - zstd
35+ - zlib
36+ - libblkio
37+ - libnbd
38+ - libtorrent-rasterbar-devel
39+ - libssh
40+ {{- end -}}
41+
42+ {{ $builderDependencies := include "$name" . | fromYaml }}
43+
44+ image : {{ $.ImageType }}/{{ $.ImageName }}-builder
45+ final : false
46+ fromImage : builder/alt
47+ secrets :
48+ - id : SOURCE_REPO
49+ value : {{ $.SOURCE_REPO_GIT }}
50+ shell :
51+ beforeInstall :
52+ - |
53+ # /etc/init.d/udevd umount
54+ apt-get update && apt-get install -y \
55+ {{ $builderDependencies.packages | join " " }}
56+ # /etc/init.d/udevd restart
57+
58+ apt-get update
59+ apt-get clean
60+ rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org* /var/cache/apt/*.bin
61+
62+ install :
63+ - |
64+ OUTDIR=/out
65+ mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config
66+
67+ git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src
68+ cd /src
69+
70+ autoreconf -i
71+
72+ ./configure \
73+ --disable-static \
74+ --prefix=/usr \
75+ --without-bash-completions
76+
77+ make -j$(nproc)
78+
79+ make DESTDIR=$OUTDIR install-strip
80+
81+ # We don't need man, test and samples files
82+ rm -rf $OUTDIR/usr/include
83+ rm -rf $OUTDIR/usr/share
You can’t perform that action at this time.
0 commit comments