Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Rootless build container #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pktpls
Copy link
Contributor

@pktpls pktpls commented Aug 22, 2022

Podman runs rootless and without a daemon in the background. Read about the dependencies here: https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md

  • --userns=keep-id and the Z volume option make sure that permissions on shared filesystem resources (build_feed and the output directory) work alright between container and host.
  • Logging verbosity is increased via bash set -ex and buildroot V=s. A human only ever reads this script's output when an automated build has failed, in which case they want a certain level of detail.
  • In turn, a ton of warning noise is removed from the output. These are warnings from OpenWrt that aren't actionable for us.
  • -j8 on make doesn't have any effect in our case.

The script eventually fails at make package/index for lack of a signing key, which is a separate issue I guess. A key could easily be placed at ./build-key and then be accessible at /home/build/repobuilder/build-key, which could be symlinked into the buildroot.

Tested on Fedora 36

Copy link
Member

@Akira25 Akira25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the mentioned adjustments made, the script didn't produce package on a buildbot-worker. The Output-Dir was empty.

Maybe it helps for debugging: Buildbot calls the script with a command of this form.

./build_all_targets 'src-git falter https://github.com/freifunk-berlin/falter-packages^3e9a88bf3ab9c3c991e5a4f8b5278996d1ca6b15' /tmp/builder_test/ build_parallel

build_all_targets Outdated Show resolved Hide resolved
build_feed Outdated Show resolved Hide resolved
build_feed Show resolved Hide resolved
build_feed Outdated Show resolved Hide resolved
build_feed Show resolved Hide resolved
@pktpls
Copy link
Contributor Author

pktpls commented Oct 4, 2022

Should be good now - but will it work on the buildbot workers? Are they standardized containers/vms?

@Akira25
Copy link
Member

Akira25 commented Oct 4, 2022

Should be good now - but will it work on the buildbot workers? Are they standardized containers/vms?

Buildbot-workers are simple debian-vms, which are handled by this role:
https://github.com/freifunk-berlin/ansible/tree/main/roles/buildbot_worker

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants