Commit Graph

1271 Commits

Author SHA1 Message Date
Arjan van de Ven cd5dd67001 go more aggressive on avx512 2022-12-28 09:14:40 -08:00
Arjan van de Ven 6ceecf0a0d few R flags tweaks 2022-12-28 09:14:40 -08:00
William Douglas e27779c662 Add a cache directory for signer keys
Enable the use of a distro wide key cache directory for cases where a
signing key is used by more than one package.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-12-20 11:03:59 -08:00
William Douglas b3949ed65f Correctly handle pypi integrity failure
When pypi's json fails to load for an integrity check, return an empty
dict so that the failure is able to be handled. Also fixup the error
string to indicate the URL that was tried.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-12-12 17:45:54 -08:00
William Douglas 0b297a8e43 Enable shell like glob matching for *extras files
This change allows *extras files to contain '*' matches. This somewhat
emulates the shell glob match in that '/foo*bar' will match '/foobar'
and '/foobazbar' but not '/foo/bar'. The globs are only allowed one
per directory such that '/foo*/bar*' is allowed but '/foo*bar*' is
not.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-11-05 06:02:53 -07:00
William Douglas 6030a44fea Add new license blacklist string
Seen in ceph

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-10-31 11:12:46 -07:00
William Douglas 5ba18151ed Add a config option for skipping file replacement
Some packages have a files section replacement in place that uses
globs instead of listing all files in the section. This doesn't work
well with extras. Add an option to config to turn off the replacement
so extras are able to function as normal.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-10-17 11:00:29 -07:00
Patrick McCarty eb506ad637 specfiles: add missing build_prepend handling for python patterns
Specifically, this change enables build_prepend for the avx2 builds for
both `pyproject` and `distutils3` patterns.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-09-19 15:36:26 -07:00
William Douglas 6139ed0b8a Remove msse2avx
This in theory is implied with gcc 12 when it makes sense and it
breaks clang as it isn't supported there.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-09-07 09:41:20 -07:00
Patrick McCarty e486aaee85 Sync latest patterns
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-08-29 14:27:45 -07:00
Patrick McCarty a4a017695b Revise R pattern to fix license file installation
* The extra subdirectory created via the `-c` flag to `%setup` is
  unnecessary for packages using the R pattern, since all CRAN source
  tarballs have a toplevel container directory. Remove the `-c` flag to
  avoid creating that subdir and thereby fixing license file
  installation.

* Adjust the required argument to `R CMD ...` commands that specifies
  the relative path where package sources are found. The package sources
  are now found in the current directory instead of a subdir named after
  the package, so use `.` as the path.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-08-08 11:36:36 -07:00
Patrick McCarty 43904ea6e4 pkg_integrity: verify sha256 instead of md5 for pypi packages
All sdist tarballs available on pypi appear to have both an md5sum and
sha256sum listed, so switch to verify the stronger hash (sha256)
instead.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-08-05 13:57:30 -07:00
William Douglas bf0c2a2e13 Try and use %{version} for license file copying
In order to avoid large diffs just because the package version portion
of the license copying line changed, use the %{version} macro.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-07-22 14:50:22 -07:00
William Douglas 966af8eade Update build patterns for writing the license subpackage
Some build patterns were missing write_license_files so add them.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-07-22 11:23:30 -07:00
Patrick McCarty 5bc6919254 specfiles: fix interleaving of %build and %check sections
The three python package patterns (pyproject, distutils3, and
distutils36) were starting the %check section before the end of %build
section.

Fix these issues by starting %check immediately before %install.

Also, use the `write_check()` method wrapper for these patterns to align
with all other patterns.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-07-19 10:10:23 -07:00
William Douglas a453f7be0e Enable provides configuration overrides
Add support for (*_)provides_{add,ban} configuration files.

This is occasionally useful for cases where a pypi() provide isn't
picked up as the packages isn't a python package but does provide a
python library. It also can be handy when doing some renames to
prevent mass rebuilds.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-06-29 14:06:17 -07:00
Patrick McCarty 4d2e669ae2 Install glibc-hwcaps dev content appropriately
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-06-27 00:52:50 -07:00
Patrick McCarty 1bc17fa165 pypidata: print stderr output for any failed subprocesses
In the event that the virtualenv or pip subprocess commands from this
module return an error code, print more information obtained from stderr
to help diagnose the issue(s).

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-06-22 16:28:48 -07:00
William Douglas f2a1853e40 Update elf-move.py targetpath
The targetpath for elf-move.py now needs to be the %{buildroot} base
as the full path to the optimized-elf directory is now hardcoded into
the elf-move.py tooling.

This change was made for the library files being autoinstalled to the
glibc-hwcaps directory without making use of clr-elf-replace (making
swupd a little happier about missing files). Full details of the
change are in the clr-avx-tools repo
commit (415a400edd05e6fa405b0682f7c5c9895d039e09).

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-06-20 12:08:11 -07:00
William Douglas 4f6886d23d Glob the perl module path
Rather than listing all the files in the perl module path (which
includes a minor version that causes updates to be a reautospec rather
than a bump) move to a glob to simplify the update workflow.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-06-03 11:00:39 -07:00
Arjan van de Ven a9e5360b14 pypi avx flags 2022-06-03 08:28:52 -07:00
Patrick McCarty 7c8dc1f1c5 Sync latest patterns
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-05-26 14:13:03 -07:00
Patrick McCarty 43ac84d48e Support minimal escaping in pattern conf files
Add support to escape a leading `#` character in pattern conf file
patterns by interpreting `\#` as a pattern starting with `#`.

Also add documentation for this feature to the existing pattern conf
files where this support might be needed.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-05-24 11:45:19 -07:00
William Douglas ba13fed6b6 Change distutils3 and pyproject builds to always build avx2
The distutils build is changing to no longer create avx2/avx512
libraries in the python build process. Instead build avx2 always as
part of python builds (not checking options.conf settings for
avx2/avx512 at this time). This is achieved by setting up cflags
similar to the other build patterns and making use of elf-move.

The reason for this change is to avoid cumbersome distutils patches
and make the package ecosystem more uniform to hopefully catch some
outlier performance issues due to the idiosyncratic build process.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-05-19 13:24:14 -07:00
Patrick McCarty 546b947ba6 Refactor pytest test summary parsing; update tests
Instead of using separate regular expressions to capture the multiple
forms pytest test summaries might take, use one generic regular
expression to match the summary line, and then process comma-separated
components of the line with more specific matches.

Three test cases needed to be updated to accommodate this refactor:

- Two tests omitted the leading '=' characters from the line to match,
  even though their summary lines clearly originated from pytest. Fix by
  adding some leading '=' characters for those summary lines.

- One test mistakenly counted an "xpass" as an "xfail". Autospec maps
  "xpass" results to "pass", so update the test accordingly.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-05-04 16:41:39 -07:00
Patrick McCarty 3cf41d1d24 Update a few more fail patterns
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-04-29 11:17:47 -07:00
Patrick McCarty d946db6a4e Update more fail patterns for pypi package renames
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-04-25 12:32:53 -07:00
William Douglas 9d7afbe38b Enable short-circuit with excludes
When packages have excludes previously we would full build because
there was no method to determine if the excludes list had items
dynamically added to it.

This change adds a new list that is the original exlcudes list
manually configured and is used to compare against the excludes list
that is generated during processing the files list. If the two
lists (compared as sets) are the identical, then short-circuiting is
still possible.

Also fixup some out of date documentation.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-04-20 12:36:31 -07:00
Patrick McCarty cf882db3b9 config: improve handling of backport patches
If a patch applies changes to more than one file, multiple `Skipping
patch` messages may appear in the log. For that case, multiple calls to
`remove_backport_patch()` will occur. Support that case by returning
early if the patch has already been removed from `self.patches`.

Also, add a progress message to indicate a backport patch has been
removed, otherwise no progress message is likely to appear between build
rounds.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-04-16 15:27:01 -07:00
Patrick McCarty 189761e113 Update fail pattern for pypi-docutils
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-04-14 12:44:51 -07:00
William Douglas c27db4a84b Explicitly set git init branch
Make main the default branch with git init as not all systems will
share the same default branch name value and Clear Linux uses main for
the package ecosystem.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-04-11 19:39:30 -07:00
Patrick McCarty 145938d342 tarball: support another version prefix for gitlab URLs
Two gitlab URLs had mis-parsed versions that are derived from upstream
tags with a `VERSION_` prefix...

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-04-05 10:25:15 -07:00
Patrick McCarty 11b0d0feac tests: for every package URL, test all content states
The generated packageurl name/version tests were only testing one of
four content states, leading to a gap in test coverage, since some names
or versions might be mis-parsed in a state that was not tested.

