wok-current rev 8646
Fixed postgresqlclient post_remove. Its also using .files-list files directly now. So sources will not take up space on tank.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Tue Feb 15 19:34:52 2011 +0000 (2011-02-15) |
parents | 6d8cff5d29ea |
children | b3aca2070330 |
files | libpostgresqlclient/receipt postgresql-client/receipt postgresql/receipt |
line diff
1.1 --- a/libpostgresqlclient/receipt Tue Feb 15 18:03:31 2011 +0000 1.2 +++ b/libpostgresqlclient/receipt Tue Feb 15 19:34:52 2011 +0000 1.3 @@ -15,7 +15,7 @@ 1.4 dir=$(dirname $file) 1.5 [ -d $fs$dir ] || mkdir -p $fs$dir 1.6 cp -a $_pkg$file $fs$file 1.7 - done < $src/$PACKAGE.files-list 1.8 + done < $WOK/$WANTED/stuff/$PACKAGE.files-list 1.9 strip -s $fs/usr/lib/postgresql/*.so* 1.10 ln -s /usr/lib/postgresql/libpq.so.5 $fs/usr/lib/libpq.so.5 1.11 }
2.1 --- a/postgresql-client/receipt Tue Feb 15 18:03:31 2011 +0000 2.2 +++ b/postgresql-client/receipt Tue Feb 15 19:34:52 2011 +0000 2.3 @@ -17,6 +17,6 @@ 2.4 dir=$(dirname $file) 2.5 [ -d $fs$dir ] || mkdir -p $fs$dir 2.6 cp -a $_pkg$file $fs$file 2.7 - done < $src/$PACKAGE.files-list 2.8 + done < $WOK/$WANTED/stuff/$PACKAGE.files-list 2.9 } 2.10
3.1 --- a/postgresql/receipt Tue Feb 15 18:03:31 2011 +0000 3.2 +++ b/postgresql/receipt Tue Feb 15 19:34:52 2011 +0000 3.3 @@ -43,27 +43,29 @@ 3.4 cp -a stuff/etc $fs 3.5 ln -s /var/lib/pgsql/postgresql.conf $fs/etc 3.6 chmod 700 $fs/var/lib/pgsql 3.7 - cat $src/*.files-list | while read file; do 3.8 + cat $WOK/$PACKAGE/stuff/*.files-list | while read file; do 3.9 [ -f $fs$file ] && rm -f $fs$file 3.10 done 3.11 + 3.12 } 3.13 3.14 # Pre and post install commands for Tazpkg. 3.15 post_install() 3.16 { 3.17 # adduser postgres if needed 3.18 - if ! grep -q postgres $1/etc/passwd; then 3.19 + if ! grep -q postgres: $1/etc/passwd; then 3.20 echo -n "Adding user postgres..." 3.21 chroot $1/ adduser postgres -D -H -u 88 -h /var/lib/pgsql 3.22 - rm -f /var/lib/pgsql/.* /var/lib/pgsql/* 3.23 + #[ -d $1/var/lib/pgsql ] && rm -f $1/var/lib/pgsql/.* $1/var/lib/pgsql/* 3.24 status 3.25 fi 3.26 # addgroup postgres if needed 3.27 - if ! grep -q postgres $1/etc/group; then 3.28 + if ! grep -q postgres: $1/etc/group; then 3.29 echo -n "Adding group postgres..." 3.30 - chroot $1/ sh -c 'addgroup -g 88 postgres && addgroup postgres postgres' 3.31 + chroot $1/ sh -c 'addgroup -g 88 postgres' 3.32 status 3.33 fi 3.34 + [ ! -d $1/var/lib/pgsql ] && mkdir -p $1/var/lib/pgsql 3.35 chroot $1/ chown -R postgres.postgres /var/lib/pgsql /var/log/postgresql 3.36 cat <<EOF 3.37 ---- 3.38 @@ -80,6 +82,7 @@ 3.39 3.40 post_remove() 3.41 { 3.42 + # when both user and group have the same id# and name 3.43 + # both group and user will get removed with either delusr/delgroup 3.44 chroot $1/ deluser postgres 3.45 - chroot $1/ delgroup postgres 3.46 }