~alpine/aports

1

[alpine-aports] [PATCH] testing/s-nail: update to v14.9.10..

Steffen Nurpmeso
Details
Message ID
<fad27b8acd54fa1edf35df28e712b00020a0f594.1521939091.git.steffen@sdaoden.eu>
Sender timestamp
1521939198
DKIM signature
missing
Download raw message
Patch: +8 -17
The 40th birthday of BSD Mail, first mentioned 1978-03-25.
Stability release, should be hard.
---
 testing/s-nail/APKBUILD                 | 15 ++++++++-------
 testing/s-nail/fix-inv-mem-access.patch | 10 ----------
 2 files changed, 8 insertions(+), 17 deletions(-)
 delete mode 100644 testing/s-nail/fix-inv-mem-access.patch

diff --git a/testing/s-nail/APKBUILD b/testing/s-nail/APKBUILD
index 7ef83c1..9d4e3b1 100644
--- a/testing/s-nail/APKBUILD
+++ b/testing/s-nail/APKBUILD
@@ -2,7 +2,7 @@
# Contributor: Ivan Tham <pickfire@riseup.net>
# Maintainer: Steffen Nurpmeso <steffen@sdaoden.eu>
pkgname=s-nail
pkgver=14.9.9
pkgver=14.9.10
pkgrel=1
pkgdesc="SysV mail/BSD Mail/POSIX mailx: send and receive Internet mail"
url="https://www.sdaoden.eu/code.html#s-mailx"
@@ -12,7 +12,7 @@ makedepends="libressl-dev libidn-dev ncurses-dev krb5-dev"
options="suid"
replaces="mailx"
subpackages="$pkgname-doc"
source="https://ftp.sdaoden.eu/s-nail-$pkgver.tar.xz fix-inv-mem-access.patch"
source="https://ftp.sdaoden.eu/s-nail-$pkgver.tar.xz"
builddir="$srcdir/"$pkgname-$pkgver

# LD_LIBRARY_PATH is included via -rpath, so use system defaults only.
@@ -26,14 +26,17 @@ export PATH C_INCLUDE_PATH LD_LIBRARY_PATH
build() {
	cd "$builddir"
	make \
		EXTRA_CFLAGS=-Os \
		\
		VAL_SID= VAL_MAILX=mail \
		VAL_PREFIX=/usr \
		VAL_SYSCONFDIR=/etc \
		\
		OPT_AUTOCC=no \
		VAL_IDNA=idn \
		VAL_RANDOM="libgetrandom sysgetrandom urandom builtin" \
		\
		config &&
	make build # XXX unite with config in v14.9.10
	make build # XXX unite with config in v14.9.11
}

