Wednesday, February 28, 2018

Re: Porters, please read re GitHub auto-generated tarballs vs releases

On Tue Feb 27, 2018 at 12:28:07PM +0000, Stuart Henderson wrote:
> Many ports are using github's on-the-fly generated source-code tarballs
> via the GH_ variables in Makefiles.
>
> These are *not* guaranteed to be stable, they can change as github
> update software and caches expire (this has happened at some point over
> the last few months so we have been seeing a number of hash failures
> recently). Due to local caches at the github clusters, these files
> can be different depending on which cluster you're connecting to,
> so if you regenerate distinfo to match the file which you see
> locally, it may cause breakage elsewhere in the world.
>
> : "It is not meant to be reliable or a way to distribute software
> : releases and nothing in the software stack is made to try to
> : produce consistent archives."
>
> Sometimes upstream *only* provides these auto generated files, but in
> other cases they use github's releases infrastructure and upload "normal"
> generated distfiles which are not then subject to change.
>
> To identify this, go to the project's "releases" page.
> Using an example of a port I've just fixed:
>
> https://github.com/rdoeffinger/iec16022/releases/.
>
> Under "Assets" on this page, you might see files with a "box" icon
> which are uploads.
>
> On the iec16022 page I'm using as an example, Assets has these:
>
> iec16022-0.3.0.exe <- uploaded windows binary
> iec16022-0.3.0.tar.xz <- uploaded source tarball
> iec16022-0.3.0.tar.xz.asc <- uploaded gpg sig
> Source code (zip) <- auto generated
> Source code (tar.gz) <- auto generated
>
> If there are only entries for "Source code (zip)" and "Source code
> (tar.gz)" the only options are to use GH_TAGNAME or ask upstream to
> upload a file.
>
> But in the case above, a proper distfile is available, so I've
> switched the graphics/iec16022 port across to use it.
>
> This is done by avoiding the GH_* variables and reducing the amount
> of magic in the ports Makefile: just use DISTNAME and MASTER_SITES
> as standard, and set HOMEPAGE if needed (it's provided automatically
> when GH_* are set).
>
> You will also often find that these uploaded tarballs have autoconf
> scripts etc. generated, whereas they aren't present in the auto-
> generated tarballs, so you may be able to remove make targets and
> dependencies needed to generate these.
>
> If you are publishing your own software to github, please do use
> the releases infrastructure and upload distfiles that you have
> generated yourself!
>
> I've done a query of the github releases API for all ports that are
> currently using GH_TAGNAME and looked at assets for these. I have skipped
> the ones where the assets are clearly only for distributing binaries and
> listed the others: it is quite likely that the following ports do have
> source tarballs available which can be used instead of the auto-generated
> ones.
>
> x11/compton
> x11/xdotool
> x11/xwallpaper
>

ok for x11?

Index: compton/Makefile
===================================================================
RCS file: /cvs/ports/x11/compton/Makefile,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 Makefile
--- compton/Makefile 23 May 2015 16:34:40 -0000 1.3
+++ compton/Makefile 28 Feb 2018 10:47:39 -0000
@@ -2,13 +2,14 @@

COMMENT = lightweight compositor for X, forked from xcompmgr-dana

