Message ID | 1678927382-19409-1-git-send-email-leimaohui@fujitsu.com |
---|---|
State | Under Review |
Headers | show |
Series | [meta-oe,v3] pgpool2: Added a new recipe. | expand |
fails layer compliance check stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Nothing PROVIDES 'libmemcached' (but /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb DEPENDS on or otherwise requires it) stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. stdio: ERROR: Command . ./oe-init-build-env; yocto-check-layer-wrapper ../meta-openembedded failed with exit code 2, see errors above. (1678932843.1: 1655.9) memcached is in meta-networking so either move this recipe to meta-networking or somehow make memcached optional and non-default via packageconfig On Wed, Mar 15, 2023 at 5:43 PM leimaohui <leimaohui@fujitsu.com> wrote: > > Pgpool-II is a middleware that works between PostgreSQL servers and a PostgreSQL database client. It is distributed under a license similar to BSD and MIT. It provides the following features. > > Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> > --- > ...0001-Fix-build-error-when-build-this-file.patch | 32 +++++++++++++ > .../recipes-support/pgpool2/pgpool2/pgpool.service | 17 +++++++ > .../pgpool2/pgpool2/pgpool.sysconfig | 7 +++ > meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb | 52 ++++++++++++++++++++++ > 4 files changed, 108 insertions(+) > create mode 100644 meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch > create mode 100644 meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service > create mode 100644 meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig > create mode 100644 meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb > > diff --git a/meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch b/meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch > new file mode 100644 > index 0000000..52bcc3b > --- /dev/null > +++ b/meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch > @@ -0,0 +1,32 @@ > +From f8ab74a76049f69adeebe92c62593547e05a075d Mon Sep 17 00:00:00 2001 > +From: Lei Maohui <leimaohui@fujitsu.com> > +Date: Wed, 11 Jan 2023 17:22:41 +0900 > +Subject: [PATCH] Fix build error when build this file. > + > +| snprintf.c:770:64: error: 'PG_STRERROR_R_BUFLEN' undeclared (first use in this function) > +| 770 | char errbuf[PG_STRERROR_R_BUFLEN]; > +| | ^~~~~~~~~~~~~~~~~~~~ > + > +PG_STRERROR_R_BUFLEN is defined in postgresql, but pgpool doesn't > +include the header of postgresql. > + > +Upstream-Status: Inappropriate [OE-Specific] > +Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> > +--- > + src/parser/snprintf.c | 1 + > + 1 file changed, 1 insertion(+) > + > +diff --git a/src/parser/snprintf.c b/src/parser/snprintf.c > +index 84ebdb2..3387897 100644 > +--- a/src/parser/snprintf.c > ++++ b/src/parser/snprintf.c > +@@ -46,6 +46,7 @@ > + #include "pool_parser.h" > + #include "stringinfo.h" > + #include "utils/palloc.h" > ++#include "postgresql/server/port.h" > + > + /* > + * We used to use the platform's NL_ARGMAX here, but that's a bad idea, > +-- > +2.25.1 > diff --git a/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service > new file mode 100644 > index 0000000..bf2d323 > --- /dev/null > +++ b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service > @@ -0,0 +1,17 @@ > +[Unit] > +Description=Pgpool-II > +After=syslog.target network.target > + > +[Service] > + > +User=postgres > +Group=postgres > + > +EnvironmentFile=-/etc/sysconfig/pgpool > + > +ExecStart=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $OPTS > +ExecStop=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $STOP_OPTS stop > +ExecReload=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf reload > + > +[Install] > +WantedBy=multi-user.target > diff --git a/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig > new file mode 100644 > index 0000000..ea13089 > --- /dev/null > +++ b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig > @@ -0,0 +1,7 @@ > +# Options for pgpool > + > +# -n: don't run in daemon mode. does not detach control tty > +# -d: debug mode. lots of debug information will be printed > + > +#OPTS=" -d -n" > +OPTS=" -n" > diff --git a/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb b/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb > new file mode 100644 > index 0000000..9220c87 > --- /dev/null > +++ b/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb > @@ -0,0 +1,52 @@ > +SUMMARY = "a language independent connection pool server for PostgreSQL." > + > +DESCRIPTION = "Pgpool-II is a middleware that works between PostgreSQL \ > + servers and a PostgreSQL database client. It is distributed \ > + under a license similar to BSD and MIT. It provides the \ > + following features." > + > +HOMEPAGE = "http://pgpool.net" > + > +LICENSE = "BSD-2-Clause" > +LIC_FILES_CHKSUM = "file://COPYING;md5=e4b38de086d73e0521de0bbdbaa4a1a9" > + > +SRC_URI = "http://www.pgpool.net/mediawiki/images/pgpool-II-${PV}.tar.gz \ > + file://0001-Fix-build-error-when-build-this-file.patch \ > + file://pgpool.sysconfig \ > + file://pgpool.service \ > + " > +SRC_URI[sha256sum] = "4b379bbba8e178128a1cee4a5bd1ae116dedb3da6121b728c18f0f54c881f328" > + > +S = "${WORKDIR}/pgpool-II-${PV}" > + > +inherit autotools systemd > + > +SYSTEMD_SERVICE:${PN} = "pgpool.service" > + > +PACKAGECONFIG ??= " openssl libmemcached postgresql \ > +" > +PACKAGECONFIG[pam] = "--with-pam,,libpam" > +PACKAGECONFIG[openssl] = "--with-openssl,,openssl" > +PACKAGECONFIG[libmemcached] = "--with-memcached=${STAGING_INCDIR}/libmemcachedutil-1.0,,libmemcached" > +PACKAGECONFIG[postgresql] = "--with-pgsql-includedir=${STAGING_INCDIR}/postgresql,, postgresql" > + > +EXTRA_OECONF += "--disable-static \ > + --disable-rpath \ > + " > +B = "${S}" > +CFLAGS:append = " -fcommon " > + > +FILES:${PN} += "${datadir}/pgpool-II/ " > + > +do_configure:append() { > + echo "#define HAVE_STRCHRNUL 1" >> ${S}/src/include/config.h > + sed -i "s,#define USE_REPL_SNPRINTF 1,/* #undef USE_REPL_SNPRINTF*/,g" ${S}/src/include/config.h > +} > + > +do_install:append() { > + install -d ${D}${sysconfdir}/pgpool-II > + install -D -m 0644 ${WORKDIR}/pgpool.sysconfig ${D}${sysconfdir}/pgpool-II/pgpool.conf > + install -D -m 0644 ${S}/src/sample/pcp.conf.sample ${D}${sysconfdir}/pgpool-II/pcp.conf > + install -D -m 0644 ${S}/src/sample/pool_hba.conf.sample ${D}${sysconfdir}/pgpool-II/pool_hba.conf > + install -Dm 0644 ${WORKDIR}/pgpool.service ${D}${systemd_system_unitdir}/pgpool.service > +} > -- > 1.8.3.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#101568): https://lists.openembedded.org/g/openembedded-devel/message/101568 > Mute This Topic: https://lists.openembedded.org/mt/97641513/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Hi Raj, > memcached is in meta-networking so either move this recipe to > meta-networking or somehow make memcached optional and non-default via > packageconfig Ok, I got it. I'll move this recipe to meta-networking in V4. Thank you very much. Best regards Lei > -----Original Message----- > From: Khem Raj <raj.khem@gmail.com> > Sent: Thursday, March 16, 2023 12:03 PM > To: Lei, Maohui <leimaohui@fujitsu.com> > Cc: openembedded-devel@lists.openembedded.org > Subject: Re: [oe] [meta-oe][PATCH v3] pgpool2: Added a new recipe. > > fails layer compliance check > > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Nothing PROVIDES 'libmemcached' (but > /home/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-oe/ > recipes-support/pgpool2/pgpool2_4.4.1.bb > DEPENDS on or otherwise requires it) > stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable > providers. > stdio: ERROR: Command . ./oe-init-build-env; > yocto-check-layer-wrapper ../meta-openembedded failed with exit code 2, see > errors above. > (1678932843.1: 1655.9) > > memcached is in meta-networking so either move this recipe to > meta-networking or somehow make memcached optional and non-default via > packageconfig > > On Wed, Mar 15, 2023 at 5:43 PM leimaohui <leimaohui@fujitsu.com> wrote: > > > > Pgpool-II is a middleware that works between PostgreSQL servers and a > PostgreSQL database client. It is distributed under a license similar to BSD and > MIT. It provides the following features. > > > > Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> > > --- > > ...0001-Fix-build-error-when-build-this-file.patch | 32 +++++++++++++ > > .../recipes-support/pgpool2/pgpool2/pgpool.service | 17 +++++++ > > .../pgpool2/pgpool2/pgpool.sysconfig | 7 +++ > > meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb | 52 > ++++++++++++++++++++++ > > 4 files changed, 108 insertions(+) > > create mode 100644 > > meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-buil > > d-this-file.patch create mode 100644 > > meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service > > create mode 100644 > > meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig > > create mode 100644 meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb > > > > diff --git > > a/meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-bu > > ild-this-file.patch > > b/meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-bu > > ild-this-file.patch > > new file mode 100644 > > index 0000000..52bcc3b > > --- /dev/null > > +++ b/meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-whe > > +++ n-build-this-file.patch > > @@ -0,0 +1,32 @@ > > +From f8ab74a76049f69adeebe92c62593547e05a075d Mon Sep 17 00:00:00 > > +2001 > > +From: Lei Maohui <leimaohui@fujitsu.com> > > +Date: Wed, 11 Jan 2023 17:22:41 +0900 > > +Subject: [PATCH] Fix build error when build this file. > > + > > +| snprintf.c:770:64: error: 'PG_STRERROR_R_BUFLEN' undeclared (first use in > this function) > > +| 770 | char > errbuf[PG_STRERROR_R_BUFLEN]; > > +| | > ^~~~~~~~~~~~~~~~~~~~ > > + > > +PG_STRERROR_R_BUFLEN is defined in postgresql, but pgpool doesn't > > +include the header of postgresql. > > + > > +Upstream-Status: Inappropriate [OE-Specific] > > +Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> > > +--- > > + src/parser/snprintf.c | 1 + > > + 1 file changed, 1 insertion(+) > > + > > +diff --git a/src/parser/snprintf.c b/src/parser/snprintf.c index > > +84ebdb2..3387897 100644 > > +--- a/src/parser/snprintf.c > > ++++ b/src/parser/snprintf.c > > +@@ -46,6 +46,7 @@ > > + #include "pool_parser.h" > > + #include "stringinfo.h" > > + #include "utils/palloc.h" > > ++#include "postgresql/server/port.h" > > + > > + /* > > + * We used to use the platform's NL_ARGMAX here, but that's a bad > > +idea, > > +-- > > +2.25.1 > > diff --git a/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service > > b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service > > new file mode 100644 > > index 0000000..bf2d323 > > --- /dev/null > > +++ b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service > > @@ -0,0 +1,17 @@ > > +[Unit] > > +Description=Pgpool-II > > +After=syslog.target network.target > > + > > +[Service] > > + > > +User=postgres > > +Group=postgres > > + > > +EnvironmentFile=-/etc/sysconfig/pgpool > > + > > +ExecStart=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $OPTS > > +ExecStop=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $STOP_OPTS > > +stop ExecReload=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf reload > > + > > +[Install] > > +WantedBy=multi-user.target > > diff --git a/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig > > b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig > > new file mode 100644 > > index 0000000..ea13089 > > --- /dev/null > > +++ b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig > > @@ -0,0 +1,7 @@ > > +# Options for pgpool > > + > > +# -n: don't run in daemon mode. does not detach control tty # -d: > > +debug mode. lots of debug information will be printed > > + > > +#OPTS=" -d -n" > > +OPTS=" -n" > > diff --git a/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb > > b/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb > > new file mode 100644 > > index 0000000..9220c87 > > --- /dev/null > > +++ b/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb > > @@ -0,0 +1,52 @@ > > +SUMMARY = "a language independent connection pool server for > PostgreSQL." > > + > > +DESCRIPTION = "Pgpool-II is a middleware that works between PostgreSQL \ > > + servers and a PostgreSQL database client. It is distributed \ > > + under a license similar to BSD and MIT. It provides the \ > > + following features." > > + > > +HOMEPAGE = "http://pgpool.net" > > + > > +LICENSE = "BSD-2-Clause" > > +LIC_FILES_CHKSUM = > "file://COPYING;md5=e4b38de086d73e0521de0bbdbaa4a1a9" > > + > > +SRC_URI = "http://www.pgpool.net/mediawiki/images/pgpool-II-${PV}.tar.gz > \ > > + file://0001-Fix-build-error-when-build-this-file.patch \ > > + file://pgpool.sysconfig \ > > + file://pgpool.service \ > > + " > > +SRC_URI[sha256sum] = > "4b379bbba8e178128a1cee4a5bd1ae116dedb3da6121b728c18f0f54c881f328" > > + > > +S = "${WORKDIR}/pgpool-II-${PV}" > > + > > +inherit autotools systemd > > + > > +SYSTEMD_SERVICE:${PN} = "pgpool.service" > > + > > +PACKAGECONFIG ??= " openssl libmemcached postgresql \ " > > +PACKAGECONFIG[pam] = "--with-pam,,libpam" > > +PACKAGECONFIG[openssl] = "--with-openssl,,openssl" > > +PACKAGECONFIG[libmemcached] = > "--with-memcached=${STAGING_INCDIR}/libmemcachedutil-1.0,,libmemcached > " > > +PACKAGECONFIG[postgresql] = > "--with-pgsql-includedir=${STAGING_INCDIR}/postgresql,, postgresql" > > + > > +EXTRA_OECONF += "--disable-static \ > > + --disable-rpath \ > > + " > > +B = "${S}" > > +CFLAGS:append = " -fcommon " > > + > > +FILES:${PN} += "${datadir}/pgpool-II/ " > > + > > +do_configure:append() { > > + echo "#define HAVE_STRCHRNUL 1" >> ${S}/src/include/config.h > > + sed -i "s,#define USE_REPL_SNPRINTF 1,/* #undef > > +USE_REPL_SNPRINTF*/,g" ${S}/src/include/config.h } > > + > > +do_install:append() { > > + install -d ${D}${sysconfdir}/pgpool-II > > + install -D -m 0644 ${WORKDIR}/pgpool.sysconfig > ${D}${sysconfdir}/pgpool-II/pgpool.conf > > + install -D -m 0644 ${S}/src/sample/pcp.conf.sample > ${D}${sysconfdir}/pgpool-II/pcp.conf > > + install -D -m 0644 ${S}/src/sample/pool_hba.conf.sample > ${D}${sysconfdir}/pgpool-II/pool_hba.conf > > + install -Dm 0644 ${WORKDIR}/pgpool.service > > +${D}${systemd_system_unitdir}/pgpool.service > > +} > > -- > > 1.8.3.1 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#101568): > > https://lists.openembedded.org/g/openembedded-devel/message/101568 > > Mute This Topic: https://lists.openembedded.org/mt/97641513/1997914 > > Group Owner: openembedded-devel+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub > > [raj.khem@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch b/meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch new file mode 100644 index 0000000..52bcc3b --- /dev/null +++ b/meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch @@ -0,0 +1,32 @@ +From f8ab74a76049f69adeebe92c62593547e05a075d Mon Sep 17 00:00:00 2001 +From: Lei Maohui <leimaohui@fujitsu.com> +Date: Wed, 11 Jan 2023 17:22:41 +0900 +Subject: [PATCH] Fix build error when build this file. + +| snprintf.c:770:64: error: 'PG_STRERROR_R_BUFLEN' undeclared (first use in this function) +| 770 | char errbuf[PG_STRERROR_R_BUFLEN]; +| | ^~~~~~~~~~~~~~~~~~~~ + +PG_STRERROR_R_BUFLEN is defined in postgresql, but pgpool doesn't +include the header of postgresql. + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> +--- + src/parser/snprintf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/parser/snprintf.c b/src/parser/snprintf.c +index 84ebdb2..3387897 100644 +--- a/src/parser/snprintf.c ++++ b/src/parser/snprintf.c +@@ -46,6 +46,7 @@ + #include "pool_parser.h" + #include "stringinfo.h" + #include "utils/palloc.h" ++#include "postgresql/server/port.h" + + /* + * We used to use the platform's NL_ARGMAX here, but that's a bad idea, +-- +2.25.1 diff --git a/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service new file mode 100644 index 0000000..bf2d323 --- /dev/null +++ b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service @@ -0,0 +1,17 @@ +[Unit] +Description=Pgpool-II +After=syslog.target network.target + +[Service] + +User=postgres +Group=postgres + +EnvironmentFile=-/etc/sysconfig/pgpool + +ExecStart=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $OPTS +ExecStop=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $STOP_OPTS stop +ExecReload=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf reload + +[Install] +WantedBy=multi-user.target diff --git a/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig new file mode 100644 index 0000000..ea13089 --- /dev/null +++ b/meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig @@ -0,0 +1,7 @@ +# Options for pgpool + +# -n: don't run in daemon mode. does not detach control tty +# -d: debug mode. lots of debug information will be printed + +#OPTS=" -d -n" +OPTS=" -n" diff --git a/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb b/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb new file mode 100644 index 0000000..9220c87 --- /dev/null +++ b/meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb @@ -0,0 +1,52 @@ +SUMMARY = "a language independent connection pool server for PostgreSQL." + +DESCRIPTION = "Pgpool-II is a middleware that works between PostgreSQL \ + servers and a PostgreSQL database client. It is distributed \ + under a license similar to BSD and MIT. It provides the \ + following features." + +HOMEPAGE = "http://pgpool.net" + +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=e4b38de086d73e0521de0bbdbaa4a1a9" + +SRC_URI = "http://www.pgpool.net/mediawiki/images/pgpool-II-${PV}.tar.gz \ + file://0001-Fix-build-error-when-build-this-file.patch \ + file://pgpool.sysconfig \ + file://pgpool.service \ + " +SRC_URI[sha256sum] = "4b379bbba8e178128a1cee4a5bd1ae116dedb3da6121b728c18f0f54c881f328" + +S = "${WORKDIR}/pgpool-II-${PV}" + +inherit autotools systemd + +SYSTEMD_SERVICE:${PN} = "pgpool.service" + +PACKAGECONFIG ??= " openssl libmemcached postgresql \ +" +PACKAGECONFIG[pam] = "--with-pam,,libpam" +PACKAGECONFIG[openssl] = "--with-openssl,,openssl" +PACKAGECONFIG[libmemcached] = "--with-memcached=${STAGING_INCDIR}/libmemcachedutil-1.0,,libmemcached" +PACKAGECONFIG[postgresql] = "--with-pgsql-includedir=${STAGING_INCDIR}/postgresql,, postgresql" + +EXTRA_OECONF += "--disable-static \ + --disable-rpath \ + " +B = "${S}" +CFLAGS:append = " -fcommon " + +FILES:${PN} += "${datadir}/pgpool-II/ " + +do_configure:append() { + echo "#define HAVE_STRCHRNUL 1" >> ${S}/src/include/config.h + sed -i "s,#define USE_REPL_SNPRINTF 1,/* #undef USE_REPL_SNPRINTF*/,g" ${S}/src/include/config.h +} + +do_install:append() { + install -d ${D}${sysconfdir}/pgpool-II + install -D -m 0644 ${WORKDIR}/pgpool.sysconfig ${D}${sysconfdir}/pgpool-II/pgpool.conf + install -D -m 0644 ${S}/src/sample/pcp.conf.sample ${D}${sysconfdir}/pgpool-II/pcp.conf + install -D -m 0644 ${S}/src/sample/pool_hba.conf.sample ${D}${sysconfdir}/pgpool-II/pool_hba.conf + install -Dm 0644 ${WORKDIR}/pgpool.service ${D}${systemd_system_unitdir}/pgpool.service +}
Pgpool-II is a middleware that works between PostgreSQL servers and a PostgreSQL database client. It is distributed under a license similar to BSD and MIT. It provides the following features. Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> --- ...0001-Fix-build-error-when-build-this-file.patch | 32 +++++++++++++ .../recipes-support/pgpool2/pgpool2/pgpool.service | 17 +++++++ .../pgpool2/pgpool2/pgpool.sysconfig | 7 +++ meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb | 52 ++++++++++++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 meta-oe/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch create mode 100644 meta-oe/recipes-support/pgpool2/pgpool2/pgpool.service create mode 100644 meta-oe/recipes-support/pgpool2/pgpool2/pgpool.sysconfig create mode 100644 meta-oe/recipes-support/pgpool2/pgpool2_4.4.1.bb