diff --git a/bibop-massive b/bibop-massive index 0771d5a3..ab4a7e3d 100755 --- a/bibop-massive +++ b/bibop-massive @@ -95,8 +95,6 @@ main() { exit 0 fi - export LC_ALL=C - checkEnv configureYUM processRecipes "$@" @@ -446,7 +444,7 @@ checkPackagesAvailability() { fi # shellcheck disable=SC2086 - aval_list=$(yum -q $opts list availabile $pkg_list 2> /dev/null | grep -v 'Available Packages' | cut -f1 -d" " | sed 's:\..*::' | tr "\n" " " | sed 's/ $//') + aval_list=$(LC_ALL=C yum -q $opts list availabile $pkg_list 2> /dev/null | grep -v 'Available Packages' | cut -f1 -d" " | sed 's:\..*::' | tr "\n" " " | sed 's/ $//') if [[ -z "$aval_list" ]] ; then return 1 @@ -481,7 +479,7 @@ installPackages() { echo -n > $YUM_LOG # shellcheck disable=SC2086 - yum -q -y $opts install "$@" &>/dev/null + LC_ALL=C yum -q -y $opts install "$@" &>/dev/null if [[ $? -eq 0 ]] ; then pkg_count=$(grep -c 'Installed:' $YUM_LOG) @@ -534,7 +532,7 @@ cleanYumCache() { fi # shellcheck disable=SC2086 - yum -q -y $opts clean expire-cache &>/dev/null + LC_ALL=C yum -q -y $opts clean expire-cache &>/dev/null } # Prints status bullet diff --git a/centos6.docker b/centos6.docker index 9acf96d5..825fcf7a 100644 --- a/centos6.docker +++ b/centos6.docker @@ -1,3 +1,5 @@ +## BUILDER ##################################################################### + FROM centos:6 as builder RUN mkdir -p "/go/src" && chmod -R 777 "/go" @@ -8,21 +10,31 @@ WORKDIR /go/src/github.com/essentialkaos/bibop COPY . . -RUN yum -y -q install https://yum.kaos.st/6/release/x86_64/kaos-repo-9.1-0.el6.noarch.rpm && \ +RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el6.noarch.rpm && \ yum -y -q install make golang git upx && \ make deps && \ make all && \ upx bibop +## FINAL IMAGE ################################################################# + FROM centos:6 +LABEL name="Bibop Image on CentOS 6" \ + vendor="ESSENTIAL KAOS" \ + maintainer="Anton Novojilov" \ + license="EKOL" \ + version="2019.08.02" + COPY --from=builder /go/src/github.com/essentialkaos/bibop/bibop /usr/bin/ COPY --from=builder /go/src/github.com/essentialkaos/bibop/bibop-entrypoint /usr/bin/ -RUN yum -y -q install https://yum.kaos.st/6/release/x86_64/kaos-repo-9.1-0.el6.noarch.rpm && \ +RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el6.noarch.rpm && \ yum -y -q install epel-release VOLUME /bibop WORKDIR /bibop ENTRYPOINT ["bibop-entrypoint"] + +################################################################################ diff --git a/centos7.docker b/centos7.docker index e0535dbe..a31b35d5 100644 --- a/centos7.docker +++ b/centos7.docker @@ -1,3 +1,5 @@ +## BUILDER ##################################################################### + FROM centos:7 as builder RUN mkdir -p "/go/src" && chmod -R 777 "/go" @@ -8,21 +10,31 @@ WORKDIR /go/src/github.com/essentialkaos/bibop COPY . . -RUN yum -y -q install https://yum.kaos.st/7/release/x86_64/kaos-repo-9.1-0.el7.noarch.rpm && \ +RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el7.noarch.rpm && \ yum -y -q install make golang git upx && \ make deps && \ make all && \ upx bibop +## FINAL IMAGE ################################################################# + FROM centos:7 +LABEL name="Bibop Image on CentOS 7" \ + vendor="ESSENTIAL KAOS" \ + maintainer="Anton Novojilov" \ + license="EKOL" \ + version="2019.08.02" + COPY --from=builder /go/src/github.com/essentialkaos/bibop/bibop /usr/bin/ COPY --from=builder /go/src/github.com/essentialkaos/bibop/bibop-entrypoint /usr/bin/ -RUN yum -y -q install https://yum.kaos.st/7/release/x86_64/kaos-repo-9.1-0.el7.noarch.rpm && \ +RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el7.noarch.rpm && \ yum -y -q install epel-release VOLUME /bibop WORKDIR /bibop ENTRYPOINT ["bibop-entrypoint"] + +################################################################################ diff --git a/cli/cli.go b/cli/cli.go index fb916c7e..ec4fd790 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -33,7 +33,7 @@ import ( // Application info const ( APP = "bibop" - VER = "1.4.0" + VER = "1.4.1" DESC = "Utility for testing command-line tools" ) diff --git a/cli/executor/executor.go b/cli/executor/executor.go index 538945e9..21747603 100644 --- a/cli/executor/executor.go +++ b/cli/executor/executor.go @@ -132,15 +132,15 @@ func (e *Executor) Validate(r *recipe.Recipe, cfg *ValidationConfig) []error { errs := errutil.NewErrors() errs.Add(checkRecipeWorkingDir(r)) - errs.Add(checkRecipeTags(r, cfg.Tags)...) - errs.Add(checkRecipeVariables(r)...) + errs.Add(checkRecipeTags(r, cfg.Tags)) + errs.Add(checkRecipeVariables(r)) if !cfg.IgnorePrivileges { errs.Add(checkRecipePrivileges(r)) } if !cfg.IgnoreDependencies { - errs.Add(checkPackages(r)...) + errs.Add(checkPackages(r)) } if !errs.HasErrors() {