From c09497def5b12b6d114493cd527ef25e0ed540090c058e5033898fd23420977c Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 24 Nov 2021 13:40:31 +0000 Subject: [PATCH] allocator.yaml is owned by the admin OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/aws-nitro-enclaves-cli?expand=0&rev=9 --- aws-nitro-enclaves-cli.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/aws-nitro-enclaves-cli.spec b/aws-nitro-enclaves-cli.spec index 3a9d659..a298c4a 100644 --- a/aws-nitro-enclaves-cli.spec +++ b/aws-nitro-enclaves-cli.spec @@ -30,6 +30,7 @@ Source0: %name-%version.tar.xz Source1: vendor.tar.xz Source2: cargo_config Requires(pre): system-group-%ne_system_group = %version-%release +Requires(post): coreutils Requires: aws-nitro-enclaves-binaryblobs Requires: jq BuildRequires: cargo > 1.44 @@ -91,14 +92,11 @@ cp -aviLt "$_" \ bootstrap/nitro-enclaves-allocator \ bootstrap/nitro-cli-config \ %nil -mkdir -vp '%buildroot%_sysconfdir/nitro_enclaves' -cp -aviLt "$_" \ - bootstrap/allocator.yaml \ - %nil d='%buildroot%_datadir/nitro_enclaves' mkdir -vp "${d}" cp -aviLt "$_" \ + bootstrap/allocator.yaml \ vsock_proxy/configs/vsock-proxy.yaml \ %nil blobs="${d}/blobs" @@ -141,11 +139,17 @@ cp -aviLt "$_" "${suc}" %pre -n system-group-%ne_system_group -f system-group-%ne_system_group.pre %service_add_pre nitro-enclaves-allocator.service nitro-enclaves-vsock-proxy.service %post -%tmpfiles_create %_tmpfilesdir/%name.conf +if test "$1" -eq 1 +then + mkdir -vpm 0755 '%_sysconfdir/nitro_enclaves' + cp -aviLt '%_sysconfdir/nitro_enclaves' \ + %_datadir/nitro_enclaves/allocator.yaml +fi ld='/var/log/nitro_enclaves' mkdir -vp "${ld}" chmod -v 0770 "${ld}" chown -v '0:%ne_system_group' "${ld}" +%tmpfiles_create %_tmpfilesdir/%name.conf %udev_rules_update %service_add_post nitro-enclaves-allocator.service nitro-enclaves-vsock-proxy.service %preun @@ -160,8 +164,8 @@ chown -v '0:%ne_system_group' "${ld}" %license THIRD_PARTY_LICENSES %license THIRD_PARTY_LICENSES*.html %dir %_datadir/nitro_enclaves -%config(noreplace) %_sysconfdir/nitro_enclaves %_bindir/* +%_datadir/nitro_enclaves/allocator.yaml %_datadir/nitro_enclaves/vsock-proxy.yaml %_tmpfilesdir/%name.conf %_udevrulesdir/%name.conf