Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pgadmin4 for openSUSE:Factory 
checked in at 2021-01-28 21:29:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pgadmin4 (Old)
 and      /work/SRC/openSUSE:Factory/.pgadmin4.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pgadmin4"

Thu Jan 28 21:29:24 2021 rev:18 rq:867523 version:4.29

Changes:
--------
--- /work/SRC/openSUSE:Factory/pgadmin4/pgadmin4.changes        2020-12-17 
17:09:15.433968014 +0100
+++ /work/SRC/openSUSE:Factory/.pgadmin4.new.28504/pgadmin4.changes     
2021-01-28 21:29:25.540284930 +0100
@@ -1,0 +2,21 @@
+Wed Jan 27 11:26:24 UTC 2021 - Antonio Larrosa <[email protected]>
+
+- Fix the desktop application by removing the overriding of
+  SERVER_MODE in config_system.py and config_distro.py which were
+  forcing SERVER_MODE to always have a specific value instead
+  of letting the runtime choose so there's no need to force it.
+- Rename pgadmin4.conf to pgadmin4.conf.in,
+  pgadmin4.uwsgi to pgadmin4.uwsgi.in and
+  README.SUSE.uwsgi to README.SUSE.uwsgi.in and make them also
+  replace PYTHONSITELIB  with the python version used at build time
+- Replace all variables from config files in %prep instead of
+  %install
+- Include README.SUSE.uwsgi in the web-uwsgi subpackage
+
+-------------------------------------------------------------------
+Wed Jan 27 10:51:24 UTC 2021 - Antonio Larrosa <[email protected]>
+
+- Add BuildRequires for python-cryptography and replace dependency for
+  python-Flask-Babel with python-Flask-BabelEx
+
+-------------------------------------------------------------------

Old:
----
  README.SUSE.uwsgi
  pgadmin4.conf
  pgadmin4.uwsgi

New:
----
  README.SUSE.uwsgi.in
  pgadmin4.conf.in
  pgadmin4.uwsgi.in

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pgadmin4.spec ++++++
--- /var/tmp/diff_new_pack.8qLjdS/_old  2021-01-28 21:29:26.332286121 +0100
+++ /var/tmp/diff_new_pack.8qLjdS/_new  2021-01-28 21:29:26.336286127 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package pgadmin4
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 %global python3_blinker_min_version 1.4
 %global python3_extras_min_version 1.0.0
 %global python3_fixtures_min_version 3.0.0
-%global python3_flask_babel_min_version 0.11.1
+%global python3_flask_babelex_min_version 0.9.4
 %global python3_flask_compress_min_version 1.4.0
 %global python3_flask_gravatar_min_version 0.5.0
 %global python3_flask_htmlmin_min_version 1.3.2
@@ -74,14 +74,14 @@
 Source10:       
https://download.postgresql.org/pub/pgadmin/%{name}/v%{version}/source/%{name}-%{version}.tar.gz.asc
 # https://www.pgadmin.org/download/pgadmin-4-source-code/
 Source11:       %{name}.keyring
-Source1:        %{name}.conf
+Source1:        %{name}.conf.in
 Source2:        %{name}.service.in
 Source3:        %{name}.tmpfiles.d
 Source4:        %{name}.desktop.in
 Source6:        %{name}.qt.conf.in
-Source7:        %{name}.uwsgi
+Source7:        %{name}.uwsgi.in
 Source8:        README.SUSE
-Source9:        README.SUSE.uwsgi
+Source9:        README.SUSE.uwsgi.in
 Patch0:         use-os-makedirs.patch
 Patch1:         fix-python3-crypto-call.patch
 Patch2:         fix-python-lib.patch
@@ -93,7 +93,7 @@
 BuildRequires:  libQt5Widgets-devel
 BuildRequires:  python3-Babel >= %{python3_babel_min_version}
 BuildRequires:  python3-Flask >= %{python3_flask_min_version}
-BuildRequires:  python3-Flask-Babel >= %{python3_flask_babel_min_version}
+BuildRequires:  python3-Flask-BabelEx >= %{python3_flask_babelex_min_version}
 BuildRequires:  python3-Flask-Compress >= %{python3_flask_compress_min_version}
 BuildRequires:  python3-Flask-Gravatar >= %{python3_flask_gravatar_min_version}
 BuildRequires:  python3-Flask-HTMLmin >= %{python3_flask_htmlmin_min_version}
@@ -113,6 +113,7 @@
 BuildRequires:  python3-beautifulsoup4 >= %{python3_beautifulsoup4_min_version}
 BuildRequires:  python3-blinker >= %{python3_blinker_min_version}
 BuildRequires:  python3-click
+BuildRequires:  python3-cryptography
 BuildRequires:  python3-devel
 BuildRequires:  python3-extras >= %{python3_extras_min_version}
 BuildRequires:  python3-fixtures >= %{python3_fixtures_min_version}
@@ -157,7 +158,7 @@
 Group:          Productivity/Databases/Tools
 Requires:       python3-Babel >= %{python3_babel_min_version}
 Requires:       python3-Flask >= %{python3_flask_min_version}
