#1 Import from software factory
Closed 3 years ago by fbo. Opened 6 years ago by tdecacqu.
rpms/ tdecacqu/zuul master  into  master

file removed

@@ -0,0 +1,14 @@ 

+ [Unit]

+ Description=Zuul Executor Service

+ After=network.target

+ 

+ [Service]

+ Type=simple

+ User=zuul

+ Group=zuul

+ SyslogIdentifier=zuul-executor

+ ExecStart=/usr/bin/zuul-executor -d

+ PrivateTmp=true

+ 

+ [Install]

+ WantedBy=multi-user.target

@@ -0,0 +1,13 @@ 

+ [Unit]

+ Description=Zuul Finger Gateway Service

+ After=network.target

+ 

+ [Service]

+ Type=simple

+ User=root

+ Group=root

+ SyslogIdentifier=zuul-fingergw

+ ExecStart=/usr/bin/zuul-fingergw -d

+ 

+ [Install]

+ WantedBy=multi-user.target

file added
+14
@@ -0,0 +1,14 @@ 

+ [Unit]

+ Description=Zuul Merger Service

+ After=network.target

+ 

+ [Service]

+ Type=simple

+ User=zuul

+ Group=zuul

+ LimitNOFILE=8192

+ SyslogIdentifier=zuul-merger

+ ExecStart=/usr/bin/zuul-merger -d

+ 

+ [Install]

+ WantedBy=multi-user.target

@@ -0,0 +1,14 @@ 

+ [Unit]

+ Description=Zuul Scheduler Service

+ After=network.target

+ 

+ [Service]

+ Type=simple

+ User=zuul

+ Group=zuul

+ SyslogIdentifier=zuul-scheduler

+ ExecStart=/usr/bin/zuul-scheduler -d

+ ExecReload=/bin/kill -HUP $MAINPID

+ 

+ [Install]

+ WantedBy=multi-user.target

file added
+13
@@ -0,0 +1,13 @@ 

+ [Unit]

+ Description=Zuul Web Service

+ After=network.target

+ 

+ [Service]

+ Type=simple

+ User=zuul

+ Group=zuul

+ SyslogIdentifier=zuul-web

+ ExecStart=/usr/bin/zuul-web -d

+ 

+ [Install]

+ WantedBy=multi-user.target

file added
+7
@@ -0,0 +1,7 @@ 

+ /var/log/zuul/*.log {

+     missingok

+     notifempty

+     compress

+     delaycompress

+     copytruncate

+ }

file added
+306
@@ -0,0 +1,306 @@ 

+ %global gitdate 20171227

+ %global commit  420e8a460bda83e14b6063bc17f8649597b22d46

+ %global shortcommit %(c=%{commit}; echo ${c:0:7})

+ 

+ Name:           zuul

+ Version:        3.0.0

+ Release:        0.1.%{gitdate}git%{shortcommit}%{?dist}

+ Summary:        Trunk Gating System

+ 

+ License:        ASL 2.0

+ URL:            http://docs.openstack.org/infra/system-config/

+ Source0:        https://github.com/openstack-infra/zuul/archive/%{commit}/zuul-%{version}.tar.gz

+ Source1:        zuul-scheduler.service

+ Source2:        zuul-merger.service

+ Source3:        zuul-executor.service

+ Source4:        zuul-web.service

+ Source5:        zuul-fingergw.service

+ Source6:        zuul.logrotate

+ 

+ BuildArch:      noarch

+ 

+ Requires:       python3

+ Requires:       python3-pbr

+ Requires:       python3-CacheControl

+ Requires:       python3-jwt

+ Requires:       python3-github3py

+ Requires:       python3-PyYAML

+ Requires:       python3-paste

+ Requires:       python3-webob

+ Requires:       python3-paramiko

+ Requires:       python3-GitPython

+ Requires:       python3-daemon

+ Requires:       python3-extras

+ Requires:       python3-iso8601

+ Requires:       python3-statsd

+ Requires:       python3-voluptuous

+ Requires:       python3-gear

+ Requires:       python3-APScheduler

+ Requires:       python3-prettytable

+ Requires:       python3-babel

+ Requires:       python3-kazoo

+ Requires:       python3-sqlalchemy

+ Requires:       python3-alembic

+ Requires:       python3-PyMySQL

+ Requires:       python3-alembic

+ Requires:       python3-crypto

+ Requires:       python3-aiohttp

+ Requires:       python3-uvloop

+ Requires:       python3-netaddr

+ Requires:       python3-paho-mqtt

+ Requires:       git

+ 

+ BuildRequires:  python3-devel

+ BuildRequires:  python3-pbr

+ BuildRequires:  python3-setuptools

+ BuildRequires:  python3-zuul-sphinx

+ BuildRequires:  python3-sphinx-autodoc-typehints

+ BuildRequires:  python3-sphinxcontrib-blockdiag

+ BuildRequires:  python3-sphinxcontrib-programoutput

+ BuildRequires:  help2man

+ %{?systemd_requires}

+ BuildRequires:  systemd

+ 

+ 

+ %description

+ Zuul is a project gating system developed for the OpenStack Project.

+ 

+ 

+ %package scheduler

+ Summary:  The Zuul scheduler

+ Requires: zuul

+ 

+ %description scheduler

+ The Zuul scheduler

+ 

+ 

+ %package merger

+ Summary:  The Zuul merger

+ Requires: zuul

+ 

+ %description merger

+ The Zuul merger

+ 

+ 

+ %package web

+ Summary:  The Zuul web

+ Requires: zuul

+ 

+ %description web

+ The Zuul web

+ 

+ 

+ %package executor

+ Summary:  The Zuul executor

+ Requires: zuul

+ Requires: ansible-python3

+ Requires: python3-jmespath

+ Requires: bubblewrap

+ 

+ %description executor

+ The Zuul executor

+ 

+ 

+ %package migrate

+ Summary:  Migrate zuul v2 and Jenkins Job Builder to Zuul v3

+ Requires: zuul

+ Requires: python3-jenkins-job-builder

+ 

+ %description migrate

+ Migrate zuul v2 and Jenkins Job Builder to Zuul v3

+ 

+ 

+ %package fingergw

+ Summary: Executor finger gateway

+ Requires: zuul

+ 

+ %description fingergw

+ Executor finger gateway

+ 

+ 

+ %package doc

+ Summary: The Zuul documentation

+ 

+ %description doc

+ The Zuul documentation

+ 

+ 

+ %prep

+ %autosetup -n zuul-%{commit} -p1

+ rm -Rf *requirements.txt *.egg-info

+ 

+ # Add alembic __init__.py file, otherwise the migration script isn't packaged

+ touch zuul/driver/sql/alembic/__init__.py \

+       zuul/driver/sql/alembic/versions/__init__.py \

+       zuul/ansible/filter/__init__.py

+ 

+ # Remove interpreter

+ find zuul/ -type f -exec sed -i -e '/#!\/usr\/bin\/.*python.*/{1D}' {} \;

