Skip to content

Commit 411d648

Browse files
Add update-ssh-keys 0.3.0 to core repo in azure linux (#15913)
Co-authored-by: Sandeep Karambelkar <sandeep.karambelkar@gmail.com> Co-authored-by: Sandeep Karambelkar <skarambelkar@microsoft.com>
1 parent 2dc0b4f commit 411d648

File tree

5 files changed

+104
-2
lines changed

5 files changed

+104
-2
lines changed

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,8 @@
31743174
"bootengine",
31753175
"coreos-cloudinit",
31763176
"coreos-init",
3177-
"python-nocaselist"
3177+
"python-nocaselist",
3178+
"update-ssh-keys"
31783179
]
31793180
},
31803181
"Sysbench source": {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Signatures": {
3+
"update-ssh-keys-0.3.0-be3ce2a.tar.gz": "70a39289dfb4962ff1ede2a12e51f4c7fbeafb36edf7f4ec1182731d2e5844a8",
4+
"update-ssh-keys-0.3.0-vendor.tar.gz": "dfeb707b2e0bd52086429d2c3255d498ebcac4124dbc71e58096a9593b5fca60"
5+
}
6+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
%global crate update-ssh-keys
2+
%global commit be3ce2acc50313a6826c578e9dbb67e17085d60d
3+
%global shortcommit %(echo %{commit} | cut -c1-7)
4+
5+
# Below is a manually created tarball containing vendored Rust dependencies.
6+
# The vendored crates are needed because network access is disabled during build time.
7+
#
8+
# How to recreate this vendor tarball:
9+
# 1. Download the update-ssh-keys source tarball
10+
# 2. Extract it: tar xzf update-ssh-keys-X.Y.Z.tar.gz && cd update-ssh-keys-X.Y.Z
11+
# 3. Generate vendor directory: cargo vendor > /dev/null
12+
# 4. Create the vendor tarball: tar czf ../update-ssh-keys-X.Y.Z-vendor.tar.gz vendor/
13+
#
14+
# Note: The vendor tarball should be uploaded to the GitHub releases page or stored
15+
# in the package's source location (using the format update-ssh-keys-VERSION-vendor.tar.gz)
16+
17+
Name: update-ssh-keys
18+
Version: 0.3.0
19+
Release: 1%{?dist}
20+
Summary: Utility for managing OpenSSH authorized public keys
21+
22+
License: Apache-2.0
23+
URL: https://github.com/flatcar/update-ssh-keys
24+
Vendor: Microsoft Corporation
25+
Distribution: Azure Linux
26+
Group: System Environment/Base
27+
Source0: https://github.com/flatcar/update-ssh-keys/archive/%{commit}.tar.gz#/%{name}-%{version}-%{shortcommit}.tar.gz
28+
SOURCE1: update-ssh-keys-0.3.0-vendor.tar.gz
29+
BuildRequires: cargo
30+
BuildRequires: rust >= 1.60
31+
32+
# make sure we have a new enough coreos-init that we won't conflict with the
33+
# old bash script
34+
Requires: coreos-init
35+
36+
%ifarch x86_64
37+
%define rust_def_target x86_64-unknown-linux-gnu
38+
%endif
39+
%ifarch aarch64
40+
%define rust_def_target aarch64-unknown-linux-gnu
41+
%endif
42+
43+
%description
44+
update-ssh-keys is a command line tool and library for managing OpenSSH
45+
authorized public keys. It keeps track of sets of keys with names, allows
46+
for adding additional keys, as well as deleting and disabling them.
47+
48+
The tool is commonly used on Container Linux and Flatcar to manage SSH
49+
access in cloud environments. It can integrate with cloud-config and other
50+
provisioning systems to maintain authorized_keys files.
51+
52+
%prep
53+
%autosetup -n update-ssh-keys-be3ce2acc50313a6826c578e9dbb67e17085d60d -a1
54+
55+
# Extract vendored crates
56+
tar xf %{SOURCE1}
57+
mkdir -p .cargo
58+
59+
cat >.cargo/config << EOF
60+
[source.crates-io]
61+
replace-with = "vendored-sources"
62+
63+
[source.vendored-sources]
64+
directory = "vendor"
65+
EOF
66+
67+
%build
68+
cargo build --release --target=%{rust_def_target} --offline
69+
70+
%install
71+
mkdir -p %{buildroot}%{_bindir}
72+
install -m 755 ./target/%{rust_def_target}/release/%{crate} %{buildroot}%{_bindir}/%{crate}
73+
74+
%check
75+
cargo test --offline
76+
77+
%files
78+
%license LICENSE
79+
%doc README.md
80+
%{_bindir}/%{crate}
81+
82+
%changelog
83+
* Wed Feb 19 2026 Akarsh Chaudhary <v-akarshc@microsoft.com> - 0.3.0-1
84+
- Initial Azure Linux import from the source project (license: same as "License" tag).
85+
- License verified

cgmanifest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29861,6 +29861,16 @@
2986129861
}
2986229862
}
2986329863
},
29864+
{
29865+
"component": {
29866+
"type": "other",
29867+
"other": {
29868+
"name": "update-ssh-keys",
29869+
"version": "0.3.0",
29870+
"downloadUrl": "https://github.com/flatcar/update-ssh-keys/archive/be3ce2acc50313a6826c578e9dbb67e17085d60d.tar.gz"
29871+
}
29872+
}
29873+
},
2986429874
{
2986529875
"component": {
2986629876
"type": "other",

0 commit comments

Comments
 (0)