Fix the issue by testing all content states for every package URL in the
tests/packageurls file. And ensure that test failure output remains
actionable by using a subTest() context manager and setting the `state`
argument, which will print the value of `state` in the test failure
output header.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-04-04 17:31:00 -07:00
Patrick McCarty 4e5fe6bddc config: fix value for default dnf conf
If unset, the `yum_conf` autospec config variable (representing a
dnf.conf in modern times) should reference the dnf.conf from
`conf/dnf.conf` in the `common` repo.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-04-04 12:32:34 -07:00
William Douglas bab62aab05 Handle backport patches
When encountering patches prefixed with 'backport-' if they no longer
apply, remove them from the patch series and try to restart the build
without them. The goal is to avoid manual work removing patches known
to be obsolete in the next release.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-03-18 13:48:17 -07:00
William Douglas a021eff54d Don't exit on missing dependencies
Previous change made missing build dependendies fatal, and while
correct, causing the buildreq_cache file to not be updated when
missing dependencies cause the build to exit.

Move back to previous obvserved behavior but change the logic to
return if the buildroot log is not successful.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-03-17 15:25:19 -07:00
Patrick McCarty 29b92c3012 Sync latest patterns
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-03-16 14:56:01 -07:00
William Douglas 38d66d6ae6 Create a new object for multi_version
When not handling a multiple version package, there was a case where if
the version wasn't set the multi_version map would be the
config.versions map and that's not intended to outside of multiple
version use case.

So to fix this, make a new map when setting a default version for the
multi_version map and keep config.versions as its own map.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-03-02 13:49:35 -08:00
Patrick McCarty 2db09c3c5a test: add tests for matching of the new format
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-02-28 12:49:36 -08:00
Patrick McCarty d6d2fb6661 count: match newer-style pytest summaries
More modern `pytest` versions appear to format the time value
differently... So, for the regexps that no longer match, support the
new format.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-02-28 12:49:36 -08:00
Patrick McCarty 0fdaee07da count: move pytest match examples next to the regexps
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-02-28 12:49:36 -08:00
Patrick McCarty 7fb889bd82 commitmessage: support more exact version prefixes
It's common to see git tag names with a `<packagename>-` prefix for the
version string, also perhaps appearing before a `v` or `V`.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-02-15 12:29:37 -08:00
Patrick McCarty 71ffebd851 Update failed command mapping for nc
In Clear Linux OS, `nmap-extras` (subpackage of `nmap`) has provided an
`nc` symlink to `ncat` since Sep 2018, so this mapping should be
updated...

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-02-15 11:05:27 -08:00
William Douglas 25dee2cae6 Ignore python requirements with max python version
If a python requirement has a python_version bounded by a maximum
(python_version < 3.8) than ignore it. The reasoning for this change
is to avoid dependencies that no longer apply with the most recent
python version.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-02-09 10:53:10 -08:00
William Douglas 620cebb27b Don't use beignet for opencl
beignet is not used for the latest opencl hardware so stop auto adding
it as a dependency.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-02-07 14:12:37 -08:00
William Douglas 1d8f3d6ea1 buildreq: Fix typo
add_buildreq doesn't take a packages argument and this was causing
junk to be added to the buildreq_cache.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-02-07 13:53:23 -08:00
William Douglas 1535c97ad3 build: exit on missing package
Missing packages should always cause autospec to exit as there is no
further actions it can take. Given missing packages are the only
reason for parse_buildroot_log to fail, exit on failure from there.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-02-07 12:37:36 -08:00
William Douglas b0d98f2f41 build: reset file_restart for buildroot log parse
The file_restart needs to be reset for the buildroot log if the
buildroot log is not clean the build log won't be parsed and so
file_restart won't be reset otherwise (causing build loops to occur
for packages that can't be found for instance).

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-02-07 12:37:36 -08:00
William Douglas 32ce9e9dc4 check: Add handling for empty testcount key
In some packages (kubernetes) builds that skip the final round may
have content in the build.log interpreted as test results. For these
cases try and use the empty test count key as a signal that the
previous build should be used for test results instead.

In some cases this will cause packages that had no tests for an empty
key to use the previous build round for reporting test results but
hopefully that won't cause test reporting failures.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-02-04 16:37:29 -08:00
Patrick McCarty 257a0032b8 Avoid deprecated egrep command
The `egrep` command has been deprecated since 2007 and in the next
`grep` release, will begin to print a warning about obsolescence.

Port the one instance of autospec's `egrep` use to `grep -E` to align
with upstream direction.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-02-04 16:07:52 -08:00