[arch-commits] Commit in s-nail/repos (6 files)

Gaetan Bisson bisson at nymeria.archlinux.org
Thu Jan 30 17:24:29 UTC 2014


    Date: Thursday, January 30, 2014 @ 18:24:29
  Author: bisson
Revision: 204885

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  s-nail/repos/testing-i686/
  s-nail/repos/testing-i686/PKGBUILD
    (from rev 204884, s-nail/trunk/PKGBUILD)
  s-nail/repos/testing-i686/sort.patch
    (from rev 204884, s-nail/trunk/sort.patch)
  s-nail/repos/testing-x86_64/
  s-nail/repos/testing-x86_64/PKGBUILD
    (from rev 204884, s-nail/trunk/PKGBUILD)
  s-nail/repos/testing-x86_64/sort.patch
    (from rev 204884, s-nail/trunk/sort.patch)

---------------------------+
 testing-i686/PKGBUILD     |   56 ++++++++++++++++++++++++++++++++
 testing-i686/sort.patch   |   75 ++++++++++++++++++++++++++++++++++++++++++++
 testing-x86_64/PKGBUILD   |   56 ++++++++++++++++++++++++++++++++
 testing-x86_64/sort.patch |   75 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 262 insertions(+)

Copied: s-nail/repos/testing-i686/PKGBUILD (from rev 204884, s-nail/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2014-01-30 17:24:29 UTC (rev 204885)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: Stéphane Gaudreault <stephane at archlinux.org>
+# Contributor: Sergej Pupykin <pupykin.s at arch@gmail.com>
+# Contributor: Andreas Wagner <Andreas.Wagner at em.uni-frankfurt.de>
+
+pkgname=s-nail
+pkgver=14.5.2
+pkgrel=2
+pkgdesc='Mail processing system with a command syntax reminiscent of ed'
+url='http://sdaoden.users.sourceforge.net/code.html#s-nail'
+license=('custom:BSD')
+arch=('i686' 'x86_64')
+depends=('openssl')
+optdepends=('smtp-forwarder: for sending mail')
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver//./_}.tar.xz"
+        'sort.patch')
+sha1sums=('26ad43f5f41b429d5f13a3ce73a3dff75325950c'
+          '909da731e590d1d2877ed38bed667440a02d1259')
+
+groups=('base')
+backup=('etc/mail.rc')
+replaces=('mailx' 'mailx-heirloom' 'heirloom-mailx')
+provides=('mailx' 'mailx-heirloom' 'heirloom-mailx')
+conflicts=('mailx' 'mailx-heirloom' 'heirloom-mailx')
+
+prepare() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	patch -p1 -i ../sort.patch # http://sourceforge.net/mailarchive/message.php?msg_id=31906477
+}
+
+build() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make \
+		PREFIX=/usr \
+		SYSCONFDIR=/etc \
+		MANDIR=/usr/share/man \
+		MAILSPOOL=/var/spool/mail \
+		SID= NAIL=mail \
+		config
+
+	make build
+}
+
+check() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make test
+}
+
+package() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make DESTDIR="${pkgdir}" packager-install
+	ln -sf mail "${pkgdir}"/usr/bin/mailx
+	ln -sf mail.1.gz "${pkgdir}"/usr/share/man/man1/mailx.1.gz
+	install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}

