91 Commits
Author SHA1 Message Date
Ashesh Vashi 689c969f95 fix(pkg): stop using --system-site-packages, use a scoped .pth instead
The previous fix (bd841b882) tried to delete the specific broken
sphinxcontrib-jsmath nspkg.pth file from the system site-packages
before creating the venv. It didn't work: pgadmin4-rpm-build #177
failed identically on el-10. The delete silently no-opped - that
directory is root-owned on the build node and the build user doesn't
have write access there, so `find -delete` failed while `-print` (which
runs first) still logged the match, making the fix look like it ran.

Root cause is the --system-site-packages flag itself: it uses Python's
site.addsitedir() internally, which does not just add a directory to
sys.path - it also scans that directory for every *.pth file and
executes any "import ..." lines found in them. That's what runs the
broken nspkg.pth's stale namespace-package bootstrap code and corrupts
sys.path before core stdlib resolves, breaking pip's own subprocess.

We only need --system-site-packages for OS-provided packages that
don't have reliable pip wheels (e.g. dbus-python, a hard runtime
dependency per pkg/debian/build.sh's python3-dbus dep, needs
libdbus-1-dev to build from source). A *plain path line* (no "import")
in a .pth file only appends that directory to sys.path - it does not
trigger a further .pth scan of it. So: create the venv without
--system-site-packages, then write the system site-packages
directories as plain lines into a .pth file inside the venv's own
site-packages (which the build user does own). Same OS-package
availability, without ever asking Python to treat the system directory
as a site directory - the broken nspkg.pth is simply never read.

Not yet verified against a real buildfarm run - can't reproduce the
el-10 environment locally. Watching the next pgadmin4-rpm-build run.
2026-07-30 09:36:44 +05:30
Ashesh Vashi bd841b8827 fix(pkg): surface real notarization failures, guard against stale nspkg.pth in venv
macOS build (build-functions.sh): _notarize_pkg only printed
"Notarization failed." on rejection, giving no indication why. Print
the actual REQUEST_STATUS and fetch the full notary log via
`notarytool log` so future failures are actually diagnosable from the
Jenkins console instead of just "status: Invalid".

