mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-23 01:23:00 +02:00
Merge pull request #1476 from kernelkit/misc
Fix two regressions and add developer build helpers
This commit is contained in:
@@ -16,7 +16,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Validate release version format
|
||||
id: validate
|
||||
@@ -170,7 +170,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Upload signed artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: signed-infix-${{ steps.validate.outputs.file_version }}
|
||||
path: ${{ steps.download_signed.outputs.signed_filename }}
|
||||
@@ -212,4 +212,4 @@ jobs:
|
||||
---
|
||||
|
||||
**Next Steps:** The signed release can now be distributed with cryptographic verification of authenticity.
|
||||
EOF
|
||||
EOF
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
ls -la ./
|
||||
|
||||
- name: Checkout infix repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}
|
||||
clean: true
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
mv images ${{ steps.vars.outputs.dirname }}
|
||||
tar cfz ${{ steps.vars.outputs.archive }} ${{ steps.vars.outputs.dirname }}/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
path: output/${{ steps.vars.outputs.archive }}
|
||||
name: artifact-${{ matrix.defconfig }}
|
||||
@@ -108,7 +108,7 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v7
|
||||
with:
|
||||
pattern: "artifact-*"
|
||||
merge-multiple: true
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
clean: true
|
||||
fetch-depth: 0
|
||||
@@ -277,7 +277,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Upload images as artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: images-${{ inputs.board }}
|
||||
path: |
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
target: [aarch64, arm, x86_64]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
clean: true
|
||||
submodules: recursive
|
||||
@@ -86,12 +86,12 @@ jobs:
|
||||
ln -s ${{ steps.vars.outputs.dir }} images
|
||||
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: artifact-${{ matrix.target }}
|
||||
path: output/*.tar.gz
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: artifact-disk-image-${{ matrix.target }}
|
||||
path: output/images/*.qcow2
|
||||
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
ls -la ./
|
||||
|
||||
- name: Checkout infix repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: ${{ env.INFIX_REPO }}
|
||||
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
|
||||
@@ -178,7 +178,7 @@ jobs:
|
||||
ln -s ${{ steps.vars.outputs.dir }} images
|
||||
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
path: output/${{ steps.vars.outputs.tgz }}
|
||||
name: artifact-${{ env.TARGET }}
|
||||
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Check out infix repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
|
||||
@@ -103,7 +103,7 @@ jobs:
|
||||
|
||||
- name: Create pull request
|
||||
if: steps.check.outputs.new_release == 'true'
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
github-token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
|
||||
script: |
|
||||
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
if: ${{github.repository_owner == 'kernelkit'}}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- name: Fetch latest Coverity Scan MD5
|
||||
id: var
|
||||
env:
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
-O coverity-latest.tar.gz.md5
|
||||
echo "md5=$(cat coverity-latest.tar.gz.md5)" | tee -a $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v4
|
||||
- uses: actions/cache@v5
|
||||
id: cache
|
||||
with:
|
||||
path: coverity-latest.tar.gz
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
https://scan.coverity.com/builds?project=${PROJECT_NAME}
|
||||
|
||||
- name: Upload build.log
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: coverity-build.log
|
||||
path: cov-int/build-log.txt
|
||||
|
||||
@@ -24,12 +24,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
mtools
|
||||
|
||||
- name: Checkout infix repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: ${{ github.repository }}
|
||||
ref: ${{ github.ref }}
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
ln -s Infix-x86_64 images
|
||||
tar cfz Infix-x86_64.tar.gz Infix-x86_64
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
path: output/Infix-x86_64.tar.gz
|
||||
name: artifact-x86_64
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
checkout:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: kernelkit/actions/cache-restore@v1
|
||||
with:
|
||||
target: x86_64
|
||||
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
contents: write
|
||||
discussions: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: 'true'
|
||||
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
echo "pre=${{ steps.rel.outputs.pre }}"
|
||||
echo "latest=${{ steps.rel.outputs.latest }}"
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v7
|
||||
with:
|
||||
pattern: "artifact-*"
|
||||
merge-multiple: true
|
||||
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
runs-on: [self-hosted, regression]
|
||||
steps:
|
||||
- name: Checkout infix repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: ${{ env.INFIX_REPO }}
|
||||
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
|
||||
@@ -93,7 +93,7 @@ jobs:
|
||||
run: |
|
||||
make ${{ env.TARGET }}_defconfig
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v7
|
||||
with:
|
||||
pattern: "artifact-*"
|
||||
merge-multiple: true
|
||||
@@ -131,7 +131,7 @@ jobs:
|
||||
make test-dir="$(pwd)/$TEST_PATH" test-report
|
||||
|
||||
- name: Upload Test Report as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: test-report
|
||||
path: output/images/test-report.pdf
|
||||
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
ls -la ./
|
||||
|
||||
- name: Checkout infix repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: ${{ env.INFIX_REPO }}
|
||||
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: "artifact-*"
|
||||
merge-multiple: true
|
||||
|
||||
@@ -9,8 +9,10 @@ O ?= output
|
||||
# otherwise treat it as relative to ./buildroot.
|
||||
override O := $(if $(filter /%,$O),$O,$(CURDIR)/$O)
|
||||
|
||||
config := $(O)/.config
|
||||
bmake = $(MAKE) -C buildroot O=$(O) $1
|
||||
config := $(O)/.config
|
||||
bmake = $(MAKE) -C buildroot O=$(O) $1
|
||||
SNIPPETS_DIR := $(CURDIR)/configs/snippets
|
||||
MERGE_CONFIG := $(CURDIR)/buildroot/support/kconfig/merge_config.sh
|
||||
|
||||
|
||||
all: $(config) buildroot/Makefile
|
||||
@@ -26,6 +28,23 @@ $(config):
|
||||
@echo "'make <board>_defconfig' before building an image."
|
||||
@exit 1
|
||||
|
||||
apply-%: $(SNIPPETS_DIR)/%.conf | $(config)
|
||||
@KCONFIG_CONFIG=$(config) $(MERGE_CONFIG) -m $(config) $<
|
||||
@+$(call bmake,olddefconfig)
|
||||
@echo "Applied snippet: $<"
|
||||
|
||||
list-snippets:
|
||||
@echo "Available snippets (use 'make apply-<name>'):"
|
||||
@ls $(SNIPPETS_DIR)/*.conf 2>/dev/null | sed 's|.*/||; s|\.conf$$||; s|^| |'
|
||||
|
||||
dev: | $(config)
|
||||
@for s in $(SNIPPETS_DIR)/*.conf; do \
|
||||
KCONFIG_CONFIG=$(config) $(MERGE_CONFIG) -m $(config) $$s; \
|
||||
echo "Applied snippet: $$s"; \
|
||||
done
|
||||
@+$(call bmake,olddefconfig)
|
||||
@+$(call bmake,all)
|
||||
|
||||
%: | buildroot/Makefile
|
||||
@+$(call bmake,$@)
|
||||
|
||||
@@ -44,4 +63,4 @@ test:
|
||||
buildroot/Makefile:
|
||||
@git submodule update --init
|
||||
|
||||
.PHONY: all check coverity dep test cyclonedx
|
||||
.PHONY: all check coverity dep test cyclonedx list-snippets dev
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
BR2_TARGET_ENABLE_ROOT_LOGIN=y
|
||||
@@ -0,0 +1,3 @@
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
|
||||
+4
-1
@@ -15,7 +15,10 @@ All notable changes to the project are documented in this file.
|
||||
|
||||
### Fixes
|
||||
|
||||
- N/A
|
||||
- Fix #1458: `show ntp tracking` displaying a truncated Reference ID, e.g.,
|
||||
`92.2` instead of `92.246.137.39`
|
||||
- Fix #1466: `show container` showing no output for containers whose command
|
||||
line includes environment variables
|
||||
|
||||
[BPI-R4]: https://docs.banana-pi.org/en/BPI-R4/BananaPi_BPI-R4
|
||||
|
||||
|
||||
+35
-5
@@ -7,12 +7,12 @@ account, which is created based on credentials found in the VPD area --
|
||||
for Qemu devices this is emulated using `qemu_fw_cfg`.
|
||||
|
||||
For developers this can be quite frustrating to be blocked from logging
|
||||
in to debug the system. So we recommend enabling the `root` account in
|
||||
the Buildroot `make menuconfig` system.
|
||||
in to debug the system. The quickest way to enable root login is to
|
||||
apply the `dev` configuration snippet:
|
||||
|
||||
make menuconfig
|
||||
-> System configuration
|
||||
-> [*]Enable root login with password
|
||||
make apply-dev
|
||||
|
||||
See [Configuration Snippets](#configuration-snippets) for more details.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Please see the [Contributing](#contributing) section, below, for
|
||||
@@ -166,6 +166,36 @@ on Buildroot to finalize the target filesystem and generate the images.
|
||||
The final `run` argument is explained below.
|
||||
|
||||
|
||||
### Configuration Snippets
|
||||
|
||||
Infix ships a set of Kconfig fragments in `configs/snippets/` that can
|
||||
be merged into your active `.config` on demand. This avoids polluting
|
||||
defconfigs with settings that are only useful during development.
|
||||
|
||||
To see what snippets are available:
|
||||
|
||||
make list-snippets
|
||||
|
||||
To apply a single snippet to the current output directory:
|
||||
|
||||
make apply-dev # enable root login
|
||||
make apply-ext4 # build an ext4 rootfs (needed for boards
|
||||
# whose bootloader lacks squashfs support,
|
||||
# e.g. Marvell ESPRESSObin)
|
||||
|
||||
The `apply-*` targets require an existing `.config` (i.e. you must have
|
||||
already run a `make <board>_defconfig`). The snippet is merged using
|
||||
Buildroot's `merge_config.sh`, so it behaves like `make menuconfig`:
|
||||
unrelated settings are preserved, conflicting ones are overridden.
|
||||
|
||||
To apply **all** snippets at once and then build:
|
||||
|
||||
make dev
|
||||
|
||||
This is the recommended one-shot command for setting up a development
|
||||
build from a freshly selected defconfig.
|
||||
|
||||
|
||||
### YANG Model
|
||||
|
||||
When making changes to the `confd` and `statd` services, you will often
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
@@ -22,6 +22,13 @@ module infix-containers {
|
||||
prefix infix-sys;
|
||||
}
|
||||
|
||||
revision 2026-04-20 {
|
||||
description "Add cmdline operational leaf showing the full process command line
|
||||
(entrypoint + args) from 'podman inspect'. Allow environment variable
|
||||
references (dollar sign, braces) in the command override.";
|
||||
reference "internal";
|
||||
}
|
||||
|
||||
revision 2026-02-23 {
|
||||
description "Input validation improvements";
|
||||
reference "internal";
|
||||
@@ -257,10 +264,19 @@ module infix-containers {
|
||||
leaf command {
|
||||
description "Override ENTRYPOINT from image and run command + args.";
|
||||
type string {
|
||||
pattern '[a-zA-Z0-9_./ :=@%^,+-]+';
|
||||
pattern '[a-zA-Z0-9_./ :=@%^,${}()+-]+';
|
||||
}
|
||||
}
|
||||
|
||||
leaf cmdline {
|
||||
description "Full process command line currently executing in the container,
|
||||
combining the entrypoint and its arguments as reported by
|
||||
'podman inspect'. May differ from the configured 'command'
|
||||
override when the image provides its own entrypoint wrapper.";
|
||||
config false;
|
||||
type string;
|
||||
}
|
||||
|
||||
leaf hostname {
|
||||
description "Sets the container host name, available inside the container.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- sh -*-
|
||||
MODULES=(
|
||||
"infix-interfaces -e containers"
|
||||
"infix-containers@2026-02-23.yang"
|
||||
"infix-containers@2026-04-20.yang"
|
||||
)
|
||||
|
||||
@@ -191,9 +191,20 @@ def add_ntp_clock_state(out):
|
||||
refid_ip = parts[0]
|
||||
refid_name = parts[1]
|
||||
|
||||
if refid_name:
|
||||
# NTP refids are always 4 bytes; chronyc strips trailing padding.
|
||||
# YANG typedef 'refid' requires exactly length 4 for strings.
|
||||
def _is_ipv4(s):
|
||||
p = s.split('.')
|
||||
if len(p) != 4:
|
||||
return False
|
||||
try:
|
||||
return all(0 <= int(x) <= 255 for x in p)
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
if refid_name and _is_ipv4(refid_name):
|
||||
# chronyc reports the IPv4 server address as the name field; use it directly
|
||||
system_status["clock-refid"] = refid_name
|
||||
elif refid_name and ':' not in refid_name:
|
||||
# Short NTP code (GPS, NIST, INIT, …); YANG refid requires length 4
|
||||
system_status["clock-refid"] = refid_name.ljust(4)[:4]
|
||||
elif refid_ip and len(refid_ip) == 8:
|
||||
try:
|
||||
|
||||
@@ -223,16 +223,21 @@ def container(ps):
|
||||
"status": ps["Status"]
|
||||
}
|
||||
|
||||
# Bonus information, may not be available
|
||||
if ps["Command"]:
|
||||
out["command"] = " ".join(ps["Command"])
|
||||
|
||||
inspect = podman_inspect(out["name"])
|
||||
if inspect and isinstance(inspect, list) and len(inspect) > 0:
|
||||
inspect = inspect[0]
|
||||
else:
|
||||
inspect = {}
|
||||
|
||||
path = inspect.get("Path", "")
|
||||
args = inspect.get("Args", [])
|
||||
if path:
|
||||
out["cmdline"] = " ".join([path] + args)
|
||||
|
||||
cmd = inspect.get("Config", {}).get("Cmd", [])
|
||||
if cmd:
|
||||
out["command"] = " ".join(cmd)
|
||||
|
||||
net = network(ps, inspect)
|
||||
if net:
|
||||
out["network"] = net
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Verify all config/*_defconfig files, skipping any subdirectories,
|
||||
# e.g., developer snippets not used in official builds.
|
||||
|
||||
SCRIPT_PATH="$(dirname "$(readlink -f "$0")")"
|
||||
CONFIGS="$SCRIPT_PATH/../../../configs"
|
||||
@@ -47,6 +49,7 @@ check()
|
||||
done
|
||||
}
|
||||
|
||||
check "$CONFIGS"/* || exit 1
|
||||
# shellcheck disable=SC2046
|
||||
check $(find "$CONFIGS" -maxdepth 1 -type f | LC_ALL=C sort) || exit 1
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"image-id": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033",
|
||||
"running": true,
|
||||
"status": "Up About a minute",
|
||||
"cmdline": "/usr/bin/tini -- /usr/sbin/httpd -f -v",
|
||||
"command": "/usr/sbin/httpd -f -v",
|
||||
"network": {
|
||||
"interface": [
|
||||
@@ -28,6 +29,7 @@
|
||||
"image-id": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033",
|
||||
"running": true,
|
||||
"status": "Up About a minute",
|
||||
"cmdline": "/usr/bin/tini -- /usr/sbin/httpd -f -v -p 91",
|
||||
"command": "/usr/sbin/httpd -f -v -p 91",
|
||||
"network": {
|
||||
"interface": [
|
||||
@@ -50,6 +52,7 @@
|
||||
"image-id": "7a3cc502436250357a6664100a600f306334b4d7203890b85b7ea9b8da6b5665",
|
||||
"running": true,
|
||||
"status": "Up About a minute",
|
||||
"cmdline": "/usr/bin/tini -- /usr/sbin/nft-helper /etc/nftables.conf",
|
||||
"command": "/usr/sbin/nft-helper /etc/nftables.conf",
|
||||
"network": {
|
||||
"host": true
|
||||
|
||||
@@ -1187,6 +1187,7 @@
|
||||
"infix-containers:containers": {
|
||||
"container": [
|
||||
{
|
||||
"cmdline": "/usr/bin/tini -- /usr/sbin/httpd -f -v",
|
||||
"command": "/usr/sbin/httpd -f -v",
|
||||
"id": "78d28082c2e5d494c82aa181c95118ce498e25930ad9e288ba010257ca336378",
|
||||
"image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest",
|
||||
@@ -1207,6 +1208,7 @@
|
||||
"status": "Up About a minute"
|
||||
},
|
||||
{
|
||||
"cmdline": "/usr/bin/tini -- /usr/sbin/httpd -f -v -p 91",
|
||||
"command": "/usr/sbin/httpd -f -v -p 91",
|
||||
"id": "3451cfceca4eee1091c1dfedece2faee99bc8a729e781799d9c0b4368a31d86d",
|
||||
"image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest",
|
||||
@@ -1229,6 +1231,7 @@
|
||||
"status": "Up About a minute"
|
||||
},
|
||||
{
|
||||
"cmdline": "/usr/bin/tini -- /usr/sbin/nft-helper /etc/nftables.conf",
|
||||
"command": "/usr/sbin/nft-helper /etc/nftables.conf",
|
||||
"id": "4e7c3daeba15546e7640014b9ee46e389737ed36583e5cb2f8b75a07a82e8523",
|
||||
"image": "localhost/curios-nftables-oci-amd64-v24.11.0:latest",
|
||||
|
||||
Reference in New Issue
Block a user