Skip to content

asn1c: Fix TMPDIR reference in aktualizr#182

Merged
ricardosalveti merged 1 commit intouptane:masterfrom
hiagofranco:hfranco/fix-tmpdir-warn
Feb 20, 2026
Merged

asn1c: Fix TMPDIR reference in aktualizr#182
ricardosalveti merged 1 commit intouptane:masterfrom
hiagofranco:hfranco/fix-tmpdir-warn

Conversation

@hiagofranco
Copy link
Contributor

This fixes:

WARNING: aktualizr-torizon-1.0+git-r0 do_package_qa: QA Issue:

File /usr/src/debug/aktualizr-torizon/1.0+git/src/libaktualizr-posix/asn1/generated/asn1/pdu_collection.c in package aktualizr-torizon-src contains reference to TMPDIR [buildpaths]

This fixes:

	WARNING: aktualizr-torizon-1.0+git-r0 do_package_qa: QA Issue:
File /usr/src/debug/aktualizr-torizon/1.0+git/src/libaktualizr-posix/asn1/generated/asn1/pdu_collection.c
in package aktualizr-torizon-src contains reference to TMPDIR [buildpaths]
@hiagofranco
Copy link
Contributor Author

Although this mentions aktualizr-torizon, it is just the same for aktualizr. I bitbaked it first with meta-updater, where I can see the warning, and them the warning was gone when I applied this patch.

WARNING: aktualizr-1.0+git-7 do_package_qa: QA Issue: File /usr/src/debug/aktualizr/1.0+git/src/libaktualizr-posix/asn1/generated/asn1/pdu_collection.c in package aktualizr-src contains reference to TMPDIR [buildpaths]

@cajun-rat
Copy link
Collaborator

Nice. There must be something in the water. Only last week I tried this approach in Aktualizr's build definition:

diff --git a/cmake-modules/FindAsn1c.cmake b/cmake-modules/FindAsn1c.cmake
index b888be345..e2614b193 100644
--- a/cmake-modules/FindAsn1c.cmake
+++ b/cmake-modules/FindAsn1c.cmake
@@ -28,8 +28,11 @@ function(compile_asn1_lib)
     set(ASN1_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated/asn1/)
     file(MAKE_DIRECTORY ${ASN1_GEN_DIR})
     set(S)
+    set(S_DEPS)
     foreach(SA ${AKTUALIZR_ASN1_SOURCES})
-        list(APPEND S ${CMAKE_CURRENT_SOURCE_DIR}/${SA})
+        file(RELATIVE_PATH RP ${ASN1_GEN_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${SA})
+        list(APPEND S ${RP})
+        list(APPEND S_DEPS ${CMAKE_CURRENT_SOURCE_DIR}/${SA})
     endforeach()
     execute_process(COMMAND ${ASN1C} ${ASN1C_FLAGS} ${S}
         WORKING_DIRECTORY ${ASN1_GEN_DIR}
@@ -42,7 +45,7 @@ function(compile_asn1_lib)
         OUTPUT ${ASN1_GENERATED}
         COMMAND ${ASN1C} ${ASN1C_FLAGS} ${S}
         WORKING_DIRECTORY ${ASN1_GEN_DIR}
-        DEPENDS ${S}
+        DEPENDS ${S_DEPS}
         )
 
     list(REMOVE_ITEM ASN1_GENERATED ${ASN1_GEN_DIR}/converter-example.c ${ASN1_GEN_DIR}/converter-sample.c)

I prefer your approach though :)

@ricardosalveti
Copy link
Collaborator

@hiagofranco thanks, would you mind removing https://github.com/uptane/meta-updater/blob/master/recipes-sota/aktualizr/aktualizr_git.bb#L75 in a follow up pr? This piece is not needed after merging this change.

@ricardosalveti ricardosalveti merged commit 8ef3734 into uptane:master Feb 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants