Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2091580 - Missing Setup and SELinux Context for pgadmin4
Summary: Missing Setup and SELinux Context for pgadmin4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pgadmin4
Version: 36
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Sandro Mani
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-30 11:35 UTC by Joseph D. Wagner
Modified: 2022-06-17 01:13 UTC (History)
1 user (show)

Fixed In Version: pgadmin4-6.9-4.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-17 01:13:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Joseph D. Wagner 2022-05-30 11:35:10 UTC
The current package is missing a few things to make it work out of the box. Without them, it crashes, and it fails to start.

I had to do the following to get it to run.

mkdir /var/lib/pgadmin /var/log/pgadmin
chown apache /var/lib/pgadmin /var/log/pgadmin
semanage fcontext -a -t httpd_sys_rw_content_t "/var/lib/pgadmin(/.*)?"
semanage fcontext -a -t httpd_log_t "/var/log/pgadmin(/.*)?"

Create config file /etc/httpd/conf.d/pgadmin4.conf
#############################################
<IfModule wsgi_module>
    WSGIDaemonProcess pgadmin processes=1 threads=8 python-home=/usr
    WSGIScriptAlias /pgadmin /usr/lib/pgadmin4/pgAdmin4.wsgi

    <Directory /usr/lib/pgadmin4>
        WSGIProcessGroup pgadmin
        WSGIApplicationGroup %{GLOBAL}
        Require local
    </Directory>
</IfModule>
#############################################

Of course, this won't setup the initial admin password, but everything else will work out of the box if these things were a part of the package.

Comment 1 Sandro Mani 2022-05-30 14:01:09 UTC
Here [1] is a scratch build with a pgadmin4-httpd subpackage which contains the pgadmin4.conf and the directories. I haven't found anything in the packaging guidelines how to handle the selinux context though. Also, I think a subpackage is better as potentially other webservers can be used (nginx/uwsgi, ...).

[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=87686984

Comment 2 Fedora Update System 2022-06-08 12:04:57 UTC
FEDORA-2022-e92668e4ba has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e92668e4ba

Comment 3 Fedora Update System 2022-06-09 16:17:05 UTC
FEDORA-2022-e92668e4ba has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-e92668e4ba`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-e92668e4ba

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2022-06-17 01:13:56 UTC
FEDORA-2022-e92668e4ba has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.