Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(24.04): add rabbitmq slices #258

Open
wants to merge 52 commits into
base: ubuntu-24.04
Choose a base branch
from

Conversation

linostar
Copy link

@linostar linostar commented Jun 13, 2024

Proposed changes

Add rabbitmq-server and librabbitmq4 slices to 24.04.

Note that erlang* and logrotate packages are not available for i386 arch, so they have been commented out.

Related issues/PRs

N/A

Forward porting

N/A

Testing

chisel cut --release ./ --root rootfs rabbitmq-server_bins                                                                                                                                        

2024/06/13 11:27:35 Processing ./ release...
2024/06/13 11:27:36 Selecting slices...
2024/06/13 11:27:36 Fetching ubuntu 24.04 noble suite details...
2024/06/13 11:27:38 Release date: Thu, 25 Apr 2024 15:10:33 UTC
2024/06/13 11:27:38 Fetching index for ubuntu 24.04 noble main component...
2024/06/13 11:27:38 Fetching index for ubuntu 24.04 noble universe component...
2024/06/13 11:27:38 Fetching ubuntu 24.04 noble-security suite details...
2024/06/13 11:27:39 Release date: Wed, 12 Jun 2024 13:31:47 UTC
2024/06/13 11:27:39 Fetching index for ubuntu 24.04 noble-security main component...
2024/06/13 11:27:39 Fetching index for ubuntu 24.04 noble-security universe component...
2024/06/13 11:27:39 Fetching ubuntu 24.04 noble-updates suite details...
2024/06/13 11:27:39 Release date: Thu, 13 Jun 2024  7:51:49 UTC
2024/06/13 11:27:39 Fetching index for ubuntu 24.04 noble-updates main component...
2024/06/13 11:27:39 Fetching index for ubuntu 24.04 noble-updates universe component...
2024/06/13 11:27:39 Fetching pool/main/a/adduser/adduser_3.137ubuntu1_all.deb...
2024/06/13 11:27:39 Fetching pool/main/a/audit/libaudit-common_3.1.2-2.1build1_all.deb...
2024/06/13 11:27:39 Fetching pool/main/g/glibc/libc6_2.39-0ubuntu8.2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libc/libcap-ng/libcap-ng0_0.8.4-2build2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/a/audit/libaudit1_3.1.2-2.1build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libx/libxcrypt/libcrypt1_4.4.36-4build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/d/debconf/debconf_1.5.86ubuntu1_all.deb...
2024/06/13 11:27:39 Fetching pool/main/p/pam/libpam-modules-bin_1.5.3-5ubuntu5.1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/p/pam/libpam0g_1.5.3-5ubuntu5.1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/p/pcre2/libpcre2-8-0_10.42-4ubuntu2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libs/libselinux/libselinux1_3.5-2ubuntu2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libc/libcap2/libcap2_2.66-5ubuntu2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libg/libgpg-error/libgpg-error0_1.47-3build2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libg/libgcrypt20/libgcrypt20_1.10.3-2build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/l/lz4/liblz4-1_1.9.4-1build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/x/xz-utils/liblzma5_5.6.1+really5.4.5-1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libz/libzstd/libzstd1_1.5.5+dfsg2-2build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/s/systemd/libsystemd0_255.4-1ubuntu8.1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/p/pam/libpam-modules_1.5.3-5ubuntu5.1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/b/bzip2/libbz2-1.0_1.0.8-5.1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libs/libsemanage/libsemanage-common_3.5-1build5_all.deb...
2024/06/13 11:27:39 Fetching pool/main/libs/libsepol/libsepol2_3.5-2build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libs/libsemanage/libsemanage2_3.5-1build5_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/s/shadow/passwd_4.13+dfsg1-4ubuntu3_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/c/cron/cron-daemon-common_3.0pl1-184ubuntu2_all.deb...
2024/06/13 11:27:39 Fetching pool/main/c/cron/cron_3.0pl1-184ubuntu2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/i/init-system-helpers/init-system-helpers_1.66ubuntu1_all.deb...
2024/06/13 11:27:39 Fetching pool/main/p/pam/libpam-runtime_1.5.3-5ubuntu5.1_all.deb...
2024/06/13 11:27:39 Fetching pool/main/s/sensible-utils/sensible-utils_0.0.22_all.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-base_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/g/gcc-14/libgcc-s1_14-20240412-0ubuntu1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/g/gcc-14/libstdc++6_14-20240412-0ubuntu1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/n/ncurses/libtinfo6_6.4+20240113-1ubuntu2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/n/ncurses/libncursesw6_6.4+20240113-1ubuntu2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/p/procps/libproc2-0_4.0.4-4ubuntu3_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/p/procps/procps_4.0.4-4ubuntu3_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/z/zlib/zlib1g_1.3.dfsg-3.1ubuntu2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-asn1_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/o/openssl/libssl3t64_3.0.13-0ubuntu3.1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-crypto_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-public-key_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-mnesia_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-runtime-tools_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-ssl_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-eldap_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-ftp_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-inets_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-tftp_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-snmp_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-os-mon_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-parsetools_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-syntax-tools_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-tools_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/erlang/erlang-xmerl_25.3.2.8+dfsg-1ubuntu4_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/a/acl/libacl1_2.3.2-1build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/d/db5.3/libdb5.3t64_5.3.28+dfsg2-7_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/e/expat/libexpat1_2.6.1-2build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/libf/libffi/libffi8_3.4.6-1build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/p/popt/libpopt0_1.19+dfsg-1build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/p/python3.12/libpython3.12-minimal_3.12.3-1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/m/media-types/media-types_10.1.0_all.deb...
2024/06/13 11:27:39 Fetching pool/main/n/netbase/netbase_6.4_all.deb...
2024/06/13 11:27:39 Fetching pool/main/p/python3.12/libpython3.12-stdlib_3.12.3-1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/r/readline/readline-common_8.2-4build1_all.deb...
2024/06/13 11:27:39 Fetching pool/main/r/readline/libreadline8t64_8.2-4build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/s/sqlite3/libsqlite3-0_3.45.1-1ubuntu2_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/t/tzdata/tzdata_2024a-3ubuntu1.1_all.deb...
2024/06/13 11:27:39 Fetching pool/main/t/tcp-wrappers/libwrap0_7.6.q-33_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/l/logrotate/logrotate_3.21.0-2build1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/o/openssl/openssl_3.0.13-0ubuntu3.1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/p/python3.12/python3.12-minimal_3.12.3-1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/p/python3.12/python3.12_3.12.3-1_amd64.deb...
2024/06/13 11:27:39 Fetching pool/main/r/rabbitmq-server/rabbitmq-server_3.12.1-1ubuntu1_all.deb...
2024/06/13 11:27:39 Fetching pool/main/s/socat/socat_1.8.0.0-4build3_amd64.deb...
2024/06/13 11:27:39 Extracting files from package "adduser"...
2024/06/13 11:27:39 Extracting files from package "libaudit-common"...
2024/06/13 11:27:39 Extracting files from package "libc6"...
2024/06/13 11:27:39 Extracting files from package "libcap-ng0"...
2024/06/13 11:27:39 Extracting files from package "libaudit1"...
2024/06/13 11:27:39 Extracting files from package "libcrypt1"...
2024/06/13 11:27:39 Extracting files from package "debconf"...
2024/06/13 11:27:39 Extracting files from package "libpam-modules-bin"...
2024/06/13 11:27:39 Extracting files from package "libpam0g"...
2024/06/13 11:27:39 Extracting files from package "libpcre2-8-0"...
2024/06/13 11:27:39 Extracting files from package "libselinux1"...
2024/06/13 11:27:39 Extracting files from package "libcap2"...
2024/06/13 11:27:39 Extracting files from package "libgpg-error0"...
2024/06/13 11:27:39 Extracting files from package "libgcrypt20"...
2024/06/13 11:27:39 Extracting files from package "liblz4-1"...
2024/06/13 11:27:39 Extracting files from package "liblzma5"...
2024/06/13 11:27:39 Extracting files from package "libzstd1"...
2024/06/13 11:27:39 Extracting files from package "libsystemd0"...
2024/06/13 11:27:39 Extracting files from package "libpam-modules"...
2024/06/13 11:27:39 Extracting files from package "libbz2-1.0"...
2024/06/13 11:27:39 Extracting files from package "libsemanage-common"...
2024/06/13 11:27:39 Extracting files from package "libsepol2"...
2024/06/13 11:27:39 Extracting files from package "libsemanage2"...
2024/06/13 11:27:39 Extracting files from package "passwd"...
2024/06/13 11:27:39 Extracting files from package "cron-daemon-common"...
2024/06/13 11:27:39 Extracting files from package "cron"...
2024/06/13 11:27:39 Extracting files from package "init-system-helpers"...
2024/06/13 11:27:39 Extracting files from package "libpam-runtime"...
2024/06/13 11:27:39 Extracting files from package "sensible-utils"...
2024/06/13 11:27:39 Extracting files from package "erlang-base"...
2024/06/13 11:27:39 Extracting files from package "libgcc-s1"...
2024/06/13 11:27:39 Extracting files from package "libstdc++6"...
2024/06/13 11:27:39 Extracting files from package "libtinfo6"...
2024/06/13 11:27:39 Extracting files from package "libncursesw6"...
2024/06/13 11:27:39 Extracting files from package "libproc2-0"...
2024/06/13 11:27:39 Extracting files from package "procps"...
2024/06/13 11:27:39 Extracting files from package "zlib1g"...
2024/06/13 11:27:39 Extracting files from package "erlang-asn1"...
2024/06/13 11:27:39 Extracting files from package "libssl3t64"...
2024/06/13 11:27:39 Extracting files from package "erlang-crypto"...
2024/06/13 11:27:39 Extracting files from package "erlang-public-key"...
2024/06/13 11:27:39 Extracting files from package "erlang-mnesia"...
2024/06/13 11:27:40 Extracting files from package "erlang-runtime-tools"...
2024/06/13 11:27:40 Extracting files from package "erlang-ssl"...
2024/06/13 11:27:40 Extracting files from package "erlang-eldap"...
2024/06/13 11:27:40 Extracting files from package "erlang-ftp"...
2024/06/13 11:27:40 Extracting files from package "erlang-inets"...
2024/06/13 11:27:40 Extracting files from package "erlang-tftp"...
2024/06/13 11:27:40 Extracting files from package "erlang-snmp"...
2024/06/13 11:27:40 Extracting files from package "erlang-os-mon"...
2024/06/13 11:27:40 Extracting files from package "erlang-parsetools"...
2024/06/13 11:27:40 Extracting files from package "erlang-syntax-tools"...
2024/06/13 11:27:40 Extracting files from package "erlang-tools"...
2024/06/13 11:27:40 Extracting files from package "erlang-xmerl"...
2024/06/13 11:27:40 Extracting files from package "libacl1"...
2024/06/13 11:27:40 Extracting files from package "libdb5.3t64"...
2024/06/13 11:27:40 Extracting files from package "libexpat1"...
2024/06/13 11:27:40 Extracting files from package "libffi8"...
2024/06/13 11:27:40 Extracting files from package "libpopt0"...
2024/06/13 11:27:40 Extracting files from package "libpython3.12-minimal"...
2024/06/13 11:27:40 Extracting files from package "media-types"...
2024/06/13 11:27:40 Extracting files from package "netbase"...
2024/06/13 11:27:40 Extracting files from package "libpython3.12-stdlib"...
2024/06/13 11:27:40 Extracting files from package "readline-common"...
2024/06/13 11:27:40 Extracting files from package "libreadline8t64"...
2024/06/13 11:27:40 Extracting files from package "libsqlite3-0"...
2024/06/13 11:27:40 Extracting files from package "tzdata"...
2024/06/13 11:27:40 Extracting files from package "libwrap0"...
2024/06/13 11:27:40 Extracting files from package "logrotate"...
2024/06/13 11:27:40 Extracting files from package "openssl"...
2024/06/13 11:27:40 Extracting files from package "python3.12-minimal"...
2024/06/13 11:27:40 Extracting files from package "python3.12"...
2024/06/13 11:27:40 Extracting files from package "rabbitmq-server"...
2024/06/13 11:27:40 Extracting files from package "socat"...

