-
Notifications
You must be signed in to change notification settings - Fork 230
Expand file tree
/
Copy pathpkg.yaml
More file actions
71 lines (65 loc) · 2.15 KB
/
pkg.yaml
File metadata and controls
71 lines (65 loc) · 2.15 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: iscsi-tools
variant: scratch
shell: /bin/bash
dependencies:
- stage: base
steps:
- sources:
- url: https://github.com/open-iscsi/open-iscsi/archive/refs/tags/{{ .OPEN_ISCSI_VERSION }}.tar.gz
destination: open-iscsi.tar.gz
sha256: {{ .OPEN_ISCSI_SHA256 }}
sha512: {{ .OPEN_ISCSI_SHA512 }}
env:
SOURCE_DATE_EPOCH: {{ .BUILD_ARG_SOURCE_DATE_EPOCH }}
prepare:
- |
tar -xzf open-iscsi.tar.gz --strip-components=1
patch -p1 < /pkg/patches/musl-fixes.patch
patch -p1 < /pkg/patches/dont-use-lib64.patch
patch -p1 < /pkg/patches/remove-werror.patch
build:
- |
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
mkdir -p output
LDFLAGS="$LDFLAGS -L/usr/local/lib" \
meson setup \
-Db_lto=true \
-Dno_systemd=true \
-Disns=disabled \
-Dhomedir=/etc/iscsi \
-Dprefix=/usr/local \
-Discsi_sbindir=/usr/local/sbin \
-Drulesdir=/usr/lib/udev/rules.d \
output
ninja -C output
install:
- |
mkdir -p /rootfs/usr/local/etc
DESTDIR=/rootfs ninja -C output install
# cleanup
# we generate initiatorname.iscsi on talos side.
rm -rf /rootfs/etc
rm -rf /rootfs/usr/local/{etc,share,include,pkgconfig}
rm -rf /rootfs/var
- |
mkdir -p /rootfs/usr/local/etc/containers
mkdir -p /rootfs/usr/local/lib/containers/iscsid
cp /pkg/iscsid.yaml /rootfs/usr/local/etc/containers/
test:
- |
mkdir -p /extensions-validator-rootfs
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
sbom:
outputPath: /rootfs/usr/local/share/spdx/open-iscsi.spdx.json
version: {{ .OPEN_ISCSI_VERSION }}
cpes:
- cpe:2.3:a:open-iscsi_project:open-iscsi:{{ .OPEN_ISCSI_VERSION }}:*:*:*:*:*:*:*
licenses:
- GPL-2.0
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /