NetBSD Problem Report #53731

From www@NetBSD.org  Sun Nov 18 16:46:50 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 695857A16B
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 18 Nov 2018 16:46:50 +0000 (UTC)
Message-Id: <20181118164649.2E5E37A1D7@mollari.NetBSD.org>
Date: Sun, 18 Nov 2018 16:46:49 +0000 (UTC)
From: js-pkgsrc@heap.zone
Reply-To: js-pkgsrc@heap.zone
To: gnats-bugs@NetBSD.org
Subject: Missing dependency and wrong PLIST for chat/gajim
X-Send-Pr-Version: www-1.0

>Number:         53731
>Category:       pkg
>Synopsis:       Missing dependency and wrong PLIST for chat/gajim
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    nia
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 18 16:50:00 +0000 2018
>Closed-Date:    Wed Feb 06 20:21:06 +0000 2019
>Last-Modified:  Wed Feb 06 20:21:06 +0000 2019
>Originator:     Jonathan Schleifer
>Release:        HEAD
>Organization:
>Environment:
macOS Mojave
>Description:
chat/gajim needs security/py-certifi, but the dependency is not declared in the Makefile.
Additionally, the PLIST is incorrect (at least on macOS - I have not verified on anything else).

Proposed fix attached.
>How-To-Repeat:
Build chat/gajim (on macOS)
>Fix:
commit 9cfd49361243ea123d23cf38bc601f0330f92db5
Author: Jonathan Schleifer <js@heap.zone>
Date:   Sun Nov 18 17:46:08 2018 +0100

    chat/gajim: Fix PLIST and missing dependency

diff --git a/chat/gajim/Makefile b/chat/gajim/Makefile
index 2522a357ea6..1fab37c9f32 100644
--- a/chat/gajim/Makefile
+++ b/chat/gajim/Makefile
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.44 2018/11/16 00:00:02 nia Exp $

 DISTNAME=	gajim-1.1.0
+PKGREVISION=	1
 CATEGORIES=	chat python
 MASTER_SITES=	https://www.gajim.org/downloads/1.1/

@@ -19,6 +20,7 @@ _TOOLS_USE_PKGSRC.msgfmt=	yes

 PYTHON_VERSIONS_INCOMPATIBLE=	27

+DEPENDS+=	${PYPKGPREFIX}-certifi-[0-9]*:../../security/py-certifi
 DEPENDS+=	${PYPKGPREFIX}-cssutils-[0-9]*:../../textproc/py-cssutils
 DEPENDS+=	${PYPKGPREFIX}-gobject3-[0-9]*:../../devel/py-gobject3
 DEPENDS+=	${PYPKGPREFIX}-keyring-[0-9]*:../../security/py-keyring
diff --git a/chat/gajim/PLIST b/chat/gajim/PLIST
index fbe96e604a5..c1af9e78fad 100644
--- a/chat/gajim/PLIST
+++ b/chat/gajim/PLIST
@@ -1,13 +1,13 @@
-@comment $NetBSD: PLIST,v 1.4 2018/11/16 00:00:02 nia Exp $
+@comment $NetBSD$
 bin/gajim
 bin/gajim-history-manager
 bin/gajim-remote