Checklist

Additional Context

  • i386 build is failing because erlang-base and other erlang related packages don't exist for that arch
  • python3.12 slice was used instead of python
  • systemd slices were not added because they are not necessary

Copy link

github-actions bot commented Jun 13, 2024

Diff of dependencies:

slices/erlang-base.yaml
@@ -1,8 +1,6 @@
-adduser
 libc6
 libgcc-s1
 libstdc++6
 libsystemd0
 libtinfo6
-procps
 zlib1g
slices/libpam-runtime.yaml
@@ -1,4 +0,0 @@
-cdebconf
-debconf
-debconf-2.0
-libpam-modules
slices/librabbitmq4.yaml
@@ -1,2 +1,2 @@
 libc6
-libssl3
+libssl3t64
slices/rabbitmq-server.yaml
@@ -1,19 +1,13 @@
-adduser
-erlang-base
-erlang-base-hipe
-erlang-crypto
-erlang-eldap
-erlang-inets
-erlang-mnesia
-erlang-os-mon
-erlang-parsetools
-erlang-public-key
-erlang-runtime-tools
-erlang-ssl
-erlang-syntax-tools
-erlang-tools
-erlang-xmerl
-logrotate
-openssl
-python3
-socat
+base-files
+base-passwd
+bash
+coreutils
+grep
+libc-bin
+libtinfo6
+login
+netbase
+passwd
+python3.12
+sed
+util-linux

