diff options
author | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
commit | 2648e999d277eac5c3d331a3609bcc73fafbea71 (patch) | |
tree | 40951fb8e7fdbe28a0baa324ae615055203f1e2e /abs/extra/postgresql | |
parent | c759b5e0c4aa6fc37412b4dee2cf9ad993fd376d (diff) | |
parent | 7e6f7ca174e1af67178dc5293a312a4a733eb095 (diff) | |
download | linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.zip linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.gz linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.bz2 |
Merge branch 'testing'
# By James Meyer (1091) and others
# Via James Meyer (5) and others
* testing: (1148 commits)
LinHES-config: during install don't kill off lirc. This keeps the remote active all the way to the finish
Change version numbers to 8.0 to match the release number. LinHES-conifg LinHES-system mythdb-initial runit-scripts supplemental-web
LinHES-conifig: mv_install.py for the last partition don't go all the way to the end. Gotta leave room for gpt tables.
xf86-video-ati: xorg ati driver.
LinHES-config: timezip.py add syncing up of parental lvl passwords and starting level with MBE.
LinHES-system: correct the logic for breaking out of the wmctrl loop. As written it would break out of the inner loop..but not the 60 iteration loop.
e16_theme_settings: remove slide-in prop for new windows. For whatever reason this was preventing mplayer from being positioned correctly for appletrailers.
LinHES-config, mythinstall: change case of hd_pvr and serial to all lower refs #902
zilog-firmware: firmware for TX support of the hdpvr and pvr-150 In general I can't recommend anybody using these transmitters but including the firmware just in case someone really wants to
linhes-udev-rules: added hdprv_lirc rule. All of these lirc rules are limited to exactly one device. If more then one device is present then only the last device in init will get the symlink
runit-scripts: fix logging for igdeamon, add support to remote init script so that the blaster is always the first device in the chain. added support specificly for hd_pvr
LinHES-system: add lh_system_restore and lh_system_backup. These scripts are called from the mythmenu. refs #900
iguanair: rebuild with python 2.7
LinHES-system: msg_daemon.py fix init and nasty bug related to timeout. In a nutshell timeout wouldn't work unless a msg without a timeout was called first.
linhes-udev-rules: add rules for mce,streamzap,serial lirc devices.
mythinstall: recompile for matching libs
mythtv: latest .25-fixes and change mythbackup/restore call lh_system_$op to replace mythbackup/mythrestore. mythbackup no longer works correctly with the new windowmanager
linhes-scripts: myth2mp3, myth2x264, myth2xvid: use mythutil to get cutlist
LinHES-config, supplimental-web: Fix proxy numbering for Ceton infiniTV
linhes-system: add additional stuff to the system backup and also introduced an exclude file. The exclude/include files are locate in /home/mythtv/backup_config/
...
Diffstat (limited to 'abs/extra/postgresql')
-rw-r--r-- | abs/extra/postgresql/PKGBUILD | 112 | ||||
-rw-r--r-- | abs/extra/postgresql/build.patch | 11 | ||||
-rwxr-xr-x | abs/extra/postgresql/postgresql | 59 | ||||
-rw-r--r-- | abs/extra/postgresql/postgresql.confd | 16 | ||||
-rw-r--r-- | abs/extra/postgresql/postgresql.install | 26 | ||||
-rw-r--r-- | abs/extra/postgresql/postgresql.logrotate | 4 | ||||
-rwxr-xr-x | abs/extra/postgresql/postgresql.rcd | 79 |
7 files changed, 177 insertions, 130 deletions
diff --git a/abs/extra/postgresql/PKGBUILD b/abs/extra/postgresql/PKGBUILD index 2bbda86..a00160c 100644 --- a/abs/extra/postgresql/PKGBUILD +++ b/abs/extra/postgresql/PKGBUILD @@ -1,60 +1,56 @@ -# $Id: PKGBUILD 98184 2010-11-04 14:55:39Z dan $ -# Maintainer: Douglas Soares de Andrade <douglas@archlinux.org> +# $Id: PKGBUILD 160730 2012-06-04 17:58:05Z dan $ +# Maintainer: Dan McGee <dan@archlinux.org> pkgbase=postgresql pkgname=('postgresql-libs' 'postgresql-docs' 'postgresql') -pkgver=9.0.1 -pkgrel=3 +pkgver=9.1.4 +_majorver=${pkgver%.*} +pkgrel=1 arch=('i686' 'x86_64') -url="http://www.postgresql.org" -license=('BSD') -makedepends=('libxml2' 'python2' 'perl') -source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2 \ - postgresql postgresql.confd build.patch postgresql.pam postgresql.logrotate) +url="http://www.postgresql.org/" +license=('custom:PostgreSQL') +makedepends=('krb5' 'libxml2' 'python2' 'perl' 'tcl' 'openssl>=1.0.0') +source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2 + postgresql.rcd postgresql.confd postgresql.pam postgresql.logrotate) build() { - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "${srcdir}/postgresql-${pkgver}" + + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --datadir=/usr/share/postgresql \ + --with-krb5 \ + --with-libxml \ + --with-openssl \ + --with-perl \ + --with-python PYTHON=/usr/bin/python2 \ + --with-tcl \ + --with-pam \ + --with-system-tzdata=/usr/share/zoneinfo \ + --enable-nls \ + --enable-thread-safety - # patch to remove regress/test make target (won't build with it present) - patch -Np1 -i ../build.patch - - # configure - ./configure --prefix=/usr --mandir=/usr/share/man --with-libxml \ - --with-openssl --with-perl \ - --with-python PYTHON=/usr/bin/python2 --with-pam \ - --with-system-tzdata=/usr/share/zoneinfo --enable-nls \ - --datadir=/usr/share/postgresql --enable-thread-safety - - sed -i -e '/interfaces/d' src/Makefile - - # build make world - - # build libs - for dir in src/interfaces src/bin/pg_config; do - pushd ${dir} - make - popd - done } package_postgresql-libs() { pkgdesc="Libraries for use with PostgreSQL" - depends=('openssl>=1.0.0') + depends=('krb5' 'openssl>=1.0.0' 'readline>=6.0') + provides=('postgresql-client') + conflicts=('postgresql-client') - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "${srcdir}/postgresql-${pkgver}" # install license - install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/postgresql-libs/LICENSE" # install libs - for dir in src/interfaces src/bin/pg_config; do - pushd ${dir} - make DESTDIR="${pkgdir}" install - popd + for dir in src/interfaces src/bin/pg_config src/bin/psql; do + make -C ${dir} DESTDIR="${pkgdir}" install done install -D -m644 doc/src/sgml/man1/pg_config.1 "${pkgdir}/usr/share/man/man1/pg_config.1" + install -D -m644 doc/src/sgml/man1/psql.1 "${pkgdir}/usr/share/man/man1/psql.1" cd src/include @@ -78,33 +74,42 @@ package_postgresql-docs() { pkgdesc="HTML documentation for PostgreSQL" options=(docs) - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "${srcdir}/postgresql-${pkgver}" # install license - install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/postgresql-docs/LICENSE" make -C doc/src/sgml DESTDIR="${pkgdir}" install-html chown -R root:root "${pkgdir}/usr/share/doc/postgresql/html/" + + # clean up + rmdir "${pkgdir}"/usr/share/man/man{1,3,7} + rmdir "${pkgdir}"/usr/share/man } package_postgresql() { pkgdesc="A sophisticated object-relational DBMS" backup=('etc/conf.d/postgresql' 'etc/pam.d/postgresql' 'etc/logrotate.d/postgresql') - depends=("postgresql-libs>=${pkgver}" 'libxml2' 'readline>=6.0') + depends=("postgresql-libs>=${pkgver}" 'krb5' 'libxml2' 'readline>=6.0' 'openssl>=1.0.0') optdepends=('python2: for PL/Python support' - 'perl: for PL/Perl support') - provides=('postgresql-client') - conflicts=('postgresql-client') + 'perl: for PL/Perl support' + 'tcl: for PL/Tcl support' + 'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade') + install=postgresql.install - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "${srcdir}/postgresql-${pkgver}" # install make DESTDIR="${pkgdir}" install make -C contrib DESTDIR="${pkgdir}" install make -C doc/src/sgml DESTDIR="${pkgdir}" install-man - # we don't want this, it is in the -libs package - make -C src/bin/pg_config DESTDIR="${pkgdir}" uninstall + + # we don't want these, they are in the -libs package + for dir in src/interfaces src/bin/pg_config src/bin/psql; do + make -C ${dir} DESTDIR="${pkgdir}" uninstall + done rm "${pkgdir}/usr/share/man/man1/pg_config.1" + rm "${pkgdir}/usr/share/man/man1/psql.1" # install license install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgbase}/LICENSE" @@ -113,9 +118,10 @@ package_postgresql() { rm -rf "${pkgdir}/usr/include/postgresql/internal" rm -rf "${pkgdir}/usr/include/libpq" find "${pkgdir}/usr/include" -maxdepth 1 -type f -execdir rm {} + + rmdir "${pkgdir}/usr/share/doc/postgresql/html" # install launch script - install -D -m755 "${srcdir}/postgresql" "${pkgdir}/etc/rc.d/postgresql" + install -D -m755 "${srcdir}/postgresql.rcd" "${pkgdir}/etc/rc.d/postgresql" # install conf file install -D -m644 ${srcdir}/postgresql.confd \ @@ -128,9 +134,13 @@ package_postgresql() { "${pkgdir}/etc/logrotate.d/postgresql" } -md5sums=('57ba57e43cfe29e16dacbf5789be98d1' - '4153ac0ef4a77e709385b0a13e1c0fad' - 'd63a05943cf0a2726aa2070f3033c569' - '4d74f4227dc5e12bf95b3490758d86c9' +md5sums=('a8035688dba988b782725ac1aec60186' + '1ddd1df8010549f237e7983bb326025e' + 'a54d09a20ab1672adf08f037df188d53' '96f82c38f3f540b53f3e5144900acf17' 'd28e443f9f65a5712c52018b84e27137') +sha256sums=('a0795a8eb3ae2d1a2914b63bf143d20182835d90699915ff43567c041d3c9712' + '9f6307b1358892e304f9474a456f0cb9160cfb8812a9da0430abe647f8a9cf45' + '3de5c059eead8816db15c2c5588e6196d6c4b0d704faf1a20912796cf589ba81' + '57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5' + '6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e') diff --git a/abs/extra/postgresql/build.patch b/abs/extra/postgresql/build.patch deleted file mode 100644 index c8f665d..0000000 --- a/abs/extra/postgresql/build.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur postgresql-8.2.3-orig/src/Makefile postgresql-8.2.3/src/Makefile ---- postgresql-8.2.3-orig/src/Makefile 2006-06-22 16:50:35.000000000 -0700 -+++ postgresql-8.2.3/src/Makefile 2007-03-05 10:46:24.000000000 -0800 -@@ -23,7 +23,6 @@ - $(MAKE) -C bin $@ - $(MAKE) -C pl $@ - $(MAKE) -C makefiles $@ -- $(MAKE) -C test/regress $@ - - install: install-local - diff --git a/abs/extra/postgresql/postgresql b/abs/extra/postgresql/postgresql deleted file mode 100755 index b00289e..0000000 --- a/abs/extra/postgresql/postgresql +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/postgresql - -case "$1" in - start) - stat_busy "Starting PostgreSQL" - # initialization - if [ ! `egrep '^postgres:' /etc/group` ]; then - stat_busy "Adding postgres group" - groupadd -g 88 postgres - stat_done - fi - if [ ! `egrep '^postgres:' /etc/passwd` ]; then - stat_busy "Adding postgres user" - useradd -u 88 -g postgres -d $PGROOT -s /bin/bash postgres - [ -d $PGROOT ] && chown -R postgres.postgres $PGROOT - stat_done - fi - if [ ! -d $PGROOT ]; then - mkdir -p $PGROOT/data && chown -R postgres.postgres $PGROOT - su - postgres -c "/usr/bin/initdb $INITOPTS -D $PGROOT/data" - fi - if [ ! -e /var/log/postgresql.log ]; then - touch /var/log/postgresql.log - chown postgres /var/log/postgresql.log - fi - # start the process - su - postgres -c \ - "/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -W start" - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon postgresql - stat_done - fi - ;; - stop) - stat_busy "Stopping PostgreSQL" - su - postgres -c \ - "/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -w stop" - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon postgresql - stat_done - fi - ;; - restart) - $0 stop - sleep 3 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/abs/extra/postgresql/postgresql.confd b/abs/extra/postgresql/postgresql.confd index 5f8fa03..6001c16 100644 --- a/abs/extra/postgresql/postgresql.confd +++ b/abs/extra/postgresql/postgresql.confd @@ -1,5 +1,11 @@ -# -# Parameters to be passed to postgresql -# -PGROOT="/var/lib/postgres" -INITOPTS="--locale $LANG" +## +## Parameters to be passed to postgresql +## +## Default data directory location +#PGROOT="/var/lib/postgres" +## Passed to initdb if necessary +INITOPTS="--locale en_US.UTF-8" +## Default log file location +#PGLOG="/var/log/postgresql.log" +## Additional options to pass via pg_ctl's '-o' option +#PGOPTS="" diff --git a/abs/extra/postgresql/postgresql.install b/abs/extra/postgresql/postgresql.install new file mode 100644 index 0000000..c524322 --- /dev/null +++ b/abs/extra/postgresql/postgresql.install @@ -0,0 +1,26 @@ +post_install() { + if [ ! -d '/var/lib/postgres' ]; then + mkdir -p '/var/lib/postgres' + fi + getent group postgres >/dev/null || groupadd -g 88 postgres + getent passwd postgres >/dev/null || useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /bin/bash postgres + passwd -l postgres >/dev/null +} + +post_upgrade() { + post_install $1 + # FS#23858, fix postgres user shell issue + postgres_shell=$(getent passwd postgres | cut -d: -f7) + if [ "$postgres_shell" = "/sbin/nologin" ]; then + chsh -s /bin/bash postgres + fi +} + +post_remove() { + if getent passwd postgres >/dev/null; then + userdel postgres + fi + if getent group postgres >/dev/null; then + groupdel postgres + fi +} diff --git a/abs/extra/postgresql/postgresql.logrotate b/abs/extra/postgresql/postgresql.logrotate deleted file mode 100644 index 9c36918..0000000 --- a/abs/extra/postgresql/postgresql.logrotate +++ /dev/null @@ -1,4 +0,0 @@ -/var/log/postgresql.log { - copytruncate - missingok -} diff --git a/abs/extra/postgresql/postgresql.rcd b/abs/extra/postgresql/postgresql.rcd new file mode 100755 index 0000000..f3600b3 --- /dev/null +++ b/abs/extra/postgresql/postgresql.rcd @@ -0,0 +1,79 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/postgresql + +# Default PGROOT if it wasn't defined in the conf.d file +PGROOT=${PGROOT:-/var/lib/postgres} +PGLOG=${PGLOG:-/var/log/postgresql.log} +PGCTL_BIN=/usr/bin/pg_ctl +PGCTL_ARGS=(-D "$PGROOT/data" -l "$PGLOG" -s -w) +[[ $PGOPTS ]] && PGCTL_ARGS+=(-o "$PGOPTS") + +postgres_init() { + # initialization + if [[ ! -d "$PGROOT/data" ]]; then + mkdir -p "$PGROOT/data" && chown -R postgres:postgres "$PGROOT" + su - postgres -c "/usr/bin/initdb $INITOPTS -D '$PGROOT/data'" + fi + if [[ ! -e "$PGLOG" ]]; then + touch "$PGLOG" + chown postgres "$PGLOG" + fi +} + +do_postgres() { + su - postgres -c "'$PGCTL_BIN' $(printf '%q ' "${PGCTL_ARGS[@]}" "$@")" +} + +case $1 in + start) + postgres_init + stat_busy "Starting PostgreSQL" + if do_postgres start; then + add_daemon postgresql + stat_done + else + stat_fail + exit 1 + fi + ;; + stop) + stat_busy "Stopping PostgreSQL" + if do_postgres stop -m fast; then + rm_daemon postgresql + stat_done + else + stat_fail + exit 1 + fi + ;; + reload) + stat_busy "Reloading PostgreSQL" + if do_postgres reload; then + stat_done + else + stat_fail + exit 1 + fi + ;; + restart) + postgres_init + stat_busy "Restarting PostgreSQL" + if do_postgres restart -m fast; then + add_daemon postgresql + stat_done + else + stat_fail + exit 1 + fi + ;; + status) + stat_busy "Checking PostgreSQL status"; + ck_status postgresql + ;; + *) + echo "usage: $0 {start|stop|reload|restart|status}" + exit 1 +esac |