-Requires:       python3-Flask-Babel >= %{python3_flask_babel_min_version}
+Requires:       python3-Flask-BabelEx >= %{python3_flask_babelex_min_version}
 Requires:       python3-Flask-Compress >= %{python3_flask_compress_min_version}
 Requires:       python3-Flask-Gravatar >= %{python3_flask_gravatar_min_version}
 Requires:       python3-Flask-HTMLmin >= %{python3_flask_htmlmin_min_version}
@@ -177,6 +178,7 @@
 Requires:       python3-beautifulsoup4 >= %{python3_beautifulsoup4_min_version}
 Requires:       python3-blinker >= %{python3_blinker_min_version}
 Requires:       python3-click
+Requires:       python3-cryptography
 Requires:       python3-extras >= %{python3_extras_min_version}
 Requires:       python3-fixtures >= %{python3_fixtures_min_version}
 Requires:       python3-html5lib >= %{python3_html5lib_min_version}
@@ -219,6 +221,18 @@
 
 This package contains the documentation for pgadmin4.
 
+%package web-uwsgi
+Summary:        Pgamdin4 - uwsgi configuration
+Group:          Productivity/Networking/Web/Utilities
+BuildArch:      noarch
+Requires:       pgadmin4-web
+Requires:       uwsgi
+
+%description web-uwsgi
+pgadmin4 is a management tool for PostgreSQL.
+
+This package holds the uwsgi configuration.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -227,24 +241,19 @@
 %patch2 -p1
 %endif
 
+sed -e 's@PYTHONSITELIB@%{python3_sitelib}@g' <%{SOURCE1} > %{name}.conf
+sed -e 's@PYTHONDIR@%{_bindir}/python3@g' -e 
's@PYTHONSITELIB@%{python3_sitelib}@g' < %{SOURCE2} > %{name}.service
+sed -e 's@PYTHONDIR@%{_bindir}/python3@g' -e 
's@PYTHONSITELIB@%{python3_sitelib}@g' < %{SOURCE4} > %{name}.desktop
+sed -e 's@PYTHONSITELIB64@%{python3_sitearch}@g' -e 
's@PYTHONSITELIB@%{python3_sitelib}@g' <%{SOURCE6} > %{name}.qt.conf
+sed -e 's@PYTHONSITELIB@%{python3_sitelib}@g' <%{SOURCE7} > %{name}.uwsgi
+sed -e 's@PYTHONSITELIB@%{python3_sitelib}@g' <%{SOURCE9} > README.SUSE.uwsgi
+
 cp %{SOURCE8} .
 cp %{SOURCE9} .
 # rpmlint
 chmod -x docs/en_US/theme/pgadmin4/static/style.css
 chmod -x docs/en_US/theme/pgadmin4/theme.conf
 
-%package web-uwsgi
-Summary:        Pgamdin4 - uwsgi configuration
-Group:          Productivity/Networking/Web/Utilities
-BuildArch:      noarch
-Requires:       pgadmin4-web
-Requires:       uwsgi
-
-%description web-uwsgi
-pgadmin4 is a management tool for PostgreSQL.
-
-This package holds the uwsgi configuration.
-
 %build
 cd runtime
 export PYTHON_CONFIG=%{_bindir}/python3-config
@@ -255,52 +264,54 @@
 make %{?_smp_mflags} VERBOSE=1
 
 %install
-cd runtime
 install -d -m 755 %{buildroot}%{_docdir}/%{name}-docs/
