Hello community,
here is the log from the commit of package python-puppetboard for
openSUSE:Factory checked in at 2016-08-25 09:53:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-puppetboard (Old)
and /work/SRC/openSUSE:Factory/.python-puppetboard.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-puppetboard"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-puppetboard/python-puppetboard.changes
2014-12-03 22:51:11.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python-puppetboard.new/python-puppetboard.changes
2016-08-25 09:53:47.000000000 +0200
@@ -1,0 +2,38 @@
+Wed Aug 10 11:06:19 UTC 2016 - [email protected]
+
+- Ensure shadow utilities are present, and check for group/user
+ before creating them.
+
+-------------------------------------------------------------------
+Sat Aug 6 19:05:22 UTC 2016 - [email protected]
+
+- fix the perms of the tmp/ directory, so that uwsgi can actually create the
+ socket inside there
+- remove needless dep
+
+-------------------------------------------------------------------
+Sat Aug 6 09:53:18 UTC 2016 - [email protected]
+
+- create -uwsgi subpackage with appropriate config and unit service file
+
+-------------------------------------------------------------------
+Sat Jul 30 09:23:55 UTC 2016 - [email protected]
+
+- Version bump 0.0.5:
+ - Replacing chart.js with c3.js and d3.js
+ - Implemented Semantic UI 0.16.1
+ - Adding an OFFLINE_MODE to download assets from a CDN or the PuppetBoard
+ server
+ - Allowing Catalog viewing from the Nodes page if new configuration option
+ ENABLE_CATALOG is enabled (Disabled by default)
+ - Adding an Inventory page to give a high-level overview of the managed nodes
+ through a configurable list of facts
+ - This will be the final release of the 0.0.x series
+- Fix homepage
+- Unhardcode the paths in the configs
+- Change wsgi dir to /srv/www/vhosts/puppetboard
+- Create puppetboard user and run the apache wsgi process with that user
+- Install the wsgi/settings configs in the main package
+- Rename the wsgi subpackage to apache, and install only the apache config
+
+-------------------------------------------------------------------
Old:
----
puppetboard-0.0.4.tar.gz
New:
----
puppetboard-0.0.5.tar.gz
puppetboard-uwsgi.service
uwsgi.ini
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-puppetboard.spec ++++++
--- /var/tmp/diff_new_pack.0LvQDZ/_old 2016-08-25 09:53:48.000000000 +0200
+++ /var/tmp/diff_new_pack.0LvQDZ/_new 2016-08-25 09:53:48.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-puppetboard
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,66 +15,75 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
%define pyname puppetboard
-%define wsgi_dir /var/lib/%{pyname}
+%define wsgi_dir /srv/www/vhosts/%{pyname}
%define apache_confd %{_sysconfdir}/apache2/conf.d
-
+%if 0%{?suse_version} && 0%{?suse_version} <= 1110
+%{!?python_sitelib: %global python_sitelib %(python -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%else
+BuildArch: noarch
+%endif
Name: python-puppetboard
-Version: 0.0.4
+Version: 0.0.5
Release: 0
-Url: https://github.com/nedap/puppetboard
Summary: Web frontend for PuppetDB
License: Apache-2.0
Group: Development/Languages/Python
+Url: https://github.com/voxpupuli/puppetboard
Source:
https://pypi.python.org/packages/source/p/%{pyname}/%{pyname}-%{version}.tar.gz
Source1: wsgi.py
Source2: apache2-wsgi.conf
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: python-devel
+Source3: uwsgi.ini
+Source4: %{pyname}-uwsgi.service
+BuildRequires: apache2
BuildRequires: fdupes
-BuildRequires: python-setuptools
BuildRequires: python-Flask
BuildRequires: python-Flask-WTF
-BuildRequires: python-jinja2
BuildRequires: python-MarkupSafe
BuildRequires: python-WTForms
-BuildRequires: python-werkzeug
+BuildRequires: python-devel
BuildRequires: python-itsdangerous
+BuildRequires: python-jinja2
BuildRequires: python-pypuppetdb
BuildRequires: python-requests
-BuildRequires: apache2
+BuildRequires: python-setuptools
+BuildRequires: python-werkzeug
+BuildRequires: pkgconfig(systemd)
Requires: python-Flask
Requires: python-Flask-WTF
-Requires: python-jinja2
Requires: python-MarkupSafe
Requires: python-WTForms
Requires: python-itsdangerous
+Requires: python-jinja2
Requires: python-pypuppetdb
Requires: python-requests
+Requires(pre): shadow
Provides: %{pyname}
-
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
-BuildArch: noarch
-%endif
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%{?systemd_requires}
%description
Puppetboard is a web interface to PuppetDB aiming to replace the reporting
functionality of Puppet Dashboard.
-
Puppetboard relies on the pypuppetdb library to fetch data from PuppetDB and
is built with the help of the Flask microframework.
-More information: https://github.com/nedap/puppetboard
-
-%package wsgi
+%package apache
+Summary: apache + mod_wsgi support for puppetboard
Group: Development/Languages/Python
-Summary: mod_wsqi support for puppetboard
Requires: %{name} = %{version}
Requires: apache2-mod_wsgi
-%description wsgi
-This package provides support for running puppetboard under
-Apache + mod_wsgi
+%description apache
+This package provides support for running puppetboard under Apache + mod_wsgi
+
+%package uwsgi
+Summary: uwsgi support for puppetboard
+Group: Development/Languages/Python
+Requires: %{name} = %{version}
+Requires: uwsgi-python
+
+%description uwsgi
+This package provides support for running puppetboard under uwsgi
%prep
%setup -q -n %{pyname}-%{version}
@@ -86,26 +95,63 @@
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes %{buildroot}%{_prefix}
-#
+install -d -m 0755 %{buildroot}/%{_sbindir}
install -d -m 0755 %{buildroot}/%{apache_confd}
install -d -m 0755 %{buildroot}/%{wsgi_dir}
+install -d -m 0755 %{buildroot}/%{wsgi_dir}/tmp/sockets
+
+install -m 0644 %{pyname}/default_settings.py
%{buildroot}/%{wsgi_dir}/settings.py
+install -m 0644 %{SOURCE1} %{buildroot}/%{wsgi_dir}
+install -m 0644 %{SOURCE2} %{buildroot}/%{apache_confd}/%{pyname}-wsgi.conf
+install -m 0644 %{SOURCE3} %{buildroot}/%{wsgi_dir}/uwsgi.ini
+
+install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{pyname}-uwsgi.service
+ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{pyname}-uwsgi
+
+sed -i -e 's|@PYTHON_SITELIB@|%{python_sitelib}|' -e
's|@WSGI_DIR@|%{wsgi_dir}|' \
+ %{buildroot}/%{apache_confd}/%{pyname}-wsgi.conf
-install -m 0644 puppetboard/default_settings.py
%{buildroot}/%{wsgi_dir}/settings.py
-install -m 0644 %{S:1} %{buildroot}/%{wsgi_dir}
+sed -i -e 's|@WSGI_DIR@|%{wsgi_dir}|' %{buildroot}/%{wsgi_dir}/wsgi.py \
+ %{buildroot}/%{wsgi_dir}/uwsgi.ini
%{buildroot}/%{_unitdir}/%{pyname}-uwsgi.service
-install -m 0644 %{S:2} %{buildroot}/%{apache_confd}/%{pyname}-wsgi.conf
-sed -i 's@PYTHON_SITELIB@%{python_sitelib}@'
%{buildroot}/%{apache_confd}/%{pyname}-wsgi.conf
+%pre
+getent group %{pyname} >/dev/null || %{_sbindir}/groupadd -r %{pyname} || :
+getent passwd %{pyname} >/dev/null || \
+ %{_sbindir}/useradd -g %{pyname} -s /bin/false -r -c "PuppetBoard" \
+ -d %{wsgi_dir} %{pyname} || :
+
+%pre uwsgi
+%service_add_pre %{pyname}-uwsgi.service
+
+%preun uwsgi
+%service_del_preun %{pyname}-uwsgi.service
+
+%post uwsgi
+%service_add_post %{pyname}-uwsgi.service
+
+%postun uwsgi
+%service_del_postun %{pyname}-uwsgi.service
%files
%defattr(-,root,root,-)
%doc LICENSE README.rst CHANGELOG.rst
%{python_sitelib}/*
-
-%files wsgi
-%defattr(-,root,root,-)
+%dir /srv/www/vhosts
+%defattr(-,root,%{pyname})
%dir %{wsgi_dir}
-%config(noreplace) %{apache_confd}/%{pyname}-wsgi.conf
%config(noreplace) %{wsgi_dir}/settings.py
%config(noreplace) %{wsgi_dir}/wsgi.py
+%files apache
+%defattr(-,root,root,-)
+%config(noreplace) %{apache_confd}/%{pyname}-wsgi.conf
+
+%files uwsgi
+%defattr(-,root,root,-)
+%config(noreplace) %{wsgi_dir}/uwsgi.ini
+%{_sbindir}/rc%{pyname}-uwsgi
+%{_unitdir}/%{pyname}-uwsgi.service
+%defattr(-,%{pyname},%{pyname})
+%{wsgi_dir}/tmp/
+
%changelog
++++++ apache2-wsgi.conf ++++++
--- /var/tmp/diff_new_pack.0LvQDZ/_old 2016-08-25 09:53:48.000000000 +0200
+++ /var/tmp/diff_new_pack.0LvQDZ/_new 2016-08-25 09:53:48.000000000 +0200
@@ -1,17 +1,17 @@
#
<IfModule mod_wsgi.c>
- <Directory /var/lib/puppetboard>
+ <Directory @WSGI_DIR@>
Order allow,deny
Allow from all
</Directory>
- WSGIDaemonProcess puppetboard user=wwwrun group=www threads=5
- WSGIScriptAlias /puppetboard /var/lib/puppetboard/wsgi.py
+ WSGIDaemonProcess puppetboard user=puppetboard group=puppetboard threads=5
+ WSGIScriptAlias /puppetboard @WSGI_DIR@/wsgi.py
- Alias /static PYTHON_SITELIB/puppetboard/static
+ Alias /static @PYTHON_SITELIB@/puppetboard/static
- <Directory PYTHON_SITELIB/puppetboard>
+ <Directory @PYTHON_SITELIB@/puppetboard>
WSGIProcessGroup puppetboard
WSGIApplicationGroup %{GLOBAL}
Order allow,deny
++++++ puppetboard-0.0.4.tar.gz -> puppetboard-0.0.5.tar.gz ++++++
++++ 7762 lines of diff (skipped)
++++++ puppetboard-uwsgi.service ++++++
[Unit]
Description=PuppetBoard uWSGI
After=puppetdb.service
[Service]
Type=simple
User=puppetboard
Group=puppetboard
WorkingDirectory=@WSGI_DIR@
ExecStart=/usr/sbin/uwsgi --ini @WSGI_DIR@/uwsgi.ini
Restart=on-failure
[Install]
WantedBy=multi-user.target
++++++ uwsgi.ini ++++++
[uwsgi]
module = wsgi:application
plugin = python, systemd_logger
chdir = @WSGI_DIR@
uid = puppetboard
gid = www
chmod-socket = 660
master = true
processes = 2
socket = tmp/sockets/puppetboard.sock
vacuum = true
logger = systemd
die-on-term = true
++++++ wsgi.py ++++++
--- /var/tmp/diff_new_pack.0LvQDZ/_old 2016-08-25 09:53:49.000000000 +0200
+++ /var/tmp/diff_new_pack.0LvQDZ/_new 2016-08-25 09:53:49.000000000 +0200
@@ -3,5 +3,5 @@
import os
# Needed if a settings.py file exists
-os.environ['PUPPETBOARD_SETTINGS'] = '/var/lib/puppetboard/settings.py'
+os.environ['PUPPETBOARD_SETTINGS'] = '@WSGI_DIR@/settings.py'
from puppetboard.app import app as application