From ced29b7da110c4698c2065dc38da2cb6243104a1 Mon Sep 17 00:00:00 2001 From: Angelo Failla Date: Sat, 13 Jan 2024 09:04:57 -0800 Subject: [PATCH] [antlir2] extend fbpkg_install feature with canonical_uuid and organize_alias options Summary: See discussion with vmagro in [workplace](https://fb.workplace.com/groups/metalos.dev/posts/24499260009720465). Here I am adding two new options: * `canonical_uuid`: if true instead of using compressed UUID (first 7 digits) we use the canonical UUID * `organized_alias`: I found out that this option was implemented but not exposed and it is one thing I need :) Test Plan: This has been tested in the diff above this but here is a paste bin of a buck run using the diff above: ``` bash-5.1# ls -lh /etc/packages/* /etc/packages/neteng-ai-te_agent: total 12K lrwxrwxrwx 1 root root 32 Jan 12 06:53 LAST -> e74e737643c674aaa65a8b7afd9a05ba lrwxrwxrwx 1 root root 37 Jan 12 06:53 current -> /etc/packages/neteng-ai-te_agent/prod drwxr-xr-x 1 root root 60 Jan 12 06:53 e74e737643c674aaa65a8b7afd9a05ba lrwxrwxrwx 1 root root 32 Jan 12 06:53 prod -> e74e737643c674aaa65a8b7afd9a05ba /etc/packages/neteng-fboss-bgpd: total 12K drwxr-xr-x 1 root root 78 Jan 12 06:52 074a1fcbc1ef393372492d8f6d97ba9e lrwxrwxrwx 1 root root 32 Jan 12 06:52 LAST -> 074a1fcbc1ef393372492d8f6d97ba9e lrwxrwxrwx 1 root root 36 Jan 12 06:53 current -> /etc/packages/neteng-fboss-bgpd/prod lrwxrwxrwx 1 root root 32 Jan 12 06:52 prod -> 074a1fcbc1ef393372492d8f6d97ba9e /etc/packages/neteng-fboss-fsdb: total 12K drwxr-xr-x 1 root root 32 Jan 12 06:53 94462b2ca4d3371d0e9806ab3a423597 lrwxrwxrwx 1 root root 32 Jan 12 06:53 LAST -> 94462b2ca4d3371d0e9806ab3a423597 lrwxrwxrwx 1 root root 36 Jan 12 06:53 current -> /etc/packages/neteng-fboss-fsdb/prod lrwxrwxrwx 1 root root 32 Jan 12 06:53 prod -> 94462b2ca4d3371d0e9806ab3a423597 /etc/packages/neteng-fboss-mka_service: total 12K drwxr-xr-x 1 root root 86 Jan 12 06:53 78496b76e3e3eab14918e364abb0039d lrwxrwxrwx 1 root root 32 Jan 12 06:53 LAST -> 78496b76e3e3eab14918e364abb0039d lrwxrwxrwx 1 root root 43 Jan 12 06:53 current -> /etc/packages/neteng-fboss-mka_service/prod lrwxrwxrwx 1 root root 32 Jan 12 06:53 prod -> 78496b76e3e3eab14918e364abb0039d /etc/packages/neteng-fboss-qsfp_service: total 12K drwxr-xr-x 1 root root 178 Jan 12 06:53 6642dbb5175fe7dd8ac9891b0ef3b89f lrwxrwxrwx 1 root root 32 Jan 12 06:53 LAST -> 6642dbb5175fe7dd8ac9891b0ef3b89f lrwxrwxrwx 1 root root 44 Jan 12 06:53 current -> /etc/packages/neteng-fboss-qsfp_service/prod lrwxrwxrwx 1 root root 32 Jan 12 06:53 prod -> 6642dbb5175fe7dd8ac9891b0ef3b89f /etc/packages/neteng-fboss-wedge_agent: total 12K lrwxrwxrwx 1 root root 32 Jan 12 06:52 LAST -> e1436044932274bfdce494e97f13f382 lrwxrwxrwx 1 root root 43 Jan 12 06:53 current -> /etc/packages/neteng-fboss-wedge_agent/prod drwxr-xr-x 1 root root 390 Jan 12 06:52 e1436044932274bfdce494e97f13f382 lrwxrwxrwx 1 root root 32 Jan 12 06:52 prod -> e1436044932274bfdce494e97f13f382 /etc/packages/openr: total 12K drwxr-xr-x 1 root root 148 Jan 12 06:52 474c608296856a97da81f06cde6554b4 lrwxrwxrwx 1 root root 32 Jan 12 06:52 LAST -> 474c608296856a97da81f06cde6554b4 lrwxrwxrwx 1 root root 24 Jan 12 06:53 current -> /etc/packages/openr/prod lrwxrwxrwx 1 root root 32 Jan 12 06:52 prod -> 474c608296856a97da81f06cde6554b4 ``` Reviewed By: vmagro Differential Revision: D52733725 fbshipit-source-id: e42c9c86e158a798244cbf3da9be93e79140d07c --- antlir/antlir2/antlir2_compile/src/plan.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/antlir/antlir2/antlir2_compile/src/plan.rs b/antlir/antlir2/antlir2_compile/src/plan.rs index 54f52e506..961cde2fb 100644 --- a/antlir/antlir2/antlir2_compile/src/plan.rs +++ b/antlir/antlir2/antlir2_compile/src/plan.rs @@ -113,6 +113,7 @@ pub struct InstallFbpkg { pub dst: Option, pub organize: bool, pub organize_alias: Option, + pub canonical_uuid: bool, } #[derive(Debug, Clone, Deserialize, Serialize)]