1314 Commits

Author SHA1 Message Date
William Douglas f032afc72f Add autospec information to spec header
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>
v2
2023-10-16 12:37:36 -07:00
William Douglas 65e386af77 Update python build process
With 3.12 the use of the python installer module is preferred so
switch to that.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-10-16 12:33:50 -07:00
William Douglas 623d973c43 Fixup imports for isort
Change fixes up CI issues with flake8.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-10-11 10:33:31 -07:00
William Douglas 444c02f910 QT6 related fixups
Signed-off-by: William Douglas <william.douglas@intel.com>
2023-10-11 10:17:19 -07:00
William Douglas 19ab87c1d9 Switch toml parser to stdlib's tomllib
Signed-off-by: William Douglas <william.douglas@intel.com>
2023-09-29 12:22:41 -07:00
William Douglas 1b66e3690a Update flag management
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>
2023-09-27 16:44:40 -07:00
William Douglas d74d70acc4 Add make_command and install_macro support for cargo
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>
2023-07-28 16:05:57 -07:00
William Douglas a9bd4aca68 Add new failed pattern for pkg-conifg (with ncurses) 2023-07-19 12:06:52 -07:00
William Douglas c05a63a9d7 Add new version detection case
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>
2023-07-19 12:06:52 -07:00
William Douglas 63f98beca7 Add detection for systemdunitdir not being set
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>
2023-07-13 11:15:48 -07:00
William Douglas 88be42839b Fixup warning on a split string that isn't helpful
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>
2023-07-13 11:15:48 -07:00
William Douglas 90bcff8bf9 Remove pypi integrity checks
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>
2023-05-30 15:41:38 -07:00
William Douglas 6593364e0b Update %patch macro usage
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>
2023-05-30 14:43:42 -07:00
William Douglas f796f641d0 Fix requires.tst scan variable assignment
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>
2023-05-22 16:24:11 -07:00
William Douglas cedc5f8dab Correct pyproject dependency detection
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>
2023-05-03 09:04:16 -07:00
Brett T. Warden 871cf693e7 Make Perl builds find included inc
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
2023-05-01 13:13:43 -07:00
William Douglas 96bb9d553c Convert to use zstd for debuginfo compression
Improve compression with zstd.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-05-01 10:55:53 -07:00
William Douglas 46c9d3a49c Remove use of %doc in replacements
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>
2023-04-11 17:04:36 -07:00
William Douglas 051a649442 Add support for optbin prefix V3 and V4
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>
2023-04-11 17:04:36 -07:00
William Douglas 433763d197 files: Remove unused method prefix in pattern match
The prefix parameter isn't used by any callers, remove it and simplify
the function.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-04-11 17:04:36 -07:00
William Douglas 0eee221820 Enforce services subpackages to require systemd
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>
2023-04-10 11:01:29 -07:00
William Douglas 77ab6b87a0 Update ld path and add new failure pattern
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>
2023-04-03 13:51:39 -07:00
Brett T. Warden 7de515c05a Make ModuleNotFoundError return pypi() deps
ModuleNotFoundError: No module named 'pyqtbuild' should add the dep
pypi(pyqtbuild)
2023-03-29 08:56:05 -07:00
William Douglas 89b9eb08e5 Add configure_ac parsing to configure pattern
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>
2023-03-28 09:56:18 -07:00
William Douglas 1a0e6d9a68 Remove vendor config from cargo pattern
This is done in prep now.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-03-27 11:36:22 -07:00
William Douglas 920b746df6 Rework cargo vendor config location
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>
2023-03-27 11:14:45 -07:00
William Douglas 3b88151806 Add support for handling Makefiles using cargo
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>
2023-03-27 10:25:05 -07:00
Brett T. Warden dbfbd6e3f1 Fix parsing for ezix tarballs 2023-03-23 16:27:56 -07:00
William Douglas f91eefa9d2 Add cargo build pattern support
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>
2023-03-23 15:11:54 -07:00
William Douglas 091c230418 Add config option to enable vendoring 2023-03-23 15:11:54 -07:00
William Douglas 972f4c60a1 Rework build pattern detection
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>
2023-03-23 15:11:54 -07:00
William Douglas 74c0833cf4 Remove ruby, golang and cargo build patterns
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>
2023-03-17 12:14:20 -07:00
William Douglas 7168764db4 Make build pattern print a comment
Signed-off-by: William Douglas <william.douglas@intel.com>
2023-03-16 14:23:21 -07:00
William Douglas 3552dc8e24 Add build pattern used in specfile output
Helpful for seeing what build patterns are being actively used.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-03-16 13:24:41 -07:00
William Douglas 252366f5e8 pip install without 'pypi_' prefix
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>
2023-03-08 14:25:26 -08:00
Brett T. Warden 8043039d97 Add name/version parser for dovecot pigeonhole packages
Example:
https://pigeonhole.dovecot.org/releases/2.3/dovecot-2.3-pigeonhole-0.5.20.tar.gz

Parse as name=pigeonhole, version=0.5.20
2023-02-10 14:00:38 -08:00
William Douglas bbefa93000 Use the glob filename for push_file
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>
2023-01-17 16:39:25 -08:00
William Douglas ebf7da4cd8 Update actions checkout version 2023-01-17 08:44:33 -08:00
William Douglas a4e5ab5c16 Add special patterns for rustlib (and analysis) files
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>
2023-01-17 08:43:56 -08:00
William Douglas 99f8e96dc6 Remove no-op else block
The else block isn't needed as False is returned either way.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-01-17 08:43:56 -08:00
Arjan van de Ven 455aa82551 drop -mtune= entirely from autospec and let our rpm macro flags win 2023-01-04 11:53:48 -08:00
William Douglas f82ad7a663 Ignore instruction content from specific config files
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>
2022-12-30 08:54:03 -08:00
Arjan van de Ven 7d6600edb0 allow us to ship with debuginfo on the default filesystem
... 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
2022-12-28 10:30:14 -08:00
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