Update: mail/hashcash 1.20

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Update: mail/hashcash 1.20

Armin Wolfermann
Update to hashcash 1.20, some minor fixes. Now without installing the
legacy sha1 program like discussed (but not committed) before.

Tested on i386.


Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/hashcash/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- Makefile 16 Jun 2005 17:35:22 -0000 1.1.1.1
+++ Makefile 21 Dec 2005 12:57:14 -0000
@@ -2,7 +2,7 @@
 
 COMMENT= "hashcash anti-spam / denial of service counter-measure tool"
 
-DISTNAME= hashcash-1.17
+DISTNAME= hashcash-1.20
 CATEGORIES=     mail
 
 HOMEPAGE= http://www.hashcash.org/
Index: distinfo
===================================================================
RCS file: /cvs/ports/mail/hashcash/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo 16 Jun 2005 17:35:22 -0000 1.1.1.1
+++ distinfo 21 Dec 2005 12:57:14 -0000
@@ -1,4 +1,4 @@
-MD5 (hashcash-1.17.tgz) = 9e5a8a35941c0cdccac93f41bd943593
-RMD160 (hashcash-1.17.tgz) = da50fa2bd609543614d6845e8cc78fd7f268e690
-SHA1 (hashcash-1.17.tgz) = bf77149d5911bda2b59745a76c2df3b7ff0f1701
-SIZE (hashcash-1.17.tgz) = 185522
+MD5 (hashcash-1.20.tgz) = b8b94c9e7ada3006f8fe26c3084ae162
+RMD160 (hashcash-1.20.tgz) = eddad1528bebf57bc2ae8442aa0f4fb832dee69a
+SHA1 (hashcash-1.20.tgz) = 24259265afa8282d9632ba2925cb6c344eb148f2
+SIZE (hashcash-1.20.tgz) = 193694
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/mail/hashcash/patches/patch-Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-Makefile
--- patches/patch-Makefile 16 Jun 2005 17:35:22 -0000 1.1.1.1
+++ patches/patch-Makefile 21 Dec 2005 12:57:14 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-Makefile,v 1.1.1.1 2005/06/16 17:35:22 niallo Exp $
---- Makefile.orig Wed Mar 30 12:27:47 2005
-+++ Makefile Sat Jun 11 11:03:15 2005
-@@ -2,9 +2,9 @@ HC_VERS = 1.17
+--- Makefile.orig Tue Dec 20 22:54:48 2005
++++ Makefile Wed Dec 21 13:39:55 2005
+@@ -2,9 +2,9 @@ HC_VERS = 1.20
  CHANGEME1 = 1 # put PACKAGER = EBUILD|RPM etc here
  CHANGEME2 = 2
  CHANGEME3 = 3
@@ -14,7 +14,37 @@
  MAKEDEPEND = makedepend
  MSLIB = mslib
  # here you can choose the regexp style your system has
-@@ -130,7 +130,8 @@ all: $(EXES)
+@@ -16,9 +16,9 @@ MSLIB = mslib
+ # REGEXP =
+ REGEXP=-DREGEXP_POSIX
+ COPT_DEBUG = -g
+-COPT_GENERIC = -O3
++COPT_GENERIC =
+ COPT_GNU = -O3 -funroll-loops
+-COPT_X86 = -O3 -funroll-loops -march=pentium-mmx -mmmx \
++COPT_X86 = -funroll-loops -march=pentium-mmx -mmmx \
+ -D_REENTRANT -D_THREAD_SAFE -fPIC
+ COPT_MINGW = -O3 -funroll-loops -march=pentium-mmx -mmmx \
+         -D_REENTRANT -D_THREAD_SAFE
+@@ -28,7 +28,7 @@ COPT_PPC_LINUX = -O3 -funroll-loops -fno
+ LIB=.a
+ # request static link of -lcrypto only
+ LIBCRYPTO=/usr/lib/libcrypto.a
+-EXES = hashcash$(EXE) sha1$(EXE) sha1test$(EXE)
++EXES = hashcash$(EXE)
+ INSTALL = install
+ POD2MAN = pod2man
+ POD2HTML = pod2html
+@@ -109,7 +109,7 @@ debug-openssl:
+ $(MAKE) debug "CFLAGS=$(CFLAGS) -DOPENSSL" "LDFLAGS=$(LDFLAGS) $(LIBCRYPTO)"
+
+
+-build: hashcash$(EXE) sha1$(EXE)
++build: hashcash$(EXE)
+
+ build-dll:      hashcash-dll$(EXE) sha1$(EXE)
+
+@@ -132,7 +132,8 @@ all: $(EXES)
 
  libhashcash$(LIB): $(LIBOBJS)
  $(DELETE) $@
@@ -24,18 +54,20 @@
 
  hashcash.dll:   $(LIBOBJS)
  $(CC) -shared -o hashcash.dll $(LIBOBJS) \
-@@ -161,12 +162,10 @@ sha1-hashcash.txt: sha1-hashcash.pod
+@@ -162,13 +163,11 @@ sha1-hashcash.html: sha1-hashcash.pod
+ sha1-hashcash.txt: sha1-hashcash.pod
  $(POD2TEXT) $? > $@
 
- install: hashcash sha1 hashcash.1 sha1-hashcash.1
+-install: hashcash sha1 hashcash.1 sha1-hashcash.1
 - $(INSTALL) -d $(INSTALL_PATH)
 - $(INSTALL) hashcash sha1 $(INSTALL_PATH)
 - $(INSTALL) -d $(MAN_INSTALL_PATH)
 - $(INSTALL) -m 644 hashcash.1 sha1-hashcash.1 $(MAN_INSTALL_PATH)
 - $(INSTALL) -d $(DOC_INSTALL_PATH)
 - $(INSTALL) -m 644 README LICENSE CHANGELOG $(DOC_INSTALL_PATH)
-+ $(BSD_INSTALL_PROGRAM) hashcash sha1 $(INSTALL_PATH)
-+ $(BSD_INSTALL_MAN) hashcash.1 sha1-hashcash.1 $(MAN_INSTALL_PATH)
++install: hashcash hashcash.1
++ $(BSD_INSTALL_PROGRAM) hashcash $(INSTALL_PATH)
++ $(BSD_INSTALL_MAN) hashcash.1 $(MAN_INSTALL_PATH)
 + $(BSD_INSTALL_DATA_DIR) $(DOC_INSTALL_PATH)
 + $(BSD_INSTALL_DATA) README LICENSE CHANGELOG $(DOC_INSTALL_PATH)
 
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/mail/hashcash/pkg/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- pkg/PLIST 13 Aug 2005 18:19:31 -0000 1.2
+++ pkg/PLIST 21 Dec 2005 12:57:14 -0000
@@ -1,8 +1,6 @@
 @comment $OpenBSD: PLIST,v 1.2 2005/08/13 18:19:31 espie Exp $
 bin/hashcash
-bin/sha1
 @man man/man1/hashcash.1
-@man man/man1/sha1-hashcash.1
 share/doc/hashcash/
 share/doc/hashcash/README
 share/doc/hashcash/LICENSE

Reply | Threaded
Open this post in threaded view
|

Re: Update: mail/hashcash 1.20

steven mestdagh
On Wed, Dec 21, 2005 at 02:46:55PM +0100, Armin Wolfermann wrote:

