Date: Wed, 13 Dec 2006 17:02:42 -0600 From: "Mark Kane" <mark@mkproductions.org> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Cc: girgen@FreeBSD.org Subject: ports/106696: [PATCH] databases/postgresql82-server - initdb in RC Script Doesn't Set Encoding Message-ID: <1166050962.27474@amd64.localhost> Resent-Message-ID: <200612132310.kBDNA8YB080089@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 106696 >Category: ports >Synopsis: [PATCH] databases/postgresql82-server - initdb in RC Script Doesn't Set Encoding >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Dec 13 23:10:02 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Mark Kane >Release: FreeBSD 6.1-RELEASE >Organization: MKProductions >Environment: FreeBSD server1.domain 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Mon Sep 18 14:24:33 CDT 2006 admin@server1.domain:/usr/obj/usr/src/sys/QUOTA i386 >Description: Hi. When installing PostgreSQL 8.2 and doing an initdb through the RC script, the encoding does not get set properly. The "${postgresql_initdb_flags}" variable is not part of the initdb command that gets executed through the script, so neither the default of utf-8 or anything that would be set custom by the user gets passed to initdb to be set. Also, the option of "--lc-collate" is listed incorrectly as "--lc_collate" in the RC script, which doesn't work. Thanks! -Mark >How-To-Repeat: >Fix: --- postgresql.patch begins here --- --- postgresql.in.orig Wed Dec 13 16:18:52 2006 +++ postgresql.in Wed Dec 13 16:44:33 2006 @@ -12,7 +12,7 @@ # # optional # postgresql_data="%%PREFIX%%/pgsql/data" # postgresql_flags="-w -s -m fast" -# postgresql_initdb_flags="--encoding=utf-8 --lc_collate=C" +# postgresql_initdb_flags="--encoding=utf-8 --lc-collate=C" # postgresql_class="default" # # See %%PREFIX%%/share/doc/postgresql/README-server for more info @@ -36,7 +36,7 @@ postgresql_user=pgsql eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data"} postgresql_class=${postgresql_class:-"default"} -postgresql_initdb_flags=${postgresql_initdb_flags:-"--encoding=utf-8 --lc_collate=C"} +postgresql_initdb_flags=${postgresql_initdb_flags:-"--encoding=utf-8 --lc-collate=C"} name=postgresql rcvar=`set_rcvar` @@ -58,7 +58,7 @@ postgresql_initdb() { - su -l -c ${postgresql_class} ${postgresql_user} -c "exec ${prefix}/bin/initdb -D ${postgresql_data}" + su -l -c ${postgresql_class} ${postgresql_user} -c "exec ${prefix}/bin/initdb -D ${postgresql_data} ${postgresql_initdb_flags}" } run_rc_command "$1" --- postgresql.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1166050962.27474>