1329 Commits

Author SHA1 Message Date
William Douglas 25ad860d7f Add handling for APX configure patterns
Support APX package builds using the configure patterns (needed to
handle cross compilation via --host option).

Also fixup some flag usage inconsistencies.

Signed-off-by: William Douglas <william.douglas@intel.com>
v4
2024-02-05 10:55:39 -08:00
William Douglas 750e50d160 Add support for building APX binaries
Add early support for APX builds in autospec. This change also makes
APX disabled by default for now but may revert back to enabled by
default in the future. The APX prefix will be /VA as the arch flag is
not yet finalized. This also may change in the future though for now
there are no plans to move it.

Currently autotools builds are unable to use this as it detects as a
cross compilation.

Currently only C using GCC is supported.

This change also reworks how R language optimized binaries are built
and distributed. They will now work as all the other tooling does with
the /VX prefix.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-02-03 07:25:59 -08:00
William Douglas fae1327921 Correct configure pattern LDFLAGS setting
Update LDFLAGS to use the intermediate flags and be set the same as
the other avx2 flags.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-01-23 12:23:35 -08:00
William Douglas 1eaf8cd10c Rework avx2/512 flag passing
Instead of hard coding flags in each use, add global constants that
are substituted on use (removes a little copypasta and fixes up some
flags that were unintentionally different between build systems).

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-01-18 10:07:48 -08:00
William Douglas 8c949329a8 Update regex for reconfigure detection
Update regex as grep doesn't need escape slashes and python hates
them.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-01-18 10:07:48 -08:00
Brett T. Warden 537da873db Add unit tests for allow_exe 2024-01-16 14:29:07 -08:00
Brett T. Warden e664610c0e Add a mechanism to automatically exclude Windows executables
Some packages, especially PIP wheels, install Windows executables.
Introduce an option, allow_exe, with which to permit installing those
executables. Otherwise, explicitly delete them so they're not
inadvertently installed via wildcards later.
2024-01-16 13:59:27 -08:00
Brett T. Warden ab27b0e7ad Add use_apx flag to options.conf
Set value True by default, but other added options still default to
false.

diff --git a/options.conf b/options.conf
index ed481d682825..127ec6e6ffaa 100644
--- a/options.conf
+++ b/options.conf
@@ -59,6 +59,16 @@ server = false
 skip_tests = false
 # add .so files to the lib package instead of dev
 so_to_lib = false
+# configure build for apx
+use_apx = true
+# configure build for avx2
+use_avx2 = false
+# configure build for avx512
+use_avx512 = false
+# add clang flags
+use_clang = false
+# configure build for lto
+use_lto = false
 # require package verification for build
 verify_required = false
2024-01-04 11:49:16 -08:00
William Douglas c1050fe40c Add more bits to the blacklist
A poorly parsed license file caused these to need to be added.

Signed-off-by: William Douglas <william.douglas@intel.com>
v3
2023-12-04 15:28:00 -08:00
William Douglas e661f3a625 Update test function assert call name
Signed-off-by: William Douglas <william.douglas@intel.com>
2023-11-13 10:08:32 -08:00
William Douglas 874204ec31 Correct tests based on warnings
Previous code would emit:
SyntaxWarning: invalid escape sequence

Correct this by removing the escapes as they are not necessary.

Also add a missing buildreq that is detected correctly after the
fix.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-11-13 10:08:32 -08:00
Brett T. Warden 80d20893c2 Stop redirecting libproxy dep to pacrunner-dev
We fixed the real libproxy a while back to query pacrunner itself via
dbus, so pacrunner no longer provides a libproxy shim, nor the
pacrunner-dev package.
2023-11-13 09:21:01 -08:00
William Douglas 250a6667eb Add global requires ban handling logic
Some packages should not be able to be added to any subpkg. Add
handling for this case.

Also as pypi-nose is no longer usable so ban it from being added as a
dependency.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-10-20 12:23:35 -07:00
William Douglas c644c18072 Update license bans
Signed-off-by: William Douglas <william.douglas@intel.com>
2023-10-18 13:35:42 -07:00
William Douglas 94f0e995b2 Ban setuptools submodule that is no longer needed
The submodule's function is now incorporated into setuptools so
banlist it.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-10-18 13:35:42 -07:00
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