From nobody Wed Jan 22 14:50:23 2025 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YdRp32yH8z5lZMn for ; Wed, 22 Jan 2025 14:50:35 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4YdRp25WYsz3Z73; Wed, 22 Jan 2025 14:50:34 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; none Received: from kalamity.joker.local (124-18-43-234.area1a.commufa.jp [124.18.43.234]) (authenticated bits=0) by www121.sakura.ne.jp (8.17.1/8.17.1/[SAKURA-WEB]/20201212) with ESMTPA id 50MEoNxJ062435; Wed, 22 Jan 2025 23:50:24 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dec.sakura.ne.jp; s=s2405; t=1737557424; bh=RKsz+VVGfM0/I2fSbPhPw05OjiSE5XxCWEMj1E8ABRk=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Nx6drydp3Fb2DVDzOXTVM9qzuuPVkC/Ox6ZEdw5ep6H2LfI53ZQCa/WX0ziGjktxw 7/H0tTVHzJ3DvLIbuNOV91Jfev3wREZ6RW/mw3EJ2J8qJJaaGEhLJQ5x3B57h6VqnH NRiornDQ7u/XDzO1+cZq6FqfnvULTXX37T4TxBow= Date: Wed, 22 Jan 2025 23:50:23 +0900 From: Tomoaki AOKI To: Baptiste Daroussin Cc: dev-commits-ports-main@freebsd.org Subject: Re: git: 460f6d861e43 - main - ports-mgmt/pkg: update to 2.0.0 Message-Id: <20250122235023.fbaad09fa596721af8fa5963@dec.sakura.ne.jp> In-Reply-To: References: <20250122222710.ea16e2ff0b14538d09b767c8@dec.sakura.ne.jp> Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.2) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Wed__22_Jan_2025_23_50_23_+0900_KJh6HB+hbJH0llhq" X-Rspamd-Queue-Id: 4YdRp25WYsz3Z73 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP] This is a multi-part message in MIME format. --Multipart=_Wed__22_Jan_2025_23_50_23_+0900_KJh6HB+hbJH0llhq Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 22 Jan 2025 14:56:07 +0100 Baptiste Daroussin wrote: > On Wed 22 Jan 22:27, Tomoaki AOKI wrote: > > Hi. > > > > Unfortunately, upgraded pkg segfaults as below on stable/14, amd64 at > > commit 0ec93987e5302495f9512f8534a2375d7da4ee2a. > > Reverting back to 1.21.3 fixes the issue. > > > > % pkg version -o -v > > Child process pid=55201 terminated abnormally: Segmentation fault > > % lldb > > --core ~/pkg.core --file /usr/local/sbin/pkg (lldb) target create > > "/usr/local/sbin/pkg" --core "~/pkg.core" Core file '~/pkg.core' > > (x86_64) was loaded. (lldb) bt all > > * thread #1, name = 'pkg', stop reason = signal SIGSEGV > > * frame #0: 0x0000000000527a4e pkg`format_comment + 30 > > frame #1: 0x0000000000524dde pkg`pkg_xstring_vprintf + 206 > > frame #2: 0x0000000000524cad pkg`pkg_vprintf + 77 > > frame #3: 0x0000000000524c45 pkg`pkg_printf + 149 > > frame #4: 0x00000000003107d4 pkg`print_version + 308 > > frame #5: 0x000000000030f9fe pkg`do_source_index + 1086 > > frame #6: 0x000000000030f2d3 pkg`exec_version + 1619 > > frame #7: 0x0000000000304856 pkg`main + 2838 > > frame #8: 0x00000008293b80c0 libc.so.7`__libc_start1 + 304 > > frame #9: 0x00000000002fa240 pkg`_start + 48 > > (lldb) q > > > > Thanks in advance! > > > > > The branch main has been updated by bapt: > > > > > > URL: > > https://cgit.FreeBSD.org/ports/commit/?id=460f6d861e431f8952debe0ee74c40a6a6a583e7 > > > > > > commit 460f6d861e431f8952debe0ee74c40a6a6a583e7 > > > Author: Baptiste Daroussin > > > AuthorDate: 2025-01-22 10:36:51 +0000 > > > Commit: Baptiste Daroussin > > > CommitDate: 2025-01-22 10:37:45 +0000 > > > > > > ports-mgmt/pkg: update to 2.0.0 > > > > > > > (Snip all below) > > > > This is an old bug that should have broke long ago, thanks for reporting: > fixed: > https://github.com/freebsd/pkg/commit/8dd2edca3350cd6d8a4fe2e8a6a59bf0cbda3ea7 > > I will wait a couple of days for other reports before issueing a 2.0.1, I don't > consider this as a blocking issue for now. > > Best regards, > Bapt Hi. Downloaded the diff as a patch, rename/slightly edited (not 100% sure "-p1" diff is OK or not) to fit in ports-mgmt/pkg/files/, rebuild/reinstall fixed the issue. And agree with that this isn't a blocking issue, because other pkgs built with pkg 2.0.0 was sanely upgraded using 2.0.0. Just failed to confirm by `pkg version -o -v`. Thanks! For anyone who cannot wait for the fix to be committed and want testing: Drop the attached patch into ports-mgmt/pkg/file/ and rebuild/reinstall. Don't forget to delete it when pulling updates including the fix from official git repo to avoid any kind of conflicts! -- Tomoaki AOKI --Multipart=_Wed__22_Jan_2025_23_50_23_+0900_KJh6HB+hbJH0llhq Content-Type: text/x-diff; name="patch-src_version.c" Content-Disposition: attachment; filename="patch-src_version.c" Content-Transfer-Encoding: 7bit From 8dd2edca3350cd6d8a4fe2e8a6a59bf0cbda3ea7 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Wed, 22 Jan 2025 14:52:18 +0100 Subject: [PATCH] version: fix bad usage of pkg_printf --- src/version.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/version.c b/src/version.c index 85e1749b2..cf0cbe909 100644 --- src/version.c.orig +++ src/version.c @@ -113,8 +113,10 @@ print_version(struct pkg *pkg, const char *source, const char *ver, if ((opt & VERSION_NOSTATUS) && limchar == key) return; - if (opt & VERSION_ORIGIN) - pkg_printf("%-34o %c", pkg, key); + if (opt & VERSION_ORIGIN) { + pkg_printf("%-34o", pkg); + printf("%c", key); + } else { cout = pkg_printf("%n-%v", pkg, pkg); cout = 35 - cout; --Multipart=_Wed__22_Jan_2025_23_50_23_+0900_KJh6HB+hbJH0llhq--