From owner-freebsd-ports@freebsd.org Fri Apr 10 08:31:02 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 501EA2B6988 for ; Fri, 10 Apr 2020 08:31:02 +0000 (UTC) (envelope-from mw@wipp.bayern) Received: from virgo.wipp.bayern (virgo.wipp.bayern [46.4.150.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48zB6r6DfQz3FZ1 for ; Fri, 10 Apr 2020 08:31:00 +0000 (UTC) (envelope-from mw@wipp.bayern) Received: from [IPv6:2a02:8106:209:e43c:8031:712f:db41:27d1] (unknown [IPv6:2a02:8106:209:e43c:8031:712f:db41:27d1]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mw@wipp.bayern) by virgo.wipp.bayern (Postfix) with ESMTPSA id 48439CE3DE; Fri, 10 Apr 2020 10:30:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wipp.bayern; s=dkim201411; t=1586507452; bh=zzEj71LMAbyK4noh9+500WzpvJLDRdjLnjuIfqrTNUk=; h=From:Subject:Date:In-Reply-To:Cc:To:References; b=KuqzDmhbFyjaMvxKfDoNzHuynlCMnaI4tVR8PcyHj5qFb9InZiU0zKskaN/TfruWH LsqysMapVM9zQ9tcAP6vqEpvLRbds/GTAOIPKbOQY/9KLXCAm5FiuRLCCcjEePXVto B0Sd5vmDibFc0VaRnHe3nceclYtu11YoNi/N09xw= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at gemini.wipp.bayern From: Markus Wipp Message-Id: <9ABE1657-1F6B-4FC9-BE6F-FBDA30B82253@wipp.bayern> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Porting of Smallstep CA Date: Fri, 10 Apr 2020 10:30:48 +0200 In-Reply-To: Cc: =?utf-8?Q?Bernhard_Fr=C3=B6hlich?= To: FreeBSD Ports References: <6F55C342-1ABB-4386-B674-F432EDE96D62@wipp.bayern> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 48zB6r6DfQz3FZ1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=wipp.bayern header.s=dkim201411 header.b=KuqzDmhb; dmarc=pass (policy=none) header.from=wipp.bayern; spf=pass (mx1.freebsd.org: domain of mw@wipp.bayern designates 46.4.150.2 as permitted sender) smtp.mailfrom=mw@wipp.bayern X-Spamd-Result: default: False [-2.39 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[wipp.bayern:s=dkim201411]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[wipp.bayern:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[wipp.bayern,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(0.10)[ipnet: 46.4.0.0/16(2.10), asn: 24940(-1.58), country: DE(-0.02)]; ASN(0.00)[asn:24940, ipnet:46.4.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 08:31:02 -0000 > On 8. Apr 2020, at 23:05, Bernhard Fr=C3=B6hlich = wrote >=20 >=20 > There is more work to do (pkg-descr, pkg-plist probably, don't know if = it needs some other files etc.) but it builds the binary at least and = passes portlint: >=20 > = https://github.com/decke/ports/blob/master/security/smallstep-cli/Makefile= = Hi Bernhard,=20 Thanks for your input here. I tried it and it worked. Unfortunately in = the meantime there is a new version of this tool and I tried to do it = the same way, but I=E2=80=99m getting the following Error now: =3D=3D=3D> Building for smallstep-cli-0.14.2 (cd /usr/ports/security/smallstep-cli/work/cli-0.14.2; for t in = ./cmd/step; do out=3D$(/usr/bin/basename $(echo ${t} | /usr/bin/sed = -Ee 's/^[^:]*:([^:]+).*$/\1/' -e 's/^\.$/smallstep-cli/')); pkg=3D$(echo = ${t} | /usr/bin/sed -Ee 's/^([^:]*).*$/\1/' -e 's/^smallstep-cli$/./'); = echo "=3D=3D=3D> Building ${out} from ${pkg}"; /usr/bin/env = XDG_DATA_HOME=3D/usr/ports/security/smallstep-cli/work = XDG_CONFIG_HOME=3D/usr/ports/security/smallstep-cli/work = HOME=3D/usr/ports/security/smallstep-cli/work = PATH=3D/usr/ports/security/smallstep-cli/work/.bin:/sbin:/bin:/usr/sbin:/u= sr/bin:/usr/local/sbin:/usr/local/bin:/root/bin NO_PIE=3Dyes = MK_DEBUG_FILES=3Dno MK_KERNEL_SYMBOLS=3Dno SHELL=3D/bin/sh NO_LINT=3DYES = PREFIX=3D/usr/local LOCALBASE=3D/usr/local CC=3D"cc" CFLAGS=3D"-O2 = -pipe -fstack-protector-strong -fno-strict-aliasing " CPP=3D"cpp" = CPPFLAGS=3D"" LDFLAGS=3D" -fstack-protector-strong " LIBS=3D"" = CXX=3D"c++" CXXFLAGS=3D"-O2 -pipe -fstack-protector-strong = -fno-strict-aliasing " MANPREFIX=3D"/usr/local" = BSD_INSTALL_PROGRAM=3D"install -s -m 555" BSD_INSTALL_LIB=3D"install = -s -m 0644" BSD_INSTALL_SCRIPT=3D"install -m 555" = BSD_INSTALL_DATA=3D"install -m 0644" BSD_INSTALL_MAN=3D"install -m = 444" CGO_ENABLED=3D1 CGO_CFLAGS=3D"-I/usr/local/include" = CGO_LDFLAGS=3D"-L/usr/local/lib" GOARM=3D GOPATH=3D"" = GOBIN=3D"/usr/ports/security/smallstep-cli/work/bin" = GO_NO_VENDOR_CHECKS=3D1 /usr/local/bin/go build -v -buildmode=3Dexe = -ldflags=3D-s -mod=3Dvendor -o = /usr/ports/security/smallstep-cli/work/bin/${out} ${pkg}; done) =3D=3D=3D> Building step from ./cmd/step import cycle not allowed package github.com/smallstep/cli/cmd/step imports github.com/smallstep/certificates/ca imports github.com/smallstep/certificates/acme/api imports github.com/smallstep/certificates/api imports github.com/smallstep/certificates/authority imports github.com/smallstep/certificates/kms imports github.com/smallstep/certificates/kms/cloudkms imports cloud.google.com/go/kms/apiv1 imports cloud.google.com/go/iam imports github.com/googleapis/gax-go/v2 imports github.com/googleapis/gax-go/v2 *** Error code 1 Stop. make: stopped in /usr/ports/security/smallstep-cli As I=E2=80=99m not a go programmer, I=E2=80=99ve no clue of why this is = happening and what to do about it. I already have regenerated the go mod vender / modules2tuples part in = the Makefile and did a make clean makesum stage When using the Makefile that comes with the tool it builds with no = issues. When I try to use this and put in USES=3D gmake go:modules,no_targets ALL_TARGET=3D build Instead of USES=3D go:modules I get this error: Build Complete! gmake[1]: Leaving directory = '/usr/ports/security/smallstep-cli/work/cli-0.14.2' =3D=3D=3D> Staging for smallstep-cli-0.14.2 =3D=3D=3D> Generating temporary packing list gmake[1]: Entering directory = '/usr/ports/security/smallstep-cli/work/cli-0.14.2' usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner] [-M log] [-D dest] [-h hash] [-T tags] [-B suffix] [-l linkflags] [-N dbdir] file1 file2 install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner] [-M log] [-D dest] [-h hash] [-T tags] [-B suffix] [-l linkflags] [-N dbdir] file1 ... fileN directory install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner] [-M log] [-D dest] [-h hash] [-T tags] directory ... gmake[1]: *** [make/common.mk:92: install] Error 64 gmake[1]: Leaving directory = '/usr/ports/security/smallstep-cli/work/cli-0.14.2' *** Error code 2 Stop. make: stopped in /usr/ports/security/smallstep-cli Additionally I=E2=80=99m not able to find the bin directory which is = created when I do this manually. Any help Is highly appreciated! Thanks=20 Markus >=20 > --=20 > Bernhard Fr=C3=B6hlich > http://www.bluelife.at/