From 543f5673ea4b52a0c475974ff5f8e5516cab577f Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Thu, 9 Jul 2020 12:24:22 -0700 Subject: [PATCH] add more info about how the backend works... This should make it much easier for people to run their own version if they'd like to.. --- README.md | 27 +++++++++++++++++++++++++++ snapwrap.sh | 11 +++++++++++ 2 files changed, 38 insertions(+) create mode 100755 snapwrap.sh diff --git a/README.md b/README.md index 9e046b7..05bee97 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,30 @@ downloaded. Another index is also maintained which only contains the currently available to d/l snapshots. This may contain snapshots that no longer exist, as it is only updated/checked when a new snapshot is released. + +The procmail rc lines that I use: +``` +:0c +* Delivered-To: (freebsd-)?announce@([^@\.]*\.)*freebsd.org +| $HOME/bin/snapwrap.sh + +:0 +* Delivered-To: (freebsd-)?snapshots@([^@\.]*\.)*freebsd.org +{ +:0c +ml/snapshots + +:0 +| $HOME/bin/snapwrap.sh + +} +``` + +The first rule is used for RELEASE announcements. They are copied (`c`) +so that a later rule can file them in the proper mailbox. The second rule +is for the snapshots, and smiilarly organized, but the mailbox filing +happens here. + +The snapwrap.sh script is included in the repo, but the command to deploy +the database to the FreeBSD.org servers has been deleted, but it is a +simple: `tar -cf - | ssh freefall tar -xf -` type command. diff --git a/snapwrap.sh b/snapwrap.sh new file mode 100755 index 0000000..7c88b5e --- /dev/null +++ b/snapwrap.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +cd ~jmg/public_html/FreeBSD-snap + +tmpfile="$(mktemp snapmail.XXXXXXX)" + +cat > "$tmpfile" + +sh addinfo.sh "$tmpfile" && rm "$tmpfile"