aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-17 15:06:19 -0300
committerEuAndreh <eu@euandre.org>2023-03-17 15:25:29 -0300
commit4dadf12bb8613a610bfd1b6b044cd6b5b4ec8ed3 (patch)
tree0777ec11876fe1567ac25389fafb9dcd81350067 /Makefile
parentqueue.scm: Fix positional argument of dkimproxyout config file (diff)
downloadpackage-repository-4dadf12bb8613a610bfd1b6b044cd6b5b4ec8ed3.tar.gz
package-repository-4dadf12bb8613a610bfd1b6b044cd6b5b4ec8ed3.tar.xz
Makefile: Streamline verification of generated config files
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 26 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 26893ea..6ec9c2e 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,14 @@
all: EuAndreh.key guix nix
+test-config-files = \
+ tests/internet/etc/postfix/main.cf \
+ tests/internet/etc/dkimproxyout.conf \
+ tests/internet/etc/dovecot.conf \
+
+derived-assets = \
+ $(test-config-files) \
+
guix: guix-packages guix-services
guix-packages:
@@ -22,17 +30,29 @@ guix-packages:
-f src/org/euandre/packages.scm \
-f src/org/euandre/queue.scm \
+local-files = \
+ /etc/postfix/master.cf \
+ /etc/postfix/main.cf \
+
+internet-files = \
+ $(local-files) \
+ /etc/sasl2/smtpd.conf \
+ /etc/dkimproxyout.conf \
+ /etc/dovecot.conf \
+
guix-services-local:
rm -f result-local
guix system -v3 -Lsrc/ -K -r result-local build tests/local/system.scm
- cmp -s result-local/etc/postfix/master.cf tests/local/master.cf
- cmp -s result-local/etc/postfix/main.cf tests/local/main.cf
+ for f in $(local-files); do \
+ diff -U5 --color=always result-local$$f tests/local$$f; \
+ done
-guix-services-internet: tests/internet/main.cf
+guix-services-internet: $(test-config-files)
rm -f result-internet
guix system -v3 -Lsrc/ -K -r result-internet build tests/internet/system.scm
- cmp -s result-internet/etc/postfix/master.cf tests/internet/master.cf
- cmp -s result-internet/etc/postfix/main.cf tests/internet/main.cf
+ for f in $(internet-files); do \
+ diff -U5 --color=always result-internet$$f tests/internet$$f; \
+ done
guix-services: guix-services-local guix-services-internet
@@ -47,7 +67,7 @@ check:
clean:
rm -rf \
- result* .paku/ deb/ tests/internet/main.cf
+ $(derived-assets) result* .paku/ deb/
public: