commit 340938b

Michael Forney  ·  2025-04-29 23:35:44 +0000 UTC
parent 6739ff9
openbsd: Update to 7.7
44 files changed,  +338, -356
+2, -1
1@@ -1,5 +1,6 @@
2+#define __NEED_mode_t
3 #include_next <string.h>
4 char *strcasestr(const char *, const char *);
5-void strmode(int, char *);
6+void strmode(mode_t, char *);
7 int timingsafe_memcmp(const void *, const void *, size_t);
8 int timingsafe_bcmp(const void *, const void *, size_t);
R pkg/openbsd/patch/0004-pax-Add-some-includes.patch => pkg/openbsd/patch/0003-pax-Add-some-includes.patch
+0, -0
+0, -34
 1@@ -1,34 +0,0 @@
 2-From e2ca2e2a530e61e8af65dca829aa1fcad5c59a7d Mon Sep 17 00:00:00 2001
 3-From: Michael Forney <mforney@mforney.org>
 4-Date: Mon, 18 Apr 2016 00:13:51 -0700
 5-Subject: [PATCH] pax: Set listf to stderr in main
 6-
 7----
 8- bin/pax/pax.c | 4 +++-
 9- 1 file changed, 3 insertions(+), 1 deletion(-)
10-
11-diff --git a/bin/pax/pax.c b/bin/pax/pax.c
12-index f6b3634369a..3d50e051075 100644
13---- a/bin/pax/pax.c
14-+++ b/bin/pax/pax.c
15-@@ -93,7 +93,7 @@ char	*dirptr;		/* destination dir in a copy */
16- char	*argv0;			/* root of argv[0] */
17- enum op_mode op_mode;		/* what program are we acting as? */
18- sigset_t s_mask;		/* signal mask for cleanup critical sect */
19--FILE	*listf = stderr;	/* file pointer to print file list to */
20-+FILE	*listf;			/* file pointer to print file list to */
21- int	listfd = STDERR_FILENO;	/* fd matching listf, for sighandler output */
22- char	*tempfile;		/* tempfile to use for mkstemp(3) */
23- char	*tempbase;		/* basename of tempfile to use for mkstemp(3) */
24-@@ -224,6 +224,8 @@ main(int argc, char **argv)
25- 	char *tmpdir;
26- 	size_t tdlen;
27- 
28-+	listf = stderr;
29-+
30- 	/*
31- 	 * Keep a reference to cwd, so we can always come back home.
32- 	 */
33--- 
34-2.19.0
35-
R pkg/openbsd/patch/0005-tar-Default-to-stdin.patch => pkg/openbsd/patch/0004-tar-Default-to-stdin.patch
+4, -4
 1@@ -1,4 +1,4 @@
 2-From 901940cdf7fc13516ff55e81df0b546eb7c74595 Mon Sep 17 00:00:00 2001
 3+From 7f16d268831910c1d219b8a4f38b364bba34c710 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Mon, 18 Apr 2016 01:16:12 -0700
 6 Subject: [PATCH] tar: Default to stdin
 7@@ -8,10 +8,10 @@ Subject: [PATCH] tar: Default to stdin
 8  1 file changed, 1 insertion(+), 1 deletion(-)
 9 
10 diff --git a/bin/pax/options.c b/bin/pax/options.c
11-index 5db0948858c..dbb4b816c37 100644
12+index cd3f5f6285c..9dd2ea0ce25 100644
13 --- a/bin/pax/options.c
14 +++ b/bin/pax/options.c
15-@@ -937,7 +937,7 @@ tar_options(int argc, char **argv)
16+@@ -968,7 +968,7 @@ tar_options(int argc, char **argv)
17  	if ((arcname == NULL) || (*arcname == '\0')) {
18  		arcname = getenv("TAPE");
19  		if ((arcname == NULL) || (*arcname == '\0'))
20@@ -21,5 +21,5 @@ index 5db0948858c..dbb4b816c37 100644
21  	if ((arcname[0] == '-') && (arcname[1]== '\0'))
22  		arcname = NULL;
23 -- 
24-2.25.0
25+2.49.0
26 
R pkg/openbsd/patch/0006-yacc-Add-some-includes.patch => pkg/openbsd/patch/0005-yacc-Add-some-includes.patch
+0, -0
R pkg/openbsd/patch/0007-diff-Add-missing-includes.patch => pkg/openbsd/patch/0006-diff-Add-missing-includes.patch
+0, -0
R pkg/openbsd/patch/0008-patch-Add-missing-includes.patch => pkg/openbsd/patch/0007-patch-Add-missing-includes.patch
+0, -0
R pkg/openbsd/patch/0009-patch-Avoid-d_namlen.patch => pkg/openbsd/patch/0008-patch-Avoid-d_namlen.patch
+0, -0
R pkg/openbsd/patch/0010-pax-Fix-GNU-long-name-handling-with-short-read.patch => pkg/openbsd/patch/0009-pax-Fix-GNU-long-name-handling-with-short-read.patch
+10, -10
 1@@ -1,4 +1,4 @@
 2-From ec3fd37495e977af375a98a472d19ae0ccbcd874 Mon Sep 17 00:00:00 2001
 3+From f88fb1145beac6cce7012b506579d23e0b9826a2 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Sat, 3 Dec 2016 20:49:24 -0800
 6 Subject: [PATCH] pax: Fix GNU long name handling with short read
 7@@ -10,7 +10,7 @@ Subject: [PATCH] pax: Fix GNU long name handling with short read
 8  3 files changed, 51 insertions(+), 44 deletions(-)
 9 
10 diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c
11-index e5b0a4ee5d1..f0a55abe2f7 100644
12+index f018108af59..4c49efa1362 100644
13 --- a/bin/pax/ar_subs.c
14 +++ b/bin/pax/ar_subs.c
15 @@ -37,6 +37,7 @@
16@@ -47,7 +47,7 @@ index e5b0a4ee5d1..f0a55abe2f7 100644
17  
18  		/*
19  		 * check for pattern, and user specified options match.
20-@@ -208,15 +202,8 @@ extract(void)
21+@@ -245,15 +239,8 @@ extract(void)
22  	 * says it is done
23  	 */
24  	while (next_head(arcn) == 0) {
25@@ -64,7 +64,7 @@ index e5b0a4ee5d1..f0a55abe2f7 100644
26  
27  		/*
28  		 * check for pattern, and user specified options match. When
29-@@ -1243,3 +1230,48 @@ get_arc(void)
30+@@ -1282,3 +1269,48 @@ get_arc(void)
31  	paxwarn(1, "Sorry, unable to determine archive format.");
32  	return(-1);
33  }
34@@ -114,10 +114,10 @@ index e5b0a4ee5d1..f0a55abe2f7 100644
35 +	return 1;
36 +}
37 diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c
38-index 68534dcbe25..e84f9e0d3d6 100644
39+index 25dfed5b69b..e3e22a09cc6 100644
40 --- a/bin/pax/buf_subs.c
41 +++ b/bin/pax/buf_subs.c
42-@@ -673,9 +673,7 @@ rd_wrfile(ARCHD *arcn, int ofd, off_t *left)
43+@@ -676,9 +676,7 @@ rd_wrfile(ARCHD *arcn, int ofd, off_t *left)
44  	 * pass the blocksize of the file being written to the write routine,
45  	 * if the size is zero, use the default MINFBSZ
46  	 */
47@@ -129,10 +129,10 @@ index 68534dcbe25..e84f9e0d3d6 100644
48  			sz = (int)sb.st_blksize;
49  	} else
50 diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c
51-index 89b4872988b..8aa3d249923 100644
52+index 9f482480a3b..ae0caf29f6c 100644
53 --- a/bin/pax/file_subs.c
54 +++ b/bin/pax/file_subs.c
55-@@ -919,7 +919,6 @@ file_write(int fd, char *str, int cnt, int *rem, int *isempt, int sz,
56+@@ -924,7 +924,6 @@ file_write(int fd, char *str, int cnt, int *rem, int *isempt, int sz,
57  	char *end;
58  	int wcnt;
59  	char *st = str;
60@@ -140,7 +140,7 @@ index 89b4872988b..8aa3d249923 100644
61  
62  	/*
63  	 * while we have data to process
64-@@ -978,29 +977,7 @@ file_write(int fd, char *str, int cnt, int *rem, int *isempt, int sz,
65+@@ -983,29 +982,7 @@ file_write(int fd, char *str, int cnt, int *rem, int *isempt, int sz,
66  		/*
67  		 * have non-zero data in this file system block, have to write
68  		 */
69@@ -172,5 +172,5 @@ index 89b4872988b..8aa3d249923 100644
70  			return(-1);
71  		}
72 -- 
73-2.26.2
74+2.49.0
75 
R pkg/openbsd/patch/0011-pax-Support-xz-compression-with-J-flag.patch => pkg/openbsd/patch/0010-pax-Support-xz-compression-with-J-flag.patch
+12, -12
 1@@ -1,4 +1,4 @@
 2-From 86ce82bfd12c6db2468e3db4afd843cf081f71b2 Mon Sep 17 00:00:00 2001
 3+From c0b84520a7c92b67b195c6ec9ed9185438810380 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Sat, 3 Dec 2016 23:50:27 -0800
 6 Subject: [PATCH] pax: Support xz compression with -J flag
 7@@ -8,10 +8,10 @@ Subject: [PATCH] pax: Support xz compression with -J flag
 8  1 file changed, 22 insertions(+), 3 deletions(-)
 9 
10 diff --git a/bin/pax/options.c b/bin/pax/options.c
11-index 560478f2681..27de25d655b 100644
12+index 9dd2ea0ce25..63f17f2c1c7 100644
13 --- a/bin/pax/options.c
14 +++ b/bin/pax/options.c
15-@@ -154,6 +154,7 @@ static int xz_id(char *_blk, int _size);
16+@@ -156,6 +156,7 @@ static int xz_id(char *_blk, int _size);
17  #define GZIP_CMD	"gzip"		/* command to run as gzip */
18  #define COMPRESS_CMD	"compress"	/* command to run as compress */
19  #define BZIP2_CMD	"bzip2"		/* command to run as bzip2 */
20@@ -19,7 +19,7 @@ index 560478f2681..27de25d655b 100644
21  
22  /*
23   *	Format specific routine table
24-@@ -300,7 +301,7 @@ pax_options(int argc, char **argv)
25+@@ -312,7 +313,7 @@ pax_options(int argc, char **argv)
26  	/*
27  	 * process option flags
28  	 */
29@@ -28,7 +28,7 @@ index 560478f2681..27de25d655b 100644
30  	    != -1) {
31  		switch (c) {
32  		case 'a':
33-@@ -556,6 +557,12 @@ pax_options(int argc, char **argv)
34+@@ -568,6 +569,12 @@ pax_options(int argc, char **argv)
35  			Hflag = 1;
36  			flg |= CHF;
37  			break;
38@@ -41,16 +41,16 @@ index 560478f2681..27de25d655b 100644
39  		case 'L':
40  			/*
41  			 * follow symlinks
42-@@ -731,7 +738,7 @@ tar_options(int argc, char **argv)
43+@@ -744,7 +751,7 @@ tar_options(int argc, char **argv)
44  	 * process option flags
45  	 */
46  	while ((c = getoldopt(argc, argv,
47--	    "b:cef:hjmopqruts:vwxzBC:HI:LNOPXZ014578")) != -1) {
48-+	    "b:cef:hjmopqruts:vwxzBC:HI:JLNOPXZ014578")) != -1) {
49+-	    "b:cef:hjmopqruts:vwxzBC:F:HI:LNOPXZ014578")) != -1) {
50++	    "b:cef:hjmopqruts:vwxzBC:F:HI:JLNOPXZ014578")) != -1) {
51  		switch (c) {
52  		case 'b':
53  			/*
54-@@ -880,6 +887,12 @@ tar_options(int argc, char **argv)
55+@@ -911,6 +918,12 @@ tar_options(int argc, char **argv)
56  			incfiles[nincfiles - 1].file = optarg;
57  			incfiles[nincfiles - 1].dir = chdname;
58  			break;
59@@ -63,7 +63,7 @@ index 560478f2681..27de25d655b 100644
60  		case 'L':
61  			/*
62  			 * follow symlinks
63-@@ -1163,7 +1176,7 @@ cpio_options(int argc, char **argv)
64+@@ -1194,7 +1207,7 @@ cpio_options(int argc, char **argv)
65  	dflag = 1;
66  	act = -1;
67  	nodirs = 1;
68@@ -72,7 +72,7 @@ index 560478f2681..27de25d655b 100644
69  		switch (c) {
70  			case 'a':
71  				/*
72-@@ -1347,6 +1360,12 @@ cpio_options(int argc, char **argv)
73+@@ -1378,6 +1391,12 @@ cpio_options(int argc, char **argv)
74  				(void)fputs("\n\n", stderr);
75  				cpio_usage();
76  				break;
77@@ -86,5 +86,5 @@ index 560478f2681..27de25d655b 100644
78  				/*
79  				 * follow symbolic links
80 -- 
81-2.37.3
82+2.49.0
83 
R pkg/openbsd/patch/0012-setprogname-Explicitly-discard-const-qualifier.patch => pkg/openbsd/patch/0011-setprogname-Explicitly-discard-const-qualifier.patch
+0, -0
R pkg/openbsd/patch/0013-readpassphrase-Support-systems-without-VSTATUS-and-T.patch => pkg/openbsd/patch/0012-readpassphrase-Support-systems-without-VSTATUS-and-T.patch
+0, -0
R pkg/openbsd/patch/0014-Remove-getpass-definition.patch => pkg/openbsd/patch/0013-Remove-getpass-definition.patch
+0, -0
R pkg/openbsd/patch/0015-doas-Port-to-linux-musl.patch => pkg/openbsd/patch/0014-doas-Port-to-linux-musl.patch
+14, -14
  1@@ -1,4 +1,4 @@
  2-From 8fa1e97f6927bf1afddb5923fff3d29c3389817d Mon Sep 17 00:00:00 2001
  3+From cca6c84b472255c4d015d7d97225791796f61392 Mon Sep 17 00:00:00 2001
  4 From: Michael Forney <mforney@mforney.org>
  5 Date: Sun, 26 Feb 2017 16:50:55 -0800
  6 Subject: [PATCH] doas: Port to linux/musl
  7@@ -63,7 +63,7 @@ index 25827cc7104..3542680faf5 100644
  8  Parse and check the configuration file
  9  .Ar config ,
 10 diff --git a/usr.bin/doas/doas.c b/usr.bin/doas/doas.c
 11-index 8b684d6006c..27d7b01014e 100644
 12+index 3999b2e2f64..32532359267 100644
 13 --- a/usr.bin/doas/doas.c
 14 +++ b/usr.bin/doas/doas.c
 15 @@ -20,8 +20,6 @@
 16@@ -99,7 +99,7 @@ index 8b684d6006c..27d7b01014e 100644
 17  	    " command [arg ...]\n");
 18  	exit(1);
 19  }
 20-@@ -200,16 +207,28 @@ checkconfig(const char *confpath, int argc, char **argv,
 21+@@ -203,16 +210,28 @@ checkconfig(const char *confpath, int argc, char **argv,
 22  }
 23  
 24  static int
 25@@ -135,7 +135,7 @@ index 8b684d6006c..27d7b01014e 100644
 26  	if (!challenge) {
 27  		char host[HOST_NAME_MAX + 1];
 28  
 29-@@ -222,14 +241,12 @@ authuser_checkpass(char *myname, char *login_style)
 30+@@ -225,14 +244,12 @@ authuser_checkpass(char *myname, char *login_style)
 31  	response = readpassphrase(challenge, rbuf, sizeof(rbuf),
 32  	    RPP_REQUIRE_TTY);
 33  	if (response == NULL && errno == ENOTTY) {
 34@@ -153,7 +153,7 @@ index 8b684d6006c..27d7b01014e 100644
 35  		warnx("Authentication failed");
 36  		return AUTH_FAILED;
 37  	}
 38-@@ -238,79 +255,36 @@ authuser_checkpass(char *myname, char *login_style)
 39+@@ -241,79 +258,36 @@ authuser_checkpass(char *myname, char *login_style)
 40  }
 41  
 42  static void
 43@@ -241,7 +241,7 @@ index 8b684d6006c..27d7b01014e 100644
 44  	struct passwd mypwstore, targpwstore;
 45  	struct passwd *mypw, *targpw;
 46  	const struct rule *rule;
 47-@@ -323,28 +297,20 @@ main(int argc, char **argv)
 48+@@ -326,28 +300,20 @@ main(int argc, char **argv)
 49  	int nflag = 0;
 50  	char cwdpath[PATH_MAX];
 51  	const char *cwd;
 52@@ -273,10 +273,10 @@ index 8b684d6006c..27d7b01014e 100644
 53  		case 'u':
 54  			if (parseuid(optarg, &target) != 0)
 55  				errx(1, "unknown user");
 56-@@ -414,50 +380,30 @@ main(int argc, char **argv)
 57- 	cmd = argv[0];
 58- 	if (!permit(uid, groups, ngroups, &rule, target, cmd,
 59- 	    (const char **)argv + 1)) {
 60+@@ -418,50 +384,30 @@ main(int argc, char **argv)
 61+ 	rv = permit(uid, groups, ngroups, &rule, target, cmd,
 62+ 	    (const char **)argv + 1);
 63+ 	if (rv != 0) {
 64 -		syslog(LOG_AUTHPRIV | LOG_NOTICE,
 65 -		    "command not permitted for %s: %s", mypw->pw_name, cmdline);
 66 -		errc(1, EPERM, NULL);
 67@@ -334,7 +334,7 @@ index 8b684d6006c..27d7b01014e 100644
 68  
 69  	if (pledge("stdio rpath exec", NULL) == -1)
 70  		err(1, "pledge");
 71-@@ -471,23 +417,17 @@ main(int argc, char **argv)
 72+@@ -475,23 +421,17 @@ main(int argc, char **argv)
 73  		err(1, "pledge");
 74  
 75  	if (!(rule->options & NOLOG)) {
 76@@ -360,7 +360,7 @@ index 8b684d6006c..27d7b01014e 100644
 77  		errx(1, "%s: command not found", cmd);
 78  	err(1, "%s", cmd);
 79 diff --git a/usr.bin/doas/doas.h b/usr.bin/doas/doas.h
 80-index b98fe353b18..6567625c471 100644
 81+index ce6a03618ac..363e2626c23 100644
 82 --- a/usr.bin/doas/doas.h
 83 +++ b/usr.bin/doas/doas.h
 84 @@ -29,13 +29,17 @@ extern struct rule **rules;
 85@@ -379,7 +379,7 @@ index b98fe353b18..6567625c471 100644
 86 +int setpersist(int fd);
 87 +int clearpersist(void);
 88 +
 89- #define PERMIT	1
 90+ #define PERMIT	-1
 91  #define DENY	2
 92  
 93 diff --git a/usr.bin/doas/env.c b/usr.bin/doas/env.c
 94@@ -577,5 +577,5 @@ index 00000000000..4ad1bf1efbf
 95 +	return 0;
 96 +}
 97 -- 
 98-2.37.3
 99+2.49.0
100 
R pkg/openbsd/patch/0016-pwcache-Don-t-use-fixed-buffer-sizes.patch => pkg/openbsd/patch/0015-pwcache-Don-t-use-fixed-buffer-sizes.patch
+0, -0
R pkg/openbsd/patch/0017-Add-standalone-freezero.patch => pkg/openbsd/patch/0016-Add-standalone-freezero.patch
+0, -0
R pkg/openbsd/patch/0018-m4-Use-hand-written-lexer-to-avoid-cycle-in-bootstra.patch => pkg/openbsd/patch/0017-m4-Use-hand-written-lexer-to-avoid-cycle-in-bootstra.patch
+0, -0
R pkg/openbsd/patch/0019-m4-Use-_Noreturn-instead-of-__dead.patch => pkg/openbsd/patch/0018-m4-Use-_Noreturn-instead-of-__dead.patch
+4, -4
 1@@ -1,4 +1,4 @@
 2-From 0f0eb43f3d6fb749fac229e3d6c8f74b2c40ece2 Mon Sep 17 00:00:00 2001
 3+From eb6d8858f8dd92400efaa08680d28515270d4c35 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Tue, 10 Apr 2018 16:03:44 -0700
 6 Subject: [PATCH] m4: Use _Noreturn instead of __dead
 7@@ -8,10 +8,10 @@ Subject: [PATCH] m4: Use _Noreturn instead of __dead
 8  1 file changed, 1 insertion(+), 1 deletion(-)
 9 
10 diff --git a/usr.bin/m4/extern.h b/usr.bin/m4/extern.h
11-index ea8406b8540..0c07599777d 100644
12+index c7defe46c2c..de03e51995e 100644
13 --- a/usr.bin/m4/extern.h
14 +++ b/usr.bin/m4/extern.h
15-@@ -113,7 +113,7 @@ extern void	usage(void);
16+@@ -112,7 +112,7 @@ extern void	usage(void);
17  extern void	resizedivs(int);
18  extern size_t	buffer_mark(void);
19  extern void	dump_buffer(FILE *, size_t);
20@@ -21,5 +21,5 @@ index ea8406b8540..0c07599777d 100644
21  extern int	obtain_char(struct input_file *);
22  extern void	set_input(struct input_file *, FILE *, const char *);
23 -- 
24-2.17.0
25+2.49.0
26 
R pkg/openbsd/patch/0020-m4-Add-missing-includes.patch => pkg/openbsd/patch/0019-m4-Add-missing-includes.patch
+0, -0
R pkg/openbsd/patch/0021-libutil-Add-missing-includes.patch => pkg/openbsd/patch/0020-libutil-Add-missing-includes.patch
+0, -0
R pkg/openbsd/patch/0022-acme-client-Add-missing-includes.patch => pkg/openbsd/patch/0021-acme-client-Add-missing-includes.patch
+0, -0
R pkg/openbsd/patch/0023-rsync-Add-missing-includes.patch => pkg/openbsd/patch/0022-rsync-Add-missing-includes.patch
+9, -10
 1@@ -1,4 +1,4 @@
 2-From d423093f8dec64533733deb0762353f68b0adeb2 Mon Sep 17 00:00:00 2001
 3+From 9320adbea46f051b32c93a171dc0d52de8f845c3 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Fri, 14 Jun 2019 12:40:56 -0700
 6 Subject: [PATCH] rsync: Add missing includes
 7@@ -7,26 +7,25 @@ Subject: [PATCH] rsync: Add missing includes
 8 - stdint.h in extern.h for fixed-width integer types
 9 - sys/types.h in extern.h for various type definitions
10 ---
11- usr.bin/rsync/extern.h | 3 +++
12+ usr.bin/rsync/extern.h | 2 ++
13  usr.bin/rsync/socket.c | 1 +
14- 2 files changed, 4 insertions(+)
15+ 2 files changed, 3 insertions(+)
16 
17 diff --git a/usr.bin/rsync/extern.h b/usr.bin/rsync/extern.h
18-index 2815f82cf89..a3f2a15b959 100644
19+index 5bb23aaa486..55d7bc26ae2 100644
20 --- a/usr.bin/rsync/extern.h
21 +++ b/usr.bin/rsync/extern.h
22-@@ -17,6 +17,9 @@
23+@@ -17,6 +17,8 @@
24  #ifndef EXTERN_H
25  #define EXTERN_H
26  
27 +#include <stdint.h>
28 +#include <sys/types.h>
29-+
30+ #include <openssl/md4.h>
31+ 
32  /*
33-  * This is the rsync protocol version that we support.
34-  */
35 diff --git a/usr.bin/rsync/socket.c b/usr.bin/rsync/socket.c
36-index 953b229afbc..aa95cce9369 100644
37+index d723d9e7df4..adc4a22cf40 100644
38 --- a/usr.bin/rsync/socket.c
39 +++ b/usr.bin/rsync/socket.c
40 @@ -28,6 +28,7 @@
41@@ -38,5 +37,5 @@ index 953b229afbc..aa95cce9369 100644
42  #include <unistd.h>
43  #include <err.h>
44 -- 
45-2.34.1
46+2.49.0
47 
R pkg/openbsd/patch/0024-rsync-Use-standard-S_ISVTX-instead-of-S_ISTXT.patch => pkg/openbsd/patch/0023-rsync-Use-standard-S_ISVTX-instead-of-S_ISTXT.patch
+4, -4
 1@@ -1,4 +1,4 @@
 2-From d5670219baefe6769a42984abb93e19d8a43dada Mon Sep 17 00:00:00 2001
 3+From 6e087cd1f746eb636de0ec1769db6b4aac65e666 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Fri, 14 Jun 2019 12:42:15 -0700
 6 Subject: [PATCH] rsync: Use standard S_ISVTX instead of S_ISTXT
 7@@ -8,7 +8,7 @@ Subject: [PATCH] rsync: Use standard S_ISVTX instead of S_ISTXT
 8  1 file changed, 2 insertions(+), 2 deletions(-)
 9 
10 diff --git a/usr.bin/rsync/receiver.c b/usr.bin/rsync/receiver.c
11-index 6e5b01670cd..67510b3e932 100644
12+index 256a788b4f0..5dcc33b20fd 100644
13 --- a/usr.bin/rsync/receiver.c
14 +++ b/usr.bin/rsync/receiver.c
15 @@ -87,7 +87,7 @@ rsync_set_metadata(struct sess *sess, int newfile,
16@@ -20,7 +20,7 @@ index 6e5b01670cd..67510b3e932 100644
17  	}
18  
19  	/* Conditionally adjust file permissions. */
20-@@ -148,7 +148,7 @@ rsync_set_metadata_at(struct sess *sess, int newfile, int rootfd,
21+@@ -149,7 +149,7 @@ rsync_set_metadata_at(struct sess *sess, int newfile, int rootfd,
22  				    "to user.group: %u.%u", f->path, uid, gid);
23  		} else
24  			LOG4("%s: updated uid and/or gid", f->path);
25@@ -30,5 +30,5 @@ index 6e5b01670cd..67510b3e932 100644
26  
27  	/* Conditionally adjust file permissions. */
28 -- 
29-2.34.1
30+2.49.0
31 
R pkg/openbsd/patch/0025-rsync-Avoid-pointer-arithmetic-on-void.patch => pkg/openbsd/patch/0024-rsync-Avoid-pointer-arithmetic-on-void.patch
+9, -9
 1@@ -1,4 +1,4 @@
 2-From b93dee95670eccc6a5c34f1f8a3b828998d0da7b Mon Sep 17 00:00:00 2001
 3+From 3823d88a12d7c95de2d4b68796b5faa7f550caed Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Sat, 15 Jun 2019 20:06:13 -0700
 6 Subject: [PATCH] rsync: Avoid pointer arithmetic on `void *`
 7@@ -11,10 +11,10 @@ Subject: [PATCH] rsync: Avoid pointer arithmetic on `void *`
 8  4 files changed, 14 insertions(+), 13 deletions(-)
 9 
10 diff --git a/usr.bin/rsync/blocks.c b/usr.bin/rsync/blocks.c
11-index 56790729f27..906733c968e 100644
12+index d1d9b19c31e..8f4bcb532e1 100644
13 --- a/usr.bin/rsync/blocks.c
14 +++ b/usr.bin/rsync/blocks.c
15-@@ -157,7 +157,7 @@ blk_find(struct sess *sess, struct blkstat *st,
16+@@ -163,7 +163,7 @@ blk_find(struct sess *sess, struct blkstat *st,
17  	if (!recomp) {
18  		fhash = (st->s1 & 0xFFFF) | (st->s2 << 16);
19  	} else {
20@@ -23,7 +23,7 @@ index 56790729f27..906733c968e 100644
21  		st->s1 = fhash & 0xFFFF;
22  		st->s2 = fhash >> 16;
23  	}
24-@@ -170,7 +170,7 @@ blk_find(struct sess *sess, struct blkstat *st,
25+@@ -176,7 +176,7 @@ blk_find(struct sess *sess, struct blkstat *st,
26  	if (st->hint < blks->blksz &&
27  	    fhash == blks->blks[st->hint].chksum_short &&
28  	    (size_t)osz == blks->blks[st->hint].len) {
29@@ -32,7 +32,7 @@ index 56790729f27..906733c968e 100644
30  		have_md = 1;
31  		if (memcmp(md, blks->blks[st->hint].chksum_long, blks->csum) == 0) {
32  			LOG4("%s: found matching hinted match: "
33-@@ -203,7 +203,7 @@ blk_find(struct sess *sess, struct blkstat *st,
34+@@ -209,7 +209,7 @@ blk_find(struct sess *sess, struct blkstat *st,
35  		    (intmax_t)ent->blk->offs, ent->blk->len);
36  
37  		if (have_md == 0) {
38@@ -41,7 +41,7 @@ index 56790729f27..906733c968e 100644
39  			have_md = 1;
40  		}
41  
42-@@ -221,7 +221,7 @@ blk_find(struct sess *sess, struct blkstat *st,
43+@@ -227,7 +227,7 @@ blk_find(struct sess *sess, struct blkstat *st,
44  	 * block in the sequence.
45  	 */
46  
47@@ -122,7 +122,7 @@ index dc224ae8aed..fcf9e92dbaa 100644
48  }
49  
50 diff --git a/usr.bin/rsync/sender.c b/usr.bin/rsync/sender.c
51-index e2999aa2589..9dd008def01 100644
52+index c54fbc2dae0..6469e7f27e5 100644
53 --- a/usr.bin/rsync/sender.c
54 +++ b/usr.bin/rsync/sender.c
55 @@ -128,7 +128,7 @@ send_up_fsm(struct sess *sess, size_t *phase,
56@@ -134,7 +134,7 @@ index e2999aa2589..9dd008def01 100644
57  
58  		up->stat.curpos += sz;
59  		if (up->stat.curpos == up->stat.curlen)
60-@@ -557,7 +557,8 @@ rsync_sender(struct sess *sess, int fdin,
61+@@ -561,7 +561,8 @@ rsync_sender(struct sess *sess, int fdin,
62  		if ((pfd[1].revents & POLLOUT) && wbufsz > 0) {
63  			assert(pfd[2].fd == -1);
64  			assert(wbufsz - wbufpos);
65@@ -145,5 +145,5 @@ index e2999aa2589..9dd008def01 100644
66  				ERR("write");
67  				goto out;
68 -- 
69-2.37.3
70+2.49.0
71 
R pkg/openbsd/patch/0026-Include-sys-sysmacros.h-if-necessary.patch => pkg/openbsd/patch/0025-Include-sys-sysmacros.h-if-necessary.patch
+7, -7
 1@@ -1,4 +1,4 @@
 2-From 0d3a091280d0874fb561c83431803eb2489876cb Mon Sep 17 00:00:00 2001
 3+From bf938d0fd70582d8d7942c2f04c2d4209b9b8633 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Mon, 5 Aug 2019 21:42:54 -0700
 6 Subject: [PATCH] Include sys/sysmacros.h if necessary
 7@@ -11,7 +11,7 @@ Subject: [PATCH] Include sys/sysmacros.h if necessary
 8  4 files changed, 14 insertions(+)
 9 
10 diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c
11-index 92fe965163a..3832b1e87aa 100644
12+index be0316d8dd9..fbcf032e091 100644
13 --- a/bin/pax/cpio.c
14 +++ b/bin/pax/cpio.c
15 @@ -41,6 +41,10 @@
16@@ -26,7 +26,7 @@ index 92fe965163a..3832b1e87aa 100644
17  #include "cpio.h"
18  #include "extern.h"
19 diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c
20-index 42c70804fb7..405dd2c24ed 100644
21+index fcda4d37391..928cfcd3657 100644
22 --- a/bin/pax/gen_subs.c
23 +++ b/bin/pax/gen_subs.c
24 @@ -45,6 +45,9 @@
25@@ -40,10 +40,10 @@ index 42c70804fb7..405dd2c24ed 100644
26  #include "pax.h"
27  #include "extern.h"
28 diff --git a/bin/pax/tar.c b/bin/pax/tar.c
29-index 9d8a92d9d13..e84a9c69a09 100644
30+index ef22a9fd2d8..a0cbb31b547 100644
31 --- a/bin/pax/tar.c
32 +++ b/bin/pax/tar.c
33-@@ -45,6 +45,9 @@
34+@@ -47,6 +47,9 @@
35  #include <stdlib.h>
36  #include <string.h>
37  #include <unistd.h>
38@@ -54,7 +54,7 @@ index 9d8a92d9d13..e84a9c69a09 100644
39  #include "pax.h"
40  #include "extern.h"
41 diff --git a/usr.bin/rsync/flist.c b/usr.bin/rsync/flist.c
42-index 392ba494423..5f15487623a 100644
43+index cdc9f1da1dd..8832420cce0 100644
44 --- a/usr.bin/rsync/flist.c
45 +++ b/usr.bin/rsync/flist.c
46 @@ -16,6 +16,10 @@
47@@ -69,5 +69,5 @@ index 392ba494423..5f15487623a 100644
48  #include <assert.h>
49  #include <errno.h>
50 -- 
51-2.34.1
52+2.49.0
53 
R pkg/openbsd/patch/0027-nc-Portability-fixes-from-libressl-portable.patch => pkg/openbsd/patch/0026-nc-Portability-fixes-from-libressl-portable.patch
+11, -11
 1@@ -1,4 +1,4 @@
 2-From 6c278af8cc6a9fcb94b9bbe572b0bd3f7dd492c1 Mon Sep 17 00:00:00 2001
 3+From 05fd24cc7b3f1b73a58d41d70ef725925007165c Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Mon, 2 Dec 2019 21:11:04 -0800
 6 Subject: [PATCH] nc: Portability fixes from libressl-portable
 7@@ -8,7 +8,7 @@ Subject: [PATCH] nc: Portability fixes from libressl-portable
 8  1 file changed, 48 insertions(+), 7 deletions(-)
 9 
10 diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
11-index c8f1cdd9f75..7369ed85619 100644
12+index 8c60fd18826..b5129c2204d 100644
13 --- a/usr.bin/nc/netcat.c
14 +++ b/usr.bin/nc/netcat.c
15 @@ -93,9 +93,13 @@ int	zflag;					/* Port Scan Flag */
16@@ -64,7 +64,7 @@ index c8f1cdd9f75..7369ed85619 100644
17  
18  	/* Cruft to make sure options are clean, and used properly. */
19  	if (argc == 1 && family == AF_UNIX) {
20-@@ -927,7 +937,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
21+@@ -923,7 +933,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
22      char *ipaddr)
23  {
24  	struct addrinfo *res, *res0;
25@@ -76,7 +76,7 @@ index c8f1cdd9f75..7369ed85619 100644
26  
27  	if ((error = getaddrinfo(host, port, &hints, &res0)))
28  		errx(1, "getaddrinfo for host \"%s\" port %s: %s", host,
29-@@ -942,8 +955,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
30+@@ -938,8 +951,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
31  		if (sflag || pflag) {
32  			struct addrinfo ahints, *ares;
33  
34@@ -87,7 +87,7 @@ index c8f1cdd9f75..7369ed85619 100644
35  			memset(&ahints, 0, sizeof(struct addrinfo));
36  			ahints.ai_family = res->ai_family;
37  			ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
38-@@ -1035,8 +1050,11 @@ int
39+@@ -1031,8 +1046,11 @@ int
40  local_listen(const char *host, const char *port, struct addrinfo hints)
41  {
42  	struct addrinfo *res, *res0;
43@@ -100,7 +100,7 @@ index c8f1cdd9f75..7369ed85619 100644
44  
45  	/* Allow nodename to be null. */
46  	hints.ai_flags |= AI_PASSIVE;
47-@@ -1056,9 +1074,11 @@ local_listen(const char *host, const char *port, struct addrinfo hints)
48+@@ -1052,9 +1070,11 @@ local_listen(const char *host, const char *port, struct addrinfo hints)
49  		    res->ai_protocol)) == -1)
50  			continue;
51  
52@@ -112,7 +112,7 @@ index c8f1cdd9f75..7369ed85619 100644
53  
54  		set_common_sockopts(s, res->ai_family);
55  
56-@@ -1557,11 +1577,13 @@ set_common_sockopts(int s, int af)
57+@@ -1559,11 +1579,13 @@ set_common_sockopts(int s, int af)
58  {
59  	int x = 1;
60  
61@@ -126,7 +126,7 @@ index c8f1cdd9f75..7369ed85619 100644
62  	if (Dflag) {
63  		if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
64  		    &x, sizeof(x)) == -1)
65-@@ -1572,9 +1594,16 @@ set_common_sockopts(int s, int af)
66+@@ -1574,9 +1596,16 @@ set_common_sockopts(int s, int af)
67  		    IP_TOS, &Tflag, sizeof(Tflag)) == -1)
68  			err(1, "set IP ToS");
69  
70@@ -143,7 +143,7 @@ index c8f1cdd9f75..7369ed85619 100644
71  	}
72  	if (Iflag) {
73  		if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
74-@@ -1598,13 +1627,17 @@ set_common_sockopts(int s, int af)
75+@@ -1600,13 +1629,17 @@ set_common_sockopts(int s, int af)
76  	}
77  
78  	if (minttl != -1) {
79@@ -162,7 +162,7 @@ index c8f1cdd9f75..7369ed85619 100644
80  	}
81  }
82  
83-@@ -1829,14 +1862,22 @@ help(void)
84+@@ -1831,14 +1864,22 @@ help(void)
85  	\t-P proxyuser\tUsername for proxy authentication\n\
86  	\t-p port\t	Specify local port for remote connects\n\
87  	\t-R CAfile	CA bundle\n\
88@@ -190,5 +190,5 @@ index c8f1cdd9f75..7369ed85619 100644
89  	\t-W recvlimit	Terminate after receiving a number of packets\n\
90  	\t-w timeout	Timeout for connects and final net reads\n\
91 -- 
92-2.37.3
93+2.49.0
94 
R pkg/openbsd/patch/0028-pax-Ignore-EOPNOTSUPP-from-fchmodat.patch => pkg/openbsd/patch/0027-pax-Ignore-EOPNOTSUPP-from-fchmodat.patch
+4, -4
 1@@ -1,4 +1,4 @@
 2-From 0f49ae38698a163f7954d28bbaba473b6bf28239 Mon Sep 17 00:00:00 2001
 3+From 38b0c680777d5eb9cc69cd8fbc38fe3dc5a0927a Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Fri, 10 Jan 2020 21:40:03 -0800
 6 Subject: [PATCH] pax: Ignore EOPNOTSUPP from fchmodat
 7@@ -9,10 +9,10 @@ Linux does not support changing the mode of symlinks.
 8  1 file changed, 1 insertion(+), 1 deletion(-)
 9 
10 diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c
11-index 8aa3d249923..2c0994feca6 100644
12+index ae0caf29f6c..429705976dc 100644
13 --- a/bin/pax/file_subs.c
14 +++ b/bin/pax/file_subs.c
15-@@ -795,7 +795,7 @@ void
16+@@ -800,7 +800,7 @@ void
17  set_pmode(char *fnm, mode_t mode)
18  {
19  	mode &= ABITS;
20@@ -22,5 +22,5 @@ index 8aa3d249923..2c0994feca6 100644
21  }
22  
23 -- 
24-2.26.2
25+2.49.0
26 
R pkg/openbsd/patch/0029-acme-client-Fix-build-with-old-bison-versions.patch => pkg/openbsd/patch/0028-acme-client-Fix-build-with-old-bison-versions.patch
+0, -0
R pkg/openbsd/patch/0030-rsync-Add-implementation-of-MD4.patch => pkg/openbsd/patch/0029-rsync-Add-implementation-of-MD4.patch
+21, -6
 1@@ -1,4 +1,4 @@
 2-From 01657f2c1445cf4874337a0966a76f24ba9c9536 Mon Sep 17 00:00:00 2001
 3+From f6b4408dd3b8ddfa1dca692e1c52643d857d8102 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Wed, 15 Apr 2020 22:10:06 -0700
 6 Subject: [PATCH] rsync: Add implementation of MD4
 7@@ -7,11 +7,12 @@ Subject: [PATCH] rsync: Add implementation of MD4
 8  usr.bin/rsync/Makefile     |   2 +-
 9  usr.bin/rsync/blocks.c     |   2 +-
10  usr.bin/rsync/downloader.c |   2 +-
11+ usr.bin/rsync/extern.h     |   3 +-
12  usr.bin/rsync/hash.c       |   2 +-
13  usr.bin/rsync/md4.c        | 266 +++++++++++++++++++++++++++++++++++++
14  usr.bin/rsync/md4.h        |  47 +++++++
15  usr.bin/rsync/sender.c     |   2 +-
16- 7 files changed, 318 insertions(+), 5 deletions(-)
17+ 8 files changed, 320 insertions(+), 6 deletions(-)
18  create mode 100644 usr.bin/rsync/md4.c
19  create mode 100644 usr.bin/rsync/md4.h
20 
21@@ -29,7 +30,7 @@ index 3c60f18e07f..172045ce7ac 100644
22  LDADD+= -lcrypto -lm -lutil
23  DPADD+= ${LIBCRYPTO} ${LIBM} ${LIBUTIL}
24 diff --git a/usr.bin/rsync/blocks.c b/usr.bin/rsync/blocks.c
25-index 906733c968e..0a8c3f485d1 100644
26+index 8f4bcb532e1..f21c9178487 100644
27 --- a/usr.bin/rsync/blocks.c
28 +++ b/usr.bin/rsync/blocks.c
29 @@ -26,7 +26,7 @@
30@@ -54,8 +55,22 @@ index 07ec334f6b4..6543851fd2c 100644
31  
32  #include "extern.h"
33  
34+diff --git a/usr.bin/rsync/extern.h b/usr.bin/rsync/extern.h
35+index 55d7bc26ae2..d6b02fd4ad4 100644
36+--- a/usr.bin/rsync/extern.h
37++++ b/usr.bin/rsync/extern.h
38+@@ -19,7 +19,8 @@
39+ 
40+ #include <stdint.h>
41+ #include <sys/types.h>
42+-#include <openssl/md4.h>
43++
44++#include "md4.h"
45+ 
46+ /*
47+  * This is the rsync protocol version that we support.
48 diff --git a/usr.bin/rsync/hash.c b/usr.bin/rsync/hash.c
49-index b87c56f527c..44ae0d26282 100644
50+index 37529e951b4..e3f52047404 100644
51 --- a/usr.bin/rsync/hash.c
52 +++ b/usr.bin/rsync/hash.c
53 @@ -21,7 +21,7 @@
54@@ -393,7 +408,7 @@ index 00000000000..ebf5bb555a0
55 +
56 +#endif
57 diff --git a/usr.bin/rsync/sender.c b/usr.bin/rsync/sender.c
58-index 9dd008def01..2aeb99b64a0 100644
59+index 6469e7f27e5..81b25b9ee78 100644
60 --- a/usr.bin/rsync/sender.c
61 +++ b/usr.bin/rsync/sender.c
62 @@ -26,7 +26,7 @@
63@@ -406,5 +421,5 @@ index 9dd008def01..2aeb99b64a0 100644
64  #include "extern.h"
65  
66 -- 
67-2.35.1
68+2.49.0
69 
R pkg/openbsd/patch/0031-pax-Fix-some-incorrect-format-specifiers.patch => pkg/openbsd/patch/0030-pax-Fix-some-incorrect-format-specifiers.patch
+8, -8
 1@@ -1,4 +1,4 @@
 2-From f855b534ca2c34c3691a0c89d1be482a33a3610c Mon Sep 17 00:00:00 2001
 3+From e62d415fb66744cac915dc1873e09774a705d536 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Thu, 4 Jun 2020 21:36:11 -0700
 6 Subject: [PATCH] pax: Fix some incorrect format specifiers
 7@@ -9,7 +9,7 @@ Subject: [PATCH] pax: Fix some incorrect format specifiers
 8  2 files changed, 3 insertions(+), 3 deletions(-)
 9 
10 diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c
11-index 3832b1e87aa..769a9dfb990 100644
12+index fbcf032e091..1242ad0d8a7 100644
13 --- a/bin/pax/cpio.c
14 +++ b/bin/pax/cpio.c
15 @@ -214,7 +214,7 @@ rd_ln_nm(ARCHD *arcn)
16@@ -22,19 +22,19 @@ index 3832b1e87aa..769a9dfb990 100644
17  		return(-1);
18  	}
19 diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c
20-index 405dd2c24ed..7eb82007e3b 100644
21+index 928cfcd3657..897a688327e 100644
22 --- a/bin/pax/gen_subs.c
23 +++ b/bin/pax/gen_subs.c
24-@@ -109,7 +109,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
25- 	if (strftime(f_date, sizeof(f_date), TIMEFMT(sbp->st_mtime, now),
26- 	    localtime(&(sbp->st_mtime))) == 0)
27+@@ -112,7 +112,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
28+ 	else if (strftime(f_date, sizeof(f_date), TIMEFMT(sbp->st_mtime, now),
29+ 	    tm) == 0)
30  		f_date[0] = '\0';
31 -	(void)fprintf(fp, "%s%2u %-*.*s %-*.*s ", f_mode, sbp->st_nlink,
32 +	(void)fprintf(fp, "%s%2u %-*.*s %-*.*s ", f_mode, (unsigned)sbp->st_nlink,
33  		NAME_WIDTH, UT_NAMESIZE, user_from_uid(sbp->st_uid, 0),
34  		NAME_WIDTH, UT_NAMESIZE, group_from_gid(sbp->st_gid, 0));
35  
36-@@ -121,7 +121,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
37+@@ -124,7 +124,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
38  		    (unsigned long)MAJOR(sbp->st_rdev),
39  		    (unsigned long)MINOR(sbp->st_rdev));
40  	else {
41@@ -44,5 +44,5 @@ index 405dd2c24ed..7eb82007e3b 100644
42  
43  	/*
44 -- 
45-2.27.0
46+2.49.0
47 
+38, -0
 1@@ -0,0 +1,38 @@
 2+From dc49fca08adc0fd8cd9565f2aeca6dc2c8d1fbd2 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 4 Jun 2020 21:44:26 -0700
 5+Subject: [PATCH] pax: Use memcpy to set TMAGIC and TVERSION to avoid warning
 6+
 7+---
 8+ bin/pax/tar.c | 8 ++++----
 9+ 1 file changed, 4 insertions(+), 4 deletions(-)
10+
11+diff --git a/bin/pax/tar.c b/bin/pax/tar.c
12+index a0cbb31b547..095eef85af0 100644
13+--- a/bin/pax/tar.c
14++++ b/bin/pax/tar.c
15+@@ -1055,8 +1055,8 @@ wr_xheader(ARCHD *arcn, struct xheader *xhdr)
16+ 	memset(hdblk, 0, sizeof(hdblk));
17+ 	hd = (HD_USTAR *)hdblk;
18+ 	hd->typeflag = XHDRTYPE;
19+-	strncpy(hd->magic, TMAGIC, TMAGLEN);
20+-	strncpy(hd->version, TVERSION, TVERSLEN);
21++	memcpy(hd->magic, TMAGIC, TMAGLEN);
22++	memcpy(hd->version, TVERSION, TVERSLEN);
23+ 	if (ul_oct(size, hd->size, sizeof(hd->size), 3))
24+ 		return -1;
25+ 
26+@@ -1263,8 +1263,8 @@ wr_ustar_or_pax(ARCHD *arcn, int ustar)
27+ 		break;
28+ 	}
29+ 
30+-	strncpy(hd->magic, TMAGIC, TMAGLEN);
31+-	strncpy(hd->version, TVERSION, TVERSLEN);
32++	memcpy(hd->magic, TMAGIC, TMAGLEN);
33++	memcpy(hd->version, TVERSION, TVERSLEN);
34+ 
35+ 	/*
36+ 	 * set the remaining fields. Some versions want all 16 bits of mode
37+-- 
38+2.49.0
39+
+0, -27
 1@@ -1,27 +0,0 @@
 2-From e5c8e801a42459bf0c416f6751b687d61f46fcf1 Mon Sep 17 00:00:00 2001
 3-From: Michael Forney <mforney@mforney.org>
 4-Date: Thu, 4 Jun 2020 21:44:26 -0700
 5-Subject: [PATCH] pax: Use memcpy to set TMAGIC and TVERSION to avoid warning
 6-
 7----
 8- bin/pax/tar.c | 4 ++--
 9- 1 file changed, 2 insertions(+), 2 deletions(-)
10-
11-diff --git a/bin/pax/tar.c b/bin/pax/tar.c
12-index 8d6b3f37012..1f4012123c3 100644
13---- a/bin/pax/tar.c
14-+++ b/bin/pax/tar.c
15-@@ -1040,8 +1040,8 @@ ustar_wr(ARCHD *arcn)
16- 		break;
17- 	}
18- 
19--	strncpy(hd->magic, TMAGIC, TMAGLEN);
20--	strncpy(hd->version, TVERSION, TVERSLEN);
21-+	memcpy(hd->magic, TMAGIC, TMAGLEN);
22-+	memcpy(hd->version, TVERSION, TVERSLEN);
23- 
24- 	/*
25- 	 * set the remaining fields. Some versions want all 16 bits of mode
26--- 
27-2.35.1
28-
R pkg/openbsd/patch/0033-rsync-Fix-some-incorrect-format-specifiers.patch => pkg/openbsd/patch/0032-rsync-Fix-some-incorrect-format-specifiers.patch
+8, -8
 1@@ -1,4 +1,4 @@
 2-From 0a32d4f555441c1928547f8f08a6373a6c9d8bf1 Mon Sep 17 00:00:00 2001
 3+From e2bc701601abc23299d9a694cb3173bdb44fff83 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Thu, 4 Jun 2020 21:36:24 -0700
 6 Subject: [PATCH] rsync: Fix some incorrect format specifiers
 7@@ -9,10 +9,10 @@ Subject: [PATCH] rsync: Fix some incorrect format specifiers
 8  2 files changed, 3 insertions(+), 3 deletions(-)
 9 
10 diff --git a/usr.bin/rsync/fargs.c b/usr.bin/rsync/fargs.c
11-index 7ccb5bff7d2..ef1aaf37c87 100644
12+index cbc8537f38c..0b1c255550d 100644
13 --- a/usr.bin/rsync/fargs.c
14 +++ b/usr.bin/rsync/fargs.c
15-@@ -132,9 +132,9 @@ fargs_cmdline(struct sess *sess, const struct fargs *f, size_t *skip)
16+@@ -134,9 +134,9 @@ fargs_cmdline(struct sess *sess, const struct fargs *f, size_t *skip)
17  		/* --devices is sent as -D --no-specials */
18  		addargs(&args, "--no-specials");
19  	if (sess->opts->max_size >= 0)
20@@ -22,13 +22,13 @@ index 7ccb5bff7d2..ef1aaf37c87 100644
21 -		addargs(&args, "--min-size=%lld", sess->opts->min_size);
22 +		addargs(&args, "--min-size=%jd", (intmax_t)sess->opts->min_size);
23  
24- 	/* only add --compare-dest, etc if this is the sender */
25- 	if (sess->opts->alt_base_mode != 0 &&
26+ 	/* extra options for the receiver (local is sender) */
27+ 	if (f->mode == FARGS_SENDER) {
28 diff --git a/usr.bin/rsync/uploader.c b/usr.bin/rsync/uploader.c
29-index 678b6c96218..951a5ee4133 100644
30+index 6cb6d054da7..09fedfaadbc 100644
31 --- a/usr.bin/rsync/uploader.c
32 +++ b/usr.bin/rsync/uploader.c
33-@@ -1010,7 +1010,7 @@ rsync_uploader(struct upload *u, int *fileinfd,
34+@@ -1020,7 +1020,7 @@ rsync_uploader(struct upload *u, int *fileinfd,
35  			init_blk(&blk.blks[i], &blk, offs, i, mbuf, sess);
36  			offs += blk.len;
37  			LOG3(
38@@ -38,5 +38,5 @@ index 678b6c96218..951a5ee4133 100644
39  			i++;
40  		} while (i < blk.blksz);
41 -- 
42-2.35.1
43+2.49.0
44 
R pkg/openbsd/patch/0034-m4-Declare-dopaste-only-when-it-s-used.patch => pkg/openbsd/patch/0033-m4-Declare-dopaste-only-when-it-s-used.patch
+0, -0
R pkg/openbsd/patch/0035-acme-client-Fix-signed-ness-of-base64buf_url-input.patch => pkg/openbsd/patch/0034-acme-client-Fix-signed-ness-of-base64buf_url-input.patch
+13, -13
 1@@ -1,4 +1,4 @@
 2-From cc94758cade79724cc820e654ae12bee639c2692 Mon Sep 17 00:00:00 2001
 3+From 67ffb8812ee7ac5fe23a5149ff643d1f392fb1f5 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Fri, 23 Apr 2021 20:10:05 -0700
 6 Subject: [PATCH] acme-client: Fix signed-ness of base64buf_url input
 7@@ -13,10 +13,10 @@ This make most of the pointer casts unnecessary.
 8  5 files changed, 18 insertions(+), 14 deletions(-)
 9 
10 diff --git a/usr.sbin/acme-client/acctproc.c b/usr.sbin/acme-client/acctproc.c
11-index e3a0eb64dec..23d8a1c3a33 100644
12+index da3d49107ae..9e97a8bb760 100644
13 --- a/usr.sbin/acme-client/acctproc.c
14 +++ b/usr.sbin/acme-client/acctproc.c
15-@@ -43,8 +43,9 @@
16+@@ -42,8 +42,9 @@
17  static char *
18  bn2string(const BIGNUM *bn)
19  {
20@@ -28,7 +28,7 @@ index e3a0eb64dec..23d8a1c3a33 100644
21  
22  	/* Extract big-endian representation of BIGNUM. */
23  
24-@@ -52,7 +53,7 @@ bn2string(const BIGNUM *bn)
25+@@ -51,7 +52,7 @@ bn2string(const BIGNUM *bn)
26  	if ((buf = malloc(len)) == NULL) {
27  		warn("malloc");
28  		return NULL;
29@@ -37,7 +37,7 @@ index e3a0eb64dec..23d8a1c3a33 100644
30  		warnx("BN_bn2bin");
31  		free(buf);
32  		return NULL;
33-@@ -168,7 +169,7 @@ op_thumbprint(int fd, EVP_PKEY *pkey)
34+@@ -167,7 +168,7 @@ op_thumbprint(int fd, EVP_PKEY *pkey)
35  		warnx("EVP_Digest");
36  		goto out;
37  	}
38@@ -46,7 +46,7 @@ index e3a0eb64dec..23d8a1c3a33 100644
39  		warnx("base64buf_url");
40  		goto out;
41  	}
42-@@ -282,7 +283,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
43+@@ -281,7 +282,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
44  
45  	/* Base64-encode the payload. */
46  
47@@ -55,7 +55,7 @@ index e3a0eb64dec..23d8a1c3a33 100644
48  		warnx("base64buf_url");
49  		goto out;
50  	}
51-@@ -325,7 +326,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
52+@@ -324,7 +325,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
53  
54  	/* The header combined with the nonce, base64. */
55  
56@@ -64,7 +64,7 @@ index e3a0eb64dec..23d8a1c3a33 100644
57  		warnx("base64buf_url");
58  		goto out;
59  	}
60-@@ -364,7 +365,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
61+@@ -363,7 +364,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
62  
63  	switch (EVP_PKEY_base_id(pkey)) {
64  	case EVP_PKEY_RSA:
65@@ -73,7 +73,7 @@ index e3a0eb64dec..23d8a1c3a33 100644
66  			warnx("base64buf_url");
67  			goto out;
68  		}
69-@@ -403,7 +404,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
70+@@ -402,7 +403,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
71  			goto out;
72  		}
73  
74@@ -96,12 +96,12 @@ index 2b6377f0d81..0d84ad4b458 100644
75  	size_t	 i, sz;
76  	char	*buf;
77 diff --git a/usr.sbin/acme-client/extern.h b/usr.sbin/acme-client/extern.h
78-index 32d4b4b3d85..701733df786 100644
79+index 915f80e3992..5b0950b0693 100644
80 --- a/usr.sbin/acme-client/extern.h
81 +++ b/usr.sbin/acme-client/extern.h
82-@@ -245,7 +245,7 @@ int		 checkexit_ext(int *, pid_t, enum comp);
83+@@ -244,7 +244,7 @@ int		 checkexit_ext(int *, pid_t, enum comp);
84+  * Returns a buffer or NULL on allocation error.
85   */
86- size_t		 base64buf(char *, const char *, size_t);
87  size_t		 base64len(size_t);
88 -char		*base64buf_url(const char *, size_t);
89 +char		*base64buf_url(const unsigned char *, size_t);
90@@ -156,5 +156,5 @@ index 0f1bf32678b..58e81233f1a 100644
91  			goto out;
92  		} else if ((der64 = base64buf_url(der, len)) == NULL) {
93 -- 
94-2.37.3
95+2.49.0
96 
R pkg/openbsd/patch/0036-acme-client-Port-to-BearSSL.patch => pkg/openbsd/patch/0035-acme-client-Port-to-BearSSL.patch
+102, -107
  1@@ -1,22 +1,22 @@
  2-From 01e722b50d1f5b56bd1f4a1673d0d812958cc49c Mon Sep 17 00:00:00 2001
  3+From 1ab0f94943e02c49d88a358351914f9032a5bca3 Mon Sep 17 00:00:00 2001
  4 From: Michael Forney <mforney@mforney.org>
  5 Date: Fri, 23 Apr 2021 23:14:16 -0700
  6 Subject: [PATCH] acme-client: Port to BearSSL
  7 
  8 ---
  9- usr.sbin/acme-client/acctproc.c   | 299 +++++++++------------------
 10+ usr.sbin/acme-client/acctproc.c   | 298 +++++++++------------------
 11  usr.sbin/acme-client/certproc.c   |   5 -
 12- usr.sbin/acme-client/key.c        | 333 ++++++++++++++++++++++++------
 13+ usr.sbin/acme-client/key.c        | 329 ++++++++++++++++++++++++------
 14  usr.sbin/acme-client/key.h        |  22 +-
 15  usr.sbin/acme-client/keyproc.c    | 198 ++++++------------
 16- usr.sbin/acme-client/revokeproc.c | 235 ++++++++++-----------
 17- 6 files changed, 558 insertions(+), 534 deletions(-)
 18+ usr.sbin/acme-client/revokeproc.c | 237 ++++++++++-----------
 19+ 6 files changed, 564 insertions(+), 525 deletions(-)
 20 
 21 diff --git a/usr.sbin/acme-client/acctproc.c b/usr.sbin/acme-client/acctproc.c
 22-index 23d8a1c3a33..3d3e32c1a57 100644
 23+index 9e97a8bb760..8d66dac49d9 100644
 24 --- a/usr.sbin/acme-client/acctproc.c
 25 +++ b/usr.sbin/acme-client/acctproc.c
 26-@@ -19,74 +19,29 @@
 27+@@ -19,73 +19,29 @@
 28  
 29  #include <err.h>
 30  #include <errno.h>
 31@@ -28,7 +28,6 @@ index 23d8a1c3a33..3d3e32c1a57 100644
 32  
 33 -#include <openssl/bn.h>
 34 -#include <openssl/ec.h>
 35--#include <openssl/ecdsa.h>
 36 -#include <openssl/evp.h>
 37 -#include <openssl/rsa.h>
 38 -#include <openssl/err.h>
 39@@ -98,7 +97,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
 40  	else if ((json = json_fmt_thumb_rsa(exp, mod)) == NULL)
 41  		warnx("json_fmt_thumb_rsa");
 42  
 43-@@ -100,31 +55,23 @@ op_thumb_rsa(EVP_PKEY *pkey)
 44+@@ -99,31 +55,23 @@ op_thumb_rsa(EVP_PKEY *pkey)
 45   * thumbprint from them.
 46   */
 47  static char *
 48@@ -140,7 +139,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
 49  	free(x);
 50  	free(y);
 51  	return json;
 52-@@ -134,26 +81,26 @@ op_thumb_ec(EVP_PKEY *pkey)
 53+@@ -133,26 +81,26 @@ op_thumb_ec(EVP_PKEY *pkey)
 54   * The thumbprint operation is used for the challenge sequence.
 55   */
 56  static int
 57@@ -176,7 +175,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
 58  		goto out;
 59  	}
 60  
 61-@@ -164,12 +111,10 @@ op_thumbprint(int fd, EVP_PKEY *pkey)
 62+@@ -163,12 +111,10 @@ op_thumbprint(int fd, EVP_PKEY *pkey)
 63  	 * it up in the read loop).
 64  	 */
 65  
 66@@ -193,7 +192,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
 67  		warnx("base64buf_url");
 68  		goto out;
 69  	}
 70-@@ -184,11 +129,10 @@ out:
 71+@@ -183,11 +129,10 @@ out:
 72  }
 73  
 74  static int
 75@@ -206,7 +205,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
 76  
 77  	*prot = NULL;
 78  
 79-@@ -197,12 +141,10 @@ op_sign_rsa(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 80+@@ -196,12 +141,10 @@ op_sign_rsa(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 81  	 * Finally, format the header combined with the nonce.
 82  	 */
 83  
 84@@ -223,7 +222,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
 85  	else if ((*prot = json_fmt_protected_rsa(exp, mod, nonce, url)) == NULL)
 86  		warnx("json_fmt_protected_rsa");
 87  	else
 88-@@ -214,35 +156,27 @@ op_sign_rsa(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 89+@@ -213,35 +156,27 @@ op_sign_rsa(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 90  }
 91  
 92  static int
 93@@ -269,7 +268,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
 94  	free(x);
 95  	free(y);
 96  	return rc;
 97-@@ -253,20 +187,18 @@ op_sign_ec(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 98+@@ -252,20 +187,18 @@ op_sign_ec(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 99   * This requires the sender ("fd") to provide the payload and a nonce.
100   */
101  static int
102@@ -298,7 +297,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
103  
104  	/* Read our payload and nonce from the requestor. */
105  
106-@@ -283,19 +215,22 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
107+@@ -282,19 +215,22 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
108  
109  	/* Base64-encode the payload. */
110  
111@@ -327,7 +326,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
112  		break;
113  	default:
114  		warnx("unknown account key type");
115-@@ -309,17 +244,17 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
116+@@ -308,17 +244,17 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
117  			goto out;
118  		}
119  	} else {
120@@ -351,7 +350,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
121  			goto out;
122  		}
123  	}
124-@@ -342,76 +277,34 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
125+@@ -341,76 +277,34 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
126  
127  	/* Sign the message. */
128  
129@@ -445,7 +444,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
130  		goto out;
131  	}
132  
133-@@ -421,7 +314,11 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
134+@@ -420,7 +314,11 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
135  	 * when we next enter the read loop).
136  	 */
137  
138@@ -458,7 +457,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
139  		warnx("json_fmt_signed");
140  		goto out;
141  	} else if (writestr(fd, COMM_REQ, fin) < 0)
142-@@ -429,8 +326,6 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
143+@@ -428,8 +326,6 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
144  
145  	rc = 1;
146  out:
147@@ -467,7 +466,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
148  	free(pay);
149  	free(sign);
150  	free(pay64);
151-@@ -439,10 +334,9 @@ out:
152+@@ -438,10 +334,9 @@ out:
153  	free(kid);
154  	free(prot);
155  	free(prot64);
156@@ -480,7 +479,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
157  	return rc;
158  }
159  
160-@@ -450,7 +344,7 @@ int
161+@@ -449,7 +344,7 @@ int
162  acctproc(int netsock, const char *acctkey, enum keytype keytype)
163  {
164  	FILE		*f = NULL;
165@@ -489,7 +488,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
166  	long		 lval;
167  	enum acctop	 op;
168  	int		 rc = 0, cc, newacct = 0;
169-@@ -476,8 +370,6 @@ acctproc(int netsock, const char *acctkey, enum keytype keytype)
170+@@ -475,8 +370,6 @@ acctproc(int netsock, const char *acctkey, enum keytype keytype)
171  
172  	/* File-system, user, and sandbox jailing. */
173  
174@@ -498,7 +497,7 @@ index 23d8a1c3a33..3d3e32c1a57 100644
175  	if (pledge("stdio", NULL) == -1) {
176  		warn("pledge");
177  		goto out;
178-@@ -555,8 +447,7 @@ out:
179+@@ -554,8 +447,7 @@ out:
180  	close(netsock);
181  	if (f != NULL)
182  		fclose(f);
183@@ -526,10 +525,10 @@ index f443d573675..85c3897a4b8 100644
184  
185  #define BEGIN_MARKER "-----BEGIN CERTIFICATE-----"
186 diff --git a/usr.sbin/acme-client/key.c b/usr.sbin/acme-client/key.c
187-index a6fc437f863..c0e54b15742 100644
188+index 9ece3059d4e..9599a7fdbd5 100644
189 --- a/usr.sbin/acme-client/key.c
190 +++ b/usr.sbin/acme-client/key.c
191-@@ -17,15 +17,11 @@
192+@@ -17,14 +17,11 @@
193   */
194  
195  #include <err.h>
196@@ -540,14 +539,13 @@ index a6fc437f863..c0e54b15742 100644
197 -#include <openssl/evp.h>
198 -#include <openssl/pem.h>
199 -#include <openssl/rsa.h>
200--#include <openssl/ecdsa.h>
201 -#include <openssl/ec.h>
202 -#include <openssl/obj_mac.h>
203 +#include <bearssl.h>
204  
205  #include "key.h"
206  
207-@@ -34,111 +30,318 @@
208+@@ -33,102 +30,320 @@
209   */
210  #define	KBITS 4096
211  
212@@ -587,22 +585,20 @@ index a6fc437f863..c0e54b15742 100644
213 +	unsigned char	*der = NULL, *pem = NULL;
214 +	size_t		 derlen, pemlen;
215  
216--	/* First, create the context and the key. */
217-+	/* First, allocate and generate the key. */
218- 
219 -	if ((ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL)) == NULL) {
220 -		warnx("EVP_PKEY_CTX_new_id");
221 -		goto err;
222--	} else if (EVP_PKEY_keygen_init(ctx) <= 0) {
223+-	}
224+-	if (EVP_PKEY_keygen_init(ctx) <= 0) {
225 -		warnx("EVP_PKEY_keygen_init");
226 +	slen = BR_RSA_KBUF_PRIV_SIZE(KBITS);
227 +	plen = BR_RSA_KBUF_PUB_SIZE(KBITS);
228 +	if ((key = malloc(sizeof(*key) + slen + plen)) == NULL) {
229 +		warnx("malloc");
230  		goto err;
231--	} else if (EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, KBITS) <= 0) {
232+ 	}
233+-	if (EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, KBITS) <= 0) {
234 -		warnx("EVP_PKEY_set_rsa_keygen_bits");
235-+	}
236 +	key->type = BR_KEYTYPE_RSA;
237 +	key->datasz = slen + plen;
238 +	sbuf = key->data;
239@@ -611,9 +607,9 @@ index a6fc437f863..c0e54b15742 100644
240 +	    &key->rsa.pk, pbuf, KBITS, 0x10001)) {
241 +		warnx("br_rsa_keygen");
242  		goto err;
243--	} else if (EVP_PKEY_keygen(ctx, &pkey) <= 0) {
244+ 	}
245+-	if (EVP_PKEY_keygen(ctx, &pkey) <= 0) {
246 -		warnx("EVP_PKEY_keygen");
247-+	}
248 +
249 +	/* Compute the private exponent. */
250 +
251@@ -625,7 +621,8 @@ index a6fc437f863..c0e54b15742 100644
252 -	/* Serialise the key to the disc. */
253 +	/* Serialise the key to the disk. */
254  
255--	if (PEM_write_PrivateKey(f, pkey, NULL, NULL, 0, NULL, NULL))
256+-	if (!PEM_write_PrivateKey(f, pkey, NULL, NULL, 0, NULL, NULL)) {
257+-		warnx("%s: PEM_write_PrivateKey", fname);
258 +	derlen = br_encode_rsa_raw_der(NULL, &key->rsa.sk, &key->rsa.pk,
259 +	    d, sizeof(d));
260 +	if ((der = malloc(derlen)) == NULL) {
261@@ -639,30 +636,31 @@ index a6fc437f863..c0e54b15742 100644
262 +		goto err;
263 +	}
264 +	br_pem_encode(pem, der, derlen, BR_ENCODE_PEM_RSA_RAW, 0);
265-+	if (fwrite(pem, 1, pemlen, f) == pemlen)
266- 		goto out;
267++	if (fwrite(pem, 1, pemlen, f) != pemlen) {
268++		warn("write private key");
269+ 		goto err;
270+ 	}
271  
272--	warnx("%s: PEM_write_PrivateKey", fname);
273-+	warn("write private key");
274+-	EVP_PKEY_CTX_free(ctx);
275+-	return pkey;
276++	free(der);
277++	free(pem);
278++	return key;
279  
280  err:
281 -	EVP_PKEY_free(pkey);
282--	pkey = NULL;
283-+	free(key);
284-+	key = NULL;
285- out:
286 -	EVP_PKEY_CTX_free(ctx);
287--	return pkey;
288 +	free(der);
289 +	free(pem);
290-+	return key;
291++	free(key);
292+ 	return NULL;
293  }
294  
295 -EVP_PKEY *
296 +struct key *
297  ec_key_create(FILE *f, const char *fname)
298  {
299--	EC_KEY		*eckey = NULL;
300+-	EVP_PKEY_CTX	*ctx = NULL;
301 -	EVP_PKEY	*pkey = NULL;
302 +	struct key 		*key = NULL;
303 +	const br_ec_impl	*ec;
304@@ -671,45 +669,42 @@ index a6fc437f863..c0e54b15742 100644
305 +	unsigned char		*der = NULL, *pem = NULL;
306 +	size_t			 derlen, pemlen;
307  
308--	if ((eckey = EC_KEY_new_by_curve_name(NID_secp384r1)) == NULL ) {
309--		warnx("EC_KEY_new_by_curve_name");
310+-	if ((ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, NULL)) == NULL) {
311+-		warnx("EVP_PKEY_CTX_new_id");
312+-		goto err;
313+-	}
314+-	if (EVP_PKEY_keygen_init(ctx) <= 0) {
315+-		warnx("EVP_PKEY_keygen_init");
316 +	slen = BR_EC_KBUF_PRIV_MAX_SIZE;
317 +	plen = BR_EC_KBUF_PUB_MAX_SIZE;
318 +	if ((key = malloc(sizeof(*key) + slen + plen)) == NULL) {
319 +		warn("malloc");
320  		goto err;
321  	}
322+-	if (EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, NID_secp384r1) <= 0) {
323+-		warnx("EVP_PKEY_CTX_set_ec_paramgen_curve_nid");
324 +	key->type = BR_KEYTYPE_EC;
325 +	key->datasz = slen + plen;
326 +	sbuf = key->data;
327 +	pbuf = key->data + slen;
328- 
329--	if (!EC_KEY_generate_key(eckey)) {
330--		warnx("EC_KEY_generate_key");
331++
332 +	ec = br_ec_get_default();
333 +	if (br_ec_keygen(&prng, ec, &key->ec.sk, sbuf, BR_EC_secp384r1) == 0) {
334 +		warnx("br_ec_keygen");
335  		goto err;
336  	}
337--
338--	/* set OPENSSL_EC_NAMED_CURVE to be able to load the key */
339--
340--	EC_KEY_set_asn1_flag(eckey, OPENSSL_EC_NAMED_CURVE);
341--
342--	/* Serialise the key to the disc in EC format */
343--
344--	if (!PEM_write_ECPrivateKey(f, eckey, NULL, NULL, 0, NULL, NULL)) {
345--		warnx("%s: PEM_write_ECPrivateKey", fname);
346+-	if (EVP_PKEY_keygen(ctx, &pkey) <= 0) {
347+-		warnx("EVP_PKEY_keygen");
348 +	if (br_ec_compute_pub(ec, &key->ec.pk, pbuf, &key->ec.sk) == 0) {
349 +		warnx("br_ec_compute_pub");
350  		goto err;
351  	}
352  
353--	/* Convert the EC key into a PKEY structure */
354+-	/* Serialise the key to the disc. */
355 +	/* Serialise the key to the disk in EC format */
356  
357--	if ((pkey = EVP_PKEY_new()) == NULL) {
358--		warnx("EVP_PKEY_new");
359+-	if (!PEM_write_PrivateKey(f, pkey, NULL, NULL, 0, NULL, NULL)) {
360+-		warnx("%s: PEM_write_PrivateKey", fname);
361 +	if ((derlen = br_encode_ec_raw_der(NULL, &key->ec.sk,
362 +	    &key->ec.pk)) == 0) {
363 +		warnx("br_encode_ec_raw_der");
364@@ -717,44 +712,42 @@ index a6fc437f863..c0e54b15742 100644
365 +	}
366 +	if ((der = malloc(derlen)) == NULL) {
367 +		warn("malloc");
368- 		goto err;
369- 	}
370--	if (!EVP_PKEY_set1_EC_KEY(pkey, eckey)) {
371--		warnx("EVP_PKEY_assign_EC_KEY");
372++		goto err;
373++	}
374 +	br_encode_ec_raw_der(der, &key->ec.sk, &key->ec.pk);
375 +	pemlen = br_pem_encode(NULL, der, derlen, BR_ENCODE_PEM_EC_RAW, 0);
376 +	if ((pem = malloc(pemlen + 1)) == NULL) {
377 +		warn("malloc");
378++		goto err;
379++	}
380++	br_pem_encode(pem, der, derlen, BR_ENCODE_PEM_EC_RAW, 0);
381++	if (fwrite(pem, 1, pemlen, f) != pemlen) {
382++		warn("write private key");
383  		goto err;
384  	}
385-+	br_pem_encode(pem, der, derlen, BR_ENCODE_PEM_EC_RAW, 0);
386-+	if (fwrite(pem, 1, pemlen, f) == pemlen)
387-+		goto out;
388  
389--	goto out;
390-+	warn("write private key");
391+-	EVP_PKEY_CTX_free(ctx);
392+-	return pkey;
393++	free(der);
394++	free(pem);
395++	return key;
396  
397  err:
398 -	EVP_PKEY_free(pkey);
399--	pkey = NULL;
400-+	free(key);
401-+	key = NULL;
402- out:
403--	EC_KEY_free(eckey);
404--	return pkey;
405+-	EVP_PKEY_CTX_free(ctx);
406 +	free(der);
407 +	free(pem);
408-+	return key;
409++	free(key);
410+ 	return NULL;
411  }
412  
413+-EVP_PKEY *
414 +static void
415 +append_skey(void *ctx, const void *src, size_t len)
416 +{
417 +	br_skey_decoder_push(ctx, src, len);
418 +}
419- 
420--
421--EVP_PKEY *
422++
423 +struct key *
424  key_load(FILE *f, const char *fname)
425  {
426@@ -772,7 +765,11 @@ index a6fc437f863..c0e54b15742 100644
427 +	const br_ec_private_key		*ec;
428 +	const char			*name = NULL;
429 +	uint32_t			 pubexp;
430-+
431+ 
432+-	pkey = PEM_read_PrivateKey(f, NULL, NULL, NULL);
433+-	if (pkey == NULL) {
434+-		warnx("%s: PEM_read_PrivateKey", fname);
435+-		return NULL;
436 +	br_pem_decoder_init(&pemctx);
437 +	br_skey_decoder_init(&keyctx);
438 +	while (type == 0) {
439@@ -817,8 +814,14 @@ index a6fc437f863..c0e54b15742 100644
440 +			warnx("%s: PEM decoding failed", fname);
441 +			goto err;
442 +		}
443-+	}
444-+
445+ 	}
446+-	if (EVP_PKEY_base_id(pkey) == EVP_PKEY_RSA ||
447+-	    EVP_PKEY_base_id(pkey) == EVP_PKEY_EC)
448+-		return pkey;
449+ 
450+-	warnx("%s: unsupported key type", fname);
451+-	EVP_PKEY_free(pkey);
452+-	return NULL;
453 +	switch (type) {
454 +	case BR_KEYTYPE_RSA:
455 +		rsa = br_skey_decoder_get_rsa(&keyctx);
456@@ -833,11 +836,7 @@ index a6fc437f863..c0e54b15742 100644
457 +		}
458 +		datasz += 4 + rsa->plen + rsa->qlen + rsa->dplen + rsa->dqlen +
459 +		    rsa->iqlen;
460- 
461--	pkey = PEM_read_PrivateKey(f, NULL, NULL, NULL);
462--	if (pkey == NULL) {
463--		warnx("%s: PEM_read_PrivateKey", fname);
464--		return NULL;
465++
466 +		if ((key = malloc(sizeof(*key) + datasz)) == NULL) {
467 +			warn("malloc");
468 +			goto err;
469@@ -907,14 +906,8 @@ index a6fc437f863..c0e54b15742 100644
470 +		br_ec_compute_pub(ecimpl, &key->ec.pk,
471 +		    key->ec.sk.x + key->ec.sk.xlen, &key->ec.sk);
472 +		goto out;
473- 	}
474--	if (EVP_PKEY_base_id(pkey) == EVP_PKEY_RSA ||
475--	    EVP_PKEY_base_id(pkey) == EVP_PKEY_EC)
476--		return pkey;
477- 
478--	warnx("%s: unsupported key type", fname);
479--	EVP_PKEY_free(pkey);
480--	return NULL;
481++	}
482++
483 +	warnx("%s: missing private key", fname);
484 +
485 +err:
486@@ -1220,7 +1213,7 @@ index f0df9f292d4..fc7de74b616 100644
487  	return rc;
488  }
489 diff --git a/usr.sbin/acme-client/revokeproc.c b/usr.sbin/acme-client/revokeproc.c
490-index 58e81233f1a..6d0f2b39d02 100644
491+index 58e81233f1a..378de35f662 100644
492 --- a/usr.sbin/acme-client/revokeproc.c
493 +++ b/usr.sbin/acme-client/revokeproc.c
494 @@ -22,58 +22,54 @@
495@@ -1319,7 +1312,7 @@ index 58e81233f1a..6d0f2b39d02 100644
496  	if (pledge("stdio", NULL) == -1) {
497  		warn("pledge");
498  		goto out;
499-@@ -113,39 +107,84 @@ revokeproc(int fd, const char *certfile, int force,
500+@@ -113,39 +107,86 @@ revokeproc(int fd, const char *certfile, int force,
501  		goto out;
502  	}
503  
504@@ -1415,18 +1408,20 @@ index 58e81233f1a..6d0f2b39d02 100644
505 -		warn("calloc");
506 +	br_x509_minimal_init(&xc, &br_sha256_vtable, NULL, 0);
507 +	br_x509_minimal_set_hash(&xc, br_sha256_ID, &br_sha256_vtable);
508++	br_x509_minimal_set_hash(&xc, br_sha384_ID, &br_sha384_vtable);
509++	br_x509_minimal_set_hash(&xc, br_sha512_ID, &br_sha512_vtable);
510 +	br_x509_minimal_set_name_elements(&xc, elts, eltsz);
511 +	xc.vtable->start_chain(&xc.vtable, NULL);
512 +	xc.vtable->start_cert(&xc.vtable, cert.data_len);
513 +	xc.vtable->append(&xc.vtable, cert.data, cert.data_len);
514 +	xc.vtable->end_cert(&xc.vtable);
515 +	err = xc.vtable->end_chain(&xc.vtable);
516-+	if (err != BR_ERR_X509_NOT_TRUSTED) {
517++	if (err != BR_ERR_X509_NOT_TRUSTED && err != BR_ERR_X509_EXPIRED) {
518 +		warnx("%s: X.509 engine error %d", certfile, err);
519  		goto out;
520  	}
521  
522-@@ -154,63 +193,37 @@ revokeproc(int fd, const char *certfile, int force,
523+@@ -154,63 +195,37 @@ revokeproc(int fd, const char *certfile, int force,
524  	 * configuration file and that all domains are represented only once.
525  	 */
526  
527@@ -1509,7 +1504,7 @@ index 58e81233f1a..6d0f2b39d02 100644
528  			goto out;
529  		}
530  		force = 2;
531-@@ -236,16 +249,7 @@ revokeproc(int fd, const char *certfile, int force,
532+@@ -236,16 +251,7 @@ revokeproc(int fd, const char *certfile, int force,
533  		if (cc <= 0)
534  			goto out;
535  
536@@ -1527,7 +1522,7 @@ index 58e81233f1a..6d0f2b39d02 100644
537  			warnx("base64buf_url");
538  			goto out;
539  		} else if (writestr(fd, COMM_CSR, der64) >= 0)
540-@@ -298,12 +302,9 @@ out:
541+@@ -298,12 +304,9 @@ out:
542  	close(fd);
543  	if (f != NULL)
544  		fclose(f);
545@@ -1544,5 +1539,5 @@ index 58e81233f1a..6d0f2b39d02 100644
546  	return rc;
547  }
548 -- 
549-2.37.3
550+2.49.0
551 
R pkg/openbsd/patch/0038-rsync-Pass-long-long-to-scan_scaled.patch => pkg/openbsd/patch/0036-rsync-Pass-long-long-to-scan_scaled.patch
+7, -7
 1@@ -1,4 +1,4 @@
 2-From 0e9ff28bc2e5bd4828b98b50333d12a6d24486fe Mon Sep 17 00:00:00 2001
 3+From 0b46c097e66f06fc7e5b4817e6cfdbb145bf4825 Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Wed, 27 Apr 2022 20:03:45 -0700
 6 Subject: [PATCH] rsync: Pass long long * to scan_scaled
 7@@ -9,10 +9,10 @@ off_t might not be long long.
 8  1 file changed, 5 insertions(+), 2 deletions(-)
 9 
10 diff --git a/usr.bin/rsync/main.c b/usr.bin/rsync/main.c
11-index dd175597914..5d7f055a9ae 100644
12+index d59848f0214..477adbbba50 100644
13 --- a/usr.bin/rsync/main.c
14 +++ b/usr.bin/rsync/main.c
15-@@ -353,6 +353,7 @@ main(int argc, char *argv[])
16+@@ -361,6 +361,7 @@ main(int argc, char *argv[])
17  	struct fargs	*fargs;
18  	char		**args;
19  	const char	*errstr;
20@@ -20,7 +20,7 @@ index dd175597914..5d7f055a9ae 100644
21  
22  	/* Global pledge. */
23  
24-@@ -488,12 +489,14 @@ basedir:
25+@@ -509,12 +510,14 @@ basedir:
26  			opts.basedir[basedir_cnt++] = optarg;
27  			break;
28  		case OP_MAX_SIZE:
29@@ -35,8 +35,8 @@ index dd175597914..5d7f055a9ae 100644
30  				err(1, "bad min-size");
31 +			opts.max_size = size;
32  			break;
33- 		case OP_VERSION:
34- 			fprintf(stderr, "openrsync: protocol version %u\n",
35+ 		case 'h':
36+ 		default:
37 -- 
38-2.37.3
39+2.49.0
40 
R pkg/openbsd/patch/0039-libutil-Include-util.h-instead-of-util.h.patch => pkg/openbsd/patch/0037-libutil-Include-util.h-instead-of-util.h.patch
+0, -0
+0, -46
 1@@ -1,46 +0,0 @@
 2-From 82646d38665109ec5f0753ba384da94d529bbbe9 Mon Sep 17 00:00:00 2001
 3-From: Michael Forney <mforney@mforney.org>
 4-Date: Wed, 27 Apr 2022 19:57:54 -0700
 5-Subject: [PATCH] pax: Use POSIX struct stat fields for high resolution
 6- timestamps
 7-
 8----
 9- bin/pax/tar.c | 15 +++++----------
10- 1 file changed, 5 insertions(+), 10 deletions(-)
11-
12-diff --git a/bin/pax/tar.c b/bin/pax/tar.c
13-index 1f4012123c3..7ede7938c3d 100644
14---- a/bin/pax/tar.c
15-+++ b/bin/pax/tar.c
16-@@ -417,8 +417,7 @@ tar_rd(ARCHD *arcn, char *buf)
17- 		arcn->sb.st_mtime = INT_MAX;                    /* XXX 2038 */
18- 	else
19- 		arcn->sb.st_mtime = val;
20--	arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
21--	arcn->sb.st_ctimensec = arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
22-+	arcn->sb.st_ctim = arcn->sb.st_atim = arcn->sb.st_mtim;
23- 
24- 	/*
25- 	 * have to look at the last character, it may be a '/' and that is used
26-@@ -795,14 +794,10 @@ reset:
27- 		else
28- 			arcn->sb.st_mtime = val;
29- 	}
30--	if (arcn->sb.st_ctime == 0) {
31--		arcn->sb.st_ctime = arcn->sb.st_mtime;
32--		arcn->sb.st_ctimensec = arcn->sb.st_mtimensec;
33--	}
34--	if (arcn->sb.st_atime == 0) {
35--		arcn->sb.st_atime = arcn->sb.st_mtime;
36--		arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
37--	}
38-+	if (arcn->sb.st_ctime == 0)
39-+		arcn->sb.st_ctim = arcn->sb.st_mtim;
40-+	if (arcn->sb.st_atime == 0)
41-+		arcn->sb.st_atim = arcn->sb.st_mtim;
42- 
43- 	/*
44- 	 * If we can find the ascii names for gname and uname in the password
45--- 
46-2.35.1
47-
R pkg/openbsd/patch/0040-nc-Add-option-to-disable-certificate-time-checking.patch => pkg/openbsd/patch/0038-nc-Add-option-to-disable-certificate-time-checking.patch
+5, -5
 1@@ -1,4 +1,4 @@
 2-From 506272f64ba252c562e3036d14713de780817d1a Mon Sep 17 00:00:00 2001
 3+From 5e993fe93c590d60b05948e22b51dfc34c3eac4b Mon Sep 17 00:00:00 2001
 4 From: Michael Forney <mforney@mforney.org>
 5 Date: Thu, 20 May 2021 13:44:35 -0700
 6 Subject: [PATCH] nc: Add option to disable certificate time checking
 7@@ -9,7 +9,7 @@ Subject: [PATCH] nc: Add option to disable certificate time checking
 8  2 files changed, 8 insertions(+), 2 deletions(-)
 9 
10 diff --git a/usr.bin/nc/nc.1 b/usr.bin/nc/nc.1
11-index 0ef318e0e6f..5858ef763dc 100644
12+index 76b6dc018ea..9e13b84acf7 100644
13 --- a/usr.bin/nc/nc.1
14 +++ b/usr.bin/nc/nc.1
15 @@ -249,6 +249,8 @@ may be one of:
16@@ -22,7 +22,7 @@ index 0ef318e0e6f..5858ef763dc 100644
17  which requires a client certificate on incoming connections; or
18  .Cm muststaple ,
19 diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
20-index 7369ed85619..29d2cb3bf29 100644
21+index b5129c2204d..d1ed530eb2c 100644
22 --- a/usr.bin/nc/netcat.c
23 +++ b/usr.bin/nc/netcat.c
24 @@ -70,8 +70,9 @@
25@@ -46,7 +46,7 @@ index 7369ed85619..29d2cb3bf29 100644
26  		if (TLSopt & TLS_NOVERIFY) {
27  			if (tls_expecthash != NULL)
28  				errx(1, "-H and -T noverify may not be used "
29-@@ -1705,6 +1708,7 @@ process_tls_opt(char *s, int *flags)
30+@@ -1707,6 +1710,7 @@ process_tls_opt(char *s, int *flags)
31  		{ "muststaple",		TLS_MUSTSTAPLE,		NULL },
32  		{ "noverify",		TLS_NOVERIFY,		NULL },
33  		{ "noname",		TLS_NONAME,		NULL },
34@@ -55,5 +55,5 @@ index 7369ed85619..29d2cb3bf29 100644
35  		{ NULL,			-1,			NULL },
36  	};
37 -- 
38-2.37.3
39+2.49.0
40 
+41, -0
 1@@ -0,0 +1,41 @@
 2+From 7977b9211356095517951e86fa53f64c6b27e16b Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 29 Apr 2025 16:50:16 -0700
 5+Subject: [PATCH] pax: Only use _PC_TIMESTAMP_RESOLUTION if it is defined
 6+
 7+---
 8+ bin/pax/ar_subs.c | 6 +++++-
 9+ 1 file changed, 5 insertions(+), 1 deletion(-)
10+
11+diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c
12+index 4c49efa1362..a0e4fdfdea5 100644
13+--- a/bin/pax/ar_subs.c
14++++ b/bin/pax/ar_subs.c
15+@@ -167,12 +167,13 @@ cmp_file_times(int mtime_flag, int ctime_flag, ARCHD *arcn, const char *path)
16+ 	else if (timespeccmp(&arcn->sb.st_mtim, &sb.st_mtim, <=))
17+ 		return 1;
18+ 
19++#ifdef _PC_TIMESTAMP_RESOLUTION
20+ 	/*
21+ 	 * If we got here then the target arcn > sb for mtime *and* that's
22+ 	 * the deciding factor.  Check whether they're equal after rounding
23+ 	 * down the arcn mtime to the precision of the target path.
24+ 	 */
25+-	res = pathconfat(AT_FDCWD, path, _PC_TIMESTAMP_RESOLUTION,
26++	res = pathconf(path, _PC_TIMESTAMP_RESOLUTION,
27+ 	    AT_SYMLINK_NOFOLLOW);
28+ 	if (res == -1)
29+ 		return 0;
30+@@ -195,6 +196,9 @@ cmp_file_times(int mtime_flag, int ctime_flag, ARCHD *arcn, const char *path)
31+ 		return ((arcn->sb.st_mtime / res) * res) <= sb.st_mtime;
32+ 		return arcn->sb.st_mtime <= ((sb.st_mtime / res) * res);
33+ 	}
34++#else
35++	return 0;
36++#endif
37+ }
38+ 
39+ /*
40+-- 
41+2.49.0
42+
+2, -2
1@@ -1,2 +1,2 @@
2-4d545e75c144848b06cb1ee661ab13b654683ae47fcd5f264a4520ab2bfe4c0f  src.tar.gz
3-bb0dfa11584d68464b3f788e43655f6454bb3ecba8ad5500377630bcf23570ec  sys.tar.gz
4+6239a7a906bec7c386a06e6fda5893d854a4a00b6702eb47cbed0353a6a0c4fb  src.tar.gz
5+65b58e8432c8f678840fa58402daee8acf196770b748068e165664bd2d6cd85c  sys.tar.gz
+2, -2
1@@ -1,5 +1,5 @@
2 remote-name
3-url = "https://cdn.openbsd.org/pub/OpenBSD/7.3/src.tar.gz"
4+url = "https://cdn.openbsd.org/pub/OpenBSD/7.7/src.tar.gz"
5 
6 remote-name
7-url = "https://cdn.openbsd.org/pub/OpenBSD/7.3/sys.tar.gz"
8+url = "https://cdn.openbsd.org/pub/OpenBSD/7.7/sys.tar.gz"
+1, -1
1@@ -1 +1 @@
2-7.3 r0
3+7.7 r0