Description of the problem:
Gitops rules should not assume /bin/bash is present on the host machine, as it breaks the compatibility for Linux OS'es which do not place bash executable in such location. It should use more portable /usr/bin/env bash.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
- Use NixOS operating system (for example, in version 20.09)
- Clone the example repository: Link
- Remove patch fixing the issue (WORKSPACE line 33)
- Run
bazel build //kubeview:kustomize-dev
Alternatively:
- Use NixOS operating system (for example, in version 20.09)
- Clone any bazel project using rules_gitops
- Run bazel target utilizing
k8s_deploy
What operating system are you running Bazel on?
NixOS 20.09
What's the output of bazel info release?
release 3.3.1- (@non-git)
If bazel info release returns "development version" or "(@Non-Git)", tell us how you built Bazel.
It was installed by nix package manager (link).
Snippet of the WORKSPACE file that includes rules_gitops rules.
...
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
git_repository(
name="com_adobe_rules_gitops",
commit="354e7d3341f05e076f286663731f18caf1e62340",
remote="https://github.com/adobe/rules_gitops.git",
shallow_since="1611050644 +0000",
)
load("@com_adobe_rules_gitops//gitops:deps.bzl", "rules_gitops_dependencies")
rules_gitops_dependencies()
...
load("@com_adobe_rules_gitops//gitops:repositories.bzl", "rules_gitops_repositories")
rules_gitops_repositories()
Have you found anything relevant by searching the web?
No.
Any other information, logs, or outputs that you want to share?
Fixing this issue will not make adobe/rules_gitops work on NixOS, as downloaded golang binaries are using wrong ELF (which, imho, should be a separate issue).
Description of the problem:
Gitops rules should not assume
/bin/bashis present on the host machine, as it breaks the compatibility for Linux OS'es which do not place bash executable in such location. It should use more portable/usr/bin/env bash.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
bazel build //kubeview:kustomize-devAlternatively:
k8s_deployWhat operating system are you running Bazel on?
NixOS 20.09
What's the output of
bazel info release?release 3.3.1- (@non-git)If
bazel info releasereturns "development version" or "(@Non-Git)", tell us how you built Bazel.It was installed by nix package manager (link).
Snippet of the
WORKSPACEfile that includes rules_gitops rules.Have you found anything relevant by searching the web?
No.
Any other information, logs, or outputs that you want to share?
Fixing this issue will not make
adobe/rules_gitopswork on NixOS, as downloaded golang binaries are using wrong ELF (which, imho, should be a separate issue).