Files
Georg Lauterbach 4f61137c1d chore: repo layout restructuring no. 2 (#4873)
* refactor: move image contents into rootfs/

Put everything that ships in the image into rootfs/, laid out like the
container's filesystem, so that the repository path of a file is its
image path with a `rootfs/` prefix.

Moves (git mv, history is kept)
- etc/              -> rootfs/etc/
- scripts/bin/      -> rootfs/usr/local/bin/
- scripts/lib/      -> rootfs/usr/local/lib/dms/
- scripts/build.sh  -> build.sh (build time only, next to setup.sh)
- scripts/ no longer exists.

The paths inside the image are unchanged, as are the file modes tracked
by Git, so there is no changelog entry. The Dockerfile copies
`rootfs/etc/` to `/etc/` and `rootfs/usr/local/` to `/usr/local/`. The
two script COPY instructions became one, it still applies `--chmod=755`
to everything below `/usr/local/`.

All references are updated: the Dockerfile, .dockerignore,
.gitattributes, the CI path filters (`rootfs/**` and `build.sh`),
ShellCheck source directives, the tests that source repository files,
code comments, links to the repository in the docs, and AGENTS.md.

* ci: update linter

Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>

* breaking: remove SHELL and HEALTHCHECK from the Dockerfile and clean it up

Neither `SHELL` nor `HEALTHCHECK` is part of the OCI image specification.
Builders like Podman and Buildah warn about them and ignore them unless
`--format docker` is used. Without them the image builds without warnings
with every OCI compliant builder.

Breaking: the image no longer ships a `HEALTHCHECK`. Users that rely on
the health status (e.g. `depends_on: condition: service_healthy`) must
configure `dms-healthcheck` in their runtime. `compose.yaml` now does so.
The image filesystem is unchanged.

Without `SHELL`, `RUN` uses `/bin/sh`:
- every heredoc starts with `set -e`
- `echo -e` became `printf` (the written bytes are identical)
- the pipe in `echo | crontab -` cannot fail, DL4006 is ignored for it

Cleanup
- Describe the three stages in the header and use uniform banners with
  titles that match their content.
- Merge the small `RUN` instructions of stage-main into three: ClamAV,
  package configuration and logs.
- Move the removal of locales, man pages and docs, and `update-locale`
  into `_post_installation_steps` of build.sh, next to the APT cleanup.
- Replace the stale permalink in the comment of the ENV defaults.

* chore: simplify .gitattributes

Replace the 150 lines of per-extension rules with `* text=auto eol=lf`
plus the entries for binaries, `-diff` and `export-ignore`.

All tracked text files are already LF in the index and the working tree,
`git add --renormalize .` is a no-op, and Git detects the six binaries
itself. The change closes a gap: `rootfs/etc/`, `test/config/`, the docs
and the workflows had no `eol=lf`, so a checkout on Windows could ship
CRLF configs into the image or into the test containers.

Also drops stale comments (`target/shared/`, `test/linting/`) and
entries that had no effect (e.g. `Makefile`).

* tests: move bats libraries into test/helper/, retire the legacy helper

- Move the submodules bats-support and bats-assert from
  test/test_helper/ to test/helper/ and rename them in .gitmodules.
  test/test_helper/ no longer exists.
- Update the load paths in test/helper/common.bash and the lint excludes
  in the Makefile.
- Delete the legacy test/test_helper/common.bash and its test
  serial/test_helper.bats. The test only covered the legacy functions
  and used a fixture that does not exist.
- Port serial/trusted_networks_subnet.bats, the last user of the legacy
  helper, to the test/helper/ API: unique `dms-test_` container and
  network names, `_init_with_defaults` and `_common_container_*`, and the
  `_`-prefixed helpers. The permanently skipped third test targeted a
  container that no longer exists and is dropped.
- Point the comment in change-detection.sh to the existing
  test/helper/change-detection.bash.

Existing checkouts keep working: `git mv` moved the worktrees, the
submodule names and gitdirs follow the new paths.

* tests: rename test/files to test/fixtures and group transactions by protocol

`test/files/` mixed unrelated things under unclear names. The new layout
says what each file is and how a test consumes it:

- `emails/`                      mail bodies for `_send_email --data`
- `transactions/{smtp,imap,pop3,policy}/`  raw protocol transcripts for
                                 `_send_raw_transaction*` (replaces `nc/`,
                                 `auth/` and `emails/nc_raw/`)
- `tls/`                         certificates (replaces `ssl/`)

The Postgrey transcripts live in `transactions/policy/` because they speak
Postfix's policy delegation protocol, not SMTP.

`TEST_FILES_*` become `TEST_FIXTURES_*`; the in-container mount point
`/tmp/docker-mailserver-test` is unchanged.

---------

Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-11-26 16:16:38 +01:00

30 lines
4.0 KiB
JSON

{
"le": {
"Account": {
"Email": "acme@example.test",
"Registration": {
"body": {
"status": "valid",
"contact": [
"mailto:acme@example.test"
]
},
"uri": "https://acme-v02.api.letsencrypt.org/acme/acct/0123456789"
},
"PrivateKey": "x",
"KeyType": "RSA2048"
},
"Certificates": [
{
"domain": {
"main": "Smallstep Leaf",
"sans": ["example.test"]
},
"certificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNpakNDQWpHZ0F3SUJBZ0lSQVBYRU5ZazBPYUNlci81d251RXh0TnN3Q2dZSUtvWkl6ajBFQXdJd0hERWEKTUJnR0ExVUVBeE1SVTIxaGJHeHpkR1Z3SUZKdmIzUWdRMEV3SGhjTk1qRXdNVEF4TURBd01EQXdXaGNOTXpFdwpNVEF4TURBd01EQXdXakFaTVJjd0ZRWURWUVFERXc1VGJXRnNiSE4wWlhBZ1RHVmhaakNDQVNJd0RRWUpLb1pJCmh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTEdScWRUSjZHUjFoZVByQlc2NFIwZnVaTHhCaUlLdFRuVUcKN1VLbDhXaFF1QlVydmQ5RVpwWFhmdDl1Wi9RSVprY3hvZWh6R1l1eXNLSVNtV2xRNmpEZmdsS05nYi9CRkM5WgpCRWZsbGRjTFBxR2NST1ZzTno4aFQzdTBBTHhBQk5BU295enY0YitNbDR2dm9GQ3p0YVdiNkt6a0Fkc1dsam1OCjlvOEdWaWw3MXZsSThGdVBPL3krNkVQcFFrV3ZEUHRNQ2VjaXZCQUpyelhzS0w2WmxIVEJRQ29YQ2g4anN2NnYKZCtKa3pSN0lBbkorYzU0a1JreHVIOVhEeWdWWW1aaElKdEZOZU1jNXYyaVdCaVhjTFBkTzRPSUlCc2taRksvOQozNldpenNyUGZxMlhQSzg3Ymh3Y1FSQk5pdStRZ3BxZys5anMwTVRJN3JCUXRPZjYzZnNDQXdFQUFhT0JpekNCCmlEQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0hRWURWUjBsQkJZd0ZBWUlLd1lCQlFVSEF3RUdDQ3NHQVFVRkJ3TUMKTUIwR0Ex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