- package: tis-postgresql
- name: PostgreSQL
- version: 17.4-3
- categories: System and network
- maintainer: WAPT TEAM, SEGAT GAETAN, ALLARD THIBAUT
- target_os: windows
- impacted_process: postgres,pg_ctl
- architecture: x64
- signature_date:
- size: 348.01 Mo
package : tis-postgresql
version : 17.4-3
architecture : x64
section : base
priority : optional
name : PostgreSQL
categories : System and network
maintainer : WAPT TEAM, SEGAT GAETAN, ALLARD THIBAUT
description : PostgreSQL is a relational and object database management system.
depends :
conflicts :
maturity : PROD
locale :
target_os : windows
min_wapt_version : 2.5
sources : https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
installed_size :
impacted_process : postgres,pg_ctl
description_fr : PostgreSQL est un système de gestion de base de données relationnelle et objet.
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor :
keywords :
licence :
homepage :
package_uuid : d5c2ff07-43e6-4ca7-a38b-4ab6cf9fead7
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version : 10
max_os_version :
icon_sha256sum : ced24d01ab0a984121c3ab089f4961f34e141b0ecdcaa120b86f1a460a94fe07
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date : 2025-05-04T13:08:41.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature : obe/+pxgl4uPCWqna0T5VvIthGczywzup6cMmZKbBXJpuzwbCw0tjP5v76/hTogS7Nye7tWSK0QNwWGIP/aD9Ip+oBxh6xwzsK0SdgfKO922JcEaWJGGI/9KsDpeJv/E8vnVU38JRv9EmpcqC46AzV84iMmfKAI57qTMcKL/HTzYnbeQEvv99z80CCh+85DWqYUXy3RdCdKBtsj/87mQNPq9uRFW81rJG400j444hsCH9675Mq8Jl6nCrJmkU+Cmw8HHhhmx+VC7BuN7X+3Xf7aSrTgbxlWR3t+qmiDyuSNA43rVAVqe+RXrccImg38I9IclG5Gme8RFDkuRmT8DYA==
# -*- coding: utf-8 -*-
from setuphelpers import *
import base64
import json
"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_contains = "postgresql-"
def install():
# Declaring local variables
package_version = control.get_software_version()
bin_name = glob.glob("*%s*.exe" % bin_contains)[0]
app_uninstallkey = "PostgreSQL %s" % package_version.split('.')[0]
silent_args = "--unattendedmodeui none --mode unattended --enable-components server"
# Removing old version
for soft in installed_softwares("PostgreSQL %s" % package_version):
if Version(soft["version"]) < Version(package_version):
print("Uninstalling old version: %s" % soft["version"])
run(uninstall_cmd(soft["key"]))
# Installing the software
print("Installing: %s" % bin_name)
install_exe_if_needed(
bin_name,
silentflags=silent_args,
key=app_uninstallkey,
min_version=bin_name.replace('postgresql-','').replace('-windows-x64.exe',''), # version displayed in registry contains "-"
timeout=600,
)
# Adding quiet uninstall string to registry
uninstallstring = installed_softwares(app_uninstallkey)[0]['uninstall_string']
register_uninstall(app_uninstallkey,quiet_uninstall_string=f'{uninstallstring} --mode unattended')
# -*- coding: utf-8 -*-
from setuphelpers import *
import os
r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
"""
def update_package():
package_updated = False
proxies = get_proxies_from_wapt_console()
if not proxies:
proxies = get_proxies()
app_name = control.name
url = "https://www.enterprisedb.com/downloads/postgres-postgresql-downloads"
# Send a GET request to the URL
response = requests.get(url)
# Check if the request was successful
if response.status_code == 200:
# Find the <tbody> tag
tbody = bs_find(
url,
"tbody",
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0",
proxies=proxies,
features='html.parser',
)
if tbody:
# Find the first line in the tbody
first_row = tbody.find('tr')
if first_row:
# Find all columns in first row
columns = first_row.find_all('td')
# Check if there are at least 5 columns
if len(columns) >= 5:
# Check the contents of the first column
version = str(columns[0].text.strip())
print("Contenu de la première colonne :", version)
# Retrieve the 5th column
fifth_column = columns[4]
# Find an <a> tag with a href starting with "https"
download_url = fifth_column.find('a', href=lambda href: href and href.startswith("https"))
if download_url:
# Show found link
print("Lien trouvé dans la 5ème colonne :", download_url['href'])
# We prefer keeping the original binary name because it contains the version displayed in Windows registry
bin_name = requests.head(download_url['href']).headers['Location'].split('/')[-1]
wget(download_url['href'], bin_name)
control.set_software_version(version)
control.save_control_to_wapt()
package_updated = True
print("Software version is up-to-date (%s)" % Version(version))
else:
print("Aucun lien commençant par 'https' n'a été trouvé dans la 5ème colonne.")
else:
print("Il n'y a pas suffisamment de colonnes dans la première ligne.")
else:
print("La première ligne dans <tbody> n'a pas été trouvée.")
else:
print("Aucun <tbody> n'a été trouvé sur la page.")
else:
print("Erreur lors de la requête :", response.status_code)
remove_outdated_binaries(version, filename_contains="postgresql-")
return package_updated
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
492a9c8855734627c4a4211275df9d2b9d14610da78c352ced4e29f32114e881 : WAPT/control
ced24d01ab0a984121c3ab089f4961f34e141b0ecdcaa120b86f1a460a94fe07 : WAPT/icon.png
62cad88a954b929580b8b480cc3a11d6b2b1ede7f1de86689f980f3cedb76b4e : luti.json
89bd5b22d349d49d1e0c957cf76b80aca2f69890e5f861d8f11fb9b3c3cb94fb : postgresql-17.4-2-windows-x64.exe
90f9576799596a9ddf9ae050dcbc5618eb867bf53032e40dc4367638be26b592 : setup.py
eee62b5396c52f3cee22f46cb515d83d0edba17e8cfa6118bb7ab1d7a87c92dc : update_package.py