-${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
-${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
-${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
-${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
-${PYSITELIB}/${EGG_INFODIR}/requires.txt
-${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/${PKGNAME}+5b86a4f31b81-py${PYVERSSUFFIX}.egg-info/PKG-INFO
+${PYSITELIB}/${PKGNAME}+5b86a4f31b81-py${PYVERSSUFFIX}.egg-info/SOURCES.txt
+${PYSITELIB}/${PKGNAME}+5b86a4f31b81-py${PYVERSSUFFIX}.egg-info/dependency_links.txt
+${PYSITELIB}/${PKGNAME}+5b86a4f31b81-py${PYVERSSUFFIX}.egg-info/entry_points.txt
+${PYSITELIB}/${PKGNAME}+5b86a4f31b81-py${PYVERSSUFFIX}.egg-info/requires.txt
+${PYSITELIB}/${PKGNAME}+5b86a4f31b81-py${PYVERSSUFFIX}.egg-info/top_level.txt
 ${PYSITELIB}/gajim/__init__.py
 ${PYSITELIB}/gajim/__init__.pyo
 ${PYSITELIB}/gajim/__init__.pyc

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->nia
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Sun, 18 Nov 2018 16:56:54 +0000
Responsible-Changed-Why:
Nia, can you please give it a look?
(over to MAINTAINER)


State-Changed-From-To: open->feedback
State-Changed-By: leot@NetBSD.org
State-Changed-When: Sun, 18 Nov 2018 20:59:51 +0000
State-Changed-Why:
Possible different patch for PLIST mismatch shared.


From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53731: Missing dependency and wrong PLIST for chat/gajim
Date: Sun, 18 Nov 2018 21:58:59 +0100

 Hello Jonathan!

 js-pkgsrc@heap.zone writes:
 > [...]
 > >Description:
 > chat/gajim needs security/py-certifi, but the dependency is not declared in the Makefile.
 > Additionally, the PLIST is incorrect (at least on macOS - I have not verified on anything else).
 > [...]

 Thank you for the PR and patch!  The `certifi' dependency seems not
 specified in setup.py (and probably other files) despite needed
 (and that's probably worth to also ping upstream about it).

 The PLIST change seems a bit weird!  I think that the real problem
 is actually `git' invoked in gajim/__init__.py that overrides
 `__version__' and that leads to a non-matching EGG_INFODIR.

 I've adjusted your proposed patch to address the PLIST problem directly
 via a patch to gajim/__init__.py but I have not tested them (I'll attach
 it at the end of the email but a version is available also in:

  <https://www.NetBSD.org/~leot/pkgsrc-patches/gajim-pr-53731.patch>

 Can you please try it and let us know if that fixes the PLIST problem?


 Thank you!


 -------------8<-----------------8<-----------------8<---------------
 gajim: Add missing dependency to certifi and do not override __version__

 - certifi module is needed despite not explicitly specified as a
   dependency in setup.py (probably a line about it should be added
   in setup.py too and shared with upstream).
 - Do not override __version__ if git is found. This leads to possible PLIST
   problems due non-matching EGG_INFODIR.

 Problem and patch by Jonathan Schleifer via PR pkg/53731 (PLIST problem a bit
 reworked by myself).


 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/chat/gajim/Makefile,v
 retrieving revision 1.44
 diff -u -p -r1.44 Makefile
 --- Makefile	16 Nov 2018 00:00:02 -0000	1.44
 +++ Makefile	18 Nov 2018 20:45:23 -0000
 @@ -1,6 +1,7 @@
  # $NetBSD: Makefile,v 1.44 2018/11/16 00:00:02 nia Exp $

  DISTNAME=	gajim-1.1.0
 +PKGREVISION=	1
  CATEGORIES=	chat python
  MASTER_SITES=	https://www.gajim.org/downloads/1.1/

 @@ -19,6 +20,7 @@ _TOOLS_USE_PKGSRC.msgfmt=	yes

  PYTHON_VERSIONS_INCOMPATIBLE=	27

 +DEPENDS+=	${PYPKGPREFIX}-certifi-[0-9]*:../../security/py-certifi
  DEPENDS+=	${PYPKGPREFIX}-cssutils-[0-9]*:../../textproc/py-cssutils
  DEPENDS+=	${PYPKGPREFIX}-gobject3-[0-9]*:../../devel/py-gobject3
  DEPENDS+=	${PYPKGPREFIX}-keyring-[0-9]*:../../security/py-keyring
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/chat/gajim/distinfo,v
 retrieving revision 1.7
 diff -u -p -r1.7 distinfo
 --- distinfo	16 Nov 2018 00:00:02 -0000	1.7
 +++ distinfo	18 Nov 2018 20:45:23 -0000
 @@ -4,4 +4,5 @@ SHA1 (gajim-1.1.0.tar.gz) = 222df24c209c
  RMD160 (gajim-1.1.0.tar.gz) = 5e691a6f8e69b1ea6b6795bc841c0ac227a47182
  SHA512 (gajim-1.1.0.tar.gz) = 6a78de3e1aed055174b8f9d897a5a93fb1972d38cbd168e3c23d9af7a66ed63236bbc22054c24a31b0fda3c1d73e56240ccb18ccf805f654b0e331d8092ae626
  Size (gajim-1.1.0.tar.gz) = 9530150 bytes
 +SHA1 (patch-gajim_____init____.py) = 555df1ee88159aa0c9d5232fba46924983d7a17b
  SHA1 (patch-setup.py) = f8fd2bb45d0ced7c86972218e1a0194ad35127b8
 Index: patches/patch-gajim_____init____.py
 ===================================================================
 RCS file: patches/patch-gajim_____init____.py
 diff -N patches/patch-gajim_____init____.py
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-gajim_____init____.py	18 Nov 2018 20:45:23 -0000
 @@ -0,0 +1,20 @@
 +$NetBSD$
 +
 +Do not run `git' to override __version__ and possible inconsistencies in PLIST
 +due a different ${EGG_INFODIR}.
 +
 +--- gajim/__init__.py.orig	2018-11-06 20:12:20.000000000 +0000
 ++++ gajim/__init__.py
 +@@ -6,12 +6,3 @@ __version__ = "1.1.0"
 + IS_FLATPAK = False
 + if os.path.exists('/app/share/run-as-flatpak'):
 +     IS_FLATPAK = True
 +-
 +-try:
 +-    p = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
 +-                         stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
 +-    node = p.communicate()[0]
 +-    if node:
 +-        __version__ += '+' + node.decode('utf-8').strip()
 +-except Exception:
 +-    pass

From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53731 CVS commit: pkgsrc/chat/gajim
Date: Mon, 19 Nov 2018 14:50:25 +0000

 Module Name:	pkgsrc
 Committed By:	nia
 Date:		Mon Nov 19 14:50:24 UTC 2018

 Modified Files:
 	pkgsrc/chat/gajim: Makefile distinfo
 Added Files:
 	pkgsrc/chat/gajim/patches: patch-gajim_____init____.py

 Log Message:
 gajim: Add missing dependency to certifi and do not override __version__

 - certifi module is needed despite not explicitly specified as a
   dependency in setup.py (probably a line about it should be added
   in setup.py too and shared with upstream).
 - Do not override __version__ if git is found. This leads to possible PLIST
   problems due non-matching EGG_INFODIR.

 Problem and patch by Jonathan Schleifer via PR pkg/53731 (PLIST problem a bit
 reworked by leot).


 To generate a diff of this commit:
 cvs rdiff -u -r1.44 -r1.45 pkgsrc/chat/gajim/Makefile
 cvs rdiff -u -r1.7 -r1.8 pkgsrc/chat/gajim/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/chat/gajim/patches/patch-gajim_____init____.py

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: nia <nia@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org,
	leot@NetBSD.org, js-pkgsrc@heap.zone
Subject: Re: pkg/53731 (Missing dependency and wrong PLIST for chat/gajim)
Date: Mon, 19 Nov 2018 14:53:33 +0000

 The patch looks fine to me; I've committed it.

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 26 Nov 2018 07:26:18 +0000
State-Changed-Why:
got feedback on the alternate patch...


State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 26 Nov 2018 07:26:43 +0000
State-Changed-Why:
...but since the version committed isn't the one you sent in, if you could
check that it works that would be great.


State-Changed-From-To: feedback->closed
State-Changed-By: nia@NetBSD.org
State-Changed-When: Wed, 06 Feb 2019 20:21:06 +0000
State-Changed-Why:
fix committed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.