git.iko.soy/typeable/nixpkgs
on master help sign in
Fix `oc cluster up`

The command `oc cluster up` mainly runs code though Docker containers. However, in pkg/bootstrap/docker/host/host.go, nsenter is used to run some commands on the host. For this to work on NixOS, we need to provide the absolute path to the required programs.

commita3dde7776bd8200887e68909b637bc49451b7fed authorMaarten Hoogendoorn <maarten@moretea.nl> dateFri 18 Aug 2017, 17:06 (9 years ago) parentf8a7266
1 file changed+12−1
pkgs/applications/networking/cluster/openshift/default.nix+12−1
pkgs/applications/networking/cluster/openshift/default.nix+12−1
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, which, buildGoPackage }:
1+{ stdenv, fetchFromGitHub, which, buildGoPackage, utillinux, coreutils }:
22
33let
44 version = "3.6.0";
@@ -22,6 +22,17 @@ in buildGoPackage rec {
2222 goPackagePath = null;
2323 patchPhase = ''
2424 patchShebangs ./hack
25+ substituteInPlace pkg/bootstrap/docker/host/host.go \
26+ --replace 'nsenter --mount=/rootfs/proc/1/ns/mnt findmnt' \
27+ 'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/findmnt'
28+
29+ substituteInPlace pkg/bootstrap/docker/host/host.go \
30+ --replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mount' \
31+ 'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/mount'
32+
33+ substituteInPlace pkg/bootstrap/docker/host/host.go \
34+ --replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mkdir' \
35+ 'nsenter --mount=/rootfs/proc/1/ns/mnt ${coreutils}/bin/mount'
2536 '';
2637
2738 buildPhase = ''