From bbb12f255ac5f7c6dd95606e6e14af17a53d2a4f Mon Sep 17 00:00:00 2001 From: Cristovao Cordeiro <cristovao.cordeiro@canonical.com> Date: Wed, 12 Jul 2023 10:58:45 +0200 Subject: [PATCH 1/5] feat: add slice definitions file for base-files --- slices/base-files.yaml | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 slices/base-files.yaml diff --git a/slices/base-files.yaml b/slices/base-files.yaml new file mode 100644 index 000000000..9eb602d56 --- /dev/null +++ b/slices/base-files.yaml @@ -0,0 +1,61 @@ +package: base-files + +slices: + base: + essential: + - base-files_etc + - base-files_bin + - base-files_lib + - base-files_tmp + - base-files_var + - base-files_home + + etc: + contents: + /etc/: + + bin: + contents: + /bin/: + /sbin/: + /usr/bin/: + /usr/sbin/: + + lib: + contents: + /lib/: + /usr/lib/: + + tmp: + contents: + /tmp/: + + var: + contents: + /run/: + /var/cache/: + /var/lib/: + /var/log/: + /var/run/: + /var/tmp/: + + home: + contents: + /home/: + /root/: + + release-info: + essential: + - base-files_etc + - base-files_lib + contents: + /etc/debian_version: + /etc/dpkg/origins/debian: + /etc/dpkg/origins/ubuntu: + /etc/dpkg/origins/default: {symlink: /etc/dpkg/origins/ubuntu} + /etc/host.conf: + /etc/issue: + /etc/issue.net: + /etc/lsb-release: + /etc/os-release: + /usr/lib/os-release: From 1db321e70a4f063238dc40a083b65017d5016feb Mon Sep 17 00:00:00 2001 From: Cristovao Cordeiro <cristovao.cordeiro@canonical.com> Date: Wed, 12 Jul 2023 11:04:09 +0200 Subject: [PATCH 2/5] feat: add slice definitions file for ca-certificates --- slices/ca-certificates.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 slices/ca-certificates.yaml diff --git a/slices/ca-certificates.yaml b/slices/ca-certificates.yaml new file mode 100644 index 000000000..bdd36c7a6 --- /dev/null +++ b/slices/ca-certificates.yaml @@ -0,0 +1,12 @@ +package: ca-certificates + +slices: + data: + contents: + /etc/ssl/certs/ca-certificates.crt: {text: FIXME, mutable: true} + /usr/share/ca-certificates/mozilla/: {until: mutate} + /usr/share/ca-certificates/mozilla/*: {until: mutate} + mutate: | + certs_dir = "/usr/share/ca-certificates/mozilla/" + certs = [content.read(certs_dir + path) for path in content.list(certs_dir)] + content.write("/etc/ssl/certs/ca-certificates.crt", "".join(certs)) From 991fd73e69c71f3622a370743a6235bf5ad8c211 Mon Sep 17 00:00:00 2001 From: Cristovao Cordeiro <cristovao.cordeiro@canonical.com> Date: Wed, 12 Jul 2023 11:25:40 +0200 Subject: [PATCH 3/5] feat: add slice definitions file for libc6 --- slices/libc6.yaml | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 slices/libc6.yaml diff --git a/slices/libc6.yaml b/slices/libc6.yaml new file mode 100644 index 000000000..6a7ff1443 --- /dev/null +++ b/slices/libc6.yaml @@ -0,0 +1,51 @@ +package: libc6 + +slices: + config: + contents: + /etc/ld.so.conf.d/*-linux-*.conf: + + libs: + contents: + /lib/*-linux-*/ld-*.*.so: + /lib/*-linux-*/ld-*.so.*: + /lib/*-linux-*/libBrokenLocale-*.*.so: + /lib/*-linux-*/libBrokenLocale.so.*: + /lib/*-linux-*/libSegFault.so: + /lib/*-linux-*/libanl-*.*.so: + /lib/*-linux-*/libanl.so.*: + /lib/*-linux-*/libc-*.*.so: + /lib/*-linux-*/libc.so.*: + /lib/*-linux-*/libdl-*.*.so: + /lib/*-linux-*/libdl.so.*: + /lib/*-linux-*/libm-*.*.so: + /lib/*-linux-*/libm.so.*: + /lib/*-linux-*/libmemusage.so: + /lib/*-linux-*/libmvec-*.*.so: {arch: amd64} + /lib/*-linux-*/libmvec.so.*: {arch: amd64} + /lib/*-linux-*/libnsl-*.*.so: + /lib/*-linux-*/libnsl.so.*: + /lib/*-linux-*/libnss_compat-*.*.so: + /lib/*-linux-*/libnss_compat.so.*: + /lib/*-linux-*/libnss_dns-*.*.so: + /lib/*-linux-*/libnss_dns.so.*: + /lib/*-linux-*/libnss_files-*.*.so: + /lib/*-linux-*/libnss_files.so.*: + /lib/*-linux-*/libnss_hesiod-*.*.so: + /lib/*-linux-*/libnss_hesiod.so.*: + /lib/*-linux-*/libnss_nis-*.*.so: + /lib/*-linux-*/libnss_nis.so.*: + /lib/*-linux-*/libnss_nisplus-*.*.so: + /lib/*-linux-*/libnss_nisplus.so.*: + /lib/*-linux-*/libpcprofile.so: + /lib/*-linux-*/libpthread-*.*.so: + /lib/*-linux-*/libpthread.so.*: + /lib/*-linux-*/libresolv-*.*.so: + /lib/*-linux-*/libresolv.so.*: + /lib/*-linux-*/librt-*.*.so: + /lib/*-linux-*/librt.so.*: + /lib/*-linux-*/libthread_db-*.*.so: + /lib/*-linux-*/libthread_db*.so.*: + /lib/*-linux-*/libutil-*.*.so: + /lib/*-linux-*/libutil.so.*: + /lib*/ld*.so.*: From 04f5031ed3e9d194ae6af387fe0feb86a0b60f9d Mon Sep 17 00:00:00 2001 From: Cristovao Cordeiro <cristovao.cordeiro@canonical.com> Date: Wed, 12 Jul 2023 11:28:52 +0200 Subject: [PATCH 4/5] feat: add slice definitions file for libgcc-s1 --- slices/libgcc-s1.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 slices/libgcc-s1.yaml diff --git a/slices/libgcc-s1.yaml b/slices/libgcc-s1.yaml new file mode 100644 index 000000000..bb1e03435 --- /dev/null +++ b/slices/libgcc-s1.yaml @@ -0,0 +1,8 @@ +package: libgcc-s1 + +slices: + libs: + essential: + - libc6_libs + contents: + /lib/*-linux-*/libgcc_s.so.*: From 05fda60ab0c279bb452d636eea4d384cc2037789 Mon Sep 17 00:00:00 2001 From: Cristovao Cordeiro <cristovao.cordeiro@canonical.com> Date: Wed, 12 Jul 2023 12:36:18 +0200 Subject: [PATCH 5/5] feat: add slice definitions file for base-passwd --- slices/base-passwd.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 slices/base-passwd.yaml diff --git a/slices/base-passwd.yaml b/slices/base-passwd.yaml new file mode 100644 index 000000000..0e6d4e3c4 --- /dev/null +++ b/slices/base-passwd.yaml @@ -0,0 +1,14 @@ +package: base-passwd + +slices: + data: + contents: + /usr/share/base-passwd/group.master: {until: mutate} + /usr/share/base-passwd/passwd.master: {until: mutate} + /etc/group: {text: FIXME, mutable: true} + /etc/passwd: {text: FIXME, mutable: true} + mutate: | + gr = content.read("/usr/share/base-passwd/group.master") + content.write("/etc/group", gr) + pw = content.read("/usr/share/base-passwd/passwd.master") + content.write("/etc/passwd", pw)