-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,667 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
#### system/cos system/cos-container and recovery/cos start here | ||
{{ if or (eq .Values.name "cos-container") (eq .Values.name "cos" ) }} | ||
requires: | ||
- name: "cos-setup" | ||
category: "system" | ||
version: ">=0" | ||
- name: "installer" | ||
category: "utils" | ||
version: ">=0" | ||
- name: "cloud-config" | ||
category: "system" | ||
version: ">=0" | ||
- name: "immutable-rootfs" | ||
category: "system" | ||
version: ">=0" | ||
- name: "cos-features" | ||
category: "system" | ||
version: ">=0" | ||
- name: "grub2-config" | ||
category: "system" | ||
version: ">=0" | ||
- name: "base-dracut-modules" | ||
category: "system" | ||
version: ">=0" | ||
- name: "kernel" | ||
category: "system" | ||
version: ">=0" | ||
- name: "dracut-initrd" | ||
category: "system" | ||
version: ">=0" | ||
|
||
# https://luet-lab.github.io/docs/docs/concepts/packages/specfile/#copy | ||
copy: | ||
- package: | ||
category: "toolchain" | ||
name: "yip" | ||
version: ">=0" | ||
source: "/usr/bin/yip" | ||
destination: "/usr/bin/yip" | ||
- package: | ||
category: "toolchain" | ||
name: "luet" | ||
version: ">=0" | ||
source: "/usr/bin/luet" | ||
destination: "/usr/bin/luet" | ||
- package: | ||
category: "toolchain" | ||
name: "luet-mtree" | ||
version: ">=0" | ||
source: "/usr/bin/luet-mtree" | ||
destination: "/usr/bin/luet-mtree" | ||
- package: | ||
category: "toolchain" | ||
name: "yq" | ||
version: ">=0" | ||
source: "/usr/bin/yq" | ||
destination: "/usr/bin/yq" | ||
- package: | ||
category: "toolchain" | ||
name: "cosign" | ||
version: ">=0" | ||
source: "/usr/bin/cosign" | ||
destination: "/usr/bin/cosign" | ||
- package: | ||
category: "toolchain" | ||
name: "luet-cosign" | ||
version: ">=0" | ||
source: "/usr/bin/luet-cosign" | ||
destination: "/usr/bin/luet-cosign" | ||
|
||
# Templated package https://luet-lab.github.io/docs/docs/concepts/packages/templates/ | ||
steps: | ||
- sed -i 's/:BRANDING:/{{.Values.brand_name}}/g' setup.yaml | ||
- sed -i 's/:VERSION:/{{.Values.version}}/g' setup.yaml | ||
- sed -i 's/:PRETTY_NAME:/{{.Values.brand_name}} v{{.Values.version}}/g' setup.yaml | ||
- yip setup.yaml | ||
|
||
# See https://luet-lab.github.io/docs/docs/concepts/packages/specfile/#package-by-container-content | ||
unpack: true | ||
|
||
# Files to exclude from the final | ||
# artifact | ||
# See also: https://luet-lab.github.io/docs/docs/concepts/packages/specfile/#excludingincluding-files-explictly | ||
excludes: | ||
- ^/var/cache/luet | ||
- ^/luetbuild | ||
- ^/srv/.* | ||
- ^/root/.bash_history | ||
- ^/run/reboot-needed | ||
|
||
# Zypper | ||
- ^/var/lib/zypp | ||
- ^/var/cache/zypp | ||
- ^/usr/share/zypper | ||
- ^/usr/share/zypp | ||
- ^/usr/share/zsh | ||
- ^/usr/share/licenses/zypper | ||
- ^/usr/bin/zypp-.* | ||
- ^/usr/bin/zypper | ||
- ^/usr/lib/zypp$ | ||
- ^/usr/lib/zypper | ||
- ^/usr/lib/rpm | ||
- ^/usr/bin/yzpper | ||
- ^/usr/sbin/zypp-.* | ||
- ^/usr/bin/zypp-.* | ||
- ^/usr/bin/susetags2solv | ||
- ^/run/zypp.* | ||
- ^/etc/zypp | ||
- ^/usr/bin/rpm.* | ||
- ^/var/lib/rpm | ||
- ^/usr/lib64/rpm-plugins | ||
# Yast | ||
- ^/var/lib/YaST2 | ||
|
||
#- ^/usr/local | ||
- ^/usr/local/bin | ||
- ^/usr/local/go | ||
- ^/usr/local/include | ||
- ^/usr/local/lib.* | ||
- ^/usr/local/man | ||
- ^/usr/local/sbin | ||
- ^/usr/local/share | ||
- ^/usr/local/src | ||
- ^/usr/local/games | ||
|
||
- ^/etc/hostname | ||
- ^/etc/machine-id | ||
|
||
{{ if eq .Values.name "cos-container" }} | ||
|
||
- ^/etc/hosts | ||
- ^/proc | ||
- ^/sys | ||
- ^/dev | ||
- ^/tmp | ||
- ^/run | ||
|
||
{{ else }} | ||
|
||
- ^/tmp/.* | ||
- ^/proc/.* | ||
- ^/sys/.* | ||
- ^/run/.* | ||
|
||
{{ end }} | ||
{{- end}} | ||
#### system/cos system/cos-container and recovery/cos end here | ||
|
||
#### recovery/cos-img starts here | ||
{{ if eq .Values.name "cos-img" }} | ||
requires: | ||
- category: "recovery" | ||
name: "cos" | ||
version: ">=0" | ||
copy: | ||
- package: | ||
category: "recovery" | ||
name: "cos-squash" | ||
version: ">=0" | ||
source: "/." | ||
destination: "/recovery" | ||
|
||
package_dir: "/output" | ||
steps: | ||
- mkdir /output | ||
- mksquashfs /recovery /output/recovery.squashfs -b 1024k -comp xz -Xbcj x86 | ||
{{- end}} | ||
#### recovery/cos-img ends here | ||
|
||
#### recovery/cos-squash starts here | ||
{{ if eq .Values.name "cos-squash" }} | ||
requires: | ||
- category: "recovery" | ||
name: "cos" | ||
version: ">=0" | ||
|
||
requires_final_images: true | ||
unpack: true | ||
|
||
excludes: | ||
- ^/var/cache/luet | ||
- ^/luetbuild | ||
{{- end}} | ||
#### recovery/cos-squash ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
packages: | ||
- &cos | ||
name: "cos" | ||
category: "system" | ||
version: 0.7.9999 | ||
description: "cOS base image, used to build cOS live ISOs" | ||
brand_name: "cOS" | ||
labels: | ||
autobump.revdeps: "true" | ||
autobump.revbump_related: "recovery/cos-img recovery/cos-squash" | ||
- !!merge <<: *cos | ||
name: "cos-container" | ||
description: "cOS container image, used to build cOS derivatives from scratch" | ||
- !!merge <<: *cos | ||
category: "recovery" | ||
brand_name: "cOS recovery" | ||
description: "cOS recovery image, used to boot cOS for troubleshooting" | ||
- !!merge <<: *cos | ||
name: "cos-img" | ||
category: "recovery" | ||
- !!merge <<: *cos | ||
name: "cos-squash" | ||
category: "recovery" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
stages: | ||
default: | ||
- name: "Default systemd config" | ||
systemd: | ||
enable: | ||
- multi-user.target | ||
- getty@tty1 | ||
mask: | ||
- purge-kernels | ||
commands: | ||
- systemctl set-default multi-user.target | ||
- name: "Setup os-release" | ||
files: | ||
- path: /etc/os-release | ||
permissions: 0644 | ||
owner: 0 | ||
group: 0 | ||
environment_file: /etc/os-release | ||
environment: | ||
NAME: ":BRANDING:" | ||
ID: ":BRANDING:" | ||
ANSI_COLOR: "0;32" | ||
BUG_REPORT_URL: "https://github.com/mudler/cOS/issues" | ||
HOME_URL: "https://github.com/mudler/cOS" | ||
DOCUMENTATION_URL: "https://github.com/mudler/cOS" | ||
VERSION: ":VERSION:" | ||
PRETTY_NAME: ":PRETTY_NAME:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
requires: | ||
- name: "base" | ||
category: "distro" | ||
version: ">=0" | ||
|
||
steps: | ||
- mkdir /usr/lib/cos | ||
- cp -rfv installer.sh /usr/sbin/cos-installer && chmod +x /usr/sbin/cos-installer | ||
- cp -rfv upgrade.sh /usr/sbin/cos-upgrade && chmod +x /usr/sbin/cos-upgrade | ||
- cp -rfv reset.sh /usr/sbin/cos-reset && chmod +x /usr/sbin/cos-reset | ||
- cp -rfv cos.sh /usr/sbin/cos && chmod +x /usr/sbin/cos | ||
- cp -rfv deploy.sh /usr/sbin/cos-deploy && chmod +x /usr/sbin/cos-deploy | ||
- cp -rfv suc-upgrade.sh /usr/sbin/suc-upgrade && chmod +x /usr/sbin/suc-upgrade | ||
- cp -rfv rebrand.sh /usr/sbin/cos-rebrand && chmod +x /usr/sbin/cos-rebrand | ||
{{ if .Values.codename }} | ||
- sed -i 's/:FLAVOR:/{{.Values.codename}}/g' /usr/sbin/cos | ||
{{end}} |
Oops, something went wrong.