mblaze: version bump

This commit is contained in:
John McQuah 2022-05-12 11:16:20 -04:00
parent 893d4f066c
commit 9d52695238
7 changed files with 192 additions and 204 deletions

11
REPO
View File

@ -254,13 +254,12 @@ f:685f10722d0f58f1f9b366d44831d3d1:mtpaint/Pkgfile
f:f3bc71cd175f17d32ee4b3811c5cd0a7:mtpaint/.footprint
f:259742d9decea4ad6f256a1dd0999279:mblaze/README
f:c1eca91654e731640d6771edc361d437:mblaze/mdelete.1
f:6f2f7e16c73c3de34b56db01efb2421f:mblaze/replyfrom.patch
f:9c201b9598b2224bc5f3fc21f5972f40:mblaze/.signature
f:bc379d0f0b599779d50aec79e9b99311:mblaze/Pkgfile
f:ea33598a97f821c57f7f5dd89f640ade:mblaze/reuse-sent.patch
f:86fa507b708696ddd8fdad046922de63:mblaze/mblaze-fofl.patch
f:6b6bb4e05891e57e5e3fa7b39f4eef0c:mblaze/.signature
f:a48769876d7538d3c4330fbff1faa6f0:mblaze/Pkgfile
f:cadf8d57d8a85aad3eb4c1ea8dc51a7e:mblaze/reuse-sent.patch
f:d061d1d2c77097cd1c81b98dedf31a93:mblaze/mblaze-fofl.patch
f:0cde925c01cff5ac0c84aa72f9079cbc:mblaze/mailshow
f:ec4ad26d1d06f572b11db3fb45a89cf9:mblaze/mblaze-delete.patch
f:41a4b23d39be1edc3744f6db6f347bb8:mblaze/mblaze-delete.patch
f:c4f44e42fd4a447423d0bfd02065c114:mblaze/.footprint
f:3504865d8c7b69c91ca808f4569a6438:dreamchess/.signature
f:6283642166b438bd5944b842efdf5008:dreamchess/Pkgfile

View File

@ -1,11 +1,10 @@
untrusted comment: verify with /etc/ports/jmq.pub
RWTTPlFarK9CxKbgJY54+XdgP4VSkiRm9d9KOWFFZB1l8b+Aw8KMgcnEBiVxF2LjR0vvF9pbMmh0+lceBPVKyuN+enak0p3LuQ0=
SHA256 (Pkgfile) = 5581e0ec639d08b3f03fc758662bd1836dd2eafd8caad0ff042c11e3cdc6371b
RWTTPlFarK9CxFiQ4E6Qh4Rfgm7AWcDnG4Qq1uslRPeH7+A1Xgkl5ixeZbhYBnW+D0g3u/M4s35CGgk+dCljHsX/nsrnOU6zvAg=
SHA256 (Pkgfile) = cd8b767a81122b4be7a8c42aed20a4dba153557d4901c26f344b536b910abcb0
SHA256 (.footprint) = 6fc746ca88bb316e98fd2525578806717913e4d9da14730deb9b20e4d6bb93ca
SHA256 (mblaze-v1.1.tar.gz) = edd8cb86f667543e703dee58263b81c7e47744339d23ebbb6a43e75059ba93b1
SHA256 (replyfrom.patch) = 33b425ce02ee8651fdea79dd31de60116eaf0fc74c3093db71f5dc80f54cd163
SHA256 (reuse-sent.patch) = 355c8f0cafd5d68fa91a60b4f7cc6b974f5d1bf96b5e091256989cee51f5be94
SHA256 (mblaze-delete.patch) = bd13dc6ee7447388ffbf28c52889d6b59a0409313b9865af6fdcebe240f3ea9c
SHA256 (mblaze-fofl.patch) = 0d492cba2fd4fde895021491c06a468b5352436e87b87734477005f1a01ce363
SHA256 (mblaze-v1.2.tar.gz) = 50c164c88cc83b4f52691341ee14060da5a6f1859e86aa73ff595de4b410037f
SHA256 (reuse-sent.patch) = a9a92c2c1e393c0cedb89bd4a78ec88114bb0fda10f73c2723d65ba3874f15c7
SHA256 (mblaze-delete.patch) = 45e79542f911ae356cf03c20ad65d6ce8bdc4b0fad632922c2ca47fe5d7c1cc1
SHA256 (mblaze-fofl.patch) = a829a8c52966dfa073b521214510eec78284214a7a8d2b9e26d979ad76f3e62e
SHA256 (mdelete.1) = 3cf71d8227dbefe66273d5caf4096a271b10c81f81775b42d707ab93aa8a36c3
SHA256 (mailshow) = 2d3b51f11007e41cbeb3a30afac9a68b76817cd2130a57f80fda5b870145c53d

View File

@ -5,14 +5,13 @@
# Depends on:
name=mblaze
version=1.1
release=14
version=1.2
release=1
source=("https://github.com/leahneukirchen/mblaze/archive/v$version/$name-v$version.tar.gz"
replyfrom.patch reuse-sent.patch mblaze-delete.patch mblaze-fofl.patch mdelete.1 mailshow)
reuse-sent.patch mblaze-delete.patch mblaze-fofl.patch mdelete.1 mailshow)
build() {
cd $name-$version
patch -p1 < $SRC/replyfrom.patch
patch -p1 < $SRC/reuse-sent.patch
# Next patch adds support for easily deleting messages from disk, adopting the syntax
# of mrefile (except for the destination folder, of course). Comment out if you're

View File

@ -1,15 +1,65 @@
--- mblaze-1.1/GNUmakefile 2021-01-14 10:45:22.000000000 -0500
+++ mblaze-1.1f/GNUmakefile 2021-05-31 19:11:33.146804008 -0400
@@ -15,7 +15,7 @@
endif
--- mblaze-1.2/mdeliver.c 2021-12-12 11:39:30.000000000 -0500
+++ mblaze-1.2f/mdeliver.c 2022-05-12 09:01:42.858863260 -0400
@@ -300,6 +300,23 @@ refile(char *file)
unlink(file);
}
DESTDIR=
-PREFIX=/usr/local
+PREFIX=/usr
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
+
+void
+mdelete(char *file)
+{
+ while (*file == ' ' || *file == '\t')
+ file++;
+
+ if (!kflag) {
+ unlink(file);
+ if (vflag)
+ fprintf(stderr, "Messages deleted.\n");
+ }
+
+ if (kflag)
+ fprintf(stderr, "Deletion command overridden.\n");
+}
+
int
main(int argc, char *argv[])
{
@@ -335,6 +352,32 @@ usage:
@@ -62,6 +62,7 @@
return 0;
}
+
+
+ if (strchr(argv[0], 't')) {
+ // mdelete(1)
+
+ int c;
+ while ((c = getopt(argc, argv, "kv")) != -1)
+ switch (c) {
+ case 'k': kflag = 1; break;
+ case 'v': vflag = 1; break;
+ default:
+usage3:
+ fprintf(stderr, "Usage: mdelete [-kv] [msgs]... \n");
+ exit(1);
+ }
+
+ if (argc == optind - 1)
+ goto usage3;
+
+ if (argc == optind && isatty(0))
+ goto usage3;
+ else
+ blaze822_loop(argc - optind, argv + optind, mdelete);
+
+ return 0;
+ }
int c;
while ((c = getopt(argc, argv, "cMvX:")) != -1)
--- mblaze-1.2/GNUmakefile 2021-12-12 11:39:30.000000000 -0500
+++ mblaze-1.2f/GNUmakefile 2022-05-12 09:02:48.345479146 -0400
@@ -62,6 +62,7 @@ install: FRC all
ln -sf mcom $(DESTDIR)$(BINDIR)/mfwd
ln -sf mcom $(DESTDIR)$(BINDIR)/mrep
ln -sf mdeliver $(DESTDIR)$(BINDIR)/mrefile
@ -17,63 +67,3 @@
install -m0644 man/*.1 $(DESTDIR)$(MANDIR)/man1
install -m0644 man/*.5 $(DESTDIR)$(MANDIR)/man5
install -m0644 man/*.7 $(DESTDIR)$(MANDIR)/man7
--- mblaze-1.1/mdeliver.c 2021-01-14 10:45:22.000000000 -0500
+++ mblaze-1.1f/mdeliver.c 2021-05-31 19:01:02.500148004 -0400
@@ -287,6 +287,22 @@
unlink(file);
}
+void
+mdelete(char *file)
+ {
+ while (*file == ' ' || *file == '\t')
+ file++;
+
+ if (!kflag) {
+ unlink(file);
+ if (vflag)
+ fprintf(stderr, "Messages deleted.\n");
+ }
+
+ if (kflag)
+ fprintf(stderr, "Deletion command overridden.\n");
+ }
+
int
main(int argc, char *argv[])
{
@@ -323,6 +339,32 @@
return 0;
}
+ if (strchr(argv[0], 't')) {
+ // mdelete(1)
+
+ int c;
+ while ((c = getopt(argc, argv, "kv")) != -1)
+ switch (c) {
+ case 'k': kflag = 1; break;
+ case 'v': vflag = 1; break;
+ default:
+usage3:
+ fprintf(stderr,
+ "Usage: mdelete [-kv] [msgs]... \n");
+ exit(1);
+ }
+
+ if (argc == optind - 1)
+ goto usage3;
+
+ if (argc == optind && isatty(0))
+ goto usage3;
+ else
+ blaze822_loop(argc - optind, argv + optind, mdelete);
+
+ return 0;
+ }
+
int c;
while ((c = getopt(argc, argv, "cMvX:")) != -1)
switch (c) {

View File

@ -1,101 +1,105 @@
--- mblaze-1.1/mmime.c 2021-01-14 10:45:22.000000000 -0500
+++ mblaze-1.1f/mmime.c 2021-06-12 20:35:09.994308179 -0400
@@ -134,6 +134,68 @@
--- mblaze-1.2/mmime.c 2021-12-12 11:39:30.000000000 -0500
+++ mblaze-1.2f/mmime.c 2022-05-12 09:13:44.371637134 -0400
@@ -143,6 +143,70 @@ gen_qp(uint8_t *s, off_t size, size_t ma
return linelen;
}
+
+size_t
+gen_flowd(uint8_t *s, off_t size, size_t maxlinelen, size_t linelen)
+{
+ off_t i;
+ int header = linelen > 0;
+ off_t i;
+ int header = linelen > 0;
+
+ for (i = 0; i < size; i++) {
+ // inspect utf8 sequence to not wrap in between multibyte
+ int mb;
+ if ((s[i] & 0x80) == 0) mb = 3;
+ else if ((s[i] & 0xc0) == 0x80) mb = 3;
+ else if ((s[i] & 0xe0) == 0xc0) mb = 6;
+ else if ((s[i] & 0xf0) == 0xe0) mb = 9;
+ else if ((s[i] & 0xf8) == 0xf0) mb = 12;
+ else mb = 3;
+ for (i = 0; i < size; i++) {
+ // inspect utf8 sequence to not wrap in between multibyte
+ int mb;
+ if ((s[i] & 0x80) == 0) mb = 3;
+ else if ((s[i] & 0xc0) == 0x80) mb = 3;
+ else if ((s[i] & 0xe0) == 0xc0) mb = 6;
+ else if ((s[i] & 0xf0) == 0xe0) mb = 9;
+ else if ((s[i] & 0xf8) == 0xf0) mb = 12;
+ else mb = 3;
+
+ if (linelen >= maxlinelen-mb-!!header) {
+ linelen = 0;
+ if (header) {
+ printf("\n");
+ } else {
+ puts(" ");
+ }
+ }
+ if (linelen >= maxlinelen-mb-!!header) {
+ linelen = 0;
+ if (header) {
+ printf("\n");
+ } else {
+ puts(" ");
+ }
+ }
+
+ if ((s[i] > 126) ||
+ (linelen == 0 &&
+ (strncmp((char *)s, "From ", 5) == 0 ||
+ (s[i] == '.' && i+1 < size &&
+ (s[i+1] == '\n' || s[i+1] == '\r'))))) {
+ putc_unlocked(s[i], stdout);
+ linelen ++;
+ } else if (header &&
+ (s[i] == '\n' || s[i] == '\t' || s[i] == '_')) {
+ putc_unlocked(s[i], stdout);
+ linelen ++;
+ } else if (header && s[i] == ' ') {
+ putc_unlocked('_', stdout);
+ linelen++;
+ } else if (s[i] < 33 && s[i] != '\n') {
+ if ((s[i] == ' ' || s[i] == '\t') &&
+ i+1 < size &&
+ (s[i+1] != '\n' && s[i+1] != '\r')) {
+ putc_unlocked(s[i], stdout);
+ linelen++;
+ } else {
+ putc_unlocked(s[i], stdout);
+ linelen++;
+ }
+ } else if (s[i] == '\n') {
+ putc_unlocked('\n', stdout);
+ linelen = 0;
+ } else {
+ putc_unlocked(s[i], stdout);
+ linelen++;
+ }
+ }
+ if (linelen > 0 && !header)
+ puts("\n");
+ return linelen;
+
+ if ((s[i] > 126) ||
+ (linelen == 0 &&
+ (strncmp((char *)s, "From ", 5) == 0 ||
+ (s[i] == '.' && i+1 < size &&
+ (s[i+1] == '\n' || s[i+1] == '\r'))))) {
+ putc_unlocked(s[i], stdout);
+ linelen ++;
+ } else if (header &&
+ (s[i] == '\n' || s[i] == '\t' || s[i] == '_')) {
+ putc_unlocked(s[i], stdout);
+ linelen ++;
+ } else if (header && s[i] == ' ') {
+ putc_unlocked('_', stdout);
+ linelen++;
+ } else if (s[i] < 33 && s[i] != '\n') {
+ if ((s[i] == ' ' || s[i] == '\t') &&
+ i+1 < size &&
+ (s[i+1] != '\n' && s[i+1] != '\r')) {
+ putc_unlocked(s[i], stdout);
+ linelen++;
+ } else {
+ putc_unlocked(s[i], stdout);
+ linelen++;
+ }
+ } else if (s[i] == '\n') {
+ putc_unlocked('\n', stdout);
+ linelen = 0;
+ } else {
+ putc_unlocked(s[i], stdout);
+ linelen++;
+ }
+ }
+ if (linelen > 0 && !header)
+ puts("\n");
+ return linelen;
+}
+
static const char *
basenam(const char *s)
{
@@ -401,8 +463,8 @@
@@ -444,8 +508,8 @@ gen_build()
inheader = 0;
printf("MIME-Version: 1.0\n");
if (rflag) {
- printf("Content-Type: text/plain; charset=UTF-8\n");
- printf("Content-Transfer-Encoding: quoted-printable\n\n");
+ printf("Content-Type: text/plain; charset=US-ASCII; format=flowed\n");
+ printf("Content-Transfer-Encoding: 7bit\n\n");
- printf("Content-Type:%s", contenttype ? contenttype : " text/plain; charset=UTF-8\n");
- printf("Content-Transfer-Encoding:%s", contenttransferenc ? contenttransferenc : " quoted-printable\n");
+ printf("Content-Type:%s", contenttype ? contenttype : " text/plain; charset=US-ASCII; format=flowed\n");
+ printf("Content-Transfer-Encoding:%s", contenttransferenc ? contenttransferenc : " 7bit\n");
printf("\n");
} else {
printf("Content-Type: %s; boundary=\"%s\"\n", tflag, sep);
@@ -435,14 +497,14 @@
@@ -487,9 +551,9 @@ gen_build()
if (!rflag && !intext) {
printf("\n--%s\n", sep);
- printf("Content-Type: text/plain; charset=UTF-8\n");
+ printf("Content-Type: text/plain; charset=US-ASCII; format=flowed\n");
- printf("Content-Type:%s", contenttype ? contenttype : " text/plain; charset=UTF-8\n");
+ printf("Content-Type:%s", contenttype ? contenttype : " text/plain; charset=US-ASCII; format=flowed\n");
printf("Content-Disposition: inline\n");
- printf("Content-Transfer-Encoding: quoted-printable\n\n");
+ printf("Content-Transfer-Encoding: 7bit\n\n");
- printf("Content-Transfer-Encoding:%s", contenttransferenc ? contenttransferenc : " quoted-printable\n");
+ printf("Content-Transfer-Encoding:%s", contenttransferenc ? contenttransferenc : " 7bit\n");
printf("\n");
intext = 1;
}
@@ -498,7 +562,7 @@ gen_build()
if (contenttransferenc)
printf("%s", line);
else
- gen_qp((uint8_t *)line, strlen(line), 78, 0);
+ gen_flowd((uint8_t *)line, strlen(line), 78, 0);
- gen_qp((uint8_t *)line, strlen(line), 78, 0);
+ gen_flowd((uint8_t *)line, strlen(line), 78, 0);
emptybody = 0;
}
if (!rflag && !inheader)
printf("\n--%s--\n", sep);
printf 'Bcc: \n'

View File

@ -1,30 +0,0 @@
--- mblaze-1.1/mcom 2021-01-14 15:45:22.000000000 -0000
+++ mblaze-1.1f/mcom 2021-08-22 00:08:04.418851752 -0000
@@ -12,13 +12,13 @@ commajoin() {
notmine() {
mine="$(maddr -a -h local-mailbox:alternate-mailboxes: "$MBLAZE/profile")"
- grep -Fv -e "$mine"
+ grep -Fvi -e "$mine"
}
replyfrom() {
addrs="$(maddr -a -h reply-from: "$MBLAZE/profile")"
[ -z "$addrs" ] && addrs="$(maddr -a -h alternate-mailboxes: "$MBLAZE/profile")"
- grep -F -e "$addrs"
+ grep -Fi -e "$addrs"
}
ouniq() {
@@ -358,8 +370,8 @@ fi
[ -z "$to" ] && to=$(mhdr -d -h from "$1")
printf 'To: %s\n' "$to"
printf 'Cc: %s\n' \
- "$(mhdr -d -A -h to:cc: "$1" |
- notmine |grep -Fv -e "$to" |
+ "$(maddr -a -h to:cc: "$1" |
+ notmine |grep -Fvi -e "$to" |
ouniq |commajoin)"
printf 'Bcc: \n'
printf '%s\n' "$hdrs" | awk '{ print }' |

View File

@ -1,21 +1,48 @@
--- mblaze-1.1/mcom 2021-01-14 15:45:22.000000000 -0000
+++ mblaze-1.1f/mcom 2021-08-22 00:08:04.418851752 -0000
--- mblaze-1.2/mcom 2021-12-12 11:39:30.000000000 -0500
+++ mblaze-1.2f/mcom 2022-05-12 08:54:57.169177959 -0400
@@ -12,13 +12,13 @@ commajoin() {
notmine() {
mine="$(maddr -a -h local-mailbox:alternate-mailboxes: "$MBLAZE/profile")"
- grep -Fv -e "$mine"
+ grep -Fvi -e "$mine"
}
replyfrom() {
addrs="$(maddr -a -h reply-from: "$MBLAZE/profile")"
[ -z "$addrs" ] && addrs="$(maddr -a -h alternate-mailboxes: "$MBLAZE/profile")"
- grep -F -e "$addrs"
+ grep -Fi -e "$addrs"
}
ouniq() {
@@ -133,6 +133,18 @@ case "$0" in
"$draft" 1>&2
exit 1
fi
+ outbox=$(mhdr -h outbox "$MBLAZE/profile" | sed "s:^~/:$HOME/:")
+ if [ -n "$(dirname "$draft" | grep "$outbox/cur")" ]; then
+ newdraft=$(true | mdeliver -v -c -XD "$outbox")
+ if [ -z "$newdraft" ]; then
+ printf '%s\n' "$0: failed to load draft for editing." 1>&2
+ exit 1
+ fi
+ sed "s/^\(Message-Id: \).*/\1$(mgenmid 2>/dev/null)/" $draft \
+ > $newdraft
+ sed -i "s/^\(Date: \).*/\1$(mdate)/" $newdraft
+ draft=$newdraft
+ fi
+ if [ -n "$(dirname "$draft" | grep "$outbox/cur")" ]; then
+ newdraft=$(true | mdeliver -v -c -XD "$outbox")
+ if [ -z "$newdraft" ]; then
+ printf '%s\n' "$0: failed to load draft for editing." 1>&2
+ exit 1
+ fi
+ sed "s/^\(Message-Id: \).*/\1$(mgenmid 2>/dev/null)/" $draft \
+ > $newdraft
+ sed -i "s/^\(Date: \).*/\1$(mdate)/" $newdraft
+ draft=$newdraft
+ fi
echo "using draft $draft"
shift
fi
@@ -358,8 +370,8 @@ fi
[ -z "$to" ] && to=$(mhdr -d -A -h from "$1")
printf 'To: %s\n' "$to"
printf 'Cc: %s\n' \
- "$(mhdr -d -A -h to:cc: "$1" |
- notmine |grep -Fv -e "$to" |
+ "$(maddr -a -h to:cc: "$1" |
+ notmine |grep -Fvi -e "$to" |
ouniq |commajoin)"
printf 'Bcc: \n'
printf '%s\n' "$hdrs" | awk '{ print }' |