Skip to content

Commit 9456d4e

Browse files
zhangeamonzhangeamon
authored andcommitted
megre upstream
2 parents 8142f69 + f5581a8 commit 9456d4e

11 files changed

Lines changed: 81 additions & 32 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ RUN install-packages \
2626
file \
2727
g++ \
2828
gcc \
29+
clang \
2930
imagemagick \
3031
libbz2-dev \
3132
libc6-dev \

scripts/checker.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"envtpl": {
7878
"name": "envtpl",
7979
"type": "github",
80-
"owner": "subfuzion",
80+
"owner": "duanhongyi",
8181
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
8282
},
8383
"erlang": {
@@ -452,6 +452,12 @@
452452
"owner": "treeverse",
453453
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
454454
},
455+
"fluent-bit-manager": {
456+
"name": "fluent-bit-manager",
457+
"type": "github",
458+
"owner": "drycc-addons",
459+
"match": "v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
460+
},
455461
}
456462

457463

@@ -584,4 +590,3 @@ def main():
584590

585591
if __name__ == "__main__":
586592
main()
587-

scripts/stack-utils

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ shopt -s expand_aliases
55
alias gzip="gzip -n -9"
66

77
. /etc/os-release
8-
export GO_VERSION=1.23
9-
export RUBY_VERSION=3.3
8+
export GO_VERSION=1.24
9+
export RUBY_VERSION=3.4
1010
export RUST_VERSION=1
1111
export STACK_NAME="${STACK_NAME:?name is required}"
1212
export STACK_VERSION="${STACK_VERSION:?version is required}"

stacks/caddy/build.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ function build() {
88
generate-stack-path
99
BIN_DIR="${DATA_DIR}"/bin
1010
mkdir -p "${BIN_DIR}"
11-
curl -fsSL -o tmp.tar.gz https://github.com/caddyserver/caddy/releases/download/v${STACK_VERSION}/caddy_${STACK_VERSION}_linux_${OS_ARCH}.tar.gz
12-
tar -xzf tmp.tar.gz
13-
mv caddy "${BIN_DIR}"
14-
rm LICENSE README.md tmp.tar.gz
11+
install-stack go "${GO_VERSION}"
12+
. init-stack
13+
curl -fsSL -o tmp.tar.gz https://github.com/caddyserver/caddy/archive/refs/tags/v${STACK_VERSION}.tar.gz
14+
tar -xvzf tmp.tar.gz
15+
cd caddy-${STACK_VERSION}
16+
# fix CVE-2022-28948
17+
go get -u ./...; go mod tidy; go mod vendor
18+
19+
go build -o "${BIN_DIR}"/"${STACK_NAME}" cmd/caddy/main.go
20+
cd ..
21+
rm -rf caddy-${STACK_VERSION} tmp.tar.gz
1522
}
1623

1724
# call build stack

