View | Details | Raw Unified | Return to bug 263205
Collapse All | Expand All

(-)b/security/sks/Makefile (-12 / +21 lines)
Lines 1-18 Link Here
1
PORTNAME=	sks
1
PORTNAME=	sks
2
PORTVERSION=	1.1.6
2
PORTVERSION=	1.1.6
3
PORTREVISION=	1
3
CATEGORIES=	security
4
CATEGORIES=	security
4
MASTER_SITES=	http://bitbucket.org/skskeyserver/sks-keyserver/downloads/
5
6
EXTRA_PATCHES=	${FILESDIR}/debian-bug-870150:-p1
7
5
8
MAINTAINER=	acm@FreeBSD.org
6
MAINTAINER=	acm@FreeBSD.org
9
COMMENT=	Synchronizing Key Server, a fast OpenPGP keyserver
7
COMMENT=	Synchronizing Key Server, a fast OpenPGP keyserver
10
8
11
LICENSE=	GPLv2+
9
LICENSE=	GPLv2+
12
10
13
USE_OCAML=	yes
11
BUILD_DEPENDS=	ocaml-num>0:devel/ocaml-num	\
14
USE_OCAML_CAMLP4=yes
12
		ocamlfind:devel/ocaml-findlib	\
13
		ocaml-cryptokit>0:security/ocaml-cryptokit
14
LIB_DEPENDS=	libgmp.so:math/gmp
15
RUN_DEPENDS=	ocaml-num>0:devel/ocaml-num	\
16
		ocaml-cryptokit>0:security/ocaml-cryptokit
17
18
USE_GITHUB=	yes
19
GH_ACCOUNT=	SKS-Keyserver
20
GH_PROJECT=	sks-keyserver
21
GH_TAGNAME=	c3ba6d5abb525dcb84745245631c410c11c07ec1
22
15
USES=		bdb:5 perl5 gmake shebangfix tar:tgz
23
USES=		bdb:5 perl5 gmake shebangfix tar:tgz
24
USE_OCAML=	yes
16
USE_PERL5=	build
25
USE_PERL5=	build
17
MAKE_JOBS_UNSAFE=yes
26
MAKE_JOBS_UNSAFE=yes
18
SHEBANG_FILES=	sks_build.sh
27
SHEBANG_FILES=	sks_build.sh
Lines 24-41 MAKE_ENV= BDBINCLUDE="-I${BDB_INCLUDE_DIR}" \ Link Here
24
33
25
SUB_FILES=	pkg-message
34
SUB_FILES=	pkg-message
26
35
27
OPTIONS_DEFINE=	DOCS
36
OPTIONS_DEFINE=	DOCS EXAMPLES
37
PORTEXAMPLES=	*
28
38
29
post-extract:
39
post-extract:
30
	@: > ${WRKSRC}/Makefile.local
40
	@: > ${WRKSRC}/Makefile.local
31
	@${REINPLACE_CMD} 's/-ccopt -pg //' ${WRKSRC}/Makefile
32
	@cd ${WRKSRC} && ${RM} .depend
41
	@cd ${WRKSRC} && ${RM} .depend
33
42
34
post-patch:
35
	@${REINPLACE_CMD} -e '/^CC=/d; /^CFLAGS=/s/=/+=/' ${WRKSRC}/bdb/Makefile
36
	@${REINPLACE_CMD} -E '/^\+OCAML(C|OPT)=/s,$$, -unsafe-string,' \
37
		${WRKSRC}/cryptokit-1.7-sks.patch
38
39
pre-build:
43
pre-build:
40
	@cd ${WRKSRC} && test -f .depend || ${MAKE_CMD} dep
44
	@cd ${WRKSRC} && test -f .depend || ${MAKE_CMD} dep
41
45
Lines 43-48 post-install: Link Here
43
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
47
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
44
	cd ${WRKSRC} && ${INSTALL_DATA} BUGS README.md TODO UPGRADING \
