diff --git a/slices/erlang-asn1.yaml b/slices/erlang-asn1.yaml new file mode 100644 index 000000000..bd3d2f2d1 --- /dev/null +++ b/slices/erlang-asn1.yaml @@ -0,0 +1,17 @@ +package: erlang-asn1 + +essential: + - erlang-asn1_copyright + +slices: + modules: + essential: + - erlang-base_bins + - libc6_libs + contents: + /usr/lib/erlang/lib/asn1-*/ebin/**: + /usr/lib/erlang/lib/asn1-*/priv/**: + + copyright: + contents: + /usr/share/doc/erlang-asn1/copyright: diff --git a/slices/erlang-base.yaml b/slices/erlang-base.yaml new file mode 100644 index 000000000..b87a7144f --- /dev/null +++ b/slices/erlang-base.yaml @@ -0,0 +1,41 @@ +package: erlang-base + +essential: + - erlang-base_copyright + +slices: + bins: + essential: + - erlang-base_modules + - libc6_libs + - libgcc-s1_libs + - libstdc++6_libs + - libsystemd0_libs + - libtinfo6_libs + - zlib1g_libs + contents: + /usr/bin/epmd: + /usr/bin/erl: + /usr/bin/erl_call: + /usr/bin/erlc: + /usr/bin/escript: + /usr/bin/run_erl: + /usr/bin/start_embedded: + /usr/bin/to_erl: + /usr/lib/erlang/bin/**: + /usr/lib/erlang/erts-*/bin/**: + /usr/lib/erlang/lib/erl_interface-*/bin/erl_call: + + modules: + contents: + /usr/lib/erlang/lib/compiler-*/ebin/**: + /usr/lib/erlang/lib/erts-*/ebin/**: + /usr/lib/erlang/lib/kernel-*/ebin/**: + /usr/lib/erlang/lib/sasl-*/ebin/**: + /usr/lib/erlang/lib/stdlib-*/ebin/**: + /usr/lib/erlang/lib/stdlib-*/include/**: + /usr/lib/erlang/releases/**: + + copyright: + contents: + /usr/share/doc/erlang-base/copyright: diff --git a/slices/erlang-crypto.yaml b/slices/erlang-crypto.yaml new file mode 100644 index 000000000..ae0a5c35a --- /dev/null +++ b/slices/erlang-crypto.yaml @@ -0,0 +1,18 @@ +package: erlang-crypto + +essential: + - erlang-crypto_copyright + +slices: + modules: + essential: + - erlang-base_bins + - libc6_libs + - libssl3t64_libs + contents: + /usr/lib/erlang/lib/crypto-*/ebin/**: + /usr/lib/erlang/lib/crypto-*/priv/lib/**: + + copyright: + contents: + /usr/share/doc/erlang-crypto/copyright: diff --git a/slices/erlang-eldap.yaml b/slices/erlang-eldap.yaml new file mode 100644 index 000000000..9275bd41a --- /dev/null +++ b/slices/erlang-eldap.yaml @@ -0,0 +1,17 @@ +package: erlang-eldap + +essential: + - erlang-eldap_copyright + +slices: + modules: + essential: + - erlang-asn1_modules + - erlang-base_bins + - erlang-ssl_modules + contents: + /usr/lib/erlang/lib/eldap-*/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-eldap/copyright: diff --git a/slices/erlang-ftp.yaml b/slices/erlang-ftp.yaml new file mode 100644 index 000000000..505dc5911 --- /dev/null +++ b/slices/erlang-ftp.yaml @@ -0,0 +1,17 @@ +package: erlang-ftp + +essential: + - erlang-ftp_copyright + +slices: + modules: + essential: + - erlang-base_bins + - erlang-runtime-tools_modules + - erlang-ssl_modules + contents: + /usr/lib/erlang/lib/ftp-*/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-ftp/copyright: diff --git a/slices/erlang-inets.yaml b/slices/erlang-inets.yaml new file mode 100644 index 000000000..48e00e92c --- /dev/null +++ b/slices/erlang-inets.yaml @@ -0,0 +1,27 @@ +package: erlang-inets + +essential: + - erlang-inets_copyright + +slices: + scripts: + essential: + - erlang-inets_modules + contents: + /usr/lib/erlang/lib/inets-*/priv/bin/runcgi.sh: + + modules: + essential: + - erlang-base_bins + - erlang-ftp_modules + - erlang-mnesia_modules + - erlang-runtime-tools_modules + - erlang-ssl_modules + - erlang-tftp_modules + contents: + /usr/lib/erlang/lib/inets-*/ebin/**: + /usr/lib/erlang/lib/inets-*/include/**: + + copyright: + contents: + /usr/share/doc/erlang-inets/copyright: diff --git a/slices/erlang-mnesia.yaml b/slices/erlang-mnesia.yaml new file mode 100644 index 000000000..b35be401e --- /dev/null +++ b/slices/erlang-mnesia.yaml @@ -0,0 +1,15 @@ +package: erlang-mnesia + +essential: + - erlang-mnesia_copyright + +slices: + modules: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/mnesia-*/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-mnesia/copyright: diff --git a/slices/erlang-os-mon.yaml b/slices/erlang-os-mon.yaml new file mode 100644 index 000000000..f5f0e3b14 --- /dev/null +++ b/slices/erlang-os-mon.yaml @@ -0,0 +1,24 @@ +package: erlang-os-mon + +essential: + - erlang-os-mon_copyright + +slices: + bins: + essential: + - erlang-os-mon_modules + contents: + /usr/lib/erlang/lib/os_mon-*/priv/**: + + modules: + essential: + - erlang-base_bins + - erlang-mnesia_modules + - erlang-snmp_bins + - libc6_libs + contents: + /usr/lib/erlang/lib/os_mon-*/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-os-mon/copyright: diff --git a/slices/erlang-parsetools.yaml b/slices/erlang-parsetools.yaml new file mode 100644 index 000000000..e596a3ef4 --- /dev/null +++ b/slices/erlang-parsetools.yaml @@ -0,0 +1,15 @@ +package: erlang-parsetools + +essential: + - erlang-parsetools_copyright + +slices: + modules: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/parsetools-*/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-parsetools/copyright: diff --git a/slices/erlang-public-key.yaml b/slices/erlang-public-key.yaml new file mode 100644 index 000000000..fbca6ff44 --- /dev/null +++ b/slices/erlang-public-key.yaml @@ -0,0 +1,17 @@ +package: erlang-public-key + +essential: + - erlang-public-key_copyright + +slices: + modules: + essential: + - erlang-asn1_modules + - erlang-base_bins + - erlang-crypto_modules + contents: + /usr/lib/erlang/lib/public_key-*/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-public-key/copyright: diff --git a/slices/erlang-runtime-tools.yaml b/slices/erlang-runtime-tools.yaml new file mode 100644 index 000000000..9f885435c --- /dev/null +++ b/slices/erlang-runtime-tools.yaml @@ -0,0 +1,18 @@ +package: erlang-runtime-tools + +essential: + - erlang-runtime-tools_copyright + +slices: + modules: + essential: + - erlang-base_bins + - erlang-mnesia_modules + - libc6_libs + contents: + /usr/lib/erlang/lib/runtime_tools-*/ebin/**: + /usr/lib/erlang/lib/runtime_tools-*/priv/**: + + copyright: + contents: + /usr/share/doc/erlang-runtime-tools/copyright: diff --git a/slices/erlang-snmp.yaml b/slices/erlang-snmp.yaml new file mode 100644 index 000000000..a0095c818 --- /dev/null +++ b/slices/erlang-snmp.yaml @@ -0,0 +1,36 @@ +package: erlang-snmp + +essential: + - erlang-snmp_copyright + +slices: + bins: + essential: + - erlang-base_bins + - erlang-crypto_modules + - erlang-mnesia_modules + - erlang-runtime-tools_modules + - erlang-snmp_config + - erlang-snmp_data + - erlang-snmp_modules + contents: + /usr/bin/snmpc: + /usr/lib/erlang/lib/snmp-*/bin/snmpc: + + config: + contents: + /usr/lib/erlang/lib/snmp-*/priv/conf/**: + + data: + contents: + /usr/lib/erlang/lib/snmp-*/mibs/**: + /usr/lib/erlang/lib/snmp-*/priv/mibs/**: + + modules: + contents: + /usr/lib/erlang/lib/snmp-*/ebin/**: + /usr/lib/erlang/lib/snmp-*/include/**: + + copyright: + contents: + /usr/share/doc/erlang-snmp/copyright: diff --git a/slices/erlang-ssl.yaml b/slices/erlang-ssl.yaml new file mode 100644 index 000000000..af936e9f9 --- /dev/null +++ b/slices/erlang-ssl.yaml @@ -0,0 +1,18 @@ +package: erlang-ssl + +essential: + - erlang-ssl_copyright + +slices: + modules: + essential: + - erlang-base_bins + - erlang-crypto_modules + - erlang-public-key_modules + - erlang-runtime-tools_modules + contents: + /usr/lib/erlang/lib/ssl-*/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-ssl/copyright: diff --git a/slices/erlang-syntax-tools.yaml b/slices/erlang-syntax-tools.yaml new file mode 100644 index 000000000..0a392b737 --- /dev/null +++ b/slices/erlang-syntax-tools.yaml @@ -0,0 +1,16 @@ +package: erlang-syntax-tools + +essential: + - erlang-syntax-tools_copyright + +slices: + modules: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/syntax_tools-*/ebin/**: + /usr/lib/erlang/lib/syntax_tools-*/include/**: + + copyright: + contents: + /usr/share/doc/erlang-syntax-tools/copyright: diff --git a/slices/erlang-tftp.yaml b/slices/erlang-tftp.yaml new file mode 100644 index 000000000..5131b3f79 --- /dev/null +++ b/slices/erlang-tftp.yaml @@ -0,0 +1,15 @@ +package: erlang-tftp + +essential: + - erlang-tftp_copyright + +slices: + modules: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/tftp-*/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-tftp/copyright: diff --git a/slices/erlang-tools.yaml b/slices/erlang-tools.yaml new file mode 100644 index 000000000..95810a84c --- /dev/null +++ b/slices/erlang-tools.yaml @@ -0,0 +1,18 @@ +package: erlang-tools + +essential: + - erlang-tools_copyright + +slices: + modules: + essential: + - erlang-base_bins + - erlang-runtime-tools_modules + contents: + /usr/lib/erlang/lib/tools-*/ebin/**: + /usr/lib/erlang/lib/tools-*/emacs/**: + /usr/lib/erlang/lib/tools-*/priv/**: + + copyright: + contents: + /usr/share/doc/erlang-tools/copyright: diff --git a/slices/erlang-xmerl.yaml b/slices/erlang-xmerl.yaml new file mode 100644 index 000000000..264590dad --- /dev/null +++ b/slices/erlang-xmerl.yaml @@ -0,0 +1,15 @@ +package: erlang-xmerl + +essential: + - erlang-xmerl_copyright + +slices: + modules: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/xmerl-*/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-xmerl/copyright: diff --git a/slices/libpam-runtime.yaml b/slices/libpam-runtime.yaml index 58562cea9..fb9b5422f 100644 --- a/slices/libpam-runtime.yaml +++ b/slices/libpam-runtime.yaml @@ -18,17 +18,108 @@ slices: # pam-config and pam-defaults slices are only used for generation, and are useless # for anything else. - # Applications that need libpam for now should just rely on the config and var slices for now - - # until appropriate solution for emulating what pam-auth-update can do (or maybe something else). + # Emulate in part what pam-auth-update does. There is a short coming right now, we + # cannot include other files from other slices that install into + # /usr/share/pam-configs/* + # since this mutation script wont be able to access them as of writing. config: + essential: + - libpam-runtime_var contents: /etc/pam.conf: + /etc/pam.d/common-account: {text: '', mutable: true} + /etc/pam.d/common-auth: {text: '', mutable: true} + /etc/pam.d/common-password: {text: '', mutable: true} + /etc/pam.d/common-session: {text: '', mutable: true} + /etc/pam.d/common-session-noninteractive: {text: '', mutable: true} /etc/pam.d/other: - - # folders expected by libpam to exist - var: - contents: - /var/lib/pam/: + /usr/share/pam-configs/unix: { until: mutate } + /usr/share/pam/common-account: { until: mutate } + /usr/share/pam/common-auth: { until: mutate } + /usr/share/pam/common-password: { until: mutate } + /usr/share/pam/common-session: { until: mutate } + /usr/share/pam/common-session-noninteractive: { until: mutate } + mutate: | + def parse_type(t): + strippedValue = t[1].strip() + if t[0] == "Auth-Type": + return ["auth", strippedValue] + elif t[0] == "Account-Type": + return ["account", strippedValue] + elif t[0] == "Session-Type": + return ["session-noninteractive", strippedValue] + elif t[0] == "Password-Type": + return ["password", strippedValue] + return [] + confs_dir = "/usr/share/pam-configs/" + confs = content.list(confs_dir) + confdata = {} + for x in confs: + conf = content.read(confs_dir + x) + lines = conf.splitlines() + m = "" + p = "" + t = "" + for i in range(len(lines)): + vals = lines[i].split(":") + if vals[0] == "Priority": + p = vals[1].strip() + elif vals[0] in ["Auth-Type", "Account-Type", "Session-Type", "Password-Type"]: + m, t = parse_type(vals) + elif vals[0] == "Session-Interactive-Only": + if vals[1].strip() == "yes": + m = "session" + elif vals[0] in ["Auth", "Account", "Session", "Password"]: + d = [] + for j in range(i + 1, len(lines)): + if ":" in lines[j]: + break + d.append(lines[j]) + confdata[m] = {t: {p: d}} + def reconfigure_data_line(section, line, i): + res = "" + upd = line.replace("success=end", "success=" + str(i)) + if section == "session-noninteractive": + res += "session" + upd + "\n" + else: + res += section + upd + "\n" + return res + def build_block(data, section, block, existing): + si = 1 + res = existing + if section in data: + types = data[section] + if block in types: + # get the keys (which are the priorities) and + # then reverse sort them to get the highest priority + # first + itemsByPriority = types[block] + keys = itemsByPriority.keys() + keys = sorted(keys, reverse=True) + for p in keys: + for d in itemsByPriority[p]: + res = reconfigure_data_line(section, d, si) + "\n" + si += 1 + # no primary block, so output a stock pam_permit line + # to keep the stack intact + if res == "" and block == "Primary": + return reconfigure_data_line(section, "\t[default=1]\t\t\tpam_permit.so\n", 1); + return res + fnames = ["account", "auth", "password", "session", "session-noninteractive"] + idnames = ["$account", "$auth", "$password", "$session", "$session_nonint"] + for i in range(len(fnames)): + fn = fnames[i] + template = content.read("/usr/share/pam/common-" + fn) + pb = build_block(confdata, fn, "Primary", "") + ab = build_block(confdata, fn, "Additional", "") + # session also includes settings from the session-noninteractive, + # but not the other way around + if fn == "session": + pb = build_block(confdata, "session-noninteractive", "Primary", pb) + ab = build_block(confdata, "session-noninteractive", "Additional", ab) + template = template.replace(idnames[i] + "_primary", pb) + template = template.replace(idnames[i] + "_additional", ab) + content.write("/etc/pam.d/common-" + fn, template) # Used by pam-auth-update to generate the pam.d/ config # files inside etc. However pam-auth-update relies on @@ -53,6 +144,11 @@ slices: /usr/share/pam/common-session-noninteractive.md5sums: /usr/share/pam/common-session.md5sums: + # folders expected by libpam to exist + var: + contents: + /var/lib/pam/: + copyright: contents: /usr/share/doc/libpam-runtime/copyright: diff --git a/slices/librabbitmq4.yaml b/slices/librabbitmq4.yaml new file mode 100644 index 000000000..08c8db6ec --- /dev/null +++ b/slices/librabbitmq4.yaml @@ -0,0 +1,16 @@ +package: librabbitmq4 + +essential: + - librabbitmq4_copyright + +slices: + libs: + essential: + - libc6_libs + - libssl3t64_libs + contents: + /usr/lib/*-linux-*/librabbitmq.so.4*: + + copyright: + contents: + /usr/share/doc/librabbitmq4/copyright: diff --git a/slices/login.yaml b/slices/login.yaml new file mode 100644 index 000000000..f284ef8c9 --- /dev/null +++ b/slices/login.yaml @@ -0,0 +1,31 @@ +package: login + +essential: + - login_copyright + +slices: + bins: + essential: + - libaudit1_libs + - libc6_libs + - libcrypt1_libs + - libpam-modules_libs + - libpam-runtime_config + - libpam0g_libs + - login_config + contents: + /usr/bin/faillog: + /usr/bin/lastlog: + /usr/bin/login: + /usr/bin/newgrp: + /usr/bin/sg: + /usr/sbin/nologin: + + config: + contents: + /etc/login.defs: + /etc/pam.d/login: + + copyright: + contents: + /usr/share/doc/login/copyright: diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml new file mode 100644 index 000000000..64909114c --- /dev/null +++ b/slices/rabbitmq-server.yaml @@ -0,0 +1,101 @@ +package: rabbitmq-server + +essential: + - rabbitmq-server_copyright + +# erlang* packages do not exist for i386 +## for all other archs, uncomment all those slices below +slices: + autocomplete: + contents: + /usr/lib/rabbitmq/autocomplete/*: + + bins: + essential: + - base-files_base + - base-passwd_data + - bash_bins + - coreutils_bins + # - erlang-base_bins + # - erlang-inets_scripts + # - erlang-os-mon_bins + - grep_bins + - libc-bin_locale + - libc-bin_nsswitch + - libtinfo6_libs + - login_bins + - netbase_default-hosts + - netbase_default-networks + - passwd_bins + - python3.12_standard + - rabbitmq-server_config + - rabbitmq-server_modules + - sed_bins + - util-linux_su-only + contents: + /usr/bin/rabbitmqadmin: + /usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server: + /usr/lib/rabbitmq/bin/rabbitmq*: + /usr/lib/rabbitmq/bin/vmware-rabbitmq: + /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/rabbitmq-diagnostics: + /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/rabbitmq*: + /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/vmware-rabbitmq: + # TODO: the files below are hardlinks + # To be fixed when hardlinks are supported + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-plugins: + { + copy: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics + } + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-queues: + { + copy: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics + } + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-streams: + { + copy: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics + } + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-upgrade: + { + copy: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics + } + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmqctl: + { + copy: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics + } + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/vmware-rabbitmq: + { + copy: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics + } + /usr/sbin/rabbitmq*: + /var/lib/rabbitmq/: + # The following is a cookie file necessary for rabbitmq-server to work + # The contents of that cookie file should be generated by the command: + # openssl rand -base64 -out /var/lib/rabbitmq/.erlang.cookie 42 + /var/lib/rabbitmq/.erlang.cookie: { text: DUMMY, mode: 0400 } + /var/lib/rabbitmq/mnesia/: { mode: 0750 } + /var/log/rabbitmq/: + + config: + contents: + /etc/default/rabbitmq-server: + /etc/rabbitmq/rabbitmq-env.conf: + { copy: /usr/share/rabbitmq/rabbitmq-env.conf, mode: 0644 } + + modules: + # essential: + # - erlang-crypto_modules + # - erlang-eldap_modules + # - erlang-mnesia_modules + # - erlang-parsetools_modules + # - erlang-public-key_modules + # - erlang-runtime-tools_modules + # - erlang-ssl_modules + # - erlang-syntax-tools_modules + # - erlang-tools_modules + # - erlang-xmerl_modules + contents: + /usr/lib/rabbitmq/lib/rabbitmq_server-*/plugins/**: + + copyright: + contents: + /usr/share/doc/rabbitmq-server/copyright: diff --git a/slices/util-linux.yaml b/slices/util-linux.yaml new file mode 100644 index 000000000..ac1ee0b6a --- /dev/null +++ b/slices/util-linux.yaml @@ -0,0 +1,141 @@ +package: util-linux + +essential: + - util-linux_copyright + +slices: + bins: + essential: + - libblkid1_libs + - libc6_libs + - libcap-ng0_libs + - libcrypt1_libs + - libmount1_libs + - libpam0g_libs + - libselinux1_libs + - libsmartcols1_libs + - libsystemd0_libs + - libtinfo6_libs + - libudev1_libs + - libuuid1_libs + - util-linux_generated + - util-linux_pam-profile + - zlib1g_libs + contents: + /usr/bin/addpart: + /usr/bin/choom: + /usr/bin/chrt: + /usr/bin/delpart: + /usr/bin/dmesg: + /usr/bin/fallocate: + /usr/bin/findmnt: + /usr/bin/flock: + /usr/bin/getopt: + /usr/bin/hardlink: + /usr/bin/i386: {arch: [i386, amd64]} + /usr/bin/ionice: + /usr/bin/ipcmk: + /usr/bin/ipcrm: + /usr/bin/ipcs: + /usr/bin/last: + /usr/bin/lastb: + /usr/bin/linux32: + /usr/bin/linux64: + /usr/bin/lsblk: + /usr/bin/lscpu: + /usr/bin/lsipc: + /usr/bin/lslocks: + /usr/bin/lslogins: + /usr/bin/lsmem: + /usr/bin/lsns: + /usr/bin/mcookie: + /usr/bin/mesg: + /usr/bin/more: + /usr/bin/mountpoint: + /usr/bin/namei: + /usr/bin/nsenter: + /usr/bin/partx: + /usr/bin/ppc: {arch: [ppc64el]} + /usr/bin/ppc32: {arch: [ppc64el]} + /usr/bin/ppc64: {arch: [ppc64el]} + /usr/bin/prlimit: + /usr/bin/rename.ul: + /usr/bin/resizepart: + /usr/bin/rev: + /usr/bin/s390: {arch: [s390x]} + /usr/bin/s390x: {arch: [s390x]} + /usr/bin/setarch: + /usr/bin/setpriv: + /usr/bin/setsid: + /usr/bin/setterm: + /usr/bin/su: + /usr/bin/taskset: + /usr/bin/uclampset: + /usr/bin/unshare: + /usr/bin/utmpdump: + /usr/bin/wdctl: + /usr/bin/whereis: + /usr/bin/x86_64: {arch: [amd64]} + /usr/sbin/agetty: + /usr/sbin/blkdiscard: + /usr/sbin/blkid: + /usr/sbin/blkzone: + /usr/sbin/blockdev: + /usr/sbin/chcpu: + /usr/sbin/chmem: + /usr/sbin/ctrlaltdel: + /usr/sbin/findfs: + /usr/sbin/fsck*: + /usr/sbin/fsfreeze: + /usr/sbin/fstrim: + /usr/sbin/getty: + /usr/sbin/isosize: + /usr/sbin/ldattach: + /usr/sbin/mkfs*: + /usr/sbin/mkswap: + /usr/sbin/pivot_root: + /usr/sbin/readprofile: + /usr/sbin/rtcwake: + /usr/sbin/runuser: + /usr/sbin/sulogin: + /usr/sbin/swaplabel: + /usr/sbin/switch_root: + /usr/sbin/wipefs: + /usr/sbin/zramctl: + + generated: + contents: + /usr/bin/pager: {symlink: /bin/more} + + mime: + contents: + /usr/lib/mime/packages/util-linux: + + pam-profile: + contents: + /etc/pam.d/runuser: + /etc/pam.d/runuser-l: + /etc/pam.d/su: + /etc/pam.d/su-l: + + services: + essential: + - util-linux_bins + contents: + /usr/lib/systemd/system/fstrim.service: + /usr/lib/systemd/system/fstrim.timer: + + su-only: + essential: + - libc6_libs + - libcap-ng0_libs + - libpam0g_libs + - libselinux1_libs + - libtinfo6_libs + - util-linux_pam-profile + contents: + /usr/bin/su: + + copyright: + contents: + /usr/share/doc/util-linux/copyright: diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml new file mode 100644 index 000000000..82bffdc0f --- /dev/null +++ b/tests/spread/integration/erlang/task.yaml @@ -0,0 +1,27 @@ +summary: Integration tests for Erlang + +execute: | + rootfs="$(install-slices erlang-base_bins erlang-inets_scripts erlang-os-mon_bins erlang-crypto_modules erlang-eldap_modules erlang-mnesia_modules erlang-parsetools_modules erlang-public-key_modules erlang-runtime-tools_modules erlang-ssl_modules erlang-syntax-tools_modules erlang-tools_modules erlang-xmerl_modules base-files_base bash_bins coreutils_bins)" + + mkdir -p "$rootfs"/bin "$rootfs"/etc "$rootfs"/dev "$rootfs"/root + cp /bin/sh "$rootfs"/bin/ + cp /etc/resolv.conf "$rootfs"/etc/ + cp /etc/nsswitch.conf "$rootfs"/etc/ + touch "$rootfs"/dev/null + chmod 777 "$rootfs"/dev/null + echo "cookie" > "$rootfs"/root/.erlang.cookie + chroot "$rootfs" chmod 400 /root/.erlang.cookie + # test epmd daemon + chroot "$rootfs" /usr/bin/epmd -daemon + # test erl eval + chroot "$rootfs" /usr/bin/erl -noshell -eval 'io:format("Erlang OK~n"), halt().' | grep "Erlang OK" + # test escript by executing a simple script + echo '#!/usr/bin/escript' > test_script + echo 'main(_) -> io:format("escript OK~n").' >> test_script + chmod +x test_script + mv test_script "$rootfs" + chroot "$rootfs" /usr/bin/escript test_script + # test start_embedded to start the embedded environment + chroot "$rootfs" /usr/bin/start_embedded + # test runcgi.sh from erlang-inets + chroot "$rootfs" /usr/lib/erlang/lib/inets-8.3.1.2/priv/bin/runcgi.sh /bin diff --git a/tests/spread/integration/login/task.yaml b/tests/spread/integration/login/task.yaml new file mode 100644 index 000000000..7acf4710f --- /dev/null +++ b/tests/spread/integration/login/task.yaml @@ -0,0 +1,14 @@ +summary: Integration tests for Erlang + +execute: | + rootfs="$(install-slices login_bins bash_bins base-files_base base-passwd_data grep_bins)" + mkdir "$rootfs"/dev + cp "$rootfs"/bin/bash "$rootfs"/bin/sync + touch "$rootfs"/dev/log + touch "$rootfs"/var/log/faillog + touch "$rootfs"/var/log/lastlog + chroot "$rootfs" nologin | grep "not available" + chroot "$rootfs" faillog + chroot "$rootfs" lastlog + chroot "$rootfs" newgrp root + chroot "$rootfs" sg root diff --git a/tests/spread/integration/rabbitmq-server/task.yaml b/tests/spread/integration/rabbitmq-server/task.yaml new file mode 100644 index 000000000..d368989bb --- /dev/null +++ b/tests/spread/integration/rabbitmq-server/task.yaml @@ -0,0 +1,13 @@ +summary: Integration tests for RabbitMQ + +execute: | + rootfs="$(install-slices rabbitmq-server_bins erlang-base_bins erlang-inets_scripts erlang-os-mon_bins erlang-crypto_modules erlang-eldap_modules erlang-mnesia_modules erlang-parsetools_modules erlang-public-key_modules erlang-runtime-tools_modules erlang-ssl_modules erlang-syntax-tools_modules erlang-tools_modules erlang-xmerl_modules)" + + cp /bin/sh "$rootfs"/bin/ + chroot "$rootfs" mkdir /dev + chroot "$rootfs" touch /dev/null + chroot "$rootfs" chmod 777 /dev/null + chroot "$rootfs" mkdir -p /var/lib/rabbitmq/mnesia /var/log/rabbitmq /etc/rabbitmq + chroot "$rootfs" useradd -r -d /var/lib/rabbitmq rabbitmq + chroot "$rootfs" chown -R rabbitmq /var/lib/rabbitmq /var/log/rabbitmq /etc/rabbitmq + chroot "$rootfs" /usr/lib/rabbitmq/bin/rabbitmqctl version diff --git a/tests/spread/integration/util-linux/task.yaml b/tests/spread/integration/util-linux/task.yaml new file mode 100644 index 000000000..4f855ebec --- /dev/null +++ b/tests/spread/integration/util-linux/task.yaml @@ -0,0 +1,20 @@ +summary: Integration tests for util-linux + +systems: + - -ubuntu-24.04-ppc64le + - -ubuntu-24.04-s390x + +execute: | + rootfs="$(install-slices util-linux_bins)" + # we need dev/sys mounted for some of them + mkdir "${rootfs}"/dev + mkdir "${rootfs}"/sys + mount --rbind /dev "${rootfs}"/dev + mount --rbind /sys "${rootfs}"/sys + # smoke test a couple of the bundled applications + chroot "${rootfs}" lsblk | grep "loop0" + chroot "${rootfs}" lsipc | grep "MSGMNI" + chroot "${rootfs}" lsmem | grep "Total online memory" + chroot "${rootfs}" whereis lsblk | grep "/usr/bin/lsblk" + chroot "${rootfs}" su --version | grep "su from util-linux" +