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

Johannes Schöpfer johannes at schoepfer.info
Fri Jul 19 05:37:44 UTC 2024



Am 19. Juli 2024 02:38:17 MESZ schrieb Willy Sudiarto Raharjo <willysr at slackbuilds.org>:
>> 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?
>
>if you notice on postgresql.SlackBuild, we have this commands:
>
>mkdir -p $PKG/var/lib/pgsql/$PG_VERSION/data
>chown -R postgres:postgres $PKG/var/lib/pgsql
>
>without having postgres user and group, this would fail and the files/directories will not have correct permission for the application
>
>

This could bei solved using uid/gid directly:
chown -R 209:209 

This would also work in doinst.sh


If this package ist build once, and then is installed on various other boxes, it's the same outcome.
manual user/group creation is then needed which is covered by the readme.

It seems postgresql does not actually need a special user to be build.
And if it would, the makefile could bei adjusted.

Johannes 







More information about the SlackBuilds-users mailing list