[Slackbuilds-users] Slackbuilds: doinst.sh and douninst.sh

Alessandro Baggi alessandro.baggi at gmail.com
Thu Jul 18 15:16:37 UTC 2024


Hi list,

I noticed that sometime a slackbuild requires to create user and group. 
In my case, postgresql.SlackBuild requires user and group creation 
before builing the software. Why don't put the user creation inside 
doinst.sh? The user/group creation seems not needed for building 
purpose. I'm missing something?



 From man removepkg(8) I read this:

"removepkg  supports  /bin/sh compatible uninstall scripts.  If the 
package shipped with an uninstall script, it will be run after the 
package is removed. If present, the uninstall script resides in the 
/var/lib/pkgtools/douninst.sh/ directory and has the same full name as 
the  package  (without  the  extension).  For  example,  a  package 
named foo-1.0-noarch-1.txz might contain an uninstall script named: 
/var/lib/pkg‐tools/douninst.sh/foo-1.0-noarch-1"

This seems an interesting feature but I see it is not generally used or 
at least I have not found a package that provides douninst.sh.

Why is it not used?

For example, removing postgresql it could be useful to remove user/group 
for postgres or other files.


Thank you in advance.

Alessandro.


More information about the SlackBuilds-users mailing list