Copied: s-nail/repos/testing-i686/sort.patch (from rev 204884, s-nail/trunk/sort.patch)
===================================================================
--- testing-i686/sort.patch	                        (rev 0)
+++ testing-i686/sort.patch	2014-01-30 17:24:29 UTC (rev 204885)
@@ -0,0 +1,75 @@
+s-nail-14_5_2-sort.patch, 2014-01-30:
+
+Apply:
+  $ cd s-nail-14.5.2
+  $ patch -bu < s-nail-14_5_2-sort.patch
+
+Description:
+Reverses (sort(),thread(): use srelax()!, 2014-01-18, [a9b67e9]), which
+was a hasty commit of an untested diff that i've added few minutes
+beforehand.
+It was of course wrong.
+The problem (no memory relaxation during entire sort operation) requires
+a different approach (either only relax when we don't need to hold
+dope storage (as for SORT_TO/SORT_FROM/SORT_SUBJECT/+) or use heap
+memory for those allocations, then).
+
+s-nail-14_5_2-sort-alt.patch is an alternative working thesis that uses
+heap allocations, thus continues to relax the dope storage.
+This version has been pushed to [master].
+
+diff --git a/thread.c b/thread.c
+index 3ac5966..9ec1ac9 100644
+--- a/thread.c
++++ b/thread.c
+@@ -361,8 +361,6 @@ makethreads(struct message *m, long cnt, int nmail)
+ 		return;
+ 	mprime = nextprime(cnt);
+ 	mt = scalloc(mprime, sizeof *mt);
+-
+-	srelax_hold();
+ 	for (i = 0; i < cnt; i++) {
+ 		if ((m[i].m_flag&MHIDDEN) == 0) {
+ 			mlook(NULL, mt, &m[i], mprime);
+@@ -376,7 +374,6 @@ makethreads(struct message *m, long cnt, int nmail)
+ 		m[i].m_level = 0;
+ 		if (!nmail && !(inhook&2))
+ 			m[i].m_collapsed = 0;
+-		srelax();
+ 	}
+ 	/*
+ 	 * Most folders contain the eldest messages first. Traversing
+@@ -387,12 +384,8 @@ makethreads(struct message *m, long cnt, int nmail)
+ 	 * are replies to the one message, and are sorted such that
+ 	 * youngest messages occur first.
+ 	 */
+-	for (i = cnt-1; i >= 0; i--) {
++	for (i = cnt-1; i >= 0; i--)
+ 		lookup(&m[i], mt, mprime);
+-		srelax();
+-	}
+-	srelax_rele();
+-
+ 	threadroot = interlink(m, cnt, nmail);
+ 	finalize(threadroot);
+ 	free(mt);
+@@ -572,8 +565,6 @@ sort(void *vp)
+ 	default:
+ 		break;
+ 	}
+-
+-	srelax_hold();
+ 	for (n = 0, i = 0; i < msgCount; i++) {
+ 		mp = &message[i];
+ 		if ((mp->m_flag&MHIDDEN) == 0) {
+@@ -637,10 +628,7 @@ sort(void *vp)
+ 		mp->m_child = mp->m_younger = mp->m_elder = mp->m_parent = NULL;
+ 		mp->m_level = 0;
+ 		mp->m_collapsed = 0;
+-		srelax();
+ 	}
+-	srelax_rele();
+-
+ 	if (n > 0) {
+ 		qsort(ms, n, sizeof *ms, func);
+ 		threadroot = &message[ms[0].ms_n];

Copied: s-nail/repos/testing-x86_64/PKGBUILD (from rev 204884, s-nail/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2014-01-30 17:24:29 UTC (rev 204885)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: Stéphane Gaudreault <stephane at archlinux.org>
+# Contributor: Sergej Pupykin <pupykin.s at arch@gmail.com>
+# Contributor: Andreas Wagner <Andreas.Wagner at em.uni-frankfurt.de>
+
+pkgname=s-nail
+pkgver=14.5.2
+pkgrel=2
+pkgdesc='Mail processing system with a command syntax reminiscent of ed'
+url='http://sdaoden.users.sourceforge.net/code.html#s-nail'
+license=('custom:BSD')
+arch=('i686' 'x86_64')
+depends=('openssl')
+optdepends=('smtp-forwarder: for sending mail')
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver//./_}.tar.xz"
+        'sort.patch')
+sha1sums=('26ad43f5f41b429d5f13a3ce73a3dff75325950c'
+          '909da731e590d1d2877ed38bed667440a02d1259')
+
+groups=('base')
+backup=('etc/mail.rc')
+replaces=('mailx' 'mailx-heirloom' 'heirloom-mailx')
+provides=('mailx' 'mailx-heirloom' 'heirloom-mailx')
+conflicts=('mailx' 'mailx-heirloom' 'heirloom-mailx')
+
+prepare() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	patch -p1 -i ../sort.patch # http://sourceforge.net/mailarchive/message.php?msg_id=31906477
+}
+
+build() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make \
+		PREFIX=/usr \
+		SYSCONFDIR=/etc \
+		MANDIR=/usr/share/man \
+		MAILSPOOL=/var/spool/mail \
+		SID= NAIL=mail \
+		config
+
+	make build
+}
+
+check() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make test
+}
+
+package() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	make DESTDIR="${pkgdir}" packager-install
+	ln -sf mail "${pkgdir}"/usr/bin/mailx
+	ln -sf mail.1.gz "${pkgdir}"/usr/share/man/man1/mailx.1.gz
+	install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}

