This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwolfi-baselayout.yaml
59 lines (53 loc) · 1.99 KB
/
wolfi-baselayout.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
49
50
51
52
53
54
55
56
57
58
59
package:
name: wolfi-baselayout
version: 1
epoch: 0
description: "baselayout data for stage2"
target-architecture:
- all
copyright:
- paths:
- "*"
attestation: TODO
license: MIT
dependencies:
runtime:
environment:
contents:
repositories:
- https://mirrors.edge.kernel.org/alpine/edge/main
keyring:
- /usr/share/apk/keys/x86_64/[email protected]
- /usr/share/apk/keys/x86_64/[email protected]
- /usr/share/apk/keys/x86_64/[email protected]
- /usr/share/apk/keys/aarch64/[email protected]
- /usr/share/apk/keys/aarch64/[email protected]
- /usr/share/apk/keys/armv7/[email protected]
- /usr/share/apk/keys/armv7/[email protected]
packages:
- alpine-baselayout
- busybox
- ssl_client
pipeline:
- name: Generate /etc/shadow
runs: |
awk -F: '{
pw = ":!:"
if ($1 == "root") { pw = "::" }
print($1 pw ":0:::::")
}' vendor/etc/passwd > vendor/etc/shadow
- name: Install
runs: |
for i in bin etc etc/profile.d home lib root var usr/bin usr/sbin usr/local tmp var/spool/cron; do
mkdir -p "${{targets.destdir}}"/${i}
done
for i in lib64 usr/lib64 usr/local/lib64; do
ln -s lib "${{targets.destdir}}"/${i}
done
for i in etc/passwd etc/group etc/shadow etc/services etc/hosts etc/profile etc/shells etc/protocols etc/inittab etc/profile.d/locale.sh; do
install -m644 vendor/${i} "${{targets.destdir}}"/${i}
done
install -m600 vendor/etc/shadow "${{targets.destdir}}"/etc/shadow
ln -s /etc/crontabs "${{targets.destdir}}"/var/spool/cron/crontabs
ln -s /proc/mounts "${{targets.destdir}}"/etc/mtab
ln -s /var/mail "${{targets.destdir}}"/var/spool/mail