git: df9b08e865dc - main - security/sks: Remove expired port

From: Rene Ladan <rene_at_FreeBSD.org>
Date: Sun, 30 Jun 2024 11:30:20 UTC
The branch main has been updated by rene:

URL: https://cgit.FreeBSD.org/ports/commit/?id=df9b08e865dc2214aea34f534e13eafc97db20ff

commit df9b08e865dc2214aea34f534e13eafc97db20ff
Author:     Rene Ladan <rene@FreeBSD.org>
AuthorDate: 2024-06-30 11:30:15 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2024-06-30 11:30:15 +0000

    security/sks: Remove expired port
    
    2024-06-30 security/sks: Depends on deprecated port databases/db5
---
 MOVED                                |    1 +
 security/Makefile                    |    1 -
 security/sks/Makefile                |   56 --
 security/sks/distinfo                |    3 -
 security/sks/files/debian-bug-870150 |  144 -----
 security/sks/files/patch-Makefile    |   58 --
 security/sks/files/patch-ocaml408    | 1001 ----------------------------------
 security/sks/files/pkg-message.in    |   23 -
 security/sks/pkg-descr               |   11 -
 security/sks/pkg-plist               |    8 -
 10 files changed, 1 insertion(+), 1305 deletions(-)

diff --git a/MOVED b/MOVED
index 58235373802a..e08ed556e5a5 100644
--- a/MOVED
+++ b/MOVED
@@ -3357,3 +3357,4 @@ sysutils/container-diff||2024-06-30|Has expired: The repository has been archive
 emulators/qemu7|emulators/qemu|2024-06-30|Has expired: qemu 9.X.X is out, so time to retire this one
 lang/perl5.34||2024-06-30|Has expired: Support end three years after .0 release, please upgrade to a more recent version of Perl
 www/httest||2024-06-30|Has expired: Abandonware, no activity from upstream for years and depends on deprecated library devel/pcre
+security/sks||2024-06-30|Has expired: Depends on deprecated port databases/db5
diff --git a/security/Makefile b/security/Makefile
index aec02b017026..01fa5452ece0 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -1266,7 +1266,6 @@
     SUBDIR += signify
     SUBDIR += signing-party
     SUBDIR += silktools
-    SUBDIR += sks
     SUBDIR += smurflog
     SUBDIR += sniffglue
     SUBDIR += snoopy
