From 17e565e9a9d614b923d111ffb959af1ea91ac41d Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 13 Jun 2024 11:29:13 +0300 Subject: [PATCH 01/45] feat(24.04): add rabbitmq-server slice --- slices/adduser.yaml | 27 ++++++++++++++++ slices/cron-daemon-common.yaml | 23 +++++++++++++ slices/cron.yaml | 31 ++++++++++++++++++ slices/debconf.yaml | 44 +++++++++++++++++++++++++ slices/erlang-asn1.yaml | 17 ++++++++++ slices/erlang-base.yaml | 51 +++++++++++++++++++++++++++++ slices/erlang-crypto.yaml | 18 +++++++++++ slices/erlang-eldap.yaml | 17 ++++++++++ slices/erlang-ftp.yaml | 17 ++++++++++ slices/erlang-inets.yaml | 26 +++++++++++++++ slices/erlang-mnesia.yaml | 15 +++++++++ slices/erlang-os-mon.yaml | 19 +++++++++++ slices/erlang-parsetools.yaml | 15 +++++++++ slices/erlang-public-key.yaml | 17 ++++++++++ slices/erlang-runtime-tools.yaml | 18 +++++++++++ slices/erlang-snmp.yaml | 32 +++++++++++++++++++ slices/erlang-ssl.yaml | 18 +++++++++++ slices/erlang-syntax-tools.yaml | 16 ++++++++++ slices/erlang-tftp.yaml | 15 +++++++++ slices/erlang-tools.yaml | 18 +++++++++++ slices/erlang-xmerl.yaml | 15 +++++++++ slices/libpam0g.yaml | 1 + slices/libpopt0.yaml | 15 +++++++++ slices/logrotate.yaml | 29 +++++++++++++++++ slices/rabbitmq-server.yaml | 55 ++++++++++++++++++++++++++++++++ slices/socat.yaml | 19 +++++++++++ 26 files changed, 588 insertions(+) create mode 100644 slices/adduser.yaml create mode 100644 slices/cron-daemon-common.yaml create mode 100644 slices/cron.yaml create mode 100644 slices/debconf.yaml create mode 100644 slices/erlang-asn1.yaml create mode 100644 slices/erlang-base.yaml create mode 100644 slices/erlang-crypto.yaml create mode 100644 slices/erlang-eldap.yaml create mode 100644 slices/erlang-ftp.yaml create mode 100644 slices/erlang-inets.yaml create mode 100644 slices/erlang-mnesia.yaml create mode 100644 slices/erlang-os-mon.yaml create mode 100644 slices/erlang-parsetools.yaml create mode 100644 slices/erlang-public-key.yaml create mode 100644 slices/erlang-runtime-tools.yaml create mode 100644 slices/erlang-snmp.yaml create mode 100644 slices/erlang-ssl.yaml create mode 100644 slices/erlang-syntax-tools.yaml create mode 100644 slices/erlang-tftp.yaml create mode 100644 slices/erlang-tools.yaml create mode 100644 slices/erlang-xmerl.yaml create mode 100644 slices/libpopt0.yaml create mode 100644 slices/logrotate.yaml create mode 100644 slices/rabbitmq-server.yaml create mode 100644 slices/socat.yaml diff --git a/slices/adduser.yaml b/slices/adduser.yaml new file mode 100644 index 000000000..07b4c1e8d --- /dev/null +++ b/slices/adduser.yaml @@ -0,0 +1,27 @@ +package: adduser + +essential: + - adduser_copyright + +slices: + bins: + essential: + - adduser_config + - passwd_bins + contents: + /usr/sbin/addgroup: + /usr/sbin/adduser: + /usr/sbin/delgroup: + /usr/sbin/deluser: + /usr/share/perl5/Debian/AdduserCommon.pm: + /usr/share/perl5/Debian/AdduserLogging.pm: + /usr/share/perl5/Debian/AdduserRetvalues.pm: + + config: + contents: + /etc/adduser.conf: + /etc/deluser.conf: + + copyright: + contents: + /usr/share/doc/adduser/copyright: diff --git a/slices/cron-daemon-common.yaml b/slices/cron-daemon-common.yaml new file mode 100644 index 000000000..fa52c43f9 --- /dev/null +++ b/slices/cron-daemon-common.yaml @@ -0,0 +1,23 @@ +package: cron-daemon-common + +essential: + - cron-daemon-common_copyright + +slices: + config: + essential: + - adduser_bins + contents: + /etc/cron.d/.placeholder: + /etc/cron.daily/.placeholder: + /etc/cron.hourly/.placeholder: + /etc/cron.monthly/.placeholder: + /etc/cron.weekly/.placeholder: + /etc/cron.yearly/.placeholder: + /etc/crontab: + /usr/lib/sysusers.d/cron-daemon-common.conf: + /usr/lib/tmpfiles.d/cron-daemon-common.conf: + + copyright: + contents: + /usr/share/doc/cron-daemon-common/copyright: diff --git a/slices/cron.yaml b/slices/cron.yaml new file mode 100644 index 000000000..04e14c101 --- /dev/null +++ b/slices/cron.yaml @@ -0,0 +1,31 @@ +package: cron + +essential: + - cron_copyright + +slices: + bins: + essential: + - cron-daemon-common_config + - cron_config + - init-system-helpers_bins + - libc6_libs + - libpam-runtime_bins + - libpam0g_libs + - libselinux1_libs + - sensible-utils_bins + contents: + /usr/bin/crontab: + /usr/sbin/cron: + + config: + contents: + /etc/default/cron: + /etc/init.d/cron: + /etc/pam.d/cron: + /etc/supercat/spcrc-crontab*: + /usr/lib/systemd/system/cron.service: + + copyright: + contents: + /usr/share/doc/cron/copyright: diff --git a/slices/debconf.yaml b/slices/debconf.yaml new file mode 100644 index 000000000..30f0aedd2 --- /dev/null +++ b/slices/debconf.yaml @@ -0,0 +1,44 @@ +package: debconf + +essential: + - debconf_copyright + +slices: + bash-completion: + contents: + /usr/share/bash-completion/completions/debconf: + /usr/share/bash-completion/completions/debconf-show: + + bins: + essential: + - debconf_config + - debconf_modules + contents: + /usr/bin/debconf: + /usr/bin/debconf-apt-progress: + /usr/bin/debconf-communicate: + /usr/bin/debconf-copydb: + /usr/bin/debconf-escape: + /usr/bin/debconf-set-selections: + /usr/bin/debconf-show: + /usr/sbin/dpkg-preconfigure: + /usr/sbin/dpkg-reconfigure: + + config: + contents: + /etc/apt/apt.conf.d/70debconf: + /etc/debconf.conf: + + modules: + contents: + /usr/share/debconf/confmodule: + /usr/share/debconf/confmodule.sh: + /usr/share/debconf/debconf.conf: + /usr/share/debconf/fix_db.pl: + /usr/share/debconf/frontend: + /usr/share/perl5/Debconf/**: + /usr/share/perl5/Debian/DebConf/Client/ConfModule.pm: + + copyright: + contents: + /usr/share/doc/debconf/copyright: diff --git a/slices/erlang-asn1.yaml b/slices/erlang-asn1.yaml new file mode 100644 index 000000000..5d725c82c --- /dev/null +++ b/slices/erlang-asn1.yaml @@ -0,0 +1,17 @@ +package: erlang-asn1 + +essential: + - erlang-asn1_copyright + +slices: + libs: + essential: + - erlang-base_bins + - libc6_libs + contents: + /usr/lib/erlang/lib/asn1-5.0.21.1/ebin/**: + /usr/lib/erlang/lib/asn1-5.0.21.1/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..7dc5e57fd --- /dev/null +++ b/slices/erlang-base.yaml @@ -0,0 +1,51 @@ +package: erlang-base + +essential: + - erlang-base_copyright + +slices: + bins: + essential: + - adduser_bins + - erlang-base_config + - erlang-base_libs + - erlang-base_releases + - libc6_libs + - libgcc-s1_libs + - libstdc++6_libs + - libsystemd0_libs + - libtinfo6_libs + - procps_bins + - zlib1g_libs + contents: + /usr/bin/epmd: + /usr/bin/erl*: + /usr/bin/escript: + /usr/bin/run_erl: + /usr/bin/start_embedded: + /usr/bin/to_erl: + /usr/lib/erlang/bin/**: + /usr/lib/erlang/erts-13.2.2.5/bin/**: + /usr/lib/erlang/lib/erl_interface-5.3.2.1/bin/erl_call: + + libs: + contents: + /usr/lib/erlang/lib/compiler-8.2.6.3/ebin/**: + /usr/lib/erlang/lib/erts-13.2.2.5/ebin/**: + /usr/lib/erlang/lib/kernel-8.5.4.2/ebin/**: + /usr/lib/erlang/lib/sasl-4.2/ebin/**: + /usr/lib/erlang/lib/stdlib-4.3.1.3/ebin/**: + /usr/lib/erlang/lib/stdlib-4.3.1.3/include/**: + + config: + contents: + /usr/lib/systemd/system/epmd.service: + /usr/lib/systemd/system/epmd.socket: + + releases: + contents: + /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..cc1160600 --- /dev/null +++ b/slices/erlang-crypto.yaml @@ -0,0 +1,18 @@ +package: erlang-crypto + +essential: + - erlang-crypto_copyright + +slices: + libs: + essential: + - erlang-base_bins + - libc6_libs + - libssl3t64_libs + contents: + /usr/lib/erlang/lib/crypto-5.1.4.1/ebin/**: + /usr/lib/erlang/lib/crypto-5.1.4.1/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..52db03b2f --- /dev/null +++ b/slices/erlang-eldap.yaml @@ -0,0 +1,17 @@ +package: erlang-eldap + +essential: + - erlang-eldap_copyright + +slices: + libs: + essential: + - erlang-asn1_libs + - erlang-base_bins + - erlang-ssl_libs + contents: + /usr/lib/erlang/lib/eldap-1.2.11/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..b9337eb2f --- /dev/null +++ b/slices/erlang-ftp.yaml @@ -0,0 +1,17 @@ +package: erlang-ftp + +essential: + - erlang-ftp_copyright + +slices: + libs: + essential: + - erlang-base_bins + - erlang-runtime-tools_libs + - erlang-ssl_libs + contents: + /usr/lib/erlang/lib/ftp-1.1.4/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..b6915f4a1 --- /dev/null +++ b/slices/erlang-inets.yaml @@ -0,0 +1,26 @@ +package: erlang-inets + +essential: + - erlang-inets_copyright + +slices: + bins: + essential: + - erlang-base_bins + - erlang-ftp_libs + - erlang-inets_libs + - erlang-mnesia_libs + - erlang-runtime-tools_libs + - erlang-ssl_libs + - erlang-tftp_libs + contents: + /usr/lib/erlang/lib/inets-8.3.1.2/priv/bin/runcgi.sh: + + libs: + contents: + /usr/lib/erlang/lib/inets-8.3.1.2/ebin/**: + /usr/lib/erlang/lib/inets-8.3.1.2/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..9f3d36596 --- /dev/null +++ b/slices/erlang-mnesia.yaml @@ -0,0 +1,15 @@ +package: erlang-mnesia + +essential: + - erlang-mnesia_copyright + +slices: + libs: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/mnesia-4.21.4.2/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..fe1a33b21 --- /dev/null +++ b/slices/erlang-os-mon.yaml @@ -0,0 +1,19 @@ +package: erlang-os-mon + +essential: + - erlang-os-mon_copyright + +slices: + libs: + essential: + - erlang-base_bins + - erlang-mnesia_libs + - erlang-snmp_bins + - libc6_libs + contents: + /usr/lib/erlang/lib/os_mon-2.8.2/ebin/**: + /usr/lib/erlang/lib/os_mon-2.8.2/priv/**: + + 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..38c5289f8 --- /dev/null +++ b/slices/erlang-parsetools.yaml @@ -0,0 +1,15 @@ +package: erlang-parsetools + +essential: + - erlang-parsetools_copyright + +slices: + libs: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/parsetools-2.4.1/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..47bd413cd --- /dev/null +++ b/slices/erlang-public-key.yaml @@ -0,0 +1,17 @@ +package: erlang-public-key + +essential: + - erlang-public-key_copyright + +slices: + libs: + essential: + - erlang-asn1_libs + - erlang-base_bins + - erlang-crypto_libs + contents: + /usr/lib/erlang/lib/public_key-1.13.3.2/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..978c659c8 --- /dev/null +++ b/slices/erlang-runtime-tools.yaml @@ -0,0 +1,18 @@ +package: erlang-runtime-tools + +essential: + - erlang-runtime-tools_copyright + +slices: + libs: + essential: + - erlang-base_bins + - erlang-mnesia_libs + - libc6_libs + contents: + /usr/lib/erlang/lib/runtime_tools-1.19/ebin/**: + /usr/lib/erlang/lib/runtime_tools-1.19/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..6b98c043f --- /dev/null +++ b/slices/erlang-snmp.yaml @@ -0,0 +1,32 @@ +package: erlang-snmp + +essential: + - erlang-snmp_copyright + +slices: + bins: + essential: + - erlang-base_bins + - erlang-crypto_libs + - erlang-mnesia_libs + - erlang-runtime-tools_libs + - erlang-snmp_config + - erlang-snmp_libs + contents: + /usr/bin/snmpc: + /usr/lib/erlang/lib/snmp-5.13.5/bin/snmpc: + + config: + contents: + /usr/lib/erlang/lib/snmp-5.13.5/priv/conf/**: + + libs: + contents: + /usr/lib/erlang/lib/snmp-5.13.5/ebin/**: + /usr/lib/erlang/lib/snmp-5.13.5/include/**: + /usr/lib/erlang/lib/snmp-5.13.5/mibs/**: + /usr/lib/erlang/lib/snmp-5.13.5/priv/mibs/**: + + 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..db818bc92 --- /dev/null +++ b/slices/erlang-ssl.yaml @@ -0,0 +1,18 @@ +package: erlang-ssl + +essential: + - erlang-ssl_copyright + +slices: + libs: + essential: + - erlang-base_bins + - erlang-crypto_libs + - erlang-public-key_libs + - erlang-runtime-tools_libs + contents: + /usr/lib/erlang/lib/ssl-10.9.1.3/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..0ea454254 --- /dev/null +++ b/slices/erlang-syntax-tools.yaml @@ -0,0 +1,16 @@ +package: erlang-syntax-tools + +essential: + - erlang-syntax-tools_copyright + +slices: + libs: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/syntax_tools-3.0.1/ebin/**: + /usr/lib/erlang/lib/syntax_tools-3.0.1/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..39d7aa9c4 --- /dev/null +++ b/slices/erlang-tftp.yaml @@ -0,0 +1,15 @@ +package: erlang-tftp + +essential: + - erlang-tftp_copyright + +slices: + libs: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/tftp-1.0.4/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..ffa54318d --- /dev/null +++ b/slices/erlang-tools.yaml @@ -0,0 +1,18 @@ +package: erlang-tools + +essential: + - erlang-tools_copyright + +slices: + libs: + essential: + - erlang-base_bins + - erlang-runtime-tools_libs + contents: + /usr/lib/erlang/lib/tools-3.5.3/ebin/**: + /usr/lib/erlang/lib/tools-3.5.3/emacs/**: + /usr/lib/erlang/lib/tools-3.5.3/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..3f90ebb85 --- /dev/null +++ b/slices/erlang-xmerl.yaml @@ -0,0 +1,15 @@ +package: erlang-xmerl + +essential: + - erlang-xmerl_copyright + +slices: + libs: + essential: + - erlang-base_bins + contents: + /usr/lib/erlang/lib/xmerl-1.3.31.1/ebin/**: + + copyright: + contents: + /usr/share/doc/erlang-xmerl/copyright: diff --git a/slices/libpam0g.yaml b/slices/libpam0g.yaml index f611580e0..883fa7027 100644 --- a/slices/libpam0g.yaml +++ b/slices/libpam0g.yaml @@ -6,6 +6,7 @@ essential: slices: libs: essential: + - debconf_bins - libaudit1_libs - libc6_libs contents: diff --git a/slices/libpopt0.yaml b/slices/libpopt0.yaml new file mode 100644 index 000000000..dbd372e35 --- /dev/null +++ b/slices/libpopt0.yaml @@ -0,0 +1,15 @@ +package: libpopt0 + +essential: + - libpopt0_copyright + +slices: + libs: + essential: + - libc6_libs + contents: + /usr/lib/*-linux-*/libpopt.so.0*: + + copyright: + contents: + /usr/share/doc/libpopt0/copyright: diff --git a/slices/logrotate.yaml b/slices/logrotate.yaml new file mode 100644 index 000000000..4a46c64e0 --- /dev/null +++ b/slices/logrotate.yaml @@ -0,0 +1,29 @@ +package: logrotate + +essential: + - logrotate_copyright + +slices: + bins: + essential: + - cron_bins + - libacl1_libs + - libc6_libs + - libpopt0_libs + - libselinux1_libs + - logrotate_config + contents: + /usr/sbin/logrotate: + + config: + contents: + /etc/cron.daily/logrotate: + /etc/logrotate.conf: + /etc/logrotate.d/btmp: + /etc/logrotate.d/wtmp: + /usr/lib/systemd/system/logrotate.service: + /usr/lib/systemd/system/logrotate.timer: + + copyright: + contents: + /usr/share/doc/logrotate/copyright: diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml new file mode 100644 index 000000000..a8817d491 --- /dev/null +++ b/slices/rabbitmq-server.yaml @@ -0,0 +1,55 @@ +package: rabbitmq-server + +essential: + - rabbitmq-server_copyright + +slices: + bins: + essential: + - adduser_bins + - erlang-base_bins + - erlang-crypto_libs + - erlang-eldap_libs + - erlang-inets_bins + - erlang-mnesia_libs + - erlang-os-mon_libs + - erlang-parsetools_libs + - erlang-public-key_libs + - erlang-runtime-tools_libs + - erlang-ssl_libs + - erlang-syntax-tools_libs + - erlang-tools_libs + - erlang-xmerl_libs + - logrotate_bins + - openssl_bins + - python3.12_standard + - rabbitmq-server_config + - rabbitmq-server_libs + - socat_bins + contents: + /usr/bin/rabbitmqadmin: + /usr/lib/rabbitmq/bin/rabbitmq-*: + /usr/lib/rabbitmq/bin/vmware-rabbitmq: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/sbin/rabbitmq-*: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/sbin/vmware-rabbitmq: + /usr/sbin/rabbitmq-*: + + config: + contents: + /etc/default/rabbitmq-server: + /etc/init.d/rabbitmq-server: + /etc/logrotate.d/rabbitmq-server: + /usr/lib/rabbitmq/autocomplete/*: + /usr/lib/systemd/system/rabbitmq-server.service: + /usr/share/rabbitmq/rabbitmq-env.conf: + + libs: + contents: + /usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/**: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/plugins/**: + + copyright: + contents: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/LICENSE*: + /usr/share/doc/rabbitmq-server/copyright: diff --git a/slices/socat.yaml b/slices/socat.yaml new file mode 100644 index 000000000..617448545 --- /dev/null +++ b/slices/socat.yaml @@ -0,0 +1,19 @@ +package: socat + +essential: + - socat_copyright + +slices: + bins: + essential: + - libc6_libs + - libssl3t64_libs + - libwrap0_libs + contents: + /usr/bin/filan: + /usr/bin/procan: + /usr/bin/socat*: + + copyright: + contents: + /usr/share/doc/socat/copyright: From 740b029ea26e73da09e871886c2da3126cbeb7ce Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 13 Jun 2024 12:46:37 +0300 Subject: [PATCH 02/45] add librabbitmq4 slice --- slices/librabbitmq4.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 slices/librabbitmq4.yaml 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: From a41cfa0269938d91d498f916aba0254fea88fe92 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Tue, 25 Jun 2024 22:29:46 +0300 Subject: [PATCH 03/45] add missing files/dirs from maintainer scripts --- slices/rabbitmq-server.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index a8817d491..8de3918cf 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -39,9 +39,13 @@ slices: /etc/default/rabbitmq-server: /etc/init.d/rabbitmq-server: /etc/logrotate.d/rabbitmq-server: + /etc/rabbitmq/: {make: true} /usr/lib/rabbitmq/autocomplete/*: /usr/lib/systemd/system/rabbitmq-server.service: /usr/share/rabbitmq/rabbitmq-env.conf: + /var/lib/rabbitmq/: + /var/lib/rabbitmq/.erlang.cookie: {text: DUMMY, mode: 0o400} + /var/log/rabbitmq/mnesia/: {make: true, mode: 0o750} libs: contents: From d9c5b93a75e26f719897ed31cb71690f2ab71516 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Mon, 1 Jul 2024 15:28:15 +0300 Subject: [PATCH 04/45] add more missing contents --- slices/rabbitmq-server.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 8de3918cf..2348a3bea 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -7,6 +7,7 @@ slices: bins: essential: - adduser_bins + - base_files_base - erlang-base_bins - erlang-crypto_libs - erlang-eldap_libs @@ -39,13 +40,13 @@ slices: /etc/default/rabbitmq-server: /etc/init.d/rabbitmq-server: /etc/logrotate.d/rabbitmq-server: - /etc/rabbitmq/: {make: true} + /etc/rabbitmq/rabbitmq-env.conf: {symlink: /usr/share/rabbitmq-env.conf} /usr/lib/rabbitmq/autocomplete/*: /usr/lib/systemd/system/rabbitmq-server.service: - /usr/share/rabbitmq/rabbitmq-env.conf: /var/lib/rabbitmq/: /var/lib/rabbitmq/.erlang.cookie: {text: DUMMY, mode: 0o400} - /var/log/rabbitmq/mnesia/: {make: true, mode: 0o750} + /var/lib/rabbitmq/mnesia/: {mode: 0o750} + /var/log/rabbitmq/: libs: contents: From ab56439ae89a92ce4c7a5639dad48fc073ffc3d2 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Mon, 1 Jul 2024 15:37:57 +0300 Subject: [PATCH 05/45] fix a typo --- slices/rabbitmq-server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 2348a3bea..2a50e51c7 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -7,7 +7,7 @@ slices: bins: essential: - adduser_bins - - base_files_base + - base-files_base - erlang-base_bins - erlang-crypto_libs - erlang-eldap_libs From 45517f77d9be2d331d7b609328ff7efb910606eb Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Mon, 1 Jul 2024 15:51:18 +0300 Subject: [PATCH 06/45] update libpam-runtime --- slices/libpam-runtime.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/slices/libpam-runtime.yaml b/slices/libpam-runtime.yaml index 58562cea9..7547a56c8 100644 --- a/slices/libpam-runtime.yaml +++ b/slices/libpam-runtime.yaml @@ -20,6 +20,18 @@ slices: # 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). + bins: + essential: + - debconf_bins + - libpam-modules_config + - libpam-runtime_config + - libpam-runtime_pam-config + - libpam-runtime_pam-defaults + - libpam-runtime_var + contents: + /usr/sbin/pam-auth-update: + /usr/sbin/pam_getenv: + config: contents: /etc/pam.conf: From 28eeff49ecaaa9030ec1342665831b631660887a Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Mon, 1 Jul 2024 16:02:58 +0300 Subject: [PATCH 07/45] comment non-existing packages for i386 --- slices/rabbitmq-server.yaml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 2a50e51c7..7e2bcffc2 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -8,20 +8,22 @@ slices: essential: - adduser_bins - base-files_base - - erlang-base_bins - - erlang-crypto_libs - - erlang-eldap_libs - - erlang-inets_bins - - erlang-mnesia_libs - - erlang-os-mon_libs - - erlang-parsetools_libs - - erlang-public-key_libs - - erlang-runtime-tools_libs - - erlang-ssl_libs - - erlang-syntax-tools_libs - - erlang-tools_libs - - erlang-xmerl_libs - - logrotate_bins + ## erlang* and logrotate packages do not exist for i386 + ## for all other archs, uncomment all those slices below + # - erlang-base_bins + # - erlang-crypto_libs + # - erlang-eldap_libs + # - erlang-inets_bins + # - erlang-mnesia_libs + # - erlang-os-mon_libs + # - erlang-parsetools_libs + # - erlang-public-key_libs + # - erlang-runtime-tools_libs + # - erlang-ssl_libs + # - erlang-syntax-tools_libs + # - erlang-tools_libs + # - erlang-xmerl_libs + # - logrotate_bins - openssl_bins - python3.12_standard - rabbitmq-server_config From 2e33052a1e9d75fa6f684796dbbc2fb2bb9b5251 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Tue, 9 Jul 2024 18:39:55 +0300 Subject: [PATCH 08/45] address Rafids' review comments --- slices/adduser.yaml | 4 +++ slices/cron.yaml | 4 +-- slices/erlang-asn1.yaml | 4 +-- slices/erlang-base.yaml | 31 ++++++----------- slices/erlang-crypto.yaml | 4 +-- slices/erlang-eldap.yaml | 2 +- slices/erlang-ftp.yaml | 2 +- slices/erlang-inets.yaml | 15 ++++---- slices/erlang-mnesia.yaml | 2 +- slices/erlang-os-mon.yaml | 9 +++-- slices/erlang-parsetools.yaml | 2 +- slices/erlang-public-key.yaml | 2 +- slices/erlang-runtime-tools.yaml | 4 +-- slices/erlang-snmp.yaml | 12 +++---- slices/erlang-ssl.yaml | 2 +- slices/erlang-syntax-tools.yaml | 4 +-- slices/erlang-tftp.yaml | 2 +- slices/erlang-tools.yaml | 6 ++-- slices/erlang-xmerl.yaml | 2 +- slices/libpam-runtime.yaml | 1 - slices/libpam0g.yaml | 1 - slices/logrotate.yaml | 2 -- slices/rabbitmq-server.yaml | 59 ++++++++++++++++---------------- slices/socat.yaml | 6 +++- 24 files changed, 91 insertions(+), 91 deletions(-) diff --git a/slices/adduser.yaml b/slices/adduser.yaml index 07b4c1e8d..37abde9fa 100644 --- a/slices/adduser.yaml +++ b/slices/adduser.yaml @@ -7,12 +7,16 @@ slices: bins: essential: - adduser_config + - adduser_modules - passwd_bins contents: /usr/sbin/addgroup: /usr/sbin/adduser: /usr/sbin/delgroup: /usr/sbin/deluser: + + modules: + contents: /usr/share/perl5/Debian/AdduserCommon.pm: /usr/share/perl5/Debian/AdduserLogging.pm: /usr/share/perl5/Debian/AdduserRetvalues.pm: diff --git a/slices/cron.yaml b/slices/cron.yaml index 04e14c101..5d7ff7142 100644 --- a/slices/cron.yaml +++ b/slices/cron.yaml @@ -23,8 +23,8 @@ slices: /etc/default/cron: /etc/init.d/cron: /etc/pam.d/cron: - /etc/supercat/spcrc-crontab*: - /usr/lib/systemd/system/cron.service: + /etc/supercat/spcrc-crontab: + /etc/supercat/spcrc-crontab-light: copyright: contents: diff --git a/slices/erlang-asn1.yaml b/slices/erlang-asn1.yaml index 5d725c82c..dd9467154 100644 --- a/slices/erlang-asn1.yaml +++ b/slices/erlang-asn1.yaml @@ -9,8 +9,8 @@ slices: - erlang-base_bins - libc6_libs contents: - /usr/lib/erlang/lib/asn1-5.0.21.1/ebin/**: - /usr/lib/erlang/lib/asn1-5.0.21.1/priv/**: + /usr/lib/erlang/lib/asn1-*/ebin/**: + /usr/lib/erlang/lib/asn1-*/priv/**: copyright: contents: diff --git a/slices/erlang-base.yaml b/slices/erlang-base.yaml index 7dc5e57fd..b8a8f1115 100644 --- a/slices/erlang-base.yaml +++ b/slices/erlang-base.yaml @@ -7,9 +7,7 @@ slices: bins: essential: - adduser_bins - - erlang-base_config - erlang-base_libs - - erlang-base_releases - libc6_libs - libgcc-s1_libs - libstdc++6_libs @@ -19,32 +17,25 @@ slices: - zlib1g_libs contents: /usr/bin/epmd: - /usr/bin/erl*: + /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-13.2.2.5/bin/**: - /usr/lib/erlang/lib/erl_interface-5.3.2.1/bin/erl_call: + /usr/lib/erlang/erts-*/bin/**: + /usr/lib/erlang/lib/erl_interface-*/bin/erl_call: libs: contents: - /usr/lib/erlang/lib/compiler-8.2.6.3/ebin/**: - /usr/lib/erlang/lib/erts-13.2.2.5/ebin/**: - /usr/lib/erlang/lib/kernel-8.5.4.2/ebin/**: - /usr/lib/erlang/lib/sasl-4.2/ebin/**: - /usr/lib/erlang/lib/stdlib-4.3.1.3/ebin/**: - /usr/lib/erlang/lib/stdlib-4.3.1.3/include/**: - - config: - contents: - /usr/lib/systemd/system/epmd.service: - /usr/lib/systemd/system/epmd.socket: - - releases: - contents: - /usr/lib/erlang/releases/**: + /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/**: copyright: contents: diff --git a/slices/erlang-crypto.yaml b/slices/erlang-crypto.yaml index cc1160600..e0433fa64 100644 --- a/slices/erlang-crypto.yaml +++ b/slices/erlang-crypto.yaml @@ -10,8 +10,8 @@ slices: - libc6_libs - libssl3t64_libs contents: - /usr/lib/erlang/lib/crypto-5.1.4.1/ebin/**: - /usr/lib/erlang/lib/crypto-5.1.4.1/priv/lib/**: + /usr/lib/erlang/lib/crypto-*/ebin/**: + /usr/lib/erlang/lib/crypto-*/priv/lib/**: copyright: contents: diff --git a/slices/erlang-eldap.yaml b/slices/erlang-eldap.yaml index 52db03b2f..6b18bef80 100644 --- a/slices/erlang-eldap.yaml +++ b/slices/erlang-eldap.yaml @@ -10,7 +10,7 @@ slices: - erlang-base_bins - erlang-ssl_libs contents: - /usr/lib/erlang/lib/eldap-1.2.11/ebin/**: + /usr/lib/erlang/lib/eldap-*/ebin/**: copyright: contents: diff --git a/slices/erlang-ftp.yaml b/slices/erlang-ftp.yaml index b9337eb2f..3d932c728 100644 --- a/slices/erlang-ftp.yaml +++ b/slices/erlang-ftp.yaml @@ -10,7 +10,7 @@ slices: - erlang-runtime-tools_libs - erlang-ssl_libs contents: - /usr/lib/erlang/lib/ftp-1.1.4/ebin/**: + /usr/lib/erlang/lib/ftp-*/ebin/**: copyright: contents: diff --git a/slices/erlang-inets.yaml b/slices/erlang-inets.yaml index b6915f4a1..4bfa50758 100644 --- a/slices/erlang-inets.yaml +++ b/slices/erlang-inets.yaml @@ -5,21 +5,22 @@ essential: slices: bins: + essential: + - erlang-inets_libs + contents: + /usr/lib/erlang/lib/inets-*/priv/bin/runcgi.sh: + + libs: essential: - erlang-base_bins - erlang-ftp_libs - - erlang-inets_libs - erlang-mnesia_libs - erlang-runtime-tools_libs - erlang-ssl_libs - erlang-tftp_libs contents: - /usr/lib/erlang/lib/inets-8.3.1.2/priv/bin/runcgi.sh: - - libs: - contents: - /usr/lib/erlang/lib/inets-8.3.1.2/ebin/**: - /usr/lib/erlang/lib/inets-8.3.1.2/include/**: + /usr/lib/erlang/lib/inets-*/ebin/**: + /usr/lib/erlang/lib/inets-*/include/**: copyright: contents: diff --git a/slices/erlang-mnesia.yaml b/slices/erlang-mnesia.yaml index 9f3d36596..f95ca0024 100644 --- a/slices/erlang-mnesia.yaml +++ b/slices/erlang-mnesia.yaml @@ -8,7 +8,7 @@ slices: essential: - erlang-base_bins contents: - /usr/lib/erlang/lib/mnesia-4.21.4.2/ebin/**: + /usr/lib/erlang/lib/mnesia-*/ebin/**: copyright: contents: diff --git a/slices/erlang-os-mon.yaml b/slices/erlang-os-mon.yaml index fe1a33b21..604488d5b 100644 --- a/slices/erlang-os-mon.yaml +++ b/slices/erlang-os-mon.yaml @@ -4,6 +4,12 @@ essential: - erlang-os-mon_copyright slices: + bins: + essential: + - erlang-os-mon_libs + contents: + /usr/lib/erlang/lib/os_mon-*/priv/**: + libs: essential: - erlang-base_bins @@ -11,8 +17,7 @@ slices: - erlang-snmp_bins - libc6_libs contents: - /usr/lib/erlang/lib/os_mon-2.8.2/ebin/**: - /usr/lib/erlang/lib/os_mon-2.8.2/priv/**: + /usr/lib/erlang/lib/os_mon-*/ebin/**: copyright: contents: diff --git a/slices/erlang-parsetools.yaml b/slices/erlang-parsetools.yaml index 38c5289f8..d5e2089a4 100644 --- a/slices/erlang-parsetools.yaml +++ b/slices/erlang-parsetools.yaml @@ -8,7 +8,7 @@ slices: essential: - erlang-base_bins contents: - /usr/lib/erlang/lib/parsetools-2.4.1/ebin/**: + /usr/lib/erlang/lib/parsetools-*/ebin/**: copyright: contents: diff --git a/slices/erlang-public-key.yaml b/slices/erlang-public-key.yaml index 47bd413cd..07cbe2217 100644 --- a/slices/erlang-public-key.yaml +++ b/slices/erlang-public-key.yaml @@ -10,7 +10,7 @@ slices: - erlang-base_bins - erlang-crypto_libs contents: - /usr/lib/erlang/lib/public_key-1.13.3.2/ebin/**: + /usr/lib/erlang/lib/public_key-*/ebin/**: copyright: contents: diff --git a/slices/erlang-runtime-tools.yaml b/slices/erlang-runtime-tools.yaml index 978c659c8..1439735b3 100644 --- a/slices/erlang-runtime-tools.yaml +++ b/slices/erlang-runtime-tools.yaml @@ -10,8 +10,8 @@ slices: - erlang-mnesia_libs - libc6_libs contents: - /usr/lib/erlang/lib/runtime_tools-1.19/ebin/**: - /usr/lib/erlang/lib/runtime_tools-1.19/priv/**: + /usr/lib/erlang/lib/runtime_tools-*/ebin/**: + /usr/lib/erlang/lib/runtime_tools-*/priv/**: copyright: contents: diff --git a/slices/erlang-snmp.yaml b/slices/erlang-snmp.yaml index 6b98c043f..39993ab3e 100644 --- a/slices/erlang-snmp.yaml +++ b/slices/erlang-snmp.yaml @@ -14,18 +14,18 @@ slices: - erlang-snmp_libs contents: /usr/bin/snmpc: - /usr/lib/erlang/lib/snmp-5.13.5/bin/snmpc: + /usr/lib/erlang/lib/snmp-*/bin/snmpc: config: contents: - /usr/lib/erlang/lib/snmp-5.13.5/priv/conf/**: + /usr/lib/erlang/lib/snmp-*/priv/conf/**: libs: contents: - /usr/lib/erlang/lib/snmp-5.13.5/ebin/**: - /usr/lib/erlang/lib/snmp-5.13.5/include/**: - /usr/lib/erlang/lib/snmp-5.13.5/mibs/**: - /usr/lib/erlang/lib/snmp-5.13.5/priv/mibs/**: + /usr/lib/erlang/lib/snmp-*/ebin/**: + /usr/lib/erlang/lib/snmp-*/include/**: + /usr/lib/erlang/lib/snmp-*/mibs/**: + /usr/lib/erlang/lib/snmp-*/priv/mibs/**: copyright: contents: diff --git a/slices/erlang-ssl.yaml b/slices/erlang-ssl.yaml index db818bc92..9fae2527a 100644 --- a/slices/erlang-ssl.yaml +++ b/slices/erlang-ssl.yaml @@ -11,7 +11,7 @@ slices: - erlang-public-key_libs - erlang-runtime-tools_libs contents: - /usr/lib/erlang/lib/ssl-10.9.1.3/ebin/**: + /usr/lib/erlang/lib/ssl-*/ebin/**: copyright: contents: diff --git a/slices/erlang-syntax-tools.yaml b/slices/erlang-syntax-tools.yaml index 0ea454254..45ba7a161 100644 --- a/slices/erlang-syntax-tools.yaml +++ b/slices/erlang-syntax-tools.yaml @@ -8,8 +8,8 @@ slices: essential: - erlang-base_bins contents: - /usr/lib/erlang/lib/syntax_tools-3.0.1/ebin/**: - /usr/lib/erlang/lib/syntax_tools-3.0.1/include/**: + /usr/lib/erlang/lib/syntax_tools-*/ebin/**: + /usr/lib/erlang/lib/syntax_tools-*/include/**: copyright: contents: diff --git a/slices/erlang-tftp.yaml b/slices/erlang-tftp.yaml index 39d7aa9c4..f04850ddc 100644 --- a/slices/erlang-tftp.yaml +++ b/slices/erlang-tftp.yaml @@ -8,7 +8,7 @@ slices: essential: - erlang-base_bins contents: - /usr/lib/erlang/lib/tftp-1.0.4/ebin/**: + /usr/lib/erlang/lib/tftp-*/ebin/**: copyright: contents: diff --git a/slices/erlang-tools.yaml b/slices/erlang-tools.yaml index ffa54318d..d4ef47219 100644 --- a/slices/erlang-tools.yaml +++ b/slices/erlang-tools.yaml @@ -9,9 +9,9 @@ slices: - erlang-base_bins - erlang-runtime-tools_libs contents: - /usr/lib/erlang/lib/tools-3.5.3/ebin/**: - /usr/lib/erlang/lib/tools-3.5.3/emacs/**: - /usr/lib/erlang/lib/tools-3.5.3/priv/**: + /usr/lib/erlang/lib/tools-*/ebin/**: + /usr/lib/erlang/lib/tools-*/emacs/**: + /usr/lib/erlang/lib/tools-*/priv/**: copyright: contents: diff --git a/slices/erlang-xmerl.yaml b/slices/erlang-xmerl.yaml index 3f90ebb85..8db5dcdec 100644 --- a/slices/erlang-xmerl.yaml +++ b/slices/erlang-xmerl.yaml @@ -8,7 +8,7 @@ slices: essential: - erlang-base_bins contents: - /usr/lib/erlang/lib/xmerl-1.3.31.1/ebin/**: + /usr/lib/erlang/lib/xmerl-*/ebin/**: copyright: contents: diff --git a/slices/libpam-runtime.yaml b/slices/libpam-runtime.yaml index 7547a56c8..99ec5ebec 100644 --- a/slices/libpam-runtime.yaml +++ b/slices/libpam-runtime.yaml @@ -22,7 +22,6 @@ slices: # until appropriate solution for emulating what pam-auth-update can do (or maybe something else). bins: essential: - - debconf_bins - libpam-modules_config - libpam-runtime_config - libpam-runtime_pam-config diff --git a/slices/libpam0g.yaml b/slices/libpam0g.yaml index 883fa7027..f611580e0 100644 --- a/slices/libpam0g.yaml +++ b/slices/libpam0g.yaml @@ -6,7 +6,6 @@ essential: slices: libs: essential: - - debconf_bins - libaudit1_libs - libc6_libs contents: diff --git a/slices/logrotate.yaml b/slices/logrotate.yaml index 4a46c64e0..49030f1d4 100644 --- a/slices/logrotate.yaml +++ b/slices/logrotate.yaml @@ -21,8 +21,6 @@ slices: /etc/logrotate.conf: /etc/logrotate.d/btmp: /etc/logrotate.d/wtmp: - /usr/lib/systemd/system/logrotate.service: - /usr/lib/systemd/system/logrotate.timer: copyright: contents: diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 7e2bcffc2..d49b87ac1 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -4,10 +4,36 @@ essential: - rabbitmq-server_copyright slices: + autocomplete: + contents: + /usr/lib/rabbitmq/autocomplete/*: + bins: essential: - - adduser_bins - - base-files_base + - rabbitmq-server_libs + 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-3.12.1/sbin/rabbitmq-*: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/sbin/vmware-rabbitmq: + /usr/sbin/rabbitmq-*: + /var/lib/rabbitmq/: + /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/init.d/rabbitmq-server: + /etc/rabbitmq/rabbitmq-env.conf: {copy: /usr/share/rabbitmq/rabbitmq-env.conf, mode: 0644} + + libs: + essential: + - base-files_etc + - base-files_var ## erlang* and logrotate packages do not exist for i386 ## for all other archs, uncomment all those slices below # - erlang-base_bins @@ -15,7 +41,7 @@ slices: # - erlang-eldap_libs # - erlang-inets_bins # - erlang-mnesia_libs - # - erlang-os-mon_libs + # - erlang-os-mon_bins # - erlang-parsetools_libs # - erlang-public-key_libs # - erlang-runtime-tools_libs @@ -23,40 +49,13 @@ slices: # - erlang-syntax-tools_libs # - erlang-tools_libs # - erlang-xmerl_libs - # - logrotate_bins - - openssl_bins - python3.12_standard - rabbitmq-server_config - - rabbitmq-server_libs - socat_bins contents: - /usr/bin/rabbitmqadmin: - /usr/lib/rabbitmq/bin/rabbitmq-*: - /usr/lib/rabbitmq/bin/vmware-rabbitmq: - /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/sbin/rabbitmq-*: - /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/sbin/vmware-rabbitmq: - /usr/sbin/rabbitmq-*: - - config: - contents: - /etc/default/rabbitmq-server: - /etc/init.d/rabbitmq-server: - /etc/logrotate.d/rabbitmq-server: - /etc/rabbitmq/rabbitmq-env.conf: {symlink: /usr/share/rabbitmq-env.conf} - /usr/lib/rabbitmq/autocomplete/*: - /usr/lib/systemd/system/rabbitmq-server.service: - /var/lib/rabbitmq/: - /var/lib/rabbitmq/.erlang.cookie: {text: DUMMY, mode: 0o400} - /var/lib/rabbitmq/mnesia/: {mode: 0o750} - /var/log/rabbitmq/: - - libs: - contents: - /usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/**: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/plugins/**: copyright: contents: - /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/LICENSE*: /usr/share/doc/rabbitmq-server/copyright: diff --git a/slices/socat.yaml b/slices/socat.yaml index 617448545..6eaf63893 100644 --- a/slices/socat.yaml +++ b/slices/socat.yaml @@ -12,7 +12,11 @@ slices: contents: /usr/bin/filan: /usr/bin/procan: - /usr/bin/socat*: + /usr/bin/socat: + /usr/bin/socat-broker.sh: + /usr/bin/socat-chain.sh: + /usr/bin/socat-mux.sh: + /usr/bin/socat1: copyright: contents: From f065a9034cc576797c86bd1872e8081a1c147224 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 11 Jul 2024 15:21:40 +0300 Subject: [PATCH 09/45] remove adduser and procps dependencies from erlang-base --- slices/erlang-base.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/slices/erlang-base.yaml b/slices/erlang-base.yaml index b8a8f1115..f69ee62bb 100644 --- a/slices/erlang-base.yaml +++ b/slices/erlang-base.yaml @@ -6,14 +6,12 @@ essential: slices: bins: essential: - - adduser_bins - erlang-base_libs - libc6_libs - libgcc-s1_libs - libstdc++6_libs - libsystemd0_libs - libtinfo6_libs - - procps_bins - zlib1g_libs contents: /usr/bin/epmd: From 18ade32a0852d98b7ced9b47e3667f5b61aae345 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 26 Jul 2024 10:32:35 +0300 Subject: [PATCH 10/45] add missing dependencies for rabbitmq slices --- slices/libmount1.yaml | 17 ++++++ slices/libpam-modules-bin.yaml | 4 -- slices/libpam-modules.yaml | 7 --- slices/libpam-runtime.yaml | 2 +- slices/libperl5.38t64.yaml | 39 ++++++++++++ slices/libsmartcols1.yaml | 15 +++++ slices/login.yaml | 32 ++++++++++ slices/perl-base.yaml | 32 ++++++++++ slices/perl-modules-5.38.yaml | 16 +++++ slices/perl.yaml | 52 ++++++++++++++++ slices/rabbitmq-server.yaml | 21 ++++--- slices/util-linux.yaml | 107 +++++++++++++++++++++++++++++++++ 12 files changed, 325 insertions(+), 19 deletions(-) create mode 100644 slices/libmount1.yaml create mode 100644 slices/libperl5.38t64.yaml create mode 100644 slices/libsmartcols1.yaml create mode 100644 slices/login.yaml create mode 100644 slices/perl-base.yaml create mode 100644 slices/perl-modules-5.38.yaml create mode 100644 slices/perl.yaml create mode 100644 slices/util-linux.yaml diff --git a/slices/libmount1.yaml b/slices/libmount1.yaml new file mode 100644 index 000000000..893877cc5 --- /dev/null +++ b/slices/libmount1.yaml @@ -0,0 +1,17 @@ +package: libmount1 + +essential: + - libmount1_copyright + +slices: + libs: + essential: + - libblkid1_libs + - libc6_libs + - libselinux1_libs + contents: + /usr/lib/*-linux-*/libmount.so.1*: + + copyright: + contents: + /usr/share/doc/libmount1/copyright: diff --git a/slices/libpam-modules-bin.yaml b/slices/libpam-modules-bin.yaml index f29133d60..da343bbb6 100644 --- a/slices/libpam-modules-bin.yaml +++ b/slices/libpam-modules-bin.yaml @@ -23,10 +23,6 @@ slices: /usr/sbin/unix_chkpwd: /usr/sbin/unix_update: - services: - contents: - /usr/lib/systemd/system/pam_namespace.service: - copyright: contents: /usr/share/doc/libpam-modules-bin/copyright: diff --git a/slices/libpam-modules.yaml b/slices/libpam-modules.yaml index b1a6e5dd4..41c2254e6 100644 --- a/slices/libpam-modules.yaml +++ b/slices/libpam-modules.yaml @@ -71,13 +71,6 @@ slices: /usr/lib/*-linux-*/security/pam_wheel.so: /usr/lib/*-linux-*/security/pam_xauth.so: - # Used by pam-auth-update to generate the pam.d/ config - # files inside etc. However pam-auth-update relies on - # debconf to actually work and discover these packages. - pam-config: - contents: - /usr/share/pam-configs/mkhomedir: - copyright: contents: /usr/share/doc/libpam-modules/copyright: diff --git a/slices/libpam-runtime.yaml b/slices/libpam-runtime.yaml index 99ec5ebec..b2a2e2b1c 100644 --- a/slices/libpam-runtime.yaml +++ b/slices/libpam-runtime.yaml @@ -46,7 +46,7 @@ slices: # debconf to actually work and discover these packages. pam-config: contents: - /usr/share/pam-configs/unix: + /usr/share/pam-configs/**: # default templates for the /etc/pam.d files that are used by # pam-auth-update to generate the /etc/pam.d versions based on diff --git a/slices/libperl5.38t64.yaml b/slices/libperl5.38t64.yaml new file mode 100644 index 000000000..a7ecc8275 --- /dev/null +++ b/slices/libperl5.38t64.yaml @@ -0,0 +1,39 @@ +package: libperl5.38t64 + +essential: + - libperl5.38t64_copyright + +slices: + libs: + essential: + - libbz2-1.0_libs + - libc6_libs + - libcrypt1_libs + - libdb5.3t64_libs + - libgdbm-compat4t64_libs + - libgdbm6t64_libs + - perl-modules-5.38_modules + - zlib1g_libs + contents: + /usr/lib/*-linux-*/libperl.so.5.38*: + /usr/lib/*-linux-*/perl/5.38*/**: + + config: + contents: + /usr/lib/*-linux-*/perl/cross-config-5.38.2/Config.pm: + /usr/lib/*-linux-*/perl/cross-config-5.38.2/Config_heavy.pl: + /usr/lib/*-linux-*/perl/debian-config-data-5.38.2/config.sh.debug.gz: + /usr/lib/*-linux-*/perl/debian-config-data-5.38.2/config.sh.shared.gz: + /usr/lib/*-linux-*/perl/debian-config-data-5.38.2/config.sh.static.gz: + + bins: + essential: + - libperl5.38t64_config + - libperl5.38t64_libs + contents: + /usr/bin/cpan5.38-*-linux-*: + /usr/bin/perl5.38-*-linux-*: + + copyright: + contents: + /usr/share/doc/libperl5.38t64/copyright: diff --git a/slices/libsmartcols1.yaml b/slices/libsmartcols1.yaml new file mode 100644 index 000000000..2ab90186f --- /dev/null +++ b/slices/libsmartcols1.yaml @@ -0,0 +1,15 @@ +package: libsmartcols1 + +essential: + - libsmartcols1_copyright + +slices: + libs: + essential: + - libc6_libs + contents: + /usr/lib/*-linux-*/libsmartcols.so.1*: + + copyright: + contents: + /usr/share/doc/libsmartcols1/copyright: diff --git a/slices/login.yaml b/slices/login.yaml new file mode 100644 index 000000000..ce6cb8f7d --- /dev/null +++ b/slices/login.yaml @@ -0,0 +1,32 @@ +package: login + +essential: + - login_copyright + +slices: + bins: + essential: + - libaudit1_libs + - libc6_libs + - libcrypt1_libs + - libpam-modules_libs + - libpam-runtime_bins + - libpam0g_libs + - login_config + contents: + /usr/bin/faillog: + /usr/bin/lastlog: + /usr/bin/login: + /usr/bin/newgrp: + /usr/bin/sg: + /usr/sbin/nologin: + /usr/share/apport/package-hooks/source_shadow.py: + + config: + contents: + /etc/login.defs: + /etc/pam.d/login: + + copyright: + contents: + /usr/share/doc/login/copyright: diff --git a/slices/perl-base.yaml b/slices/perl-base.yaml new file mode 100644 index 000000000..160158d27 --- /dev/null +++ b/slices/perl-base.yaml @@ -0,0 +1,32 @@ +package: perl-base + +essential: + - perl-base_copyright + +slices: + modules: + contents: + /usr/lib/*-linux-*/perl-base/**/*.pl: + /usr/lib/*-linux-*/perl-base/**/*.pm: + /usr/lib/*-linux-*/perl-base/*.pl: + /usr/lib/*-linux-*/perl-base/*.pm: + + libs: + essential: + - libc6_libs + - libcrypt1_libs + contents: + /usr/lib/*-linux-*/perl-base/**/*.so: + + bins: + essential: + - perl-base_libs + - perl-base_modules + contents: + # hard link + /usr/bin/perl: + /usr/bin/perl5.38.2: {copy: /usr/bin/perl} + + copyright: + contents: + /usr/share/doc/perl-base/copyright: diff --git a/slices/perl-modules-5.38.yaml b/slices/perl-modules-5.38.yaml new file mode 100644 index 000000000..c613e2d2b --- /dev/null +++ b/slices/perl-modules-5.38.yaml @@ -0,0 +1,16 @@ +package: perl-modules-5.38 + +essential: + - perl-modules-5.38_copyright + +slices: + modules: + essential: + - perl-base_libs + - perl-base_modules + contents: + /usr/share/perl/5.38*/**: + + copyright: + contents: + /usr/share/doc/perl-modules-5.38/copyright: diff --git a/slices/perl.yaml b/slices/perl.yaml new file mode 100644 index 000000000..80a18173e --- /dev/null +++ b/slices/perl.yaml @@ -0,0 +1,52 @@ +package: perl + +essential: + - perl_copyright + +slices: + bins: + essential: + - libperl5.38t64_bins + - perl-base_bins + - perl-modules-5.38_modules + - perl_config + contents: + /usr/bin/corelist: + /usr/bin/cpan: + /usr/bin/enc2xs: + /usr/bin/encguess: + /usr/bin/h2ph: + /usr/bin/h2xs: + /usr/bin/instmodsh: + /usr/bin/json_pp: + /usr/bin/libnetcfg: + # /usr/bin/perlbug: + /usr/bin/perldoc: + /usr/bin/perlivp: + # hard link + # /usr/bin/perlthanks: {copy: /usr/bin/perlbug} + /usr/bin/piconv: + /usr/bin/pl2pm: + /usr/bin/pod2html: + /usr/bin/pod2man: + /usr/bin/pod2text: + /usr/bin/pod2usage: + /usr/bin/podchecker: + /usr/bin/prove: + /usr/bin/ptar: + /usr/bin/ptardiff: + /usr/bin/ptargrep: + /usr/bin/shasum: + /usr/bin/splain: + /usr/bin/streamzip: + /usr/bin/xsubpp: + /usr/bin/zipdetails: + + config: + contents: + /etc/perl/Net/libnet.cfg: + + copyright: + contents: + /usr/share/doc/perl/copyright: + diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index d49b87ac1..c01935e68 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -10,7 +10,19 @@ slices: bins: essential: + - bash_bins + - base-files_base + - base-passwd_data + - coreutils_bins + ## erlang* packages do not exist for i386 + ## for all other archs, uncomment all those slices below + # - erlang-base_bins + - login_bins + - passwd_bins + - python3.12_standard - rabbitmq-server_libs + - socat_bins + - util-linux_bins contents: /usr/bin/rabbitmqadmin: /usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server: @@ -32,16 +44,13 @@ slices: libs: essential: - - base-files_etc - - base-files_var - ## erlang* and logrotate packages do not exist for i386 + ## erlang* packages do not exist for i386 ## for all other archs, uncomment all those slices below - # - erlang-base_bins # - erlang-crypto_libs # - erlang-eldap_libs # - erlang-inets_bins # - erlang-mnesia_libs - # - erlang-os-mon_bins + # - erlang-os-mon_libs # - erlang-parsetools_libs # - erlang-public-key_libs # - erlang-runtime-tools_libs @@ -49,9 +58,7 @@ slices: # - erlang-syntax-tools_libs # - erlang-tools_libs # - erlang-xmerl_libs - - python3.12_standard - rabbitmq-server_config - - socat_bins contents: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/**: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/plugins/**: diff --git a/slices/util-linux.yaml b/slices/util-linux.yaml new file mode 100644 index 000000000..7878da753 --- /dev/null +++ b/slices/util-linux.yaml @@ -0,0 +1,107 @@ +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 + - libtinfo6_libs + - libudev1_libs + - libuuid1_libs + - util-linux_config + - 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: + /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/prlimit: + /usr/bin/rename.ul: + /usr/bin/resizepart: + /usr/bin/rev: + /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/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: + + config: + contents: + /etc/pam.d/runuser: + /etc/pam.d/runuser-l: + /etc/pam.d/su: + /etc/pam.d/su-l: + + copyright: + contents: + /usr/share/doc/util-linux/copyright: From 30b159ff9e0dee7835c22752702ade0ec2e38c65 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 26 Jul 2024 10:45:01 +0300 Subject: [PATCH 11/45] remove unneeded packages from this PR --- slices/adduser.yaml | 31 ------------------------------- slices/cron-daemon-common.yaml | 23 ----------------------- slices/cron.yaml | 31 ------------------------------- slices/libpopt0.yaml | 15 --------------- slices/logrotate.yaml | 27 --------------------------- 5 files changed, 127 deletions(-) delete mode 100644 slices/adduser.yaml delete mode 100644 slices/cron-daemon-common.yaml delete mode 100644 slices/cron.yaml delete mode 100644 slices/libpopt0.yaml delete mode 100644 slices/logrotate.yaml diff --git a/slices/adduser.yaml b/slices/adduser.yaml deleted file mode 100644 index 37abde9fa..000000000 --- a/slices/adduser.yaml +++ /dev/null @@ -1,31 +0,0 @@ -package: adduser - -essential: - - adduser_copyright - -slices: - bins: - essential: - - adduser_config - - adduser_modules - - passwd_bins - contents: - /usr/sbin/addgroup: - /usr/sbin/adduser: - /usr/sbin/delgroup: - /usr/sbin/deluser: - - modules: - contents: - /usr/share/perl5/Debian/AdduserCommon.pm: - /usr/share/perl5/Debian/AdduserLogging.pm: - /usr/share/perl5/Debian/AdduserRetvalues.pm: - - config: - contents: - /etc/adduser.conf: - /etc/deluser.conf: - - copyright: - contents: - /usr/share/doc/adduser/copyright: diff --git a/slices/cron-daemon-common.yaml b/slices/cron-daemon-common.yaml deleted file mode 100644 index fa52c43f9..000000000 --- a/slices/cron-daemon-common.yaml +++ /dev/null @@ -1,23 +0,0 @@ -package: cron-daemon-common - -essential: - - cron-daemon-common_copyright - -slices: - config: - essential: - - adduser_bins - contents: - /etc/cron.d/.placeholder: - /etc/cron.daily/.placeholder: - /etc/cron.hourly/.placeholder: - /etc/cron.monthly/.placeholder: - /etc/cron.weekly/.placeholder: - /etc/cron.yearly/.placeholder: - /etc/crontab: - /usr/lib/sysusers.d/cron-daemon-common.conf: - /usr/lib/tmpfiles.d/cron-daemon-common.conf: - - copyright: - contents: - /usr/share/doc/cron-daemon-common/copyright: diff --git a/slices/cron.yaml b/slices/cron.yaml deleted file mode 100644 index 5d7ff7142..000000000 --- a/slices/cron.yaml +++ /dev/null @@ -1,31 +0,0 @@ -package: cron - -essential: - - cron_copyright - -slices: - bins: - essential: - - cron-daemon-common_config - - cron_config - - init-system-helpers_bins - - libc6_libs - - libpam-runtime_bins - - libpam0g_libs - - libselinux1_libs - - sensible-utils_bins - contents: - /usr/bin/crontab: - /usr/sbin/cron: - - config: - contents: - /etc/default/cron: - /etc/init.d/cron: - /etc/pam.d/cron: - /etc/supercat/spcrc-crontab: - /etc/supercat/spcrc-crontab-light: - - copyright: - contents: - /usr/share/doc/cron/copyright: diff --git a/slices/libpopt0.yaml b/slices/libpopt0.yaml deleted file mode 100644 index dbd372e35..000000000 --- a/slices/libpopt0.yaml +++ /dev/null @@ -1,15 +0,0 @@ -package: libpopt0 - -essential: - - libpopt0_copyright - -slices: - libs: - essential: - - libc6_libs - contents: - /usr/lib/*-linux-*/libpopt.so.0*: - - copyright: - contents: - /usr/share/doc/libpopt0/copyright: diff --git a/slices/logrotate.yaml b/slices/logrotate.yaml deleted file mode 100644 index 49030f1d4..000000000 --- a/slices/logrotate.yaml +++ /dev/null @@ -1,27 +0,0 @@ -package: logrotate - -essential: - - logrotate_copyright - -slices: - bins: - essential: - - cron_bins - - libacl1_libs - - libc6_libs - - libpopt0_libs - - libselinux1_libs - - logrotate_config - contents: - /usr/sbin/logrotate: - - config: - contents: - /etc/cron.daily/logrotate: - /etc/logrotate.conf: - /etc/logrotate.d/btmp: - /etc/logrotate.d/wtmp: - - copyright: - contents: - /usr/share/doc/logrotate/copyright: From 1e0e8d3a2b39ce8868337df597f61789b2884f25 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 26 Jul 2024 10:48:10 +0300 Subject: [PATCH 12/45] fix CI check errors --- slices/libgdbm-compat4t64.yaml | 16 ++++++++++++++++ slices/libgdbm6t64.yaml | 15 +++++++++++++++ slices/libpam-runtime.yaml | 1 + slices/login.yaml | 2 +- slices/perl.yaml | 1 - slices/rabbitmq-server.yaml | 2 +- slices/util-linux.yaml | 3 ++- 7 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 slices/libgdbm-compat4t64.yaml create mode 100644 slices/libgdbm6t64.yaml diff --git a/slices/libgdbm-compat4t64.yaml b/slices/libgdbm-compat4t64.yaml new file mode 100644 index 000000000..d82e753ce --- /dev/null +++ b/slices/libgdbm-compat4t64.yaml @@ -0,0 +1,16 @@ +package: libgdbm-compat4t64 + +essential: + - libgdbm-compat4t64_copyright + +slices: + copyright: + contents: + /usr/share/doc/libgdbm-compat4t64/copyright: + + libs: + essential: + - libc6_libs + - libgdbm6t64_libs + contents: + /usr/lib/*-linux-*/libgdbm_compat.so.4*: diff --git a/slices/libgdbm6t64.yaml b/slices/libgdbm6t64.yaml new file mode 100644 index 000000000..01052ef22 --- /dev/null +++ b/slices/libgdbm6t64.yaml @@ -0,0 +1,15 @@ +package: libgdbm6t64 + +essential: + - libgdbm6t64_copyright + +slices: + libs: + essential: + - libc6_libs + contents: + /usr/lib/*-linux-*/libgdbm.so.6*: + + copyright: + contents: + /usr/share/doc/libgdbm6t64/copyright: diff --git a/slices/libpam-runtime.yaml b/slices/libpam-runtime.yaml index b2a2e2b1c..010c1977d 100644 --- a/slices/libpam-runtime.yaml +++ b/slices/libpam-runtime.yaml @@ -22,6 +22,7 @@ slices: # until appropriate solution for emulating what pam-auth-update can do (or maybe something else). bins: essential: + - debconf_bins - libpam-modules_config - libpam-runtime_config - libpam-runtime_pam-config diff --git a/slices/login.yaml b/slices/login.yaml index ce6cb8f7d..c3a3e8c52 100644 --- a/slices/login.yaml +++ b/slices/login.yaml @@ -26,7 +26,7 @@ slices: contents: /etc/login.defs: /etc/pam.d/login: - + copyright: contents: /usr/share/doc/login/copyright: diff --git a/slices/perl.yaml b/slices/perl.yaml index 80a18173e..1a1e9d2ce 100644 --- a/slices/perl.yaml +++ b/slices/perl.yaml @@ -49,4 +49,3 @@ slices: copyright: contents: /usr/share/doc/perl/copyright: - diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index c01935e68..a31ea211b 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -10,9 +10,9 @@ slices: bins: essential: - - bash_bins - base-files_base - base-passwd_data + - bash_bins - coreutils_bins ## erlang* packages do not exist for i386 ## for all other archs, uncomment all those slices below diff --git a/slices/util-linux.yaml b/slices/util-linux.yaml index 7878da753..f5ed4fac3 100644 --- a/slices/util-linux.yaml +++ b/slices/util-linux.yaml @@ -30,7 +30,8 @@ slices: /usr/bin/flock: /usr/bin/getopt: /usr/bin/hardlink: - /usr/bin/i386: + ## not available in all archs + # /usr/bin/i386: /usr/bin/ionice: /usr/bin/ipcmk: /usr/bin/ipcrm: From df996d641ff179b88dfcf0f578fa9f09e6a6e278 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 26 Jul 2024 11:52:56 +0300 Subject: [PATCH 13/45] add missing rabbitmqctl bins --- slices/rabbitmq-server.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index a31ea211b..dfb7b3ddd 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -28,9 +28,9 @@ slices: /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-3.12.1/sbin/rabbitmq-*: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/sbin/rabbitmq*: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/sbin/vmware-rabbitmq: - /usr/sbin/rabbitmq-*: + /usr/sbin/rabbitmq*: /var/lib/rabbitmq/: /var/lib/rabbitmq/.erlang.cookie: {text: DUMMY, mode: 0400} /var/lib/rabbitmq/mnesia/: {mode: 0750} From cecab02d74518aaed5440a6d9bfd0003f7048bbb Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 26 Jul 2024 13:27:29 +0300 Subject: [PATCH 14/45] add sed as dependency because rabbitmqctl needs it --- slices/erlang-base.yaml | 1 + slices/rabbitmq-server.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/slices/erlang-base.yaml b/slices/erlang-base.yaml index f69ee62bb..e5bee63f9 100644 --- a/slices/erlang-base.yaml +++ b/slices/erlang-base.yaml @@ -34,6 +34,7 @@ slices: /usr/lib/erlang/lib/sasl-*/ebin/**: /usr/lib/erlang/lib/stdlib-*/ebin/**: /usr/lib/erlang/lib/stdlib-*/include/**: + /usr/lib/erlang/releases/**: copyright: contents: diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index dfb7b3ddd..973f1a6e9 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -21,6 +21,7 @@ slices: - passwd_bins - python3.12_standard - rabbitmq-server_libs + - sed_bins - socat_bins - util-linux_bins contents: From 171ae7a88f9446e3d8ebea2b686d2db62d5bced3 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 14 Aug 2024 14:29:23 +0300 Subject: [PATCH 15/45] add few missing slice deps --- slices/rabbitmq-server.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 973f1a6e9..d8f3f4ca4 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -17,7 +17,16 @@ slices: ## erlang* packages do not exist for i386 ## for all other archs, uncomment all those slices below # - erlang-base_bins + # - erlang-inets_bins + # - erlang-os-mon_bins + - grep_bins + - libc-bin_locale + - libc-bin_nsswitch + - libtinfo6_libs - login_bins + - openssl_bins + - openssl_config + - openssl_data - passwd_bins - python3.12_standard - rabbitmq-server_libs @@ -49,9 +58,7 @@ slices: ## for all other archs, uncomment all those slices below # - erlang-crypto_libs # - erlang-eldap_libs - # - erlang-inets_bins # - erlang-mnesia_libs - # - erlang-os-mon_libs # - erlang-parsetools_libs # - erlang-public-key_libs # - erlang-runtime-tools_libs From 2ca334c0028fc3e5f5c5e685664b070532c0fb18 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Mon, 19 Aug 2024 16:04:56 +0300 Subject: [PATCH 16/45] fix hardlinks in rabbitmq-server slice --- slices/rabbitmq-server.yaml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index d8f3f4ca4..4e7687f6b 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -24,9 +24,8 @@ slices: - libc-bin_nsswitch - libtinfo6_libs - login_bins - - openssl_bins - - openssl_config - - openssl_data + - netbase_default-hosts + - netbase_default-networks - passwd_bins - python3.12_standard - rabbitmq-server_libs @@ -38,18 +37,26 @@ slices: /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-3.12.1/sbin/rabbitmq*: - /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/sbin/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: /usr/sbin/rabbitmq*: /var/lib/rabbitmq/: /var/lib/rabbitmq/.erlang.cookie: {text: DUMMY, mode: 0400} /var/lib/rabbitmq/mnesia/: {mode: 0750} /var/log/rabbitmq/: + mutate: | + file = content.read("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics") + content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-plugins", file) + content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-queues", file) + content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-streams", file) + content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-upgrade", file) + content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmqctl", file) + content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/vmware-rabbitmq", file) config: contents: /etc/default/rabbitmq-server: - /etc/init.d/rabbitmq-server: /etc/rabbitmq/rabbitmq-env.conf: {copy: /usr/share/rabbitmq/rabbitmq-env.conf, mode: 0644} libs: @@ -68,8 +75,7 @@ slices: # - erlang-xmerl_libs - rabbitmq-server_config contents: - /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/**: - /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/plugins/**: + /usr/lib/rabbitmq/lib/rabbitmq_server-*/plugins/**: copyright: contents: From 576051407a3e5eff8e4a877ee151256b0e83f646 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Mon, 19 Aug 2024 17:59:20 +0300 Subject: [PATCH 17/45] fix linting issues --- slices/rabbitmq-server.yaml | 53 ++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 4e7687f6b..1991b3df1 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -38,26 +38,59 @@ slices: /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-*/escript/rabbitmq-plugins: + { mutable: true } + /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/rabbitmq-queues: + { mutable: true } + /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/rabbitmq-streams: + { mutable: true } + /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/rabbitmq-upgrade: + { mutable: true } + /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/rabbitmqctl: + { mutable: true } + /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/vmware-rabbitmq: + { mutable: true } /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/rabbitmq*: /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/vmware-rabbitmq: /usr/sbin/rabbitmq*: /var/lib/rabbitmq/: - /var/lib/rabbitmq/.erlang.cookie: {text: DUMMY, mode: 0400} - /var/lib/rabbitmq/mnesia/: {mode: 0750} + /var/lib/rabbitmq/.erlang.cookie: { text: DUMMY, mode: 0400 } + /var/lib/rabbitmq/mnesia/: { mode: 0750 } /var/log/rabbitmq/: mutate: | - file = content.read("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics") - content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-plugins", file) - content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-queues", file) - content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-streams", file) - content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-upgrade", file) - content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmqctl", file) - content.write("/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/vmware-rabbitmq", file) + file = content.read( + "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics" + ) + content.write( + "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-plugins", + file + ) + content.write( + "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-queues", + file + ) + content.write( + "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-streams", + file + ) + content.write( + "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-upgrade", + file + ) + content.write( + "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmqctl", + file + ) + content.write( + "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/vmware-rabbitmq", + file + ) config: contents: /etc/default/rabbitmq-server: - /etc/rabbitmq/rabbitmq-env.conf: {copy: /usr/share/rabbitmq/rabbitmq-env.conf, mode: 0644} + /etc/rabbitmq/rabbitmq-env.conf: + { copy: /usr/share/rabbitmq/rabbitmq-env.conf, mode: 0644 } libs: essential: From 4c305efac7d6ac8cec0bc750e5f153a5ba6f5197 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Mon, 19 Aug 2024 18:06:21 +0300 Subject: [PATCH 18/45] add a simple integration test --- slices/rabbitmq-server.yaml | 14 +++++++------- tests/spread/integration/rabbitmq-server/task.yaml | 6 ++++++ 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 tests/spread/integration/rabbitmq-server/task.yaml diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 1991b3df1..cf9b43010 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -37,19 +37,19 @@ slices: /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-*/escript/rabbitmq-plugins: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-plugins: { mutable: true } - /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/rabbitmq-queues: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-queues: { mutable: true } - /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/rabbitmq-streams: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-streams: { mutable: true } - /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/rabbitmq-upgrade: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-upgrade: { mutable: true } - /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/rabbitmqctl: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmqctl: { mutable: true } - /usr/lib/rabbitmq/lib/rabbitmq_server-*/escript/vmware-rabbitmq: + /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/vmware-rabbitmq: { mutable: true } + /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: /usr/sbin/rabbitmq*: diff --git a/tests/spread/integration/rabbitmq-server/task.yaml b/tests/spread/integration/rabbitmq-server/task.yaml new file mode 100644 index 000000000..26dfef0aa --- /dev/null +++ b/tests/spread/integration/rabbitmq-server/task.yaml @@ -0,0 +1,6 @@ +summary: Integration tests for RabbitMQ + +execute: | + rootfs="$(install-slices rabbitmq-server_bins)" + + chroot "$rootfs" /usr/sbin/rabbitmqctl version From 04682fb1f3e62d973eb87450005d6c1ba108c827 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Tue, 20 Aug 2024 10:31:56 +0300 Subject: [PATCH 19/45] fix sorting for lint --- slices/rabbitmq-server.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index cf9b43010..1288aad9d 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -37,6 +37,9 @@ slices: /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: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-plugins: { mutable: true } /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-queues: @@ -49,9 +52,6 @@ slices: { mutable: true } /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/vmware-rabbitmq: { mutable: true } - /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: /usr/sbin/rabbitmq*: /var/lib/rabbitmq/: /var/lib/rabbitmq/.erlang.cookie: { text: DUMMY, mode: 0400 } From 8118cfbfcf1858ac6725f10c668c29aa86fd5a0d Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Tue, 20 Aug 2024 18:10:25 +0300 Subject: [PATCH 20/45] install required erlang packages in integration test --- tests/spread/integration/rabbitmq-server/task.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spread/integration/rabbitmq-server/task.yaml b/tests/spread/integration/rabbitmq-server/task.yaml index 26dfef0aa..26d3dbaed 100644 --- a/tests/spread/integration/rabbitmq-server/task.yaml +++ b/tests/spread/integration/rabbitmq-server/task.yaml @@ -1,6 +1,6 @@ summary: Integration tests for RabbitMQ execute: | - rootfs="$(install-slices rabbitmq-server_bins)" + rootfs="$(install-slices rabbitmq-server_bins erlang-base_bins erlang-inets_bins erlang-os-mon_bins erlang-crypto_libs erlang-eldap_libs erlang-mnesia_libs erlang-parsetools_libs erlang-public-key_libs erlang-runtime-tools_libs erlang-ssl_libs erlang-syntax-tools_libs erlang-tools_libs erlang-xmerl_libs)" chroot "$rootfs" /usr/sbin/rabbitmqctl version From 6d91b68c958aec83301f805c74457b1f1179cd6e Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Tue, 20 Aug 2024 18:29:45 +0300 Subject: [PATCH 21/45] fix rabbitmqctl path in test --- tests/spread/integration/rabbitmq-server/task.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spread/integration/rabbitmq-server/task.yaml b/tests/spread/integration/rabbitmq-server/task.yaml index 26d3dbaed..c2ae5c93f 100644 --- a/tests/spread/integration/rabbitmq-server/task.yaml +++ b/tests/spread/integration/rabbitmq-server/task.yaml @@ -3,4 +3,4 @@ summary: Integration tests for RabbitMQ execute: | rootfs="$(install-slices rabbitmq-server_bins erlang-base_bins erlang-inets_bins erlang-os-mon_bins erlang-crypto_libs erlang-eldap_libs erlang-mnesia_libs erlang-parsetools_libs erlang-public-key_libs erlang-runtime-tools_libs erlang-ssl_libs erlang-syntax-tools_libs erlang-tools_libs erlang-xmerl_libs)" - chroot "$rootfs" /usr/sbin/rabbitmqctl version + chroot "$rootfs" /usr/lib/rabbitmq/bin/rabbitmqctl version From d8e590f459f96977c44e77bbbd53197c3c0bbfd0 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 21 Aug 2024 14:49:52 +0300 Subject: [PATCH 22/45] add mutate scripts to libpam-runtime SDF --- slices/libpam-runtime.yaml | 133 +++++++++++++++++++++++++++---------- slices/login.yaml | 2 +- 2 files changed, 98 insertions(+), 37 deletions(-) diff --git a/slices/libpam-runtime.yaml b/slices/libpam-runtime.yaml index 010c1977d..c3f851812 100644 --- a/slices/libpam-runtime.yaml +++ b/slices/libpam-runtime.yaml @@ -18,53 +18,114 @@ 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). - bins: + # 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: - - debconf_bins - - libpam-modules_config - - libpam-runtime_config - - libpam-runtime_pam-config - - libpam-runtime_pam-defaults - libpam-runtime_var - contents: - /usr/sbin/pam-auth-update: - /usr/sbin/pam_getenv: - - config: 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: + /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) # folders expected by libpam to exist var: contents: /var/lib/pam/: - # Used by pam-auth-update to generate the pam.d/ config - # files inside etc. However pam-auth-update relies on - # debconf to actually work and discover these packages. - pam-config: - contents: - /usr/share/pam-configs/**: - - # default templates for the /etc/pam.d files that are used by - # pam-auth-update to generate the /etc/pam.d versions based on - # additional plugs in /usr/share/pam-configs/*. - pam-defaults: - contents: - /usr/share/pam/common-account: - /usr/share/pam/common-account.md5sums: - /usr/share/pam/common-auth: - /usr/share/pam/common-auth.md5sums: - /usr/share/pam/common-password: - /usr/share/pam/common-password.md5sums: - /usr/share/pam/common-session: - /usr/share/pam/common-session-noninteractive: - /usr/share/pam/common-session-noninteractive.md5sums: - /usr/share/pam/common-session.md5sums: - copyright: contents: /usr/share/doc/libpam-runtime/copyright: diff --git a/slices/login.yaml b/slices/login.yaml index c3a3e8c52..e469395f4 100644 --- a/slices/login.yaml +++ b/slices/login.yaml @@ -10,7 +10,7 @@ slices: - libc6_libs - libcrypt1_libs - libpam-modules_libs - - libpam-runtime_bins + - libpam-runtime_config - libpam0g_libs - login_config contents: From a133d0e00d03b3a3ef7001c59d530ed4d98a3dde Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 21 Aug 2024 14:50:08 +0300 Subject: [PATCH 23/45] fix integration test of rabbitmq-server slice --- tests/spread/integration/rabbitmq-server/task.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/spread/integration/rabbitmq-server/task.yaml b/tests/spread/integration/rabbitmq-server/task.yaml index c2ae5c93f..343896d46 100644 --- a/tests/spread/integration/rabbitmq-server/task.yaml +++ b/tests/spread/integration/rabbitmq-server/task.yaml @@ -3,4 +3,15 @@ summary: Integration tests for RabbitMQ execute: | rootfs="$(install-slices rabbitmq-server_bins erlang-base_bins erlang-inets_bins erlang-os-mon_bins erlang-crypto_libs erlang-eldap_libs erlang-mnesia_libs erlang-parsetools_libs erlang-public-key_libs erlang-runtime-tools_libs erlang-ssl_libs erlang-syntax-tools_libs erlang-tools_libs erlang-xmerl_libs)" + 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 + cat < "$rootfs"/var/lib/rabbitmq/.erlang.cookie + dYgNi96w+c24zqq3U5jFXI7tet+UjOkUI+cN4cFDAP84xmccgmrAavcp + EOF + chroot "$rootfs" chown -R rabbitmq /var/lib/rabbitmq /var/log/rabbitmq /etc/rabbitmq + chroot "$rootfs" chmod 400 /var/lib/rabbitmq/.erlang.cookie chroot "$rootfs" /usr/lib/rabbitmq/bin/rabbitmqctl version From ea2ae5964ff99e3a7d0d4aa00c1cf3fb268de461 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 21 Aug 2024 15:18:03 +0300 Subject: [PATCH 24/45] remove socat dependency --- slices/rabbitmq-server.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 1288aad9d..4f5929c63 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -30,7 +30,6 @@ slices: - python3.12_standard - rabbitmq-server_libs - sed_bins - - socat_bins - util-linux_bins contents: /usr/bin/rabbitmqadmin: From 757c18f12655745579bd621d2a18d13ccaecb3a0 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 22 Aug 2024 15:20:01 +0300 Subject: [PATCH 25/45] remove unncessary parts of the integration test --- tests/spread/integration/rabbitmq-server/task.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/spread/integration/rabbitmq-server/task.yaml b/tests/spread/integration/rabbitmq-server/task.yaml index 343896d46..8609ffc8b 100644 --- a/tests/spread/integration/rabbitmq-server/task.yaml +++ b/tests/spread/integration/rabbitmq-server/task.yaml @@ -9,9 +9,5 @@ execute: | 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 - cat < "$rootfs"/var/lib/rabbitmq/.erlang.cookie - dYgNi96w+c24zqq3U5jFXI7tet+UjOkUI+cN4cFDAP84xmccgmrAavcp - EOF chroot "$rootfs" chown -R rabbitmq /var/lib/rabbitmq /var/log/rabbitmq /etc/rabbitmq - chroot "$rootfs" chmod 400 /var/lib/rabbitmq/.erlang.cookie chroot "$rootfs" /usr/lib/rabbitmq/bin/rabbitmqctl version From 1feb608d922794d3ffd3b33a27f3ea3b666fa79a Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 23 Aug 2024 09:44:42 +0300 Subject: [PATCH 26/45] switch to lxd-based spread tests --- spread.yaml | 54 +++++++++++++++++++---------------------------------- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/spread.yaml b/spread.yaml index 1ddafa8e4..3123ecb40 100644 --- a/spread.yaml +++ b/spread.yaml @@ -11,46 +11,31 @@ exclude: - .github backends: - docker: + lxd: type: adhoc allocate: | + set -x + sudo lxd init --auto + release=$(echo $SPREAD_SYSTEM | awk -F '-' '{print $2}') + # Ideally, we would add the ubuntu-minimal remote + # e.g. https://cloud-images.ubuntu.com/minimal/releases/jammy/ + # but that would effectively change the host's LXC configurations. echo "Allocating $SPREAD_SYSTEM..." - docker_image=$(echo $SPREAD_SYSTEM | awk -F '-' '{print $1":"$2}') - docker_arch=$(echo $SPREAD_SYSTEM | awk -F '-' '{print $NF}') - docker run --rm -e DEBIAN_FRONTEND=noninteractice \ - -e usr=$SPREAD_SYSTEM_USERNAME -e pass=$SPREAD_SYSTEM_PASSWORD \ - --name $SPREAD_SYSTEM -d $docker_arch/$docker_image sh -c ' - set -x - apt update - apt install -y openssh-server sudo - mkdir /run/sshd - echo "root:$pass" | chpasswd - echo "PermitRootLogin yes" >> /etc/ssh/sshd_config - /usr/sbin/sshd -D - ' - # The container will be up really fast, but the CMD might take time to - # run, and Spread will timeout the SSH op after 5 min. So we wait for the - # container during the allocation script. - until docker exec $SPREAD_SYSTEM pgrep sshd + sudo lxc launch --ephemeral ubuntu:$release $SPREAD_SYSTEM + until sudo lxc exec $SPREAD_SYSTEM -- pgrep sshd &>/dev/null do sleep 5 done - ADDRESS `docker inspect $SPREAD_SYSTEM --format '{{.NetworkSettings.Networks.bridge.IPAddress}}'` - discard: docker rm -f $SPREAD_SYSTEM + sudo lxc exec $SPREAD_SYSTEM -- sed -i 's/^\s*#\?\s*\(PermitRootLogin\|PasswordAuthentication\)\>.*/\1 yes/' /etc/ssh/sshd_config + sudo lxc exec $SPREAD_SYSTEM -- bash -c "sed -i 's/^\s*\(PermitRootLogin\|PasswordAuthentication\)\>.*/# COMMENTED OUT BY SPREAD: \0/' /etc/ssh/sshd_config.d/* || true" + sudo lxc exec $SPREAD_SYSTEM -- bash -c "test -d /etc/ssh/sshd_config.d && echo -e 'PermitRootLogin=yes\nPasswordAuthentication=yes' > /etc/ssh/sshd_config.d/00-spread.conf" + sudo lxc exec $SPREAD_SYSTEM -- bash -c "echo root:${SPREAD_SYSTEM_PASSWORD} | chpasswd" + sudo lxc exec $SPREAD_SYSTEM -- killall -HUP sshd + ADDRESS `sudo lxc list --format=json $SPREAD_SYSTEM | jq -r '.[0].state.network.eth0.addresses[] | select(.family=="inet") | .address'` + discard: sudo lxc stop $SPREAD_SYSTEM || true systems: - - ubuntu-24.04-amd64: + - ubuntu-jammy: password: ubuntu - - ubuntu-24.04-arm64v8: - password: ubuntu - - ubuntu-24.04-arm32v7: - password: ubuntu - - ubuntu-24.04-ppc64le: - password: ubuntu - - ubuntu-24.04-s390x: - password: ubuntu - # Re-enable risvc64 once we have re-enabled this arch for the Ubuntu container - # - ubuntu-24.04-riscv64: - # password: ubuntu prepare: | # Deb arch to GOARCH @@ -58,16 +43,15 @@ prepare: | chisel_tar="chisel.tar.gz" apt install -y curl wget + echo $(curl -i https://api.github.com/repos/canonical/chisel/releases/latest) curl -s https://api.github.com/repos/canonical/chisel/releases/latest \ | awk "/browser_download_url/ && /chisel_v/ && /$arch/" \ | cut -d : -f 2,3 \ - | tr -d \" \ | xargs wget -O $chisel_tar tar -xf $chisel_tar -C /usr/local/bin -prepare-each: - chisel version +prepare-each: chisel version suites: tests/spread/integration/: From eb40b5ba59cd0da28ff01babf982803a7f524eda Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Mon, 26 Aug 2024 09:40:52 +0300 Subject: [PATCH 27/45] Revert "switch to lxd-based spread tests" This reverts commit 1feb608d922794d3ffd3b33a27f3ea3b666fa79a. --- spread.yaml | 54 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/spread.yaml b/spread.yaml index 3123ecb40..1ddafa8e4 100644 --- a/spread.yaml +++ b/spread.yaml @@ -11,31 +11,46 @@ exclude: - .github backends: - lxd: + docker: type: adhoc allocate: | - set -x - sudo lxd init --auto - release=$(echo $SPREAD_SYSTEM | awk -F '-' '{print $2}') - # Ideally, we would add the ubuntu-minimal remote - # e.g. https://cloud-images.ubuntu.com/minimal/releases/jammy/ - # but that would effectively change the host's LXC configurations. echo "Allocating $SPREAD_SYSTEM..." - sudo lxc launch --ephemeral ubuntu:$release $SPREAD_SYSTEM - until sudo lxc exec $SPREAD_SYSTEM -- pgrep sshd &>/dev/null + docker_image=$(echo $SPREAD_SYSTEM | awk -F '-' '{print $1":"$2}') + docker_arch=$(echo $SPREAD_SYSTEM | awk -F '-' '{print $NF}') + docker run --rm -e DEBIAN_FRONTEND=noninteractice \ + -e usr=$SPREAD_SYSTEM_USERNAME -e pass=$SPREAD_SYSTEM_PASSWORD \ + --name $SPREAD_SYSTEM -d $docker_arch/$docker_image sh -c ' + set -x + apt update + apt install -y openssh-server sudo + mkdir /run/sshd + echo "root:$pass" | chpasswd + echo "PermitRootLogin yes" >> /etc/ssh/sshd_config + /usr/sbin/sshd -D + ' + # The container will be up really fast, but the CMD might take time to + # run, and Spread will timeout the SSH op after 5 min. So we wait for the + # container during the allocation script. + until docker exec $SPREAD_SYSTEM pgrep sshd do sleep 5 done - sudo lxc exec $SPREAD_SYSTEM -- sed -i 's/^\s*#\?\s*\(PermitRootLogin\|PasswordAuthentication\)\>.*/\1 yes/' /etc/ssh/sshd_config - sudo lxc exec $SPREAD_SYSTEM -- bash -c "sed -i 's/^\s*\(PermitRootLogin\|PasswordAuthentication\)\>.*/# COMMENTED OUT BY SPREAD: \0/' /etc/ssh/sshd_config.d/* || true" - sudo lxc exec $SPREAD_SYSTEM -- bash -c "test -d /etc/ssh/sshd_config.d && echo -e 'PermitRootLogin=yes\nPasswordAuthentication=yes' > /etc/ssh/sshd_config.d/00-spread.conf" - sudo lxc exec $SPREAD_SYSTEM -- bash -c "echo root:${SPREAD_SYSTEM_PASSWORD} | chpasswd" - sudo lxc exec $SPREAD_SYSTEM -- killall -HUP sshd - ADDRESS `sudo lxc list --format=json $SPREAD_SYSTEM | jq -r '.[0].state.network.eth0.addresses[] | select(.family=="inet") | .address'` - discard: sudo lxc stop $SPREAD_SYSTEM || true + ADDRESS `docker inspect $SPREAD_SYSTEM --format '{{.NetworkSettings.Networks.bridge.IPAddress}}'` + discard: docker rm -f $SPREAD_SYSTEM systems: - - ubuntu-jammy: + - ubuntu-24.04-amd64: password: ubuntu + - ubuntu-24.04-arm64v8: + password: ubuntu + - ubuntu-24.04-arm32v7: + password: ubuntu + - ubuntu-24.04-ppc64le: + password: ubuntu + - ubuntu-24.04-s390x: + password: ubuntu + # Re-enable risvc64 once we have re-enabled this arch for the Ubuntu container + # - ubuntu-24.04-riscv64: + # password: ubuntu prepare: | # Deb arch to GOARCH @@ -43,15 +58,16 @@ prepare: | chisel_tar="chisel.tar.gz" apt install -y curl wget - echo $(curl -i https://api.github.com/repos/canonical/chisel/releases/latest) curl -s https://api.github.com/repos/canonical/chisel/releases/latest \ | awk "/browser_download_url/ && /chisel_v/ && /$arch/" \ | cut -d : -f 2,3 \ + | tr -d \" \ | xargs wget -O $chisel_tar tar -xf $chisel_tar -C /usr/local/bin -prepare-each: chisel version +prepare-each: + chisel version suites: tests/spread/integration/: From 1040ce8a986ae6d0e9f44e14b56eff70f4b6e480 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 16 Oct 2024 11:14:36 +0300 Subject: [PATCH 28/45] remove unneeded slices --- slices/libperl5.38t64.yaml | 39 --------------------------- slices/perl-base.yaml | 32 ---------------------- slices/perl-modules-5.38.yaml | 16 ----------- slices/perl.yaml | 51 ----------------------------------- slices/socat.yaml | 23 ---------------- 5 files changed, 161 deletions(-) delete mode 100644 slices/libperl5.38t64.yaml delete mode 100644 slices/perl-base.yaml delete mode 100644 slices/perl-modules-5.38.yaml delete mode 100644 slices/perl.yaml delete mode 100644 slices/socat.yaml diff --git a/slices/libperl5.38t64.yaml b/slices/libperl5.38t64.yaml deleted file mode 100644 index a7ecc8275..000000000 --- a/slices/libperl5.38t64.yaml +++ /dev/null @@ -1,39 +0,0 @@ -package: libperl5.38t64 - -essential: - - libperl5.38t64_copyright - -slices: - libs: - essential: - - libbz2-1.0_libs - - libc6_libs - - libcrypt1_libs - - libdb5.3t64_libs - - libgdbm-compat4t64_libs - - libgdbm6t64_libs - - perl-modules-5.38_modules - - zlib1g_libs - contents: - /usr/lib/*-linux-*/libperl.so.5.38*: - /usr/lib/*-linux-*/perl/5.38*/**: - - config: - contents: - /usr/lib/*-linux-*/perl/cross-config-5.38.2/Config.pm: - /usr/lib/*-linux-*/perl/cross-config-5.38.2/Config_heavy.pl: - /usr/lib/*-linux-*/perl/debian-config-data-5.38.2/config.sh.debug.gz: - /usr/lib/*-linux-*/perl/debian-config-data-5.38.2/config.sh.shared.gz: - /usr/lib/*-linux-*/perl/debian-config-data-5.38.2/config.sh.static.gz: - - bins: - essential: - - libperl5.38t64_config - - libperl5.38t64_libs - contents: - /usr/bin/cpan5.38-*-linux-*: - /usr/bin/perl5.38-*-linux-*: - - copyright: - contents: - /usr/share/doc/libperl5.38t64/copyright: diff --git a/slices/perl-base.yaml b/slices/perl-base.yaml deleted file mode 100644 index 160158d27..000000000 --- a/slices/perl-base.yaml +++ /dev/null @@ -1,32 +0,0 @@ -package: perl-base - -essential: - - perl-base_copyright - -slices: - modules: - contents: - /usr/lib/*-linux-*/perl-base/**/*.pl: - /usr/lib/*-linux-*/perl-base/**/*.pm: - /usr/lib/*-linux-*/perl-base/*.pl: - /usr/lib/*-linux-*/perl-base/*.pm: - - libs: - essential: - - libc6_libs - - libcrypt1_libs - contents: - /usr/lib/*-linux-*/perl-base/**/*.so: - - bins: - essential: - - perl-base_libs - - perl-base_modules - contents: - # hard link - /usr/bin/perl: - /usr/bin/perl5.38.2: {copy: /usr/bin/perl} - - copyright: - contents: - /usr/share/doc/perl-base/copyright: diff --git a/slices/perl-modules-5.38.yaml b/slices/perl-modules-5.38.yaml deleted file mode 100644 index c613e2d2b..000000000 --- a/slices/perl-modules-5.38.yaml +++ /dev/null @@ -1,16 +0,0 @@ -package: perl-modules-5.38 - -essential: - - perl-modules-5.38_copyright - -slices: - modules: - essential: - - perl-base_libs - - perl-base_modules - contents: - /usr/share/perl/5.38*/**: - - copyright: - contents: - /usr/share/doc/perl-modules-5.38/copyright: diff --git a/slices/perl.yaml b/slices/perl.yaml deleted file mode 100644 index 1a1e9d2ce..000000000 --- a/slices/perl.yaml +++ /dev/null @@ -1,51 +0,0 @@ -package: perl - -essential: - - perl_copyright - -slices: - bins: - essential: - - libperl5.38t64_bins - - perl-base_bins - - perl-modules-5.38_modules - - perl_config - contents: - /usr/bin/corelist: - /usr/bin/cpan: - /usr/bin/enc2xs: - /usr/bin/encguess: - /usr/bin/h2ph: - /usr/bin/h2xs: - /usr/bin/instmodsh: - /usr/bin/json_pp: - /usr/bin/libnetcfg: - # /usr/bin/perlbug: - /usr/bin/perldoc: - /usr/bin/perlivp: - # hard link - # /usr/bin/perlthanks: {copy: /usr/bin/perlbug} - /usr/bin/piconv: - /usr/bin/pl2pm: - /usr/bin/pod2html: - /usr/bin/pod2man: - /usr/bin/pod2text: - /usr/bin/pod2usage: - /usr/bin/podchecker: - /usr/bin/prove: - /usr/bin/ptar: - /usr/bin/ptardiff: - /usr/bin/ptargrep: - /usr/bin/shasum: - /usr/bin/splain: - /usr/bin/streamzip: - /usr/bin/xsubpp: - /usr/bin/zipdetails: - - config: - contents: - /etc/perl/Net/libnet.cfg: - - copyright: - contents: - /usr/share/doc/perl/copyright: diff --git a/slices/socat.yaml b/slices/socat.yaml deleted file mode 100644 index 6eaf63893..000000000 --- a/slices/socat.yaml +++ /dev/null @@ -1,23 +0,0 @@ -package: socat - -essential: - - socat_copyright - -slices: - bins: - essential: - - libc6_libs - - libssl3t64_libs - - libwrap0_libs - contents: - /usr/bin/filan: - /usr/bin/procan: - /usr/bin/socat: - /usr/bin/socat-broker.sh: - /usr/bin/socat-chain.sh: - /usr/bin/socat-mux.sh: - /usr/bin/socat1: - - copyright: - contents: - /usr/share/doc/socat/copyright: From e6ebb18e90664c37b530c7825a3e18d7b8252ee2 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 16 Oct 2024 11:36:01 +0300 Subject: [PATCH 29/45] modified util-linux --- slices/util-linux.yaml | 30 ++++++++++++++++--- tests/spread/integration/util-linux/task.yaml | 20 +++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 tests/spread/integration/util-linux/task.yaml diff --git a/slices/util-linux.yaml b/slices/util-linux.yaml index f5ed4fac3..57cc3d108 100644 --- a/slices/util-linux.yaml +++ b/slices/util-linux.yaml @@ -14,10 +14,12 @@ slices: - libpam0g_libs - libselinux1_libs - libsmartcols1_libs + - libsystemd0_libs - libtinfo6_libs - libudev1_libs - libuuid1_libs - - util-linux_config + - util-linux_generated + - util-linux_pam-profile - zlib1g_libs contents: /usr/bin/addpart: @@ -30,8 +32,7 @@ slices: /usr/bin/flock: /usr/bin/getopt: /usr/bin/hardlink: - ## not available in all archs - # /usr/bin/i386: + /usr/bin/i386: {arch: [i386, amd64]} /usr/bin/ionice: /usr/bin/ipcmk: /usr/bin/ipcrm: @@ -54,10 +55,15 @@ slices: /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: @@ -69,6 +75,7 @@ slices: /usr/bin/utmpdump: /usr/bin/wdctl: /usr/bin/whereis: + /usr/bin/x86_64: {arch: [amd64]} /usr/sbin/agetty: /usr/sbin/blkdiscard: /usr/sbin/blkid: @@ -96,13 +103,28 @@ slices: /usr/sbin/wipefs: /usr/sbin/zramctl: - config: + 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: + copyright: contents: /usr/share/doc/util-linux/copyright: 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" + From 7f19702cee75242d7aa53b7d997bf0224eda482d Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 16 Oct 2024 11:37:30 +0300 Subject: [PATCH 30/45] fix a linting error --- slices/util-linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slices/util-linux.yaml b/slices/util-linux.yaml index 57cc3d108..5d987665a 100644 --- a/slices/util-linux.yaml +++ b/slices/util-linux.yaml @@ -63,7 +63,7 @@ slices: /usr/bin/resizepart: /usr/bin/rev: /usr/bin/s390: {arch: [s390x]} - /usr/bin/s390x: arch: [s390x]} + /usr/bin/s390x: {arch: [s390x]} /usr/bin/setarch: /usr/bin/setpriv: /usr/bin/setsid: From ec1aa62eab58489e78e93bb9a4e9489a761950bf Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 16 Oct 2024 15:43:10 +0300 Subject: [PATCH 31/45] address review changes --- slices/debconf.yaml | 44 ------------------- slices/erlang-asn1.yaml | 2 +- slices/erlang-base.yaml | 4 +- slices/erlang-crypto.yaml | 2 +- slices/erlang-eldap.yaml | 6 +-- slices/erlang-ftp.yaml | 6 +-- slices/erlang-inets.yaml | 16 +++---- slices/erlang-mnesia.yaml | 2 +- slices/erlang-os-mon.yaml | 6 +-- slices/erlang-parsetools.yaml | 2 +- slices/erlang-public-key.yaml | 6 +-- slices/erlang-runtime-tools.yaml | 4 +- slices/erlang-snmp.yaml | 18 +++++--- slices/erlang-ssl.yaml | 8 ++-- slices/erlang-syntax-tools.yaml | 2 +- slices/erlang-tftp.yaml | 2 +- slices/erlang-tools.yaml | 4 +- slices/erlang-xmerl.yaml | 2 +- slices/libpam-modules-bin.yaml | 4 ++ slices/libpam-modules.yaml | 7 +++ slices/libpam-runtime.yaml | 23 ++++++++++ slices/login.yaml | 1 - slices/rabbitmq-server.yaml | 10 ++--- slices/util-linux.yaml | 11 +++++ .../integration/rabbitmq-server/task.yaml | 2 +- 25 files changed, 98 insertions(+), 96 deletions(-) delete mode 100644 slices/debconf.yaml diff --git a/slices/debconf.yaml b/slices/debconf.yaml deleted file mode 100644 index 30f0aedd2..000000000 --- a/slices/debconf.yaml +++ /dev/null @@ -1,44 +0,0 @@ -package: debconf - -essential: - - debconf_copyright - -slices: - bash-completion: - contents: - /usr/share/bash-completion/completions/debconf: - /usr/share/bash-completion/completions/debconf-show: - - bins: - essential: - - debconf_config - - debconf_modules - contents: - /usr/bin/debconf: - /usr/bin/debconf-apt-progress: - /usr/bin/debconf-communicate: - /usr/bin/debconf-copydb: - /usr/bin/debconf-escape: - /usr/bin/debconf-set-selections: - /usr/bin/debconf-show: - /usr/sbin/dpkg-preconfigure: - /usr/sbin/dpkg-reconfigure: - - config: - contents: - /etc/apt/apt.conf.d/70debconf: - /etc/debconf.conf: - - modules: - contents: - /usr/share/debconf/confmodule: - /usr/share/debconf/confmodule.sh: - /usr/share/debconf/debconf.conf: - /usr/share/debconf/fix_db.pl: - /usr/share/debconf/frontend: - /usr/share/perl5/Debconf/**: - /usr/share/perl5/Debian/DebConf/Client/ConfModule.pm: - - copyright: - contents: - /usr/share/doc/debconf/copyright: diff --git a/slices/erlang-asn1.yaml b/slices/erlang-asn1.yaml index dd9467154..bd3d2f2d1 100644 --- a/slices/erlang-asn1.yaml +++ b/slices/erlang-asn1.yaml @@ -4,7 +4,7 @@ essential: - erlang-asn1_copyright slices: - libs: + modules: essential: - erlang-base_bins - libc6_libs diff --git a/slices/erlang-base.yaml b/slices/erlang-base.yaml index e5bee63f9..b87a7144f 100644 --- a/slices/erlang-base.yaml +++ b/slices/erlang-base.yaml @@ -6,7 +6,7 @@ essential: slices: bins: essential: - - erlang-base_libs + - erlang-base_modules - libc6_libs - libgcc-s1_libs - libstdc++6_libs @@ -26,7 +26,7 @@ slices: /usr/lib/erlang/erts-*/bin/**: /usr/lib/erlang/lib/erl_interface-*/bin/erl_call: - libs: + modules: contents: /usr/lib/erlang/lib/compiler-*/ebin/**: /usr/lib/erlang/lib/erts-*/ebin/**: diff --git a/slices/erlang-crypto.yaml b/slices/erlang-crypto.yaml index e0433fa64..ae0a5c35a 100644 --- a/slices/erlang-crypto.yaml +++ b/slices/erlang-crypto.yaml @@ -4,7 +4,7 @@ essential: - erlang-crypto_copyright slices: - libs: + modules: essential: - erlang-base_bins - libc6_libs diff --git a/slices/erlang-eldap.yaml b/slices/erlang-eldap.yaml index 6b18bef80..9275bd41a 100644 --- a/slices/erlang-eldap.yaml +++ b/slices/erlang-eldap.yaml @@ -4,11 +4,11 @@ essential: - erlang-eldap_copyright slices: - libs: + modules: essential: - - erlang-asn1_libs + - erlang-asn1_modules - erlang-base_bins - - erlang-ssl_libs + - erlang-ssl_modules contents: /usr/lib/erlang/lib/eldap-*/ebin/**: diff --git a/slices/erlang-ftp.yaml b/slices/erlang-ftp.yaml index 3d932c728..505dc5911 100644 --- a/slices/erlang-ftp.yaml +++ b/slices/erlang-ftp.yaml @@ -4,11 +4,11 @@ essential: - erlang-ftp_copyright slices: - libs: + modules: essential: - erlang-base_bins - - erlang-runtime-tools_libs - - erlang-ssl_libs + - erlang-runtime-tools_modules + - erlang-ssl_modules contents: /usr/lib/erlang/lib/ftp-*/ebin/**: diff --git a/slices/erlang-inets.yaml b/slices/erlang-inets.yaml index 4bfa50758..48e00e92c 100644 --- a/slices/erlang-inets.yaml +++ b/slices/erlang-inets.yaml @@ -4,20 +4,20 @@ essential: - erlang-inets_copyright slices: - bins: + scripts: essential: - - erlang-inets_libs + - erlang-inets_modules contents: /usr/lib/erlang/lib/inets-*/priv/bin/runcgi.sh: - libs: + modules: essential: - erlang-base_bins - - erlang-ftp_libs - - erlang-mnesia_libs - - erlang-runtime-tools_libs - - erlang-ssl_libs - - erlang-tftp_libs + - 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/**: diff --git a/slices/erlang-mnesia.yaml b/slices/erlang-mnesia.yaml index f95ca0024..b35be401e 100644 --- a/slices/erlang-mnesia.yaml +++ b/slices/erlang-mnesia.yaml @@ -4,7 +4,7 @@ essential: - erlang-mnesia_copyright slices: - libs: + modules: essential: - erlang-base_bins contents: diff --git a/slices/erlang-os-mon.yaml b/slices/erlang-os-mon.yaml index 604488d5b..f5f0e3b14 100644 --- a/slices/erlang-os-mon.yaml +++ b/slices/erlang-os-mon.yaml @@ -6,14 +6,14 @@ essential: slices: bins: essential: - - erlang-os-mon_libs + - erlang-os-mon_modules contents: /usr/lib/erlang/lib/os_mon-*/priv/**: - libs: + modules: essential: - erlang-base_bins - - erlang-mnesia_libs + - erlang-mnesia_modules - erlang-snmp_bins - libc6_libs contents: diff --git a/slices/erlang-parsetools.yaml b/slices/erlang-parsetools.yaml index d5e2089a4..e596a3ef4 100644 --- a/slices/erlang-parsetools.yaml +++ b/slices/erlang-parsetools.yaml @@ -4,7 +4,7 @@ essential: - erlang-parsetools_copyright slices: - libs: + modules: essential: - erlang-base_bins contents: diff --git a/slices/erlang-public-key.yaml b/slices/erlang-public-key.yaml index 07cbe2217..fbca6ff44 100644 --- a/slices/erlang-public-key.yaml +++ b/slices/erlang-public-key.yaml @@ -4,11 +4,11 @@ essential: - erlang-public-key_copyright slices: - libs: + modules: essential: - - erlang-asn1_libs + - erlang-asn1_modules - erlang-base_bins - - erlang-crypto_libs + - erlang-crypto_modules contents: /usr/lib/erlang/lib/public_key-*/ebin/**: diff --git a/slices/erlang-runtime-tools.yaml b/slices/erlang-runtime-tools.yaml index 1439735b3..9f885435c 100644 --- a/slices/erlang-runtime-tools.yaml +++ b/slices/erlang-runtime-tools.yaml @@ -4,10 +4,10 @@ essential: - erlang-runtime-tools_copyright slices: - libs: + modules: essential: - erlang-base_bins - - erlang-mnesia_libs + - erlang-mnesia_modules - libc6_libs contents: /usr/lib/erlang/lib/runtime_tools-*/ebin/**: diff --git a/slices/erlang-snmp.yaml b/slices/erlang-snmp.yaml index 39993ab3e..a0095c818 100644 --- a/slices/erlang-snmp.yaml +++ b/slices/erlang-snmp.yaml @@ -7,11 +7,12 @@ slices: bins: essential: - erlang-base_bins - - erlang-crypto_libs - - erlang-mnesia_libs - - erlang-runtime-tools_libs + - erlang-crypto_modules + - erlang-mnesia_modules + - erlang-runtime-tools_modules - erlang-snmp_config - - erlang-snmp_libs + - erlang-snmp_data + - erlang-snmp_modules contents: /usr/bin/snmpc: /usr/lib/erlang/lib/snmp-*/bin/snmpc: @@ -20,13 +21,16 @@ slices: contents: /usr/lib/erlang/lib/snmp-*/priv/conf/**: - libs: + data: contents: - /usr/lib/erlang/lib/snmp-*/ebin/**: - /usr/lib/erlang/lib/snmp-*/include/**: /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 index 9fae2527a..af936e9f9 100644 --- a/slices/erlang-ssl.yaml +++ b/slices/erlang-ssl.yaml @@ -4,12 +4,12 @@ essential: - erlang-ssl_copyright slices: - libs: + modules: essential: - erlang-base_bins - - erlang-crypto_libs - - erlang-public-key_libs - - erlang-runtime-tools_libs + - erlang-crypto_modules + - erlang-public-key_modules + - erlang-runtime-tools_modules contents: /usr/lib/erlang/lib/ssl-*/ebin/**: diff --git a/slices/erlang-syntax-tools.yaml b/slices/erlang-syntax-tools.yaml index 45ba7a161..0a392b737 100644 --- a/slices/erlang-syntax-tools.yaml +++ b/slices/erlang-syntax-tools.yaml @@ -4,7 +4,7 @@ essential: - erlang-syntax-tools_copyright slices: - libs: + modules: essential: - erlang-base_bins contents: diff --git a/slices/erlang-tftp.yaml b/slices/erlang-tftp.yaml index f04850ddc..5131b3f79 100644 --- a/slices/erlang-tftp.yaml +++ b/slices/erlang-tftp.yaml @@ -4,7 +4,7 @@ essential: - erlang-tftp_copyright slices: - libs: + modules: essential: - erlang-base_bins contents: diff --git a/slices/erlang-tools.yaml b/slices/erlang-tools.yaml index d4ef47219..95810a84c 100644 --- a/slices/erlang-tools.yaml +++ b/slices/erlang-tools.yaml @@ -4,10 +4,10 @@ essential: - erlang-tools_copyright slices: - libs: + modules: essential: - erlang-base_bins - - erlang-runtime-tools_libs + - erlang-runtime-tools_modules contents: /usr/lib/erlang/lib/tools-*/ebin/**: /usr/lib/erlang/lib/tools-*/emacs/**: diff --git a/slices/erlang-xmerl.yaml b/slices/erlang-xmerl.yaml index 8db5dcdec..264590dad 100644 --- a/slices/erlang-xmerl.yaml +++ b/slices/erlang-xmerl.yaml @@ -4,7 +4,7 @@ essential: - erlang-xmerl_copyright slices: - libs: + modules: essential: - erlang-base_bins contents: diff --git a/slices/libpam-modules-bin.yaml b/slices/libpam-modules-bin.yaml index da343bbb6..f29133d60 100644 --- a/slices/libpam-modules-bin.yaml +++ b/slices/libpam-modules-bin.yaml @@ -23,6 +23,10 @@ slices: /usr/sbin/unix_chkpwd: /usr/sbin/unix_update: + services: + contents: + /usr/lib/systemd/system/pam_namespace.service: + copyright: contents: /usr/share/doc/libpam-modules-bin/copyright: diff --git a/slices/libpam-modules.yaml b/slices/libpam-modules.yaml index 41c2254e6..b1a6e5dd4 100644 --- a/slices/libpam-modules.yaml +++ b/slices/libpam-modules.yaml @@ -71,6 +71,13 @@ slices: /usr/lib/*-linux-*/security/pam_wheel.so: /usr/lib/*-linux-*/security/pam_xauth.so: + # Used by pam-auth-update to generate the pam.d/ config + # files inside etc. However pam-auth-update relies on + # debconf to actually work and discover these packages. + pam-config: + contents: + /usr/share/pam-configs/mkhomedir: + copyright: contents: /usr/share/doc/libpam-modules/copyright: diff --git a/slices/libpam-runtime.yaml b/slices/libpam-runtime.yaml index c3f851812..fb9b5422f 100644 --- a/slices/libpam-runtime.yaml +++ b/slices/libpam-runtime.yaml @@ -121,6 +121,29 @@ slices: 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 + # debconf to actually work and discover these packages. + pam-config: + contents: + /usr/share/pam-configs/unix: + + # default templates for the /etc/pam.d files that are used by + # pam-auth-update to generate the /etc/pam.d versions based on + # additional plugs in /usr/share/pam-configs/*. + pam-defaults: + contents: + /usr/share/pam/common-account: + /usr/share/pam/common-account.md5sums: + /usr/share/pam/common-auth: + /usr/share/pam/common-auth.md5sums: + /usr/share/pam/common-password: + /usr/share/pam/common-password.md5sums: + /usr/share/pam/common-session: + /usr/share/pam/common-session-noninteractive: + /usr/share/pam/common-session-noninteractive.md5sums: + /usr/share/pam/common-session.md5sums: + # folders expected by libpam to exist var: contents: diff --git a/slices/login.yaml b/slices/login.yaml index e469395f4..f284ef8c9 100644 --- a/slices/login.yaml +++ b/slices/login.yaml @@ -20,7 +20,6 @@ slices: /usr/bin/newgrp: /usr/bin/sg: /usr/sbin/nologin: - /usr/share/apport/package-hooks/source_shadow.py: config: contents: diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 4f5929c63..ca047beb5 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -3,6 +3,8 @@ 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: @@ -14,10 +16,8 @@ slices: - base-passwd_data - bash_bins - coreutils_bins - ## erlang* packages do not exist for i386 - ## for all other archs, uncomment all those slices below # - erlang-base_bins - # - erlang-inets_bins + # - erlang-inets_scripts # - erlang-os-mon_bins - grep_bins - libc-bin_locale @@ -30,7 +30,7 @@ slices: - python3.12_standard - rabbitmq-server_libs - sed_bins - - util-linux_bins + - util-linux_su-only contents: /usr/bin/rabbitmqadmin: /usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server: @@ -93,8 +93,6 @@ slices: libs: essential: - ## erlang* packages do not exist for i386 - ## for all other archs, uncomment all those slices below # - erlang-crypto_libs # - erlang-eldap_libs # - erlang-mnesia_libs diff --git a/slices/util-linux.yaml b/slices/util-linux.yaml index 5d987665a..ac1ee0b6a 100644 --- a/slices/util-linux.yaml +++ b/slices/util-linux.yaml @@ -125,6 +125,17 @@ slices: /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/rabbitmq-server/task.yaml b/tests/spread/integration/rabbitmq-server/task.yaml index 8609ffc8b..d368989bb 100644 --- a/tests/spread/integration/rabbitmq-server/task.yaml +++ b/tests/spread/integration/rabbitmq-server/task.yaml @@ -1,7 +1,7 @@ summary: Integration tests for RabbitMQ execute: | - rootfs="$(install-slices rabbitmq-server_bins erlang-base_bins erlang-inets_bins erlang-os-mon_bins erlang-crypto_libs erlang-eldap_libs erlang-mnesia_libs erlang-parsetools_libs erlang-public-key_libs erlang-runtime-tools_libs erlang-ssl_libs erlang-syntax-tools_libs erlang-tools_libs erlang-xmerl_libs)" + 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 From d3f9cef4c03e807db4ce9a087e80990f817bc3bf Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 16 Oct 2024 19:06:21 +0300 Subject: [PATCH 32/45] fix hardlinks in rabbitmq-server slice --- slices/rabbitmq-server.yaml | 80 +++++++++++++++---------------------- 1 file changed, 32 insertions(+), 48 deletions(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index ca047beb5..0fc7d3733 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -28,7 +28,8 @@ slices: - netbase_default-networks - passwd_bins - python3.12_standard - - rabbitmq-server_libs + - rabbitmq-server_config + - rabbitmq-server_modules - sed_bins - util-linux_su-only contents: @@ -40,50 +41,34 @@ slices: /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/rabbitmq*: /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/vmware-rabbitmq: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-plugins: - { mutable: true } + { + 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: - { mutable: true } + { + 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: - { mutable: true } + { + 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: - { mutable: true } + { + copy: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics + } /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmqctl: - { mutable: true } + { + 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: - { mutable: true } + { + copy: /usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics + } /usr/sbin/rabbitmq*: /var/lib/rabbitmq/: /var/lib/rabbitmq/.erlang.cookie: { text: DUMMY, mode: 0400 } /var/lib/rabbitmq/mnesia/: { mode: 0750 } /var/log/rabbitmq/: - mutate: | - file = content.read( - "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-diagnostics" - ) - content.write( - "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-plugins", - file - ) - content.write( - "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-queues", - file - ) - content.write( - "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-streams", - file - ) - content.write( - "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmq-upgrade", - file - ) - content.write( - "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/rabbitmqctl", - file - ) - content.write( - "/usr/lib/rabbitmq/lib/rabbitmq_server-3.12.1/escript/vmware-rabbitmq", - file - ) config: contents: @@ -91,19 +76,18 @@ slices: /etc/rabbitmq/rabbitmq-env.conf: { copy: /usr/share/rabbitmq/rabbitmq-env.conf, mode: 0644 } - libs: - essential: - # - erlang-crypto_libs - # - erlang-eldap_libs - # - erlang-mnesia_libs - # - erlang-parsetools_libs - # - erlang-public-key_libs - # - erlang-runtime-tools_libs - # - erlang-ssl_libs - # - erlang-syntax-tools_libs - # - erlang-tools_libs - # - erlang-xmerl_libs - - rabbitmq-server_config + 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/**: From 27954d31c26c7f60280b6d80987a947b1e9c7d4e Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 16 Oct 2024 19:45:11 +0300 Subject: [PATCH 33/45] add integration tests --- slices/rabbitmq-server.yaml | 5 +++++ tests/spread/integration/erlang/task.yaml | 22 ++++++++++++++++++++++ tests/spread/integration/login/task.yaml | 12 ++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 tests/spread/integration/erlang/task.yaml create mode 100644 tests/spread/integration/login/task.yaml diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 0fc7d3733..18419e9ae 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -40,6 +40,8 @@ slices: /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 @@ -66,6 +68,9 @@ slices: } /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/: diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml new file mode 100644 index 000000000..860432ca1 --- /dev/null +++ b/tests/spread/integration/erlang/task.yaml @@ -0,0 +1,22 @@ +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)" + + cp /bin/sh "$rootfs"/bin/ + cp /etc/resolv.conf "$rootfs"/etc/ + cp /etc/nsswitch.conf "$rootfs"/etc/ + chroot "$rootfs" mkdir /dev + chroot "$rootfs" touch /dev/null + chroot "$rootfs" chmod 777 /dev/null + # 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 erl_call by connecting to an erl server + chroot "$rootfs" nohup erl -sname test -setcookie cookie & + chroot "$rootfs" /usr/bin/erl_call -sname test -a 'erlang node []' + # test escript by executing a simple script + chroot "$rootfs" echo '#!/usr/bin/escript' > test_script && echo 'main(_) -> io:format("escript OK~n").' >> test_script && chmod +x test_script && /usr/bin/escript test_script + # test start_embedded to start the embedded environment + chroot "$rootfs" /usr/bin/start_embedded \ No newline at end of file diff --git a/tests/spread/integration/login/task.yaml b/tests/spread/integration/login/task.yaml new file mode 100644 index 000000000..cc8f51c89 --- /dev/null +++ b/tests/spread/integration/login/task.yaml @@ -0,0 +1,12 @@ +summary: Integration tests for Erlang + +execute: | + rootfs="$(install-slices login_bins)" + chroot "$rootfs" touch /var/log/faillog + chroot "$rootfs" touch /var/log/lastlog + chroot "$rootfs" login -p -f root + chroot "$rootfs" nologin | grep "not available" + chroot "$rootfs" faillog + chroot "$rootfs" lastlog + chroot "$rootfs" newgrp root + chroot "$rootfs" sg root From f65bade1ea2524985a0fe11319242fb8c0ccecd9 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 17 Oct 2024 13:27:49 +0300 Subject: [PATCH 34/45] fix tests --- slices/rabbitmq-server.yaml | 2 +- tests/spread/integration/erlang/task.yaml | 5 ++++- tests/spread/integration/login/task.yaml | 10 ++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/slices/rabbitmq-server.yaml b/slices/rabbitmq-server.yaml index 18419e9ae..64909114c 100644 --- a/slices/rabbitmq-server.yaml +++ b/slices/rabbitmq-server.yaml @@ -82,7 +82,7 @@ slices: { copy: /usr/share/rabbitmq/rabbitmq-env.conf, mode: 0644 } modules: - #essential: + # essential: # - erlang-crypto_modules # - erlang-eldap_modules # - erlang-mnesia_modules diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index 860432ca1..789403cff 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -3,6 +3,7 @@ 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)" + mkdir "$rootfs"/bin cp /bin/sh "$rootfs"/bin/ cp /etc/resolv.conf "$rootfs"/etc/ cp /etc/nsswitch.conf "$rootfs"/etc/ @@ -19,4 +20,6 @@ execute: | # test escript by executing a simple script chroot "$rootfs" echo '#!/usr/bin/escript' > test_script && echo 'main(_) -> io:format("escript OK~n").' >> test_script && chmod +x test_script && /usr/bin/escript test_script # test start_embedded to start the embedded environment - chroot "$rootfs" /usr/bin/start_embedded \ No newline at end of file + 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 diff --git a/tests/spread/integration/login/task.yaml b/tests/spread/integration/login/task.yaml index cc8f51c89..7971a910f 100644 --- a/tests/spread/integration/login/task.yaml +++ b/tests/spread/integration/login/task.yaml @@ -1,12 +1,14 @@ summary: Integration tests for Erlang execute: | - rootfs="$(install-slices login_bins)" - chroot "$rootfs" touch /var/log/faillog - chroot "$rootfs" touch /var/log/lastlog - chroot "$rootfs" login -p -f root + rootfs="$(install-slices login_bins bash_bins base-files_base base-passwd_data)" + chroot "$rootfs" mkdir /dev + 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 + chroot "$rootfs" login -p -f root From 0858070c053d0a0e96afd2f6524c4a162bda5483 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 17 Oct 2024 14:37:49 +0300 Subject: [PATCH 35/45] fix spread tests --- tests/spread/integration/erlang/task.yaml | 2 +- tests/spread/integration/login/task.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index 789403cff..d94a07f15 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -3,7 +3,7 @@ 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)" - mkdir "$rootfs"/bin + mkdir "$rootfs"/bin "$rootfs"/etc cp /bin/sh "$rootfs"/bin/ cp /etc/resolv.conf "$rootfs"/etc/ cp /etc/nsswitch.conf "$rootfs"/etc/ diff --git a/tests/spread/integration/login/task.yaml b/tests/spread/integration/login/task.yaml index 7971a910f..2905eb7b0 100644 --- a/tests/spread/integration/login/task.yaml +++ b/tests/spread/integration/login/task.yaml @@ -2,7 +2,7 @@ summary: Integration tests for Erlang execute: | rootfs="$(install-slices login_bins bash_bins base-files_base base-passwd_data)" - chroot "$rootfs" mkdir /dev + mkdir "$rootfs"/dev touch "$rootfs"/dev/log touch "$rootfs"/var/log/faillog touch "$rootfs"/var/log/lastlog From 017973979c1928a6244f4414a7c6b85233a66bb5 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 17 Oct 2024 15:46:30 +0300 Subject: [PATCH 36/45] fix other tests --- tests/spread/integration/erlang/task.yaml | 7 +++---- tests/spread/integration/login/task.yaml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index d94a07f15..4b8b02d16 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -3,13 +3,12 @@ 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)" - mkdir "$rootfs"/bin "$rootfs"/etc + mkdir -p "$rootfs"/bin "$rootfs"/etc "$rootfs"/dev cp /bin/sh "$rootfs"/bin/ cp /etc/resolv.conf "$rootfs"/etc/ cp /etc/nsswitch.conf "$rootfs"/etc/ - chroot "$rootfs" mkdir /dev - chroot "$rootfs" touch /dev/null - chroot "$rootfs" chmod 777 /dev/null + touch "$rootfs"/dev/null + chmod 777 "$rootfs"/dev/null # test epmd daemon chroot "$rootfs" /usr/bin/epmd -daemon # test erl eval diff --git a/tests/spread/integration/login/task.yaml b/tests/spread/integration/login/task.yaml index 2905eb7b0..c1c7b97a2 100644 --- a/tests/spread/integration/login/task.yaml +++ b/tests/spread/integration/login/task.yaml @@ -6,7 +6,7 @@ execute: | touch "$rootfs"/dev/log touch "$rootfs"/var/log/faillog touch "$rootfs"/var/log/lastlog - chroot "$rootfs" nologin | grep "not available" + chroot "$rootfs" nologin chroot "$rootfs" faillog chroot "$rootfs" lastlog chroot "$rootfs" newgrp root From 8aaaf61b8c25dffdb88349a455da9d1f3fac26d7 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 17 Oct 2024 16:35:13 +0300 Subject: [PATCH 37/45] fix more test errors --- tests/spread/integration/erlang/task.yaml | 2 +- tests/spread/integration/login/task.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index 4b8b02d16..b7d6150ca 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -1,7 +1,7 @@ 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)" + 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 coreutils_bins)" mkdir -p "$rootfs"/bin "$rootfs"/etc "$rootfs"/dev cp /bin/sh "$rootfs"/bin/ diff --git a/tests/spread/integration/login/task.yaml b/tests/spread/integration/login/task.yaml index c1c7b97a2..15364b375 100644 --- a/tests/spread/integration/login/task.yaml +++ b/tests/spread/integration/login/task.yaml @@ -1,12 +1,12 @@ summary: Integration tests for Erlang execute: | - rootfs="$(install-slices login_bins bash_bins base-files_base base-passwd_data)" + rootfs="$(install-slices login_bins bash_bins base-files_base base-passwd_data grep_bins)" mkdir "$rootfs"/dev touch "$rootfs"/dev/log touch "$rootfs"/var/log/faillog touch "$rootfs"/var/log/lastlog - chroot "$rootfs" nologin + chroot "$rootfs" nologin | grep "not available" chroot "$rootfs" faillog chroot "$rootfs" lastlog chroot "$rootfs" newgrp root From 3ea12a205af166bd86a187de7f8e40b194db076d Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 18 Oct 2024 10:32:50 +0300 Subject: [PATCH 38/45] tweak spread tests --- tests/spread/integration/erlang/task.yaml | 4 +++- tests/spread/integration/login/task.yaml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index b7d6150ca..b73499682 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -1,7 +1,7 @@ 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 coreutils_bins)" + 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 bash_bins coreutils_bins)" mkdir -p "$rootfs"/bin "$rootfs"/etc "$rootfs"/dev cp /bin/sh "$rootfs"/bin/ @@ -9,6 +9,8 @@ execute: | cp /etc/nsswitch.conf "$rootfs"/etc/ touch "$rootfs"/dev/null chmod 777 "$rootfs"/dev/null + chroot "$rootfs" echo "cookie" > ~/.erlang.cookie + chroot "$rootfs" chmod 400 ~/.erlang.cookie # test epmd daemon chroot "$rootfs" /usr/bin/epmd -daemon # test erl eval diff --git a/tests/spread/integration/login/task.yaml b/tests/spread/integration/login/task.yaml index 15364b375..b07eaa49a 100644 --- a/tests/spread/integration/login/task.yaml +++ b/tests/spread/integration/login/task.yaml @@ -3,6 +3,7 @@ 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 @@ -11,4 +12,4 @@ execute: | chroot "$rootfs" lastlog chroot "$rootfs" newgrp root chroot "$rootfs" sg root - chroot "$rootfs" login -p -f root + chroot "$rootfs" login -p -f sync From fd7b0646cb331f551e2f5f3f7ea0b8683bd93fe9 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 18 Oct 2024 11:00:18 +0300 Subject: [PATCH 39/45] add missing .erlang.cookie to the tests --- tests/spread/integration/erlang/task.yaml | 1 + tests/spread/integration/login/task.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index b73499682..67451057d 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -9,6 +9,7 @@ execute: | cp /etc/nsswitch.conf "$rootfs"/etc/ touch "$rootfs"/dev/null chmod 777 "$rootfs"/dev/null + chroot "$rootfs" touch ~/.erlang.cookie chroot "$rootfs" echo "cookie" > ~/.erlang.cookie chroot "$rootfs" chmod 400 ~/.erlang.cookie # test epmd daemon diff --git a/tests/spread/integration/login/task.yaml b/tests/spread/integration/login/task.yaml index b07eaa49a..b6801efbd 100644 --- a/tests/spread/integration/login/task.yaml +++ b/tests/spread/integration/login/task.yaml @@ -1,6 +1,7 @@ summary: Integration tests for Erlang execute: | + apt-get install -y grep 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 From 1b36c49c841b7e60c9200846253fb4bcdf1a2653 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 18 Oct 2024 15:54:41 +0300 Subject: [PATCH 40/45] remove tests of interactive commands --- tests/spread/integration/erlang/task.yaml | 3 +-- tests/spread/integration/login/task.yaml | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index 67451057d..06c0e5558 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -3,13 +3,12 @@ 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 bash_bins coreutils_bins)" - mkdir -p "$rootfs"/bin "$rootfs"/etc "$rootfs"/dev + 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 - chroot "$rootfs" touch ~/.erlang.cookie chroot "$rootfs" echo "cookie" > ~/.erlang.cookie chroot "$rootfs" chmod 400 ~/.erlang.cookie # test epmd daemon diff --git a/tests/spread/integration/login/task.yaml b/tests/spread/integration/login/task.yaml index b6801efbd..7acf4710f 100644 --- a/tests/spread/integration/login/task.yaml +++ b/tests/spread/integration/login/task.yaml @@ -1,7 +1,6 @@ summary: Integration tests for Erlang execute: | - apt-get install -y grep 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 @@ -13,4 +12,3 @@ execute: | chroot "$rootfs" lastlog chroot "$rootfs" newgrp root chroot "$rootfs" sg root - chroot "$rootfs" login -p -f sync From 77b9c7996933c723aaf99b3d8dca64b16a9c37df Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 18 Oct 2024 16:09:30 +0300 Subject: [PATCH 41/45] fix erlang test --- tests/spread/integration/erlang/task.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index 06c0e5558..3c419c6e0 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -9,8 +9,8 @@ execute: | cp /etc/nsswitch.conf "$rootfs"/etc/ touch "$rootfs"/dev/null chmod 777 "$rootfs"/dev/null - chroot "$rootfs" echo "cookie" > ~/.erlang.cookie - chroot "$rootfs" chmod 400 ~/.erlang.cookie + 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 From a8c7fc08b70d45e150b76be088d3b0609f835d5f Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 6 Nov 2024 12:40:49 +0200 Subject: [PATCH 42/45] remove tests that don't work --- tests/spread/integration/erlang/task.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index 3c419c6e0..58b206b53 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -15,9 +15,6 @@ execute: | 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 erl_call by connecting to an erl server - chroot "$rootfs" nohup erl -sname test -setcookie cookie & - chroot "$rootfs" /usr/bin/erl_call -sname test -a 'erlang node []' # test escript by executing a simple script chroot "$rootfs" echo '#!/usr/bin/escript' > test_script && echo 'main(_) -> io:format("escript OK~n").' >> test_script && chmod +x test_script && /usr/bin/escript test_script # test start_embedded to start the embedded environment From fcf9413305dbd445a23b1f51708df23bc8a5857e Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 6 Nov 2024 14:53:48 +0200 Subject: [PATCH 43/45] fix erlang test --- tests/spread/integration/erlang/task.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index 58b206b53..30d240a7a 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -1,7 +1,7 @@ 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 bash_bins coreutils_bins)" + 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/ From f4c1a2a82568e120caf4c4de592e660aa16d40e2 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Wed, 6 Nov 2024 15:17:51 +0200 Subject: [PATCH 44/45] split chroot command in test --- tests/spread/integration/erlang/task.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index 30d240a7a..517914baa 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -16,7 +16,11 @@ execute: | # 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 - chroot "$rootfs" echo '#!/usr/bin/escript' > test_script && echo 'main(_) -> io:format("escript OK~n").' >> test_script && chmod +x test_script && /usr/bin/escript test_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 From 894b62642581fa7b6a6f7b370b5418ba34087beb Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 7 Nov 2024 08:27:47 +0200 Subject: [PATCH 45/45] fix runcgi.sh test in erlang --- tests/spread/integration/erlang/task.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spread/integration/erlang/task.yaml b/tests/spread/integration/erlang/task.yaml index 517914baa..82bffdc0f 100644 --- a/tests/spread/integration/erlang/task.yaml +++ b/tests/spread/integration/erlang/task.yaml @@ -24,4 +24,4 @@ execute: | # 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 + chroot "$rootfs" /usr/lib/erlang/lib/inets-8.3.1.2/priv/bin/runcgi.sh /bin