Date: Tue, 7 Apr 2020 19:34:04 -0600 From: Adam Weinberger <adamw@adamw.org> To: Markus Wipp <mw@wipp.bayern> Cc: FreeBSD Ports <freebsd-ports@freebsd.org> Subject: Re: Porting of Smallstep CA Message-ID: <CAP7rwcjuNDyeeQcuow7inxd4wW_gd8E49pybAk45B9q4NUmS=A@mail.gmail.com> In-Reply-To: <6F55C342-1ABB-4386-B674-F432EDE96D62@wipp.bayern> References: <6F55C342-1ABB-4386-B674-F432EDE96D62@wipp.bayern>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 7, 2020 at 2:08 PM Markus Wipp <mw@wipp.bayern> wrote: > > Hi all, > > I would like to create a port of the CA tool (basically two ports: cli an= d certificates) found on > https://github.com/smallstep > https://smallstep.com/ > > What I tried so far was: > 1) make it on my machine without the ports infrastructure. This basically= works fine and without any errors and modifications needed ( I just do a g= make bootstrap and then a gmake build ) > 2) tried to create a port using the guide at https://www.freebsd.org/doc/= en_US.ISO8859-1/books/porters-handbook/quick-porting.html > 3) tried Slow porting, but I think I=E2=80=99m not really understanding h= ow and where to begin > > The main issue is, that I don=E2=80=99t really know what I have to do her= e, to achieve what=E2=80=99s required to correctly build the port. > It is the very first time I=E2=80=99m trying to create a port. Hi Markus, You're on the right track here. The next step is that none of the stuff where go fetches a remote module can happen. All packages on the cluster (and the vast majority of end-user-built sets) are built using poudriere (ports-mgmt/poudriere), which shuts down all external traffic during builds. The port needs to specify all dependent modules. Take a look at another go port, like www/gohugo for an idea of how this works. net/geoipupdate is similar to what you're doing, where it needs go modules, but is built with gmake. You're misusing a couple constructs, but if you copy the framework in geoipupdate and gohugo you'll resolve most of them (also, define NO_WRKSUBDIR instead of setting WRKSRC=3DWRKDIR). I'm not sure where golint is entering in, but it needs to not be there. Linting is for upstream developers, and has no purpose for end-user builds. Does that help to get you started? # Adam > > My Makefile looks like this: > > # $FreeBSD $ > > PORTNAME=3D step-cli > DISTVERSIONPREFIX=3D v > DISTVERSION=3D 0.14.0-rc.4 > CATEGORIES=3D security > MASTER_SITES=3D https://github.com/smallstep/cli/releases/downl= oad/v${DISTVERSION}/ > #PKGNAMESUFFIX=3D 0.14.0-rc.4 > DISTNAME=3D ${PORTNAME}_${DISTVERSION} > MAINTAINER=3D mw@wipp.bayern > COMMENT=3D Smallstep step-ca command line client > LICENSE=3D APACHE20 > > #WRKSRC=3D ${WRKDIR}/step-cli > WRKSRC=3D ${WRKDIR}/ > NO_WRKSUBDIR=3D yes > > BUILD_DEPENDS=3D go>1:lang/go \ > bash>5:shells/bash \ > curl>7:ftp/curl \ > golint:devel/golint > > USES=3D gmake > MAKE_ARGS=3D build > > > .include <bsd.port.mk> > > > When I try to run make stage on this I get: > root@pkgbuild:/usr/ports/security/step-cli # make stage > =3D=3D=3D> Building for step-cli-0.14.0.r.4 > gmake[1]: Entering directory '/usr/ports/security/step-cli/work' > /bin/sh: golangci-lint: not found > gmake[1]: *** [make/common.mk:101: lint] Error 127 > gmake[1]: *** Waiting for unfinished jobs.... > go: finding module for package github.com/envoyproxy/protoc-gen-validate/= tests/harness/cases/go > go: finding module for package github.com/shurcooL/github_flavored_markdo= wn > go: finding module for package github.com/samuel/go-zookeeper/zk > go: finding module for package github.com/mozilla/scribe > go: finding module for package golang.org/x/mobile/event/lifecycle > go: finding module for package github.com/lyft/protoc-gen-star > go: finding module for package github.com/ethereum/go-ethereum/ethclient > go: finding module for package github.com/BurntSushi/xgb > go: finding module for package github.com/ethereum/go-ethereum/rlp > go: finding module for package github.com/oklog/oklog/pkg/group > go: finding module for package github.com/influxdata/influxdb1-client/v2 > go: finding module for package gopkg.in/yaml.v1 > go: finding module for package github.com/hashicorp/consul/api > go: finding module for package github.com/openzipkin/zipkin-go > go: finding module for package github.com/iancoleman/strcase > go: finding module for package github.com/BurntSushi/xgb/shm > go: finding module for package golang.org/x/mobile/event/key > go: finding module for package golang.org/x/image/math/fixed > go: finding module for package github.com/gorilla/mux > go: finding module for package github.com/ianlancetaylor/demangle > go: finding module for package github.com/openzipkin-contrib/zipkin-go-op= entracing > go: finding module for package go.mozilla.org/mozlog > go: finding module for package github.com/nats-io/nats.go > go: finding module for package github.com/envoyproxy/protoc-gen-validate/= tests/harness/go > go: finding module for package github.com/Sirupsen/logrus > go: finding module for package bitbucket.org/creachadair/shell > go: finding module for package github.com/envoyproxy/protoc-gen-validate/= tests/harness/gogo > go: finding module for package sourcegraph.com/sourcegraph/appdash/opentr= acing > go: finding module for package github.com/remyoudompheng/go-misc/zipfs > go: finding module for package github.com/benlaurie/gds-registers/registe= r > go: finding module for package github.com/BurntSushi/xgb/render > go: finding module for package github.com/shurcooL/gopherjslib > go: finding module for package github.com/openzipkin/zipkin-go/reporter/h= ttp > go: finding module for package golang.org/x/mobile/event/paint > go: finding module for package sourcegraph.com/sourcegraph/appdash > go: finding module for package github.com/VividCortex/gohistogram > go: finding module for package github.com/shurcooL/httpfs/vfsutil > go: finding module for package github.com/remyoudompheng/go-misc/weechat > go: finding module for package github.com/miekg/dns > go: finding module for package golang.org/x/mobile/event/mouse > go: finding module for package github.com/lyft/protoc-gen-star/lang/go > go: finding module for package gopkg.in/gcfg.v1 > go: finding module for package github.com/jgautheron/goconst > go: finding module for package github.com/otiai10/copy > go: finding module for package github.com/gorhill/cronexpr > go: finding module for package gopkg.in/src-d/go-git.v4 > go: finding module for package github.com/godbus/dbus > go: finding module for package github.com/lightstep/lightstep-tracer-go > go: finding module for package golang.org/x/image/font/inconsolata > go: finding module for package github.com/yudai/gojsondiff > go: finding module for package github.com/openzipkin/zipkin-go/propagatio= n/b3 > go: finding module for package github.com/envoyproxy/protoc-gen-validate/= tests/harness/cases/other_package/go > go: finding module for package golang.org/x/mobile/geom > go: finding module for package github.com/shurcooL/github_flavored_markdo= wn/gfmstyle > go: finding module for package github.com/BurntSushi/xgb/xproto > go: finding module for package github.com/casbin/casbin/persist/file-adap= ter > go: finding module for package github.com/remyoudompheng/go-misc/webclock > go: finding module for package github.com/pact-foundation/pact-go/dsl > go: finding module for package github.com/mgutz/ansi > go: finding module for package github.com/casbin/casbin > go: finding module for package github.com/google/licenseclassifier > go: finding module for package github.com/streadway/handy/breaker > go: finding module for package github.com/remyoudompheng/go-dbus > go: finding module for package github.com/remyoudompheng/go-liblzma > go: finding module for package github.com/aws/aws-sdk-go-v2/service/cloud= watch > go: finding module for package github.com/remyoudompheng/go-misc/webtoys/= irc > go: finding module for package github.com/envoyproxy/protoc-gen-validate/= tests/harness/cases/other_package/gogo > go: finding module for package github.com/aws/aws-sdk-go-v2/service/cloud= watch/cloudwatchiface > go: finding module for package gopkg.in/urfave/cli.v1 > go: finding module for package golang.org/x/image/math/f64 > go: finding module for package golang.org/x/image/font > go: finding module for package github.com/bradleyfalzon/revgrep > go: finding module for package github.com/ethereum/go-ethereum/core/types > go: finding module for package github.com/streadway/amqp > go: finding module for package github.com/remyoudompheng/go-misc/nokia/mm= s > go: finding module for package github.com/envoyproxy/protoc-gen-validate/= tests/harness/cases/gogo > go: finding module for package github.com/google/go-github/github > go: finding module for package github.com/sony/gobreaker > go: finding module for package github.com/aws/aws-sdk-go-v2/aws > go: finding module for package gopkg.in/pipe.v2 > go: finding module for package golang.org/x/mobile/event/size > go: finding module for package github.com/afex/hystrix-go/hystrix > go: finding module for package github.com/remyoudompheng/go-misc/webtoys/= vdeck > go: finding module for package golang.org/x/mobile/gl > go: finding module for package github.com/pborman/getopt/v2 > go: finding module for package github.com/apache/thrift/lib/go/thrift > go: finding module for package golang.org/x/image/math/f32 > go: finding module for package github.com/remyoudompheng/go-misc/pasteher= e > go: finding module for package github.com/aws/aws-lambda-go/events > go: finding module for package github.com/gregjones/httpcache/diskcache > go: finding module for package github.com/remyoudompheng/go-misc/weblibs > go: finding module for package github.com/remyoudompheng/go-misc/nokia/nb= u > go: finding module for package github.com/mattn/go-shellwords > go: finding module for package github.com/gregjones/httpcache > go: finding module for package github.com/performancecopilot/speed > go: finding module for package github.com/hudl/fargo > go: finding module for package honnef.co/go/js/dom > go: finding module for package github.com/neelance/astrewrite > go: finding module for package github.com/yudai/gojsondiff/formatter > go: finding module for package golang.org/x/image/vector > go: finding module for package github.com/viki-org/dnscache > go: finding module for package github.com/aryann/difflib > go: finding module for package github.com/openzipkin/zipkin-go/model > go: finding module for package github.com/remyoudompheng/go-misc/nokia/nb= f > go: finding module for package github.com/openzipkin/zipkin-go/reporter/r= ecorder > go: finding module for package github.com/neelance/sourcemap > go: finding module for package github.com/nats-io/nats-server/server > go: found gopkg.in/urfave/cli.v1 in gopkg.in/urfave/cli.v1 v1.20.0 > go: found github.com/godbus/dbus in github.com/godbus/dbus v4.1.0+incompa= tible > go: found gopkg.in/yaml.v1 in gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9d= f34309c0 > go: found github.com/lyft/protoc-gen-star in github.com/lyft/protoc-gen-s= tar v0.4.14 > go: found github.com/iancoleman/strcase in github.com/iancoleman/strcase = v0.0.0-20191112232945-16388991a334 > go: found github.com/casbin/casbin in github.com/casbin/casbin v1.9.1 > go: found github.com/afex/hystrix-go/hystrix in github.com/afex/hystrix-g= o v0.0.0-20180502004556-fa1af6a1f4f5 > go: found github.com/sony/gobreaker in github.com/sony/gobreaker v0.4.1 > go: found github.com/streadway/handy/breaker in github.com/streadway/hand= y v0.0.0-20200128134331-0f66f006fb2e > go: found github.com/apache/thrift/lib/go/thrift in github.com/apache/thr= ift v0.13.0 > go: found github.com/lightstep/lightstep-tracer-go in github.com/lightste= p/lightstep-tracer-go v0.20.0 > go: found github.com/openzipkin-contrib/zipkin-go-opentracing in github.c= om/openzipkin-contrib/zipkin-go-opentracing v0.4.5 > go: found github.com/openzipkin/zipkin-go in github.com/openzipkin/zipkin= -go v0.2.2 > go: found sourcegraph.com/sourcegraph/appdash in sourcegraph.com/sourcegr= aph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 > go: found github.com/oklog/oklog/pkg/group in github.com/oklog/oklog v0.3= .2 > go: found github.com/gorilla/mux in github.com/gorilla/mux v1.7.4 > go: found github.com/hashicorp/consul/api in github.com/hashicorp/consul/= api v1.4.0 > go: found github.com/nats-io/nats.go in github.com/nats-io/nats.go v1.9.2 > go: found github.com/aws/aws-sdk-go-v2/aws in github.com/aws/aws-sdk-go-v= 2 v0.20.0 > go: found github.com/VividCortex/gohistogram in github.com/VividCortex/go= histogram v1.0.0 > go: found github.com/influxdata/influxdb1-client/v2 in github.com/influxd= ata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d > go: found github.com/performancecopilot/speed in github.com/performanceco= pilot/speed v3.0.0+incompatible > go: found github.com/hudl/fargo in github.com/hudl/fargo v1.3.0 > go: found github.com/samuel/go-zookeeper/zk in github.com/samuel/go-zooke= eper v0.0.0-20190923202752-2cc03de413da > go: found github.com/streadway/amqp in github.com/streadway/amqp v0.0.0-2= 0200108173154-1c71cc93ed71 > go: found github.com/remyoudompheng/go-misc/nokia/nbf in github.com/remyo= udompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e > go: found github.com/remyoudompheng/go-liblzma in github.com/remyoudomphe= ng/go-liblzma v0.0.0-20190506200333-81bf2d431b96 > go: found github.com/remyoudompheng/go-dbus in github.com/remyoudompheng/= go-dbus v0.0.0-20121104212943-b7232d34b1d5 > go: found github.com/jgautheron/goconst in github.com/jgautheron/goconst = v0.0.0-20200227150835-cda7ea3bf591 > go: found github.com/bradleyfalzon/revgrep in github.com/bradleyfalzon/re= vgrep v0.0.0-20170920092642-c04006dc3307 > go: found github.com/ianlancetaylor/demangle in github.com/ianlancetaylor= /demangle v0.0.0-20181102032728-5e5cf60278f6 > go: found github.com/ethereum/go-ethereum/ethclient in github.com/ethereu= m/go-ethereum v1.9.12 > go: found github.com/benlaurie/gds-registers/register in github.com/benla= urie/gds-registers v0.0.0-20180214133647-6355673a9585 > go: found bitbucket.org/creachadair/shell in bitbucket.org/creachadair/sh= ell v0.0.6 > go: found github.com/otiai10/copy in github.com/otiai10/copy v1.1.1 > go: found github.com/google/licenseclassifier in github.com/google/licens= eclassifier v0.0.0-20200402202327-879cb1424de0 > go: found gopkg.in/src-d/go-git.v4 in gopkg.in/src-d/go-git.v4 v4.13.1 > go: found github.com/neelance/sourcemap in github.com/neelance/sourcemap = v0.0.0-20200213170602-2833bce08e4c > go: found github.com/shurcooL/httpfs/vfsutil in github.com/shurcooL/httpf= s v0.0.0-20190707220628-8d4bc4ba7749 > go: found github.com/neelance/astrewrite in github.com/neelance/astrewrit= e v0.0.0-20160511093645-99348263ae86 > go: found gopkg.in/gcfg.v1 in gopkg.in/gcfg.v1 v1.2.3 > go: found go.mozilla.org/mozlog in go.mozilla.org/mozlog v0.0.0-201702221= 51521-4bb13139d403 > go: found github.com/gorhill/cronexpr in github.com/gorhill/cronexpr v0.0= .0-20180427100037-88b0669f7d75 > go: found github.com/viki-org/dnscache in github.com/viki-org/dnscache v0= .0.0-20130720023526-c70c1f23c5d8 > go: found github.com/yudai/gojsondiff in github.com/yudai/gojsondiff v1.0= .0 > go: found github.com/miekg/dns in github.com/miekg/dns v1.1.29 > go: found github.com/gregjones/httpcache in github.com/gregjones/httpcach= e v0.0.0-20190611155906-901d90724c79 > go: found github.com/mozilla/scribe in github.com/mozilla/scribe v0.0.0-2= 0180711195314-fb71baf557c1 > go: found github.com/pborman/getopt/v2 in github.com/pborman/getopt v0.0.= 0-20190409184431-ee0cd42419d3 > go: found github.com/mgutz/ansi in github.com/mgutz/ansi v0.0.0-201702061= 55736-9520e82c474b > go: found github.com/shurcooL/github_flavored_markdown in github.com/shur= cooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470 > go: found github.com/shurcooL/gopherjslib in github.com/shurcooL/gopherjs= lib v0.0.0-20200209150458-30f639db26d4 > go: found honnef.co/go/js/dom in honnef.co/go/js/dom v0.0.0-2019052601132= 8-ebc4cf92d81f > go: found gopkg.in/pipe.v2 in gopkg.in/pipe.v2 v2.0.0-20140414041502-3c2c= a4d52544 > go: found github.com/Sirupsen/logrus in github.com/Sirupsen/logrus v1.5.0 > go: found github.com/google/go-github/github in github.com/google/go-gith= ub v17.0.0+incompatible > go: found github.com/mattn/go-shellwords in github.com/mattn/go-shellword= s v1.0.10 > go: found golang.org/x/image/math/f64 in golang.org/x/image v0.0.0-202001= 19044424-58c23975cae1 > go: found golang.org/x/mobile/event/lifecycle in golang.org/x/mobile v0.0= .0-20200329125638-4c31acba0007 > go: found github.com/BurntSushi/xgb in github.com/BurntSushi/xgb v0.0.0-2= 0200324125942-20f126ea2843 > go: found github.com/aryann/difflib in github.com/aryann/difflib v0.0.0-2= 0170710044230-e206f873d14a > go: found github.com/pact-foundation/pact-go/dsl in github.com/pact-found= ation/pact-go v1.2.0 > go: found github.com/aws/aws-lambda-go/events in github.com/aws/aws-lambd= a-go v1.16.0 > go: found github.com/nats-io/nats-server/server in github.com/nats-io/nat= s-server v1.4.1 > go: github.com/smallstep/zlint/cmd/zlint imports > github.com/Sirupsen/logrus: github.com/Sirupsen/logrus@v1.5.0: pa= rsing go.mod: > module declares its path as: github.com/sirupsen/logrus > but was required as: github.com/Sirupsen/logrus > gmake[1]: *** [make/common.mk:82: test] Error 1 > gmake[1]: Leaving directory '/usr/ports/security/step-cli/work' > =3D=3D=3D> Compilation failed unexpectedly. > Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the failur= e to > the maintainer. > *** Error code 1 > > I=E2=80=99m not getting any errors , when building manually. > > Thanks for any help > Markus > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" --=20 Adam Weinberger adamw@adamw.org https://www.adamw.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP7rwcjuNDyeeQcuow7inxd4wW_gd8E49pybAk45B9q4NUmS=A>