From 0242b01e0b7af48528c10d641da25a361039e730 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Wed, 26 May 2021 14:56:21 +0800 Subject: [PATCH] postgresql: update for stx 5.0 update the PGDATA with correct STX_REL for stx 5.0 Story: 2008952 Task: 42576 Signed-off-by: Jackie Huang Change-Id: Id5cceed6551e9af4c7cb17753b55c01b5357ad15 --- .../postgresql/postgresql/postgresql.service.update | 2 +- meta-stx-integ/recipes-dbs/postgresql/postgresql_%.bbappend | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/meta-stx-integ/recipes-dbs/postgresql/postgresql/postgresql.service.update b/meta-stx-integ/recipes-dbs/postgresql/postgresql/postgresql.service.update index 9fe8b51..f9eacbd 100644 --- a/meta-stx-integ/recipes-dbs/postgresql/postgresql/postgresql.service.update +++ b/meta-stx-integ/recipes-dbs/postgresql/postgresql/postgresql.service.update @@ -11,7 +11,7 @@ Group=postgres Environment=PGPORT=5432 # Location of database directory -Environment=PGDATA=/var/lib/postgresql/19.12 +Environment=PGDATA=/var/lib/postgresql/@STX_REL@ # Disable OOM kill on the postmaster OOMScoreAdjust=-17 diff --git a/meta-stx-integ/recipes-dbs/postgresql/postgresql_%.bbappend b/meta-stx-integ/recipes-dbs/postgresql/postgresql_%.bbappend index 3096226..5457383 100644 --- a/meta-stx-integ/recipes-dbs/postgresql/postgresql_%.bbappend +++ b/meta-stx-integ/recipes-dbs/postgresql/postgresql_%.bbappend @@ -10,8 +10,9 @@ SRC_URI += " \ " do_install_append() { - install -d ${D}${systemd_unitdir}/system - install -m 0755 ${WORKDIR}/postgresql.service.update ${D}${systemd_unitdir}/system/postgresql.service + install -d ${D}${systemd_unitdir}/system + install -m 0755 ${WORKDIR}/postgresql.service.update ${D}${systemd_unitdir}/system/postgresql.service + sed -i -e "s/@STX_REL@/${STX_REL}/" ${D}${systemd_unitdir}/system/postgresql.service } FILES_${PN} += "${systemd_unitdir}/system/postgresql.service"