Bug 199069 - New USE_GITHUB has inconsistent DISTNAMEs for same GH_TAGNAME
Summary: New USE_GITHUB has inconsistent DISTNAMEs for same GH_TAGNAME
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-31 17:19 UTC by Bryan Drewery
Modified: 2015-04-29 16:29 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Drewery freebsd_committer freebsd_triage 2015-03-31 17:19:42 UTC
I did just run across an actual bug with the new USE_GITHUB implementation.

~/svn/ports/ports-mgmt/poudriere # make -V DISTNAME
poudriere-3.1.2_GH0
~/svn/ports/ports-mgmt/poudriere # make -C ../poudriere-devel -V DISTNAME
freebsd-poudriere-3.1.99.20150331-3.1.2_GH0

Both are GH_TAGNAME=3.1.2 and have the same checksums.

~/svn/ports/ports-mgmt/poudriere # cat distinfo
SHA256 (poudriere-3.1.2_GH0.tar.gz) = f3c192d59ce1fe7756ca215e5de9b82f80f55c017f9e0fb4105e0344ddeb33f9
SIZE (poudriere-3.1.2_GH0.tar.gz) = 2714435
~/svn/ports/ports-mgmt/poudriere # cat ../poudriere-devel/distinfo
SHA256 (freebsd-poudriere-3.1.99.20150331-3.1.2_GH0.tar.gz) = f3c192d59ce1fe7756ca215e5de9b82f80f55c017f9e0fb4105e0344ddeb33f9
SIZE (freebsd-poudriere-3.1.99.20150331-3.1.2_GH0.tar.gz) = 2714435


There's really no reason the DISTNAME should differ on them. I haven't looked
into the problem yet but I suspect it is due to using DISTVERSION in the
DISTNAME.

I think it will be worth making these consistent as currently this leads to
duplication on mirrors for the same file.
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-04-28 18:44:52 UTC
A commit references this bug:

Author: bdrewery
Date: Tue Apr 28 18:44:17 UTC 2015
New revision: 384932
URL: https://svnweb.freebsd.org/changeset/ports/384932

Log:
  USE_GITHUB: For the new support, fix DISTNAME to be more consistent.

  When using GH_TAGNAME the DISTNAME would have GH_PROJECT and GH_ACCOUNT in
  it. When not using GH_TAGNAME it would not have this. Now both cases
  will add in the GH_PROJECT and GH_ACCOUNT.

  Add special care to ensure that the DISTVERSION is not added in twice. If
  a port does GH_TAGNAME=v${PORTVERSION} it will be added in twice though. For
  that case DISTVERSIONPREFIX=v should be set and no GH_TAGNAME should be used.

  empty() is used rather than (!defined || !${}) to support fmake.

  The purpose of setting DISTNAME at all in these cases is to make it more clear
  that the distfile is from *GITHUB* and to avoid collisions if a project were
  to be renamed or moved. Without adding in GH_PROJECT and GH_ACCOUNT then there
  are real risks that collisions on filenames would happen on renamed or moved
  projects, which is fairly common. A GITHUB-generated file may not match
  a custom-rolled or git-archive-rolled distfile.

  PR:		199069
  With hat:	portmgr
  Testing done:	All USE_GITHUB ports without GH_COMMIT were checksum/fetch/extract/WRKSRC tested.

Changes:
  head/Mk/bsd.port.mk
  head/archivers/liblz4/distinfo
  head/astro/gpxloggerd/distinfo
  head/audio/gogglesmm/distinfo
  head/benchmarks/smhasher/distinfo
  head/comms/dump1090_mr/distinfo
  head/databases/php5-redis/distinfo
  head/devel/editline/distinfo
  head/devel/fstrm/distinfo
  head/devel/hub/distinfo
  head/devel/injeqt/distinfo
  head/devel/osc/distinfo
  head/devel/protobuf-c/distinfo
  head/devel/sdl2pp/distinfo
  head/graphics/libsixel/distinfo
  head/irc/insub/distinfo
  head/lang/chibi-scheme/distinfo
  head/mail/libetpan/distinfo
  head/mail/mu/distinfo
  head/mail/roundcube-contextmenu/distinfo
  head/math/openblas/distinfo
  head/multimedia/emby-server/distinfo
  head/multimedia/libass/distinfo
  head/multimedia/openh264/distinfo
  head/multimedia/plexhometheater/distinfo
  head/net/GeoIP/distinfo
  head/net/freevrrpd/distinfo
  head/net/geoipupdate/distinfo
  head/net/go-cs/distinfo
  head/net/google-daemon/distinfo
  head/net/google-startup-scripts/distinfo
  head/net/libilbc/distinfo
  head/net/libsrtp/distinfo
  head/net/shadowsocks-libev/distinfo
  head/net/syncthing/distinfo
  head/net-mgmt/icinga2/distinfo
  head/polish/libgadu/distinfo
  head/ports-mgmt/poudriere/distinfo
  head/print/indexinfo/distinfo
  head/security/libzrtpcppcore/distinfo
  head/security/passivedns/distinfo
Comment 2 Bryan Drewery freebsd_committer freebsd_triage 2015-04-28 18:58:14 UTC
For the specific poudriere case I did not fix Mk/bsd.port.mk to do what I wanted. It is a very special case and I will solve it in poudriere-devel next time by overriding DISTNAME to match the main port's file name without the date from PORTVERSION slipping in.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-04-29 16:29:33 UTC
A commit references this bug:

Author: bdrewery
Date: Wed Apr 29 16:29:01 UTC 2015
New revision: 384988
URL: https://svnweb.freebsd.org/changeset/ports/384988

Log:
  Fix DISTNAME after USE_GITHUB changes in r384932.

  PR:		199069
  Pointyhat to:	bdrewery
  With hat:	portmgr

Changes:
  head/sysutils/backupchecker/distinfo
  head/sysutils/dunst/distinfo
  head/sysutils/zfstools/distinfo
  head/x11-toolkits/py-kivy/distinfo