+ 

+ 

+ %build

+ PBR_VERSION=%{version} %py3_build

+ PBR_VERSION=%{version} SPHINX_DEBUG=1 sphinx-build -b html doc/source build/html

+ 

+ rm -Rf build/html/.buildinfo build/html/objects.inv

+ 

+ # Generate man pages

+ mkdir man

+ pushd man

+ echo -e "#!/usr/bin/python3\nimport sys\nfrom zuul.cmd.client import main\nmain()" > zuul

+ echo -e "#!/usr/bin/python3\nimport sys\nfrom zuul.driver.bubblewrap import main\nmain()" > zuul-bwrap

+ for subcmd in cloner executor fingergw merger migrate scheduler web; do

+     echo -e "#!/usr/bin/python3\nimport sys\nfrom zuul.cmd.${subcmd} import main\nmain()" > zuul-${subcmd}

+ done

+ chmod +x zuul*

+ for cmd in zuul*; do

+     PYTHONPATH=.. help2man --no-discard-stderr --no-info -o ${cmd}.man ./${cmd}

+ done

+ popd

+ 

+ 

+ %install

+ PBR_VERSION=%{version} %py3_install

+ 

+ # Remove executable bit from libraries

+ find %{buildroot}%{python3_sitelib}/zuul -type f -exec chmod -x {} \;

+ 

+ # Add zuul web static

+ cp -R zuul/web/static %{buildroot}%{python3_sitelib}/zuul/web/static

+ 

+ # Man pages

+ install -p -D -m 0644 man/zuul.man %{buildroot}%{_mandir}/man1/zuul.1

+ for cmd in bwrap cloner executor fingergw merger migrate scheduler web; do

+     install -p -D -m 0644 man/zuul-${cmd}.man %{buildroot}%{_mandir}/man1/zuul-${cmd}.1

+ done

+ 

+ # Service unit

+ install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/zuul-scheduler.service

+ install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/zuul-merger.service

+ install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/zuul-executor.service

+ install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/zuul-web.service

+ install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/zuul-fingergw.service

+ 

+ # Basic configuration

+ install -p -D -m 0644 etc/logging.conf-sample %{buildroot}%{_sysconfdir}/zuul/logging.conf

+ install -p -D -m 0640 etc/zuul.conf-sample %{buildroot}%{_sysconfdir}/zuul/zuul.conf

+ install -p -D -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/zuul

+ 

+ # Service base directories

+ install -p -d -m 0700 %{buildroot}%{_sharedstatedir}/zuul

+ install -p -d -m 0700 %{buildroot}%{_localstatedir}/log/zuul

+ install -p -d -m 0700 %{buildroot}%{_sharedstatedir}/zuul/.ssh

+ install -p -d -m 0755 %{buildroot}%{_sharedstatedir}/zuul/ansible

+ install -p -d -m 0755 %{buildroot}%{_sharedstatedir}/zuul/executor

+ install -p -d -m 0755 %{buildroot}%{_sharedstatedir}/zuul/git

