NetBSD Problem Report #52747

From www@NetBSD.org  Tue Nov 21 21:51:48 2017
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 87F117A1A0
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 21 Nov 2017 21:51:48 +0000 (UTC)
Message-Id: <20171121215147.5A9797A1F0@mollari.NetBSD.org>
Date: Tue, 21 Nov 2017 21:51:47 +0000 (UTC)
From: william@welliver.org
Reply-To: william@welliver.org
To: gnats-bugs@NetBSD.org
Subject: new package submission for influxdb 1.4.2
X-Send-Pr-Version: www-1.0

>Number:         52747
>Category:       pkg
>Synopsis:       new package submission for influxdb 1.4.2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 21 21:55:00 +0000 2017
>Last-Modified:  Tue Jan 09 20:50:00 +0000 2018
>Originator:     William Welliver
>Release:        trunk
>Organization:
N/A
>Environment:
NetBSD netbsd-7-1-2017q3-pkgbuild-1711171149 7.1 NetBSD 7.1 (GENERIC.201703111743Z) amd64
>Description:
Attached is a package for databases/influxdb, version 1.4.2. This package has a good pkglint result and has been tested on NetBSD 7.1 and illumos. It includes rc.conf and SMF support. Influxdb is written in go, and uses a build approach similar to www/grafana. 
>How-To-Repeat:

>Fix:
begin 644 databases-influxdb.tar.gz
M'XL(``QB%%H``^T::W/:2#)?F5\Q2USA;N_0$Z'@#0X89(>+`2_"V:1V]U1"
M&F&5A<1)PG;6Q7^_GM$#@8F=J[-=6[7J2@JINZ>[9Z:G'R.[ON.M;NW9JV<$
M06@(JJ+`+X/=7_8LRI*@"$U!527`BV)#5E\ISVE4!JLH-D.,7X5!$#_$=W-)
MB/<2!KTL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_4_[]6+VMKB"7YLFBX/UES$-J<A4(04]A>2N;X&I2
M-BZN^%ED<^"UW.+JI2YB-C=;;@0%E!,\@XY'^G]!4>3-]U^5W?_*4E,I^_\7
M@+3[AX9>_]`5\=^VN_*TK?P[5--O)<>:S5HMR[0;MBG*EFI*0H.(2LMNR0*Q
M966F-AL"09-A7VP*#T@2+=)TB-J<M51S)MNR*(HMN2DJC@UHI2&!X+<R`+5(
M$:6';&K-R%M!MI6&8LY:LJ0(0JLEVX*MSIHMQQ:;+?"IUJPE2(K:,AT+C&P1
MLR'!1!IRR[0)<+9:JB,YS;>J[<BB2IJJZ2@MT99;,T=HOFU8#1CB2):JMIP9
MR%*;CFJI1%$5TYDAW?V#/#13$=Q84O'L*U11?\Z;U?S\0\#J39Y'QV/G7V1_
M_R'"4DF2TA#9WW])JEJ>_Q>`_!NL&V&H6X(E\>M1L`HMPK[[XFC[JRPP`-J]
MA0:;)F''C&)$RT%:+M!/""&)@?_:]'#@W!/`_3F/P%\:\O-_?@:-U//H>.S[
MKRC+F_O_)/]+].__RO/__-"AS13T]C@O!#:?)PN/V15"$95<%A0Q<;0HO-KL
M^?Z5`D,7KQ5H1T);B70<)^YB,NU[*(GX/02PY3[6KL],ZVJUW$=)Z_@]E+3C
MW4M:^?O0:1>[AP2H/?W&UCW.'GIZ+_0`:<^5T3[NS2W2/FI^L80>O=%!'>A3
M:+]*)Y>_%._`RF!?0@DEE%!""2644$())9100@DEE%!""2644$())9100@DE
0E%!""2\%_P7^)]W8`%```%!"
`
end

