Skip to content

Commit

Permalink
exim: add subpackages, for lookups, scripts and utils. (#30647)
Browse files Browse the repository at this point in the history
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:
* #29568
  • Loading branch information
patdowney authored Nov 14, 2024
1 parent a62f32f commit 55b4071
Showing 1 changed file with 78 additions and 3 deletions.
81 changes: 78 additions & 3 deletions exim.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
package:
name: exim
version: "4.98"
epoch: 2
epoch: 3
description: Message Transfer Agent
copyright:
- license: GPL-2.0-or-later
checks:
disabled:
- setuidgid

data:
- name: exim-lookups-with-deps
items:
mysql: "mariadb-connector-c"
sqlite: "sqlite-libs"
pgsql: "libpq"

environment:
contents:
packages:
Expand All @@ -35,7 +42,7 @@ environment:
accounts:
users:
- username: exim
uid: 1001
uid: 65332

pipeline:
- uses: fetch
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 55b4071

Please sign in to comment.