Repository: aquaproj/aqua-registry
Pull request #33390: Add theseus-rs/postgresql-binaries
Author: login: yashikota
Labels: name: enhancement
description: New feature or request
Created: 2025-03-19T11:55:23Z | Merged: 2025-03-19T23:04:29Z

[theseus-rs/postgresql-binaries](https://github.com/theseus-rs/postgresql-binaries) - PostgreSQL binaries for Linux, MacOS and Windows

## Check List

<!-- Please check the list. Please don't remove the check list. -->

- [x] Read [CONTRIBUTING.md](https://aquaproj.github.io/docs/products/aqua-registry/contributing)
  - [x] Read [OSS Contribution Guide](https://github.com/suzuki-shunsuke/oss-contribution-guide/blob/main/README.md)
- [x] [All commits are signed](https://github.com/suzuki-shunsuke/oss-contribution-guide/blob/main/docs/commit-signing.md)
  - This repository enables `Require signed commits`, so all commits must be signed
- [x] [Avoid force push](https://github.com/suzuki-shunsuke/oss-contribution-guide?tab=readme-ov-file#dont-do-force-pushes-after-opening-pull-requests)
- [x] Install and execute the package and confirm if the package works well
- [Execute `cmdx s` to scaffold code](https://aquaproj.github.io/docs/products/aqua-registry/contributing/#use-cmdx-s-definitely)

<!-- Please write the description here -->



Diff:
diff --git a/pkgs/theseus-rs/postgresql-binaries/pkg.yaml b/pkgs/theseus-rs/postgresql-binaries/pkg.yaml
new file mode 100644
index 00000000000..54064ab457c
--- /dev/null
+++ b/pkgs/theseus-rs/postgresql-binaries/pkg.yaml
@@ -0,0 +1,4 @@
+packages:
+  - name: theseus-rs/postgresql-binaries@17.4.0
+  - name: theseus-rs/postgresql-binaries
+    version: 12.0.0
diff --git a/pkgs/theseus-rs/postgresql-binaries/registry.yaml b/pkgs/theseus-rs/postgresql-binaries/registry.yaml
new file mode 100644
index 00000000000..c6c75f0a9a4
--- /dev/null
+++ b/pkgs/theseus-rs/postgresql-binaries/registry.yaml
@@ -0,0 +1,35 @@
+# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/registry.json
+packages:
+  - type: github_release
+    repo_owner: theseus-rs
+    repo_name: postgresql-binaries
+    description: PostgreSQL binaries for Linux, MacOS and Windows
+    files:
+      - name: psql
+    version_constraint: "false"
+    version_overrides:
+      - version_constraint: "true"
+        asset: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}.{{.Format}}
+        format: tar.gz
+        files:
+          - name: psql
+            src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql
+        windows_arm_emulation: true
+        replacements:
+          amd64: x86_64
+          arm64: aarch64
+          darwin: apple-darwin
+          linux: unknown-linux-musl
+          windows: pc-windows-msvc
+        overrides:
+          - goos: windows
+            files:
+              - name: psql
+                src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql.exe
+            checksum:
+              # Skip because the contents of the provided file cannot be handled
+              enabled: false
+        checksum:
+          type: github_release
+          asset: "{{.Asset}}.sha256"
+          algorithm: sha256
diff --git a/registry.yaml b/registry.yaml
index c381415d20a..a52928d1ae9 100644
--- a/registry.yaml
+++ b/registry.yaml
@@ -55482,6 +55482,39 @@ packages:
       amd64: x86_64
     supported_envs:
       - linux/amd64
+  - type: github_release
+    repo_owner: theseus-rs
+    repo_name: postgresql-binaries
+    description: PostgreSQL binaries for Linux, MacOS and Windows
+    files:
+      - name: psql
+    version_constraint: "false"
+    version_overrides:
+      - version_constraint: "true"
+        asset: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}.{{.Format}}
+        format: tar.gz
+        files:
+          - name: psql
+            src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql
+        windows_arm_emulation: true
+        replacements:
+          amd64: x86_64
+          arm64: aarch64
+          darwin: apple-darwin
+          linux: unknown-linux-musl
+          windows: pc-windows-msvc
+        overrides:
+          - goos: windows
+            files:
+              - name: psql
+                src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql.exe
+            checksum:
+              # Skip because the contents of the provided file cannot be handled
+              enabled: false
+        checksum:
+          type: github_release
+          asset: "{{.Asset}}.sha256"
+          algorithm: sha256
   - type: github_release
     repo_owner: thestormforge
     repo_name: optimize-controller


Reviews:
user: login: suzuki-shunsuke
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T13:35:05Z
user: login: suzuki-shunsuke
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T13:37:58Z
user: login: suzuki-shunsuke
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T13:42:03Z
user: login: suzuki-shunsuke
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T13:43:27Z
user: login: yashikota
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-19T16:01:59Z
user: login: yashikota
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-19T16:02:32Z
user: login: yashikota
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-19T16:04:17Z
user: login: yashikota
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-19T16:11:11Z
user: login: suzuki-shunsuke
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T16:25:40Z

Review comments:
diff_hunk: @@ -0,0 +1,33 @@
+# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/registry.json
+packages:
+  - type: github_release
+    repo_owner: theseus-rs
+    repo_name: postgresql-binaries
+    description: PostgreSQL binaries for Linux, MacOS and Windows
+    version_constraint: "false"
+    version_overrides:
+      - version_constraint: "true"
+        asset: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}.{{.Format}}
+        format: tar.gz
+        files:
+          - name: psql
+            src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql
+        windows_arm_emulation: true
+        replacements:
+          amd64: x86_64
+          arm64: aarch64
+          darwin: apple-darwin
+          linux: unknown-linux-gnu
+          windows: pc-windows-msvc
+        overrides:
+          - goos: windows
+            files:
+              - name: psql.exe
+                src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql.exe
+            checksum:
+            # Skip because the contents of the provided file cannot be handled
+            enabled: false
path: pkgs/theseus-rs/postgresql-binaries/registry.yaml
user: login: suzuki-shunsuke
body: ```suggestion
            checksum:
              # Skip because the contents of the provided file cannot be handled
              enabled: false
```

The indent is wrong.

https://github.com/aquaproj/aqua-registry/pull/33390#issuecomment-2736453952

JSONSchema failed.
This means the configuration is invalid.

https://github.com/aquaproj/aqua-registry/actions/runs/13946377471/job/39034466698?pr=33390
created_at: 2025-03-19T13:35:04Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,10 @@
+packages:
+  - name: theseus-rs/postgresql-binaries@17.4.0
+  - name: theseus-rs/postgresql-binaries
+    version: 16.8.0
+  - name: theseus-rs/postgresql-binaries
+    version: 15.12.0
+  - name: theseus-rs/postgresql-binaries
+    version: 14.17.0
+  - name: theseus-rs/postgresql-binaries
+    version: 13.20.0
path: pkgs/theseus-rs/postgresql-binaries/pkg.yaml
user: login: suzuki-shunsuke
body: I guess you misunderstand the meaning of this file.
This file is just test data.
created_at: 2025-03-19T13:37:58Z
author_association: MEMBER
diff_hunk: @@ -9,14 +9,27 @@ packages:
       - version_constraint: "true"
         asset: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}.{{.Format}}
         format: tar.gz
+        files:
+          - name: psql
+            src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql
         windows_arm_emulation: true
         replacements:
           amd64: x86_64
           arm64: aarch64
           darwin: apple-darwin
-          linux: unknown-linux-musl
+          linux: unknown-linux-gnu
path: pkgs/theseus-rs/postgresql-binaries/registry.yaml
user: login: suzuki-shunsuke
body: Why did you change this?
I'm not familiar with this field, but in my understanding `musl` is more portable.
https://aquaproj.github.io/docs/develop-registry/registry-style-guide#consideration-about-rust
created_at: 2025-03-19T13:42:03Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,10 @@
+packages:
+  - name: theseus-rs/postgresql-binaries@17.4.0
+  - name: theseus-rs/postgresql-binaries
+    version: 16.8.0
+  - name: theseus-rs/postgresql-binaries
+    version: 15.12.0
+  - name: theseus-rs/postgresql-binaries
+    version: 14.17.0
+  - name: theseus-rs/postgresql-binaries
+    version: 13.20.0
path: pkgs/theseus-rs/postgresql-binaries/pkg.yaml
user: login: suzuki-shunsuke
body: We add test data if settings are changed by version (`version_constraint`).
created_at: 2025-03-19T13:43:27Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,33 @@
+# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/registry.json
+packages:
+  - type: github_release
+    repo_owner: theseus-rs
+    repo_name: postgresql-binaries
+    description: PostgreSQL binaries for Linux, MacOS and Windows
+    version_constraint: "false"
+    version_overrides:
+      - version_constraint: "true"
+        asset: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}.{{.Format}}
+        format: tar.gz
+        files:
+          - name: psql
+            src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql
+        windows_arm_emulation: true
+        replacements:
+          amd64: x86_64
+          arm64: aarch64
+          darwin: apple-darwin
+          linux: unknown-linux-gnu
+          windows: pc-windows-msvc
+        overrides:
+          - goos: windows
+            files:
+              - name: psql.exe
+                src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql.exe
+            checksum:
+            # Skip because the contents of the provided file cannot be handled
+            enabled: false
path: pkgs/theseus-rs/postgresql-binaries/registry.yaml
user: login: yashikota
body: I missed that. Thank you!
created_at: 2025-03-19T16:01:59Z
author_association: CONTRIBUTOR
diff_hunk: @@ -9,14 +9,27 @@ packages:
       - version_constraint: "true"
         asset: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}.{{.Format}}
         format: tar.gz
