upgrade-apply: Make binary fully static 74/318574/3
authorAntoni <a.adaszkiewi@samsung.com>
Thu, 16 Jan 2025 14:50:40 +0000 (15:50 +0100)
committerMateusz Moscicki <m.moscicki2@samsung.com>
Wed, 19 Feb 2025 13:43:09 +0000 (14:43 +0100)
commit8f55b8ed2d320af7384f6f5cb4acb1431f2862ca
treee400500724debceb707018e7b1aaa6419d51bc5b
parentfcdd49f47a924c0eff7b9f7d9669d11b39327cfc
upgrade-apply: Make binary fully static

This change ensures that `upgrade-apply` binary provided in a delta
will run on a system with an older GLib version.

Building with this change produces following warnings:
[   12s] /usr/lib64/gcc/aarch64-tizen-linux-gnu/14.2.0/../../../../aarch64-tizen-linux-gnu/bin/ld: /lib/../lib64/libtar.a(encode.o): in function `th_set_group':
[   12s] (.text.th_set_group+0x18): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
[   12s] /usr/lib64/gcc/aarch64-tizen-linux-gnu/14.2.0/../../../../aarch64-tizen-linux-gnu/bin/ld: /lib/../lib64/libtar.a(decode.o): in function `th_get_gid':
[   12s] (.text.th_get_gid+0x58): warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
[   12s] /usr/lib64/gcc/aarch64-tizen-linux-gnu/14.2.0/../../../../aarch64-tizen-linux-gnu/bin/ld: /lib/../lib64/libtar.a(decode.o): in function `th_get_uid':
[   12s] (.text.th_get_uid+0x58): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
[   12s] /usr/lib64/gcc/aarch64-tizen-linux-gnu/14.2.0/../../../../aarch64-tizen-linux-gnu/bin/ld: /lib/../lib64/libtar.a(encode.o): in function `th_set_user':
[   12s] (.text.th_set_user+0x18): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

I have verified that this binary does not call these functions,
nor does it access libc dynamically at runtime.

Change-Id: Ib9d8834af38f57acfb7f3260bb8142197b35f819
packaging/upgrade.spec
src/upgrade-apply/CMakeLists.txt