> Update to hashcash 1.20, some minor fixes. Now without installing the
> legacy sha1 program like discussed (but not committed) before.
>
> Tested on i386.
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/mail/hashcash/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 Makefile
> --- Makefile 16 Jun 2005 17:35:22 -0000 1.1.1.1
> +++ Makefile 21 Dec 2005 12:57:14 -0000
> @@ -2,7 +2,7 @@
>  
>  COMMENT= "hashcash anti-spam / denial of service counter-measure tool"
>  
> -DISTNAME= hashcash-1.17
> +DISTNAME= hashcash-1.20
>  CATEGORIES=     mail
>  
>  HOMEPAGE= http://www.hashcash.org/
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/mail/hashcash/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 distinfo
> --- distinfo 16 Jun 2005 17:35:22 -0000 1.1.1.1
> +++ distinfo 21 Dec 2005 12:57:14 -0000
> @@ -1,4 +1,4 @@
> -MD5 (hashcash-1.17.tgz) = 9e5a8a35941c0cdccac93f41bd943593
> -RMD160 (hashcash-1.17.tgz) = da50fa2bd609543614d6845e8cc78fd7f268e690
> -SHA1 (hashcash-1.17.tgz) = bf77149d5911bda2b59745a76c2df3b7ff0f1701
> -SIZE (hashcash-1.17.tgz) = 185522
> +MD5 (hashcash-1.20.tgz) = b8b94c9e7ada3006f8fe26c3084ae162
> +RMD160 (hashcash-1.20.tgz) = eddad1528bebf57bc2ae8442aa0f4fb832dee69a
> +SHA1 (hashcash-1.20.tgz) = 24259265afa8282d9632ba2925cb6c344eb148f2
> +SIZE (hashcash-1.20.tgz) = 193694
> Index: patches/patch-Makefile
> ===================================================================
> RCS file: /cvs/ports/mail/hashcash/patches/patch-Makefile,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 patch-Makefile
> --- patches/patch-Makefile 16 Jun 2005 17:35:22 -0000 1.1.1.1
> +++ patches/patch-Makefile 21 Dec 2005 12:57:14 -0000
> @@ -1,7 +1,7 @@
>  $OpenBSD: patch-Makefile,v 1.1.1.1 2005/06/16 17:35:22 niallo Exp $
> ---- Makefile.orig Wed Mar 30 12:27:47 2005
> -+++ Makefile Sat Jun 11 11:03:15 2005
> -@@ -2,9 +2,9 @@ HC_VERS = 1.17
> +--- Makefile.orig Tue Dec 20 22:54:48 2005
> ++++ Makefile Wed Dec 21 13:39:55 2005
> +@@ -2,9 +2,9 @@ HC_VERS = 1.20
>   CHANGEME1 = 1 # put PACKAGER = EBUILD|RPM etc here
>   CHANGEME2 = 2
>   CHANGEME3 = 3
> @@ -14,7 +14,37 @@
>   MAKEDEPEND = makedepend
>   MSLIB = mslib
>   # here you can choose the regexp style your system has
> -@@ -130,7 +130,8 @@ all: $(EXES)
> +@@ -16,9 +16,9 @@ MSLIB = mslib
> + # REGEXP =
> + REGEXP=-DREGEXP_POSIX
> + COPT_DEBUG = -g
> +-COPT_GENERIC = -O3
> ++COPT_GENERIC =
> + COPT_GNU = -O3 -funroll-loops
> +-COPT_X86 = -O3 -funroll-loops -march=pentium-mmx -mmmx \
> ++COPT_X86 = -funroll-loops -march=pentium-mmx -mmmx \

how about skipping the mmx stuff?  maybe we should just build the
"generic" target on all archs in the port's Makefile? or is there a good
reason to do this kind of arch-specific optimization?

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

Reply | Threaded
Open this post in threaded view
|

Re: Update: mail/hashcash 1.20

Armin Wolfermann
* steven mestdagh <[hidden email]> [22.12.2005 09:58]:
> how about skipping the mmx stuff?  maybe we should just build the
> "generic" target on all archs in the port's Makefile? or is there a good
> reason to do this kind of arch-specific optimization?

I don't see a common position on arch-specific optimization. Some ports
do it, some don't, some use a flavor. As speed is essential for hashcash
it seems reasonable to keep it in.

Regards,
Armin Wolfermann

Reply | Threaded
Open this post in threaded view
|

Re: Update: mail/hashcash 1.20

Jacob Meuser
On Thu, Dec 22, 2005 at 11:38:23AM +0100, Armin Wolfermann wrote:
> * steven mestdagh <[hidden email]> [22.12.2005 09:58]:
> > how about skipping the mmx stuff?  maybe we should just build the
> > "generic" target on all archs in the port's Makefile? or is there a good
> > reason to do this kind of arch-specific optimization?
>
> I don't see a common position on arch-specific optimization. Some ports
> do it, some don't, some use a flavor. As speed is essential for hashcash
> it seems reasonable to keep it in.

do you have a pointer to benchmarks with and without those options?

in general, mmx code is allowed.  I'm not so sure about -mtune,
though, except as a flavor.  I don't think it is an issue in this
case though, since we already allow mmx, unless of course it exposes
a gcc bug.

--
<[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: Update: mail/hashcash 1.20

Armin Wolfermann
* Jacob Meuser <[hidden email]> [22.12.2005 12:06]:
> do you have a pointer to benchmarks with and without those options?

Running hashcash -sv takes a benchmark with all included cores. On my
P4 the improvement is 44 percent.

> in general, mmx code is allowed.  I'm not so sure about -mtune,
> though, except as a flavor.  I don't think it is an issue in this
> case though, since we already allow mmx, unless of course it exposes
> a gcc bug.

I checked the resulting binary on P4, P3, Athlon and ElanSC520. Maybe
someone can throw in some more i386 architectures.

Regards,
Armin Wolfermann