postgresql: remove systemd build option.

This commit is contained in:
Juan RP 2015-06-08 16:25:01 +02:00
parent 0d5d311f06
commit cc63f4a2cd
3 changed files with 1 additions and 68 deletions

View file

@ -1,33 +0,0 @@
#!/bin/sh
set -e
. /etc/default/postgresql
# 2nd clause is necessary to prevent symlinking the directory to itself when it
# doesn't exist yet
if [ "$PGROOT" != "/var/lib/postgresql" ]; then
echo "Creating symlink /var/lib/postgresql -> $PGROOT"
# Remove /var/lib/postgres if empty dir, but not if symlink
if [ ! -L /var/lib/postgres ] && [ -d /var/lib/postgres ]; then
rmdir /var/lib/postgres
fi
ln -sf "$PGROOT" /var/lib/postgresql
fi
PGDATA="$PGROOT/data"
if [ ! -d "$PGDATA" ]; then
echo "Initializing database in $PGDATA"
mkdir -p "$PGDATA"
chown -R postgres:postgres "$PGDATA"
su - postgres -m -c "/usr/bin/initdb $INITOPTS -D '$PGDATA'" >/dev/null
if [ -f /etc/postgresql/postgresql.conf ]; then
ln -sf /etc/postgresql/postgresql.conf "$PGDATA/postgresql.conf"
fi
fi

View file

@ -1,20 +0,0 @@
[Unit]
Description=PostgreSQL database server
[Service]
Type=forking
SyslogIdentifier=postgres
PIDFile=/var/lib/postgresql/data/postmaster.pid
# initdb script takes care for symlinking $PGROOT to /var/lib/postgres
ExecStartPre=/lib/systemd/scripts/postgresql-initdb
ExecStart= /bin/su - postgres -m -c "/usr/bin/pg_ctl -s -D /var/lib/postgresql/data start"
ExecReload=/bin/su - postgres -m -c "/usr/bin/pg_ctl -s -D /var/lib/postgresql/data reload"
ExecStop= /bin/su - postgres -m -c "/usr/bin/pg_ctl -s -D /var/lib/postgresql/data stop -m fast"
# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
# killing Postgres
OOMScoreAdjust=-200
[Install]
WantedBy=multi-user.target

View file

@ -1,7 +1,7 @@
# Template file for 'postgresql'
pkgname=postgresql
version=9.4.3
revision=1
revision=2
build_style=gnu-configure
make_build_target="world"
configure_args="--with-openssl --with-python
@ -23,7 +23,6 @@ conf_files="
/etc/default/${pkgname}
/etc/pam.d/${pkgname}
/etc/${pkgname}/${pkgname}.conf"
systemd_services="${pkgname}.service on"
# Create 'postgres' user for the server.
system_accounts="postgres"
postgres_homedir="/var/lib/${pkgname}"
@ -34,17 +33,13 @@ if [ "$CROSS_BUILD" ]; then
configure_args+=" --without-perl --without-python --without-tcl"
fi
build_options="systemd"
pre_build() {
# http://www.postgresql.org/docs/9.3/static/docguide-toolsets.html
export SGML_CATALOG_FILES="/usr/share/sgml/openjade/catalog:/usr/share/sgml/iso8879/catalog:/usr/share/sgml/docbook/dsssl/modular/catalog:/usr/share/sgml/docbook/4.2/catalog"
}
post_build() {
make -C contrib ${makejobs}
}
post_install() {
make -C contrib install
@ -55,10 +50,6 @@ post_install() {
vsv postgresql
vinstall ${FILESDIR}/${pkgname}.confd 644 etc/default ${pkgname}
if [ "$build_option_systemd" ]; then
vinstall ${FILESDIR}/${pkgname}.service 644 usr/lib/systemd/system
vinstall ${FILESDIR}/${pkgname}-initdb 755 usr/lib/systemd/scripts
fi
vinstall ${FILESDIR}/${pkgname}.pam 644 etc/pam.d ${pkgname}
vinstall ${DESTDIR}/usr/share/${pkgname}/${pkgname}.conf.sample \
644 etc/${pkgname} ${pkgname}.conf
@ -71,7 +62,6 @@ postgresql-doc_package() {
vmove usr/share/doc
}
}
postgresql-libs_package() {
short_desc="PostgreSQL shared libraries"
pkg_install() {
@ -83,7 +73,6 @@ postgresql-libs_package() {
done
}
}
postgresql-libs-devel_package() {
depends="postgresql-libs>=$version"
short_desc="PostgreSQL shared libraries (development files)"
@ -120,7 +109,6 @@ postgresql-plperl_package() {
done
}
}
postgresql-plpython_package() {
depends="postgresql>=$version"
short_desc="PL/Python procedural language for PostgreSQL"
@ -133,7 +121,6 @@ postgresql-plpython_package() {
done
}
}
postgresql-pltcl_package() {
depends="postgresql>=$version"
short_desc="PL/Tcl procedural language for PostgreSQL"
@ -173,7 +160,6 @@ postgresql-client_package() {
${PKGDESTDIR}/usr/share/postgresql
}
}
postgresql-contrib_package() {
short_desc="PostgreSQL contributed programs and extensions"
pkg_install() {