From patchwork Thu Nov 21 10:15:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pascal de Bruijn X-Patchwork-Id: 1198865 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=unilogic.nl Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=unilogic.nl header.i=@unilogic.nl header.b="ki34rF0A"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Jb703wNBz9sPj for ; Thu, 21 Nov 2019 21:15:56 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2F4A12151E; Thu, 21 Nov 2019 10:15:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xzrrZjaZ5HYv; Thu, 21 Nov 2019 10:15:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 6FC3A204BC; Thu, 21 Nov 2019 10:15:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id ABC9A1BF372 for ; Thu, 21 Nov 2019 10:15:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A7FE487EB8 for ; Thu, 21 Nov 2019 10:15:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6zCpH3lN6OLN for ; Thu, 21 Nov 2019 10:15:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-out123.unilogicnetworks.net (mail-out123.unilogicnetworks.net [62.133.206.123]) by whitealder.osuosl.org (Postfix) with ESMTPS id 04FE887EB4 for ; Thu, 21 Nov 2019 10:15:48 +0000 (UTC) Received: from mail.unilogic.nl (unknown [62.133.204.111]) by mail.unilogicnetworks.net (Postfix) with ESMTPS id 70FC34A289; Thu, 21 Nov 2019 11:15:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=unilogic.nl; s=mail; h=from:subject:date:message-id:to:cc; bh=Iz7cpvhpT0TeduO8q+0WG/H+juaSYCb825Ex2dAITN8=; b=ki34rF0AzDTaoH0Jwf4bfo2M5/ZUuB2U4TAxPLFTXFQZIM0AiPngIxRsu9weongHH3uMbMw7PykDG FT26mWS7V7cne1UTs6KE+auVbw1ZisfojEKjffOcbsrEJo5gK3Eq/JzgQ01tCFaBY3g4NeXr6QQELH rn/K2YdrGyygUwP8dPadSyoMZjqx7JBFUTlxX/dnKPU90xErbgGi8xPwN/6WbcRvmYbOmY12BI2Ps3 cj9drvsO/3G5ZMUirulsbUV/lOy0IbCP3rtUfhxNy3y6lV5uejD2wG9EgeMKZdxnaiR3hht1wLcSvG PPl9976pGuvQRRsTHJjurL94dmvzV0A== X-Kerio-Anti-Spam: Build: [Engines: 2.15.9.1281, Stamp: 3], Multi: [Enabled, t: (0.000006, 0.004369)], BW: [Enabled, t: (0.000007)], RTDA: [Enabled, t: (0.046316), Hit: No, Details: v2.7.64; Id: 15.1i6to35.1dq6nbpa6.6s5pu], total: 0(700) X-Footer: dW5pbG9naWMubmw= Received: from localhost ([127.0.0.1]) by mail.unilogic.nl with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Thu, 21 Nov 2019 11:15:42 +0100 From: Pascal de Bruijn To: buildroot@busybox.net Date: Thu, 21 Nov 2019 11:15:38 +0100 Message-Id: <20191121101538.6788-1-p.debruijn@unilogic.nl> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH 1/2] package/postgresql: explicitly use en_US.UTF-8 locale for initdb X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pascal de Bruijn , Pascal de Bruijn MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Pascal de Bruijn postgres[290]: initdb: error: invalid locale settings; check LANG and LC_* environment variables postgres[290]: pg_ctl: database system initialization failed Signed-off-by: Pascal de Bruijn --- package/postgresql/Config.in | 2 ++ package/postgresql/S50postgresql | 2 +- package/postgresql/postgresql.service | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package/postgresql/Config.in b/package/postgresql/Config.in index e548d3c..e912249 100644 --- a/package/postgresql/Config.in +++ b/package/postgresql/Config.in @@ -17,6 +17,8 @@ config BR2_PACKAGE_POSTGRESQL Enable the zlib package to gain builtin compression for archives with pg_dump and pg_restore. + NOTE: PostgreSQL needs a working en_US.UTF-8 locale (BR2_GENERATE_LOCALE) + http://www.postgresql.org comment "postgresql needs a toolchain w/ dynamic library, wchar" diff --git a/package/postgresql/S50postgresql b/package/postgresql/S50postgresql index 1ece4fc..3c0c520 100644 --- a/package/postgresql/S50postgresql +++ b/package/postgresql/S50postgresql @@ -7,7 +7,7 @@ umask 077 if [ ! -f /var/lib/pgsql/PG_VERSION ]; then echo "Initializing postgresql data base..." - su - postgres -c '/usr/bin/pg_ctl initdb -D /var/lib/pgsql' + su - postgres -c '/usr/bin/pg_ctl initdb -D /var/lib/pgsql -o --locale=en_US.UTF-8' echo "done" fi diff --git a/package/postgresql/postgresql.service b/package/postgresql/postgresql.service index 53e6f84..4bbe742 100644 --- a/package/postgresql/postgresql.service +++ b/package/postgresql/postgresql.service @@ -17,7 +17,7 @@ StandardError=syslog SyslogIdentifier=postgres PIDFile=/var/lib/pgsql/postmaster.pid -ExecStartPre=/bin/sh -c "if [ ! -f /var/lib/pgsql/PG_VERSION ]; then /usr/bin/pg_ctl initdb -D /var/lib/pgsql; fi" +ExecStartPre=/bin/sh -c "if [ ! -f /var/lib/pgsql/PG_VERSION ]; then /usr/bin/pg_ctl initdb -D /var/lib/pgsql -o --locale=en_US.UTF-8; fi" ExecStart=/usr/bin/postgres -D /var/lib/pgsql ExecReload=/usr/bin/kill -HUP $MAINPID KillMode=mixed From patchwork Thu Nov 21 10:15:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pascal de Bruijn X-Patchwork-Id: 1198866 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=unilogic.nl Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=unilogic.nl header.i=@unilogic.nl header.b="CWsiGgVp"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Jb7F54WPz9sPj for ; Thu, 21 Nov 2019 21:16:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B1074887EF; Thu, 21 Nov 2019 10:16:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wpzLrsYBCK7M; Thu, 21 Nov 2019 10:15:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9533C887DC; Thu, 21 Nov 2019 10:15:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 712D21BF372 for ; Thu, 21 Nov 2019 10:15:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6C15187EBC for ; Thu, 21 Nov 2019 10:15:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VNWYkAggHSzy for ; Thu, 21 Nov 2019 10:15:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-out123.unilogicnetworks.net (mail-out123.unilogicnetworks.net [62.133.206.123]) by whitealder.osuosl.org (Postfix) with ESMTPS id BF36A87EB8 for ; Thu, 21 Nov 2019 10:15:57 +0000 (UTC) Received: from mail.unilogic.nl (unknown [62.133.204.111]) by mail.unilogicnetworks.net (Postfix) with ESMTPS id 885594A2E3; Thu, 21 Nov 2019 11:15:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=unilogic.nl; s=mail; h=from:subject:date:message-id:to:cc; bh=MLKUR3l2vVIEyrba/ZthYR5mBDbNRVdcw0LR/QvE95E=; b=CWsiGgVpBm9+Y+pv7UzIo0W9vAtE4ATe5gYokWFyWcbFO0oppPaNGvtav2EZGQMwycyT2Eh+Kap4W 6QT7vT58QWB1B8MxVhEiALUisDe2xCeVToVgk0JecY62O/2lsGSFGuLHfRvBwGwyRwME6zlgshpxkl cDHEj2PCi9HfYSX7A4FBRKiG1CjB3bqTdswvb7A1kQjgLhQXFRt52/hIlsWAgdhaKQ7fkwV9H33mDk DGrXHiBDiITrfqibzyULv2xSPwaN76nlZDlPVa4rcKzmUSXPVDI74NYerBjty+YJkNGPw6m0wPZl1J E52r6EH+vX+M65aoLdUEYfmBy9JeB/A== X-Kerio-Anti-Spam: Build: [Engines: 2.15.9.1281, Stamp: 3], Multi: [Enabled, t: (0.000006, 0.003299)], BW: [Enabled, t: (0.000007)], RTDA: [Enabled, t: (0.044729), Hit: No, Details: v2.7.64; Id: 15.1i61gen.1dq6nc515.6jg5l], total: 0(700) X-Footer: dW5pbG9naWMubmw= Received: from localhost ([127.0.0.1]) by mail.unilogic.nl with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Thu, 21 Nov 2019 11:15:56 +0100 From: Pascal de Bruijn To: buildroot@busybox.net Date: Thu, 21 Nov 2019 11:15:52 +0100 Message-Id: <20191121101552.6845-1-p.debruijn@unilogic.nl> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH 2/2] package/postgresql: enable data checksums by default for initdb X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pascal de Bruijn , Pascal de Bruijn MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Pascal de Bruijn This makes PostgreSQL as robust as possible by default Signed-off-by: Pascal de Bruijn --- package/postgresql/S50postgresql | 2 +- package/postgresql/postgresql.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/postgresql/S50postgresql b/package/postgresql/S50postgresql index 3c0c520..ce72e12 100644 --- a/package/postgresql/S50postgresql +++ b/package/postgresql/S50postgresql @@ -7,7 +7,7 @@ umask 077 if [ ! -f /var/lib/pgsql/PG_VERSION ]; then echo "Initializing postgresql data base..." - su - postgres -c '/usr/bin/pg_ctl initdb -D /var/lib/pgsql -o --locale=en_US.UTF-8' + su - postgres -c '/usr/bin/pg_ctl initdb -D /var/lib/pgsql -o --locale=en_US.UTF-8 -o --data-checksums' echo "done" fi diff --git a/package/postgresql/postgresql.service b/package/postgresql/postgresql.service index 4bbe742..2f5d2a9 100644 --- a/package/postgresql/postgresql.service +++ b/package/postgresql/postgresql.service @@ -17,7 +17,7 @@ StandardError=syslog SyslogIdentifier=postgres PIDFile=/var/lib/pgsql/postmaster.pid -ExecStartPre=/bin/sh -c "if [ ! -f /var/lib/pgsql/PG_VERSION ]; then /usr/bin/pg_ctl initdb -D /var/lib/pgsql -o --locale=en_US.UTF-8; fi" +ExecStartPre=/bin/sh -c "if [ ! -f /var/lib/pgsql/PG_VERSION ]; then /usr/bin/pg_ctl initdb -D /var/lib/pgsql -o --locale=en_US.UTF-8 -o --data-checksums; fi" ExecStart=/usr/bin/postgres -D /var/lib/pgsql ExecReload=/usr/bin/kill -HUP $MAINPID KillMode=mixed