Linux build (build-functions.sh): _create_python_virtualenv creates
venvs with --system-site-packages, which pulls in the entire system
site-packages dir - including any stale, improperly-uninstalled
package's namespace-package .pth hook. That legacy pip/setuptools
mechanism runs at interpreter startup, before core stdlib is
guaranteed to resolve; a leftover sphinxcontrib-jsmath nspkg.pth on
the el-10 build node corrupted sys.path early enough to break pip's
own subprocess bootstrap, failing the whole build with a misleading
"No module named 'importlib'"/"'traceback'" error
(pgadmin4-rpm-build #176). Remove that exact known-broken file before
creating the venv - not every *-nspkg.pth, since this touches the
*system* Python install on a build node shared by other jobs, and any
other such file could still be load-bearing for something unrelated.
--system-site-packages itself is left untouched - it's required so
venvs can see OS-provided packages not available as clean pip wheels
on every target platform.
2026-07-30 09:21:22 +05:30
Ashesh Vashi b15c745dc1 fix: pin Yarn version from packageManager field in build scripts (#10156)
* fix: pin Yarn version from packageManager field in build scripts

Replace hardcoded 'yarn set version 4' in build-functions.sh with a
dynamic lookup from each workspace's package.json packageManager field.
Also syncs runtime yarn version to 4.15.0 to match web/package.json.

Fixes CI build failures caused by Yarn 4.x fetching a newer patch that
produces different builtin compat hashes, breaking --immutable lockfile
validation.
2026-07-16 11:48:36 +05:30
Ashesh Vashi 5b17cad8a4 fix(pkg/linux): pin psycopg-c build to x86-64 v1 baseline (#10017) 2026-06-09 13:42:30 +01:00
Ashesh Vashi ed9dcf6ebf chore(deps): bump electron 41.5.0 -> 42.1.0 and pin packaged version (#9959)
Bumps the desktop runtime to electron 42 (dependabot PR #9945) and
closes a supply-chain gap in the Linux/Mac packaging scripts that
predated this bump.

Why the bump is safe:

  - macOS UNNotification API change — pgAdmin's runtime does not use
    Electron's Notification API (only a UI toast comment in
    src/js/pgadmin.js:211; no `new Notification(...)` anywhere).
  - postinstall no longer downloads electron — production packaging
    fetches the binary directly via wget from GitHub releases, never
    via electron's postinstall script.
  - Offscreen rendering scale-factor change — no OSR usage anywhere
    in runtime/src/js/.

While verifying, found that pkg/linux/build-functions.sh and
pkg/mac/build-functions.sh resolve the packaged electron version
via:

    ELECTRON_VERSION="$(npm info electron version)"

This pulls whatever currently carries the `latest` dist-tag on the
npm registry. Any newly published electron release — including a
hypothetical malicious one — would land in shipped binaries without
review, regardless of what runtime/package.json pins.

Replace with sed-based extraction from runtime/package.json and
fail loudly if extraction returns empty. The Windows installer
(pkg/win32/installer.iss.in) does not have this issue (it bundles a
pre-built tree, no electron download step).

Net change in runtime/yarn.lock is mostly deletions — electron 42
ships with @electron/get 5.x, which dropped a large transitive
dependency tree associated with the old postinstall download path.

Verified:

  - eslint (runtime): clean (silent)
  - yarn install (runtime): resolved to electron 42.2.0 within
    ^42.1.0 range
  - sed extraction smoke-tested: returns 42.1.0 from current
    runtime/package.json
2026-06-07 12:08:56 +05:30
rztrainlocalandrztrainlocal d59fcf3459 fix(9656): Use absolute paths for a2enmod, a2enconf for debain setup script (#9815)
Reason: On debian, it does not have `/usr/sbin` in the path environment variable anymore.

Co-authored-by: rztrainlocal <ke@KE-U758.HOME>
2026-04-06 21:48:19 +05:30
Aditya Toshniwal 39b6f40482 Fix following issues:
1. Debian builds are failing after commiting changes for #9240.
2. Object explorer context menu shows "No objects selected" on preferences change.
2025-11-04 16:49:12 +05:30
LiZixin 061450c8d7 Fixed an issue where the Debian build process failed with a "Sphinx module not found" error when using a Python virtual environment. #9240 2025-10-31 10:38:04 +05:30
Pravesh Sharma 800fdce316 Unpin Electron version 35.x as the GTK crash issue has been resolved upstream. 2025-08-22 11:32:58 +05:30
Khushboo Vashi 43d70de5bb Reinstall Python packages regardless of their presence in the system-wide installation. 2025-06-24 15:50:45 +05:30
Dirk Heinrichs 44496a300e Add a flag to allow access to system Python packages on recent Linux distributions. #7173 2025-06-19 16:21:15 +05:30
Akshay Joshi 1259d72643 Plugin workspace-tools is included by default starting from Yarn 4. 2025-06-09 11:57:02 +05:30
Akshay Joshi cab1bc3cb4 Update yarn to version 4. 2025-06-06 19:08:32 +05:30
Khushboo Vashi 58715daf10 Remove all references to the DEPENDENCIES file. 2025-05-29 16:01:56 +05:30
Aditya Toshniwal 7c74b7cdb7 - Pin Electron to v35.4.0 as the v36 is not working on many OS.
- Pin html-to-image to v1.11.11 as latest version breaks ERD image downloads.
2025-05-27 13:02:11 +05:30
Khushboo Vashi aa282711f8 Try to fix the Fedora build failure. 2025-04-28 14:33:46 +05:30
Akshay Joshi f25cde8c5f 1) Unpin the electron version for RHEL 8 as respective issue is fixed.
2) Updated Javascript dependencies.
2025-03-18 10:27:21 +05:30
Akshay Joshi d7faa85338 Pin the electron version to 33.3.2 for RHEL 8 2025-03-05 12:37:50 +05:30
Akshay Joshi 4e52a8664c Updated Javascript dependencies. 2025-03-03 19:00:59 +05:30
Aditya Toshniwal e6d2334753 Pin Electron version to 33.3.2 as the versions above it fails to start on RHEL 8/Rocky 8 2025-02-05 19:10:39 +05:30
Yogesh Mahajan f5f79a516a Fix SELinux permission issue. 2024-11-05 11:51:02 +05:30
Aditya Toshniwal f451f89d38 Cleanup yarn cache before bundling the installers to reduce size 2024-08-30 14:09:53 +05:30
Aditya Toshniwal e7981c7f11 Fix windows, linux builds as pgAdmin 4 desktop is not opening. 2024-08-20 13:05:59 +05:30
Aditya Toshniwal 546806c40c Always use latest version of Electron in package.json and in builds 2024-08-01 16:03:05 +05:30
Aditya Toshniwal 4ee76ba8c9 Build changes to sign pgAdmin4.exe and use yarn v3 on linux builds 2024-08-01 13:18:01 +05:30
Aditya Toshniwal f8fa1cf6d6 - Fix few SonarQube issues.
- Cleanup NW.js related stuff.
2024-07-02 10:34:30 +05:30
Aditya Toshniwal 91eb60a363 Replace pgAdmin NW.js container with Electron container. #7494 2024-07-01 11:27:42 +05:30
Khushboo Vashi 4a645343a9 Give the proper file/directory permissions to the pgAdmin installation directory on RHEL-8. This is the only platform that has write permission for the executable files after installation which is fixed. 2024-06-24 17:09:28 +05:30
Khushboo Vashi 3d107ea618 One more attempt to set RHEL-8 file permissions. 2024-06-24 16:05:22 +05:30
Khushboo Vashi f7eeefa3a9 Fix file permissions for RHEL 8. 2024-06-24 10:54:39 +05:30
Khushboo Vashi bc83955418 Fix mod_wsgi version mismatch issue for RHEL platforms. 2024-05-28 11:50:21 +05:30
Khushboo Vashi e9f3747969 Fix the issue where pgAdmin fails to start when Ubuntu OS is upgraded to a major version. #7439 2024-05-23 14:34:08 +05:30
Ashesh Vashi d09833744a Separate the application name, branding & version information from the configuration file. #7187 2024-02-09 16:25:03 +05:30
Khushboo Vashi 0d287df6dd Administer pgAdmin Users and Preferences Using the Command Line Interface (CLI). #2483 2023-12-21 12:07:26 +05:30
Khushboo Vashi 4db13facf7 Install setuptools separately as it is no longer a core venv dependency in Python 3.12. 2023-12-18 16:06:19 +05:30
Khushboo Vashi adab656a79 Fixes for Python 3.12 compatibility:
- Upgrade testtools package
- Use platstdlib instead of stdlib to get the path
2023-12-18 13:27:05 +05:30
Khushboo Vashi 92549af3d4 Replaced distutils.sysconfig.get_python_lib with sysconfig.get_path. 2023-12-18 12:21:20 +05:30
Aditya Toshniwal 862f101772 Significant changes to use ReactJS extensively.
1. Replace the current layout library wcDocker with ReactJS based rc-dock. #6479
2. Have close buttons on individual panel tabs instead of common. #2821
3. Changes in the context menu on panel tabs - Add close, close all and close others menu items. #5394
4. Allow closing all the tabs, including SQL and Properties. #4733
5. Changes in docking behaviour of different tabs based on user requests and remove lock layout menu.
6. Fix an issue where the scroll position of panels was not remembered on Firefox. #2986
7. Reset layout now will not require page refresh and is done spontaneously.
8. Use the zustand store for storing preferences instead of plain JS objects. This will help reflecting preferences immediately.
9. The above fix incorrect format (no indent) of SQL stored functions/procedures. #6720
10. New version check is moved to an async request now instead of app start to improve startup performance.
11. Remove jQuery and Bootstrap completely.
12. Replace jasmine and karma test runner with jest. Migrate all the JS test cases to jest. This will save time in writing and debugging JS tests.
13. Other important code improvements and cleanup.
2023-10-23 17:43:17 +05:30
Akshay Joshi 33b2b82ba9 Pin NW.js to 0.77.0, as the latest version crashes after an attempt to reopen the fullscreen window. 2023-08-16 13:05:35 +05:30
Khushboo Vashi 48bfc66048 Generate software bill of materials as part of the package builds. #3702 2023-08-03 16:08:59 +05:30
Pravesh Sharma c067289012 Fixed an issue where win 10 was not showing pgAdmin icon on taskbar for NW.js v0.73 and above. #6080 2023-05-15 21:43:32 +05:30
Aditya Toshniwal c80f760d07 Pin NW.js to 0.72.0 in build files 2023-04-03 15:21:14 +05:30
Ashesh Vashi c78904501d 1) Correct the name of the python binary to use with mod_wsgi.
2) Remove logic for Ubuntu 18 as we remove the support for it.
2023-03-28 11:20:04 +05:30
Akshay Joshi 28e1e34407 Correct the command to create virtual environment. 2023-03-17 19:22:14 +05:30
Akshay Joshi 5a0731587a 1) Try to fix Jenkins failure.
2) Update release note
2023-03-17 18:16:17 +05:30
Akshay Joshi f9fee9103b Use correct python binary for Ubuntu 18 and EL-8. 2023-03-17 17:47:53 +05:30
Aditya Toshniwal 292d76b39e Update SQLAlchemy, Flask, Flask-SQLAlchemy, and other packages to current versions. #5901
- Update Flask, Flask-SQLAlchemy, Flask-Babel, Flask-Security-Too, Flask-SocketIO, pytz, psutil, SQLAlchemy, bcrypt, cryptography, eventlet, Authlib, requests python packages
- Remove pinned dnspython, Werkzeug packages from requirements.txt
2023-03-15 11:57:16 +05:30
Akshay Joshi fead2b25be Changing psycopg to psycopg2 as the package upgrade PR has been reverted 2023-03-09 17:31:08 +05:30
Khushboo Vashi 5e0daccf76 Added support for psycopg3 along with psycopg2. #5011 2023-02-15 11:31:29 +05:30
Aditya Toshniwal ec86152396 Revert audit fix changes and ignore the low severity Vulnerability. 2023-01-31 13:01:52 +05:30