fluent / fluent-package-builder

td-agent (Fluentd) Building and Packaging System
Apache License 2.0
22 stars 23 forks source link

github: add missing bookworm as target #586

Closed kenhys closed 10 months ago

kenhys commented 10 months ago
kenhys commented 10 months ago

Oops, I've forgot to add it. Thanks.

daipom commented 10 months ago

https://github.com/fluent/fluent-package-builder/actions/runs/6144619825/job/16670375606?pr=586

Hmm, something seems wrong.

kenhys commented 10 months ago

I'll check it.

kenhys commented 10 months ago

It is because bookworm was supported since v5. (no bookworm deb for v4)

daipom commented 10 months ago

Thanks! In addition, I think this code does not work as expected.

https://github.com/fluent/fluent-package-builder/blob/cb795a5253e18f05a754ca9d41cef4aa2dbf8536/fluent-package/apt/pkgsize-test.sh#L14-L22

$code_name is from this.

https://github.com/fluent/fluent-package-builder/blob/cb795a5253e18f05a754ca9d41cef4aa2dbf8536/fluent-package/apt/commonvar.sh#L1

It seems that we should use $CODE_NAME instead of $code_name.

It is so confusing, so it may be better to change the name $CODE_NAME...

daipom commented 10 months ago

Thanks! In addition, I think this code does not work as expected.

https://github.com/fluent/fluent-package-builder/blob/cb795a5253e18f05a754ca9d41cef4aa2dbf8536/fluent-package/apt/pkgsize-test.sh#L14-L22

$code_name is from this.

https://github.com/fluent/fluent-package-builder/blob/cb795a5253e18f05a754ca9d41cef4aa2dbf8536/fluent-package/apt/commonvar.sh#L1

It seems that we should use $CODE_NAME instead of $code_name.

It is so confusing, so it may be better to change the name $CODE_NAME...

Hmm, what I'm saying seems partially wrong...

It seems not wrong to use $code_name here...

I don't understand why there is two variarables and this condition does not work though...

kenhys commented 10 months ago

It is so confusing, so it may be better to change the name $CODE_NAME...

Thanks, as you mentioned, using ${CODE_NAME} is better. I've fixed it.

kenhys commented 10 months ago

checking why...

 0m5.3s DEBUG: Starting command: ['chroot', '/tmp/tmpr3kvd8i9', 'apt-get', '-y', '--allow-downgrades', 'install', './tmp/fluent-package-dbgsym_5.0.1-1_amd64.deb', './tmp/fluent-package_5.0.1-1_amd64.deb']
0m5.4s DUMP: 
  Reading package lists...
  Building dependency tree...
  Reading state information...
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:

  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/td.list:1
  W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list.d/td.list:1
  W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list.d/td.list:1
  E: Unable to correct problems, you have held broken packages.
kenhys commented 10 months ago

Actually, depends on libncurses6.

 apt depends fluent-package
fluent-package
  PreDepends: adduser
  Depends: libc6 (>= 2.35)
  Depends: libcrypt1 (>= 1:4.1.0)
  Depends: libffi8 (>= 3.4)
  Depends: libgcc-s1 (>= 4.2)
  Depends: libgmp10 (>= 2:6.2.1+dfsg1)
  Depends: libncurses6 (>= 6)
  Depends: libreadline8 (>= 6.0)
  Depends: libssl3 (>= 3.0.0)
  Depends: libtinfo6 (>= 6)
  Depends: libyaml-0-2
  Depends: zlib1g (>= 1:1.2.11.dfsg)
  Breaks: td-agent (<< 5.0.0-1)
  Replaces: td-agent (<< 5.0.0-1)

And installed ncurses6.

dpkg -l |grep libncurses
ii  libncurses6:amd64         6.4-4                          amd64        shared libraries for terminal handling
ii  libncursesw6:amd64        6.4-4                          amd64        shared libraries for terminal handling (wide character support)
kenhys commented 10 months ago

checking current repos:

apt-cache madison fluent-package
fluent-package |    5.0.1-1 | https://packages.treasuredata.com/5/debian/bookworm bookworm/contrib amd64 Packages
fluent-package |    5.0.0-1 | https://packages.treasuredata.com/5/debian/bookworm bookworm/contrib amd64 Packages
kenhys commented 10 months ago

apt-get install -y --allow-downgrades ./fluent-package-dbgsym_5.0.1-1_amd64.deb ./fluent-package_5.0.1-1_amd64.deb itself is not problem on bookworm container.

kenhys commented 10 months ago

Got it, --mirror is redundant in this case.

kenhys commented 10 months ago

waiting CI..

kenhys commented 10 months ago

Fixed bookworm failure. yay!

kenhys commented 10 months ago

a bit confused behavior is observed.

bullseye: before: no /etc/systemd/system/fluentd.service after(apt remove): /etc/systemd/system/fluentd.service => /dev/null (dead link)

bookworm: before: no /etc/systemd/system/fluentd.service after(apt remove): no /etc/systemd/system/fluentd.service, instead, /etc/systemd/system/multi-user.target.wants/fluentd.service=>/lib/systemd/system/fluentd.service (dead link)

kenhys commented 10 months ago

I've updated description and test case a bit.

daipom commented 10 months ago

Hmm, certainly, there seems to be a specification change between debian-bullseye and debian-bookworm...

I think the dead link /etc/systemd/system/fluentd.service is to provide access to the service after removing.

We can still access the service after removing the package in bullseye:

vagrant@debian-11:/etc/systemd/system$ systemctl status fluentd
ā— fluentd.service
     Loaded: masked (Reason: Unit fluentd.service is masked.)
     Active: inactive (dead) since Wed 2023-09-13 09:16:49 UTC; 13s ago
   Main PID: 11665 (code=exited, status=0/SUCCESS)
        CPU: 896ms
vagrant@debian-11:/etc/systemd/system$ systemctl status td-agent
ā— td-agent.service
     Loaded: masked (Reason: Unit td-agent.service is masked.)
     Active: inactive (dead)

We can't access the service anymore after removing the package in bookworm:

vagrant@debian-12:~$ systemctl status fluentd
Unit fluentd.service could not be found.
vagrant@debian-12:~$ systemctl status td-agent
Unit td-agent.service could not be found.

I think this is not an issue of this package but of the specification of bookworm.

daipom commented 10 months ago

I've updated description and test case a bit.

Thanks, this change looks reasonable to me. I also think it might not be necessary to test the remained service file link...

It seems that we should also fix update-from-v4.sh:

https://github.com/fluent/fluent-package-builder/blob/2b9fd5eef0655b70dfc7a6f0a6cc506bea44dad0/fluent-package/apt/systemd-test/update-from-v4.sh#L69-L75

kenhys commented 10 months ago

waiting CI...

kenhys commented 10 months ago

read_nonblock frequently occurs, :thinking:

kenhys commented 10 months ago

read_nonblock frequently occurs, šŸ¤”

Try to search workaround in another issue/pr.

kenhys commented 10 months ago

With some retry, all check has passed now.