>Audit-Trail:
From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52747: new package submission for influxdb 1.4.2
Date: Tue, 12 Dec 2017 20:12:23 +0000

 --y0ulUmNC+osPPQO6
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 Hi,

 do-build:
         cd ${WRKSRC} && ${SETENV} ${PKGSRC_MAKE_ENV}  ${PREFIX}/bin/go get github.com/sparrc/gdm

 We don't allow fetching of external things except during fetch
 (This has a lot of advantages: we have a distfile mirror, and if
 upstream changes their sources because a server was compromised, we will
 notice it, as they are checked against a checksum at the time of the
 commit)

 These will have to be their own packages.

 I've amended the Makefile a bit while appeasing 'pkglint -Wall -Call'
 which is more noisy. It is attached.

 --y0ulUmNC+osPPQO6
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=Makefile

 # $NetBSD: Makefile,v 1.3 2017/07/23 07:20:42 wiz Exp $

 DISTNAME=	influxdb-1.4.2
 CATEGORIES=	databases
 MASTER_SITES=	${MASTER_SITE_GITHUB:=influxdata/}

 MAINTAINER=	william@welliver.org
 HOMEPAGE=	https://www.influxdata.com/
 COMMENT=	Time-series Database
 LICENSE=	mit

 GITHUB_PROJECT=	influxdb
 GITHUB_TAG=	v${PKGVERSION_NOREV}

 # pkglint thinks this is redundant, but if we don't have it, file extraction fails
 EXTRACT_SUFX=	.tar.gz

 IFDB_DISTNAME=			${DISTNAME}${EXTRACT_SUFX}
 DISTFILES=			${IFDB_DISTNAME}
 EXTRACT_ONLY=			${IFDB_DISTNAME}
 EXTRACT_DIR.${IFDB_DISTNAME}=	${WRKDIR}/src/github.com/influxdata
 WRKSRC=				${WRKDIR}/src/github.com/influxdata/influxdb
 USE_TOOLS+=			gmake

 BUILD_DEPENDS+=			go-1\.[8-9]*:../../lang/go
 BUILD_DEPENDS+=			asciidoc-[0-9]*:../../textproc/asciidoc
 BUILD_DEPENDS+=			xmlto-[0-9]*:../../textproc/xmlto

 PKGSRC_MAKE_ENV+=		GOPATH=${WRKDIR}

 PKG_SYSCONFSUBDIR=	influxdb

 DATADIR=	${VARBASE}/lib/influxdb
 LOGDIR=		${VARBASE}/log/influxdb

 SUBST_CLASSES+=		fix-cfg
 SUBST_STAGE.fix-cfg=	pre-configure
 SUBST_MESSAGE.fix-cfg=	Disabling phone-home in sample config
 SUBST_FILES.fix-cfg=	etc/config.sample.toml
 SUBST_SED.fix-cfg=	-e 's/^\# reporting-disabled = false/reporting-disabled = true/'

 BUILD_DEFS+=		INFLUXDB_USER INFLUXDB_GROUP VARBASE
 FILES_SUBST+=		INFLUXDB_USER=${INFLUXDB_USER:Q}
 FILES_SUBST+=		INFLUXDB_GROUP=${INFLUXDB_GROUP:Q}
 FILES_SUBST+=		DATADIR=${DATADIR:Q}
 FILES_SUBST+=		LOGDIR=${LOGDIR:Q}

 .include "../../mk/bsd.prefs.mk"

 INFLUXDB_USER?=		influxdb
 INFLUXDB_GROUP?=	influxdb
 OWN_DIRS_PERMS+=	${DATADIR} ${INFLUXDB_USER} ${INFLUXDB_GROUP} 0700
 OWN_DIRS_PERMS+=	${LOGDIR} ${INFLUXDB_USER} ${INFLUXDB_GROUP} 0700
 PKG_USERS_VARS=		INFLUXDB_USER
 PKG_GROUPS_VARS=	INFLUXDB_GROUP
 PKG_GROUPS=		${INFLUXDB_GROUP}
 PKG_USERS=		${INFLUXDB_USER}:${INFLUXDB_GROUP}
 RCD_SCRIPTS=		influxdb

 INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 etc/influxdb share/doc/influxdb share/influxdb

 DOC_FILES+=	LICENSE LICENSE_OF_DEPENDENCIES.md QUERIES.md README.md CHANGELOG.md
 BIN_FILES+=	influx influx_inspect influx_stress influx_tsm influxd stress_test_server test_client
 CONF_FILES+=	 ${PREFIX}/share/influxdb/config.sample.toml ${PKG_SYSCONFDIR}/config.toml

 post-extract:
 	${MV} ${WRKDIR}/src/github.com/influxdata/${DISTNAME}	\
 	  ${WRKDIR}/src/github.com/influxdata/influxdb
 #	${CP} files/mmap_solaris.go ${WRKSRC}/pkg/mmap

 do-build:
 	cd ${WRKSRC} && ${SETENV} ${PKGSRC_MAKE_ENV}  ${PREFIX}/bin/go get github.com/sparrc/gdm
 	cd ${WRKSRC} && ${SETENV} ${PKGSRC_MAKE_ENV}  ${PREFIX}/bin/go install github.com/sparrc/gdm
 	cd ${WRKSRC} && ${SETENV} ${PKGSRC_MAKE_ENV}  ${WRKDIR}/bin/gdm restore
 	cd ${WRKSRC} && ${SETENV} ${PKGSRC_MAKE_ENV}  ${PREFIX}/bin/go get -ldflags "-X main.version=${PKGVERSION_NOREV} -X main.commit=${GITHUB_TAG} -X main.buildstamp=pkgsrc" ./...
 	cd ${WRKSRC} && ${SETENV} ${PKGSRC_MAKE_ENV}  ${PREFIX}/bin/go install ./...

 do-install:
 	cd ${WRKSRC}/man && ${SETENV} ${PKGSRC_MAKE_ENV} ${MAKE_PROGRAM}
 #.for idir in ${INSTALLATION_DIRS}
 #	${MKDIR}  ${DESTDIR}${PREFIX}/${idir}
 #.endfor
 	for manpage in ${WRKSRC}/man/*.1 ; do \
 		${INSTALL_MAN} $$manpage ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 ; \
 	done
 .for x in ${BIN_FILES}
 	${INSTALL_PROGRAM} ${WRKDIR}/bin/${x}	\
 	  ${DESTDIR}${PREFIX}/bin/${x}
 .endfor
 .for x in ${DOC_FILES}
 	${INSTALL_MAN} ${WRKSRC}/${x} \
 	  ${DESTDIR}${PREFIX}/share/doc/influxdb/${x}
 .endfor
 	${INSTALL_DATA} ${WRKSRC}/etc/config.sample.toml  ${DESTDIR}${PREFIX}/share/influxdb/

 .include "../../mk/bsd.pkg.mk"

 --y0ulUmNC+osPPQO6--

From: "H. William Welliver III" <william@welliver.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52747: new package submission for influxdb 1.4.2
Date: Sat, 6 Jan 2018 13:55:53 -0500

 Hi,

 Thanks for the feedback. The restriction on fetching outside of the =
 fetch action makes complete sense.  I=E2=80=99m not opposed to creating =
 a package for the gdm dependency manager=E2=80=A6 it seems reasonable to =
 make the tool available as a package.=20

 However, after doing more research, I think that go software building =
 seems determined to operate in opposition to that concept: influxdb, for =
 example, has 20 or more dependencies, some of which are only available =
 as git checkouts (which is what the gdm tool is being used to fetch and =
 manage). Since each of those dependencies are based on a particular =
 commit id, I=E2=80=99m not sure that it would be feasible to create =
 packages for each dependency.=20

 Would an acceptable alternative be to create a distribution file that =
 contained the particular go files required by a particular version of =
 influxdb and make that available on, say, GitHub? That way, a canonical =
 set of source would be available for download by pkgsrc and the build =
 could proceed without any additional network access?=

From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, 
	william@welliver.org
Subject: Re: pkg/52747: new package submission for influxdb 1.4.2
Date: Tue, 9 Jan 2018 21:49:26 +0100

 >  However, after doing more research, I think that go software building =
 >  seems determined to operate in opposition to that concept: influxdb, for =
 >  example, has 20 or more dependencies, some of which are only available =
 >  as git checkouts (which is what the gdm tool is being used to fetch and =
 >  manage). Since each of those dependencies are based on a particular =
 >  commit id, I=E2=80=99m not sure that it would be feasible to create =
 >  packages for each dependency.=20

 This has been done before, even though it is arguably quite tedious.
 Look at the go-hugo package for inspiration.

 I am working on https://github.com/bsiegert/gourl2pkg, which is not
 quite finished but will at least tell you what the dependencies are.

 >  Would an acceptable alternative be to create a distribution file that =
 >  contained the particular go files required by a particular version of =
 >  influxdb and make that available on, say, GitHub? That way, a canonical =
 >  set of source would be available for download by pkgsrc and the build =
 >  could proceed without any additional network access?=

 This would be somewhat questionable if not done by a developer.

 You might try to get your upstream to vendor all dependencies, i.e.
 put them in a vendor subdirectory. This is what Caddy has done, and it
 has made packaging it trivial :)

 -- 
 Benny

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.