1+ name : multipath-tools
2+ variant : scratch
3+ shell : /bin/bash
4+ dependencies :
5+ - stage : base
6+ - image : " {{ .BUILD_ARG_PKGS_PREFIX }}/systemd-udevd:{{ .BUILD_ARG_PKGS }}"
7+ - image : " {{ .BUILD_ARG_PKGS_PREFIX }}/libjson-c:{{ .BUILD_ARG_PKGS }}"
8+ - image : " {{ .BUILD_ARG_PKGS_PREFIX }}/lvm2:{{ .BUILD_ARG_PKGS }}"
9+ - image : " {{ .BUILD_ARG_PKGS_PREFIX }}/liburcu:{{ .BUILD_ARG_PKGS }}"
10+ - image : " {{ .BUILD_ARG_PKGS_PREFIX }}/libaio:{{ .BUILD_ARG_PKGS }}"
11+ steps :
12+ - sources :
13+ - url : https://github.com/opensvc/multipath-tools/archive/refs/tags/{{ .MULTIPATH_TOOLS_VERSION }}.tar.gz
14+ destination : multipath-tools.tar.gz
15+ sha256 : {{ .MULTIPATH_TOOLS_SHA256 }}
16+ sha512 : {{ .MULTIPATH_TOOLS_SHA512 }}
17+ env :
18+ PKG_CONFIG_PATH : /usr/lib/pkgconfig
19+ prepare :
20+ - |
21+ sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
22+ - |
23+ tar -xzf multipath-tools.tar.gz --strip-components=1
24+ # This removes a dependency on libgcc
25+ - |
26+ patch -p1 < /pkg/patches/disable-exception-handling.patch
27+ build :
28+ - |
29+ make -j $(nproc) prefix="/usr/local" \
30+ sysconfdir="/etc" \
31+ configdir="/etc/multipath/conf.d" \
32+ mandir="/usr/share/man" \
33+ infodir="/usr/share/info" \
34+ statedir="/etc/multipath" \
35+ etc_prefix="" \
36+ LIB=lib \
37+ SYSTEMD=""
38+ install :
39+ - |
40+ mkdir -p /rootfs/usr/local/lib/containers/multipathd/etc/multipath
41+ cp /pkg/bindings /rootfs/usr/local/lib/containers/multipathd/etc/multipath/bindings
42+ make prefix="/usr/local" DESTDIR=/rootfs LIB=lib install
43+ - |
44+ mkdir -p /rootfs/usr/local/etc/containers
45+ cp /pkg/multipathd.yaml /rootfs/usr/local/etc/containers/
46+ # Remove kernel module loading config
47+ - |
48+ rm /rootfs/usr/lib/modules-load.d/multipath.conf
49+ rmdir /rootfs/usr/lib/modules-load.d
50+ # Remove unnecessary docs and includes
51+ - |
52+ rm -rf /rootfs/usr/local/share
53+ rm -rf /rootfs/usr/local/include
54+ # This file tries to create a tmpfs mount at `/var/run/multipath`.
55+ - |
56+ rm /rootfs/usr/lib/tmpfiles.d/multipath.conf
57+ rmdir /rootfs/usr/lib/tmpfiles.d
58+ # Removed but might be needed by other users of multipath-tools
59+ - |
60+ rm /rootfs/usr/lib/udev/kpartx_id
61+ test :
62+ - |
63+ mkdir -p /extensions-validator-rootfs
64+ cp -r /rootfs/ /extensions-validator-rootfs/rootfs
65+ cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
66+ /extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
67+ finalize :
68+ - from : /rootfs
69+ to : /rootfs
70+ - from : /pkg/manifest.yaml
71+ to : /
0 commit comments