NetBSD Problem Report #58997

From www@netbsd.org  Wed Jan 15 15:22:40 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 728F61A923A
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 15 Jan 2025 15:22:40 +0000 (UTC)
Message-Id: <20250115152238.E2F871A923B@mollari.NetBSD.org>
Date: Wed, 15 Jan 2025 15:22:38 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: devel/glib2 ships python script gtester-report but doesn't depend on python
X-Send-Pr-Version: www-1.0

>Number:         58997
>Category:       pkg
>Synopsis:       devel/glib2 ships python script gtester-report but doesn't depend on python
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 15 15:25:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        
>Organization:
The GnetBSD Foundpython
>Environment:
>Description:
The devel/glib2 package ships an executable bin/gtester-report which starts with, e.g.:

#! /usr/pkg/bin/python3.12

However, the package doesn't depend on Python at run-time, so after installing this glib2 package, bin/gtester-report is non-functional.

For cross-builds, if LOCALBASE does not match CROSS_LOCALBASE, this trips check-interpreter.

For example, if you're building cross packages into /opt/pkg on a development/build machine with native packages in /home/user/pkg, there will be a _native build-time_ Python interpreter at /home/user/pkg/bin/python3.12, but the path that gets baked into gtester-report is /opt/pkg/bin/python3.12, which probably doesn't exist on the build machine -- or if it does by accident, it falsely pacifies check-interpreter.
>How-To-Repeat:
1. install a glib2 binary package but not python
2. run gtester-report

or

1. set up a cross-build with LOCALBASE != CROSS_LOCALBASE
2. build devel/glib2
>Fix:
Several options:

1. Make glib2 depend on Python at runtime.
   => Probably not desirable.

2. Split bin/gtester-report into a separate package, say devel/glib2-gtester, and don't include it in glib2.
   => Simple matter of programming, may require finding affected downstream packages (annoying) and adjusting them (easy).

3. Ditch bin/gtester-report altogether.  It has this comment at the top:

   # Deprecated: Since GLib 2.62, gtester and gtester-report have been deprecated
   # in favour of TAP.

   => According to https://gitlab.gnome.org/GNOME/glib/-/releases/2.62.0, glib2 2.62 dates from 2019-09-05, more than five years ago.  No idea how many things still use it that also still work with newer glib2.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.