When using optimized builds for pyproject patterns that also need a
subdir, the path needs to be reset before attempting to change to the
optimized directory.
Signed-off-by: William Douglas <william.douglas@intel.com>
setup.py test is gone in 3.13 and projects seem to be doing custom
things for replacements. Until wider per project detection is in
place, just remove the %check section for setup.py.
Signed-off-by: William Douglas <william.douglas@intel.com>
If a cmake file defines a pkgconfig dependency with a hypen in it, make
sure we can handle it:
pkg_check_modules(DBUS-1 REQUIRED dbus-1 IMPORTED_TARGET)
Previously we used \w to match the first term (DBUS-1), which does *not*
match hyphens.
When parsing cmake files for find_package dependencies, we match against
entries in cmake_modules. Many of the entries of this file list
multiple packages, separated by space. Split on whitespace so we
actually feed only individual package names to each add_buildreq call.
Otherwise, if cmake_modules provides "extra-cmake-modules png2ico", for
example, and you have "png2ico" in buildreq_ban, the specfile would still
list both extra-cmake-modules and png2ico as build dependencies, because
add_buildreq only compared exact matches.
Modify license skips to handle the common tempfile prefix of '/tmp/*'
and normalize the case where lines lead with a slash vs not.
Also remove a duplicate test for globlike match.
Signed-off-by: William Douglas <william.douglas@intel.com>
Add support for a new config file with glob like handling of paths as
some projects contain license files that are not the license of the
project.
scan_for_licenses now looks at the configuration and does glob like
matching for all the potential license files it tries to add.
This change caused a few structural adjustments to the code and a
slight style change for importing just the toplevel util submodule
that are superficial.
Signed-off-by: William Douglas <william.douglas@intel.com>
vectorscan uses 'vectorscan/' as a tag prefix which confuses our
version parsing (even more so with v being the tag prefix). Add
support for matching any '*/version' tag names as the top priority.
Signed-off-by: William Douglas <william.douglas@intel.com>
Previously in a cleanup commit 74c0833c the support for packages that
didn't have a prefix folder was unintentionally removed. This change
updates the setup call for non-R packages to add the support back.
Signed-off-by: William Douglas <william.douglas@intel.com>
Allow autospec to handle building packages that use a
Jinja2 formatted *.spec.template file. Currently only package_name,
package_version, package_release and package_url fields are supported
but others can be added as needed (patches and archives are good next
steps).
Signed-off-by: William Douglas <william.douglas@intel.com>
Add an options.conf flag for allowing builds to use mock's
--short-circuit for reducing rebuild time.
This change moves the feature from default enabling with no way to
turn off to default disable with a configure to turn on.
Signed-off-by: William Douglas <william.douglas@intel.com>
Once we know autospec is going to exit unsuccessfully, send out a
hopefully useful error from print_fatal or scan the build.log one last
time for useful data and add that content to an output file.
This is intended to only be done in update flows and the file should
be cleaned up prior to autospec being run again. Note that without a
special environment variable active nothing will be written out to the
file.
Signed-off-by: William Douglas <william.douglas@intel.com>
print_fatal calls need to be followed up by an exit consistently and
exit's need to use print_fatal before being called.
Signed-off-by: William Douglas <william.douglas@intel.com>
Add support for cargo_vendors which should be pretty much the output
of a 'cargo vendor' run. This will be appended to any existing
.cargo/config.toml file in the sources. It is intended to mostly come
from the vendor.py in common but useful for other builds as well which
don't need to enable cargo_vendor in options.conf.
Signed-off-by: William Douglas <william.douglas@intel.com>
Things should be autoupdating by default for new content at this point
as being held back for no reason isn't helpful.
Signed-off-by: William Douglas <william.douglas@intel.com>
This patch has a few interrelated changes in it but primarily it is
supporting a new copy_prepend configuration file for autospec. This is
intended to support cases where changes should be made to the source
directory prior to the source directory being copied for different
builds (avx2, 32bit, etc).
Also with this change some tweaks to how cmake builds are handled to
be more aligned with other build systems. Primarily that the source
directoy is now fully copied rather than just creating a cmake build
directory per build in the same source directory.
Finally check support has been updated to account for the new path and
update support for meson and apx.
Signed-off-by: William Douglas <william.douglas@intel.com>
Given more packages are using ninja as the build system of choice
instead of make, add flag to enable ninja usage.
Signed-off-by: William Douglas <william.douglas@intel.com>
This caused some incorrect behavior for numpy. Generally disabling to
avoid problematic behavior.
Signed-off-by: William Douglas <william.douglas@intel.com>
gpg accepts signatures with expired keys as long as the signature was
made prior to key expiration. But it also changes the status-fd output
format that we grep for the expected key ID. Make sure we look for the
alternate EXPKEYSIG line in the output in that case to find the key ID.
Add gpg commands to the specfile so we verify the package signature
during every rpmbuild. Also ensure that the signature key ID matches
what we expect.
Implement a blocklist, keyid_blocklist. If a keyid (without leading 0x)
in this file matches the signing key for a release, terminate autospec
with an error.
This is intended as a mechanism to block building releases signed with a
known compromised key.
When a package has content in /etc, it is removed silently, this
change adds an etc_files log file in git that shows what files were in
/etc that weren't packaged.
Signed-off-by: William Douglas <william.douglas@intel.com>