+ install -p -d -m 0700 %{buildroot}%{_sharedstatedir}/zuul/keys

+ 

+ 

+ %pre

+ getent group zuul >/dev/null || groupadd -r zuul

+ if ! getent passwd zuul >/dev/null; then

+   useradd -r -g zuul -G zuul -d %{_sharedstatedir}/zuul -s /sbin/nologin -c "Zuul Daemon" zuul

+ fi

+ exit 0

+ 

+ 

+ %post scheduler

+ %systemd_post zuul-scheduler.service

+ %post merger

+ %systemd_post zuul-merger.service

+ %post web

+ %systemd_post zuul-web.service

+ %post executor

+ %systemd_post zuul-executor.service

+ %post fingergw

+ %systemd_post zuul-fingergw.service

+ 

+ 

+ %preun scheduler

+ %systemd_preun zuul-scheduler.service

+ %preun merger

+ %systemd_preun zuul-merger.service

+ %preun web

+ %systemd_preun zuul-web.service

+ %preun executor

+ %systemd_preun zuul-executor.service

+ %preun fingergw

+ %systemd_preun zuul-fingergw.service

+ 

+ 

+ %postun scheduler

+ %systemd_postun zuul-scheduler.service

+ %postun merger

+ %systemd_postun zuul-merger.service

+ %postun web

+ %systemd_postun zuul-web.service

+ %postun executor

+ %systemd_postun zuul-executor.service

+ %postun fingergw

+ %systemd_postun zuul-fingergw.service

+ 

+ 

+ %files

+ %license LICENSE

+ %{_mandir}/man1/zuul.1*

+ %{_mandir}/man1/zuul-cloner.1*

+ %{_mandir}/man1/zuul-bwrap.1*

+ %{_bindir}/zuul

+ %{_bindir}/zuul-cloner

+ %{_bindir}/zuul-bwrap

+ %{python3_sitelib}/zuul

+ %{python3_sitelib}/zuul-*.egg-info

+ %config(noreplace) %{_sysconfdir}/logrotate.d/zuul

+ %config(noreplace) %{_sysconfdir}/zuul/logging.conf

+ %config(noreplace) %attr(0640, root, zuul) %{_sysconfdir}/zuul/zuul.conf

+ %dir %attr(0751, zuul, zuul) %{_sharedstatedir}/zuul

+ %dir %attr(0700, zuul, zuul) %{_sharedstatedir}/zuul/.ssh

+ %dir %attr(0755, zuul, zuul) %{_sharedstatedir}/zuul/ansible

+ %dir %attr(0700, zuul, zuul) %{_sharedstatedir}/zuul/keys

+ %dir %attr(0750, zuul, zuul) %{_localstatedir}/log/zuul

+ 

+ %files scheduler

+ %license LICENSE

+ %{_mandir}/man1/zuul-scheduler.1*

+ %{_bindir}/zuul-scheduler

+ %{_unitdir}/zuul-scheduler.service

+ 

+ %files merger

+ %license LICENSE

+ %{_mandir}/man1/zuul-merger.1*

+ %{_bindir}/zuul-merger

+ %{_unitdir}/zuul-merger.service

+ 

+ %files web

+ %license LICENSE

+ %{_mandir}/man1/zuul-web.1*

+ %{_bindir}/zuul-web

+ %{_unitdir}/zuul-web.service

+ 

+ %files executor

+ %license LICENSE

+ %{_mandir}/man1/zuul-executor.1*

+ %{_bindir}/zuul-executor

+ %{_unitdir}/zuul-executor.service

+ %dir %attr(0755, zuul, zuul) %{_sharedstatedir}/zuul/ansible

+ %dir %attr(0755, zuul, zuul) %{_sharedstatedir}/zuul/executor

+ 

+ %files migrate

+ %license LICENSE

+ %{_mandir}/man1/zuul-migrate.1*

+ %{_bindir}/zuul-migrate

+ 

+ %files fingergw

+ %license LICENSE

+ %{_mandir}/man1/zuul-fingergw.1*

+ %{_bindir}/zuul-fingergw

+ %{_unitdir}/zuul-fingergw.service

+ 

+ %files doc

+ %license LICENSE

+ %doc build/html

+ 

+ 

+ %changelog

+ * Tue Jan 09 2018 Tristan Cacqueray <tdecacqu@redhat.com> - 3.0.0-0.1.20171227git420e8a4

+ - Import from software factory repository

no initial comment

@fab would you mind adding openstack-sig as an admin for rpms/zuul ?

Hi, do you mind if we require the ownership of that distgit ?

This PR is a violations of the packaging process. There was a review process [1] but that PR is not based on those data from the review.

zuul requires a new review.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1220451

There are indeed issues wrt Fedora packaging guidelines as mentioned by @tdecacqu in
https://bugzilla.redhat.com/show_bug.cgi?id=1220451#c21

Bundling could be now resolved within new guidelines https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling

Pull-Request has been closed by fbo

3 years ago