mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-23 10:52:29 +00:00
2a7364476e
The directory holds the Genesis image sources and, beside them, a builder that no pipeline runs. buildrpm, debuild-xcat-genesis-base, install, install.ubuntu, check, cmdlist_check, findmcprpms, xCAT-genesis-builder.spec and the root makerpm-genesisbuilder have no caller. So has build-ubunturepo, which builddebs.pl replaced, and its -r flag has set an unread variable since 2013. docs/source/references/coral/known_issues/genesis_base.rst tells the reader to install an rpm no build produces, and go-xcat offers to remove that package. Delete all of them, and rename the directory xCAT-genesis-base for what it holds: the dracut modules the EL spec and the Ubuntu builder read, the OpenEmbedded layers the GitHub job builds, the deb packaging, the image scripts and 80-net-name-slot.rules. Every reader of the old path is updated: buildrpms.pl, .gitattributes, the OE workflow and the OpenEmbedded tests. buildrpms.pl mapped the package xCAT-genesis-base to the directory xCAT-genesis-builder; the two names are the same now, so the mapping goes. xcat_probe_package_payload.t read build-ubunturepo for the probe helper staging. builddebs.pl stages them with XCAT::BuildUtils::stage_probe_helpers, which build_utils.t drives directly. genesis_base_sources_staged.t passes with this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
39 lines
1.0 KiB
Bash
Executable File
39 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
if [[ $# -lt 2 || $# -gt 3 ]]; then
|
|
printf '%s\n' 'Usage: sign-extension MANIFEST PRIVATE_KEY [SIGNATURE]' >&2
|
|
exit 2
|
|
fi
|
|
|
|
manifest=$1
|
|
private_key=$2
|
|
signature=${3:-${manifest%.manifest.json}.sig}
|
|
|
|
[[ -f $manifest && ! -L $manifest ]] || {
|
|
printf 'Invalid extension manifest: %s\n' "$manifest" >&2
|
|
exit 1
|
|
}
|
|
[[ -f $private_key && ! -L $private_key ]] || {
|
|
printf 'Invalid private key: %s\n' "$private_key" >&2
|
|
exit 1
|
|
}
|
|
openssl pkey -in "$private_key" -text -noout 2>/dev/null \
|
|
| grep -q '^ED25519 Private-Key:' || {
|
|
printf '%s\n' 'The extension key must be Ed25519' >&2
|
|
exit 1
|
|
}
|
|
|
|
umask 077
|
|
temporary=$(mktemp "${signature}.XXXXXX")
|
|
trap 'rm -f -- "$temporary"' EXIT
|
|
openssl pkeyutl -sign -inkey "$private_key" -rawin \
|
|
-in "$manifest" -out "$temporary"
|
|
[[ $(wc -c <"$temporary") -eq 64 ]] || {
|
|
printf '%s\n' 'OpenSSL returned an invalid Ed25519 signature' >&2
|
|
exit 1
|
|
}
|
|
mv -f -- "$temporary" "$signature"
|
|
trap - EXIT
|
|
printf 'Wrote %s\n' "$signature"
|