check() {
@@ -48,6 +51,4 @@ package() {
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="f0004952f7189a2549e01489b600a10a36f1fa3ba0b6c6a871c4ee99d3d3d49e97ed5a8068fa1692b7fd91d2b243d05dbc5d61fe3f1dc2e9ba9187d9d31707c4  s-nail-14.9.9.tar.xz
47639f0f013724040aa70a47180b5e286f4143d2ecef960c27eef43bcf5d8f60db8c7c1aedb4d158779b783f79409cbd7c5b703ed28666e8cf80eb4448f86125  fix-inv-mem-access.patch"

sha512sums="d649f66d6b8543ce626b99b871e1d96ccf8754b55684e9f1b66d6e9cf81f79261f47b9efdadd4a4dbeff9dce19f8bbdee6c8ee503dd6aef8b4c4e1d2221d3ff3  s-nail-14.9.10.tar.xz"
diff --git a/testing/s-nail/fix-inv-mem-access.patch b/testing/s-nail/fix-inv-mem-access.patch
deleted file mode 100644
index 1ef30a7..0000000
--- a/testing/s-nail/fix-inv-mem-access.patch
@@ -1,10 +0,0 @@
---- a/mime.c	2018-03-09 20:24:35.737754669 +0100
+++ b/mime.c	2018-03-09 20:24:39.107748465 +0100
@@ -678,7 +678,6 @@ mime_write_tohdr_a(struct str *in, FILE
       xin.l = PTR2SIZE(cp - lastcp);
       if ((sz = a_mime__convhdra(&xin, f, colp, msh)) < 0)
          goto jleave;
-      xin.s[xin.l] = '<';
       lastcp = cp;
    } else {
       cp = lastcp;
-- 
2.16.2


-steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH] testing/s-nail: update to v14.9.10, 2nd attempt..

Steffen Nurpmeso
Details
Message ID
<7386a30c885e37f7e109ccb36784be088d1df4fb.1522091137.git.steffen@sdaoden.eu>
In-Reply-To
<fad27b8acd54fa1edf35df28e712b00020a0f594.1521939091.git.steffen@sdaoden.eu> (view parent)
Sender timestamp
1522091203
DKIM signature
missing
Download raw message
Patch: +72 -2
The 40th birthday of BSD Mail, first mentioned 1978-03-25.
Second attempt because:

  Well yes, i have messed up the jubilee version.
  While waiting for test results of the OpenCSW cluster (external)
  and the OpenBSD VM (locally), i have quickly added support for
  64-bit IMAP UIDs, which are currently in the process of being
  standardized.  I should have listened to my evil subconsciousness,
  but no, i have not.

  As a result S-nail has a problem on 32-bit hosts, where "unsigned
  long" is not of the same size as "ui64_t".
---
 testing/s-nail/APKBUILD         |  5 ++-
 testing/s-nail/imap-32bit.patch | 69 ++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 2 deletions(-)
 create mode 100644 testing/s-nail/imap-32bit.patch

diff --git a/testing/s-nail/APKBUILD b/testing/s-nail/APKBUILD
index 9d4e3b1..eee5001 100644
--- a/testing/s-nail/APKBUILD
+++ b/testing/s-nail/APKBUILD
@@ -12,7 +12,7 @@ makedepends="libressl-dev libidn-dev ncurses-dev krb5-dev"
options="suid"
replaces="mailx"
subpackages="$pkgname-doc"
source="https://ftp.sdaoden.eu/s-nail-$pkgver.tar.xz"
source="https://ftp.sdaoden.eu/s-nail-$pkgver.tar.xz imap-32bit.patch"
builddir="$srcdir/"$pkgname-$pkgver

# LD_LIBRARY_PATH is included via -rpath, so use system defaults only.
@@ -51,4 +51,5 @@ package() {
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="d649f66d6b8543ce626b99b871e1d96ccf8754b55684e9f1b66d6e9cf81f79261f47b9efdadd4a4dbeff9dce19f8bbdee6c8ee503dd6aef8b4c4e1d2221d3ff3  s-nail-14.9.10.tar.xz"
sha512sums="d649f66d6b8543ce626b99b871e1d96ccf8754b55684e9f1b66d6e9cf81f79261f47b9efdadd4a4dbeff9dce19f8bbdee6c8ee503dd6aef8b4c4e1d2221d3ff3  s-nail-14.9.10.tar.xz
c0c4a7915c1943e7a4644aec0e57f63020ca57c1c60ba4a242bf5806ac35a2488e498ae623dced39ef6e0b66229168a450e2ba8be704831ba31d7b0927ebd8d6  imap-32bit.patch"
diff --git a/testing/s-nail/imap-32bit.patch b/testing/s-nail/imap-32bit.patch
new file mode 100644
index 0000000..027088f
--- /dev/null
+++ b/testing/s-nail/imap-32bit.patch
@@ -0,0 +1,69 @@
    FIX hasty [ab7aab0e] (Account for drafted 64-bit IMAP UIDs..)..
    
    Unfortunately this has not adjusted all functions correctly,
    which is a problem on 32-bit hosts where "unsigned long" is
    not of equal size as ui64_t
---
 obs-imap.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/obs-imap.c b/obs-imap.c
index 95692bd2..d403078b 100644
--- a/obs-imap.c
@@ -246,10 +246,9 @@ static enum okay  imap_list(struct mailbox *mp, const char *base, int strip,
 static enum okay  imap_copy1(struct mailbox *mp, struct message *m, int n,
                      const char *name);
 static enum okay  imap_copyuid_parse(const char *cp,
-                     unsigned long *uidvalidity, unsigned long *olduid,
-                     unsigned long *newuid);
+                     ui64_t *uidvalidity, ui64_t *olduid, ui64_t *newuid);
 static enum okay  imap_appenduid_parse(const char *cp,
-                     unsigned long *uidvalidity, unsigned long *uid);
+                     ui64_t *uidvalidity, ui64_t *uid);
 static enum okay  imap_copyuid(struct mailbox *mp, struct message *m,
                      const char *name);
 static enum okay  imap_appenduid(struct mailbox *mp, FILE *fp, time_t t,
@@ -3465,16 +3464,16 @@ imap_copy(struct message *m, int n, const char *name)
 }
 
 static enum okay
-imap_copyuid_parse(const char *cp, unsigned long *uidvalidity,
-   unsigned long *olduid, unsigned long *newuid)
+imap_copyuid_parse(const char *cp, ui64_t *uidvalidity, ui64_t *olduid,
+   ui64_t *newuid)
 {
-   char *xp, *yp, *zp;
+   char const *xp, *yp, *zp;
    enum okay rv;
    NYD_ENTER;
 
-   *uidvalidity = strtoul(cp, &xp, 10);
-   *olduid = strtoul(xp, &yp, 10);
-   *newuid = strtoul(yp, &zp, 10);
+   n_idec_ui64_cp(uidvalidity, cp, 10, &xp); /* TODO errors */
+   n_idec_ui64_cp(olduid, xp, 10, &yp); /* TODO errors */
+   n_idec_ui64_cp(newuid, yp, 10, &zp); /* TODO errors */
    rv = (*uidvalidity && *olduid && *newuid && xp > cp && *xp == ' ' &&
       yp > xp && *yp == ' ' && zp > yp && *zp == ']');
    NYD_LEAVE;
@@ -3482,15 +3481,14 @@ imap_copyuid_parse(const char *cp, unsigned long *uidvalidity,
 }
 
 static enum okay
-imap_appenduid_parse(const char *cp, unsigned long *uidvalidity,
-   unsigned long *uid)
+imap_appenduid_parse(const char *cp, ui64_t *uidvalidity, ui64_t *uid)
 {
-   char *xp, *yp;
+   char const *xp, *yp;
    enum okay rv;
    NYD_ENTER;
 
-   *uidvalidity = strtoul(cp, &xp, 10);
-   *uid = strtoul(xp, &yp, 10);
+   n_idec_ui64_cp(uidvalidity, cp, 10, &xp); /* TODO errors */
+   n_idec_ui64_cp(uid, xp, 10, &yp); /* TODO errors */
    rv = (*uidvalidity && *uid && xp > cp && *xp == ' ' && yp > xp &&
       *yp == ']');
    NYD_LEAVE;
-- 
2.16.2


-steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---