Skip to content

Commit 881427b

Browse files
committed
chore(core): build glibc
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
1 parent c08ec06 commit 881427b

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

component_versions/version_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ package:
1111
nbdkit: 1.39.5
1212
gnutls: 3.8.6
1313
dmidecode: 3-6
14+
library:
15+
glibc: glibc-2.38
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
image: {{ $.ImageType }}/{{ $.ImageName }}
3+
final: false
4+
fromImage: builder/scratch
5+
import:
6+
- image: {{ $.ImageType }}/{{ $.ImageName }}-builder
7+
add: /out
8+
to: /glibc
9+
before: setup
10+
11+
---
12+
{{- $version := get $.Library $.ImageName }}
13+
{{- $gitRepoUrl := "glibc.git" }}
14+
15+
{{- $name := print $.ImageName "-dependencies" -}}
16+
{{- define "$name" -}}
17+
packages:
18+
- gcc
19+
- git pkg-config cmake
20+
- hardlink binutils glibc-kernheaders
21+
- make bison python3
22+
- tree
23+
{{- end -}}
24+
25+
{{ $builderDependencies := include "$name" . | fromYaml }}
26+
27+
image: {{ $.ImageType }}/{{ $.ImageName }}-builder
28+
final: false
29+
fromImage: builder/alt
30+
secrets:
31+
- id: SOURCE_REPO
32+
value: {{ $.SOURCE_REPO_GIT }}
33+
shell:
34+
beforeInstall:
35+
- |
36+
apt-get update && apt-get install -y \
37+
{{ $builderDependencies.packages | join " " }}
38+
rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org* /var/cache/apt/*.bin
39+
40+
install:
41+
- |
42+
OUTDIR=/out
43+
mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config
44+
45+
git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src
46+
47+
mkdir /build
48+
cd /build
49+
50+
../src/configure \
51+
--prefix=/usr \
52+
--libdir=/usr/lib64 \
53+
--disable-crypt \
54+
--disable-profile \
55+
--enable-bind-now \
56+
--enable-obsolete-rpc \
57+
--enable-stack-protector=strong \
58+
--enable-fortify-source=3 \
59+
60+
make -j$(nproc)
61+
62+
make DESTDIR=$OUTDIR install
63+
64+
tree $OUTDIR
65+

0 commit comments

Comments
 (0)