forked from siderolabs/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkg.yaml
48 lines (47 loc) · 1.89 KB
/
pkg.yaml
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
name: mdadm
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/systemd-udevd:{{ .BUILD_ARG_PKGS }}"
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/util-linux:{{ .BUILD_ARG_PKGS }}"
steps:
- sources:
- url: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-{{ .MDADM_VERSION }}.tar.gz
destination: mdadm.tar.gz
sha256: 61a1c22477555364dea1862df7c3b4e8b9a53ee733bad320a45fda27dd0ed44f
sha512: a77af2b371ed27b7bd89b7991302282f0fc77999eb93d7959446fc4b1c28388582d08ff0abfc470a9f9a8c8036acb0158edc44d9a8d406f807ca28111bf74459
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
tar -xzf mdadm.tar.gz --strip-components=1
- |
patch -p1 < /pkg/patches/mdadm-include-sysmacros.patch
patch -p1 < /pkg/patches/no-werror.patch
patch -p1 < /pkg/patches/musl-125.patch
patch -p1 < /pkg/patches/exit-gracefully-when-md-device-not-found.patch
build:
- |
mkdir -p /run/mdadm
CXFLAGS=-D_LARGEFILE64_SOURCE \
make -j $(nproc) mdadm
make -j $(nproc) mdmon
install:
- |
mkdir -p /rootfs/usr/local/sbin /rootfs/usr/lib/udev/rules.d
cp mdadm /rootfs/usr/local/sbin/mdadm
cp mdmon /rootfs/usr/local/sbin/mdmon
cp /pkg/files/udev-md-raid-arrays.rules /rootfs/usr/lib/udev/rules.d/63-md-raid-arrays.rules
cp /pkg/files/udev-md-raid-assembly.rules /rootfs/usr/lib/udev/rules.d/64-md-raid-assembly.rules
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}"
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /