From 95fad50619d7207916251b1bec2c372a8eff6427 Mon Sep 17 00:00:00 2001 From: kurt Date: Tue, 23 Jul 2024 10:50:14 +0800 Subject: [PATCH] fix(build): set type of kong.logrotate as config|noreplace avoid overwriting during the upgrade (#13348) FTI-6079 --------- Signed-off-by: tzssangglass --- build/package/nfpm.yaml | 8 ++++++-- changelog/unreleased/kong/fix-type-of-logrotate.yml | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/kong/fix-type-of-logrotate.yml diff --git a/build/package/nfpm.yaml b/build/package/nfpm.yaml index c47b94a1f31f..6970c8f96563 100644 --- a/build/package/nfpm.yaml +++ b/build/package/nfpm.yaml @@ -32,8 +32,8 @@ contents: - src: nfpm-prefix/share dst: /usr/local/share type: tree -- src: nfpm-prefix/etc/kong - dst: /etc/kong +- dst: /etc/kong + type: dir - src: bin/kong dst: /usr/local/bin/kong - src: bin/kong-health @@ -42,8 +42,12 @@ contents: dst: /lib/systemd/system/kong.service - src: build/package/kong.logrotate dst: /etc/kong/kong.logrotate + type: config|noreplace file_info: mode: 0644 +- src: nfpm-prefix/etc/kong/kong.conf.default + dst: /etc/kong/kong.conf.default + type: config - src: /usr/local/openresty/bin/resty dst: /usr/local/bin/resty type: symlink diff --git a/changelog/unreleased/kong/fix-type-of-logrotate.yml b/changelog/unreleased/kong/fix-type-of-logrotate.yml new file mode 100644 index 000000000000..62a2968e5410 --- /dev/null +++ b/changelog/unreleased/kong/fix-type-of-logrotate.yml @@ -0,0 +1,5 @@ +message: | + The kong.logrotate configuration file will no longer be overwritten during upgrade. + When upgrading, set the environment variable `DEBIAN_FRONTEND=noninteractive` on Debian/Ubuntu to avoid any interactive prompts and enable fully automatic upgrades. +type: bugfix +scope: Core