diff --git a/security/sks/Makefile b/security/sks/Makefile
deleted file mode 100644
index 910d3b917c0f..000000000000
--- a/security/sks/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-PORTNAME=	sks
-PORTVERSION=	1.1.6
-PORTREVISION=	2
-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
-WWW=		https://bitbucket.org/skskeyserver/sks-keyserver/
-
-LICENSE=	GPLv2+
-
-BROKEN=		Unfetchable
-DEPRECATED=	Depends on deprecated port databases/db5
-EXPIRATION_DATE=2024-06-30
-
-BUILD_DEPENDS=	${LOCALBASE}/${OCAML_SITELIBDIR}/num/META:math/ocaml-num
-
-USE_OCAML=	yes
-USE_OCAML_CAMLP4=yes
-USES=		bdb perl5 gmake shebangfix tar:tgz
-USE_PERL5=	build
-MAKE_JOBS_UNSAFE=yes
-SHEBANG_FILES=	sks_build.sh
-
-MAKE_ENV=	BDBINCLUDE="-I${BDB_INCLUDE_DIR}" \
-		BDBLIB="-L${BDB_LIB_DIR}" \
-		LIBDB="-l${BDB_LIB_NAME}" \
-		MANDIR="${PREFIX}/share/man"
-
-SUB_FILES=	pkg-message
-
-OPTIONS_DEFINE=	DOCS
-
-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
-
-post-install:
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	cd ${WRKSRC} && ${INSTALL_DATA} BUGS README.md TODO UPGRADING \
-		 ${STAGEDIR}${DOCSDIR}
-	@cd ${STAGEDIR}${PREFIX}/bin && ${STRIP_CMD} sks sks_add_mail
-
-.include <bsd.port.mk>
diff --git a/security/sks/distinfo b/security/sks/distinfo
deleted file mode 100644
index 7ed848810287..000000000000
--- a/security/sks/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-TIMESTAMP = 1493574628
-SHA256 (sks-1.1.6.tgz) = 22312dbec6dfd372932075b0b0b1d04f772059a9520faa4937feafc737d5a632
-SIZE (sks-1.1.6.tgz) = 359499
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/files/patch-ocaml408 b/security/sks/files/patch-ocaml408
deleted file mode 100644
index e423502d534b..000000000000
--- a/security/sks/files/patch-ocaml408
+++ /dev/null
@@ -1,1001 +0,0 @@
-From e4ebec61064ba85941acec02efe60b98b54eddb1 Mon Sep 17 00:00:00 2001
-From: Phil Pennock <codehacks@spodhuis.org>
-Date: Mon, 16 Jan 2017 15:31:36 -0500
-Subject: [PATCH] Compile with ocaml 4.02.3 (dev-mode fatal warnings)
-
----
- .hgignore     |  3 ++-
- add_mail.ml   |  2 +-
- bitstring.ml  | 73 ++++++++++++++++++++++++++-------------------------
- channel.ml    | 18 ++++++-------
- dbserver.ml   |  6 ++---
- heap.ml       |  8 +++---
- keyHash.ml    |  8 +++---
- linearAlg.ml  |  4 +--
- mList.ml      |  4 +--
- number.ml     | 20 +++++++-------
- prefixTree.ml | 20 +++++++-------
- rMisc.ml      | 35 +++++++++---------------
- rMisc.mli     |  3 ---
- utils.ml      | 36 +++++++++++--------------
- utils.mli     |  1 -
- wserver.ml    | 68 +++++++++++++++++++++++------------------------
- 16 files changed, 147 insertions(+), 162 deletions(-)
-
-diff --git a/add_mail.ml b/add_mail.ml
-index 3233af6..f0f54d6 100644
---- add_mail.ml
-+++ add_mail.ml
-@@ -54,7 +54,7 @@ let dirname =
- (** dumps contents of one file into another *)
- let pipe_file =
-   let blocksize = 100 * 1024 in
--  let buf = String.create blocksize in
-+  let buf = BytesLabels.create blocksize in
-   let rec pipe_file file1 file2 =
-     let bytes_read = input file1 buf 0 blocksize in
-     if bytes_read <> 0 then (
-diff --git a/bitstring.ml b/bitstring.ml
-index a6d3dad..5e89dbc 100644
---- bitstring.ml
-+++ bitstring.ml
-@@ -20,7 +20,8 @@
- (* USA or see <http://www.gnu.org/licenses/>.                          *)
- (***********************************************************************)
-
--open StdLabels
-+open ArrayLabels
-+open BytesLabels
- open MoreLabels
-
- module Unix=UnixLabels
-@@ -40,14 +41,14 @@ let bytelength bits =
- let create bits =
-   let bytes = bytelength bits
-   in
--  { a = String.create bytes;
-+  { a = BytesLabels.create bytes;
-     bitlength = bits;
-   }
-
- let get ba bit =
-   let byte_pos = bit / width
-   and bit_pos = bit mod width in
--  let intval = int_of_char (String.get ba.a byte_pos) in
-+  let intval = int_of_char (BytesLabels.get ba.a byte_pos) in
-   (intval lsr (width - bit_pos - 1)) land 1
-
- let lget ba bit = get ba bit = 1
-@@ -55,27 +56,27 @@ let lget ba bit = get ba bit = 1
- let flip ba bit =
-   let byte_pos = bit / width
-   and bit_pos = bit mod width in
--  let intval = int_of_char (String.get ba.a byte_pos) in
-+  let intval = int_of_char (BytesLabels.get ba.a byte_pos) in
-   let new_char = char_of_int ((1 lsl (width - bit_pos - 1)) lxor intval)
-   in
--  String.set ba.a byte_pos new_char
-+  BytesLabels.set ba.a byte_pos new_char
-
- let set ba bit =
-   let byte_pos = bit / width
-   and bit_pos = bit mod width in
--  let intval = int_of_char (String.get ba.a byte_pos) in
-+  let intval = int_of_char (BytesLabels.get ba.a byte_pos) in
-   let new_char = char_of_int ((1 lsl (width - bit_pos - 1)) lor intval)
-   in
--  String.set ba.a byte_pos new_char
-+  BytesLabels.set ba.a byte_pos new_char
-
- let unset ba bit =
-   let byte_pos = bit / width
-   and bit_pos = bit mod width in
--  let intval = int_of_char (String.get ba.a byte_pos) in
-+  let intval = int_of_char (BytesLabels.get ba.a byte_pos) in
-   let new_char = char_of_int ((lnot (1 lsl (width - bit_pos - 1)))
-                               land intval)
-   in
--  String.set ba.a byte_pos new_char
-+  BytesLabels.set ba.a byte_pos new_char
-
- let setval ba bit bool =
-   if bool then set ba bit else unset ba bit
-@@ -95,12 +96,12 @@ let hexprint ba =
-   print_string (Utils.hexstring ba.a)
-
- let to_bool_array ba =
--  Array.init ~f:(fun i -> lget ba i) ba.bitlength
-+  ArrayLabels.init ~f:(fun i -> lget ba i) ba.bitlength
-
- let to_string ba =
--  let string = String.create ba.bitlength in
-+  let string = BytesLabels.create ba.bitlength in
-   for i = 0 to ba.bitlength -1 do
--    if get ba i = 0 then string.[i] <- '0' else string.[i] <- '1'
-+    if get ba i = 0 then BytesLabels.set string i '0' else BytesLabels.set string i '1'
-   done;
-   string
-
-@@ -109,21 +110,21 @@ let to_bytes ba =
-   for i = ba.bitlength to lastbit do
-     unset ba i
-   done;
--  String.sub ~pos:0 ~len:(bytelength ba.bitlength) ba.a
-+  BytesLabels.sub ~pos:0 ~len:(bytelength ba.bitlength) ba.a
-
- let of_bytes string bitlength =
-   { bitlength = bitlength;
--    a = String.copy string;
-+    a = BytesLabels.copy string;
-   }
-
- let of_byte b =
-   { bitlength = width;
--    a = String.make 1 (char_of_int (b land 0xFF));
-+    a = BytesLabels.make 1 (char_of_int (b land 0xFF));
-   }
-
- let of_bytes_all string =
--  { bitlength = (String.length string) * width;
--    a = String.copy string;
-+  { bitlength = (BytesLabels.length string) * width;
-+    a = BytesLabels.copy string;
-   }
-
- let of_int i =
-@@ -137,7 +138,7 @@ let of_bytes_nocopy string bitlength =
-   }
-
- let of_bytes_all_nocopy string =
--  { bitlength = (String.length string) * width;
-+  { bitlength = (BytesLabels.length string) * width;
-     a = string;
-   }
-
-@@ -152,7 +153,7 @@ let to_bytes_nocopy ba =
- (************************************************************)
- (************************************************************)
-
--let copy ba = { ba with a = String.copy ba.a }
-+let copy ba = { ba with a = BytesLabels.copy ba.a }
-
- (** returns a copy of bitstring copied into a new bitstring of a new length.
-   No guarantees are made as to the contents of the remainder of the bitstring
-@@ -160,9 +161,9 @@ let copy ba = { ba with a = String.copy ba.a }
-  *)
- let copy_len ba bitlength =
-   let bytes = bytelength bitlength in
--  let str = String.create bytes in
--  String.blit ~src:ba.a ~src_pos:0
--    ~dst:str ~dst_pos:0 ~len:(String.length ba.a);
-+  let str = BytesLabels.create bytes in
-+  BytesLabels.blit ~src:ba.a ~src_pos:0
-+    ~dst:str ~dst_pos:0 ~len:(BytesLabels.length ba.a);
-   { a = str; bitlength = bitlength }
-
- (********************************************************************)
-@@ -191,17 +192,17 @@ let shift_left_small ba bits =
-   if bits > 0 then
-     let bytes = bytelength ba.bitlength in
-     for i = 0 to bytes-2 do
--      ba.a.[i] <- shift_pair_left ba.a.[i] ba.a.[i+1] bits
-+      BytesLabels.set ba.a i (shift_pair_left ba.a.[i] ba.a.[i+1] bits)
-     done;
--    ba.a.[bytes-1] <- shift_pair_left ba.a.[bytes-1] '\000' bits
-+    BytesLabels.set ba.a (bytes-1) (shift_pair_left ba.a.[bytes-1] '\000' bits)
-
- let shift_right_small ba bits =
-   if bits > 0 then
-     let bytes = bytelength ba.bitlength in
-     for i = bytes-1 downto 1 do
--      ba.a.[i] <- shift_pair_right ba.a.[i-1] ba.a.[i] bits
-+      BytesLabels.set ba.a i (shift_pair_right ba.a.[i-1] ba.a.[i] bits)
-     done;
--    ba.a.[0] <-  shift_pair_right '\000' ba.a.[0] bits
-+    BytesLabels.set ba.a 0 (shift_pair_right '\000' ba.a.[0] bits)
-
- (**********************************)
-
-@@ -216,10 +217,10 @@ let rec shift_left ba bits =
-   then
-     begin
-       for i = 0 to bytelength - 1 - bytes do
--        ba.a.[i] <- ba.a.[i+bytes];
-+        BytesLabels.set ba.a i ba.a.[i+bytes];
-       done;
-       for i = bytelength - bytes to bytelength - 1 do
--        ba.a.[i] <- '\000'
-+        BytesLabels.set ba.a i '\000'
-       done
-     end;
-   shift_left_small ba bits
-@@ -235,10 +236,10 @@ and shift_right ba bits =
-     then
-       begin
-         for i = bytelength - 1 downto bytes do
--          ba.a.[i] <- ba.a.[i-bytes];
-+          BytesLabels.set ba.a i ba.a.[i-bytes];
-         done;
-         for i = bytes - 1 downto 0 do
--          ba.a.[i] <- '\000'
-+          BytesLabels.set ba.a i '\000'
-         done
-       end;
-     shift_right_small ba bits
-@@ -251,7 +252,7 @@ let num_bytes ba = bytelength ba.bitlength
- (********************************************************************)
-
- let rmasks =
--  Array.init width ~f:(fun i -> 0xFF lsl (width - i))
-+  ArrayLabels.init width ~f:(fun i -> 0xFF lsl (width - i))
-
- (* Later, extend to have optional initial-position arguments *)
- let blit ~src ~dst ~len =
-@@ -266,23 +267,23 @@ let blit ~src ~dst ~len =
-   then raise (Invalid_argument "Bitstring.blit: src too short");
-   let bytelen = len / width
-   and bitlen = len mod width in
--  String.blit
-+  BytesLabels.blit
-     ~src:src.a ~src_pos:0
-     ~dst:dst.a ~dst_pos:0 ~len:bytelen;
-   if bitlen > 0 then
--    let srcval = int_of_char (String.get src.a bytelen)
--    and dstval = int_of_char (String.get dst.a bytelen) in
-+    let srcval = int_of_char (BytesLabels.get src.a bytelen)
-+    and dstval = int_of_char (BytesLabels.get dst.a bytelen) in
-     let newdst = (rmasks.(bitlen) land srcval) lor
-                  ((lnot rmasks.(bitlen)) land dstval)
-     in
--    dst.a.[bytelen] <- char_of_int newdst
-+    BytesLabels.set dst.a bytelen (char_of_int newdst)
-
-
- (* let full_blit ~src ~src_pos ~dst ~dst_pos ~len =  *)
-
-
- let zero_out bs =
--  String.fill bs.a ~pos:0 ~len:(String.length bs.a) '\000'
-+  BytesLabels.fill bs.a ~pos:0 ~len:(BytesLabels.length bs.a) '\000'
-
- (*
- let extract bs ~pos ~len =
-diff --git a/channel.ml b/channel.ml
-index 95b599b..3c340d7 100644
---- channel.ml
-+++ channel.ml
-@@ -20,7 +20,7 @@
- (* USA or see <http://www.gnu.org/licenses/>.                          *)
- (***********************************************************************)
-
--open StdLabels
-+open BytesLabels
- open MoreLabels
- open Common
- module Unix=UnixLabels
-@@ -50,13 +50,13 @@ let create_nb_really_input inchan =
-     let string =
-       match !stringopt with
-           None ->
--            let string = String.create len in
-+            let string = BytesLabels.create len in
-             stringopt := Some string;
-             pos := 0;
-             string
-         | Some string -> string
-     in
--    if String.length string <> len then
-+    if BytesLabels.length string <> len then
-       failwith ("create_nb_really_input: attempt to redo incomplete " ^
-                 "read with different size");
-
-@@ -125,7 +125,7 @@ let read_all cin ?len ()=
-       None -> 1024 * 100
-     | Some x -> x
-   in
--  let sbuf = String.create len
-+  let sbuf = BytesLabels.create len
-   and buf = Buffer.create len in
-     read_all_rec cin sbuf buf;
-     Buffer.contents buf
-@@ -167,7 +167,7 @@ object (self)
-   method virtual read_string_pos : buf:string -> pos:int -> len:int -> unit
-   method virtual read_char : char
-   method read_string len =
--    let buf = String.create len in
-+    let buf = BytesLabels.create len in
-     self#read_string_pos ~buf ~pos:0 ~len;
-     buf
-   method read_byte = int_of_char self#read_char
-@@ -217,7 +217,7 @@ object (self)
-   method read_string len = input len
-   method read_string_pos ~buf ~pos ~len =
-     let s = input len in
--    String.blit ~src:s ~dst:buf ~src_pos:0 ~dst_pos:pos ~len
-+    BytesLabels.blit ~src:s ~dst:buf ~src_pos:0 ~dst_pos:pos ~len
-
-   method read_char =
-     input_char cin
-@@ -257,20 +257,20 @@ object (self)
-
-   method read_string len =
-     if pos + len > slength then raise End_of_file;
--    let rval = String.sub string ~pos ~len in
-+    let rval = BytesLabels.sub string ~pos ~len in
-       pos <- pos + len;
-       rval
-
-   method read_rest =
-     if pos >= slength then ""
-     else
--      let rval = String.sub string ~pos ~len:(slength - pos) in
-+      let rval = BytesLabels.sub string ~pos ~len:(slength - pos) in
-       pos <- slength;
-       rval
-
-   method read_string_pos ~buf ~pos:dst_pos ~len =
-     if pos + len > slength then raise End_of_file;
--    String.blit ~src:string ~src_pos:pos
-+    BytesLabels.blit ~src:string ~src_pos:pos
-       ~dst:buf ~dst_pos ~len;
-     pos <- pos + len
-
-diff --git a/dbserver.ml b/dbserver.ml
-index 583c484..6fbaedb 100644
---- dbserver.ml
-+++ dbserver.ml
-@@ -149,8 +149,8 @@ struct
-     []
-
-   let get_keys_by_keyid keyid =
--    let keyid_length = String.length keyid in
--    let short_keyid = String.sub ~pos:(keyid_length - 4) ~len:4 keyid in
-+    let keyid_length = BytesLabels.length keyid in
-+    let short_keyid = BytesLabels.sub ~pos:(keyid_length - 4) ~len:4 keyid in
-     let keys = Keydb.get_by_short_subkeyid short_keyid in
-     match keyid_length with
-       | 4 -> (* 32-bit keyid.  No further filtering required. *)
-@@ -396,7 +396,7 @@ struct
-     let f = (if binary then open_in_bin else open_in) fname in
-     protect ~f:(fun () ->
-                   let length = in_channel_length f in
--                  let buf = String.create length in
-+                  let buf = BytesLabels.create length in
-                   really_input f buf 0 length;
-                   buf
-                )
-diff --git a/heap.ml b/heap.ml
-index 292f432..1cd5646 100644
---- heap.ml
-+++ heap.ml
-@@ -20,7 +20,7 @@
- (* USA or see <http://www.gnu.org/licenses/>.                          *)
- (***********************************************************************)
-
--open StdLabels
-+open ArrayLabels
- open MoreLabels
-
- (* Adapted from CLR *)
-@@ -57,7 +57,7 @@ let exchange heap i j =
- let resize heap =
-   if heap.length > Array.length heap.a
-   then heap.a <-
--    Array.init ((Array.length heap.a) * 2)
-+    ArrayLabels.init ((Array.length heap.a) * 2)
-     ~f:(fun i ->
-           if i < (Array.length heap.a)
-           then heap.a.(i)
-@@ -67,7 +67,7 @@ let resize heap =
-     if heap.length <= (Array.length heap.a)/3
-       && (Array.length heap.a)/2 >= heap.minsize
-     then heap.a <-
--      Array.init ((Array.length heap.a)/ 2) ~f:(fun i -> heap.a.(i))
-+      ArrayLabels.init ((Array.length heap.a)/ 2) ~f:(fun i -> heap.a.(i))
-
-
- (***************************************************************)
-@@ -146,7 +146,7 @@ let push heap ~key ~data =
- (***************************************************************)
-
- let empty cmp i =
--  { a = Array.create i None;
-+  { a = Array.make i None;
-     length = 0;
-     minsize = i;
-     cmp = cmp;
-diff --git a/keyHash.ml b/keyHash.ml
-index ca7c6d6..0a85b6d 100644
---- keyHash.ml
-+++ keyHash.ml
-@@ -72,12 +72,12 @@ let hexchar_to_int c =
-   )
-
- let dehexify s =
--  let s = String.uppercase s in
--  let ns = String.create (String.length s / 2) in (* new string *)
--  for i = 0 to String.length ns - 1 do
-+  let s = BytesLabels.uppercase s in
-+  let ns = BytesLabels.create (BytesLabels.length s / 2) in (* new string *)
-+  for i = 0 to BytesLabels.length ns - 1 do
-     let first = hexchar_to_int s.[2 * i]
-     and second = hexchar_to_int s.[2 * i + 1]
-     in
--    ns.[i] <- char_of_int ((first lsl 4) + second)
-+    BytesLabels.set ns i (char_of_int ((first lsl 4) + second))
-   done;
-   ns
-diff --git a/linearAlg.ml b/linearAlg.ml
-index 81a9d88..a4aba71 100644
---- linearAlg.ml
-+++ linearAlg.ml
-@@ -20,9 +20,9 @@
- (* USA or see <http://www.gnu.org/licenses/>.                          *)
- (***********************************************************************)
-
--open StdLabels
- open MoreLabels
- module Unix=UnixLabels
-+module Array=ArrayLabels
- open Printf
- open ZZp.Infix
-
-@@ -62,7 +62,7 @@ struct
-   let copy m = { m with array = Array.copy m.array; }
-
-   let make ~columns ~rows init =
--    let array = Array.create (columns * rows) init in
-+    let array = Array.make (columns * rows) init in
-     { columns = columns;
-       rows = rows;
-       array = array;
-diff --git a/mList.ml b/mList.ml
-index f473a64..c0d4c79 100644
---- mList.ml
-+++ mList.ml
-@@ -200,7 +200,7 @@ let pri_split pri list =
-   (low,exact,high)
-
- let has_dups list =
--  let slist = Sort.list (fun x y -> x < y) list in
-+  let slist = List.sort compare list in
-   let rec dup_scan list = match list with
-     [] -> false
-   | hd::[] -> false
-@@ -208,7 +208,7 @@ let has_dups list =
-   in dup_scan slist
-
- let dedup list =
--  let slist = Sort.list (fun x y -> x < y) list in
-+  let slist = List.sort compare list in
-   let rec dedup ~list ~partial = match list with
-       [] -> partial
-     | hd::[] -> dedup ~list:[] ~partial:(hd::partial)
-diff --git a/number.ml b/number.ml
-index 3e33077..fc9d5ba 100644
---- number.ml
-+++ number.ml
-@@ -22,7 +22,7 @@
- (***********************************************************************)
-
- open Big_int
--open StdLabels
-+open BytesLabels
- open MoreLabels
- open Printf
- open Common
-@@ -59,31 +59,31 @@ let width = 8
- let width_pow = power_int_positive_int 2 width
-
- let revstring s =
--  let len = String.length s in
--  let copy = String.create len in
-+  let len = BytesLabels.length s in
-+  let copy = BytesLabels.create len in
-   for i = 0 to len - 1 do
--    copy.[i] <- s.[len - 1 - i]
-+    BytesLabels.set copy i s.[len - 1 - i]
-   done;
-   copy
-
- let revstring_inplace s =
--  let len = String.length s in
-+  let len = BytesLabels.length s in
-   for i = 0 to (len - 2)/2 do
-     let j = len - 1 - i in
-     let tmp = s.[i] in
--    s.[i] <- s.[j];
--    s.[j] <- tmp
-+    BytesLabels.set s i s.[j];
-+    BytesLabels.set s j tmp
-   done
-
- let to_bytes ~nbytes n =
-   if sign_big_int n = -1
-   then raise (Invalid_argument "N.to_bytes: negative argument");
--  let string = String.create nbytes in
-+  let string = BytesLabels.create nbytes in
-   let rec loop n i =
-     if i < 0 then string
-     else
-       let (a,b) = quomod_big_int n width_pow in
--      string.[i] <- char_of_int (int_of_big_int b);
-+      BytesLabels.set string i (char_of_int (int_of_big_int b));
-       loop a (i - 1)
-   in
-   let str = loop n (nbytes - 1) in
-@@ -92,7 +92,7 @@ let to_bytes ~nbytes n =
-
- let of_bytes str =
-   let str = revstring str in
--  let nbytes = String.length str in
-+  let nbytes = BytesLabels.length str in
-   let rec loop n i =
-     if i >= nbytes then n
-     else
-diff --git a/prefixTree.ml b/prefixTree.ml
-index 4aa4fbb..6721c28 100644
---- prefixTree.ml
-+++ prefixTree.ml
-@@ -20,11 +20,13 @@
- (* USA or see <http://www.gnu.org/licenses/>.                          *)
- (***********************************************************************)
-
--open StdLabels
-+open BytesLabels
- open MoreLabels
- open Printf
- open Common
- module Unix=UnixLabels
-+module Array=ArrayLabels
-+module List=ListLabels
- (*module ZZp = RMisc.ZZp *)
- module Set = PSet.Set
- module ZSet = ZZp.Set
-@@ -161,7 +163,7 @@ let unmarshal_of_string ~f s =
-
- let samesize set =
-   let sizes = Set.fold ~init:Set.empty set
--                ~f:(fun string set -> Set.add (String.length string) set)
-+                ~f:(fun string set -> Set.add (BytesLabels.length string) set)
-   in
-   let nsizes = Set.cardinal sizes in
-   nsizes = 1 || nsizes = 0
-@@ -728,11 +730,11 @@ let split_at_depth t zz zzs node depth =
- (******************************************************************)
-
- let pad string bytes =
--  let len = String.length string in
-+  let len = BytesLabels.length string in
-   if bytes > len then
--    let nstr = String.create bytes in
--    String.fill nstr ~pos:len ~len:(bytes - len) '\000';
--    String.blit ~src:string ~dst:nstr ~src_pos:0 ~dst_pos:0 ~len;
-+    let nstr = BytesLabels.create bytes in
-+    BytesLabels.fill nstr ~pos:len ~len:(bytes - len) '\000';
-+    BytesLabels.blit ~src:string ~dst:nstr ~src_pos:0 ~dst_pos:0 ~len;
-     nstr
-   else
-     string
-@@ -819,11 +821,11 @@ let rec insert_at_depth t zz zzs node marray depth =
-
- let insert_both t txn zz zzs =
-   let zzs = pad zzs (ZZp.num_bytes ()) in
--  if String.length zzs <> ZZp.num_bytes ()
-+  if BytesLabels.length zzs <> ZZp.num_bytes ()
-   then raise (Invalid_argument
-                 (sprintf "%s.  %d found, %d expected"
-                    "PrefixTree.insert_both: zzs has wrong length"
--                   (String.length zzs) (ZZp.num_bytes ())
-+                   (BytesLabels.length zzs) (ZZp.num_bytes ())
-                 ));
-   let marray = ZZp.add_el_array ~points:t.points zz in
-   let root = t.root in
-@@ -875,7 +877,7 @@ let rec delete_at_depth t txn zz zzs node marray depth =
-
- let delete_both t txn zz zzs =
-   let zzs = pad zzs (ZZp.num_bytes ()) in
--  if String.length zzs <> ZZp.num_bytes ()
-+  if BytesLabels.length zzs <> ZZp.num_bytes ()
-   then raise (Invalid_argument
-                 "PrefixTree.delete_both: zzs has wrong length");
-   let marray = ZZp.del_el_array ~points:t.points zz in
-diff --git a/rMisc.ml b/rMisc.ml
-index 63792c1..e8278fc 100644
---- rMisc.ml
-+++ rMisc.ml
-@@ -22,9 +22,10 @@
- (* USA or see <http://www.gnu.org/licenses/>.                          *)
- (***********************************************************************)
-
--open StdLabels
-+open BytesLabels
- open MoreLabels
- module Unix=UnixLabels
-+module List=ListLabels
-
- (** deterministic RNG *)
- let det_rng = Random.State.make [|104|]
-@@ -56,15 +57,15 @@ let rec fill_random_string rfunc string ~pos ~len =
-     (* CR yminsky: I think this has the same bug as the function with the same name in Utils *)
-     let _bits = rfunc () in
-       for i = 0 to steps - 1 do
--        string.[pos + i] <-
--        char_of_int (0xFF land ((rfunc ()) lsr (8 * i)))
-+        BytesLabels.set string (pos + i) (
-+        char_of_int (0xFF land ((rfunc ()) lsr (8 * i))))
-       done;
-       fill_random_string rfunc string ~pos:(pos + steps) ~len
-   else
-     ()
-
- let random_string rfunc len =
--  let string = String.create len in
-+  let string = BytesLabels.create len in
-     fill_random_string rfunc string ~pos:0 ~len;
-     string
-
-@@ -114,19 +115,15 @@ let print_string_set set =
-   List.iter ~f:(fun string -> print_string string; print_newline ())
- *)
-
--let add_sarray ~data sarray =
--  Array.fold_right ~f:(fun string set -> Set.add string set)
--    sarray ~init:data
--
- (*****************************************************************)
- (*****************************************************************)
-
*** 413 LINES SKIPPED ***