This commit is contained in:
Mateusz Gruszczyński committed 2026-11-03 20:05:17 +01:00
1 parent ba300b2448
commit 6e5aa8e4e4
26 files changed
+814 -214

No files matched your search

+6 -4
View File
@@ -50,16 +50,18 @@ docker run --rm \
cargo build --release
VERSION="$(sed -n "s/^version[[:space:]]*=[[:space:]]*\"\([^\"]*\)\".*/\1/p" Cargo.toml | head -n1)"
DEB_VERSION="${VERSION/-dev/~dev}"
#DEB_VERSION="${VERSION/-dev/~dev}"
DEB_VERSION="${VERSION}"
ARCH="$(dpkg --print-architecture)"
PKG=/work/pkg
install -d "$PKG/DEBIAN" "$PKG/usr/bin" "$PKG/etc/postfixadmin-rs" "$PKG/etc/default" "$PKG/lib/systemd/system" "$PKG/usr/share/doc/postfixadmin-rs"
install -d "$PKG/DEBIAN" "$PKG/usr/bin" "$PKG/usr/lib/postfixadmin-rs" "$PKG/etc/postfixadmin-rs" "$PKG/etc/default" "$PKG/lib/systemd/system" "$PKG/usr/share/doc/postfixadmin-rs"
install -m 0755 target/release/postfixadmin-rs "$PKG/usr/bin/postfixadmin-rs"
install -m 0640 config.example.toml "$PKG/etc/postfixadmin-rs/config.toml"
install -m 0644 packaging/postfixadmin-rs.default "$PKG/etc/default/postfixadmin-rs"
install -m 0644 packaging/postfixadmin-rs.service "$PKG/lib/systemd/system/postfixadmin-rs.service"
install -m 0644 README.md SECURITY.md COMPATIBILITY.md PORT-PARITY.md "$PKG/usr/share/doc/postfixadmin-rs/"
install -m 0755 packaging/postfixadmin-rs-rspamd-setup "$PKG/usr/lib/postfixadmin-rs/setup-rspamd-dkim-permissions"
install -m 0644 README.md CHANGELOG.md SECURITY.md COMPATIBILITY.md PORT-PARITY.md docs/RSPAMD_DKIM.md "$PKG/usr/share/doc/postfixadmin-rs/"
cat > "$PKG/DEBIAN/control" <<CONTROL
Package: postfixadmin-rs
@@ -68,7 +70,7 @@ Section: admin
Priority: optional
Architecture: $ARCH
Maintainer: local build <root@localhost>
Depends: adduser, libc6 (>= 2.36), libgcc-s1, libssl3, ca-certificates
Depends: adduser, passwd, libc6 (>= 2.36), libgcc-s1, libssl3, ca-certificates
Description: Rust web administration panel for Postfix virtual mail data
PostfixAdmin-RS is a Rust administration panel compatible with PostfixAdmin
database layouts. This is a development package built locally.
+15 -3
View File
@@ -33,8 +33,8 @@ if package.get('edition') != '2024':
fail('Cargo.toml must use edition 2024')
if package.get('rust-version') != '1.99.1':
fail('Cargo.toml rust-version must be 1.99.1')
if package.get('version') != '0.0.1-dev':
fail('Cargo.toml version must be 0.0.1-dev during the development phase')
if package.get('version') != '0.0.2':
fail('Cargo.toml version must be 0.0.2 for this release')
if toolchain.get('toolchain', {}).get('channel') != '1.99.1':
fail('rust-toolchain.toml must pin 1.99.1')
@@ -132,6 +132,18 @@ for marker in ['/rspamd-dkim/generate', 'selector_map', 'path_map', 'RspamdDkimC
if marker not in project_text + '\n' + (ROOT / 'src/config.rs').read_text(encoding='utf-8'):
fail(f'missing Rspamd DKIM integration marker: {marker}')
release_002_markers = {
'src/routes/vacation.rs': ['sync_vacation_alias', 'vacation_address', 'validate_dates'],
'src/routes/aliases.rs': ['technical', 'internal_vacation', 'can_edit_description'],
'src/web/js/10-pages.js': ['vacationMailboxPicker', 'Aliasy techniczne', 'local_part'],
'packaging/postfixadmin-rs-rspamd-setup': ['postfixadmin-rspamd', 'systemctl restart postfixadmin-rs rspamd'],
}
for relative, markers in release_002_markers.items():
text_value = (ROOT / relative).read_text(encoding='utf-8')
for marker in markers:
if marker not in text_value:
fail(f'{relative}: missing 0.0.2 regression marker: {marker}')
node = shutil.which('node')
if node:
for path in sorted((ROOT / 'src/web/js').glob('*.js')):
@@ -139,7 +151,7 @@ if node:
if result.returncode:
fail(f'{path.relative_to(ROOT)}: node --check failed: {result.stderr.strip()}')
for script in [ROOT / 'dev.sh', ROOT / 'scripts/build-release.sh', ROOT / 'scripts/package-release.sh', ROOT / 'scripts/build-deb.sh']:
for script in [ROOT / 'dev.sh', ROOT / 'scripts/build-release.sh', ROOT / 'scripts/package-release.sh', ROOT / 'scripts/build-deb.sh', ROOT / 'packaging/postfixadmin-rs-rspamd-setup']:
result = subprocess.run(['bash', '-n', str(script)], capture_output=True, text=True)
if result.returncode:
fail(f'{script.relative_to(ROOT)}: bash -n failed: {result.stderr.strip()}')