Skip to content

Commit 34928c0

Browse files
authored
chore: clean up useless dependencies (#361)
1 parent 44de6b2 commit 34928c0

7 files changed

+2
-51
lines changed

.circleci/config.yml

-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ jobs:
2626
name: run ubi8 docker and mapping apisix-runtime rpm into container
2727
command: |
2828
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name ubiInstance --net="host" registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
29-
- run:
30-
name: install dependencies in container
31-
command: |
32-
docker exec ubiInstance bash -c "dnf install -y yum-utils"
33-
docker exec ubiInstance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo"
34-
docker exec ubiInstance bash -c "yum -y install openresty-openssl111 openresty-pcre openresty-zlib"
3529
- run:
3630
name: install rpm in container
3731
command: |

.github/workflows/package-apisix-runtime-deb-ubuntu20.04.yml

-10
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ jobs:
3535
run: |
3636
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name ubuntu20.04Instance --net="host" docker.io/ubuntu:20.04 /bin/bash
3737
38-
- name: install dependencies in container
39-
run: |
40-
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get update"
41-
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get install -y libreadline-dev lsb-release libssl-dev perl build-essential"
42-
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends wget gnupg ca-certificates"
43-
docker exec ubuntu20.04Instance bash -c "wget -O - https://openresty.org/package/pubkey.gpg | apt-key add -"
44-
docker exec ubuntu20.04Instance bash -c 'echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/openresty.list'
45-
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get update"
46-
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get -y install openresty-pcre openresty-zlib"
47-
4838
- name: install deb in container
4939
run: |
5040
docker exec ubuntu20.04Instance bash -c "dpkg -i /output/apisix-runtime_${BUILD_APISIX_RUNTIME_VERSION}-0~ubuntu20.04_amd64.deb"

.github/workflows/package-apisix-runtime-rpm-el7.yml

-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ jobs:
3535
run: |
3636
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name centos7Instance --net="host" docker.io/centos:7 /bin/bash
3737
38-
- name: install dependencies in container
39-
run: |
40-
docker exec centos7Instance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo"
41-
docker exec centos7Instance bash -c "yum -y install openresty-pcre openresty-zlib"
42-
4338
- name: install rpm in container
4439
run: |
4540
docker exec centos7Instance bash -c "yum -y localinstall /output/apisix-runtime-${BUILD_APISIX_RUNTIME_VERSION}-0.el7.x86_64.rpm"

.github/workflows/package-apisix-runtime-rpm-el8.yml

-3
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ jobs:
4242
docker exec centos8Instance bash -c "dnf install -y centos-release-stream"
4343
docker exec centos8Instance bash -c "dnf swap -y centos-{linux,stream}-repos"
4444
docker exec centos8Instance bash -c "dnf distro-sync -y"
45-
4645
docker exec centos8Instance bash -c "dnf install -y yum-utils"
47-
docker exec centos8Instance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo"
48-
docker exec centos8Instance bash -c "yum -y install openresty-pcre openresty-zlib"
4946
5047
- name: install rpm in container
5148
run: |

.github/workflows/package-apisix-runtime-rpm-ubi.yml

-6
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ jobs:
3333
run: |
3434
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name ubiInstance --net="host" registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash
3535
36-
- name: install dependencies in container
37-
run: |
38-
docker exec ubiInstance bash -c "dnf install -y yum-utils"
39-
docker exec ubiInstance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo"
40-
docker exec ubiInstance bash -c "yum -y install openresty-pcre openresty-zlib"
41-
4236
- name: install rpm in container
4337
run: |
4438
docker exec ubiInstance bash -c "ls -la /output"

package-apisix-runtime.sh

-12
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,12 @@ fi
1414

1515
ARCH=${ARCH:-`(uname -m | tr '[:upper:]' '[:lower:]')`}
1616

17-
openresty_zlib_version="1.2.12-1"
18-
openresty_pcre_version="8.45-1"
19-
if [ "$PACKAGE_TYPE" == "deb" ]; then
20-
pkg_suffix="${codename}1"
21-
openresty_zlib_version="$openresty_zlib_version~$pkg_suffix"
22-
openresty_pcre_version="$openresty_pcre_version~$pkg_suffix"
23-
fi
24-
2517
fpm -f -s dir -t "$PACKAGE_TYPE" \
2618
--"$PACKAGE_TYPE"-dist "$dist" \
2719
-n "$artifact" \
2820
-a "$(uname -i)" \
2921
-v "$RUNTIME_VERSION" \
3022
--iteration "$ITERATION" \
31-
-x openresty/zlib \
32-
-x openresty/pcre \
33-
-d "openresty-zlib >= $openresty_zlib_version" \
34-
-d "openresty-pcre >= $openresty_pcre_version" \
3523
--post-install post-install-apisix-runtime.sh \
3624
--description "APISIX's OpenResty distribution." \
3725
--license "ASL 2.0" \

utils/install-common.sh

+2-9
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,13 @@ install_dependencies_deb() {
3535
}
3636

3737
install_openresty_deb() {
38-
# install openresty and openssl111
39-
arch_path=""
40-
if [[ $ARCH == "arm64" ]] || [[ $ARCH == "aarch64" ]]; then
41-
arch_path="arm64/"
42-
fi
4338
DEBIAN_FRONTEND=noninteractive apt-get update
44-
DEBIAN_FRONTEND=noninteractive apt-get install -y libreadline-dev lsb-release libpcre3 libpcre3-dev libldap2-dev libssl-dev perl build-essential
39+
DEBIAN_FRONTEND=noninteractive apt-get install -y libreadline-dev lsb-release libpcre3 libpcre3-dev libldap2-dev perl build-essential
4540
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends wget gnupg ca-certificates
4641
}
4742

4843
install_openresty_rpm() {
49-
yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
50-
yum-config-manager --add-repo https://repos.apiseven.com/packages/centos/apache-apisix.repo
51-
yum install -y openresty-openssl111-devel pcre pcre-devel openldap-devel
44+
yum install -y pcre pcre-devel openldap-devel
5245
}
5346

5447
install_luarocks() {

0 commit comments

Comments
 (0)