@linostar linostar force-pushed the ROCKS-1219/feat-24.04-rabbitmq branch 6 times, most recently from 5488646 to 92121b6 Compare June 13, 2024 09:50
@linostar linostar changed the title feat(24.04): add rabbitmq-server slice feat(24.04): add rabbitmq slices Jun 13, 2024
@linostar linostar marked this pull request as ready for review June 13, 2024 09:52
@linostar linostar requested a review from cjdcordeiro June 13, 2024 09:54
@linostar linostar force-pushed the ROCKS-1219/feat-24.04-rabbitmq branch 5 times, most recently from 13360d1 to e00a8bd Compare July 1, 2024 13:04
@linostar
Copy link
Author

linostar commented Jul 1, 2024

Manual testing of the slice in a rock:

rockcraft.yaml

name: rabbitmq
base: [email protected]
version: '0.1'
summary: RabbitMQ rock
description: |
    This is a RabbitMQ Server rock.
platforms:
    amd64:

services:
    rabbitmq-service:
        override: replace
        startup: enabled
        command: /usr/sbin/rabbitmq-server

parts:
    build-context:
        plugin: nil
        source: chisel-releases/
        source-type: local
        override-build: |
            set -x
            ERL_COOKIE=${CRAFT_PART_INSTALL}/var/lib/rabbitmq/.erlang.cookie
            chisel cut --release ./ --root ${CRAFT_PART_INSTALL} rabbitmq-server_bins
            groupadd -r -g 90 -R ${CRAFT_PART_INSTALL} rabbitmq
            useradd -d /var/lib/rabbitmq -M -u 90 -g 90 -r -s /usr/sbin/nologin -R ${CRAFT_PART_INSTALL} rabbitmq
            chown 90:90 ${CRAFT_PART_INSTALL}/etc/rabbitmq
            chown -R 90:90 ${CRAFT_PART_INSTALL}/var/lib/rabbitmq
            chown -R 90:90 ${CRAFT_PART_INSTALL}/var/log/rabbitmq
            openssl rand -base64 -out ${ERL_COOKIE} 42
            chown 90:90 ${ERL_COOKIE}
            chmod 400 ${ERL_COOKIE}

