!46 fix panic in os user.Current
From: @zh_xiaoyu Reviewed-by: @duguhaotian Signed-off-by: @duguhaotian
This commit is contained in:
commit
91ef513b87
57
0025-fix-panic-in-os-user.Current.patch
Normal file
57
0025-fix-panic-in-os-user.Current.patch
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
From d636a835a458fbca290a32e81209d1eec37bfc4a Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||||
|
Date: Mon, 6 Feb 2023 11:38:37 +0800
|
||||||
|
Subject: [PATCH 25/25] fix panic in os user.Current
|
||||||
|
|
||||||
|
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||||
|
---
|
||||||
|
Makefile | 14 ++++++++------
|
||||||
|
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index e346f97..3bb68a0 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -25,11 +25,13 @@ SAFEBUILDFLAGS := -buildmode=pie \
|
||||||
|
-tmpdir=$(TMP_PATH) \
|
||||||
|
$(LDFLAGS)
|
||||||
|
|
||||||
|
+STATIC_TAGS := -tags "osusergo static_build"
|
||||||
|
+
|
||||||
|
GO := go
|
||||||
|
GO_BUILD := CGO_ENABLED=1 GOARCH=$(ARCH) $(GO)
|
||||||
|
-GO_SAFE_BUILD:= CGO_ENABLE=1 \
|
||||||
|
- CGO_CFLAGS="-fstack-protector-strong -fPIE" \
|
||||||
|
- CGO_CPPFLAGS="-fstack-protector-strong -fPIE" \
|
||||||
|
+GO_SAFE_BUILD:= CGO_ENABLED=1 \
|
||||||
|
+ CGO_CFLAGS="-fstack-protector-strong -fPIE -ftrapv -D_FORTIFY_SOURCE=2 -O2" \
|
||||||
|
+ CGO_CPPFLAGS="-fstack-protector-strong -fPIE -ftrapv -D_FORTIFY_SOURCE=2 -O2" \
|
||||||
|
CGO_LDFLAGS_ALLOW="-Wl,-z,relro,-z,now" \
|
||||||
|
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
||||||
|
GOARCH=$(ARCH) \
|
||||||
|
@@ -38,11 +40,11 @@ GO_SAFE_BUILD:= CGO_ENABLE=1 \
|
||||||
|
.PHONY: eggo
|
||||||
|
eggo:
|
||||||
|
@echo "build eggo of $(ARCH) starting..."
|
||||||
|
- @$(GO_BUILD) build -ldflags '$(LDFLAGS) $(STATIC_LDFLAGS)' -o bin/eggo . 2>/dev/null
|
||||||
|
+ @$(GO_BUILD) build -ldflags '$(LDFLAGS) $(STATIC_LDFLAGS)' $(STATIC_TAGS) -o bin/eggo
|
||||||
|
@echo "build eggo done!"
|
||||||
|
local:
|
||||||
|
@echo "build eggo use vendor starting..."
|
||||||
|
- @$(GO_BUILD) build -ldflags '$(LDFLAGS) $(STATIC_LDFLAGS)' -mod vendor -o bin/eggo . 2>/dev/null
|
||||||
|
+ @$(GO_BUILD) build -ldflags '$(LDFLAGS) $(STATIC_LDFLAGS)' $(STATIC_TAGS) -mod vendor -o bin/eggo
|
||||||
|
@echo "build eggo use vendor done!"
|
||||||
|
test:
|
||||||
|
@echo "Unit tests starting..."
|
||||||
|
@@ -59,7 +61,7 @@ check:
|
||||||
|
safe:
|
||||||
|
@echo "build safe eggo starting..."
|
||||||
|
mkdir -p $(TMP_PATH)
|
||||||
|
- $(GO_SAFE_BUILD) build -ldflags '$(SAFEBUILDFLAGS)' -o bin/eggo .
|
||||||
|
+ $(GO_SAFE_BUILD) build -ldflags '$(SAFEBUILDFLAGS)' $(STATIC_TAGS) -o bin/eggo .
|
||||||
|
rm -rf $(TMP_PATH)
|
||||||
|
@echo "build safe eggo done!"
|
||||||
|
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: eggo
|
Name: eggo
|
||||||
Version: 0.9.4
|
Version: 0.9.4
|
||||||
Release: 7
|
Release: 8
|
||||||
Summary: Eggo is a tool built to provide standard multi-ways for creating Kubernetes clusters.
|
Summary: Eggo is a tool built to provide standard multi-ways for creating Kubernetes clusters.
|
||||||
License: Mulan PSL V2
|
License: Mulan PSL V2
|
||||||
URL: https://gitee.com/openeuler/eggo
|
URL: https://gitee.com/openeuler/eggo
|
||||||
@ -71,6 +71,12 @@ rm -rf src
|
|||||||
%attr(551,root,root) %{_bindir}/eggo
|
%attr(551,root,root) %{_bindir}/eggo
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 06 2023 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 0.9.4-8
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix panic in os user.Current
|
||||||
|
|
||||||
* Fri Feb 03 2023 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 0.9.4-7
|
* Fri Feb 03 2023 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 0.9.4-7
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user