libpulp/macros.userspace-livepatch

34 lines
1.2 KiB
Plaintext

# Hook for %post used by livepatch packages to apply a livepatch (or multiple
# livepatches) on the system.
#
# The parameters are <package_name> <livepatch_version> <target_library>
%ulp_post_hook() \
echo "Executing ulp_post_hook(). About to execute rpm-helper..." \
/bin/bash /usr/lib/userspace-livepatch/rpm-helper install "%1" "%2" "%3" $1 \
echo "Done executing rpm-helper." \
%{nil}
# Hook for %post used by livepatch packages move the system libraries to the
# current snapshot for sle-micro.
#
# The parameters are <package_name> <livepatch_version> <files_to_copy1> ...
%ulp_post_move_libs() \
%if 0%{?suse_version} >= 1600 \
echo "Executing ulp_post_move_libs()" \
/bin/bash /usr/lib/userspace-livepatch/rpm-helper movelibs "%1" "%2" "%3" $1 \
echo "Done executing ulp_post_move_libs()" \
%endif \
%{nil}
# Hook for %postun used by livepatch packages to remove the moved system
# libraries
#
# The parameters are <package_name> <livepatch_version>
%ulp_post_remove_libs() \
%if 0%{?suse_version} >= 1600 \
echo "Executing ulp_post_remove_libs()" \
/bin/bash /usr/lib/userspace-livepatch/rpm-helper removelibs "%1" "%2" "%3" $1 \
echo "Done executing ulp_post_remove_libs()" \
%endif \
%{nil}