Skip to content

Commit

Permalink
github: add missing bookworm as target (#586)
Browse files Browse the repository at this point in the history
* github: drop redundant --mirror option

    Use pre-configured chroot apt-line, so --mirror is redundant.
    Without it, it causes the following error on bookworm:

      The following packages have unmet dependencies:
fluent-package : Depends: libncurses6 (>= 6) but it is not installable
W: Target Packages (contrib/binary-amd64/Packages) is configured
multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list.d
W: Target Packages (contrib/binary-all/Packages) is configured multiple
times in /etc/apt/sources.list:2 and /etc/apt/sources.list.d/t
W: Target Translations (contrib/i18n/Translation-en) is configured
multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list

 github: add more .service check after removing

    After removing fluent-package, the status of service files seems
    different.

    bookworm:
      no /etc/systemd/system/fluentd.service
dead symlink /etc/systemd/system/multi-user.target.wants/luentd.service
      dead /etc/systemd/system/td-agent.service

    bullseye:
      dead /etc/systemd/system/fluentd.service
dead symlink /etc/systemd/system/multi-user.target.wants/luentd.service
      dead /etc/systemd/system/td-agent.service

---------

Signed-off-by: Kentaro Hayashi <[email protected]>
  • Loading branch information
kenhys authored Sep 14, 2023
1 parent 2b9fd5e commit 2964ab2
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/apt-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ jobs:
matrix:
label:
- Debian GNU/Linux bullseye arm64
- Debian GNU/Linux bookworm arm64
- Ubuntu Focal arm64
- Ubuntu Jammy arm64
include:
- label: Debian GNU/Linux bullseye arm64
rake-job: debian-bullseye
test-docker-image: arm64v8/debian:bullseye
- label: Debian GNU/Linux bookworm arm64
rake-job: debian-bookworm
test-docker-image: arm64v8/debian:bookworm
- label: Ubuntu Focal arm64
rake-job: ubuntu-focal
rake-options: LINTIAN=no
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ jobs:
matrix:
label:
- Debian GNU/Linux bullseye amd64
- Debian GNU/Linux bookworm amd64
- Ubuntu Focal amd64
- Ubuntu Jammy amd64
include:
- label: Debian GNU/Linux bullseye amd64
rake-job: debian-bullseye
test-docker-image: debian:bullseye
- label: Debian GNU/Linux bookworm amd64
rake-job: debian-bookworm
test-docker-image: debian:bookworm
- label: Ubuntu Focal amd64
rake-job: ubuntu-focal
test-docker-image: ubuntu:focal
Expand Down Expand Up @@ -97,6 +101,7 @@ jobs:
matrix:
distribution:
- debian-bullseye
- debian-bookworm
- ubuntu-focal
- ubuntu-jammy
steps:
Expand Down
4 changes: 4 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
:id => "debian-bullseye",
:box => "bento/debian-11",
},
{
:id => "debian-bookworm",
:box => "bento/debian-12",
},
{
:id => "ubuntu-focal",
:box => "bento/ubuntu-20.04",
Expand Down
4 changes: 4 additions & 0 deletions fluent-package/apt/install-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ for conf_path in /etc/td-agent/td-agent.conf /etc/fluent/fluentd.conf; do
fi
done

if [ "${code_name}" == "bookworm" ]; then
echo "As bookworm is not published for v4, so package upgrade install check for ${code_name} is disabled"
exit 0
fi
# TODO: Remove it when v5 repository was deployed
apt install -y curl
curl -O https://packages.treasuredata.com/4/${distribution}/${code_name}/pool/contrib/f/fluentd-apt-source/fluentd-apt-source_2020.8.25-1_all.deb
Expand Down
3 changes: 1 addition & 2 deletions fluent-package/apt/piuparts-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ chmod 644 $CHROOT/usr/share/keyrings/td-agent-archive-keyring.gpg
chroot $CHROOT apt install -V -y libyaml-0-2
package=${repositories_dir}/${distribution}/pool/${code_name}/${channel}/*/*/*_${architecture}.deb
cp ${package} /tmp
echo "deb [signed-by=/usr/share/keyrings/td-agent-archive-keyring.gpg] https://packages.treasuredata.com/4/${distribution}/${code_name}/ ${code_name} contrib" | tee $CHROOT/etc/apt/sources.list.d/td.list
echo "deb [signed-by=/usr/share/keyrings/td-agent-archive-keyring.gpg] https://packages.treasuredata.com/5/${distribution}/${code_name}/ ${code_name} contrib" | tee $CHROOT/etc/apt/sources.list.d/td.list
rm -rf $CHROOT/opt
piuparts --distribution=${code_name} \
--existing-chroot=${CHROOT} \
--mirror="https://packages.treasuredata.com/4/${distribution}/${code_name}/ ${code_name} contrib" \
--skip-logrotatefiles-test \
/tmp/*_${architecture}.deb
17 changes: 6 additions & 11 deletions fluent-package/apt/pkgsize-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ ARCH=$2

REPOSITORIES_DIR=fluent-package/apt/repositories

if [ "${code_name}" == "bookworm" ]; then
echo "As bookworm is not published yet, so package size check for ${code_name} is disabled"
exit 0
fi

if [ -f .git/shallow ]; then
git fetch --unshallow
fi
Expand All @@ -32,11 +27,11 @@ done

case ${DISTRIBUTION} in
debian)
BASE_URI=http://packages.treasuredata.com.s3.amazonaws.com/4/debian/${CODE_NAME}
BASE_URI=https://packages.treasuredata.com/5/debian/${CODE_NAME}
CHANNEL=main
for v in "${PREVIOUS_VERSIONS[@]}"; do
BASE_NAME=td-agent_${v}-1_${ARCH}.deb
PREVIOUS_DEB=${BASE_URI}/pool/contrib/t/td-agent/${BASE_NAME}
BASE_NAME=fluent-package_${v}-1_${ARCH}.deb
PREVIOUS_DEB=${BASE_URI}/pool/contrib/f/fluent-package/${BASE_NAME}
set +e
wget ${PREVIOUS_DEB}
if [ $? -eq 0 ]; then
Expand All @@ -45,11 +40,11 @@ case ${DISTRIBUTION} in
done
;;
ubuntu)
BASE_URI=http://packages.treasuredata.com.s3.amazonaws.com/4/ubuntu/${CODE_NAME}
BASE_URI=https://packages.treasuredata.com/5/ubuntu/${CODE_NAME}
CHANNEL=universe
for v in "${PREVIOUS_VERSIONS[@]}"; do
BASE_NAME=td-agent_${v}-1_${ARCH}.deb
PREVIOUS_DEB=${BASE_URI}/pool/contrib/t/td-agent/${BASE_NAME}
BASE_NAME=fluent-package_${v}-1_${ARCH}.deb
PREVIOUS_DEB=${BASE_URI}/pool/contrib/f/fluent-package/${BASE_NAME}
set +e
wget ${PREVIOUS_DEB}
if [ $? -eq 0 ]; then
Expand Down
18 changes: 17 additions & 1 deletion fluent-package/apt/systemd-test/install-newly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,21 @@ test -e /var/log/fluent/fluentd.log

sudo apt remove -y fluent-package

test -h /etc/systemd/system/fluentd.service
case ${code_name} in
bookworm)
# no dead fluentd.service symlink in /etc/systemd/system
(! test -h /etc/systemd/system/fluentd.service)
test -h /etc/systemd/system/multi-user.target.wants/fluentd.service
(! test -s /etc/systemd/system/multi-user.target.wants/fluentd.service)
;;
*)
# dead fluentd.service symlink in /etc/systemd/system
test -h /etc/systemd/system/fluentd.service
(! test -s /etc/systemd/system/fluentd.service)
test -h /etc/systemd/system/multi-user.target.wants/fluentd.service
(! test -s /etc/systemd/system/multi-user.target.wants/fluentd.service)
;;
esac
test -h /etc/systemd/system/td-agent.service
(! test -s /etc/systemd/system/td-agent.service)
(! systemctl status fluentd)
10 changes: 8 additions & 2 deletions fluent-package/apt/systemd-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ fi
set -eu

test_filenames=(
update-from-v4.sh
update-to-next-version.sh
update-to-next-version-with-backward-compat-for-v4.sh
)

if [ ! $vm = "debian-bookworm" ]; then
# As no bookworm package for v4, so execute upgrade test for other code name.
test_filenames+=(
update-from-v4.sh
update-to-next-version-with-backward-compat-for-v4.sh
)
fi

for apt_repo_type in local v5 lts; do
echo -e "\nRun test: $apt_repo_type\n"
vagrant up $vm
Expand Down
4 changes: 4 additions & 0 deletions fluent-package/apt/systemd-test/update-from-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ sudo apt remove -y fluent-package
(! systemctl status --no-pager fluentd)

test -h /etc/systemd/system/td-agent.service
(! test -s /etc/systemd/system/td-agent.service)
test -h /etc/systemd/system/fluentd.service
(! test -s /etc/systemd/system/fluentd.service)
test -h /etc/systemd/system/multi-user.target.wants/fluentd.service
(! test -s /etc/systemd/system/multi-user.target.wants/fluentd.service)

0 comments on commit 2964ab2

Please sign in to comment.