Skip to content

Conversation

palfrey
Copy link
Contributor

@palfrey palfrey commented Sep 7, 2025

Related to toltec-dev/toltec#950, and this PR fixes usage of patch_rm2fb

$ docker run --rm -it -v `pwd`:/work ghcr.io/toltec-dev/toolchain:v1.3.1 bash
root@2ad815a1eebc:/# apt-get update
Ign:1 http://deb.debian.org/debian buster InRelease
Ign:2 http://deb.debian.org/debian buster-updates InRelease
Err:3 http://deb.debian.org/debian buster Release
  404  Not Found [IP: 151.101.62.132 80]
Err:4 http://deb.debian.org/debian buster-updates Release
  404  Not Found [IP: 151.101.62.132 80]
Ign:5 http://security.debian.org/debian-security buster/updates InRelease
Err:6 http://security.debian.org/debian-security buster/updates Release
  404  Not Found [IP: 151.101.62.132 80]
Reading package lists... Done
E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://security.debian.org/debian-security buster/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

@Eeems
Copy link
Member

Eeems commented Sep 7, 2025

Since the runner used for the various internal actions doesn't need to update itself, doesn't need any new features, and still works, there is no need to update it.

@palfrey
Copy link
Contributor Author

palfrey commented Sep 7, 2025

Since the runner used for the various internal actions doesn't need to update itself, doesn't need any new features, and still works, there is no need to update it.

Without this fix, when building calculator for example with the upgraded image from toltec-dev/toltec#951, I get the following at the end of the build log

[   DEBUG] toltec.hooks.patch_rm2fb: Adding dependency to rm2fb ('patch_rm2fb' flag is set)
[   DEBUG] urllib3.connectionpool: http://localhost:None "POST /v1.41/containers/create HTTP/1.1" 201 88
[   DEBUG] urllib3.connectionpool: http://localhost:None "GET /v1.41/containers/3f4e4cde3115ea08497e7e82f8b2b66139b24c4e59006d46c5fa97b7f0334d67/json HTTP/1.1" 200 None
[   DEBUG] urllib3.connectionpool: http://localhost:None "POST /v1.41/containers/3f4e4cde3115ea08497e7e82f8b2b66139b24c4e59006d46c5fa97b7f0334d67/start HTTP/1.1" 204 0
[   DEBUG] urllib3.connectionpool: http://localhost:None "GET /v1.41/containers/3f4e4cde3115ea08497e7e82f8b2b66139b24c4e59006d46c5fa97b7f0334d67/logs?stderr=1&stdout=1&timestamps=0&follow=1&tail=all HTTP/1.1" 200 None
[   DEBUG] urllib3.connectionpool: http://localhost:None "GET /v1.41/containers/3f4e4cde3115ea08497e7e82f8b2b66139b24c4e59006d46c5fa97b7f0334d67/json HTTP/1.1" 200 None
[   DEBUG] toltec.hooks.patch_rm2fb: : E: The repository 'http://security.debian.org/debian-security buster/updates Release' does not have a Release file.
[   DEBUG] toltec.hooks.patch_rm2fb: : E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.
[   DEBUG] toltec.hooks.patch_rm2fb: : E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.
[   DEBUG] urllib3.connectionpool: http://localhost:None "POST /v1.41/containers/3f4e4cde3115ea08497e7e82f8b2b66139b24c4e59006d46c5fa97b7f0334d67/wait HTTP/1.1" 200 None
[   DEBUG] urllib3.connectionpool: http://localhost:None "DELETE /v1.41/containers/3f4e4cde3115ea08497e7e82f8b2b66139b24c4e59006d46c5fa97b7f0334d67?v=False&link=False&force=False HTTP/1.1" 204 0
Traceback (most recent call last):
  File "/home/palfrey/src/remarkable/toltec/./scripts/package_build.py", line 70, in <module>
    if not builder.make(recipe_bundle, build_matrix, False):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/palfrey/src/remarkable/toltec/.venv/lib/python3.11/site-packages/toltec/builder.py", line 165, in make
    if not self._make_arch(
           ^^^^^^^^^^^^^^^^
  File "/home/palfrey/src/remarkable/toltec/.venv/lib/python3.11/site-packages/toltec/builder.py", line 192, in _make_arch
    self.post_build(recipe, src_dir)
  File "/home/palfrey/src/remarkable/toltec/.venv/lib/python3.11/site-packages/toltec/util.py", line 373, in call
    call_listener(*args, **kwargs)
  File "/home/palfrey/src/remarkable/toltec/.venv/lib/python3.11/site-packages/toltec/hooks/patch_rm2fb.py", line 78, in post_build
    run_in_container(builder, src_dir, logger, script)
  File "/home/palfrey/src/remarkable/toltec/.venv/lib/python3.11/site-packages/toltec/hooks/strip.py", line 60, in run_in_container
    bash.pipe_logs(_logger, logs)
  File "/home/palfrey/src/remarkable/toltec/.venv/lib/python3.11/site-packages/toltec/bash.py", line 495, in pipe_logs
    raise err
  File "/home/palfrey/src/remarkable/toltec/.venv/lib/python3.11/site-packages/toltec/bash.py", line 475, in pipe_logs
    for line in logs:
  File "/home/palfrey/src/remarkable/toltec/.venv/lib/python3.11/site-packages/toltec/bash.py", line 450, in run_script_in_container
    raise ScriptError(f"Script exited with code {result['StatusCode']}")
toltec.bash.ScriptError: Script exited with code 100

(without the upgraded image, it doesn't get that far as the image used for calculator itself bugs out before that)

@Eeems
Copy link
Member

Eeems commented Sep 7, 2025

So this is just in the log, but the build doesn't fail? I'm on mobile and not able to get the logs to load at the moment.

@palfrey
Copy link
Contributor Author

palfrey commented Sep 7, 2025

So this is just in the log, but the build doesn't fail? I'm on mobile and not able to get the logs to load at the moment.

Nope, seeing build failures.

@Eeems
Copy link
Member

Eeems commented Sep 7, 2025

Alright, now that we have the other PR triggering builds, we can see the errors there as well.

Your original description stated that this breaks the patch_rm2fb hook, but it actually fixes it right?

The automated tests include a patch_rm2fb recipe that should verify that this is working.

@palfrey
Copy link
Contributor Author

palfrey commented Sep 7, 2025

Alright, now that we have the other PR triggering builds, we can see the errors there as well.

Your original description stated that this breaks the patch_rm2fb hook, but it actually fixes it right?

Yup, fixed that.

The automated tests include a patch_rm2fb recipe that should verify that this is working.

Wasn't seeing it clearly in the logs, but I've been able to show test_build_rmkit breaks with earlier toolchain versions, which is good.

@Eeems Eeems merged commit 23a3f54 into toltec-dev:main Sep 8, 2025
11 checks passed
@palfrey palfrey deleted the toolchain-v3 branch September 8, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants