Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 838E484D68 for ; Mon, 4 Sep 2023 19:51:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id p8nvPqmMvypH for ; Mon, 4 Sep 2023 19:51:19 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id D755884CCA for ; Mon, 4 Sep 2023 19:51:19 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id D064BFBDB; Mon, 4 Sep 2023 19:51:19 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1693857079103020" MIME-Version: 1.0 Date: Mon, 4 Sep 2023 19:51:19 +0000 From: "Jonathan Perkin" Subject: CVS commit: pkgsrc/pkgtools/libnbcompat To: pkgsrc-changes@NetBSD.org Approved: commit_and_comment Reply-To: jperkin@netbsd.org X-Mailer: log_accum Message-Id: <20230904195119.D064BFBDB@cvs.NetBSD.org> This is a multi-part message in MIME format. --_----------=_1693857079103020 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: jperkin Date: Mon Sep 4 19:51:19 UTC 2023 Modified Files: pkgsrc/pkgtools/libnbcompat: Makefile pkgsrc/pkgtools/libnbcompat/files: README sha2.c Log Message: libnbcompat: Update to 20230904. Pull in changes from revision 1.13 of NetBSD sha2.c from 14 years ago to fix type punning issues seen with newer GCCs. Fixes "pkg_admin digest" on SmartOS with GCC 12, where the output was completely wrong, causing bulk builds to rebuild every package every time now that USE_PKG_ADMIN_DIGEST=yes is the default. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 pkgsrc/pkgtools/libnbcompat/Makefile cvs rdiff -u -r1.27 -r1.28 pkgsrc/pkgtools/libnbcompat/files/README cvs rdiff -u -r1.8 -r1.9 pkgsrc/pkgtools/libnbcompat/files/sha2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1693857079103020 Content-Disposition: inline Content-Length: 3269 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/libnbcompat/Makefile diff -u pkgsrc/pkgtools/libnbcompat/Makefile:1.90 pkgsrc/pkgtools/libnbcompat/Makefile:1.91 --- pkgsrc/pkgtools/libnbcompat/Makefile:1.90 Tue Jun 27 09:31:09 2023 +++ pkgsrc/pkgtools/libnbcompat/Makefile Mon Sep 4 19:51:19 2023 @@ -1,12 +1,11 @@ -# $NetBSD: Makefile,v 1.90 2023/06/27 09:31:09 riastradh Exp $ +# $NetBSD: Makefile,v 1.91 2023/09/04 19:51:19 jperkin Exp $ # # NOTE: If you update this package, it is *mandatory* that you update # pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual # list of tested and supported platforms. # -PKGNAME= libnbcompat-20230609 -PKGREVISION= 1 +PKGNAME= libnbcompat-20230904 CATEGORIES= pkgtools devel MAINTAINER= pkgsrc-users@NetBSD.org Index: pkgsrc/pkgtools/libnbcompat/files/README diff -u pkgsrc/pkgtools/libnbcompat/files/README:1.27 pkgsrc/pkgtools/libnbcompat/files/README:1.28 --- pkgsrc/pkgtools/libnbcompat/files/README:1.27 Tue Jun 27 09:31:09 2023 +++ pkgsrc/pkgtools/libnbcompat/files/README Mon Sep 4 19:51:19 2023 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.27 2023/06/27 09:31:09 riastradh Exp $ +$NetBSD: README,v 1.28 2023/09/04 19:51:19 jperkin Exp $ 0 Introduction ============== @@ -44,6 +44,13 @@ breakage seep in. Proper methodology fo *NOTE* the most recent libnbcompat. *NOTE* +libnbcompat-20230904 has been tested to build and install correctly +on the following operating systems: + + Darwin-22.6.0-aarch64 + SunOS-5.11-i386 + SunOS-5.11-x86_64 + libnbcompat-20230609 has been tested to build and install correctly on the following operating systems: Index: pkgsrc/pkgtools/libnbcompat/files/sha2.c diff -u pkgsrc/pkgtools/libnbcompat/files/sha2.c:1.8 pkgsrc/pkgtools/libnbcompat/files/sha2.c:1.9 --- pkgsrc/pkgtools/libnbcompat/files/sha2.c:1.8 Tue Nov 8 18:20:03 2011 +++ pkgsrc/pkgtools/libnbcompat/files/sha2.c Mon Sep 4 19:51:19 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sha2.c,v 1.8 2011/11/08 18:20:03 joerg Exp $ */ +/* $NetBSD: sha2.c,v 1.9 2023/09/04 19:51:19 jperkin Exp $ */ /* $KAME: sha2.c,v 1.9 2003/07/20 00:28:38 itojun Exp $ */ /* @@ -568,7 +568,8 @@ void SHA256_Final(sha2_byte digest[], SH *context->buffer = 0x80; } /* Set the bit count: */ - *(sha2_word64*)(void *)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; + memcpy(&context->buffer[SHA256_SHORT_BLOCK_LENGTH], + &context->bitcount, sizeof(context->bitcount)); /* Final transform: */ SHA256_Transform(context, (sha2_word32*)(void *)context->buffer); @@ -871,8 +872,10 @@ static void SHA512_Last(SHA512_CTX* cont *context->buffer = 0x80; } /* Store the length of input data (in bits): */ - *(sha2_word64*)(void *)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1]; - *(sha2_word64*)(void *)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0]; + memcpy(&context->buffer[SHA512_SHORT_BLOCK_LENGTH], + &context->bitcount[1], sizeof(context->bitcount[1])); + memcpy(&context->buffer[SHA512_SHORT_BLOCK_LENGTH + 8], + &context->bitcount[0], sizeof(context->bitcount[0])); /* Final transform: */ SHA512_Transform(context, (sha2_word64*)(void *)context->buffer); --_----------=_1693857079103020--