[Erp5-dev] ERP5's deb package does not rebuild /home/erp5 in case of total removal of /home/erp5

Tadeus Prastowo tadeus.prastowo at infi-nity.com
Thu Sep 17 07:22:43 CEST 2009


Hi Ho!

On Wed, 2009-09-16 at 21:53 +0400, Boris Kocherov wrote:
> On 09/16/09 17:19, Tadeus Prastowo wrote:
> > Hi Ho!
> > 
> > I upgraded my Hardy to Jaunty using Update Manager. In my Hardy, I had
> > got ERP5 installation that I hadn't used because of the already-fixed
> > problem mentioned in
> > http://mail.nexedi.com/pipermail/erp5-dev/2009-September/002292.html
> > 
> > After the upgrade, I purged ERP5 from my system and deleted /home/erp5
> > to start everything from scratch. My erp5.list in
> 
> Removing user's home folder without removing user - bad workflow ( change
> user's home folder needs too - see /etc/passwd ).

Yes, it is a bad workflow. I assumed that purging ERP5 had taken care of
removing erp5 user and group leaving the home folder intact. But, I am
pretty much mistaken ;-)

> If you want install erp5 from scratch, you can run:
> sudo rm -r /home/erp5/erp5-buildout

Good idea :-)

But, this doesn't dispel that some users may end up thinking that
purging ERP5 has taken care of removing the user and group.

[snip]

> > After some investigation, I realized that "/home/erp5" is created by
> > "adduser". Since "sudo aptitude purge erp5-buildout" does not remove
> > erp5 user and group in "debian/postrm" script, it prevents "adduser"
> > from running in "debian/postinst" script, and therefore, no creation of
> > "/home/erp5".
> I agree, first part  issue:
> "sudo aptitude purge erp5-buildout" does not remove erp5 user and 
> group in "debian/postrm" script.
> But, i do not sure what distribuion upgrade save my
> /home/erp5/erp5-buildout/var (with gigabytes essential information )
> in that case.

I think this kind of case also occurs for DB applications such as
PostgreSQL. ERP5's "debian/postrm" script can be modeled after that of
PostgreSQL.

> Second part not to be issue: no creation of "/home/erp5".

It is an issue for users who thought that purging ERP5 takes care of
removing the user and group. How about if we just put a notification at
the end of purging ERP5 with ncurses interface like what some other
packages do (e.g., dbcommon) to save such users?

> I explain: If system contain user and his home folder !='/nonexistent',
> then folder whould be exist.

[snip]

> > --- postrm	2009-09-16 17:07:23.000000000 +0700
> > +++ debian/postrm	2009-09-16 17:09:38.000000000 +0700
> > @@ -21,12 +21,12 @@
> >  case "$1" in
> >      purge)
> >          # remove zope user and group.
> > -        #    if getent passwd $erp5user > /dev/null 2>&1 ; then
> > -        #        userdel $erp5user
> > -        #    fi
> > -        #    if getent group $erp5group > /dev/null 2>&1 ; then
> > -        #        groupdel $erp5group
> > -        #    fi
> > +           if getent passwd $erp5user > /dev/null 2>&1 ; then
> > +               userdel $erp5user
> I aggree, but one note:
> userdel --remove $erp5user 
> for me seems better.

Does that mean that actually no user data is stored under /home/erp5
(i.e., all data is stored in the MySQL DB)?

If yes, that's the best move.

[snip]

> Mercurial have very comfortable feature 'patchbomb' described on this page:
> http://mercurial.selenic.com/wiki/PatchbombExtension

Thank you for pointing this one out since I didn't know that before :-)

The mail for the revised patch will follow taking into account that all
user data is stored in MySQL DB instead of under /home/erp5.

-- 
Best regards,
Eus (Free Software specialist & developer of PT. Vikasa Infinity Anugerah)




More information about the Erp5-dev mailing list