From 72cba1805a1fb272c47984f3c583d5cb82be048c Mon Sep 17 00:00:00 2001 From: Francesco Colista Date: Wed, 14 Dec 2016 16:24:54 +0000 Subject: testing/kubernetes: get rid of gnu grep --- testing/kubernetes/no-gnu-grep.patch | 103 +++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 testing/kubernetes/no-gnu-grep.patch (limited to 'testing/kubernetes/no-gnu-grep.patch') diff --git a/testing/kubernetes/no-gnu-grep.patch b/testing/kubernetes/no-gnu-grep.patch new file mode 100644 index 0000000000..4c7d1991ba --- /dev/null +++ b/testing/kubernetes/no-gnu-grep.patch @@ -0,0 +1,103 @@ +diff --git a/Makefile.generated_files b/Makefile.generated_files +index 13a4bbb..a4ea832 100644 +--- a/Makefile.generated_files ++++ b/Makefile.generated_files +@@ -156,7 +156,7 @@ $(foreach dir, $(ALL_GO_DIRS), $(eval \ + # is what the .stamp file represents. + $(foreach dir, $(ALL_GO_DIRS), \ + $(META_DIR)/$(dir)/$(GOFILES_META)): +- FILES=$$(ls $$@.tmp; \ + cmp -s $@.tmp $@ || touch $@.stamp; \ +@@ -182,7 +182,7 @@ ifeq ($(DBG_MAKEFILE),1) + endif + ALL_K8S_TAG_FILES := $(shell \ + find $(ALL_GO_DIRS) -maxdepth 1 -type f -name \*.go \ +- | xargs grep --color=never -l '^// *+k8s:' \ ++ | xargs grep -l '^// *+k8s:' \ + ) + + # +@@ -209,7 +209,7 @@ ifeq ($(DBG_MAKEFILE),1) + $(warning ***** finding all +k8s:deepcopy-gen tags) + endif + DEEPCOPY_DIRS := $(shell \ +- grep --color=never -l '+k8s:deepcopy-gen=' $(ALL_K8S_TAG_FILES) \ ++ grep -l '+k8s:deepcopy-gen=' $(ALL_K8S_TAG_FILES) \ + | xargs -n1 dirname \ + | LC_ALL=C sort -u \ + ) +@@ -278,7 +278,7 @@ $(META_DIR)/$(DEEPCOPY_GEN).mk: + INDIRECT=$$(go list \ + -f '{{range .Deps}}{{.}}{{"\n"}}{{end}}' \ + ./cmd/libs/go2idl/deepcopy-gen \ +- | grep --color=never "^$(PRJ_SRC_PATH)" \ ++ | grep "^$(PRJ_SRC_PATH)" \ + | sed 's|^$(PRJ_SRC_PATH)|./|' \ + | xargs go list -f '{{.Dir}} {{.Dir}}/*.go'); \ + echo $$DIRECT $$INDIRECT \ +@@ -334,7 +334,7 @@ ifeq ($(DBG_MAKEFILE),1) + $(warning ***** finding all +k8s:defaulter-gen tags) + endif + DEFAULTER_DIRS := $(shell \ +- grep --color=never -l '+k8s:defaulter-gen=' $(ALL_K8S_TAG_FILES) \ ++ grep -l '+k8s:defaulter-gen=' $(ALL_K8S_TAG_FILES) \ + | xargs -n1 dirname \ + | LC_ALL=C sort -u \ + ) +@@ -429,7 +429,7 @@ $(META_DIR)/$(DEFAULTER_GEN).mk: + INDIRECT=$$(go list \ + -f '{{range .Deps}}{{.}}{{"\n"}}{{end}}' \ + ./cmd/libs/go2idl/defaulter-gen \ +- | grep --color=never "^$(PRJ_SRC_PATH)" \ ++ | grep "^$(PRJ_SRC_PATH)" \ + | sed 's|^$(PRJ_SRC_PATH)|./|' \ + | xargs go list -f '{{.Dir}} {{.Dir}}/*.go'); \ + echo $$DIRECT $$INDIRECT \ +@@ -475,7 +475,7 @@ ifeq ($(DBG_MAKEFILE),1) + $(warning ***** finding all +k8s:openapi-gen tags) + endif + OPENAPI_DIRS := $(shell \ +- grep --color=never -l '+k8s:openapi-gen=' $(ALL_K8S_TAG_FILES) \ ++ grep -l '+k8s:openapi-gen=' $(ALL_K8S_TAG_FILES) \ + | xargs -n1 dirname \ + | LC_ALL=C sort -u \ + ) +@@ -536,7 +536,7 @@ $(META_DIR)/$(OPENAPI_GEN).mk: + INDIRECT=$$(go list \ + -f '{{range .Deps}}{{.}}{{"\n"}}{{end}}' \ + ./cmd/libs/go2idl/openapi-gen \ +- | grep --color=never "^$(PRJ_SRC_PATH)" \ ++ | grep "^$(PRJ_SRC_PATH)" \ + | sed 's|^$(PRJ_SRC_PATH)|./|' \ + | xargs go list -f '{{.Dir}} {{.Dir}}/*.go'); \ + echo $$DIRECT $$INDIRECT \ +@@ -593,7 +593,7 @@ ifeq ($(DBG_MAKEFILE),1) + $(warning ***** finding all +k8s:conversion-gen tags) + endif + CONVERSION_DIRS := $(shell \ +- grep --color=never '^// *+k8s:conversion-gen=' $(ALL_K8S_TAG_FILES) \ ++ grep '^// *+k8s:conversion-gen=' $(ALL_K8S_TAG_FILES) \ + | cut -f1 -d: \ + | xargs -n1 dirname \ + | LC_ALL=C sort -u \ +@@ -651,7 +651,7 @@ $(foreach dir, $(CONVERSION_DIRS), $(eval \ + # is what the .stamp file represents. + $(foreach dir, $(CONVERSION_DIRS), \ + $(META_DIR)/$(dir)/$(CONVERSIONS_META)): +- TAGS=$$(grep --color=never -h '^// *+k8s:conversion-gen=' $