postgresql: Fix the buildpaths issue

Fixes:
  WARNING: postgresql-14.4-r0 do_package_qa: QA Issue: File /usr/bin/postgres in package postgresql contains reference to TMPDIR
  File /usr/bin/pg_config in package postgresql contains reference to TMPDIR [buildpaths]
  WARNING: postgresql-14.4-r0 do_package_qa: QA Issue: File /usr/include/pg_config.h in package libpq-dev contains reference to TMPDIR [buildpaths]
  WARNING: postgresql-14.4-r0 do_package_qa: QA Issue: File /usr/include/postgresql/server/pg_config.h in package postgresql-server-dev contains reference to TMPDIR
  File /usr/lib/postgresql/pgxs/src/Makefile.global in package postgresql-server-dev contains reference to TMPDIR [buildpaths]
  WARNING: postgresql-14.4-r0 do_package_qa: QA Issue: File /usr/lib/libpgcommon.a in package postgresql-staticdev contains reference to TMPDIR
  File /usr/lib/libpgcommon_shlib.a in package postgresql-staticdev contains reference to TMPDIR [buildpaths]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 59eff6269c)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Mingli Yu
2022-08-01 17:04:32 +08:00
committed by Armin Kuster
parent 2594e97778
commit fe7250a321
3 changed files with 119 additions and 0 deletions
@@ -215,6 +215,14 @@ do_install:append() {
install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system
sed -i -e 's,@BINDIR@,${bindir},g' \
${D}${systemd_unitdir}/system/postgresql.service
# Remove the build path
if [ -f ${D}${libdir}/${BPN}/pgxs/src/Makefile.global ]; then
sed -i -e 's#${RECIPE_SYSROOT}##g' \
-e 's#${RECIPE_SYSROOT_NATIVE}##g' \
-e 's#${WORKDIR}##g' \
-e 's#${TMPDIR}##g' \
${D}${libdir}/${BPN}/pgxs/src/Makefile.global
fi
}
SSTATE_SCAN_FILES += "Makefile.global"