Running the rock:

$ docker run --rm rabbitmq --verbose
2024-07-01T12:27:18.585Z [pebble] Started daemon.
2024-07-01T12:27:18.595Z [pebble] POST /v1/services 5.384266ms 202
2024-07-01T12:27:18.599Z [pebble] Service "rabbitmq-service" starting: /usr/sbin/rabbitmq-server
2024-07-01T12:27:19.611Z [pebble] GET /v1/changes/1/wait 1.01580796s 200
2024-07-01T12:27:19.612Z [pebble] Started default services with change 1.
2024-07-01T12:27:20.687Z [rabbitmq-service] 2024-07-01 12:27:20.683100+00:00 [notice] <0.44.0> Application syslog exited with reason: stopped
2024-07-01T12:27:20.687Z [rabbitmq-service] 2024-07-01 12:27:20.687486+00:00 [notice] <0.230.0> Logging: switching to configured handler(s); following messages may not be visible in this log output
2024-07-01T12:27:20.998Z [rabbitmq-service] 
2024-07-01T12:27:20.998Z [rabbitmq-service]   ##  ##      RabbitMQ 3.12.1
2024-07-01T12:27:20.998Z [rabbitmq-service]   ##  ##
2024-07-01T12:27:20.998Z [rabbitmq-service]   ##########  Copyright (c) 2007-2023 VMware, Inc. or its affiliates.
2024-07-01T12:27:20.998Z [rabbitmq-service]   ######  ##
2024-07-01T12:27:20.998Z [rabbitmq-service]   ##########  Licensed under the MPL 2.0. Website: https://rabbitmq.com
2024-07-01T12:27:20.998Z [rabbitmq-service] 
2024-07-01T12:27:20.998Z [rabbitmq-service]   Erlang:      25.3.2.8 [jit]
2024-07-01T12:27:20.998Z [rabbitmq-service]   TLS Library: OpenSSL - OpenSSL 3.0.13 30 Jan 2024
2024-07-01T12:27:20.998Z [rabbitmq-service]   Release series support status: supported
2024-07-01T12:27:20.998Z [rabbitmq-service] 
2024-07-01T12:27:20.998Z [rabbitmq-service]   Doc guides:  https://rabbitmq.com/documentation.html
2024-07-01T12:27:20.998Z [rabbitmq-service]   Support:     https://rabbitmq.com/contact.html
2024-07-01T12:27:20.998Z [rabbitmq-service]   Tutorials:   https://rabbitmq.com/getstarted.html
2024-07-01T12:27:20.998Z [rabbitmq-service]   Monitoring:  https://rabbitmq.com/monitoring.html
2024-07-01T12:27:20.998Z [rabbitmq-service] 
2024-07-01T12:27:20.998Z [rabbitmq-service]   Logs: /var/log/rabbitmq/[email protected]
2024-07-01T12:27:20.998Z [rabbitmq-service]         <stdout>
2024-07-01T12:27:20.998Z [rabbitmq-service] 
2024-07-01T12:27:20.998Z [rabbitmq-service]   Config file(s): (none)
2024-07-01T12:27:20.998Z [rabbitmq-service] 
2024-07-01T12:27:20.998Z [rabbitmq-service]   Starting broker... completed with 0 plugins.

