When eg. running "tox -elint -- barbican", the rendering works fine
but then the spec is not checked because barbican.spec.j2 renders to
openstack-barbican.spec . Be more relaxed when trying to find the
rendered spec file.
Change-Id: I589c3f64bffcbadb9457fd96b29197e684516c86
Assuming the reason run_renderspec skipped py3 was to avoid
speccleaner complaining about single line py2 and py3 BuildRequires,
this patch changes the way to achieve that while supporting other
different ways to write py3 specs that would otherwise would not be
recognized as py3 only and end up with blank BuildRequires and the
like, specifically:
* singlespecs with py3 flavor only (new networking-l2gw spec)
* py3 specs for which the package name is rendered instead of forced
(networking-generic-switch)
Change-Id: I62fad6d140338ee9af7eca144edb4ae6e96f6007
Currently, a "tox -e lint" run takes a lot of time. But when
developing locally and changing a single spec template, this is
annoying.
So allow a second positional argument for the 3 tools from the tools/
directory which is a string used by the "-name" argument from
"find". With that, it is possible to call lint for a single spec
template with eg:
tox -elint python-cliff
Change-Id: I1ba05ed4e353728d251105fc7ad356d759813481
running processes in the background with " &" means that the exit
code will get ignored by the surrounding shell, which causes
issues in renderspec invocation to be ignored by the linter job.
Rewrite the logic to use xargs so that we preserve the parallelism
but still capture the exit codes (although it happens out of band
so it is remaining hard to find in the output). Remove the py3 only
logic and always run it with both flags.
Change-Id: Idb5f9cd3d6264ad86ca5a9905234f072ece622ca
python2 will retire in sometime, so we should start
switch to python3. As there are no real consumers
for rpm-packaging services specs, so switching services
spec to python3 only.
- Also do not skip py3 while generating spec for glance.
- Switch to stestr
- Switch to sphinx-build for doc generation
Depends-On: I751aac4260b0583da53c9802d58e12556e122c82
Change-Id: I66c9f4e44d7ed7e60ee4a2b0b2a7366e1ca1fbfb
Also:-
- remove unnecessary BR on reno
- skip 'test_run_as' test with python3
- Also workaround spec-cleaner to convert %{__python3} macro
Change-Id: Ib6e58670c437b741754f9e766a9747695549767c
python2 will retire in sometime, so we should start
switch to python3. As there are no real consumers
for rpm-packaging services specs, so switching services
spec to python3 only.
Also do not skip py3 while generating spec for keystone.
Change-Id: Id8eba4dcfa9652967993c41af9161bad8559b9fd
It seems the sed wasn't reliable. renderspec has an option to disable
the double expand, let's make use of it rather than hackling around
afterwards.
Change-Id: I2f877657ad39f02396e9f70fb500a3a5dd376679
Also remove the python3- BuildRequires for the spec-cleaner run.
spec-cleaner expects each BuildRequires on a new line but
that is not how our macros work.
Also cleanup the spec template.
Change-Id: I2c16354c27f3719b4ed10b02cb2db2a6caaf652e
With the introduction of the singlespec macros, those need
to be available in the lint environment so that rpmspec checks
don't fail on parse errors.
Change-Id: I5cec87ba018255e1d91816c9b3a6ddedc17cbffc
The singlespec macros expect to be able to find the
spec file under $PWD/$spec.spec, so the previous hack
of putting everything in one dir does no longer work. Instead
introduce a subdir per spec style and rename the test specfiles
properly.
Change-Id: I5cb1d3f9c1d6abb725800ac9ebc47fbad750aab1
Co-Authored-By: Dirk Mueller <dirk@dmllr.de>
The update spec-cleaner 0.9.3 has caused some checks to fail in the
spec templates (actually, they should have failed before). Also,
it has introduced an issue [1], adding a workaround until it is
sorted out.
[1] https://github.com/openSUSE/spec-cleaner/issues/173
Change-Id: Iaac66cefbf700b0116616ea70f132cf465808e2f
This simplifies the process of adding patches to spec files.
Adding a patch is then just adding a %patch source and %Autosetup
will apply the patches in order.
Also add a speccheck for that case.
Change-Id: Ic4a925d800f3816b6cea865f779aa455e5b5a592
This should probably be a lot more advanced, but for now
this finds the problem that I introduce all the time :)
Depends-on: I87a9de05f15b3dd1f3d5fb9c6b77c09d265b28ad
Change-Id: I9c1815a077c2fd918a35b44081bccdd1ccd8afc2
Parallelize renderspec and spec-cleaner executions to speed up scripts.
There is no constraint to run these jobs sequentially
Change-Id: I7bdeee82cc360cf31e9684ef22638f41c53b12b8
Tools will run on current directory if no input is given.
Add tools/README.rst for brief documentation
Change-Id: Id8c68c12191591d70ae22293b0b99048998fb1a4
A new test-requirement called spec_cleaner is run on the
rendered spec files to check the style of a given spec.
This enforces a consistent style between spec files.
Also fix the currently available spec files to have a consistent
style.
Change-Id: I31957cc986e320798d5d6212e4d37fdf89b13b3d
Use renderspec to render the jinja2 templates into real RPM spec
files. Abort if the conversion doesn't work.
Change-Id: I31edbe16129a627236db0c980602ca23a0ba2a4a