-VERSION = 0.1_beta2
-GH_ACCOUNT = chjj
-GH_PROJECT = compton
-GH_TAGNAME = v${VERSION}
-DISTNAME = compton-${VERSION:S/_//}
+V = 0.1_beta2
+PKGNAME = compton-${V}
+DISTNAME = compton-git-v0.1_beta2-2013-10-21
+REVISION = 1
+
CATEGORIES = x11
-REVISION = 0
+
+HOMEPAGE = https://github.com/chjj/compton

MAINTAINER = Sunil Nimmagadda <sunil@nimmagadda.net>

@@ -18,6 +19,9 @@ PERMIT_PACKAGE_CDROM = Yes
WANTLIB += GL X11 Xcomposite Xdamage Xext Xfixes Xinerama Xrandr
WANTLIB += Xrender c config dbus-1 m pcre pthread

+MASTER_SITES = https://github.com/chjj/compton/releases/download/v${V}/
+EXTRACT_SUFX = .tar.xz
+
BUILD_DEPENDS = textproc/asciidoc
RUN_DEPENDS = devel/desktop-file-utils
LIB_DEPENDS = devel/libconfig \
@@ -26,7 +30,7 @@ LIB_DEPENDS = devel/libconfig \

USE_GMAKE = Yes
MAKE_FLAGS = CC="${CC}" \
- COMPTON_VERSION="${VERSION}" \
+ COMPTON_VERSION="${V}" \
APPDIR="${PREFIX}/share/applications" \
BINDIR="${PREFIX}/bin" \
MANDIR="${PREFIX}/man/man1"
Index: compton/distinfo
===================================================================
RCS file: /cvs/ports/x11/compton/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 distinfo
--- compton/distinfo 27 Oct 2014 11:21:49 -0000 1.1.1.1
+++ compton/distinfo 28 Feb 2018 10:47:39 -0000
@@ -1,2 +1,2 @@
-SHA256 (compton-0.1beta2.tar.gz) = e5zVKlcyYRb7XbP1+Jt9UOF3FSUtn9ebcLRazjCmsAk=
-SIZE (compton-0.1beta2.tar.gz) = 144239
+SHA256 (compton-git-v0.1_beta2-2013-10-21.tar.xz) = O71C5niAwONVyzQQoxLl3xrBo+zqISl0N2Y3lFqw79Y=
+SIZE (compton-git-v0.1_beta2-2013-10-21.tar.xz) = 128352
Index: xdotool/Makefile
===================================================================
RCS file: /cvs/ports/x11/xdotool/Makefile,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 Makefile
--- xdotool/Makefile 16 Mar 2016 16:46:33 -0000 1.14
+++ xdotool/Makefile 28 Feb 2018 10:47:42 -0000
@@ -2,9 +2,9 @@

COMMENT= fake keyboard and mouse input

-GH_TAGNAME= v3.20150503.1
-GH_PROJECT= xdotool
-GH_ACCOUNT= jordansissel
+V = 3.20150503.1
+DISTNAME = xdotool-${V}
+REVISION = 1
EPOCH= 0

SHARED_LIBS= xdo 0.1 # 1.1
@@ -19,6 +19,8 @@ PERMIT_PACKAGE_CDROM= Yes
USE_GMAKE= Yes

WANTLIB += X11 Xinerama Xtst c m xkbcommon
+
+MASTER_SITES = https://github.com/jordansissel/xdotool/releases/download/v${V}/

LIB_DEPENDS= x11/xkbcommon

Index: xdotool/distinfo
===================================================================
RCS file: /cvs/ports/x11/xdotool/distinfo,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 distinfo
--- xdotool/distinfo 6 Jan 2016 09:49:42 -0000 1.5
+++ xdotool/distinfo 28 Feb 2018 10:47:42 -0000
@@ -1,2 +1,2 @@
-SHA256 (xdotool-3.20150503.1.tar.gz) = sJfvDjiX0aJOP0Xw+u1YMpdC09lDS5tG65frEED5mb8=
-SIZE (xdotool-3.20150503.1.tar.gz) = 103128
+SHA256 (xdotool-3.20150503.1.tar.gz) = 6DJog71ekb7eczbL7hhubpFD9As/thyEr8m7Mbh+ltE=
+SIZE (xdotool-3.20150503.1.tar.gz) = 102125
Index: xwallpaper/Makefile
===================================================================
RCS file: /cvs/ports/x11/xwallpaper/Makefile,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 Makefile
--- xwallpaper/Makefile 23 Oct 2017 17:11:07 -0000 1.5
+++ xwallpaper/Makefile 28 Feb 2018 10:47:42 -0000
@@ -2,13 +2,14 @@

COMMENT = wallpaper setting utility for X

-GH_ACCOUNT = stoeckmann
-GH_PROJECT = xwallpaper
-GH_TAGNAME = v0.3.0
-REVISION= 0
+V = 0.3.0
+DISTNAME = xwallpaper-${V}
+REVISION = 1

CATEGORIES = x11 graphics

+HOMEPAGE = https://github.com/stoeckmann/xwallpaper
+
MAINTAINER = Rafael Sadowski <rsadowski@openbsd.org>

# ISC
@@ -17,6 +18,8 @@ PERMIT_PACKAGE_CDROM = Yes
# uses pledge()
WANTLIB += X11 Xpm c jpeg pixman-1 png xcb xcb-image
WANTLIB += xcb-randr xcb-shm xcb-util z
+
+MASTER_SITES = https://github.com/stoeckmann/xwallpaper/releases/download/v${V}/

LIB_DEPENDS += graphics/jpeg \
graphics/png
Index: xwallpaper/distinfo
===================================================================
RCS file: /cvs/ports/x11/xwallpaper/distinfo,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 distinfo
--- xwallpaper/distinfo 23 Oct 2017 06:30:14 -0000 1.3
+++ xwallpaper/distinfo 28 Feb 2018 10:47:42 -0000
@@ -1,2 +1,2 @@
-SHA256 (xwallpaper-0.3.0.tar.gz) = QZOfr3su+ShuOYX71hR8507BOYwR7IUUVK2+9aNulsU=
-SIZE (xwallpaper-0.3.0.tar.gz) = 14199
+SHA256 (xwallpaper-0.3.0.tar.gz) = DdInuQftzZjwlY6MdDo0L8PYWExaMO+M+Yc59O0oRgA=
+SIZE (xwallpaper-0.3.0.tar.gz) = 104300

No comments:

Post a Comment