+        files:
+          - name: psql
+            src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql
         windows_arm_emulation: true
         replacements:
           amd64: x86_64
           arm64: aarch64
           darwin: apple-darwin
-          linux: unknown-linux-musl
+          linux: unknown-linux-gnu
path: pkgs/theseus-rs/postgresql-binaries/registry.yaml
user: login: yashikota
body: I thought GNU was more common, so I changed it.  
As you mentioned, MUSL seems to have higher portability, so I will switch to it.
created_at: 2025-03-19T16:02:32Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,10 @@
+packages:
+  - name: theseus-rs/postgresql-binaries@17.4.0
+  - name: theseus-rs/postgresql-binaries
+    version: 16.8.0
+  - name: theseus-rs/postgresql-binaries
+    version: 15.12.0
+  - name: theseus-rs/postgresql-binaries
+    version: 14.17.0
+  - name: theseus-rs/postgresql-binaries
+    version: 13.20.0
path: pkgs/theseus-rs/postgresql-binaries/pkg.yaml
user: login: yashikota
body: I see. So, if the configuration method is the same even for different versions, there is no need to add multiple test cases, is that correct?
created_at: 2025-03-19T16:04:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -9,14 +9,27 @@ packages:
       - version_constraint: "true"
         asset: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}.{{.Format}}
         format: tar.gz
