Commit Graph

26 Commits

Author SHA1 Message Date
Dirk Müller 0aa4d65378
Add proliantutils
Change-Id: Ia973f3280cbbdbc77e35ca3705b1047d2643d42e
2024-01-04 17:42:02 +01:00
Charu Jain 61ca7d7834 Adding airship folder for packaging airship components
Change-Id: Ib1f537294dabd8dcc5757b35f69c9f6c14e2a501
2019-09-18 18:29:03 +00:00
Thomas Bechtold b18f044dbe Be more relaxed when running lint on a single name
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
2019-08-19 16:50:24 +02:00
Jaime Caamaño Ruiz a1fdd1d55a tools: fix validation of some py3 specs
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
2019-07-19 10:46:55 +02:00
Thomas Bechtold ccdae17907 Allow lint runs for a single spec
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
2019-04-10 13:36:09 +02:00
Dirk Mueller e2da411fcd tools/run_renderspec: fail on syntax errors in the spec templates
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
2018-08-09 14:38:06 +02:00
Zuul 41e2929744 Merge "Switch to python3 for glance service" 2018-06-20 13:28:34 +00:00
yatin 48ffd3a043 Switch to python3 for glance service
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
2018-06-20 12:46:52 +05:30
Zuul 286048d395 Merge "Switch to python3 for keystone service" 2018-06-20 06:49:13 +00:00
yatin 72dc905fd9 oslo.rootwrap: Move to singlespec
Also:-
- remove unnecessary BR on reno
- skip 'test_run_as' test with python3
- Also workaround spec-cleaner to convert %{__python3} macro

Change-Id: Ib6e58670c437b741754f9e766a9747695549767c
2018-06-19 19:41:55 +05:30
yatin f633de2d83 Switch to python3 for keystone service
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
2018-06-19 19:21:35 +05:30
Dirk Mueller 1c3582f898 Fix linters gate
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
2017-10-11 23:03:02 +02:00
Thomas Bechtold daf4bc6ed2 pbr: Move to singlespec
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
2017-10-11 08:54:07 +02:00
Dirk Mueller a6a26831d1 Evaluate singlespec macros for the tox-lint check
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
2017-08-15 13:52:41 +02:00
Thomas Bechtold 3fcbab68f4 Put rendered spec files under their proper name
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>
2017-08-11 14:54:47 +02:00
Dirk Mueller fc556aca08 Add a sanity check for broken spec files
Change-Id: I3607d8fe5f3c93a274e0a0671c1fb1b07e588974
Depends-On: Ia6eee41294e3105fe8e469144d07417c21b7220d
2017-04-07 08:57:00 +02:00
Javier Pena 273b1e111a Fix lint checks after spec-cleaner 0.9.3 update
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
2017-03-03 13:07:02 +00:00
Thomas Bechtold b3ebb31022 Use %autosetup instead of %setup
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
2016-10-20 11:24:58 +02:00
Dirk Mueller d58f4b10f8 Some small shell script check for common review violations
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
2016-10-13 15:59:23 +02:00
Haikel Guemar 9bbc588472 tools: parallelize execution
Parallelize renderspec and spec-cleaner executions to speed up scripts.
There is no constraint to run these jobs sequentially

Change-Id: I7bdeee82cc360cf31e9684ef22638f41c53b12b8
2016-07-21 17:32:56 +02:00
Haikel Guemar 220bb64df0 Tooling: set default behaviour
Tools will run on current directory if no input is given.
Add tools/README.rst for brief documentation

Change-Id: Id8c68c12191591d70ae22293b0b99048998fb1a4
2016-07-07 20:43:40 +02:00
Jenkins ed53256d13 Merge "Clean up output dir before creating new renderspecs" 2016-06-24 12:29:14 +00:00
Thomas Bechtold b47b634de5 Introduce spec-cleaner to enforce spec styling
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
2016-06-24 02:06:21 +02:00
Dirk Mueller 8e1980f9c6 Clean up output dir before creating new renderspecs
This avoids left-over files from previous runs affecting
the test results

Change-Id: I30fe43a9b406321550132267acf25801e15d1178
2016-06-24 01:15:16 +02:00
Haikel Guemar 157f7329ba Use only bash parameter expansion
Small optimization that avoids forking a process to retrieve basename

Change-Id: I4844ba19525d4a3c7d88cfd6d2f3f3896768a113
2016-06-21 19:02:42 +02:00
Thomas Bechtold bf55ef3508 Add basic renderspec test integration
Use renderspec to render the jinja2 templates into real RPM spec
files. Abort if the conversion doesn't work.

Change-Id: I31edbe16129a627236db0c980602ca23a0ba2a4a
2015-10-30 14:23:57 +09:00