@linostar linostar requested a review from rebornplusplus July 1, 2024 13:11
Copy link
Collaborator

@cjdcordeiro cjdcordeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this.

can you please explain the rationale for this diff:

@@ -1,19 +1,5 @@
 adduser
-erlang-base
-erlang-base-hipe
-erlang-crypto
-erlang-eldap
-erlang-inets
-erlang-mnesia
-erlang-os-mon
-erlang-parsetools
-erlang-public-key
-erlang-runtime-tools
-erlang-ssl
-erlang-syntax-tools
-erlang-tools
-erlang-xmerl
-logrotate
+base-files
 openssl
-python3
+python3.12
 socat

Also, thanks for the test rock. Can you demonstrate a simple message exchange?

Copy link
Member

@rebornplusplus rebornplusplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must admit I do not know much about most of the packages. This is a general review. I noticed a few issues which are present in a lot of places:

  • Let's please omit version numbers which might change once the package is updated. Let's utilise the wildcards for that.
  • I noticed that erlang-base_bins is a dep in a lot of places. I am wondering whether it should have been erlang-base_libs instead. I don't know much about it of course. Let me know if I am wrong!
  • While including an entire directory with everything inside using ** at the end, let's please be careful. If careful patterns can be crafted, let's do so. For example, if we are looking for all the .beam files, let's add that to the pattern as well e.g. <path>/**.beam.
  • Inclusion of slices (mostly bins) as deps because the maintainer scripts use them is nice, but unnecessary if we are not replicating the scripts. Except for reasonable scenarios, let's please not include those as deps.