-cp -pr ../docs/* %{buildroot}%{_docdir}/%{name}-docs
+cp -pr docs/* %{buildroot}%{_docdir}/%{name}-docs
 
+pushd runtime
 install -d -m 755 %{buildroot}%{_bindir}
 cp pgAdmin4 %{buildroot}%{_bindir}
+popd
 
 install -d -m 755 %{buildroot}%{python3_sitelib}/pgadmin4-web
-cp -pR ../web/* %{buildroot}%{python3_sitelib}/pgadmin4-web
+cp -pR web/* %{buildroot}%{python3_sitelib}/pgadmin4-web
 
 install -d %{buildroot}%{_sysconfdir}/apache2/conf.d/
-install -m 0644 -p %{SOURCE1} 
%{buildroot}%{_sysconfdir}/apache2/conf.d/%{name}.conf
+install -m 0644 -p %{name}.conf 
%{buildroot}%{_sysconfdir}/apache2/conf.d/%{name}.conf
 
 # Install desktop file
 install -d %{buildroot}%{_datadir}/applications/
-sed -e 's@PYTHONDIR@%{_bindir}/python3@g' -e 
's@PYTHONSITELIB@%{python3_sitelib}@g' < %{SOURCE4} > 
%{buildroot}%{_datadir}/applications/%{name}.desktop
+install -m 0644 -p %{name}.desktop 
%{buildroot}%{_datadir}/applications/%{name}.desktop
 
 # Install config system for webapp
 install -d -m 0755 %{buildroot}%{_sysconfdir}/pgadmin/
-echo "SERVER_MODE = True" > %{buildroot}%{_sysconfdir}/pgadmin/config_system.py
+echo "# SERVER_MODE = True" > 
%{buildroot}%{_sysconfdir}/pgadmin/config_system.py
 
 # Install QT conf file
 # This directory will/may change in future releases.
 install -d "%{buildroot}%{_sysconfdir}/xdg/pgadmin/"
-sed -e 's@PYTHONSITELIB64@%{python3_sitearch}@g' -e 
's@PYTHONSITELIB@%{python3_sitelib}@g'<%{SOURCE6} > 
"%{buildroot}%{_sysconfdir}/xdg/pgadmin/pgadmin4.conf"
+install -m 0644 -p %{name}.qt.conf 
%{buildroot}%{_sysconfdir}/xdg/pgadmin/pgadmin4.conf
 
 # Install unit file/init script
 # This is only for systemd supported distros:
 install -d %{buildroot}%{_unitdir}
-sed -e 's@PYTHONDIR@%{_bindir}/python3@g' -e 
's@PYTHONSITELIB@%{python3_sitelib}@g' < %{SOURCE2} > 
%{buildroot}%{_unitdir}/%{name}.service
+install -m 0644 -p %{name}.service %{buildroot}%{_unitdir}/%{name}.service
 
 # ... and make a tmpfiles script to recreate it at reboot.
 mkdir -p %{buildroot}/%{_tmpfilesdir}
 install -m 0644 %{SOURCE3} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
 
-cd %{buildroot}%{python3_sitelib}/%{name}-web
+pushd %{buildroot}%{python3_sitelib}/%{name}-web
 rm -f %{name}.db
 
 cat << EOF > config_distro.py
-SERVER_MODE = False
+# SERVER_MODE = True
 HTML_HELP = '%{_datadir}/doc/%{name}-docs/en_US/html/'
 UPGRADE_CHECK_ENABLED = False
 DEFAULT_BINARY_PATHS = {
     "pg": "%{_bindir}"
 }
 EOF
+popd
 
 chmod -x %{buildroot}%{_docdir}/%{name}-docs/en_US/images/*
 rm %{buildroot}%{python3_sitelib}/%{name}-web/regression/.gitignore
@@ -314,7 +325,7 @@
 install -d -m 0700 %{buildroot}%{pgadmin4homedir}/sessions
 
 install -d -m 0755 %{buildroot}%{_sysconfdir}/uwsgi/vassals
-install -m 0644 %{SOURCE7} 
%{buildroot}%{_sysconfdir}/uwsgi/vassals/pgadmin4.ini
+install -m 0644 %{name}.uwsgi 
%{buildroot}%{_sysconfdir}/uwsgi/vassals/pgadmin4.ini
 
 %pre web
 /usr/sbin/groupadd -r %{user_group_name} &>/dev/null || :
@@ -370,6 +381,7 @@
 
 %files web-uwsgi
 %defattr(-,root,root,-)
+%doc README.SUSE.uwsgi
 %dir %{_sysconfdir}/uwsgi
 %dir %{_sysconfdir}/uwsgi/vassals
 %config (noreplace) %{_sysconfdir}/uwsgi/vassals/pgadmin4.ini

++++++ README.SUSE.uwsgi.in ++++++
To configure pgadmin with Apache and uwsgi, just add the follwing lines to a 
vhost:

    ProxyPass /pgadmin unix:/run/uwsgi/uwsgi-pgadmin.sock|uwsgi://localhost/
    <Directory PYTHONSITELIB/pgadmin4-web/>
        Require all granted
    </Directory>

Note that you have to run once `pgadmin4` from the command line to set the 
master password
by executing:

    /usr/bin/python3 PYTHONSITELIB/pgadmin4-web/pgAdmin4.py


++++++ pgadmin4.conf.in ++++++
# To enable the /pgadmin4 alias, run
#     a2enmod wsgi && a2enflag PGADMIN && rcapache2 restart
# This will make /pgadmin4 available on all virtual hosts.
#
# If you want to have the /pgadmin4 alias only on a specific
# virtual host, add the alias to the config of that vhost.

<IfDefine PGADMIN>
WSGIDaemonProcess pgadmin processes=1 threads=25
WSGIScriptAlias /pgadmin4 PYTHONSITELIB/pgadmin4-web/pgAdmin4.wsgi

<Directory PYTHONSITELIB/pgadmin4-web/>
        WSGIProcessGroup pgadmin
        WSGIApplicationGroup %{GLOBAL}
        <IfModule mod_authz_core.c>
                # Apache 2.4
                Require all granted
        </IfModule>
        <IfModule !mod_authz_core.c>
                # Apache 2.2
                Order Deny,Allow
                Deny from All
                Allow from 127.0.0.1
                Allow from ::1
        </IfModule>
</Directory>
</IfDefine>

++++++ pgadmin4.uwsgi.in ++++++
[uwsgi]
#plugin = apparmor
#apparmor-hat = pgadmin

uid = pgadmin
gid = pgadmin

processes = 1
threads = 25

socket = /run/uwsgi/uwsgi-pgadmin.sock
chmod-socket = 660
chown-socket = wwwrun:www

plugin = python3
chdir = PYTHONSITELIB/pgadmin4-web/
mount = /=pgAdmin4:app

Reply via email to