FreeBSD Bugzilla – Attachment 233132 Details for
Bug 263205
security/sks: chase OCaml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Chase the upgrade of OCaml
security_sks.diff (text/plain), 10.45 KB, created by
Thierry Thomas
on 2022-04-10 18:27:44 UTC
(
hide
)
Description:
Chase the upgrade of OCaml
Filename:
MIME Type:
Creator:
Thierry Thomas
Created:
2022-04-10 18:27:44 UTC
Size:
10.45 KB
patch
obsolete
>From 1eacc94f53b04cc9cb0d20063ef8e5dea20979f4 Mon Sep 17 00:00:00 2001 >From: Thierry Thomas <thierry@FreeBSD.org> >Date: Sun, 10 Apr 2022 14:40:12 +0200 >Subject: [PATCH] security/sks: chase OCaml >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Fix failure reported in PR 262781 against a recent OCaml. > >Since Iâm there, also add the examples and a test target. > >Notes: >1) Upstream moved to GitHub. >2) 1.1.6 is pretty old, and nothing newer has been released: just use a > recent snapshot. >--- > security/sks/Makefile | 33 +++--- > security/sks/distinfo | 6 +- > security/sks/files/debian-bug-870150 | 144 --------------------------- > security/sks/files/patch-Makefile | 58 ----------- > security/sks/pkg-descr | 2 +- > 5 files changed, 25 insertions(+), 218 deletions(-) > delete mode 100644 security/sks/files/debian-bug-870150 > delete mode 100644 security/sks/files/patch-Makefile > >diff --git a/security/sks/Makefile b/security/sks/Makefile >index 823a8822b3e4..5d1e423ff81d 100644 >--- a/security/sks/Makefile >+++ b/security/sks/Makefile >@@ -1,18 +1,27 @@ > PORTNAME= sks > PORTVERSION= 1.1.6 >+PORTREVISION= 1 > CATEGORIES= security >-MASTER_SITES= http://bitbucket.org/skskeyserver/sks-keyserver/downloads/ >- >-EXTRA_PATCHES= ${FILESDIR}/debian-bug-870150:-p1 > > MAINTAINER= acm@FreeBSD.org > COMMENT= Synchronizing Key Server, a fast OpenPGP keyserver > > LICENSE= GPLv2+ > >-USE_OCAML= yes >-USE_OCAML_CAMLP4=yes >+BUILD_DEPENDS= ocaml-num>0:devel/ocaml-num \ >+ ocamlfind:devel/ocaml-findlib \ >+ ocaml-cryptokit>0:security/ocaml-cryptokit >+LIB_DEPENDS= libgmp.so:math/gmp >+RUN_DEPENDS= ocaml-num>0:devel/ocaml-num \ >+ ocaml-cryptokit>0:security/ocaml-cryptokit >+ >+USE_GITHUB= yes >+GH_ACCOUNT= SKS-Keyserver >+GH_PROJECT= sks-keyserver >+GH_TAGNAME= c3ba6d5abb525dcb84745245631c410c11c07ec1 >+ > USES= bdb:5 perl5 gmake shebangfix tar:tgz >+USE_OCAML= yes > USE_PERL5= build > MAKE_JOBS_UNSAFE=yes > SHEBANG_FILES= sks_build.sh >@@ -24,18 +33,13 @@ MAKE_ENV= BDBINCLUDE="-I${BDB_INCLUDE_DIR}" \ > > SUB_FILES= pkg-message > >-OPTIONS_DEFINE= DOCS >+OPTIONS_DEFINE= DOCS EXAMPLES >+PORTEXAMPLES= * > > post-extract: > @: > ${WRKSRC}/Makefile.local >- @${REINPLACE_CMD} 's/-ccopt -pg //' ${WRKSRC}/Makefile > @cd ${WRKSRC} && ${RM} .depend > >-post-patch: >- @${REINPLACE_CMD} -e '/^CC=/d; /^CFLAGS=/s/=/+=/' ${WRKSRC}/bdb/Makefile >- @${REINPLACE_CMD} -E '/^\+OCAML(C|OPT)=/s,$$, -unsafe-string,' \ >- ${WRKSRC}/cryptokit-1.7-sks.patch >- > pre-build: > @cd ${WRKSRC} && test -f .depend || ${MAKE_CMD} dep > >@@ -43,6 +47,11 @@ post-install: > @${MKDIR} ${STAGEDIR}${DOCSDIR} > cd ${WRKSRC} && ${INSTALL_DATA} BUGS README.md TODO UPGRADING \ > ${STAGEDIR}${DOCSDIR} >+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} >+ ${CP} -R ${WRKSRC}/sampleWeb/* ${STAGEDIR}${EXAMPLESDIR} > @cd ${STAGEDIR}${PREFIX}/bin && ${STRIP_CMD} sks sks_add_mail > >+do-test: >+ (cd ${WRKSRC} && ./sks unit_test) >+ > .include <bsd.port.mk> >diff --git a/security/sks/distinfo b/security/sks/distinfo >index 7ed848810287..6c64ee670942 100644 >--- a/security/sks/distinfo >+++ b/security/sks/distinfo >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1493574628 >-SHA256 (sks-1.1.6.tgz) = 22312dbec6dfd372932075b0b0b1d04f772059a9520faa4937feafc737d5a632 >-SIZE (sks-1.1.6.tgz) = 359499 >+TIMESTAMP = 1649593463 >+SHA256 (SKS-Keyserver-sks-keyserver-1.1.6-c3ba6d5abb525dcb84745245631c410c11c07ec1_GH0.tar.gz) = dc4e864ce50185aac9ae009f204a5584b7b2c14911c24c4810d074bef3558690 >+SIZE (SKS-Keyserver-sks-keyserver-1.1.6-c3ba6d5abb525dcb84745245631c410c11c07ec1_GH0.tar.gz) = 213799 >diff --git a/security/sks/files/debian-bug-870150 b/security/sks/files/debian-bug-870150 >deleted file mode 100644 >index e8dbca5296b8..000000000000 >--- a/security/sks/files/debian-bug-870150 >+++ /dev/null >@@ -1,144 +0,0 @@ >-Description: Fix FTBFS with OCaml 4.05.0 >-Author: Stephane Glondu <glondu@debian.org> >-Bug-Debian: https://bugs.debian.org/870150 >-Last-Update: 2017-08-01 >- >---- sks-1.1.6.orig/eventloop.ml >-+++ sks-1.1.6/eventloop.ml >-@@ -26,6 +26,7 @@ open MoreLabels >- open Printf >- open Common >- open Packet >-+let unix_socket = Unix.socket >- module Unix = UnixLabels >- open Unix >- >-@@ -129,7 +130,7 @@ let create_sock addr = >- let domain = >- Unix.domain_of_sockaddr addr in >- let sock = >-- socket ~domain ~kind:SOCK_STREAM ~protocol:0 in >-+ unix_socket domain SOCK_STREAM 0 in >- setsockopt sock SO_REUSEADDR true; >- if domain = PF_INET6 then >- setsockopt sock IPV6_ONLY true; >---- sks-1.1.6.orig/reconComm.ml >-+++ sks-1.1.6/reconComm.ml >-@@ -26,6 +26,7 @@ open Printf >- open Common >- open Packet >- >-+let unix_socket = Unix.socket >- module Unix = UnixLabels >- module Map = PMap.Map >- >-@@ -37,10 +38,10 @@ open DbMessages >- >- (** send DbMessages message and wait for response *) >- let send_dbmsg msg = >-- let s = Unix.socket >-- ~domain:(Unix.domain_of_sockaddr db_command_addr) >-- ~kind:Unix.SOCK_STREAM >-- ~protocol:0 in >-+ let s = unix_socket >-+ (Unix.domain_of_sockaddr db_command_addr) >-+ Unix.SOCK_STREAM >-+ 0 in >- protect ~f:(fun () -> >- Unix.connect s ~addr:db_command_addr; >- let cin = Channel.sys_in_from_fd s in >-@@ -54,10 +55,10 @@ let send_dbmsg msg = >- >- (** send DbMessages message, don't wait for response *) >- let send_dbmsg_noreply msg = >-- let s = Unix.socket >-- ~domain:(Unix.domain_of_sockaddr db_command_addr) >-- ~kind:Unix.SOCK_STREAM >-- ~protocol:0 in >-+ let s = unix_socket >-+ (Unix.domain_of_sockaddr db_command_addr) >-+ Unix.SOCK_STREAM >-+ 0 in >- protect ~f:(fun () -> >- Unix.connect s ~addr:db_command_addr; >- let cout = Channel.sys_out_from_fd s in >-@@ -75,10 +76,10 @@ let is_content_type line = >- let http_status_ok_regexp = Str.regexp "^HTTP/[0-9]+\\.[0-9]+ 2" >- >- let get_keystrings_via_http addr hashes = >-- let s = Unix.socket >-- ~domain:(Unix.domain_of_sockaddr addr) >-- ~kind:Unix.SOCK_STREAM >-- ~protocol:0 in >-+ let s = unix_socket >-+ (Unix.domain_of_sockaddr addr) >-+ Unix.SOCK_STREAM >-+ 0 in >- protect ~f:(fun () -> >- Unix.bind s ~addr:(match_client_recon_addr addr); >- Unix.connect s ~addr; >---- sks-1.1.6.orig/sks_do.ml >-+++ sks-1.1.6/sks_do.ml >-@@ -27,6 +27,7 @@ open Printf >- open Common >- open Packet >- open DbMessages >-+let unix_socket = Unix.socket >- module Unix = UnixLabels >- module PTree = PrefixTree >- module Map = PMap.Map >-@@ -37,10 +38,10 @@ let fail reason = >- exit (-1) >- >- let send_dbmsg msg = >-- let s = Unix.socket >-- ~domain:(Unix.domain_of_sockaddr db_command_addr) >-- ~kind:Unix.SOCK_STREAM >-- ~protocol:0 in >-+ let s = unix_socket >-+ (Unix.domain_of_sockaddr db_command_addr) >-+ Unix.SOCK_STREAM >-+ 0 in >- protect ~f:(fun () -> >- Unix.connect s ~addr:db_command_addr; >- let cin = Channel.sys_in_from_fd s in >---- sks-1.1.6.orig/tester.ml >-+++ sks-1.1.6/tester.ml >-@@ -26,6 +26,7 @@ open Printf >- open Common >- open Packet >- open DbMessages >-+let unix_socket = Unix.socket >- module Unix = UnixLabels >- >- let settings = { >-@@ -46,10 +47,10 @@ module Keydb = Keydb.Safe >- >- >- let send_msg addr msg = >-- let s = Unix.socket >-- ~domain:(Unix.domain_of_sockaddr addr) >-- ~kind:Unix.SOCK_STREAM >-- ~protocol:0 in >-+ let s = unix_socket >-+ (Unix.domain_of_sockaddr addr) >-+ Unix.SOCK_STREAM >-+ 0 in >- protect ~f:( fun () -> >- Unix.connect s ~addr:addr; >- let cin = Channel.sys_in_from_fd s >-@@ -62,10 +63,10 @@ let send_msg addr msg = >- ~finally:(fun () -> Unix.close s) >- >- let send_msg_noreply addr msg = >-- let s = Unix.socket >-- ~domain:(Unix.domain_of_sockaddr addr) >-- ~kind:Unix.SOCK_STREAM >-- ~protocol:0 in >-+ let s = unix_socket >-+ (Unix.domain_of_sockaddr addr) >-+ Unix.SOCK_STREAM >-+ 0 in >- protect ~f:(fun () -> >- Unix.connect s ~addr:addr; >- let cout = Channel.sys_out_from_fd s in >diff --git a/security/sks/files/patch-Makefile b/security/sks/files/patch-Makefile >deleted file mode 100644 >index f7071a5b7447..000000000000 >--- a/security/sks/files/patch-Makefile >+++ /dev/null >@@ -1,58 +0,0 @@ >---- Makefile.orig 2021-09-05 17:11:36 UTC >-+++ Makefile >-@@ -15,16 +15,15 @@ >- # USA >- # >- CINCLUDES=-I`ocamlc -where` >--CC=gcc >- CXX=g++ >--CFLAGS=-O3 -Werror-implicit-function-declaration $(CINCLUDES) -I . >-+CFLAGS+=-O3 -Werror-implicit-function-declaration $(CINCLUDES) -I . >- CXXFLAGS=-O3 $(CINCLUDES) -I . >- >- ifndef OCAMLC >- OCAMLC=ocamlc >- endif >- ifndef OCAMLOPT >-- OCAMLOPT=ocamlopt >-+ OCAMLOPT=ocamlopt -unsafe-string >- endif >- ifndef CAMLP4O >- CAMLP4O=camlp4o >-@@ -135,16 +134,16 @@ keyMerge.cmx: keyMerge.ml >- # Special targets >- >- install: >-- mkdir -p $(PREFIX)/bin >-- install sks_build.sh sks sks_add_mail $(PREFIX)/bin >-- mkdir -p $(MANDIR)/man8 >-- install sks.8.gz $(MANDIR)/man8 >-+ mkdir -p $(DESTDIR)$(PREFIX)/bin >-+ install sks_build.sh sks sks_add_mail $(DESTDIR)$(PREFIX)/bin >-+ mkdir -p $(DESTDIR)$(MANDIR)/man8 >-+ install sks.8.gz $(DESTDIR)$(MANDIR)/man8 >- >- install.bc: >-- mkdir -p $(PREFIX)/bin >-- install sks_build.bc.sh sks.bc sks_add_mail.bc $(PREFIX)/bin >-- mkdir -p $(MANDIR)/man8 >-- install sks.8.gz $(MANDIR)/man8 >-+ mkdir -p $(DESTDIR)$(PREFIX)/bin >-+ install sks_build.bc.sh sks.bc sks_add_mail.bc $(DESTDIR)$(PREFIX)/bin >-+ mkdir -p $(DESTDIR)$(MANDIR)/man8 >-+ install sks.8.gz $(DESTDIR)$(MANDIR)/man8 >- >- >- Makefile.local: >-@@ -285,8 +284,9 @@ CKDIR=$(CKVER)/src >- >- $(CKVER)/README.txt: >- tar xmvfz $(CKVER).tar.gz >-- patch -p 0 < $(CKVER)-sks.patch >-- patch -p 0 < $(CKVER)-sks-custom_compare.patch >-+ patch -p0 < $(CKVER)-sks.patch >-+ patch -p0 < $(CKVER)-sks-custom_compare.patch >-+ sed -i.bak -e 's,uint32,&_t,' $(CKDIR)/stubs-md5.c >- >- $(CKDIR)/cryptokit.cma: $(CKVER)/README.txt >- cd $(CKDIR) && $(MAKE) all >diff --git a/security/sks/pkg-descr b/security/sks/pkg-descr >index a4c6525b94db..1547821477bf 100644 >--- a/security/sks/pkg-descr >+++ b/security/sks/pkg-descr >@@ -10,4 +10,4 @@ Refer to the online references for pointers on downloading a full copy of > the public PGP databse (about 2Gb) and on tweaking the your configuration. > http://www.keysigning.org/sks/ may help you getting started. > >-WWW: https://bitbucket.org/skskeyserver/sks-keyserver/ >+WWW: https://github.com/SKS-Keyserver/sks-keyserver >-- >2.35.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 263205
: 233132