Again, please note that I don't know much about these packages so some of my comments may be silly or just an ask for further clarity.

All these said, amazing job on slicing this huge list of weird packages. Bravo!

slices/adduser.yaml Outdated Show resolved Hide resolved
slices/cron.yaml Outdated Show resolved Hide resolved
slices/cron.yaml Outdated Show resolved Hide resolved
slices/debconf.yaml Outdated Show resolved Hide resolved
slices/erlang-asn1.yaml Outdated Show resolved Hide resolved
slices/rabbitmq-server.yaml Outdated Show resolved Hide resolved
slices/rabbitmq-server.yaml Outdated Show resolved Hide resolved
slices/rabbitmq-server.yaml Outdated Show resolved Hide resolved
slices/rabbitmq-server.yaml Outdated Show resolved Hide resolved
slices/socat.yaml Outdated Show resolved Hide resolved
Copy link
Member

@rebornplusplus rebornplusplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more!

slices/rabbitmq-server.yaml Outdated Show resolved Hide resolved
@linostar
Copy link
Author

linostar commented Jul 9, 2024

thanks for this.

can you please explain the rationale for this diff:

@@ -1,19 +1,5 @@
 adduser
-erlang-base
-erlang-base-hipe
-erlang-crypto
-erlang-eldap
-erlang-inets
-erlang-mnesia
-erlang-os-mon
-erlang-parsetools
-erlang-public-key
-erlang-runtime-tools
-erlang-ssl
-erlang-syntax-tools
-erlang-tools
-erlang-xmerl
-logrotate
+base-files
 openssl
-python3
+python3.12
 socat

Also, thanks for the test rock. Can you demonstrate a simple message exchange?

erlang* and logrotate packages are not available for i386 arch, so they have been commented out.

@linostar linostar force-pushed the ROCKS-1219/feat-24.04-rabbitmq branch 3 times, most recently from 1060b4e to c81c4ac Compare July 10, 2024 08:20
@linostar
Copy link
Author

linostar commented Jul 15, 2024

Rafid's review:

  • move everything not needed anymore in rabbitmq-server slice to another PR
  • move the bins dependencies from libs to bins slice
  • test whether socat is used by rabbitmq-server
  • move base-files slices to bins

@cjdcordeiro
Copy link
Collaborator

cjdcordeiro commented Jul 19, 2024

erlang* and logrotate packages are not available for i386 arch, so they have been commented out.

and the additions?

Copy link
Collaborator