+        files:
+          - name: psql
+            src: postgresql-{{.Version}}-{{.Arch}}-{{.OS}}/bin/psql
         windows_arm_emulation: true
         replacements:
           amd64: x86_64
           arm64: aarch64
           darwin: apple-darwin
-          linux: unknown-linux-musl
+          linux: unknown-linux-gnu
path: pkgs/theseus-rs/postgresql-binaries/registry.yaml
user: login: yashikota
body: I have switched to musl.
created_at: 2025-03-19T16:11:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,10 @@
+packages:
+  - name: theseus-rs/postgresql-binaries@17.4.0
+  - name: theseus-rs/postgresql-binaries
+    version: 16.8.0
+  - name: theseus-rs/postgresql-binaries
+    version: 15.12.0
+  - name: theseus-rs/postgresql-binaries
+    version: 14.17.0
+  - name: theseus-rs/postgresql-binaries
+    version: 13.20.0
path: pkgs/theseus-rs/postgresql-binaries/pkg.yaml
user: login: suzuki-shunsuke
body: Correct.
created_at: 2025-03-19T16:25:40Z
author_association: MEMBER

PR comments:
user: login: yashikota
created_at: 2025-03-19T12:25:57Z
body: @suzuki-shunsuke 
It seems that the contents of the checksum file on Windows cannot be verified, so I would like to skip it. However, I am not sure how to specify this.  
Could you please advise on how to do this?
author_association: CONTRIBUTOR
user: login: suzuki-shunsuke
created_at: 2025-03-19T23:13:53Z
body: 🎉 https://github.com/aquaproj/aqua-registry/releases/tag/v4.331.0
author_association: MEMBER
user: login: the-redback
created_at: 2025-04-04T19:58:54Z
body: Does this work for 22-LTS ubuntu? I am getting the following error:

```
$ psql

FATA[0000] aqua failed                                   aqua_version=2.42.2 env=linux/amd64 error="it failed to start the process" exe_name=psql package_name=theseus-rs/postgresql-binaries package_version=14.17.0 program=aqua
```

author_association: NONE
user: login: suzuki-shunsuke
created_at: 2025-04-04T20:59:37Z
body: Could you try the latest version of aqua and aqua-registry?
And if the problem still occurs, could you create an issue?

https://github.com/aquaproj/aqua-registry/issues/new?assignees=&template=04-support-request.yml
author_association: MEMBER
user: login: yashikota
created_at: 2025-04-07T07:13:17Z
body: I tested both the GNU and MUSL builds on Ubuntu. The GNU version runs as expected:

```
prj/aqua-test/postgresql-17.4.0-x86_64-unknown-linux-gnu
▶ ./bin/psql --version
psql (PostgreSQL) 17.4
```

However, when I try to run the MUSL version, it crashes with a segmentation fault:

```
prj/aqua-test/postgresql-17.4.0-x86_64-unknown-linux-musl
▶ ./bin/psql --version
fish: Job 1, './bin/psql --version' terminated by signal SIGSEGV (Address boundary error)
```

Based on this, it seems that the MUSL build doesn't work properly on Ubuntu, while the GNU build does🥲
author_association: CONTRIBUTOR
user: login: suzuki-shunsuke
created_at: 2025-04-07T07:26:04Z
body: Thank you for your testing!
I created an issue.

- https://github.com/aquaproj/aqua-registry/issues/34136
author_association: MEMBER