48
	cd ${WRKSRC} && ${INSTALL_DATA} BUGS README.md TODO UPGRADING \
45
		 ${STAGEDIR}${DOCSDIR}
49
		 ${STAGEDIR}${DOCSDIR}
50
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
51
	${CP} -R ${WRKSRC}/sampleWeb/* ${STAGEDIR}${EXAMPLESDIR}
46
	@cd ${STAGEDIR}${PREFIX}/bin && ${STRIP_CMD} sks sks_add_mail
52
	@cd ${STAGEDIR}${PREFIX}/bin && ${STRIP_CMD} sks sks_add_mail
47
53
54
do-test:
55
	(cd ${WRKSRC} && ./sks unit_test)
56
48
.include <bsd.port.mk>
57
.include <bsd.port.mk>
(-)b/security/sks/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1493574628
1
TIMESTAMP = 1649593463
2
SHA256 (sks-1.1.6.tgz) = 22312dbec6dfd372932075b0b0b1d04f772059a9520faa4937feafc737d5a632
2
SHA256 (SKS-Keyserver-sks-keyserver-1.1.6-c3ba6d5abb525dcb84745245631c410c11c07ec1_GH0.tar.gz) = dc4e864ce50185aac9ae009f204a5584b7b2c14911c24c4810d074bef3558690
3
SIZE (sks-1.1.6.tgz) = 359499
3
SIZE (SKS-Keyserver-sks-keyserver-1.1.6-c3ba6d5abb525dcb84745245631c410c11c07ec1_GH0.tar.gz) = 213799
(-)a/security/sks/files/debian-bug-870150 (-144 lines)
Removed Link Here
1
Description: Fix FTBFS with OCaml 4.05.0
2
Author: Stephane Glondu <glondu@debian.org>
3
Bug-Debian: https://bugs.debian.org/870150
4
Last-Update: 2017-08-01
5
6
--- sks-1.1.6.orig/eventloop.ml
7
+++ sks-1.1.6/eventloop.ml
8
@@ -26,6 +26,7 @@ open MoreLabels
9
 open Printf
10
 open Common
11
 open Packet
12
+let unix_socket = Unix.socket
13
 module Unix = UnixLabels
14
 open Unix
15
 
16
@@ -129,7 +130,7 @@ let create_sock addr =
17
     let domain =
18
       Unix.domain_of_sockaddr addr in
19
     let sock =
20
-      socket ~domain ~kind:SOCK_STREAM ~protocol:0 in
21
+      unix_socket domain SOCK_STREAM 0 in
22
     setsockopt sock SO_REUSEADDR true;
23
     if domain = PF_INET6 then
24
       setsockopt sock IPV6_ONLY true;
25
--- sks-1.1.6.orig/reconComm.ml
26
+++ sks-1.1.6/reconComm.ml
27
@@ -26,6 +26,7 @@ open Printf
28
 open Common
29
 open Packet
30
 
31
+let unix_socket = Unix.socket
32
 module Unix = UnixLabels
33
 module Map = PMap.Map
34
 
35
@@ -37,10 +38,10 @@ open DbMessages
36
 
37
 (** send DbMessages message and wait for response *)
38
 let send_dbmsg msg =
39
-  let s = Unix.socket
40
-            ~domain:(Unix.domain_of_sockaddr db_command_addr)
41
-            ~kind:Unix.SOCK_STREAM
42
-            ~protocol:0 in
43
+  let s = unix_socket
44
+            (Unix.domain_of_sockaddr db_command_addr)
45
+            Unix.SOCK_STREAM
46
+            0 in
47
   protect ~f:(fun () ->
48
                 Unix.connect s ~addr:db_command_addr;
49
                 let cin = Channel.sys_in_from_fd s in
50
@@ -54,10 +55,10 @@ let send_dbmsg msg =
51
 
52
 (** send DbMessages message, don't wait for response *)
53
 let send_dbmsg_noreply msg =
54
-  let s = Unix.socket
55
-            ~domain:(Unix.domain_of_sockaddr db_command_addr)
56
-            ~kind:Unix.SOCK_STREAM
57
-            ~protocol:0 in
58
+  let s = unix_socket
59
+            (Unix.domain_of_sockaddr db_command_addr)
60
+            Unix.SOCK_STREAM
61
+            0 in
62
   protect ~f:(fun () ->
63
                 Unix.connect s ~addr:db_command_addr;
64
                 let cout = Channel.sys_out_from_fd s in
65
@@ -75,10 +76,10 @@ let is_content_type line =
66
 let http_status_ok_regexp = Str.regexp "^HTTP/[0-9]+\\.[0-9]+ 2"
67
 
68
 let get_keystrings_via_http addr hashes =
69
-  let s = Unix.socket
70
-            ~domain:(Unix.domain_of_sockaddr addr)
71
-            ~kind:Unix.SOCK_STREAM
72
-            ~protocol:0  in
73
+  let s = unix_socket
74
+            (Unix.domain_of_sockaddr addr)
75
+            Unix.SOCK_STREAM
76
+            0  in
77
   protect ~f:(fun () ->
78
                 Unix.bind s ~addr:(match_client_recon_addr addr);
79
                 Unix.connect s ~addr;
80
--- sks-1.1.6.orig/sks_do.ml
81
+++ sks-1.1.6/sks_do.ml
82
@@ -27,6 +27,7 @@ open Printf
83
 open Common
84
 open Packet
85
 open DbMessages
86
+let unix_socket = Unix.socket
87
 module Unix = UnixLabels
88
 module PTree = PrefixTree
89
 module Map = PMap.Map
90
@@ -37,10 +38,10 @@ let fail reason =
91
   exit (-1)
92
 
93
 let send_dbmsg msg =
94
-  let s = Unix.socket
95
-            ~domain:(Unix.domain_of_sockaddr db_command_addr)
96
-            ~kind:Unix.SOCK_STREAM
97
-            ~protocol:0 in
98
+  let s = unix_socket
99
+            (Unix.domain_of_sockaddr db_command_addr)
100
+            Unix.SOCK_STREAM
101
+            0 in
102
   protect ~f:(fun () ->
103
                 Unix.connect s ~addr:db_command_addr;
104
                 let cin = Channel.sys_in_from_fd s in
105
--- sks-1.1.6.orig/tester.ml
106
+++ sks-1.1.6/tester.ml
107
@@ -26,6 +26,7 @@ open Printf
108
 open Common
109
 open Packet
110
 open DbMessages
111
+let unix_socket = Unix.socket
112
 module Unix = UnixLabels
113
 
114
 let settings = {
115
@@ -46,10 +47,10 @@ module Keydb = Keydb.Safe
116
 
117
 
118
 let send_msg addr msg =
119
-  let s = Unix.socket
120
-            ~domain:(Unix.domain_of_sockaddr addr)
121
-            ~kind:Unix.SOCK_STREAM
122
-            ~protocol:0 in
123
+  let s = unix_socket
124
+            (Unix.domain_of_sockaddr addr)
125
+            Unix.SOCK_STREAM
126
+            0 in
127
   protect ~f:( fun () ->
128
                  Unix.connect s ~addr:addr;
129
                  let cin = Channel.sys_in_from_fd s
130
@@ -62,10 +63,10 @@ let send_msg addr msg =
131
     ~finally:(fun () -> Unix.close s)
132
 
133
 let send_msg_noreply addr msg =
134
-  let s = Unix.socket
135
-            ~domain:(Unix.domain_of_sockaddr addr)
136
-            ~kind:Unix.SOCK_STREAM
137
-            ~protocol:0 in
138
+  let s = unix_socket
139
+            (Unix.domain_of_sockaddr addr)
140
+            Unix.SOCK_STREAM
141
+            0 in
142
   protect ~f:(fun () ->
143
                 Unix.connect s ~addr:addr;
144
                 let cout = Channel.sys_out_from_fd s in
(-)a/security/sks/files/patch-Makefile (-58 lines)
Removed Link Here
1
--- Makefile.orig	2021-09-05 17:11:36 UTC
2
+++ Makefile
3
@@ -15,16 +15,15 @@
4
 #   USA
5
 #
6
 CINCLUDES=-I`ocamlc -where`
7
-CC=gcc
8
 CXX=g++
9
-CFLAGS=-O3 -Werror-implicit-function-declaration $(CINCLUDES) -I .
10
+CFLAGS+=-O3 -Werror-implicit-function-declaration $(CINCLUDES) -I .
11
 CXXFLAGS=-O3 $(CINCLUDES) -I .
12
 
13
 ifndef OCAMLC
14
 	OCAMLC=ocamlc
15
 endif
16
 ifndef OCAMLOPT
17
-	OCAMLOPT=ocamlopt
18
+	OCAMLOPT=ocamlopt -unsafe-string
19
 endif
20
 ifndef CAMLP4O
21
 	CAMLP4O=camlp4o
22
@@ -135,16 +134,16 @@ keyMerge.cmx: keyMerge.ml
23
 # Special targets
24
 
25
 install:
26
-	mkdir -p $(PREFIX)/bin
27
-	install sks_build.sh sks sks_add_mail $(PREFIX)/bin
28
-	mkdir -p $(MANDIR)/man8
29
-	install sks.8.gz $(MANDIR)/man8
30
+	mkdir -p $(DESTDIR)$(PREFIX)/bin
31
+	install sks_build.sh sks sks_add_mail $(DESTDIR)$(PREFIX)/bin
32
+	mkdir -p $(DESTDIR)$(MANDIR)/man8
33
+	install sks.8.gz $(DESTDIR)$(MANDIR)/man8
34
 
35
 install.bc:
36
-	mkdir -p $(PREFIX)/bin
37
-	install sks_build.bc.sh sks.bc sks_add_mail.bc $(PREFIX)/bin
38
-	mkdir -p $(MANDIR)/man8
39
-	install sks.8.gz $(MANDIR)/man8
40
+	mkdir -p $(DESTDIR)$(PREFIX)/bin
41
+	install sks_build.bc.sh sks.bc sks_add_mail.bc $(DESTDIR)$(PREFIX)/bin
42
+	mkdir -p $(DESTDIR)$(MANDIR)/man8
43
+	install sks.8.gz $(DESTDIR)$(MANDIR)/man8
44
 
45
 
46
 Makefile.local:
47
@@ -285,8 +284,9 @@ CKDIR=$(CKVER)/src
48
 
49
 $(CKVER)/README.txt:
50
 	tar xmvfz $(CKVER).tar.gz
51
-	patch -p 0 < $(CKVER)-sks.patch
52
-	patch -p 0 < $(CKVER)-sks-custom_compare.patch
53
+	patch -p0 < $(CKVER)-sks.patch
54
+	patch -p0 < $(CKVER)-sks-custom_compare.patch
55
+	sed -i.bak -e 's,uint32,&_t,' $(CKDIR)/stubs-md5.c
56
 
57
 $(CKDIR)/cryptokit.cma: $(CKVER)/README.txt
58
 	cd $(CKDIR) && $(MAKE) all
(-)b/security/sks/pkg-descr (-2 / +1 lines)
Lines 10-13 Refer to the online references for pointers on downloading a full copy of Link Here
10
the public PGP databse (about 2Gb) and on tweaking the your configuration.
10
the public PGP databse (about 2Gb) and on tweaking the your configuration.
11
http://www.keysigning.org/sks/ may help you getting started.
11
http://www.keysigning.org/sks/ may help you getting started.
12
12
13
WWW: https://bitbucket.org/skskeyserver/sks-keyserver/
13
WWW: https://github.com/SKS-Keyserver/sks-keyserver
14
- 

Return to bug 263205