postgresql17-docs

LOW
maintainer mrechte 1 votes base postgresql17 scanned 2026-10-17 00:21:55.226236
View on AUR
Why flagged

The source is a tarball from the official PostgreSQL project's own domain (ftp.postgresql.org), which is a legitimate and expected source for building PostgreSQL; building from project-owned infrastructure is normal AUR packaging, even if the host is not on a whitelist.

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-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The source is a tarball from the official PostgreSQL project's own domain (ftp.postgresql.org), which is a legitimate and expected source for building PostgreSQL; building from project-owned infrastructure is normal AUR packaging, even if the host is not on a whitelist.

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:15 source=(https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2

PKGBUILD

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

Scan history

Scanned at (UTC)SeverityRules
2026-10-17 00:21:55 Low 2
2026-10-16 00:12:47 Low 2
2026-10-15 00:28:05 Low 2
2026-10-14 00:06:47 Low 2
2026-10-13 00:23:45 Low 2
2026-10-12 00:18:51 Low 2
2026-10-11 15:10:51 Medium 1
2026-06-19 22:34:54 Clean 2

Report a package

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

0 / 4000
Your suggestion