diff --git a/databases/postgresql13-server/Makefile b/databases/postgresql13-server/Makefile index c1419cb0a806..87196779fe42 100644 --- a/databases/postgresql13-server/Makefile +++ b/databases/postgresql13-server/Makefile @@ -1,24 +1,24 @@ -DISTVERSION?= 13.19 +DISTVERSION?= 13.20 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and # not their own. Probably best to keep it at ?=0 when reset here too. PORTREVISION?= 1 MAINTAINER?= pgsql@FreeBSD.org INSTALL_DIRS?= src/common src/timezone src/backend \ src/backend/utils/mb/conversion_procs \ src/backend/snowball src/backend/replication/libpqwalreceiver \ src/backend/replication/pgoutput \ src/bin/initdb src/bin/pg_ctl \ src/bin/pg_archivecleanup src/bin/pg_basebackup \ src/bin/pg_checksums \ src/bin/pg_controldata src/bin/pg_resetwal src/pl \ src/bin/pg_rewind \ src/bin/pg_test_fsync src/bin/pg_test_timing \ src/bin/pg_waldump src/bin/pg_upgrade PG_USER?= postgres PG_GROUP?= postgres PG_UID?= 770 .include "${.CURDIR}/../postgresql16-server/Makefile" diff --git a/databases/postgresql13-server/distinfo b/databases/postgresql13-server/distinfo index 7ecf676fdd4d..723c2fb98f2f 100644 --- a/databases/postgresql13-server/distinfo +++ b/databases/postgresql13-server/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1739277660 -SHA256 (postgresql/postgresql-13.19.tar.bz2) = 482cce0a9f8d24c2447cfc7b2817e55f86d51afe5f7f1a85214bf93644e774ea -SIZE (postgresql/postgresql-13.19.tar.bz2) = 21729020 +TIMESTAMP = 1739873705 +SHA256 (postgresql/postgresql-13.20.tar.bz2) = 8134b685724d15e60d93bea206fbe0f14c8295e84f1cc91d5a3928163e4fb288 +SIZE (postgresql/postgresql-13.20.tar.bz2) = 21730844 diff --git a/databases/postgresql13-server/files/postgresql.in b/databases/postgresql13-server/files/postgresql.in index 3cf6475a9a9b..073d3a64c004 100644 --- a/databases/postgresql13-server/files/postgresql.in +++ b/databases/postgresql13-server/files/postgresql.in @@ -1,123 +1,125 @@ #!/bin/sh # PROVIDE: postgresql # REQUIRE: DAEMON mountlate # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable PostgreSQL: # # postgresql_enable="YES" # # optional # postgresql_data="/var/db/%%PG_USER%%/data%%PG_VERSION%%" # postgresql_flags="-w -s -m fast" # postgresql_initdb_flags="--encoding=utf-8 --lc-collate=C" # # leave empty to use the login class set in in /etc/passwd: # postgresql_login_class="my_custom_login_class" # postgresql_profiles="" # # See %%PREFIX%%/share/doc/postgresql/README-server for more info # # This scripts takes one of the following commands: # # start stop restart reload status initdb # # For postmaster startup options, edit ${postgresql_data}/postgresql.conf command=%%PREFIX%%/bin/pg_ctl . /etc/rc.subr load_rc_config postgresql # set defaults : ${postgresql_enable:="NO"} : ${postgresql_flags:="-w -s -m fast"} : ${postgresql_user:="%%PG_USER%%"} eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%" : ${postgresql_data:="${_pgdir}"} : ${postgresql_login_class:=""} : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"} : ${postgresql_svcj_options:="net_basic"} name=postgresql rcvar=postgresql_enable extra_commands="reload initdb" start_cmd="postgresql_command start" stop_cmd="postgresql_command stop" restart_cmd="postgresql_command restart" reload_cmd="postgresql_command reload" status_cmd="postgresql_command status" promote_cmd="postgresql_command promote" initdb_cmd="postgresql_initdb" su_cmd="/usr/bin/su" if [ -n "$2" ]; then profile="$2" if [ "x${postgresql_profiles}" != "x" ]; then eval postgresql_data="\${postgresql_${profile}_data:-}" if [ "x${postgresql_data}" = "x" ]; then echo "You must define a data directory (postgresql_${profile}_data)" exit 1 fi eval postgresql_enable="\${postgresql_${profile}_enable:-${postgresql_enable}}" eval postgresql_data="\${postgresql_${profile}_data:-${postgresql_data}}" eval postgresql_flags="\${postgresql_${profile}_flags:-${postgresql_flags}}" eval postgresql_login_class="\${postgresql_${profile}_login_class:-${postgresql_login_class}}" eval postgresql_initdb_flags="\${postgresql_${profile}_initdb_flags:-${postgresql_initdb_flags}}" fi else if [ "x${postgresql_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${postgresql_profiles}; do eval _enable="\${postgresql_${profile}_enable}" case "x${_enable:-${postgresql_enable}}" in x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee]) continue ;; x[Yy][Ee][Ss]) ;; *) if test -z "$_enable"; then _var=postgresql_enable else _var=postgresql_"${profile}"_enable fi echo "Bad value" \ "'${_enable:-${postgresql_enable}}'" \ "for ${_var}. " \ "Profile ${profile} skipped." continue ;; esac echo "===> postgresql profile: ${profile}" %%PREFIX%%/etc/rc.d/postgresql $1 ${profile} retcode="$?" if [ "0${retcode}" -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi -command_args="-D ${postgresql_data} ${postgresql_flags}" +command_args="-l /dev/null -D ${postgresql_data} ${postgresql_flags}" postgresql_command() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec ${command} ${command_args} ${rc_arg}" } postgresql_initdb() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec %%PREFIX%%/bin/initdb ${postgresql_initdb_flags} -D ${postgresql_data} -U ${postgresql_user}" } run_rc_command "$1" diff --git a/databases/postgresql14-server/Makefile b/databases/postgresql14-server/Makefile index 4cd71dcee6a3..ebd219f4a32b 100644 --- a/databases/postgresql14-server/Makefile +++ b/databases/postgresql14-server/Makefile @@ -1,24 +1,24 @@ -DISTVERSION?= 14.16 +DISTVERSION?= 14.17 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and # not their own. Probably best to keep it at ?=0 when reset here too. PORTREVISION?= 1 MAINTAINER?= pgsql@FreeBSD.org INSTALL_DIRS?= src/common src/timezone src/backend \ src/backend/utils/mb/conversion_procs \ src/backend/snowball src/backend/replication/libpqwalreceiver \ src/backend/replication/pgoutput \ src/bin/initdb src/bin/pg_ctl \ src/bin/pg_archivecleanup src/bin/pg_basebackup \ src/bin/pg_checksums \ src/bin/pg_controldata src/bin/pg_resetwal src/pl \ src/bin/pg_rewind \ src/bin/pg_test_fsync src/bin/pg_test_timing \ src/bin/pg_waldump src/bin/pg_upgrade PG_USER?= postgres PG_GROUP?= postgres PG_UID?= 770 .include "${.CURDIR}/../postgresql16-server/Makefile" diff --git a/databases/postgresql14-server/distinfo b/databases/postgresql14-server/distinfo index 8e5538ebe19c..4612d80a9b14 100644 --- a/databases/postgresql14-server/distinfo +++ b/databases/postgresql14-server/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1739277661 -SHA256 (postgresql/postgresql-14.16.tar.bz2) = 673c26f15ebb14306ad0ea051d8acfb3915dd342de942f5b502e5354a0ab760c -SIZE (postgresql/postgresql-14.16.tar.bz2) = 22491073 +TIMESTAMP = 1739873706 +SHA256 (postgresql/postgresql-14.17.tar.bz2) = 6ce0ccd6403bf7f0f2eddd333e2ee9ba02edfa977c66660ed9b4b1057e7630a1 +SIZE (postgresql/postgresql-14.17.tar.bz2) = 22488812 diff --git a/databases/postgresql14-server/files/postgresql.in b/databases/postgresql14-server/files/postgresql.in index 3cf6475a9a9b..073d3a64c004 100644 --- a/databases/postgresql14-server/files/postgresql.in +++ b/databases/postgresql14-server/files/postgresql.in @@ -1,123 +1,125 @@ #!/bin/sh # PROVIDE: postgresql # REQUIRE: DAEMON mountlate # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable PostgreSQL: # # postgresql_enable="YES" # # optional # postgresql_data="/var/db/%%PG_USER%%/data%%PG_VERSION%%" # postgresql_flags="-w -s -m fast" # postgresql_initdb_flags="--encoding=utf-8 --lc-collate=C" # # leave empty to use the login class set in in /etc/passwd: # postgresql_login_class="my_custom_login_class" # postgresql_profiles="" # # See %%PREFIX%%/share/doc/postgresql/README-server for more info # # This scripts takes one of the following commands: # # start stop restart reload status initdb # # For postmaster startup options, edit ${postgresql_data}/postgresql.conf command=%%PREFIX%%/bin/pg_ctl . /etc/rc.subr load_rc_config postgresql # set defaults : ${postgresql_enable:="NO"} : ${postgresql_flags:="-w -s -m fast"} : ${postgresql_user:="%%PG_USER%%"} eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%" : ${postgresql_data:="${_pgdir}"} : ${postgresql_login_class:=""} : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"} : ${postgresql_svcj_options:="net_basic"} name=postgresql rcvar=postgresql_enable extra_commands="reload initdb" start_cmd="postgresql_command start" stop_cmd="postgresql_command stop" restart_cmd="postgresql_command restart" reload_cmd="postgresql_command reload" status_cmd="postgresql_command status" promote_cmd="postgresql_command promote" initdb_cmd="postgresql_initdb" su_cmd="/usr/bin/su" if [ -n "$2" ]; then profile="$2" if [ "x${postgresql_profiles}" != "x" ]; then eval postgresql_data="\${postgresql_${profile}_data:-}" if [ "x${postgresql_data}" = "x" ]; then echo "You must define a data directory (postgresql_${profile}_data)" exit 1 fi eval postgresql_enable="\${postgresql_${profile}_enable:-${postgresql_enable}}" eval postgresql_data="\${postgresql_${profile}_data:-${postgresql_data}}" eval postgresql_flags="\${postgresql_${profile}_flags:-${postgresql_flags}}" eval postgresql_login_class="\${postgresql_${profile}_login_class:-${postgresql_login_class}}" eval postgresql_initdb_flags="\${postgresql_${profile}_initdb_flags:-${postgresql_initdb_flags}}" fi else if [ "x${postgresql_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${postgresql_profiles}; do eval _enable="\${postgresql_${profile}_enable}" case "x${_enable:-${postgresql_enable}}" in x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee]) continue ;; x[Yy][Ee][Ss]) ;; *) if test -z "$_enable"; then _var=postgresql_enable else _var=postgresql_"${profile}"_enable fi echo "Bad value" \ "'${_enable:-${postgresql_enable}}'" \ "for ${_var}. " \ "Profile ${profile} skipped." continue ;; esac echo "===> postgresql profile: ${profile}" %%PREFIX%%/etc/rc.d/postgresql $1 ${profile} retcode="$?" if [ "0${retcode}" -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi -command_args="-D ${postgresql_data} ${postgresql_flags}" +command_args="-l /dev/null -D ${postgresql_data} ${postgresql_flags}" postgresql_command() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec ${command} ${command_args} ${rc_arg}" } postgresql_initdb() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec %%PREFIX%%/bin/initdb ${postgresql_initdb_flags} -D ${postgresql_data} -U ${postgresql_user}" } run_rc_command "$1" diff --git a/databases/postgresql15-server/Makefile b/databases/postgresql15-server/Makefile index 073ad7eea660..959c02e355a5 100644 --- a/databases/postgresql15-server/Makefile +++ b/databases/postgresql15-server/Makefile @@ -1,24 +1,24 @@ -DISTVERSION?= 15.11 +DISTVERSION?= 15.12 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and # not their own. Probably best to keep it at ?=0 when reset here too. PORTREVISION?= 1 MAINTAINER?= pgsql@FreeBSD.org INSTALL_DIRS?= src/common src/timezone src/backend \ src/backend/utils/mb/conversion_procs \ src/backend/snowball src/backend/replication/libpqwalreceiver \ src/backend/replication/pgoutput \ src/bin/initdb src/bin/pg_ctl \ src/bin/pg_archivecleanup src/bin/pg_basebackup \ src/bin/pg_checksums \ src/bin/pg_controldata src/bin/pg_resetwal src/pl \ src/bin/pg_rewind \ src/bin/pg_test_fsync src/bin/pg_test_timing \ src/bin/pg_waldump src/bin/pg_upgrade PG_USER?= postgres PG_GROUP?= postgres PG_UID?= 770 .include "${.CURDIR}/../postgresql16-server/Makefile" diff --git a/databases/postgresql15-server/distinfo b/databases/postgresql15-server/distinfo index 6edb93347405..cd3b74a3a24e 100644 --- a/databases/postgresql15-server/distinfo +++ b/databases/postgresql15-server/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1739277663 -SHA256 (postgresql/postgresql-15.11.tar.bz2) = 5367e97e81e493301cc4aab049dfbc9b4913822985bc62379faab2a281cfbdf0 -SIZE (postgresql/postgresql-15.11.tar.bz2) = 23167652 +TIMESTAMP = 1739873912 +SHA256 (postgresql/postgresql-15.12.tar.bz2) = 3bc8462a38ca0857270cc88b949a3f6659f0d5c44c029c482355835b61a0f6f7 +SIZE (postgresql/postgresql-15.12.tar.bz2) = 23170228 diff --git a/databases/postgresql15-server/files/postgresql.in b/databases/postgresql15-server/files/postgresql.in index 3cf6475a9a9b..073d3a64c004 100644 --- a/databases/postgresql15-server/files/postgresql.in +++ b/databases/postgresql15-server/files/postgresql.in @@ -1,123 +1,125 @@ #!/bin/sh # PROVIDE: postgresql # REQUIRE: DAEMON mountlate # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable PostgreSQL: # # postgresql_enable="YES" # # optional # postgresql_data="/var/db/%%PG_USER%%/data%%PG_VERSION%%" # postgresql_flags="-w -s -m fast" # postgresql_initdb_flags="--encoding=utf-8 --lc-collate=C" # # leave empty to use the login class set in in /etc/passwd: # postgresql_login_class="my_custom_login_class" # postgresql_profiles="" # # See %%PREFIX%%/share/doc/postgresql/README-server for more info # # This scripts takes one of the following commands: # # start stop restart reload status initdb # # For postmaster startup options, edit ${postgresql_data}/postgresql.conf command=%%PREFIX%%/bin/pg_ctl . /etc/rc.subr load_rc_config postgresql # set defaults : ${postgresql_enable:="NO"} : ${postgresql_flags:="-w -s -m fast"} : ${postgresql_user:="%%PG_USER%%"} eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%" : ${postgresql_data:="${_pgdir}"} : ${postgresql_login_class:=""} : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"} : ${postgresql_svcj_options:="net_basic"} name=postgresql rcvar=postgresql_enable extra_commands="reload initdb" start_cmd="postgresql_command start" stop_cmd="postgresql_command stop" restart_cmd="postgresql_command restart" reload_cmd="postgresql_command reload" status_cmd="postgresql_command status" promote_cmd="postgresql_command promote" initdb_cmd="postgresql_initdb" su_cmd="/usr/bin/su" if [ -n "$2" ]; then profile="$2" if [ "x${postgresql_profiles}" != "x" ]; then eval postgresql_data="\${postgresql_${profile}_data:-}" if [ "x${postgresql_data}" = "x" ]; then echo "You must define a data directory (postgresql_${profile}_data)" exit 1 fi eval postgresql_enable="\${postgresql_${profile}_enable:-${postgresql_enable}}" eval postgresql_data="\${postgresql_${profile}_data:-${postgresql_data}}" eval postgresql_flags="\${postgresql_${profile}_flags:-${postgresql_flags}}" eval postgresql_login_class="\${postgresql_${profile}_login_class:-${postgresql_login_class}}" eval postgresql_initdb_flags="\${postgresql_${profile}_initdb_flags:-${postgresql_initdb_flags}}" fi else if [ "x${postgresql_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${postgresql_profiles}; do eval _enable="\${postgresql_${profile}_enable}" case "x${_enable:-${postgresql_enable}}" in x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee]) continue ;; x[Yy][Ee][Ss]) ;; *) if test -z "$_enable"; then _var=postgresql_enable else _var=postgresql_"${profile}"_enable fi echo "Bad value" \ "'${_enable:-${postgresql_enable}}'" \ "for ${_var}. " \ "Profile ${profile} skipped." continue ;; esac echo "===> postgresql profile: ${profile}" %%PREFIX%%/etc/rc.d/postgresql $1 ${profile} retcode="$?" if [ "0${retcode}" -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi -command_args="-D ${postgresql_data} ${postgresql_flags}" +command_args="-l /dev/null -D ${postgresql_data} ${postgresql_flags}" postgresql_command() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec ${command} ${command_args} ${rc_arg}" } postgresql_initdb() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec %%PREFIX%%/bin/initdb ${postgresql_initdb_flags} -D ${postgresql_data} -U ${postgresql_user}" } run_rc_command "$1" diff --git a/databases/postgresql16-server/Makefile b/databases/postgresql16-server/Makefile index 8f20adf5a53a..4ad9ebbd9ab4 100644 --- a/databases/postgresql16-server/Makefile +++ b/databases/postgresql16-server/Makefile @@ -1,242 +1,242 @@ PORTNAME?= postgresql -DISTVERSION?= 16.7 +DISTVERSION?= 16.8 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and # not their own. Probably best to keep it at ?=0 when reset here too. PORTREVISION?= 1 CATEGORIES?= databases MASTER_SITES= PGSQL/source/v${DISTVERSION} PKGNAMESUFFIX?= ${PORTVERSION:R}${COMPONENT} MAINTAINER?= pgsql@FreeBSD.org COMMENT?= PostgreSQL is the most advanced open-source database available anywhere WWW= https://www.postgresql.org/ LICENSE= PostgreSQL CONFLICTS+= ${PORTNAME}1[^${PORTVERSION:R:C/.*([0-9]$)/\\1/}]* WRKSRC= ${WRKDIR}/postgresql-${DISTVERSION} DIST_SUBDIR= postgresql OPTIONS_SUB= yes PKGINSTALL?= ${PKGDIR}/pkg-install${COMPONENT} USES+= tar:bzip2 cpe .if !defined(NO_BUILD) USES+= gmake GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share .endif PG_USER?= postgres PG_GROUP?= postgres PG_UID?= 770 LDFLAGS+= -L${LOCALBASE}/lib INCLUDES+= -I${LOCALBASE}/include CONFIGURE_ARGS+=--with-libraries=${PREFIX}/lib \ --with-includes=${PREFIX}/include \ --enable-thread-safety CONFIGURE_ENV+= INCLUDES="${INCLUDES}" \ PTHREAD_LIBS="-lpthread" \ LDFLAGS_SL="${LDFLAGS_SL}" LDFLAGS+= -lpthread MAKE_ENV= MAKELEVEL=0 PLIST= ${PKGDIR}/pkg-plist${COMPONENT} INSTALL_DIRS?= src/common src/timezone src/backend \ src/backend/utils/mb/conversion_procs \ src/backend/snowball src/backend/replication/libpqwalreceiver \ src/backend/replication/pgoutput \ src/bin/initdb src/bin/pg_ctl \ src/bin/pg_archivecleanup src/bin/pg_basebackup \ src/bin/pg_checksums \ src/bin/pg_controldata src/bin/pg_resetwal src/pl \ src/bin/pg_rewind \ src/bin/pg_test_fsync src/bin/pg_test_timing \ src/bin/pg_waldump src/bin/pg_upgrade BUILD_DIRS?= src/port ${INSTALL_DIRS} INSTALL_TARGET?=install-strip .if !defined(CLIENT_ONLY) && !defined(SLAVE_ONLY) SERVER_ONLY= yes COMPONENT= -server USE_RC_SUBR= postgresql USES+= pgsql:${DISTVERSION:C/([0-9]\.?[0-9]).*/\1/g} USERS= ${PG_USER} GROUPS= ${PG_GROUP} SUB_FILES+= 502.pgsql .endif MAKE_ENV+= PATH=${PREFIX}/bin:${PATH} CONFIGURE_ENV+= PATH=${PREFIX}/bin:${PATH} .if defined(SERVER_ONLY) OPTIONS_DEFINE= DTRACE LDAP TZDATA XML DOCS OPTIONS_DEFAULT+=XML LDAP_DESC= Build with LDAP authentication support TZDATA_DESC= Use internal timezone database XML_DESC= Build with XML data type DTRACE_CONFIGURE_ENABLE=dtrace DTRACE_LDFLAGS= -lelf DTRACE_INSTALL_TARGET= install . if ${DISTVERSION:C/([0-9][0-9]).*/\1/g} >= 14 OPTIONS_DEFINE+= LZ4 OPTIONS_DEFAULT+= LZ4 LZ4_DESC= Build with LZ4 compression support LZ4_CONFIGURE_WITH= lz4 LZ4_LIB_DEPENDS+= liblz4.so:archivers/liblz4 . endif . if ${DISTVERSION:C/([0-9][0-9]).*/\1/g} >= 15 OPTIONS_DEFINE+= ZSTD OPTIONS_DEFAULT+= ZSTD ZSTD_DESC= Build with ZSTD compression support ZSTD_CONFIGURE_WITH= zstd ZSTD_LIB_DEPENDS+= libzstd.so:archivers/zstd . endif OPTIONS_DEFINE+= LLVM OPTIONS_DEFAULT+= LLVM LLVM_DESC= Build with support for JIT-compiling expressions LLVM_CONFIGURE_WITH= llvm LLVM_CONFIGURE_ENV= LLVM_CONFIG=${LLVM_CONFIG} \ CLANG=${LOCALBASE}/bin/clang${LLVM_VERSION} LLVM_USES= llvm:min=11,lib CONFIGURE_ARGS+= --with-icu LIB_DEPENDS+= libicudata.so:devel/icu USES+= pkgconfig .else CONFIGURE_ARGS+= --without-icu .endif .if !defined(SLAVE_ONLY) OPTIONS_DEFINE+= NLS PAM GSSAPI OPTIMIZED_CFLAGS DEBUG DOCS SSL NLS_DESC= Use internationalized messages PAM_DESC= Build with PAM Support GSSAPI_DESC= Build with GSSAPI from base (security/krb5) OPTIMIZED_CFLAGS_DESC= Builds with compiler optimizations (-O3) SSL_DESC= Build with OpenSSL support OPTIONS_DEFAULT+= SSL GSSAPI_USES= gssapi:mit GSSAPI_CONFIGURE_WITH= gssapi .endif # !SLAVE_ONLY SSL_USES= ssl SSL_CONFIGURE_WITH= openssl PAM_CONFIGURE_WITH= pam XML_CONFIGURE_WITH= libxml XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 TZDATA_CONFIGURE_OFF= --with-system-tzdata=/usr/share/zoneinfo NLS_CONFIGURE_ENABLE= nls NLS_USES= gettext LDAP_CONFIGURE_WITH= ldap LDAP_USES= ldap OPTIMIZED_CFLAGS_CFLAGS=-O3 -funroll-loops DEBUG_CONFIGURE_ENABLE= debug PLIST_SUB+= PG_VERSION=${PORTVERSION:R} \ PG_USER=${PG_USER} \ PG_USER_regex=[[:<:]]${PG_USER}[[:>:]] \ PG_GROUP=${PG_GROUP} \ PG_GROUP_regex=[[:<:]]${PG_GROUP}[[:>:]] SUB_LIST+= PG_VERSION=${PORTVERSION:R} \ PG_GROUP=${PG_GROUP} \ PG_USER=${PG_USER} \ PG_UID=${PG_UID} .include # i386 older than Pentium lacks SSE2 so the binary will not run if we build with clang -msse2 # For such ancient CPUs, gcc must be used to build PostgreSQL. # https://www.postgresql.org/message-id/20190307140421.GA8362%40gate.oper.dinoex.org .if ${ARCH} == "i386" CFLAGS+= -msse2 .endif .if !defined(SLAVE_ONLY) PATCH_DIST_STRIP=-p1 .endif # !SLAVE_ONLY # For testing files in FILESDIR .include .if ${PORT_OPTIONS:MLLVM} INSTALL_DIRS+= src/backend/jit/llvm .endif .if defined(SERVER_ONLY) pre-build: @${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL .endif .if !defined(NO_BUILD) && !target(do-build) do-build: @ cd ${WRKSRC}/src/backend && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} generated-headers @ for dir in ${BUILD_DIRS}; do \ cd ${WRKSRC}/$${dir} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ; \ done . if exists(${FILESDIR}/pkg-message${COMPONENT}.in) SUB_FILES+= pkg-message${COMPONENT} PKGMESSAGE= ${WRKSRC}/pkg-message${COMPONENT} . endif . if exists(${FILESDIR}/pkg-install${COMPONENT}.in) SUB_FILES+= pkg-install${COMPONENT} . endif post-patch: . if defined(CLIENT_ONLY) && !defined(OPENSSL_PORT) @${REINPLACE_CMD} \ -e '/^PKG_CONFIG_REQUIRES_PRIVATE = libssl libcrypto/d' \ ${WRKSRC}/src/interfaces/libpq/Makefile . endif do-install: @for dir in ${INSTALL_DIRS}; do \ cd ${WRKSRC}/$${dir} && \ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${INSTALL_TARGET}; \ done . if defined(SERVER_ONLY) @ ${MKDIR} ${STAGEDIR}${PREFIX}/share/postgresql ;\ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily ;\ ${INSTALL_SCRIPT} ${WRKDIR}/502.pgsql \ ${STAGEDIR}${PREFIX}/etc/periodic/daily . endif # SERVER_ONLY . if defined(CLIENT_ONLY) @ cd ${WRKSRC}/src && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-local . endif @ if [ -r ${PKGMESSAGE} ]; then \ ${MKDIR} ${STAGEDIR}${DOCSDIR} ;\ ${INSTALL_DATA} ${PKGMESSAGE} ${STAGEDIR}${DOCSDIR}/README${COMPONENT} ;\ fi .endif # !NO_BUILD .if defined(SERVER_ONLY) check: @if [ `id -u` != 0 ] ; then \ ${ECHO} "Running postgresql regressions tests" ;\ cd ${WRKSRC}; ${MAKE_CMD} check ;\ else \ ${ECHO} "You cannot run regression tests when postgresql is built as user root." ; \ ${ECHO} "Clean and rebuild the port as a regular user to run the tests." ;\ fi .endif .include diff --git a/databases/postgresql16-server/distinfo b/databases/postgresql16-server/distinfo index 92f58d3ef78e..3bccde2d6243 100644 --- a/databases/postgresql16-server/distinfo +++ b/databases/postgresql16-server/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1739277664 -SHA256 (postgresql/postgresql-16.7.tar.bz2) = 62e02f77ebfc4a37f1700c20cc3ccd85ff797b5613766ebf949a7899bb2113fe -SIZE (postgresql/postgresql-16.7.tar.bz2) = 24905167 +TIMESTAMP = 1739873709 +SHA256 (postgresql/postgresql-16.8.tar.bz2) = 9468083a56ce0ee7d294601b74dad3dd9fc69d87aff61f0a9fb63c813ff7efd8 +SIZE (postgresql/postgresql-16.8.tar.bz2) = 24911337 diff --git a/databases/postgresql16-server/files/postgresql.in b/databases/postgresql16-server/files/postgresql.in index 3cf6475a9a9b..073d3a64c004 100644 --- a/databases/postgresql16-server/files/postgresql.in +++ b/databases/postgresql16-server/files/postgresql.in @@ -1,123 +1,125 @@ #!/bin/sh # PROVIDE: postgresql # REQUIRE: DAEMON mountlate # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable PostgreSQL: # # postgresql_enable="YES" # # optional # postgresql_data="/var/db/%%PG_USER%%/data%%PG_VERSION%%" # postgresql_flags="-w -s -m fast" # postgresql_initdb_flags="--encoding=utf-8 --lc-collate=C" # # leave empty to use the login class set in in /etc/passwd: # postgresql_login_class="my_custom_login_class" # postgresql_profiles="" # # See %%PREFIX%%/share/doc/postgresql/README-server for more info # # This scripts takes one of the following commands: # # start stop restart reload status initdb # # For postmaster startup options, edit ${postgresql_data}/postgresql.conf command=%%PREFIX%%/bin/pg_ctl . /etc/rc.subr load_rc_config postgresql # set defaults : ${postgresql_enable:="NO"} : ${postgresql_flags:="-w -s -m fast"} : ${postgresql_user:="%%PG_USER%%"} eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%" : ${postgresql_data:="${_pgdir}"} : ${postgresql_login_class:=""} : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"} : ${postgresql_svcj_options:="net_basic"} name=postgresql rcvar=postgresql_enable extra_commands="reload initdb" start_cmd="postgresql_command start" stop_cmd="postgresql_command stop" restart_cmd="postgresql_command restart" reload_cmd="postgresql_command reload" status_cmd="postgresql_command status" promote_cmd="postgresql_command promote" initdb_cmd="postgresql_initdb" su_cmd="/usr/bin/su" if [ -n "$2" ]; then profile="$2" if [ "x${postgresql_profiles}" != "x" ]; then eval postgresql_data="\${postgresql_${profile}_data:-}" if [ "x${postgresql_data}" = "x" ]; then echo "You must define a data directory (postgresql_${profile}_data)" exit 1 fi eval postgresql_enable="\${postgresql_${profile}_enable:-${postgresql_enable}}" eval postgresql_data="\${postgresql_${profile}_data:-${postgresql_data}}" eval postgresql_flags="\${postgresql_${profile}_flags:-${postgresql_flags}}" eval postgresql_login_class="\${postgresql_${profile}_login_class:-${postgresql_login_class}}" eval postgresql_initdb_flags="\${postgresql_${profile}_initdb_flags:-${postgresql_initdb_flags}}" fi else if [ "x${postgresql_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${postgresql_profiles}; do eval _enable="\${postgresql_${profile}_enable}" case "x${_enable:-${postgresql_enable}}" in x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee]) continue ;; x[Yy][Ee][Ss]) ;; *) if test -z "$_enable"; then _var=postgresql_enable else _var=postgresql_"${profile}"_enable fi echo "Bad value" \ "'${_enable:-${postgresql_enable}}'" \ "for ${_var}. " \ "Profile ${profile} skipped." continue ;; esac echo "===> postgresql profile: ${profile}" %%PREFIX%%/etc/rc.d/postgresql $1 ${profile} retcode="$?" if [ "0${retcode}" -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi -command_args="-D ${postgresql_data} ${postgresql_flags}" +command_args="-l /dev/null -D ${postgresql_data} ${postgresql_flags}" postgresql_command() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec ${command} ${command_args} ${rc_arg}" } postgresql_initdb() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec %%PREFIX%%/bin/initdb ${postgresql_initdb_flags} -D ${postgresql_data} -U ${postgresql_user}" } run_rc_command "$1" diff --git a/databases/postgresql17-server/Makefile b/databases/postgresql17-server/Makefile index e118b6c3b5f5..d5d68a3fe154 100644 --- a/databases/postgresql17-server/Makefile +++ b/databases/postgresql17-server/Makefile @@ -1,245 +1,245 @@ PORTNAME?= postgresql -DISTVERSION?= 17.3 +DISTVERSION?= 17.4 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and # not their own. Probably best to keep it at ?=0 when reset here too. PORTREVISION?= 1 CATEGORIES?= databases MASTER_SITES= PGSQL/source/v${DISTVERSION} #DISTFILES+= ${PORTNAME}-${DISTVERSION}-docs.tar.bz:docs PKGNAMESUFFIX?= ${PORTVERSION:R}${COMPONENT} MAINTAINER?= pgsql@FreeBSD.org COMMENT?= PostgreSQL is the most advanced open-source database available anywhere WWW= https://www.postgresql.org/ LICENSE= PostgreSQL CONFLICTS+= ${PORTNAME}1[^${PORTVERSION:R:C/.*([0-9]$)/\\1/}]* WRKSRC= ${WRKDIR}/postgresql-${DISTVERSION} DIST_SUBDIR= postgresql OPTIONS_SUB= yes PKGINSTALL?= ${PKGDIR}/pkg-install${COMPONENT} USES+= bison perl5 tar:bzip2 cpe USE_PERL5= build .if !defined(NO_BUILD) USES+= gmake GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share .endif PG_USER?= postgres PG_GROUP?= postgres PG_UID?= 770 LDFLAGS+= -L${LOCALBASE}/lib INCLUDES+= -I${LOCALBASE}/include CONFIGURE_ARGS+=--with-libraries=${PREFIX}/lib \ --with-includes=${PREFIX}/include \ --enable-thread-safety CONFIGURE_ENV+= INCLUDES="${INCLUDES}" \ PTHREAD_LIBS="-lpthread" \ LDFLAGS_SL="${LDFLAGS_SL}" LDFLAGS+= -lpthread MAKE_ENV= MAKELEVEL=0 PLIST= ${PKGDIR}/pkg-plist${COMPONENT} INSTALL_DIRS?= src/common src/timezone src/backend \ src/backend/utils/mb/conversion_procs \ src/backend/snowball src/backend/replication/libpqwalreceiver \ src/backend/replication/pgoutput \ src/bin/initdb src/bin/pg_ctl \ src/bin/pg_archivecleanup src/bin/pg_basebackup \ src/bin/pg_checksums \ src/bin/pg_controldata src/bin/pg_resetwal src/pl \ src/bin/pg_rewind \ src/bin/pg_test_fsync src/bin/pg_test_timing \ src/bin/pg_waldump src/bin/pg_upgrade BUILD_DIRS?= src/port ${INSTALL_DIRS} INSTALL_TARGET?=install-strip .if !defined(CLIENT_ONLY) && !defined(SLAVE_ONLY) SERVER_ONLY= yes COMPONENT= -server USE_RC_SUBR= postgresql USES+= pgsql:${DISTVERSION:C/([0-9]\.?[0-9]).*/\1/g} USERS= ${PG_USER} GROUPS= ${PG_GROUP} SUB_FILES+= 502.pgsql .endif MAKE_ENV+= PATH=${PREFIX}/bin:${PATH} CONFIGURE_ENV+= PATH=${PREFIX}/bin:${PATH} .if defined(SERVER_ONLY) OPTIONS_DEFINE= DTRACE LDAP TZDATA XML DOCS OPTIONS_DEFAULT+=XML LDAP_DESC= Build with LDAP authentication support TZDATA_DESC= Use internal timezone database XML_DESC= Build with XML data type DTRACE_CONFIGURE_ENABLE=dtrace DTRACE_LDFLAGS= -lelf DTRACE_INSTALL_TARGET= install . if ${DISTVERSION:C/([0-9][0-9]).*/\1/g} >= 14 OPTIONS_DEFINE+= LZ4 OPTIONS_DEFAULT+= LZ4 LZ4_DESC= Build with LZ4 compression support LZ4_CONFIGURE_WITH= lz4 LZ4_LIB_DEPENDS+= liblz4.so:archivers/liblz4 . endif . if ${DISTVERSION:C/([0-9][0-9]).*/\1/g} >= 15 OPTIONS_DEFINE+= ZSTD OPTIONS_DEFAULT+= ZSTD ZSTD_DESC= Build with ZSTD compression support ZSTD_CONFIGURE_WITH= zstd ZSTD_LIB_DEPENDS+= libzstd.so:archivers/zstd . endif OPTIONS_DEFINE+= LLVM OPTIONS_DEFAULT+= LLVM LLVM_DESC= Build with support for JIT-compiling expressions LLVM_CONFIGURE_WITH= llvm LLVM_CONFIGURE_ENV= LLVM_CONFIG=${LLVM_CONFIG} \ CLANG=${LOCALBASE}/bin/clang${LLVM_VERSION} LLVM_USES= llvm:min=11,lib CONFIGURE_ARGS+= --with-icu LIB_DEPENDS+= libicudata.so:devel/icu USES+= pkgconfig .else CONFIGURE_ARGS+= --without-icu .endif .if !defined(SLAVE_ONLY) OPTIONS_DEFINE+= NLS PAM GSSAPI OPTIMIZED_CFLAGS DEBUG DOCS SSL NLS_DESC= Use internationalized messages PAM_DESC= Build with PAM Support GSSAPI_DESC= Build with GSSAPI from base (security/krb5) OPTIMIZED_CFLAGS_DESC= Builds with compiler optimizations (-O3) SSL_DESC= Build with OpenSSL support OPTIONS_DEFAULT+= SSL GSSAPI_USES= gssapi:mit GSSAPI_CONFIGURE_WITH= gssapi PATCH_DIST_STRIP=-p1 .endif # !SLAVE_ONLY SSL_USES= ssl SSL_CONFIGURE_WITH= openssl PAM_CONFIGURE_WITH= pam XML_CONFIGURE_WITH= libxml XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 TZDATA_CONFIGURE_OFF= --with-system-tzdata=/usr/share/zoneinfo NLS_CONFIGURE_ENABLE= nls NLS_USES= gettext LDAP_CONFIGURE_WITH= ldap LDAP_USES= ldap OPTIMIZED_CFLAGS_CFLAGS=-O3 -funroll-loops DEBUG_CONFIGURE_ENABLE= debug PLIST_SUB+= PG_VERSION=${PORTVERSION:R} \ PG_USER=${PG_USER} \ PG_USER_regex=[[:<:]]${PG_USER}[[:>:]] \ PG_GROUP=${PG_GROUP} \ PG_GROUP_regex=[[:<:]]${PG_GROUP}[[:>:]] SUB_LIST+= PG_VERSION=${PORTVERSION:R} \ PG_GROUP=${PG_GROUP} \ PG_USER=${PG_USER} \ PG_UID=${PG_UID} .include # i386 older than Pentium lacks SSE2 so the binary will not run if we build with clang -msse2 # For such ancient CPUs, gcc must be used to build PostgreSQL. # https://www.postgresql.org/message-id/20190307140421.GA8362%40gate.oper.dinoex.org .if ${ARCH} == "i386" CFLAGS+= -msse2 .endif # For testing files in FILESDIR .include .if ${PORT_OPTIONS:MLLVM} INSTALL_DIRS+= src/backend/jit/llvm .endif .if defined(SERVER_ONLY) pre-build: @${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL .endif .if !defined(NO_BUILD) && !target(do-build) do-build: @ cd ${WRKSRC}/src/backend && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} generated-headers @ for dir in ${BUILD_DIRS}; do \ cd ${WRKSRC}/$${dir} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ; \ done . if defined(CLIENT_ONLY) @ cd ${WRKSRC}/doc && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} man . endif . if exists(${FILESDIR}/pkg-message${COMPONENT}.in) SUB_FILES+= pkg-message${COMPONENT} PKGMESSAGE= ${WRKSRC}/pkg-message${COMPONENT} . endif . if exists(${FILESDIR}/pkg-install${COMPONENT}.in) SUB_FILES+= pkg-install${COMPONENT} . endif post-patch: . if defined(CLIENT_ONLY) && !defined(OPENSSL_PORT) @${REINPLACE_CMD} \ -e '/^PKG_CONFIG_REQUIRES_PRIVATE = libssl libcrypto/d' \ ${WRKSRC}/src/interfaces/libpq/Makefile . endif do-install: @for dir in ${INSTALL_DIRS}; do \ cd ${WRKSRC}/$${dir} && \ ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${INSTALL_TARGET}; \ done . if defined(SERVER_ONLY) @ ${MKDIR} ${STAGEDIR}${PREFIX}/share/postgresql ;\ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily ;\ ${INSTALL_SCRIPT} ${WRKDIR}/502.pgsql \ ${STAGEDIR}${PREFIX}/etc/periodic/daily . endif # SERVER_ONLY . if defined(CLIENT_ONLY) @ cd ${WRKSRC}/src && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-local @ cd ${WRKSRC}/doc/src/sgml && ${COPYTREE_SHARE} "man1 man3 man7" ${STAGEDIR}${PREFIX}/share/man . endif @ if [ -r ${PKGMESSAGE} ]; then \ ${MKDIR} ${STAGEDIR}${DOCSDIR} ;\ ${INSTALL_DATA} ${PKGMESSAGE} ${STAGEDIR}${DOCSDIR}/README${COMPONENT} ;\ fi .endif # !NO_BUILD .if defined(SERVER_ONLY) check: @if [ `id -u` != 0 ] ; then \ ${ECHO} "Running postgresql regressions tests" ;\ cd ${WRKSRC}; ${MAKE_CMD} check ;\ else \ ${ECHO} "You cannot run regression tests when postgresql is built as user root." ; \ ${ECHO} "Clean and rebuild the port as a regular user to run the tests." ;\ fi .endif .include diff --git a/databases/postgresql17-server/distinfo b/databases/postgresql17-server/distinfo index 9487a5b669c8..24f0a6d70703 100644 --- a/databases/postgresql17-server/distinfo +++ b/databases/postgresql17-server/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1739277665 -SHA256 (postgresql/postgresql-17.3.tar.bz2) = 13c18b35bf67a97bd639925fc581db7fd2aae4d3548eac39fcdb8da74ace2bea -SIZE (postgresql/postgresql-17.3.tar.bz2) = 21520115 +TIMESTAMP = 1739873710 +SHA256 (postgresql/postgresql-17.4.tar.bz2) = c4605b73fea11963406699f949b966e5d173a7ee0ccaef8938dec0ca8a995fe7 +SIZE (postgresql/postgresql-17.4.tar.bz2) = 21519810 diff --git a/databases/postgresql17-server/files/postgresql.in b/databases/postgresql17-server/files/postgresql.in index 3cf6475a9a9b..073d3a64c004 100644 --- a/databases/postgresql17-server/files/postgresql.in +++ b/databases/postgresql17-server/files/postgresql.in @@ -1,123 +1,125 @@ #!/bin/sh # PROVIDE: postgresql # REQUIRE: DAEMON mountlate # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable PostgreSQL: # # postgresql_enable="YES" # # optional # postgresql_data="/var/db/%%PG_USER%%/data%%PG_VERSION%%" # postgresql_flags="-w -s -m fast" # postgresql_initdb_flags="--encoding=utf-8 --lc-collate=C" # # leave empty to use the login class set in in /etc/passwd: # postgresql_login_class="my_custom_login_class" # postgresql_profiles="" # # See %%PREFIX%%/share/doc/postgresql/README-server for more info # # This scripts takes one of the following commands: # # start stop restart reload status initdb # # For postmaster startup options, edit ${postgresql_data}/postgresql.conf command=%%PREFIX%%/bin/pg_ctl . /etc/rc.subr load_rc_config postgresql # set defaults : ${postgresql_enable:="NO"} : ${postgresql_flags:="-w -s -m fast"} : ${postgresql_user:="%%PG_USER%%"} eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%" : ${postgresql_data:="${_pgdir}"} : ${postgresql_login_class:=""} : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"} : ${postgresql_svcj_options:="net_basic"} name=postgresql rcvar=postgresql_enable extra_commands="reload initdb" start_cmd="postgresql_command start" stop_cmd="postgresql_command stop" restart_cmd="postgresql_command restart" reload_cmd="postgresql_command reload" status_cmd="postgresql_command status" promote_cmd="postgresql_command promote" initdb_cmd="postgresql_initdb" su_cmd="/usr/bin/su" if [ -n "$2" ]; then profile="$2" if [ "x${postgresql_profiles}" != "x" ]; then eval postgresql_data="\${postgresql_${profile}_data:-}" if [ "x${postgresql_data}" = "x" ]; then echo "You must define a data directory (postgresql_${profile}_data)" exit 1 fi eval postgresql_enable="\${postgresql_${profile}_enable:-${postgresql_enable}}" eval postgresql_data="\${postgresql_${profile}_data:-${postgresql_data}}" eval postgresql_flags="\${postgresql_${profile}_flags:-${postgresql_flags}}" eval postgresql_login_class="\${postgresql_${profile}_login_class:-${postgresql_login_class}}" eval postgresql_initdb_flags="\${postgresql_${profile}_initdb_flags:-${postgresql_initdb_flags}}" fi else if [ "x${postgresql_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${postgresql_profiles}; do eval _enable="\${postgresql_${profile}_enable}" case "x${_enable:-${postgresql_enable}}" in x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee]) continue ;; x[Yy][Ee][Ss]) ;; *) if test -z "$_enable"; then _var=postgresql_enable else _var=postgresql_"${profile}"_enable fi echo "Bad value" \ "'${_enable:-${postgresql_enable}}'" \ "for ${_var}. " \ "Profile ${profile} skipped." continue ;; esac echo "===> postgresql profile: ${profile}" %%PREFIX%%/etc/rc.d/postgresql $1 ${profile} retcode="$?" if [ "0${retcode}" -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi -command_args="-D ${postgresql_data} ${postgresql_flags}" +command_args="-l /dev/null -D ${postgresql_data} ${postgresql_flags}" postgresql_command() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec ${command} ${command_args} ${rc_arg}" } postgresql_initdb() { + echo "${rc_arg} ${name}" ${su_cmd} ${postgresql_login_class:+-c ${postgresql_login_class}} \ -l ${postgresql_user} \ -c "exec %%PREFIX%%/bin/initdb ${postgresql_initdb_flags} -D ${postgresql_data} -U ${postgresql_user}" } run_rc_command "$1"