stacks/envtpl/build.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ function build() {
1111

1212
curl -sSL "https://github.com/subfuzion/envtpl/archive/refs/tags/v${STACK_VERSION}.tar.gz" | tar -xz \
1313
&& mv envtpl-${STACK_VERSION} $GOPATH/src/envtpl/ \
14-
&& cd $GOPATH/src/envtpl \
15-
&& export GO111MODULE=on \
16-
&& CGO_ENABLED=0 go build \
14+
&& cd $GOPATH/src/envtpl
15+
# fix CVE-2022-28948
16+
go get -u ./...; go mod tidy; go mod vendor
17+
18+
export GO111MODULE=on
19+
CGO_ENABLED=0 go build \
1720
-ldflags "-X main.AppVersionMetadata=$(date -u +%s)" \
1821
-a -installsuffix cgo -o /bin/envtpl ./cmd/envtpl/.
1922

stacks/fluent-bit/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function build() {
1616
&& cd $GOPATH/src/fluent-bit/build \
1717
&& apt update \
1818
&& apt install -yq flex bison libyaml-dev libssl-dev libsasl2-dev \
19-
&& cmake -DFLB_ALL=Yes -DCMAKE_INSTALL_PREFIX=/opt/drycc/fluent-bit ../ \
19+
&& cmake -DFLB_ALL=Yes -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=/opt/drycc/fluent-bit ../ \
2020
&& make \
2121
&& make install
2222
cp -rf /opt/drycc/fluent-bit/* "${DATA_DIR}"

stacks/gosu/build.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@ function build() {
88
generate-stack-path
99
BIN_DIR="${DATA_DIR}"/bin
1010
mkdir -p "${BIN_DIR}"
11-
curl -fsSL -o "${BIN_DIR}"/"${STACK_NAME}" https://github.com/tianon/gosu/releases/download/"${STACK_VERSION}"/"${STACK_NAME}"-"${OS_ARCH}"
12-
chmod +x "${BIN_DIR}"/"${STACK_NAME}"
11+
install-stack go "${GO_VERSION}"
12+
. init-stack
13+
curl -fsSL -o tmp.tar.gz https://github.com/tianon/gosu/archive/refs/tags/${STACK_VERSION}.tar.gz
14+
tar -xvzf tmp.tar.gz
15+
cd gosu-${STACK_VERSION}
16+
# fix CVE-2022-28948
17+
go get -u ./...; go mod tidy; go mod vendor
18+
19+
go build -o "${BIN_DIR}"/"${STACK_NAME}"
20+
cd ..
21+
rm -rf gosu-${STACK_VERSION} tmp.tar.gz
1322
}
1423

1524
# call build stack

stacks/pack/build.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@
66
# Implement build function
77
function build() {
88
generate-stack-path
9-
if [[ "${OS_ARCH}" == "amd64" ]]; then
10-
pack_download_url="https://github.com/buildpacks/pack/releases/download/v${STACK_VERSION}/pack-v${STACK_VERSION}-linux.tgz"
11-
else
12-
pack_download_url="https://github.com/buildpacks/pack/releases/download/v${STACK_VERSION}/pack-v${STACK_VERSION}-linux-${OS_ARCH}.tgz"
13-
fi
149
BIN_DIR="${DATA_DIR}"/bin
1510
mkdir -p "${BIN_DIR}"
16-
curl -sSL "${pack_download_url}" | tar xvz -C "${BIN_DIR}"
11+
install-stack go "${GO_VERSION}"
12+
. init-stack
13+
curl -fsSL -o tmp.tar.gz https://github.com/buildpacks/pack/archive/refs/tags/v${STACK_VERSION}.tar.gz
14+
tar -xvzf tmp.tar.gz
15+
cd pack-${STACK_VERSION}
16+
# fix CVE-2022-28948
17+
go get -u ./...; go mod tidy; go mod vendor
18+
19+
go build -o "${BIN_DIR}"/"${STACK_NAME}"
20+
cd ..
21+
rm -rf pack-${STACK_VERSION} tmp.tar.gz
1722
}
1823

1924
# call build stack

stacks/registry/build.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ function build() {
88
generate-stack-path
99
BIN_DIR="${DATA_DIR}"/bin
1010
mkdir -p "${BIN_DIR}"
11-
curl -fsSL -o tmp.tar.gz https://github.com/distribution/distribution/releases/download/v${STACK_VERSION}/registry_${STACK_VERSION}_linux_${OS_ARCH}.tar.gz
12-
tar -xzf tmp.tar.gz
13-
mv registry "${BIN_DIR}"
14-
rm LICENSE README.md tmp.tar.gz
11+
install-stack go "${GO_VERSION}"
12+
. init-stack
13+
curl -fsSL -o tmp.tar.gz https://github.com/distribution/distribution/archive/refs/tags/v${STACK_VERSION}.tar.gz
14+
tar -xvzf tmp.tar.gz
15+
cd distribution-${STACK_VERSION}
16+
go build cmd/registry/main.go
17+
mv main "${BIN_DIR}"/registry
18+
cd ..
19+
rm -rf distribution-${STACK_VERSION} tmp.tar.gz
1520
}
1621

1722
# call build stack

stacks/yj/build.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ function build() {
88
generate-stack-path
99
BIN_DIR="${DATA_DIR}"/bin
1010
mkdir -p "${BIN_DIR}"
11-
architecture=$(dpkg --print-architecture)
12-
curl -o "${BIN_DIR}"/yj \
13-
-L "https://github.com/sclevine/yj/releases/download/v${STACK_VERSION}/yj-linux-$architecture"; \
14-
chmod +x "${BIN_DIR}"/yj
11+
install-stack go "${GO_VERSION}"
12+
. init-stack
13+
curl -fsSL -o tmp.tar.gz https://github.com/sclevine/yj/archive/refs/tags/v${STACK_VERSION}.tar.gz
14+
tar -xvzf tmp.tar.gz
15+
cd yj-${STACK_VERSION}
16+
# fix CVE-2022-28948
17+
go get -u ./...; go mod tidy; go mod vendor
18+
19+
go build -ldflags "-X main.Version=${STACK_VERSION}" -o "${BIN_DIR}"/yj
20+
cd ..
21+
rm -rf yj-${STACK_VERSION} tmp.tar.gz
1522
}
1623

1724
# call build stack

0 commit comments

Comments
 (0)