Skip to content

Commit

Permalink
Create and clear manifest files
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jul 17, 2022
1 parent ea71921 commit 7f8fedd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions makerpm.pl
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
printf "\\n"
if [ "\\\$answer" = "y" ]; then
echo "Removing Usermin RPM .."
rm -f /usr/libexec/usermin/authentic-theme/manifest-*
rpm -e --nodeps usermin
systemctlcmd=\\\`which systemctl 2>/dev/null\\\`
if [ -x "\\\$systemctlcmd" ]; then
Expand Down Expand Up @@ -233,6 +234,7 @@
# RPM is being removed, and no new version of usermin
# has taken it's place. Stop the server
/etc/usermin/stop >/dev/null 2>&1 </dev/null
rm -f /usr/libexec/usermin/authentic-theme/manifest-*
fi
fi
/bin/true
Expand Down
5 changes: 5 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,11 @@ else
rm -f $config_dir/install-dir
fi

# Create manifest link for Authentic
if [ -r "$wadir/authentic-theme/postinstall-usermin.pl" ]; then
(cd "$wadir" ; WEBMIN_CONFIG="$config_dir" WEBMIN_VAR="$var_dir" PERLLIB="$wadir" LANG= "$wadir/authentic-theme/postinstall-usermin.pl") >/dev/null 2>&1 </dev/null
fi

# Run package-defined post-install script
if [ -r "$srcdir/setup-post.sh" ]; then
. "$srcdir/setup-post.sh"
Expand Down

4 comments on commit 7f8fedd

@iliajie
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we don't have postinstall and uninstall run in Usermin, we need to create and clear links too.

Does it look good to you?

@jcameron
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these /usr/libexec/usermin/authentic-theme/manifest-* files dynamically generated by the theme? If so, this seems reasonable..

@iliajie
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are generated in postinstall.pl which only runs in Webmin but not in Usermin. We also need it for Usermin too. But I still testing it to make sure it's always done as expected.

@jcameron
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sounds good

Please sign in to comment.