Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed user deletion issue in rpm postuninstall scriptlet. #272

Merged
merged 3 commits into from
Jun 14, 2014

Conversation

spigene
Copy link
Contributor

@spigene spigene commented Jun 14, 2014

Default rpm postuninstall scriptlet unconditionally deletes user / group.
This is a problem when someone tries to upgrade a package in one step (using rpm -U package-name).
Currently this ends up with upgraded package artifacts and removed package user.

The fix adds a check which tests number of packages which will be left in the system after the action completes:
http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Syntax

@lightbend-cla-validator

Hi @ei82,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement:

http://typesafe.com/contribute/cla

@@ -1,12 +1,16 @@
# Removing system user/group : ${{daemon_user}} and ${{daemon_group}}
echo "Try deleting system user and group [${{daemon_user}}:${{daemon_group}}]"
if getent passwd | grep -q "^${{daemon_user}}:";
if [[ $1 == 0 ]]
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for figuring that out! Can you place a comment there and maybe with the link?
Something like $1 == 1 is upgrade and $1 == 0 is uninstall

@muuki88
Copy link
Contributor

muuki88 commented Jun 14, 2014

LGTM. Thanks for linking the fedora syntax page. One little comment and the CLA that this should be good to merge

@spigene
Copy link
Contributor Author

spigene commented Jun 14, 2014

Done.

muuki88 added a commit that referenced this pull request Jun 14, 2014
Fixed user deletion issue in rpm postuninstall scriptlet.
@muuki88 muuki88 merged commit 46b9876 into sbt:master Jun 14, 2014
@muuki88
Copy link
Contributor

muuki88 commented Jun 14, 2014

Thanks again for your contribution :)

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.

3 participants