postgresql-devel-libs

maintainer mrechte · 1 votes · base postgresql-devel · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The source is a PostgreSQL development snapshot from the official project's own domain (ftp.postgresql.org), which is a legitimate and expected source for this package; building from official project infrastructure, even with a SKIP'd checksum, is low risk.

Triggered rules

LOW AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The source is a PostgreSQL development snapshot from the official project's own domain (ftp.postgresql.org), which is a legitimate and expected source for this package; building from official project infrastructure, even with a SKIP'd checksum, is low risk.

1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM source=() URL on a non-standard host source_untrusted_domain

One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).

  • PKGBUILD:51 source=(https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Marc Rechté <marc4@rechte.fr>
2
3# To bypass check: run makepkg with --nocheck option
4# For make options, see https://www.postgresql.org/docs/current/install-procedure.html
5# To refresh with a new build, delete previously downloaded postgresql-snapshot.tar.bz2
6
7pkgbase=postgresql-devel
8pkgver=20devel
9pkgname=("${pkgbase}-libs" "${pkgbase}-docs" "${pkgbase}")
10pkgrel=1
11pkgdesc='Sophisticated object-relational DBMS'
12url='https://www.postgresql.org/'
13arch=('x86_64' 'aarch64')
14# provides=("postgresql")
15license=('custom:PostgreSQL')
16depends=(
17 bash
18 glibc
19 icu libicui18n.so libicuuc.so
20 krb5 libgssapi_krb5.so
21 libgcc libgcc_s.so
22 libldap
23 libstdc++ libstdc++.so
24 liburing liburing.so
25 libxml2 libxml2.so
26 libxslt
27 llvm-libs
28 lz4 liblz4.so
29 numactl libnuma.so
30 openssl libcrypto.so libssl.so
31 pam libpam.so
32 systemd-libs libsystemd.so
33 util-linux-libs
34 zlib libz.so
35 zstd libzstd.so
36)
37makedepends=(
38 clang
39 curl
40 docbook-xml
41 docbook-xsl
42 llvm
43 perl
44 perl-ipc-run
45 python
46 readline
47 systemd
48 tcl
49 util-linux
50)
51source=(https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2
52 postgresql-run-socket.patch
53 postgresql-perl-rpath.patch
54 postgresql.service
55 postgresql-check-db-dir
56 postgresql.sysusers
57 postgresql.tmpfiles
58 pgenv.sh)
59sha256sums=('SKIP'
60 '02ffb53b0a5049233f665c873b96264db77daab30e5a2194d038202d815a8e6a'
61 'f579fe03f93418855f597e8f437fda7e3520e08296709c6c8d7102ab90f8451f'
62 'cfb3bee0f7fc98c8c81aa3a73398bc0446822af86479b5a8ee0c67faae46ec1c'
63 '122f8cec676d9594634a156ddd693597d3ddcd4421a90b223b97ab49d788c7f3'
64 '7fa8f0ef3f9d40abd4749cc327c2f52478cb6dfb6e2405bd0279c95e9ff99f12'
65 '3e13800ae807ee3c40b7e947770c58d5bf04d6427afd2bb8d2e7ecf839802b07'
66 '804e76418eb16edd2a3ac458d01d94a4a496e529064eeb115c28c6532ff8e5a5')
67
68
69prepare() {
70 cd postgresql-${pkgver}
71 patch -p1 < ../postgresql-run-socket.patch
72 patch -p1 < ../postgresql-perl-rpath.patch
73}
74
75build() {
76 cd postgresql-${pkgver}
77 local options=(
78 --prefix=/opt/${pkgbase}
79 --sysconfdir=/etc
80 --with-gssapi
81 --with-libxml
82 --with-openssl
83 --with-perl
84 --with-python
85 --with-tcl
86 --with-pam
87 --with-readline
88 --with-system-tzdata=/usr/share/zoneinfo
89 --with-uuid=e2fs
90 --with-icu
91 --with-systemd
92 --with-ldap
93 --with-llvm
94 --with-libxslt
95 --with-lz4
96 --with-zstd
97 --with-libcurl
98 --with-libnuma
99 --with-liburing
100 --enable-nls
101 --enable-thread-safety
102 --disable-rpath
103 )
104
105 # Fix static libs (will not link if not set)
106 CFLAGS+=" -ffat-lto-objects"
107 # Add RUNPATH to locate libraries
108 #LDFLAGS+=",-rpath,/opt/${pkgbase}/lib"
109 LDFLAGS="-Wl,-rpath,/opt/${pkgbase}/lib"
110
111 # build
112 # see bug 17943, which requires llvm15/clang15 instead of current version 16: https://www.postgresql.org/message-id/17943-56bb8c6bd4409b9f%40postgresql.org
113 # LLVM_CONFIG=llvm-config-15 CLANG=/usr/lib/llvm15/bin/clang \
114 ./configure "${options[@]}"
115 make world
116}
117
118_postgres_check() {
119 LANG=C make "${1}" || (find . -name regression.diffs | \
120 while read -r line; do
121 echo "make ${1} failure: ${line}"
122 cat "${line}"
123 done; exit 1)
124}
125
126check() {
127 cd postgresql-${pkgver}
128 _postgres_check check
129 _postgres_check check-world
130}
131
132package_postgresql-devel-libs() {
133 pkgdesc="Libraries for use with PostgreSQL"
134 depends=('krb5' 'openssl>=1.0.0' 'readline>=6.0' 'zlib' 'libldap')
135 provides=("${pkgbase}-client" 'libpq.so' 'libecpg.so' 'libecpg_compat.so' 'libpgtypes.so')
136 conflicts=("${pkgbase}-client")
137
138 pushd postgresql-${pkgver}
139
140 # install license
141 install -Dm 644 COPYRIGHT -t "${pkgdir}/opt/${pkgbase}/share/licenses/${pkgname}"
142
143
144 # install libs and non-server binaries
145 for dir in src/interfaces src/bin/pg_config src/bin/pg_dump src/bin/psql src/bin/scripts; do
146 make -C ${dir} DESTDIR="${pkgdir}" install
147 done
148
149 for util in pg_config pg_dump pg_dumpall pg_restore psql \
150 clusterdb createdb createuser dropdb dropuser pg_isready reindexdb vacuumdb; do
151 install -Dm 644 doc/src/sgml/man1/${util}.1 "${pkgdir}"/opt/${pkgbase}/share/man/man1/${util}.1
152 done
153
154 cd src/include
155
156 install -d "${pkgdir}"/opt/${pkgbase}/include/{libpq,postgresql/internal/libpq}
157
158 # these headers are needed by the public headers of the interfaces
159 install -m 644 pg_config.h "${pkgdir}/opt/${pkgbase}/include"
160 install -m 644 pg_config_os.h "${pkgdir}/opt/${pkgbase}/include"
161 #install -m 644 pg_config_ext.h "${pkgdir}/opt/${pkgbase}/include"
162 install -m 644 postgres_ext.h "${pkgdir}/opt/${pkgbase}/include"
163 install -m 644 libpq/libpq-fs.h "${pkgdir}/opt/${pkgbase}/include/libpq"
164 install -m 644 pg_config_manual.h "${pkgdir}/opt/${pkgbase}/include"
165
166 # these he aders are needed by the not-so-public headers of the interfaces
167 install -m 644 c.h "${pkgdir}/opt/${pkgbase}/include/postgresql/internal"
168 install -m 644 port.h "${pkgdir}/opt/${pkgbase}/include/postgresql/internal"
169 install -m 644 postgres_fe.h "${pkgdir}/opt/${pkgbase}/include/postgresql/internal"
170 install -m 644 libpq/pqcomm.h "${pkgdir}/opt/${pkgbase}/include/postgresql/internal/libpq"
171
172 # this utility is to be sourced in order to find proper libs and bins
173 popd
174 sed -e "s/\$pkgver/$pkgver/" -e "s/\$pkgbase/$pkgbase/" ../pgenv.sh >pgenv.sh.tmp
175 install -m 755 pgenv.sh.tmp "${pkgdir}/opt/${pkgbase}/bin/pgenv.sh"
176}
177
178package_postgresql-devel-docs() {
179 pkgdesc="HTML documentation for PostgreSQL"
180 options=('docs')
181
182 cd postgresql-${pkgver}
183
184 install -Dm 644 COPYRIGHT -t "${pkgdir}/opt/${pkgbase}/share/licenses/${pkgname}"
185
186 make -C doc/src/sgml DESTDIR="${pkgdir}" install-html
187 chown -R root:root "${pkgdir}/opt/${pkgbase}/share/doc/html"
188
189 # clean up
190 rmdir "${pkgdir}"/opt/${pkgbase}/share/man/man{1,3,7}
191 rmdir "${pkgdir}"/opt/${pkgbase}/share/man
192}
193
194package_postgresql-devel() {
195 pkgdesc='Sophisticated object-relational DBMS'
196 # backup=('etc/pam.d/postgresql' 'etc/logrotate.d/postgresql')
197 depends=("${pkgbase}-libs>=${pkgver}" 'krb5' 'libxml2' 'readline>=6.0'
198 'openssl>=1.0.0' 'pam' 'icu' 'systemd-libs' 'libldap' 'llvm-libs' 'libxslt'
199 'libxslt' 'lz4' 'zstd')
200 optdepends=('python: for PL/Python 3 support'
201 'perl: for PL/Perl support'
202 'tcl: for PL/Tcl support')
203 options=('staticlibs')
204 install=postgresql.install
205
206 pushd postgresql-${pkgver}
207
208 # install
209 make DESTDIR="${pkgdir}" install
210 make -C contrib DESTDIR="${pkgdir}" install
211 make -C doc/src/sgml DESTDIR="${pkgdir}" install-man
212
213 # we don't want these, they are in the -libs package
214 for dir in src/interfaces src/bin/pg_config src/bin/pg_dump src/bin/psql src/bin/scripts; do
215 make -C ${dir} DESTDIR="${pkgdir}" uninstall
216 done
217 for util in pg_config pg_dump pg_dumpall pg_restore psql \
218 clusterdb createdb createuser dropdb dropuser pg_isready reindexdb vacuumdb; do
219 rm "${pkgdir}"/opt/${pkgbase}/share/man/man1/${util}.1
220 done
221
222 install -Dm 644 COPYRIGHT -t "${pkgdir}/opt/${pkgbase}/share/licenses/${pkgname}"
223
224 popd
225 install -Dm 755 postgresql-check-db-dir -t "${pkgdir}/opt/${pkgbase}/bin"
226
227 #install -Dm 644 postgresql.pam "${pkgdir}/etc/pam.d/${pkgname}"
228
229 sed -e "s/\$pkgver/$pkgver/" -e "s/\$pkgbase/$pkgbase/" postgresql.service >postgresql.service.tmp
230 install -Dm 644 postgresql.service.tmp "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
231 install -Dm 644 postgresql.sysusers "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
232 sed -e "s/\$pkgver/$pkgver/" postgresql.tmpfiles >postgresql.tmpfiles.tmp
233 install -Dm 644 postgresql.tmpfiles.tmp "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
234
235 # clean up unneeded installed items
236 rm -rf "${pkgdir}/opt/${pkgbase}/include/internal"
237 rm -rf "${pkgdir}/opt/${pkgbase}/include/libpq"
238 find "${pkgdir}//opt/${pkgbase}/include" -maxdepth 1 -type f -execdir rm {} +
239 rmdir "${pkgdir}/opt/${pkgbase}/share/doc/html"
240}
241
242

Scan history

Scanned at (UTC)SeverityRules
2026-08-03 00:08:14 LOW 2
2026-08-02 00:16:08 LOW 2
2026-08-01 00:11:18 LOW 2
2026-07-31 00:14:10 LOW 2
2026-07-30 00:17:23 LOW 2
2026-07-29 00:25:53 LOW 2
2026-07-28 00:07:28 LOW 2
2026-07-27 00:24:32 LOW 2
2026-07-26 00:07:32 LOW 2
2026-07-25 00:13:44 LOW 2
2026-07-24 00:02:28 LOW 2
2026-07-23 00:14:47 LOW 2
2026-07-22 00:29:32 LOW 2
2026-07-21 00:24:15 LOW 2
2026-07-20 00:19:49 LOW 2
2026-07-19 00:17:08 LOW 2
2026-07-18 00:14:48 LOW 2
2026-07-17 00:06:16 LOW 2
2026-07-16 00:05:41 LOW 2
2026-07-15 00:09:25 LOW 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion