promu/add-parameters-to-solve-the-strip.patch
Wangjunqi123 20428742ad promu存在不安全的编译选项PIE、STRIP
(cherry picked from commit ab29e9dead5ff5595090bd90245c7ede849a104c)
2023-03-07 13:35:27 +08:00

21 lines
1.3 KiB
Diff

--- c/.promu.yml 2023-03-07 11:30:19.037256381 +0800
+++ a/.promu.yml 2023-03-07 11:32:48.661260604 +0800
@@ -7,12 +7,11 @@ repository:
build:
flags: -mod=vendor -a -tags 'netgo static_build'
ldflags: |
- -s
- -X github.com/prometheus/common/version.Version={{.Version}}
- -X github.com/prometheus/common/version.Revision={{.Revision}}
- -X github.com/prometheus/common/version.Branch={{.Branch}}
- -X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
- -X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X github.com/prometheus/common/version.Version={{.Version}}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X github.com/prometheus/common/version.Revision={{.Revision}}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X github.com/prometheus/common/version.Branch={{.Branch}}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
tarball:
files:
- LICENSE