From 55b4071353abad4fa7de488c7767ea23eb064e16 Mon Sep 17 00:00:00 2001 From: Pat Downey Date: Thu, 14 Nov 2024 17:48:00 +0000 Subject: [PATCH] exim: add subpackages, for lookups, scripts and utils. (#30647) This PR adds sub-packages that are present in the alpine package (https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/exim/APKBUILD) that weren't in the Wolfi package. Specifically it adds sub-packages for lookups (postgres, mysql and others) as well as packaging the `exim-utils` and `exim-scripts` too. Additionally, as also present in the alpine package, it adds a pre-install script to configure the `exim` user upon package installation. Fixes: * https://github.com/wolfi-dev/os/issues/29568 --- exim.yaml | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 78 insertions(+), 3 deletions(-) diff --git a/exim.yaml b/exim.yaml index 78727bd5787..bd85a42ad63 100644 --- a/exim.yaml +++ b/exim.yaml @@ -1,7 +1,7 @@ package: name: exim version: "4.98" - epoch: 2 + epoch: 3 description: Message Transfer Agent copyright: - license: GPL-2.0-or-later @@ -9,6 +9,13 @@ package: disabled: - setuidgid +data: + - name: exim-lookups-with-deps + items: + mysql: "mariadb-connector-c" + sqlite: "sqlite-libs" + pgsql: "libpq" + environment: contents: packages: @@ -35,7 +42,7 @@ environment: accounts: users: - username: exim - uid: 1001 + uid: 65332 pipeline: - uses: fetch @@ -74,9 +81,78 @@ pipeline: - uses: strip subpackages: + - range: exim-lookups-with-deps + name: exim-${{range.key}} + description: "EXIM extension: ${{range.key}}" + pipeline: + - runs: | + install -D -m 755 ./build-Linux-${{build.arch}}/lookups/${{range.key}}.so ${{targets.subpkgdir}}/usr/lib/${{package.name}}/${{range.key}}.so + - uses: strip + dependencies: + runtime: + - exim=${{package.full-version}} + - ${{range.value}} + + - name: exim-dnsdb + description: "EXIM extension: dnsdb" + pipeline: + - runs: | + install -D -m 755 ./build-Linux-${{build.arch}}/lookups/dnsdb.so ${{targets.subpkgdir}}/usr/lib/${{package.name}}/dnsdb.so + - uses: strip + dependencies: + runtime: + - exim=${{package.full-version}} + + - name: exim-dbmdb + description: "EXIM extension: dbmdb" + pipeline: + - runs: | + install -D -m 755 ./build-Linux-${{build.arch}}/lookups/dbmdb.so ${{targets.subpkgdir}}/usr/lib/${{package.name}}/dbmdb.so + - uses: strip + dependencies: + runtime: + - exim=${{package.full-version}} + + - name: exim-cdb + description: "EXIM extension: cdb" + pipeline: + - runs: | + install -D -m 755 ./build-Linux-${{build.arch}}/lookups/cdb.so ${{targets.subpkgdir}}/usr/lib/${{package.name}}/cdb.so + + - name: exim-scripts + description: "EXIM scripts" + pipeline: + - runs: | + make DESTDIR="${{targets.subpkgdir}}" INSTALL_ARG="exicyclog exim_checkaccess eximstats exiqgrep exigrep exinext exiqsumm exipick exiwhat convert4r3 convert4r4 exim_msgdate exim_id_update" install + rm -fr "${{targets.subpkgdir}}/etc" + - uses: strip + dependencies: + runtime: + - exim=${{package.full-version}} + - perl + - perl-file-fcntllock + + - name: exim-utils + description: "EXIM utils" + pipeline: + - runs: | + install -d "${{targets.subpkgdir}}/etc/mail" + make DESTDIR="${{targets.subpkgdir}}" INSTALL_ARG="exim_dbmbuild exim_dumpdb exim_tidydb exim_fixdb exim_lock" install + rm -fr "${{targets.subpkgdir}}/etc" + - uses: strip + dependencies: + runtime: + - exim=${{package.full-version}} test: environment: + accounts: + users: + - username: exim + uid: 65332 + groups: + - groupname: exim + gid: 65332 contents: packages: - shadow @@ -85,7 +161,6 @@ test: pipeline: - name: "Test exim is installed and working" runs: | - useradd exim if ! command -v exim &> /dev/null; then echo "Exim is not installed." exit 1