Add information about what autospec version was used to create the
spec file.
New header will appear as:
+# autospec version: v2
+# autospec commit: 1234567
With this change we'll restart tagging autospec. Changes that get
tagged (after PR merge, tag likely just pushed via git cli) should be
doing something that would benefit from a larger package ecosystem
rebuild.
Signed-off-by: William Douglas <william.douglas@intel.com>
Not quite the complete overhaul that is needed (specfile flag
generation really could use some unittests) but this change with the
macros change in clr-rpm-config makes the flags more consistent.
This is a functional change so expect flags to be different after this
change but to my testing there weren't any packages broken.
Signed-off-by: William Douglas <william.douglas@intel.com>
Enable the cargo build pattern to handle make_command and
install_macro options. Used in pypi-safetensor to enable cargo
vendoring while still building and installing with the pyproject
config files.
Signed-off-by: William Douglas <william.douglas@intel.com>
When version is not yet found but the name is known, attempt to use
the data after the name (and prior to the extension) as the version.
Signed-off-by: William Douglas <william.douglas@intel.com>
This variable is used in cases like thermald to detect if systemd is
available and, if missing, will cause the systemd units to not be
installed. Detect this not being set and add systemd to the buildreq
in such cases.
Signed-off-by: William Douglas <william.douglas@intel.com>
The string being split isn't doing anything (and creates a warning on
the an implied concatenation) so remove the split.
Signed-off-by: William Douglas <william.douglas@intel.com>
pypi is deprecating the API and doesn't recommend its usage for
integrity checks so stop trying to make use of it in autospec.
Signed-off-by: William Douglas <william.douglas@intel.com>
The previous usage of the %patch macro has been deprecated so update
usage to the supported pattern.
Signed-off-by: William Douglas <william.douglas@intel.com>
When autospec find a requires.txt, set the requirements_path not the
requires_path (renamed to a more fitting pyproject_path). Also fix up
unittests and add a new one for this case.
Signed-off-by: William Douglas <william.douglas@intel.com>
Refactor added two bugs, one for detection path and the other for
calling the wrong function for pyproject file dependency scanning.
Signed-off-by: William Douglas <william.douglas@intel.com>
Some Perl modules include custom build libraries under inc -- make sure
they'll be able to find them by adding the source directory to the
include path when processing Makefile.PL
The %doc directive doesn't really align with autospec usage where
paths are automatically managed into subpackages so stop using it.
Signed-off-by: William Douglas <william.douglas@intel.com>
Enable content to be found under %{buildroot}/{V3,V4} and work
seemlessly with bans, compat, excludes, manual extras and patterns.
Eventually the efi-move.py will be retooled to store content in these
locations so preempt this change in autospec.
Signed-off-by: William Douglas <william.douglas@intel.com>
More of a tidy up change as most images outside of docker will always
have systemd but package checks are happier with it being explicit.
Signed-off-by: William Douglas <william.douglas@intel.com>
The ld path will show /usr/bin/ld in some cases so account for that in
the regex match pattern.
Also include a new style for a missing terminfo lib from trying to
build bcc.
Signed-off-by: William Douglas <william.douglas@intel.com>
When the configure pattern is detected, also try to parse any
configure_ac files found. Too many buildreqs are in configure_ac but
we don't usually want to set the build_pattern as configure_ac when
configure is around as it is fragile.
Signed-off-by: William Douglas <william.douglas@intel.com>
Move addition of vendor config to non-pattern dependent location which
is copied for different builds (avx2/avx512).
Signed-off-by: William Douglas <william.douglas@intel.com>
In cases where cargo_vendoring is used for a Makefile, add the cargo
config.toml snippet for vendoring usage.
Signed-off-by: William Douglas <william.douglas@intel.com>
This change adds the ability to use the cargo build system to build
rust packages. The content being installed will only be the bin
content that is put in ~/.cargo/bin by `cargo install`.
Also fixes up archive handling that was broken in a previous
change.
Signed-off-by: William Douglas <william.douglas@intel.com>
Reorder some items for build pattern detection so that build
requirements for specific patterns are added last. This is to help
prevent build requirements that don't apply to a given pattern from
being added unintentionally.
As part of this remove some outdated bits (catkin and disutils36) that
no longer are used.
Signed-off-by: William Douglas <william.douglas@intel.com>
These patterns are being removed as they are not used or are going to
be reworked.
This change also removes support for multi-versioned packages which
were considered for go and cargo purposes.
Signed-off-by: William Douglas <william.douglas@intel.com>
The 'pypi_' prefix seems to have more issues than without when doing a
pip install so switch to removing the prefix.
Signed-off-by: William Douglas <william.douglas@intel.com>
Instead of pushing the filename that is matched, use the glob for the
files section as in some cases it is required (rustc) in order to
avoid build failures as the filenames may not be static.
Signed-off-by: William Douglas <william.douglas@intel.com>
The rustlib (and their corresponding analysis) files change their
names between builds so we can't list them in the specfile.
Signed-off-by: William Douglas <william.douglas@intel.com>
The requires_*, buildreq_* and pkgconfig_* files are all subject to
copy paste of Requires: foo, BuildRequires: foo and pkgconfig(foo).
Rather than handling these files literally, remove the corresponding
instruction portion matching the file and treat the rest literally.
Signed-off-by: William Douglas <william.douglas@intel.com>
... while providing an opt-out options.conf setting
this changes the size of binaries moderately (25% range) but makes backtracing
and profiling a ton more pleasant
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>
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>
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>
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>