Open
Conversation
Signed-off-by: carson.wang <r03944040@ntu.edu.tw>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new OpenWrt package for PgBouncer, including default configuration and an init script to run it under procd.
Changes:
- Introduce
libs/pgbouncerpackage Makefile to build/install PgBouncer. - Add default
pgbouncer.inianduserlist.txtunder/etc/pgbouncer. - Add
/etc/init.d/pgbouncerprocd init script with user/setup logic.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| libs/pgbouncer/Makefile | Defines the new package build/install steps and dependencies. |
| libs/pgbouncer/files/pgbouncer.init | Adds procd init script, including user creation and directory setup. |
| libs/pgbouncer/files/pgbouncer.ini | Adds a default PgBouncer configuration template. |
| libs/pgbouncer/files/userlist.txt | Adds a sample/auth file template for users/password hashes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| PKG_LICENSE:=ISC | ||
| PKG_LICENSE_FILES:=COPYRIGHT | ||
|
|
||
| PKG_INSTALL:=1 |
Comment on lines
+51
to
+52
| $(INSTALL_DIR) $(PKG_BUILD_DIR)/ipkg-install/usr/bin | ||
| $(INSTALL_BIN) $(PKG_BUILD_DIR)/pgbouncer $(PKG_BUILD_DIR)/ipkg-install/usr/bin/ |
Comment on lines
+60
to
+62
| define Package/pgbouncer/install | ||
| $(INSTALL_DIR) $(1)/usr/bin | ||
| $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pgbouncer $(1)/usr/bin/ |
| SUBMENU:=Database | ||
| TITLE:=Lightweight connection pooler for PostgreSQL | ||
| URL:=https://www.pgbouncer.org/ | ||
| DEPENDS:=+libevent2 +libc +libpthread +libopenssl +libpq +pgsql-cli +pgsql-server |
Comment on lines
+17
to
+24
| setup_user() { | ||
| if ! grep -q "^${PGBOUNCER_GROUP}:" /etc/group; then | ||
| echo "${PGBOUNCER_GROUP}:x:888:" >> /etc/group | ||
| fi | ||
|
|
||
| if ! grep -q "^${PGBOUNCER_USER}:" /etc/passwd; then | ||
| echo "${PGBOUNCER_USER}:x:888:888:PgBouncer:/var/lib/pgbouncer:/bin/false" >> /etc/passwd | ||
| fi |
| * = host=127.0.0.1 port=5432 | ||
|
|
||
| [pgbouncer] | ||
| listen_addr = 0.0.0.0 |
Comment on lines
+13
to
+15
| auth_type = scram-sha-256 | ||
| auth_file = /etc/pgbouncer/userlist.txt | ||
| auth_user = pgbouncer_auth |
Comment on lines
+35
to
+39
| chmod 755 /var/log/pgbouncer | ||
| chmod 755 /var/run/pgbouncer | ||
| chmod 755 /var/lib/pgbouncer | ||
| chmod 755 /etc/pgbouncer | ||
| chmod 644 /etc/pgbouncer/pgbouncer.ini |
Comment on lines
+35
to
+39
| chmod 755 /var/log/pgbouncer | ||
| chmod 755 /var/run/pgbouncer | ||
| chmod 755 /var/lib/pgbouncer | ||
| chmod 755 /etc/pgbouncer | ||
| chmod 644 /etc/pgbouncer/pgbouncer.ini |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📦 Package Details
Maintainer: @carson0321
Description:
Pgbouncer is lightweight connection pooler for PostgreSQL.
https://www.pgbouncer.org/
🧪 Run Testing Details
✅ Formalities
If your PR contains a patch:
git am(e.g., subject line, commit description, etc.)
We must try to upstream patches to reduce maintenance burden.