build: set OS_ID_LIKE on to be OS_ID on Debian proper 65/35765/3
authorAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 24 Mar 2022 11:45:10 +0000 (11:45 +0000)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 24 Mar 2022 12:34:54 +0000 (12:34 +0000)
OS_ID_LIKE from /etc/os-release is used to determine
the type of packaging. On Debian it ends up being empty,
so the "ninja package" does not work for out of tree plugin
builds.

Solution: if OS_ID_LIKE is not set, set it to OS_ID

Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I077d4fdb509ea94b187d11391b1f49edb94c4e30
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
src/cmake/pack.cmake

index a89a90c..f4edecb 100644 (file)
@@ -64,6 +64,11 @@ macro(add_vpp_packaging)
   set(CPACK_${type}_PACKAGE_DESCRIPTION "${ARG_DESCRIPTION}")
   set(CPACK_${type}_PACKAGE_RELEASE 1)
 
+  # Pure Debian does not set the "OS_ID_LIKE", it only sets "OS_ID"
+  if (OS_ID_LIKE MATCHES "")
+    set(OS_ID_LIKE "${OS_ID}")
+  endif()
+
   if(OS_ID_LIKE MATCHES "debian")
     set(CPACK_GENERATOR "DEB")
     set(type "DEBIAN")