Skip to content

Commit 37b281d

Browse files
authored
chore(core): build glibc (#1011)
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
1 parent 28e7f51 commit 37b281d

2 files changed

Lines changed: 63 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,6 +11,7 @@ package:
1111
nbdkit: 1.39.5
1212
gnutls: 3.8.6
1313
dmidecode: 3-6
14+
glibc: glibc-2.38
1415
glib2: 2.82.5
1516
acl: 2.3.1
1617
bzip2: bzip2-1.0.8
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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 $.Package $.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+
{{- 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: {{ $.SOURCE_REPO_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 {{ $version }} /src
45+
46+
mkdir /build
47+
cd /build
48+
49+
../src/configure \
50+
--prefix=/usr \
51+
--libdir=/usr/lib64 \
52+
--disable-crypt \
53+
--disable-profile \
54+
--enable-bind-now \
55+
--enable-obsolete-rpc \
56+
--enable-stack-protector=strong \
57+
--enable-fortify-source=3 \
58+
59+
make -j$(nproc)
60+
61+
make DESTDIR=$OUTDIR install
62+

0 commit comments

Comments
 (0)