Bug 1010430 - python-carbon deletes user-created data on uninstall; shouldn't per packaging guidelines
Summary: python-carbon deletes user-created data on uninstall; shouldn't per packaging...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-carbon
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Steffan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-20 18:50 UTC by James Juran
Modified: 2013-10-18 20:01 UTC (History)
1 user (show)

Fixed In Version: python-carbon-0.9.12-2.fc19
Clone Of:
Environment:
Last Closed: 2013-10-02 06:53:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description James Juran 2013-09-20 18:50:16 UTC
Description of problem:

python-carbon deletes data files on uninstallation

Version-Release number of selected component (if applicable):

0.9.12-1

How reproducible:

Always

Steps to Reproduce:
1. Collect data into /var/lib/carbon/whisper
2. rpm -e python-carbon
3. Notice /var/lib/carbon/whisper is gone and data has been deleted

Actual results:

User-created data deleted

Expected results:

User-created data still available after package deletion

Additional info:

Fedora Packaging Guidelines for Users and Groups (http://fedoraproject.org/wiki/Packaging:UsersAndGroups#Allocation_Strategies) says users and groups should not be deleted, and implies that user-created files should not be deleted either.

I discovered this because I had built a locally-modified package with a different name and a Conflicts: python-carbon. I did this to avoid having my build overwritten if an EPEL update was released in the future. I was surprised when I removed python-carbon, intending to replace it with My-python-carbon, and all my data disappeared. I know not everyone would be surprised by that, which is why I checked to see what the packaging guidelines say.

I believe the fix is to simply remove the %postun scriptlet:

diff --git a/python-carbon.spec b/python-carbon.spec
index 69dfbec..f04bae3 100644
--- a/python-carbon.spec
+++ b/python-carbon.spec
@@ -95,13 +95,6 @@ fi
 /sbin/chkconfig --add carbon-aggregator
 
 
-%postun
-if [ $1 = 0 ]; then
-  getent passwd carbon >/dev/null && \
-      userdel -r carbon 2>/dev/null
-fi
-
-
 %files
 %doc LICENSE conf/*
 %dir %{_sysconfdir}/carbon

Comment 1 Fedora Update System 2013-09-24 16:48:15 UTC
python-carbon-0.9.12-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-2.fc20

Comment 2 Fedora Update System 2013-09-24 16:48:33 UTC
python-carbon-0.9.12-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-2.el5

Comment 3 Fedora Update System 2013-09-24 16:48:49 UTC
python-carbon-0.9.12-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-2.fc19

Comment 4 Fedora Update System 2013-09-24 16:49:11 UTC
python-carbon-0.9.12-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-2.fc18

Comment 5 Fedora Update System 2013-09-24 16:49:25 UTC
python-carbon-0.9.12-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-2.el6

Comment 6 Fedora Update System 2013-09-25 17:18:27 UTC
Package python-carbon-0.9.12-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing python-carbon-0.9.12-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-11685/python-carbon-0.9.12-2.el6
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-10-02 06:53:39 UTC
python-carbon-0.9.12-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2013-10-17 18:02:40 UTC
python-carbon-0.9.12-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-10-17 18:07:02 UTC
python-carbon-0.9.12-2.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-10-18 19:57:20 UTC
python-carbon-0.9.12-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2013-10-18 20:01:09 UTC
python-carbon-0.9.12-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.