From 34e40f20f4322dbc75831dde6fcaf7ebbd9ca085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=91=BD=20mgsharm?= Date: Thu, 16 May 2024 19:50:39 -0400 Subject: [PATCH] packages: add settings-pki package --- packages/settings-pki/Cargo.toml | 21 +++++++++++++ packages/settings-pki/settings-pki.spec | 39 +++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 packages/settings-pki/Cargo.toml create mode 100644 packages/settings-pki/settings-pki.spec diff --git a/packages/settings-pki/Cargo.toml b/packages/settings-pki/Cargo.toml new file mode 100644 index 00000000000..482327a8bcd --- /dev/null +++ b/packages/settings-pki/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "settings-pki" +version = "0.1.0" +edition = "2021" +publish = false +build = "../build.rs" + +[lib] +path = "../packages.rs" + +[package.metadata.build-package] +source-groups = [ + "settings-extensions/pki" +] + +# RPM BuildRequires +[build-dependencies] +glibc = { path = "../glibc" } + +# RPM Requires +[dependencies] diff --git a/packages/settings-pki/settings-pki.spec b/packages/settings-pki/settings-pki.spec new file mode 100644 index 00000000000..184465d1fcc --- /dev/null +++ b/packages/settings-pki/settings-pki.spec @@ -0,0 +1,39 @@ +%global _cross_first_party 1 +%undefine _debugsource_packages + +%global extension_name pki + +Name: %{_cross_os}settings-%{extension_name} +Version: 0.0 +Release: 0%{?dist} +Summary: settings-%{extension_name} +License: Apache-2.0 OR MIT +URL: https://github.com/bottlerocket-os/bottlerocket + +BuildRequires: %{_cross_os}glibc-devel + +%description +%{summary}. + +%prep +%setup -T -c +%cargo_prep + +%build +%cargo_build --manifest-path %{_builddir}/sources/Cargo.toml \ + -p settings-extension-%{extension_name} + +%install +install -d %{buildroot}%{_cross_libexecdir} +install -p -m 0755 \ + ${HOME}/.cache/%{__cargo_target}/release/settings-extension-%{extension_name} \ + %{buildroot}%{_cross_libexecdir} + +install -d %{buildroot}%{_cross_libexecdir}/settings +ln -sf \ + ../settings-extension-%{extension_name} \ + %{buildroot}%{_cross_libexecdir}/settings/%{extension_name} + +%files +%{_cross_libexecdir}/settings-extension-%{extension_name} +%{_cross_libexecdir}/settings/%{extension_name}