Skip to content

Commit 8896083

Browse files
committed
chore(core): build acl
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
1 parent ee4e9b9 commit 8896083

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

component_versions/version_map.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ package:
1111
nbdkit: 1.39.5
1212
gnutls: 3.8.6
1313
dmidecode: 3-6
14+
acl: 2.3.1
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
image: {{ $.ImageType }}/{{ $.ImageName }}
3+
final: false
4+
fromImage: builder/scratch
5+
import:
6+
- image: {{ $.ImageType }}/{{ $.ImageName }}-builder
7+
add: /out
8+
to: /{{ $.ImageName }}
9+
before: setup
10+
11+
---
12+
{{- $version := get $.Package $.ImageName }}
13+
{{- $gitRepoUrl := "acl.git" }}
14+
15+
{{- $name := print $.ImageName "-dependencies" -}}
16+
{{- define "$name" -}}
17+
packages:
18+
- gcc
19+
- git gettext-tools autoconf libtool gcc make
20+
- libattr-devel
21+
- tree
22+
{{- end -}}
23+
24+
{{ $builderDependencies := include "$name" . | fromYaml }}
25+
26+
image: {{ $.ImageType }}/{{ $.ImageName }}-builder
27+
final: false
28+
fromImage: builder/alt
29+
secrets:
30+
- id: SOURCE_REPO
31+
value: "https://git.savannah.nongnu.org/git"
32+
shell:
33+
beforeInstall:
34+
- |
35+
apt-get update && apt-get install -y \
36+
{{ $builderDependencies.packages | join " " }}
37+
rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org* /var/cache/apt/*.bin
38+
39+
install:
40+
- |
41+
OUTDIR=/out
42+
mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config
43+
44+
git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src
45+
cd /src
46+
47+
./autogen.sh
48+
49+
./configure \
50+
--prefix=/usr \
51+
--libdir=/usr/lib64 \
52+
53+
make -j$(nproc)
54+
55+
make DESTDIR=$OUTDIR install
56+
57+
strip $OUTDIR/usr/bin/*
58+
59+
tree $OUTDIR
60+
61+
# We don't need man, test and samples files
62+
rm -rf $OUTDIR/usr/include
63+
rm -rf $OUTDIR/usr/share
64+
rm -rf $OUTDIR/usr/lib64/pkgconfig
65+
rm -rf $OUTDIR/usr/lib64
66+
rm -rf $OUTDIR/usr/bin/chacl
67+
68+
tree $OUTDIR
69+

0 commit comments

Comments
 (0)