@cjdcordeiro cjdcordeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something's off with the shared libraries cause I don't seem to be able to run any binary inside this chiselled rootfs.

Also, and cause of that, this is an ideal candidate to have the spread tests included

@linostar linostar force-pushed the ROCKS-1219/feat-24.04-rabbitmq branch from 080e585 to d8421b0 Compare July 26, 2024 07:58
@linostar linostar force-pushed the ROCKS-1219/feat-24.04-rabbitmq branch from 2c32139 to 7f19702 Compare October 16, 2024 08:42
@linostar
Copy link
Author

@cjdcordeiro @rebornplusplus This has been rebased with the lastest upstream changes so it's ready for review.

Copy link
Collaborator

@cjdcordeiro cjdcordeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

In general there are some comments that need addressing, as well as missing tests.

P.S. since it's a big PR, please avoid force-pushing so we can easily identify the changes between reviews

/etc/apt/apt.conf.d/70debconf:
/etc/debconf.conf:

modules:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this slice has a mix of actual modules, with helper scripts (e.g. /usr/share/debconf/confmodule), obsolete scripts (e.g. /usr/share/debconf/confmodule.sh), configurations (e.g. /usr/share/debconf/frontend), etc.

For the sake of getting this PR in asap:

  • do we actually need debconf anywhere? I don't see it as a dependency for anything else at quick glance. If we don't, let's leave it out and address it in a separate PR
  • if we do, do we need these modules? all of them? (same for binaries)
  • ultimately, these modules seem to be a mixed pot of things. So can we split it further?

Finally, if this SDF really needs to go in, it also needs tests

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debconf slice isn't needed anymore after adding the mutate script in libpam-runtime, so I'll remove it.

Comment on lines +17 to +27
/usr/bin/epmd:
/usr/bin/erl:
/usr/bin/erl_call:
/usr/bin/erlc:
/usr/bin/escript:
/usr/bin/run_erl:
/usr/bin/start_embedded:
/usr/bin/to_erl:
/usr/lib/erlang/bin/**:
/usr/lib/erlang/erts-*/bin/**:
/usr/lib/erlang/lib/erl_interface-*/bin/erl_call:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing tests

slices/erlang-eldap.yaml Show resolved Hide resolved
slices/erlang-crypto.yaml Show resolved Hide resolved
slices/erlang-asn1.yaml Show resolved Hide resolved
- rabbitmq-server_libs
- sed_bins
- util-linux_bins
contents:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need all of these? and again, some sound like scripts and not binaries

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, most of those are bash scripts or just hardlinkes, but yeah they are needed. I tried for instance removing the rabbitmq-plugins script to create a smaller image out of that slice, but that broke rabbitmq-server / rabbitmqctl.

slices/rabbitmq-server.yaml Outdated Show resolved Hide resolved
/usr/sbin/wipefs:
/usr/sbin/zramctl:

generated:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why generated?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ported from #330. That PR is almost ready, so even if it got changed afterwards it shouldn't affect this PR much.

slices/util-linux.yaml Show resolved Hide resolved
slices/util-linux.yaml Show resolved Hide resolved
@cjdcordeiro cjdcordeiro added the Priority Look at me first label Nov 5, 2024
@linostar linostar requested a review from zhijie-yang November 6, 2024 10:41
@linostar linostar force-pushed the ROCKS-1219/feat-24.04-rabbitmq branch from 889f864 to abc8b60 Compare November 6, 2024 13:54
@linostar linostar force-pushed the ROCKS-1219/feat-24.04-rabbitmq branch from abc8b60 to f4c1a2a Compare November 6, 2024 14:06
@linostar
Copy link
Author

linostar commented Nov 8, 2024

Erlang slices were moved to another separate PR #384.

@cjdcordeiro cjdcordeiro added the Blocked Waiting for something external label Nov 18, 2024
@linostar linostar mentioned this pull request Nov 21, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Waiting for something external Priority Look at me first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants