Commit Graph

1355 Commits

Author SHA1 Message Date
Brett T. Warden 239d8cd618 Limit diff to ~10 lines
Also include content of added files.
2024-04-15 17:13:34 -07:00
Brett T. Warden 16ee88cb20 Don't write source archive comparison tarball to upstreams file
We only use this for source tree comparison, not part of the build, so
don't add it to the upstreams file.
2024-04-15 16:59:57 -07:00
Brett T. Warden 617c67c388 Make flake8 happy 2024-04-15 16:00:38 -07:00
Brett T. Warden 2cf51ddfb9 Move autogenerated source tree to a versionless directory 2024-04-15 15:54:30 -07:00
Brett T. Warden 6174188098 Fix failure on packages that don't have an autogenerated source tarball 2024-04-15 15:25:16 -07:00
Brett T. Warden 61e16733c8 Capture diffs of dist tarballs vs auto-generated source archives from GitHub 2024-04-15 15:12:17 -07:00
Brett T. Warden 5905be97e8 Fix version parsing for x265 2024-04-12 09:23:30 -07:00
Brett T. Warden 81e1eebe28 Extend key ID matching to expired keys
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.
v10
2024-04-12 09:08:10 -07:00
Brett T. Warden 658bd0de10 Add gnupg as a buildreq if we'll need it during build v9 2024-04-11 16:10:02 -07:00
Brett T. Warden b628caf931 Add Config fields for pkey and signature macros v8 2024-04-11 12:37:09 -07:00
Brett T. Warden 8142032e7c Fix escaping to satisfy flake 2024-04-11 12:22:59 -07:00
Brett T. Warden 5a302d6c91 Check GPG package signatures during build
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.
2024-04-11 12:22:59 -07:00
William Douglas f56f1fa18d Don't autodetect xz build requirements
Signed-off-by: William Douglas <william.douglas@intel.com>
v7
2024-03-29 15:10:55 -07:00
Brett T. Warden 0c408e7089 Yell louder about known bad signing keys v6 2024-03-29 11:43:38 -07:00
Brett T. Warden 5471f10f61 Implement blocklist for signing key IDs
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.
2024-03-29 11:43:38 -07:00
William Douglas c02b2fec6a Add etc_files log
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>
v5
2024-03-22 14:11:36 -07:00
William Douglas 312e1714f2 Update failed patterns and cmake patterns for qt6
Signed-off-by: William Douglas <william.douglas@intel.com>
2024-03-22 12:42:28 -07:00
William Douglas 652616b1b6 Add path handling for qt6
Signed-off-by: William Douglas <william.douglas@intel.com>
2024-03-22 12:42:28 -07:00
William Douglas f4bef72a70 Add handling for multiline find_package
Previously support for cmake's find_package parsing was only able to
handle single line entries. This change adds support for multiline
versions and allows for module namespacing (currently qt6 and kf6
support is available).

The change for cmake_modules shows this namespacing in use.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-03-15 14:20:20 -07:00
William Douglas 6095ef84a0 Migrate configs for qt6
Partial migration of patterns to qt6 for failed_commands and
qt_modules. Still more changes needed here but this is a start.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-03-15 14:20:20 -07:00
William Douglas fa36e95657 Stop using the %qmake macro
Rather than using %qmake, add the definition into autospec. This is
done to allow for using make_command to specify which version of qmake
to use.

Note for now qmake6 is not in PATH and needs a build_prepend addition.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-03-15 14:20:20 -07:00
William Douglas 3d985ebaf9 Allow optimization level specification in the R pattern
Signed-off-by: William Douglas <william.douglas@intel.com>
2024-03-11 16:25:34 -07:00
Brett T. Warden 1ab68caa3d Search licenses/*.txt
We search for licenses as *.txt in subdirectories "LICENSES" and "license". Also search "licenses".
2024-03-04 16:21:34 -08:00
Brett T. Warden e738c511eb Add support for non-tarball bz2 archives
Some projects require additional bz2 downloads that are single
compressed files, not tar archives. Detect and extract those with
appropriate bz2 tools instead of tar.

For a given entry like this:
ARCHIVES = https://example.com/download/foo.dat.bz2 src/data

...upstream file is downloaded to:
builddir/build/SOURCES/foo.dat.bz2

...initially extracted as:
builddir/build/BUILD/foo.dat/foo.dat

...and finally copied to
builddir/build/BUILD/<pkg>/src/data/foo.dat
2024-02-26 09:12:10 -08:00
William Douglas da8b975a56 Add --host to autogen pattern for apx
autogen uses autotools and also needs a --host parameter to build apx.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-02-07 14:06:26 -08:00
William Douglas 213bb01a2f Make use of GOAMD64
Add export for GOAMD64 and modify where needed in order to support
building optimized binaries using golang.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-02-05 13:14:23 -08:00
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