treewide get rid of go 1.12 (#83253)

* treewide Drop unneeded go 1.12 overrides

* Fix packr to be go module compatible.

I updated to version 2.8.0 which is the latest on master.
Then due to the 2 different sets of go modules which are used, I split
the build into two different derivations, then merged them togethor
using symlinkJoin to have the same output structure as the existing derivation.

* Remove consul dependency on go1.12

I updated the consul version to 1.7.2 and flipped it to building using
modules.

* Remove go1.12 from perkeep.

Update the version to the latest unstable on master.

* Update scaleway-cli to not be pinned to go1.12

Switched the version to 1.20

* Update prometheus-varnish-exporter to not depend on go1.12

* Update lnd to build with go1.12

Updated the version
Forced only building subpackages with main to prevent panics over
multiple modules in one repo

* Remove go1.12 from openshift

Had to update the version to 4.1.0 and do a bit of munging to get this
to work

* Remove go1.12 completely.

These are no longer needed.

* Update bazel-watcher and make it build with go 1.14
This commit is contained in:
Colin
2020-04-28 20:16:20 -04:00
committed by GitHub
parent c01ac3ed12
commit 4007ceb6af
13 changed files with 104 additions and 470 deletions
@@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, buildGoPackage, which, go-bindata, rsync, utillinux
, coreutils, kerberos, clang, installShellFiles
, coreutils, kerberos, ncurses, clang, installShellFiles
, components ? [
"cmd/oc"
"cmd/openshift"
@@ -9,12 +9,12 @@
with lib;
let
version = "3.11.0";
version = "4.1.0";
ver = stdenv.lib.elemAt (stdenv.lib.splitVersion version);
versionMajor = ver 0;
versionMinor = ver 1;
versionPatch = ver 2;
gitCommit = "0cbc58b";
gitCommit = "b4261e0";
# version is in vendor/k8s.io/kubernetes/pkg/version/base.go
k8sversion = "v1.11.1";
k8sgitcommit = "b1b2997";
@@ -28,29 +28,17 @@ in buildGoPackage rec {
owner = "openshift";
repo = "origin";
rev = "v${version}";
sha256 = "06q4v2a1mm6c659ab0rzkqz6b66vx4avqfg0s9xckwhq420lzgka";
sha256 = "16bc6ljm418kxz92gz8ldm82491mvlqamrvigyr6ff72rf7ml7ba";
};
goPackagePath = "github.com/openshift/origin";
buildInputs = [ kerberos ];
buildInputs = [ kerberos ncurses ];
nativeBuildInputs = [ which rsync go-bindata clang installShellFiles ];
patchPhase = ''
patchShebangs ./hack
substituteInPlace pkg/oc/clusterup/docker/host/host.go \
--replace 'nsenter --mount=/rootfs/proc/1/ns/mnt findmnt' \
'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/findmnt'
substituteInPlace pkg/oc/clusterup/docker/host/host.go \
--replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mount' \
'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/mount'
substituteInPlace pkg/oc/clusterup/docker/host/host.go \
--replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mkdir' \
'nsenter --mount=/rootfs/proc/1/ns/mnt ${coreutils}/bin/mkdir'
'';
buildPhase = ''
@@ -58,6 +46,7 @@ in buildGoPackage rec {
# Openshift build require this variables to be set
# unless there is a .git folder which is not the case with fetchFromGitHub
echo "OS_GIT_VERSION=v${version}" >> os-version-defs
echo "OS_GIT_TREE_STATE=clean" >> os-version-defs
echo "OS_GIT_MAJOR=${versionMajor}" >> os-version-defs
echo "OS_GIT_MINOR=${versionMinor}" >> os-version-defs
echo "OS_GIT_PATCH=${versionPatch}" >> os-version-defs