Copied: s-nail/repos/testing-x86_64/sort.patch (from rev 204884, s-nail/trunk/sort.patch)
===================================================================
--- testing-x86_64/sort.patch	                        (rev 0)
+++ testing-x86_64/sort.patch	2014-01-30 17:24:29 UTC (rev 204885)
@@ -0,0 +1,75 @@
+s-nail-14_5_2-sort.patch, 2014-01-30:
+
+Apply:
+  $ cd s-nail-14.5.2
+  $ patch -bu < s-nail-14_5_2-sort.patch
+
+Description:
+Reverses (sort(),thread(): use srelax()!, 2014-01-18, [a9b67e9]), which
+was a hasty commit of an untested diff that i've added few minutes
+beforehand.
+It was of course wrong.
+The problem (no memory relaxation during entire sort operation) requires
+a different approach (either only relax when we don't need to hold
+dope storage (as for SORT_TO/SORT_FROM/SORT_SUBJECT/+) or use heap
+memory for those allocations, then).
+
+s-nail-14_5_2-sort-alt.patch is an alternative working thesis that uses
+heap allocations, thus continues to relax the dope storage.
+This version has been pushed to [master].
+
+diff --git a/thread.c b/thread.c
+index 3ac5966..9ec1ac9 100644
+--- a/thread.c
++++ b/thread.c
+@@ -361,8 +361,6 @@ makethreads(struct message *m, long cnt, int nmail)
+ 		return;
+ 	mprime = nextprime(cnt);
+ 	mt = scalloc(mprime, sizeof *mt);
+-
+-	srelax_hold();
+ 	for (i = 0; i < cnt; i++) {
+ 		if ((m[i].m_flag&MHIDDEN) == 0) {
+ 			mlook(NULL, mt, &m[i], mprime);
+@@ -376,7 +374,6 @@ makethreads(struct message *m, long cnt, int nmail)
+ 		m[i].m_level = 0;
+ 		if (!nmail && !(inhook&2))
+ 			m[i].m_collapsed = 0;
+-		srelax();
+ 	}
+ 	/*
+ 	 * Most folders contain the eldest messages first. Traversing
+@@ -387,12 +384,8 @@ makethreads(struct message *m, long cnt, int nmail)
+ 	 * are replies to the one message, and are sorted such that
+ 	 * youngest messages occur first.
+ 	 */
+-	for (i = cnt-1; i >= 0; i--) {
++	for (i = cnt-1; i >= 0; i--)
+ 		lookup(&m[i], mt, mprime);
+-		srelax();
+-	}
+-	srelax_rele();
+-
+ 	threadroot = interlink(m, cnt, nmail);
+ 	finalize(threadroot);
+ 	free(mt);
+@@ -572,8 +565,6 @@ sort(void *vp)
+ 	default:
+ 		break;
+ 	}
+-
+-	srelax_hold();
+ 	for (n = 0, i = 0; i < msgCount; i++) {
+ 		mp = &message[i];
+ 		if ((mp->m_flag&MHIDDEN) == 0) {
+@@ -637,10 +628,7 @@ sort(void *vp)
+ 		mp->m_child = mp->m_younger = mp->m_elder = mp->m_parent = NULL;
+ 		mp->m_level = 0;
+ 		mp->m_collapsed = 0;
+-		srelax();
+ 	}
+-	srelax_rele();
+-
+ 	if (n > 0) {
+ 		qsort(ms, n, sizeof *ms, func);
+ 		threadroot = &message[ms[0].ms_n];




More information about the arch-commits mailing list