Skip to content

Commit

Permalink
Merge pull request #2028 from flatcar/chewi/cargo-cross
Browse files Browse the repository at this point in the history
Sync cargo.eclass and drop coreos-cargo.eclass
  • Loading branch information
chewi authored Jun 17, 2024
2 parents 6961b44 + d421f8c commit fb14884
Show file tree
Hide file tree
Showing 35 changed files with 1,010 additions and 1,213 deletions.
1 change: 1 addition & 0 deletions .github/workflows/portage-stable-packages-list
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ eclass/python-utils-r1.eclass
eclass/readme.gentoo-r1.eclass
eclass/ruby-single.eclass
eclass/ruby-utils.eclass
eclass/rust-toolchain.eclass
eclass/rpm.eclass
eclass/savedconfig.eclass
eclass/selinux-policy-2.eclass
Expand Down
25 changes: 1 addition & 24 deletions core_sign_update
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@ export GCLIENT_ROOT=$(readlink -f "${SCRIPT_ROOT}/../../")
DEFINE_string image "" "The filesystem image of /usr"
DEFINE_string kernel "" "The kernel image"
DEFINE_string output "" "Output file"
DEFINE_string private_keys "" "Path, pkcs11 URI, or fero:<keyname> for private keys."
DEFINE_string private_keys "" "Path or pkcs11 URI for private keys."
DEFINE_string public_keys "" "Path to public keys in .pem format."
DEFINE_string keys_separator ":" "Separator for the above keys"
DEFINE_string user_signatures "" \
"Colon-separated paths to user signatures to provide to signing server"
DEFINE_string signing_server_address "" "Hostname of the signing server"
DEFINE_integer signing_server_port "50051" "Port of the signing server"

# Parse command line
FLAGS "$@" || exit 1
Expand Down Expand Up @@ -68,16 +64,6 @@ for key in "${private_keys[@]}"; do
done
signature_sizes="${signature_sizes:1:${#signature_sizes}}"

# We don't need to maintain backwards compatibility with old `sign.sh` scripts here, so we only
# allow colon-separated values for user signature files.
IFS=":" read -a user_signatures <<< "$FLAGS_user_signatures"

user_signatures_arg=""
for user_signature in "${user_signatures[@]}"; do
user_signatures_arg="${user_signatures_arg} --signature ${user_signature}"
done
user_signatures_arg="${user_signatures_arg:1:${#user_signatures_arg}}"

delta_generator \
--signature_size ${signature_sizes} \
--in_file update \
Expand Down Expand Up @@ -137,15 +123,6 @@ signature_sizes=""
for key in "${private_keys[@]}"; do
if [[ "${key}" == pkcs11* ]]; then
sudo OPENSSL_CONF=/etc/ssl/pkcs11.cnf openssl pkeyutl -engine pkcs11 -sign -keyform engine -inkey "${key}" -in update.pkcs11-padhash -out "update.sig.${i}"
elif [[ "${key}" == fero* ]]; then
fero-client \
--address $FLAGS_signing_server_address \
--port $FLAGS_signing_server_port \
sign --pkcs1 \
--file update.hash \
--output update.sig.${i} \
--secret-key ${key:5:${#key}} \
${user_signatures_arg}
else
openssl rsautl -raw -sign -inkey ${key} -in update.padhash -out update.sig.${i}
fi
Expand Down
4 changes: 2 additions & 2 deletions sdk_container/.repo/manifests/version.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FLATCAR_VERSION=4000.0.0+nightly-20240613-2100
FLATCAR_VERSION=4000.0.0+nightly-20240613-2100-10-ga2901d9a72
FLATCAR_VERSION_ID=4000.0.0
FLATCAR_BUILD_ID="nightly-20240613-2100"
FLATCAR_BUILD_ID="nightly-20240613-2100-10-ga2901d9a72"
FLATCAR_SDK_VERSION=4000.0.0+nightly-20240613-2100
Loading

0 comments on commit fb14884

Please sign in to comment.