forked from linux-automation/meta-lxatac
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shellcheck ci #4
Draft
hnez
wants to merge
41
commits into
mickledore
Choose a base branch
from
shellcheck-ci
base: mickledore
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allow users to migrate custom files between installs. Users can create files like this: $ cat /etc/rauc/migrate.d/git_config.conf /etc/gitconfig /home/root/.gitconfig Which will result in the listed files being migrated to the new RAUC slot. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Fix an optional shellcheck warning to use double square brackets for bash scripts: In meta-lxatac-software/recipes-core/bundles/files/hook.sh line 26: if [ "${bundle_hash}" == "${cert_hash}" ]; then ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh. In meta-lxatac-software/recipes-core/bundles/files/hook.sh line 39: if [ ! -f "$1" ]; then ^-----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Fix an optional shellcheck warning: In meta-lxatac-software/recipes-core/bundles/files/hook.sh line 60: migrate "$x" ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
hnez
force-pushed
the
shellcheck-ci
branch
2 times, most recently
from
December 12, 2023 14:06
d59fc3b
to
02ac4c7
Compare
…ellcheck Fix optional shellcheck warnings for hook.sh
meta-lxatac-software: bundles: hook.sh: migrate user-specified files
hnez
force-pushed
the
shellcheck-ci
branch
3 times, most recently
from
December 15, 2023 15:00
9f28c95
to
b7e16c6
Compare
The content of the /srv/www directory is exported by the tacd via HTTP. If this directory does not exist the user gets a (true, but somewhat confusing) 404 Not Found error if they try to access /srv via HTTP. Usually a tmpfiles.d entry would be the way to go to create this directory, but it causes issues for directories on the /srv file system. See this comment copied from a similar commit for atftp.service: The tmpfiles.d service runs very early in the boot process and even before system-update.target. This means it would clutter the /srv directory in the rootfs if the /srv partition was not yet mounted - because it was not generated yet by systemd-repart. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
meta-lxatac-software: tacd: create /srv/www in tacd.service
This should make sure that we do not forget to update the DISTRO_VERSION and DISTRO_CODENAME when a new tag is created or a new yocto version branch is started. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
CI: add distribution version consistency checks
The gpiofind command was removed, so the tacd-failsafe command would currently fail (which is kind of ironic). Instead gpioset can be directly supplied with the GPIO names. The GPIOs are not guaranteed to keep the assigned value once gpioset exits, so we just keep it running for some time before trying to restart the tacd. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
meta-lxatac-software: tacd: failsafe: gpiofind no longer exists
To follow a well honored tradition our first CI job we added failed instantly when it landed in the main branch. Now that the traditions have been honored we can fix it. There were multiple things wrong with the previous version regarding CI jobs running for a branch or tag (instead of jobs running for a pull request): - The GITHUB_REF variable contains a name like "refs/heads/mickledore", not just "mickledore". We want GITHUB_REF_NAME. - The GITHUB_BASE_REF variable is also set for non pull request jobs, but it is set to an empy string. Check for that to decide if we are running in "pull request mode". - When running for a tag the branch name check for the os codename does not make sense. Skip it in that case. Fixes: 7fa11b2 ("CI: add distribution version consistency checks") Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
CI: fix distribution version consistency checks
meta-oe provides android-tools 29.0.6 in nanbield, which should be more than new enough to suite our needs. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
In addition to latest-and-greatest being the way to go this also fixes issues with newer compilers complaining about uint32_t being used without including stdint.h. See [1] for the respective upstream commit. [1]: nxp-imx/mfgtools@24fd043 Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
The libiio version in meta-oe was updated and we no longer have to carry the backported patch. Likewise with the dt-utils patch and meta-rauc. Our ".rootfs.ext4" -> ".ext4" workarounds in lxatac-core-bundle-base.bb and emmc-image/lxatac/genimage.config are also no longer required. The perf package now handles the libtraceevent dependency correctly and we do not need that bbappend anymore. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Update to Yocto 4.3 - Nanbield
The remaining fields are filled in when the user is actually created, having it in these files may be missleading when changes to the file do not propagate into the generated image. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
The tacos base install does not install / configure systemd-journal-upload, but the Pengutronix-Internal derived images do. Register the uid/gid here, as systemd-journal-upload is generally useful when managing a fleet of TACs. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
meta-lxatac-software: passwd: reserve uid/gid for systemd-journal-upload
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
…rsion Currently the rauc version in rauc-1.11.1.bb is newer than the version in rauc_git.bb. This is obviously an uncommon situation, but it made us aware that we set RAUC_USE_DEVEL_VERSION=1 without a clear reason or need. Released RAUC has all the features we need. Use it. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Currently the update notifications on the LXA TAC LCD and web interface do not work because the tacd can not get informations about the RAUC bundle on the update server via RAUC's DBus API. This is because the process that RAUC spawns to handle the nbd bridge for http streaming crashes due to an unitialized pointer access. This patch is taken from RAUC pull request 1332 [1], which fixes the issue. [1]: rauc/rauc#1332 Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
meta-lxatac-bsp: rauc: add patch to fix RAUC info / update notifications
This effectively bumps the Debian version to the most recent release at that time. This way we will not need to update the script with every Debian release. This also aligns the behavior with `container-start.sh` that simply pulls `debian` if no container is present. And this also defaults to `latest`. Signed-off-by: Chris Fiege <cfi@pengutronix.de>
poky/meta-*: update to most recent nanbield branches
meta-lxatac-software/containers: Update to debian:latest
The official GitHub action runner client is written in C# and uses (as far as I could figure out) the non-free(?) part of the .NET Framework, making it hard to build. This alternative client is written in Go and relatively easy to build. We'll have to see how compatible it is in practice. The need for nodejs on the TAC is due to all "uses:" steps for runners being implemented in javascript (*sigh*). To configure a runner you have to into the Actions setting of your GitHub repository, and add a new self-hosted runner. After configuring the OS and Architecture (Linux / ARM) you can use the presented token to register the runner: $ mkdir -p /etc/github-act-runner $ cd /etc/github-act-runner $ github-act-runner configure \ --name $(uname -n) --token 01234567899876543210012345678 --labels dut-raspberrypi --url https://github.com/user/repository Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
To configure a runner you have to into the CI/CD setting of your GitLab repository, and add a new project runner. After configuring a few aspects of the runner you are presented with a token to use on the TAC: root@lxatac:~ gitlab-runner register --url https://gitlab.com --token glrt-01234567899876543210 Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
GitHub/GitLab Action/Pipeline Runners
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
This was suggested by shellcheck. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Barebox shell rules are not 1:1 equivalent to "/bin/sh" rules, ignore this error. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
…nings Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
…cripts Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
This change is less mechanic than the previous tac-gadget shellcheck change and required some more thinking, which is why it is split out from the rest. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.