From 7954a49709a25f229c6df067f03b12a571a73da2 Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:51:47 +0100 Subject: [PATCH] Provide missing input file. --- pkg/rpm/scriptlets-successor.toml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pkg/rpm/scriptlets-successor.toml diff --git a/pkg/rpm/scriptlets-successor.toml b/pkg/rpm/scriptlets-successor.toml new file mode 100644 index 0000000..a668e91 --- /dev/null +++ b/pkg/rpm/scriptlets-successor.toml @@ -0,0 +1,25 @@ +post_install_script = ''' +#!/bin/bash -e +FORCE= +if [ $1 -eq 2 ]; then + # Upgrade + FORCE=-f +fi +# Create symbolic link at same name as existing file installed by mytest package +ln -s ${FORCE} /usr/bin/successor /usr/bin/mytest +''' + +post_uninstall_script = ''' +#!/bin/bash -e +#RPM_SYSTEMD_MACROS# +if [ $1 -eq 0 ] ; then + # Uninstallation + # Remove symbolic links + rm -f /usr/bin/mytest +fi +''' + +# Requires new enough cargo-generate-rpm. +post_trans_script = ''' +echo TODO +''' \ No newline at end of file