Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2025 23:54:04 GMT
From:      Colin Percival <cperciva@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 12d2f0b8d460 - main - ports-mgmt/pkg: Backport bug fix needed for 15.0
Message-ID:  <202510232354.59NNs4cW064013@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by cperciva:

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

commit 12d2f0b8d4607de67604922c58292cde6f4a1cbd
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2025-10-23 22:57:00 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-10-23 23:53:58 +0000

    ports-mgmt/pkg: Backport bug fix needed for 15.0
    
    This adds a patch (7ea9566835a82f111d7771f58168babc5e0dde6a) which
    fixes a release-build-breaking bug in pkg(8).  It is now in the pkg
    repository but the 15.0 release process can't wait for a new pkg
    release to happen so I'm pulling the bug fix in here instead.
    
    With hat:       re@
    Reviewed by:    kevans
    Differential Revision:  https://reviews.freebsd.org/D53310
---
 ports-mgmt/pkg/Makefile                            |  1 +
 ...-7ea9566835a82f111d7771f58168babc5e0dde6a.patch | 33 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index b5954452538d..6853583905d4 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	pkg
 DISTVERSION=	2.3.1
+PORTREVISION=	1
 _PKG_VERSION=	${DISTVERSION}
 CATEGORIES=	ports-mgmt
 
diff --git a/ports-mgmt/pkg/files/patch-7ea9566835a82f111d7771f58168babc5e0dde6a.patch b/ports-mgmt/pkg/files/patch-7ea9566835a82f111d7771f58168babc5e0dde6a.patch
new file mode 100644
index 000000000000..608f5e232fa1
--- /dev/null
+++ b/ports-mgmt/pkg/files/patch-7ea9566835a82f111d7771f58168babc5e0dde6a.patch
@@ -0,0 +1,33 @@
+From 7ea9566835a82f111d7771f58168babc5e0dde6a Mon Sep 17 00:00:00 2001
+From: Mark Johnston <markj@FreeBSD.org>
+Date: Thu, 23 Oct 2025 21:54:36 +0000
+Subject: [PATCH] libpkg: Use line buffering for the metalog file handle
+
+Otherwise we can get interleaved metalog entries when a package
+install script appends entries to the metalog as well.
+
+Reported by:	cperciva
+---
+ libpkg/metalog.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libpkg/metalog.c b/libpkg/metalog.c
+index 9ffac87ae7..07b7419b66 100644
+--- libpkg/metalog.c
++++ libpkg/metalog.c
+@@ -37,11 +37,11 @@ int
+ metalog_open(const char *metalog)
+ {
+ 	metalogfp = fopen(metalog, "ae");
+-	if (metalogfp == NULL) {
++	if (metalogfp == NULL)
+ 		pkg_fatal_errno("Unable to open metalog '%s'", metalog);
+-	} 
+-
+-	return EPKG_OK;
++	/* Package install scripts may add entries, so avoid interleaving. */
++	setvbuf(metalogfp, NULL, _IOLBF, 0);
++	return (EPKG_OK);
+ }
+ 
+ int


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510232354.59NNs4cW064013>