Compare commits

...

34 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.
2024-04-12 09:08:10 -07:00
Brett T. Warden 658bd0de10 Add gnupg as a buildreq if we'll need it during build 2024-04-11 16:10:02 -07:00
Brett T. Warden b628caf931 Add Config fields for pkey and signature macros 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>
2024-03-29 15:10:55 -07:00
Brett T. Warden 0c408e7089 Yell louder about known bad signing keys 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>
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>
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
16 changed files with 833 additions and 255 deletions
+25 -1
View File
@@ -483,21 +483,45 @@ class Requirements(object):
def set_build_req(self, config): def set_build_req(self, config):
"""Add build requirements based on the build pattern.""" """Add build requirements based on the build pattern."""
def findpackage_parse_lines(self, fp_line, line_iter, cmake_modules):
"""Parse find_package multiline segment of the line_iter."""
qt6module = re.compile(r"^[^#]*find_package\(\s*\bQt6.*", re.I)
kf6module = re.compile(r"^[^#]*find_package\(\s*\bKF6.*", re.I)
ns = ''
if qt6module.search(fp_line):
ns = 'qt6'
elif kf6module.search(fp_line):
ns = 'kf6'
while True:
ln = next(line_iter).strip()
if not ln:
continue
modules = ln.strip(')').split(' ')
for module in modules:
if module:
if pkg := cmake_modules.get(f"{ns}.{module}"):
self.add_buildreq(pkg)
if ')' in ln:
break
def parse_cmake(self, filename, cmake_modules, conf32): def parse_cmake(self, filename, cmake_modules, conf32):
"""Scan a .cmake or CMakeLists.txt file for what's it's actually looking for.""" """Scan a .cmake or CMakeLists.txt file for what's it's actually looking for."""
findpackage = re.compile(r"^[^#]*find_package\((\w+)\b.*\)", re.I) findpackage = re.compile(r"^[^#]*find_package\((\w+)\b.*\)", re.I)
findpackage_multiline = re.compile(r"^[^#]*find_package\((\w+)\b.*", re.I)
pkgconfig = re.compile(r"^[^#]*pkg_check_modules\s*\(\w+ (.*)\)", re.I) pkgconfig = re.compile(r"^[^#]*pkg_check_modules\s*\(\w+ (.*)\)", re.I)
pkg_search_modifiers = {'REQUIRED', 'QUIET', 'NO_CMAKE_PATH', pkg_search_modifiers = {'REQUIRED', 'QUIET', 'NO_CMAKE_PATH',
'NO_CMAKE_ENVIRONMENT_PATH', 'IMPORTED_TARGET'} 'NO_CMAKE_ENVIRONMENT_PATH', 'IMPORTED_TARGET'}
extractword = re.compile(r'(?:"([^"]+)"|(\S+))(.*)') extractword = re.compile(r'(?:"([^"]+)"|(\S+))(.*)')
with util.open_auto(filename, "r") as f: with util.open_auto(filename, "r") as f:
lines = f.readlines() lines = iter(f.readlines())
for line in lines: for line in lines:
if match := findpackage.search(line): if match := findpackage.search(line):
module = match.group(1) module = match.group(1)
if pkg := cmake_modules.get(module): if pkg := cmake_modules.get(module):
self.add_buildreq(pkg) self.add_buildreq(pkg)
elif findpackage_multiline.search(line):
self.findpackage_parse_lines(line, lines, cmake_modules)
if match := pkgconfig.search(line): if match := pkgconfig.search(line):
rest = match.group(1) rest = match.group(1)
+19 -2
View File
@@ -266,6 +266,7 @@ KSMServerDBusInterface, plasma-workspace-dev
KSaneCore, ksanecore-dev KSaneCore, ksanecore-dev
KScreenLocker, kscreenlocker-dev KScreenLocker, kscreenlocker-dev
KSysGuard, libksysguard-dev KSysGuard, libksysguard-dev
KUserFeedback, kuserfeedback-dev
KWaylandServer, kwayland-server-dev KWaylandServer, kwayland-server-dev
KWinDBusInterface, kwin-dev KWinDBusInterface, kwin-dev
KWinEffects, kwin-dev KWinEffects, kwin-dev
@@ -288,7 +289,6 @@ LibIcal, libical-dev
LibKEduVocDocument, libkeduvocdocument-dev LibKEduVocDocument, libkeduvocdocument-dev
LibKWorkspace, plasma-workspace-dev LibKWorkspace, plasma-workspace-dev
LibKompareDiff2, libkomparediff2-dev LibKompareDiff2, libkomparediff2-dev
LibLZMA, xz-dev
LibNotificationManager, plasma-workspace-dev LibNotificationManager, plasma-workspace-dev
LibObs, obs-studio-dev LibObs, obs-studio-dev
LibTaskManager, plasma-workspace-dev LibTaskManager, plasma-workspace-dev
@@ -329,6 +329,7 @@ PerlLibs, perl
Phonon4Qt5, phonon-dev Phonon4Qt5, phonon-dev
Phonon4Qt5Experimental, phonon-dev Phonon4Qt5Experimental, phonon-dev
PkgConfig, pkg-config PkgConfig, pkg-config
PlasmaActivities, plasma-activities-dev
PlasmaPotdProvider, kdeplasma-addons-dev PlasmaPotdProvider, kdeplasma-addons-dev
PlasmaWaylandProtocols, plasma-wayland-protocols-dev PlasmaWaylandProtocols, plasma-wayland-protocols-dev
Png2Ico, extra-cmake-modules png2ico Png2Ico, extra-cmake-modules png2ico
@@ -346,7 +347,7 @@ Python3, python3-dev
PythonInterp, python3 PythonInterp, python3
PythonLibs, python3-dev PythonLibs, python3-dev
QGpgme, gpgme-dev gpgme-extras QGpgme, gpgme-dev gpgme-extras
QHelpGenerator, extra-cmake-modules qttools-dev QHelpGenerator, extra-cmake-modules qt6tools-dev
QMobipocket, kdegraphics-mobipocket-dev QMobipocket, kdegraphics-mobipocket-dev
Qca-qt5, qca-qt5-dev Qca-qt5, qca-qt5-dev
Qt3DTests, qt6base-dev Qt3DTests, qt6base-dev
@@ -901,6 +902,19 @@ igsc, igsc-dev
json-c, json-c-dev json-c, json-c-dev
kColorPicker, kcolorpicker-dev kColorPicker, kcolorpicker-dev
kImageAnnotator, kimageannotator-dev kImageAnnotator, kimageannotator-dev
kf6.Config, kconfig-dev
kf6.CoreAddons, kcoreaddons-dev
kf6.Crash, kcrash-dev
kf6.DBusAddons, kdbusaddons-dev
kf6.FileMetaData, kfilemetadata-dev
kf6.I18n, ki18n-dev
kf6.JobWidgets, kjobwidgets-dev
kf6.KIO, kio-dev
kf6.Notifications, knotifications-dev
kf6.Purpose, purpose-dev
kf6.Runner, krunner-dev
kf6.Service, kservice-dev
kf6.StatusNotifierItem, kstatusnotifieritem-dev
kim-api, kim-api-data kim-api, kim-api-data
leveldb, leveldb-dev leveldb, leveldb-dev
libavif, libavif-dev libavif, libavif-dev
@@ -926,6 +940,9 @@ pugixml, pugixml-dev
pybind11, pypi(pybind11) pybind11, pypi(pybind11)
qt5xdg, libqtxdg-data qt5xdg, libqtxdg-data
qt5xdgiconloader, libqtxdg-data qt5xdgiconloader, libqtxdg-data
qt6.DBus, qt6base-dev
qt6.Gui, qt6base-dev
qt6.Widgets, qt6base-dev
qtxdg-tools, qtxdg-tools-data qtxdg-tools, qtxdg-tools-data
rabbitmq-c, rabbitmq-c-dev rabbitmq-c, rabbitmq-c-dev
realsense2, librealsense-dev realsense2, librealsense-dev
+12 -2
View File
@@ -74,6 +74,7 @@ class Config(object):
self.extra_configure64 = "" self.extra_configure64 = ""
self.extra_configure_avx2 = "" self.extra_configure_avx2 = ""
self.extra_configure_avx512 = "" self.extra_configure_avx512 = ""
self.extra_configure_apx = ""
self.extra_configure_openmpi = "" self.extra_configure_openmpi = ""
self.config_files = set() self.config_files = set()
self.parallel_build = " %{?_smp_mflags} " self.parallel_build = " %{?_smp_mflags} "
@@ -114,12 +115,15 @@ class Config(object):
self.old_keyid = None self.old_keyid = None
self.profile_payload = None self.profile_payload = None
self.signature = None self.signature = None
self.signature_macro = None
self.pkey_macro = None
self.yum_conf = None self.yum_conf = None
self.failed_pattern_dir = None self.failed_pattern_dir = None
self.alias = None self.alias = None
self.failed_commands = {} self.failed_commands = {}
self.ignored_commands = {} self.ignored_commands = {}
self.gems = {} self.gems = {}
self.keyid_blocklist = {}
self.license_hashes = {} self.license_hashes = {}
self.license_translations = {} self.license_translations = {}
self.license_blacklist = {} self.license_blacklist = {}
@@ -153,6 +157,7 @@ class Config(object):
"broken_c++": "extend flags with '-std=gnu++98", "broken_c++": "extend flags with '-std=gnu++98",
"cargo_vendor": "create vendor archive with cargo", "cargo_vendor": "create vendor archive with cargo",
"use_lto": "configure build for lto", "use_lto": "configure build for lto",
"use_apx": "configure build for APX",
"use_avx2": "configure build for avx2", "use_avx2": "configure build for avx2",
"use_avx512": "configure build for avx512", "use_avx512": "configure build for avx512",
"keepstatic": "do not remove static libraries", "keepstatic": "do not remove static libraries",
@@ -180,7 +185,8 @@ class Config(object):
"nodebug": "do not generate debuginfo for this package", "nodebug": "do not generate debuginfo for this package",
"openmpi": "configure build also for openmpi", "openmpi": "configure build also for openmpi",
"server": "Package is only used by servers", "server": "Package is only used by servers",
"no_glob": "Do not use the replacement pattern for file matching" "no_glob": "Do not use the replacement pattern for file matching",
"allow_exe": "Allow Windows executables (*.exe, *.dll) to be packaged",
} }
# simple_pattern_pkgconfig patterns # simple_pattern_pkgconfig patterns
# contains patterns for parsing build.log for missing dependencies # contains patterns for parsing build.log for missing dependencies
@@ -600,6 +606,7 @@ class Config(object):
read_pattern_conf("license_blacklist", self.license_blacklist, list_format=True, path=path) read_pattern_conf("license_blacklist", self.license_blacklist, list_format=True, path=path)
read_pattern_conf("qt_modules", self.qt_modules, path=path) read_pattern_conf("qt_modules", self.qt_modules, path=path)
read_pattern_conf("cmake_modules", self.cmake_modules, path=path) read_pattern_conf("cmake_modules", self.cmake_modules, path=path)
read_pattern_conf("keyid_blocklist", self.keyid_blocklist, list_format=True, path=path)
def parse_existing_spec(self, name): def parse_existing_spec(self, name):
"""Determine the old version, old patch list, old keyid, and cves from old spec file.""" """Determine the old version, old patch list, old keyid, and cves from old spec file."""
@@ -875,7 +882,7 @@ class Config(object):
self.patches += self.read_conf_file(os.path.join(self.download_path, "series")) self.patches += self.read_conf_file(os.path.join(self.download_path, "series"))
pfiles = [("%s/%s" % (self.download_path, x.split(" ")[0])) for x in self.patches] pfiles = [("%s/%s" % (self.download_path, x.split(" ")[0])) for x in self.patches]
cmd = "grep -E \"(\+\+\+|\-\-\-).*((Makefile.am)|(aclocal.m4)|(configure.ac|configure.in))\" %s" % " ".join(pfiles) # noqa: W605 cmd = "grep -E \"(+++|---).*((Makefile.am)|(aclocal.m4)|(configure.ac|configure.in))\" %s" % " ".join(pfiles) # noqa: W605
if self.patches and call(cmd, if self.patches and call(cmd,
check=False, check=False,
stdout=subprocess.DEVNULL, stdout=subprocess.DEVNULL,
@@ -908,6 +915,9 @@ class Config(object):
content = self.read_conf_file(os.path.join(self.download_path, "configure_avx512")) content = self.read_conf_file(os.path.join(self.download_path, "configure_avx512"))
self.extra_configure_avx512 = " \\\n".join(content) self.extra_configure_avx512 = " \\\n".join(content)
content = self.read_conf_file(os.path.join(self.download_path, "configure_apx"))
self.extra_configure_apx = " \\\n".join(content)
content = self.read_conf_file(os.path.join(self.download_path, "configure_openmpi")) content = self.read_conf_file(os.path.join(self.download_path, "configure_openmpi"))
self.extra_configure_openmpi = " \\\n".join(content) self.extra_configure_openmpi = " \\\n".join(content)
+97 -20
View File
@@ -12,6 +12,7 @@
-lICE, pkgconfig(ice) -lICE, pkgconfig(ice)
-lIlmThread, ilmbase-dev -lIlmThread, ilmbase-dev
-lSM, pkgconfig(sm) -lSM, pkgconfig(sm)
-lTerminfo, ncurses-dev
-lX11, pkgconfig(x11) -lX11, pkgconfig(x11)
-lXau, libXau-dev -lXau, libXau-dev
-lXaw, pkgconfig(xaw) -lXaw, pkgconfig(xaw)
@@ -75,7 +76,6 @@
-lkrb5, krb5-dev -lkrb5, krb5-dev
-lldap, openldap-dev -lldap, openldap-dev
-lldb, ldb-dev -lldb, ldb-dev
-llzma, xz-dev
-llzo, lzo-dev -llzo, lzo-dev
-lmagic, file-dev -lmagic, file-dev
-lmenu, ncurses-dev -lmenu, ncurses-dev
@@ -99,11 +99,11 @@
-lrdmacm, rdma-core-dev -lrdmacm, rdma-core-dev
-lreadline, readline-dev -lreadline, readline-dev
-lsecret, libsecret-dev -lsecret, libsecret-dev
-lsecret, pkgconfig(libsecret-1)
-lsensors, lm-sensors-dev -lsensors, lm-sensors-dev
-lsqlite3, sqlite-autoconf-dev -lsqlite3, sqlite-autoconf-dev
-lssh, libssh-dev -lssh, libssh-dev
-lssl, openssl-dev -lssl, openssl-dev
-lTerminfo, ncurses-dev
-ltermcap, ncurses-dev -ltermcap, ncurses-dev
-ltinfo, ncurses-dev -ltinfo, ncurses-dev
-ltinfow, ncurses-dev -ltinfow, ncurses-dev
@@ -129,6 +129,7 @@ Analitza, analitza-dev
Analitza5, analitza-dev Analitza5, analitza-dev
BABL, babl-dev BABL, babl-dev
BISON, bison BISON, bison
BROTLI, brotli-dev
BZ2_bzCompress, bzip2-dev BZ2_bzCompress, bzip2-dev
BZip2, bzip2-dev BZip2, bzip2-dev
Berkeley DB, db Berkeley DB, db
@@ -138,6 +139,7 @@ Boost, boost-dev
Breeze, breeze-dev Breeze, breeze-dev
CAIRO, cairo-dev CAIRO, cairo-dev
CARES, c-ares-dev CARES, c-ares-dev
CFITSIO, cfitsio-dev
CGAL, CGAL-dev CGAL, CGAL-dev
CHECK, check CHECK, check
CLUTTER, clutter-dev CLUTTER, clutter-dev
@@ -174,6 +176,7 @@ Eet.h, eet-dev
Eigen/Core, eigen-dev Eigen/Core, eigen-dev
Eigen/Dense, eigen-dev Eigen/Dense, eigen-dev
Eigen3, eigen-dev Eigen3, eigen-dev
Epoxy, pkgconfig(epoxy)
Exiv2, exiv2-dev Exiv2, exiv2-dev
Expat 1.95.x, expat-dev Expat 1.95.x, expat-dev
Expat XML Parser, expat-dev Expat XML Parser, expat-dev
@@ -254,6 +257,7 @@ Fontconfig, pkgconfig(fontconfig)
FreeType 2, freetype-dev FreeType 2, freetype-dev
Freetype, freetype-dev Freetype, freetype-dev
GCRYPT, libgcrypt-dev GCRYPT, libgcrypt-dev
GCrypt, libgcrypt-dev
GD, gd-dev GD, gd-dev
GDBM, gdbm-dev GDBM, gdbm-dev
GDM_PAM_EXTENSIONS, gdm-dev GDM_PAM_EXTENSIONS, gdm-dev
@@ -283,6 +287,7 @@ GTK, gtk+-dev
GnuTLS, gnutls-dev GnuTLS, gnutls-dev
GooglePerftools, gperftools-dev GooglePerftools, gperftools-dev
Gperf, gperf Gperf, gperf
Gpgme, pkgconfig(gpgme)
Gpgmepp, gpgme-dev Gpgmepp, gpgme-dev
Gphoto2, libgphoto2-dev Gphoto2, libgphoto2-dev
Grantlee5, grantlee-dev Grantlee5, grantlee-dev
@@ -375,6 +380,7 @@ KF5KMahjongglib, libkmahjongg-dev
KF5KdepimDBusInterfaces, kdepim-apps-libs-dev KF5KdepimDBusInterfaces, kdepim-apps-libs-dev
KF5Kipi, libkipi-dev KF5Kipi, libkipi-dev
KF5Kirigami2, kirigami2-dev KF5Kirigami2, kirigami2-dev
KF5KirigamiAddons, kirigami2-dev
KF5KontactInterface, kontactinterface-dev KF5KontactInterface, kontactinterface-dev
KF5Kross, kross-dev KF5Kross, kross-dev
KF5Ldap, kldap-dev KF5Ldap, kldap-dev
@@ -416,6 +422,8 @@ KF5Su, kdesu-dev
KF5Syndication, syndication-dev KF5Syndication, syndication-dev
KF5SyntaxHighlighting, syntax-highlighting-dev KF5SyntaxHighlighting, syntax-highlighting-dev
KF5SysGuard, libksysguard-dev KF5SysGuard, libksysguard-dev
KF5TextAutoCorrection, ktextaddons-dev
KF5TextAutoCorrectionWidgets, ktextaddons-dev
KF5TextEditor, ktexteditor-dev KF5TextEditor, ktexteditor-dev
KF5TextWidgets, ktextwidgets-dev KF5TextWidgets, ktextwidgets-dev
KF5ThreadWeaver, threadweaver-dev KF5ThreadWeaver, threadweaver-dev
@@ -428,16 +436,74 @@ KF5WidgetsAddons, kwidgetsaddons-dev
KF5WindowSystem, kwindowsystem-dev KF5WindowSystem, kwindowsystem-dev
KF5XmlGui, kxmlgui-dev KF5XmlGui, kxmlgui-dev
KF5XmlRpcClient, kxmlrpcclient-dev KF5XmlRpcClient, kxmlrpcclient-dev
KF6Attica, attica-dev
KF6Baloo, baloo-dev
KF6BalooWidgets, baloo-widgets-dev
KF6ColorScheme, kcolorscheme-dev
KF6Config, kconfig-dev
KF6Contacts, kcontacts-dev
KF6DNSSD, kdnssd-dev
KF6FileMetaData, kfilemetadata-dev
KF6GlobalAccel, kglobalaccel-dev
KF6Holidays, kholidays-dev
KF6IdleTime, kidletime-dev
KF6JobWidgets, kjobwidgets-dev
KF6KCMUtils, kcmutils-dev
KF6Kirigami, kirigami-dev
KF6Kirigami2, kirigami-dev
KF6KirigamiAddons, kirigami-addons-dev
KF6KirigamiAddons2, kirigami-addons-dev
KF6KirigamiPlatform, kirigami-dev
KF6NetworkManagerQt, networkmanager-qt-dev
KF6NewStuff, knewstuff-def
KF6Notifications, knotifications-dev
KF6NotifyConfig, knotifyconfig-dev
KF6Package, kpackage-dev
KF6Purpose, purpose-dev
KF6QuickCharts, kquickcharts-dev
KF6Runner, krunner-dev
KF6Screen, libkscreen-dev
KF6StatusNotifierItem, kstatusnotifieritem-dev
KF6SyntaxHighlighting, syntax-highlighting-dev
KF6TextEditor, ktexteditor-dev
KGantt, kdiagram-dev KGantt, kdiagram-dev
KPim5Akonadi, akonadi-dev
KPim5AkonadiContact, akonadi-contacts-dev
KPim5AkonadiMime, akonadi-mime-dev
KPim5AkonadiNotes, akonadi-notes-dev
KPim5GrantleeTheme, grantleetheme-dev
KPim5Gravatar, libgravatar-dev
KPim5IMAP, kimap-staticdev
KPim5Ldap, kldap-dev
KPim5LibKSieve, libksieve-dev
KPim5Libkdepim, libkdepim-dev
KPim5Libkleo, libkleo-dev
KPim5MailImporter, mailimporter-dev
KPim5MailTransport, kmailtransport-dev
KPim5MailTransportAkonadi, kmailtransport-dev
KPim5MessageComposer, messagelib-dev
KPim5MessageCore, messagelib-dev
KPim5Mime, kmime-dev
KPim5PimCommon, pimcommon-dev
KPim5TextEdit, kpimtextedit-dev
KPim6IMAP, kimap-dev
KPim6Libkdepim, libkdepim-dev
KPim6Libkleo, libkleo-dev
KPim6MailTransport, kmailtransport-dev
KPim6MessageCore, messagelib-dev
KPim6Mime, kmime-dev
KPim6PimCommon, pimcommon-dev
KPimGAPI, libkgapi-dev KPimGAPI, libkgapi-dev
KPimKDAV, kdav-dev KPimKDAV, kdav-dev
KPimPkPass, kpkpass-dev KPimPkPass, kpkpass-dev
KPimSMTP, ksmtp-dev KPimSMTP, ksmtp-dev
KPimSMTPConfig, ksmtp-dev KPimSMTPConfig, ksmtp-dev
KPipeWire, kpipewire-dev
KScreenLocker, kscreenlocker-dev KScreenLocker, kscreenlocker-dev
KTP, ktp-common-internals-dev KTP, ktp-common-internals-dev
KdepimLibs, kdepimlibs-dev KdepimLibs, kdepimlibs-dev
Kerberos 5, krb5-dev Kerberos 5, krb5-dev
KirigamiAddons, kirigami-addons-dev
LEX, flex bison LEX, flex bison
LIBCAP_NG_PATH, libcap-ng-dev LIBCAP_NG_PATH, libcap-ng-dev
LIBEXIF, libexif-dev LIBEXIF, libexif-dev
@@ -445,7 +511,6 @@ LIBGCRYPT - version >= 1.5.0, libgcrypt-dev
LIBGD, libgd-dev LIBGD, libgd-dev
LIBICAL, libical-dev LIBICAL, libical-dev
LIBKONQ, kde-baseapps-dev LIBKONQ, kde-baseapps-dev
LIBLZMA, xz-dev
LIBNOTIFY, libnotify-dev LIBNOTIFY, libnotify-dev
LIBPCREVERSION, pcre-dev LIBPCREVERSION, pcre-dev
LIBRSVG, librsvg-dev LIBRSVG, librsvg-dev
@@ -467,12 +532,12 @@ LibExiv2, pkgconfig(exiv2)
LibKEduVocDocument, libkeduvocdocument-dev LibKEduVocDocument, libkeduvocdocument-dev
LibKWorkspace, plasma-workspace-dev LibKWorkspace, plasma-workspace-dev
LibKrb5, krb5-dev LibKrb5, krb5-dev
LibLZMA, xz-dev
LibR, R-dev LibR, R-dev
LibSSH, libssh-dev LibSSH, libssh-dev
LibXml2, libxml2-dev LibXml2, libxml2-dev
LibXslt, libxslt-bin LibXslt, libxslt-bin
Libcap, libcap-dev Libcap, libcap-dev
Libev, libev-dev
Lua51, lua-dev Lua51, lua-dev
LuaJIT, LuaJIT-dev LuaJIT, LuaJIT-dev
MDDS, mdds-dev MDDS, mdds-dev
@@ -503,12 +568,16 @@ PAM, Linux-PAM-dev
PCAP, libpcap-dev PCAP, libpcap-dev
PCIUTILS, pciutils-dev PCIUTILS, pciutils-dev
PCRE, pcre-dev PCRE, pcre-dev
PCRE2, pcre2-dev
PNG, pkgconfig(libpng) PNG, pkgconfig(libpng)
POPT, popt-dev POPT, popt-dev
POSIX ACL, acl-dev POSIX ACL, acl-dev
PULSEAUDIO, pulseaudio-dev PULSEAUDIO, pulseaudio-dev
Phonon, phonon-dev Phonon, phonon-dev
Phonon4Qt5, phonon-dev Phonon4Qt5, phonon-dev
Phonon4Qt6, phonon-dev
PlasmaActivities, plasma-activities-dev
PlasmaActivitiesStats, plasma-activities-stats-dev
PolkitQt5-1, polkit-qt-dev PolkitQt5-1, polkit-qt-dev
Poppler, poppler-dev Poppler, poppler-dev
PopplerQt4, poppler-dev PopplerQt4, poppler-dev
@@ -522,13 +591,12 @@ Python, python3-dev
Python.h, python3-dev Python.h, python3-dev
PythonLibs, python3-dev PythonLibs, python3-dev
PythonLibsUnix, python3-dev PythonLibsUnix, python3-dev
QCoro5, qcoro-dev
QGpgme, gpgme-dev QGpgme, gpgme-dev
QImageBlitz, qimageblitz-dev QImageBlitz, qimageblitz-dev
QREncode, qrencode-dev QREncode, qrencode-dev
QRencode, qrencode-dev QRencode, qrencode-dev
QT, buildreq-kde QT, buildreq-kde
Qt::Quick, qt6declarative-dev
Qt::Svg, qt6svg-dev
Qalculate, libqalculate-dev Qalculate, libqalculate-dev
Qca-qt5, qca-qt5-dev Qca-qt5, qca-qt5-dev
Qt4, qt-everywhere-opensource-src-dev Qt4, qt-everywhere-opensource-src-dev
@@ -539,6 +607,7 @@ Qt5Keychain, qtkeychain-dev
Qt5LinguistTools, qttools-dev Qt5LinguistTools, qttools-dev
Qt5Multimedia, qtmultimedia-dev Qt5Multimedia, qtmultimedia-dev
Qt5Network, qtbase-dev Qt5Network, qtbase-dev
Qt5NetworkAuth, pkgconfig(Qt5NetworkAuth)
Qt5QuickControls2, pkgconfig(Qt5QuickControls2) Qt5QuickControls2, pkgconfig(Qt5QuickControls2)
Qt5QuickTemplates2, pkgconfig(Qt5QuickTemplates2) Qt5QuickTemplates2, pkgconfig(Qt5QuickTemplates2)
Qt5QuickTest, pkgconfig(Qt5QuickTest) Qt5QuickTest, pkgconfig(Qt5QuickTest)
@@ -555,6 +624,9 @@ Qt6Positioning, qt6positioning-dev
Qt6Quick, qt6declarative-dev Qt6Quick, qt6declarative-dev
Qt6QuickTimeline, qt6quicktimeline-dev Qt6QuickTimeline, qt6quicktimeline-dev
Qt6ShaderTools, qt6shadertools-dev Qt6ShaderTools, qt6shadertools-dev
Qt6WaylandClient, qt6wayland-dev
Qt::Quick, qt6declarative-dev
Qt::Svg, qt6svg-dev
R, R R, R
READLINE, readline-dev READLINE, readline-dev
RSVG, librsvg-dev RSVG, librsvg-dev
@@ -598,6 +670,7 @@ WEBKIT, webkitgtk-dev
WEBPMUX, libwebp-dev WEBPMUX, libwebp-dev
WSME, WSME WSME, WSME
Wayland, wayland-dev Wayland, wayland-dev
WaylandProtocols, wayland-protocols-dev plasma-wayland-protocols-dev
WaylandScanner, wayland WaylandScanner, wayland
WebOb, pypi-webob WebOb, pypi-webob
X, pkgconfig(x11) X, pkgconfig(x11)
@@ -778,7 +851,7 @@ debtcollector, debtcollector
decorator, pypi-decorator decorator, pypi-decorator
deflate, zlib-dev deflate, zlib-dev
deflateBound in -lz, zlib-dev deflateBound in -lz, zlib-dev
designer, qttools-dev designer, qt6tools-dev
desktop-file-install, desktop-file-utils desktop-file-install, desktop-file-utils
desktop-file-validate, desktop-file-utils desktop-file-validate, desktop-file-utils
dialog, dialog dialog, dialog
@@ -817,6 +890,7 @@ ez_setup, pypi-setuptools
ffi.h, libffi-dev ffi.h, libffi-dev
ffi_call, libffi-dev ffi_call, libffi-dev
fftw3.h, fftw-dev fftw3.h, fftw-dev
file, file
find_packages, pypi-setuptools find_packages, pypi-setuptools
flatbuffers/flatbuffers.h, FlatBuffers-dev flatbuffers/flatbuffers.h, FlatBuffers-dev
flatpak, flatpak-dev flatpak, flatpak-dev
@@ -829,6 +903,7 @@ fontconfig.h, fontconfig-dev
fontconfig/fontconfig.h, fontconfig-dev fontconfig/fontconfig.h, fontconfig-dev
freerdp2, freerdp-dev freerdp2, freerdp-dev
freetype-config, freetype-dev freetype-config, freetype-dev
frozen/unordered_map.h, frozen-dev
fuse (via pkg-config), compat-fuse-soname2-dev fuse-dev fuse (via pkg-config), compat-fuse-soname2-dev fuse-dev
fuse, fuse-dev fuse, fuse-dev
fuse.h, fuse-dev fuse.h, fuse-dev
@@ -842,6 +917,7 @@ gawk, gawk
gc/gc.h, gc-dev gc/gc.h, gc-dev
gcj, gcj gcj, gcj
gconftool-2, GConf-dev gconftool-2, GConf-dev
gcr-3, pkgconfig(gcr-3)
gcrypt.h, libgcrypt-dev gcrypt.h, libgcrypt-dev
gdal-config, gdal-dev gdal-config, gdal-dev
gdbm.h, gdbm-dev gdbm.h, gdbm-dev
@@ -858,6 +934,7 @@ gevent, pypi-gevent
gflags, gflags-dev gflags, gflags-dev
gfortran, gfortran gfortran, gfortran
gi, pygobject gi, pygobject
gi-docgen, gi-docgen
gif_lib.h, giflib-dev gif_lib.h, giflib-dev
gio-2.0, glib-dev gio-2.0, glib-dev
giomm-2.4, glibmm-dev giomm-2.4, glibmm-dev
@@ -979,7 +1056,7 @@ lber.h, openldap-dev
lcms2, lcms2-dev lcms2, lcms2-dev
lcms2.h, lcms2-dev lcms2.h, lcms2-dev
lcms2/lcms2.h, lcms2-dev lcms2/lcms2.h, lcms2-dev
lconvert, qttools-dev lconvert, qt6tools-dev
ldap.h, openldap-dev ldap.h, openldap-dev
ldap_parse_sort_control, openldap-dev ldap_parse_sort_control, openldap-dev
ldap_search in -lldap, openldap-dev ldap_search in -lldap, openldap-dev
@@ -1020,7 +1097,6 @@ libhandy-0.0, libhandy-dev
libiberty.h, binutils-dev libiberty.h, binutils-dev
libkmod.h, kmod-dev libkmod.h, kmod-dev
libksba, libksba-dev libksba, libksba-dev
liblzma, xz-dev
libmnl/libmnl.h, libmnl-dev libmnl/libmnl.h, libmnl-dev
libmpfr, mpfr-dev libmpfr, mpfr-dev
libmspack >= 0.0.20040308alpha (via pkg-config), libmspack-dev libmspack >= 0.0.20040308alpha (via pkg-config), libmspack-dev
@@ -1029,6 +1105,7 @@ libnettle, nettle-dev nettle-lib
libnftnl, libnftnl-dev libnftnl, libnftnl-dev
libnl-1, libnl-dev libnl-1, libnl-dev
libnotify, libnotify-dev libnotify, libnotify-dev
libnova, libnova-dev
libpeas-1.0, libpeas-dev libpeas-1.0, libpeas-dev
libpipewire-0.2, pipewire-dev libpipewire-0.2, pipewire-dev
libpng, pkgconfig(libpng) libpng, pkgconfig(libpng)
@@ -1065,14 +1142,14 @@ libxml2 devel libraries, libxml2-dev
libxml2 library, libxml2-dev libxml2 library, libxml2-dev
libxslt/pattern.h, libxslt-dev libxslt/pattern.h, libxslt-dev
libz, zlib-dev libz, zlib-dev
linguist, qttools-dev linguist, qt6tools-dev
linux/xattr.h, attr-dev linux/xattr.h, attr-dev
llvm-config, llvm-dev llvm-config, llvm-dev
loadkeys, kbd loadkeys, kbd
lrelease, qttools-dev lrelease, qt6tools-dev
ltdl.h, libtool-dev ltdl.h, libtool-dev
lua, lua-dev lua, lua-dev
lupdate, qttools-dev lupdate, qt6tools-dev
lvm2app.h, LVM2-dev lvm2app.h, LVM2-dev
lxml, pypi-lxml lxml, pypi-lxml
lxqt, liblxqt-dev lxqt, liblxqt-dev
@@ -1080,8 +1157,6 @@ lxqt-build-tools, lxqt-build-tools
lxqt-globalkeys, lxqt-globalkeys-dev lxqt-globalkeys, lxqt-globalkeys-dev
lxqt-globalkeys-ui, lxqt-globalkeys-dev lxqt-globalkeys-ui, lxqt-globalkeys-dev
lz4.h, lz4-dev lz4.h, lz4-dev
lzma, xz-dev
lzma.h, xz-dev
lzo/lzoconf.h, lzo-dev lzo/lzoconf.h, lzo-dev
magic, file-dev magic, file-dev
magic.h, file-dev magic.h, file-dev
@@ -1194,7 +1269,7 @@ pg_config, postgresql-dev
php, php php, php
php-config7, php php-config7, php
pip, pypi-pip pip, pypi-pip
pixeltool, qttools-dev pixeltool, qt6tools-dev
pixman, pkgconfig(pixman-1) pixman, pkgconfig(pixman-1)
pkg-config, pkg-config pkg-config, pkg-config
pkg.m4, pkg-config-dev pkg.m4, pkg-config-dev
@@ -1232,11 +1307,11 @@ python-pcre, python-pcre
python-subunit, pypi(python_subunit) python-subunit, pypi(python_subunit)
pytz, pypi(pytz) pytz, pypi(pytz)
pyyaml, PyYAML pyyaml, PyYAML
qcollectiongenerator, qttools-dev qcollectiongenerator, qt6tools-dev
qdbuscpp2xml, qtbase-dev qdbuscpp2xml, qtbase-dev
qdbusxml2cpp, qtbase-dev qdbusxml2cpp, qtbase-dev
qhelpconverter, qttools-dev qhelpconverter, qt6tools-dev
qhelpgenerator, qttools-dev qhelpgenerator, qt6tools-dev
qhull/libqhull.h, qhull-dev qhull/libqhull.h, qhull-dev
qjson/parser.h, qjson-dev qjson/parser.h, qjson-dev
qlalr, qtbase-dev qlalr, qtbase-dev
@@ -1250,8 +1325,8 @@ qmlplugindump, qtdeclarative-dev
qmltestrunner, qtdeclarative-dev qmltestrunner, qtdeclarative-dev
qscxmlc, qtscxml-dev qscxmlc, qtscxml-dev
qt5, buildreq-kde qt5, buildreq-kde
qtattributionsscanner, qttools-dev qtattributionsscanner, qt6tools-dev
qtplugininfo, qttools-dev qtplugininfo, qt6tools-dev
qtwaylandscanner, qtwayland-dev qtwaylandscanner, qtwayland-dev
qvkgen, qtbase-dev qvkgen, qtbase-dev
raptor, raptor2-dev raptor, raptor2-dev
@@ -1267,6 +1342,7 @@ requests, pypi-requests
rest-0.7, rest-dev rest-0.7, rest-dev
retrying, retrying retrying, retrying
rpm, pkgconfig(rpm) rpm, pkgconfig(rpm)
rst2man rst2man.py, pypi-docutils
rst2man, pypi-docutils rst2man, pypi-docutils
rsvg-convert, librsvg rsvg-convert, librsvg
ruby, ruby ruby, ruby
@@ -1279,6 +1355,7 @@ sbc, sbc-dev
scrollkeeper-config, rarian scrollkeeper-config, rarian
scrollkeeper-preinstall, rarian scrollkeeper-preinstall, rarian
sdl2, SDL2-dev sdl2, SDL2-dev
sdl2-config, SDL2-dev
security/pam_appl.h, Linux-PAM-dev security/pam_appl.h, Linux-PAM-dev
selenium, pypi-selenium selenium, pypi-selenium
setcap, libcap-dev setcap, libcap-dev
+22 -5
View File
@@ -59,7 +59,7 @@ class FileManager(object):
r"/usr/src.*", r"/usr/src.*",
r"/var.*"] r"/var.*"]
for bpath in banned_paths: for bpath in banned_paths:
if re.search(r"^(/V3|/V4)?" + bpath, path): if re.search(r"^(/V3|/V4|/VA)?" + bpath, path):
return True return True
return False return False
@@ -101,7 +101,7 @@ class FileManager(object):
exclude = True exclude = True
for pat in patterns: for pat in patterns:
pat = re.compile(r"^(/V3|/V4)?" + pat) pat = re.compile(r"^(/V3|/V4|/VA)?" + pat)
if pat.search(filename): if pat.search(filename):
exclude = False exclude = False
break break
@@ -126,10 +126,10 @@ class FileManager(object):
# All patterns at this time and should always be prefixed by '^' # All patterns at this time and should always be prefixed by '^'
# but just in case add the following to strip just the '^' # but just in case add the following to strip just the '^'
pattern = pattern if not pattern.startswith('^') else pattern[1:] pattern = pattern if not pattern.startswith('^') else pattern[1:]
pat = re.compile(r"^(/V3|/V4)?" + pattern) pat = re.compile(r"^(/V3|/V4|/VA)?" + pattern)
match = pat.search(filename) match = pat.search(filename)
if match: if match:
if len(match.groups()) > 0 and match.groups()[0] in ['/V3', '/V4']: if len(match.groups()) > 0 and match.groups()[0] in ['/V3', '/V4', '/VA']:
norm_filename = filename.removeprefix(match.groups()[0]) norm_filename = filename.removeprefix(match.groups()[0])
if replacement != filename: if replacement != filename:
replacement = match.groups()[0] + replacement replacement = match.groups()[0] + replacement
@@ -236,7 +236,7 @@ class FileManager(object):
# Explicit file packaging # Explicit file packaging
for k, v in self.file_maps.items(): for k, v in self.file_maps.items():
for match_name in v['files']: for match_name in v['files']:
match = re.search(r"^/(V3|V4)", filename) match = re.search(r"^/(V3|V4|VA)", filename)
norm_filename = filename if not match else filename.removeprefix(match.group()) norm_filename = filename if not match else filename.removeprefix(match.group())
if isinstance(match_name, str): if isinstance(match_name, str):
if norm_filename == match_name: if norm_filename == match_name:
@@ -272,6 +272,16 @@ class FileManager(object):
if self.want_dev_split and self.file_pat_match(filename, r"^/usr/.*/include/.*\.h$", "dev"): if self.want_dev_split and self.file_pat_match(filename, r"^/usr/.*/include/.*\.h$", "dev"):
return return
# Exclude Windows executables and DLLs unless otherwise configured
# Can't just skip them because they could be swept up in a python lib wildcard, for example
if re.search(r"[^/]+\.(exe|dll)$", filename):
if self.config.config_opts.get('allow_exe'):
util.print_warning("Allowing {} because allow_exe is true".format(filename))
else:
util.print_warning("Blocking {} because allow_exe is false".format(filename))
self.excludes.append(filename)
return
# if configured to do so, add .so files to the lib package instead of # if configured to do so, add .so files to the lib package instead of
# the dev package. THis is useful for packages with a plugin # the dev package. THis is useful for packages with a plugin
# architecture like elfutils and mesa. # architecture like elfutils and mesa.
@@ -291,6 +301,7 @@ class FileManager(object):
(r"^/usr/share/info/", "info"), (r"^/usr/share/info/", "info"),
(r"^/usr/share/abi/", "abi"), (r"^/usr/share/abi/", "abi"),
(r"^/usr/share/qt5/examples/", "examples"), (r"^/usr/share/qt5/examples/", "examples"),
(r"^/usr/share/qt6/examples/", "examples"),
(r"^/usr/share/omf", "main", "/usr/share/omf/*"), (r"^/usr/share/omf", "main", "/usr/share/omf/*"),
(r"^/usr/share/installed-tests/", "tests"), (r"^/usr/share/installed-tests/", "tests"),
(r"^/usr/libexec/installed-tests/", "tests"), (r"^/usr/libexec/installed-tests/", "tests"),
@@ -339,11 +350,17 @@ class FileManager(object):
(r"^/usr/lib64/cmake/", "dev"), (r"^/usr/lib64/cmake/", "dev"),
(r"^/usr/lib32/cmake/", "dev32"), (r"^/usr/lib32/cmake/", "dev32"),
(r"^/usr/lib/qt5/mkspecs/", "dev"), (r"^/usr/lib/qt5/mkspecs/", "dev"),
(r"^/usr/lib/qt6/mkspecs/", "dev"),
(r"^/usr/lib64/qt5/mkspecs/", "dev"), (r"^/usr/lib64/qt5/mkspecs/", "dev"),
(r"^/usr/lib32/qt5/mkspecs/", "dev32"), (r"^/usr/lib32/qt5/mkspecs/", "dev32"),
(r"^/usr/lib64/qt6/mkspecs/", "dev"),
(r"^/usr/lib32/qt6/mkspecs/", "dev32"),
(r"^/usr/lib/qt5/", "lib"), (r"^/usr/lib/qt5/", "lib"),
(r"^/usr/lib/qt6/", "lib"),
(r"^/usr/lib64/qt5/", "lib"), (r"^/usr/lib64/qt5/", "lib"),
(r"^/usr/lib32/qt5/", "lib32"), (r"^/usr/lib32/qt5/", "lib32"),
(r"^/usr/lib64/qt6/", "lib"),
(r"^/usr/lib32/qt6/", "lib32"),
(r"^/usr/lib/[a-zA-Z0-9._+-]*\.so$", so_dest), (r"^/usr/lib/[a-zA-Z0-9._+-]*\.so$", so_dest),
(r"^/usr/lib64/libkdeinit5_[a-zA-Z0-9._+-]*\.so$", "lib"), (r"^/usr/lib64/libkdeinit5_[a-zA-Z0-9._+-]*\.so$", "lib"),
(r"^/usr/lib32/libkdeinit5_[a-zA-Z0-9._+-]*\.so$", "lib32"), (r"^/usr/lib32/libkdeinit5_[a-zA-Z0-9._+-]*\.so$", "lib32"),
+2
View File
@@ -109,9 +109,11 @@ def commit_to_git(config, name, success):
call("git add profile_payload", check=False, stderr=subprocess.DEVNULL, cwd=path) call("git add profile_payload", check=False, stderr=subprocess.DEVNULL, cwd=path)
call("git add options.conf", check=False, stderr=subprocess.DEVNULL, cwd=path) call("git add options.conf", check=False, stderr=subprocess.DEVNULL, cwd=path)
call("git add configure_misses", check=False, stderr=subprocess.DEVNULL, cwd=path) call("git add configure_misses", check=False, stderr=subprocess.DEVNULL, cwd=path)
call("git add etc_files", check=False, stderr=subprocess.DEVNULL, cwd=path)
call("git add whatrequires", check=False, stderr=subprocess.DEVNULL, cwd=path) call("git add whatrequires", check=False, stderr=subprocess.DEVNULL, cwd=path)
call("git add description", check=False, stderr=subprocess.DEVNULL, cwd=path) call("git add description", check=False, stderr=subprocess.DEVNULL, cwd=path)
call("git add attrs", check=False, stderr=subprocess.DEVNULL, cwd=path) call("git add attrs", check=False, stderr=subprocess.DEVNULL, cwd=path)
call("git add archive.diff", check=False, stderr=subprocess.DEVNULL, cwd=path)
# remove deprecated config files # remove deprecated config files
call("git rm make_install_append", check=False, stderr=subprocess.DEVNULL, cwd=path) call("git rm make_install_append", check=False, stderr=subprocess.DEVNULL, cwd=path)
+1
View File
@@ -0,0 +1 @@
59FCF207FEA7F445
+1 -1
View File
@@ -178,7 +178,7 @@ def scan_for_licenses(srcdir, config, pkg_name):
# seen in the DPDK 20.11.3 tree, where the `LICENSES` directory is # seen in the DPDK 20.11.3 tree, where the `LICENSES` directory is
# named `license` instead. # named `license` instead.
dirbase = os.path.basename(dirpath) dirbase = os.path.basename(dirpath)
if re.search(r'^(LICENSES|license)$', dirbase) and re.search(r'\.txt$', name): if re.search(r'^(LICENSES|licenses?)$', dirbase) and re.search(r'\.txt$', name):
license_from_copying_hash(os.path.join(dirpath, name), license_from_copying_hash(os.path.join(dirpath, name),
srcdir, config, pkg_name) srcdir, config, pkg_name)
+27 -7
View File
@@ -18,10 +18,25 @@
import os import os
import re import re
import sys
from util import print_fatal, write_out from util import print_fatal, write_out
def log_etc(lines):
"""Return the content of the START/etc ... END/etc section."""
etc = []
while True:
line = next(lines)
line = line.strip()
if line == 'END/etc':
break
if line.startswith('+'):
continue
etc.append(line)
return etc
def logcheck(pkg_loc): def logcheck(pkg_loc):
"""Try to discover configuration options that were automatically switched off.""" """Try to discover configuration options that were automatically switched off."""
log = os.path.join(pkg_loc, 'results', 'build.log') log = os.path.join(pkg_loc, 'results', 'build.log')
@@ -52,7 +67,12 @@ def logcheck(pkg_loc):
pat = re.compile(r"^checking (?:for )?(.*?)\.\.\. no") pat = re.compile(r"^checking (?:for )?(.*?)\.\.\. no")
misses = [] misses = []
for line in lines: iter_lines = iter(lines)
for line in iter_lines:
if line.strip() == "START/etc":
etc = log_etc(iter_lines)
if etc:
write_log(pkg_loc, "etc_files", etc)
match = None match = None
m = pat.search(line) m = pat.search(line)
if m: if m:
@@ -70,8 +90,8 @@ def logcheck(pkg_loc):
if match in blacklist: if match in blacklist:
print_fatal("Blacklisted configure-miss is forbidden: " + match) print_fatal("Blacklisted configure-miss is forbidden: " + match)
misses.append("Blacklisted configure-miss is forbidden: " + match) misses.append("Blacklisted configure-miss is forbidden: " + match)
write_misses(pkg_loc, misses) write_log(pkg_loc, 'configure_misses', misses)
exit(1) sys.exit(1)
print("Configure miss: " + match) print("Configure miss: " + match)
misses.append("Configure miss: " + match) misses.append("Configure miss: " + match)
@@ -79,9 +99,9 @@ def logcheck(pkg_loc):
if not misses: if not misses:
return return
write_misses(pkg_loc, misses) write_log(pkg_loc, 'configure_misses', misses)
def write_misses(pkg_loc, misses): def write_log(pkg_loc, fname, content):
"""Create configure_misses file with automatically disabled configuration options.""" """Create log file with content."""
write_out(os.path.join(pkg_loc, 'configure_misses'), '\n'.join(sorted(misses))) write_out(os.path.join(pkg_loc, fname), '\n'.join(sorted(content)))
+4
View File
@@ -483,6 +483,10 @@ class GPGVerifier(Verifier):
return None return None
# valid signature exists at package_sign_path, operate on it now # valid signature exists at package_sign_path, operate on it now
keyid = get_keyid(self.package_sign_path) keyid = get_keyid(self.package_sign_path)
if keyid in self.config.keyid_blocklist:
self.print_result(False, err_msg='KNOWNBADACTOR: {}'.format(keyid))
self.quit()
# default location first # default location first
pubkey_loc = self.pubkey_path.format(keyid) pubkey_loc = self.pubkey_path.format(keyid)
cache_key = os.path.join(KEY_CACHE_DIR, pubkey_loc) cache_key = os.path.join(KEY_CACHE_DIR, pubkey_loc)
+64 -64
View File
@@ -2,67 +2,67 @@
# pkgconfig equivalent, to be added to BuildRequires. Please keep sorted. # pkgconfig equivalent, to be added to BuildRequires. Please keep sorted.
# This file is sorted with LC_COLLATE=C # This file is sorted with LC_COLLATE=C
# Format: <qmake key>, <pkgconfig value> # Format: <qmake key>, <pkgconfig value>
3danimation, Qt53DAnimation 3danimation, Qt63DAnimation
3dcore, Qt53DCore 3dcore, Qt63DCore
3dextras, Qt53DExtras 3dextras, Qt63DExtras
3dinput, Qt53DInput 3dinput, Qt63DInput
3dlogic, Qt53DLogic 3dlogic, Qt63DLogic
3dquick, Qt53DQuick 3dquick, Qt63DQuick
3dquickanimation, Qt53DQuickAnimation 3dquickanimation, Qt63DQuickAnimation
3dquickextras, Qt53DQuickExtras 3dquickextras, Qt63DQuickExtras
3dquickinput, Qt53DQuickInput 3dquickinput, Qt63DQuickInput
3dquickrender, Qt53DQuickRender 3dquickrender, Qt63DQuickRender
3dquickscene2d, Qt53DQuickScene2D 3dquickscene2d, Qt63DQuickScene2D
3drender, Qt53DRender 3drender, Qt63DRender
bluetooth, Qt5Bluetooth bluetooth, Qt6Bluetooth
charts, Qt5Charts charts, Qt6Charts
concurrent, Qt5Concurrent concurrent, Qt6Concurrent
core, Qt5Core core, Qt6Core
datavisualization, Qt5DataVisualization datavisualization, Qt6DataVisualization
dbus, Qt5DBus dbus, Qt6DBus
declarative, Qt5Declarative declarative, Qt6Declarative
designer, Qt5Designer designer, Qt6Designer
gamepad, Qt5Gamepad gamepad, Qt6Gamepad
gui, Qt5Gui gui, Qt6Gui
help, Qt5Help help, Qt6Help
location, Qt5Location location, Qt6Location
multimedia, Qt5Multimedia multimedia, Qt6Multimedia
multimediawidgets, Qt5MultimediaWidgets multimediawidgets, Qt6MultimediaWidgets
network, Qt5Network network, Qt6Network
networkauth, Qt5NetworkAuth networkauth, Qt6NetworkAuth
nfc, Qt5Nfc nfc, Qt6Nfc
opengl, Qt5OpenGL opengl, Qt6OpenGL
openglextensions, Qt5OpenGLExtensions openglextensions, Qt6OpenGLExtensions
positioning, Qt5Positioning positioning, Qt6Positioning
printsupport, Qt5PrintSupport printsupport, Qt6PrintSupport
purchasing, Qt5Purchasing purchasing, Qt6Purchasing
qml, Qt5Qml qml, Qt6Qml
qmltest, Qt5QuickTest qmltest, Qt6QuickTest
quick, Qt5Quick quick, Qt6Quick
quickcontrols2, Qt5QuickControls2 quickcontrols2, Qt6QuickControls2
quickwidgets, Qt5QuickWidgets quickwidgets, Qt6QuickWidgets
remoteobjects, Qt5RemoteObjects remoteobjects, Qt6RemoteObjects
script, Qt5Script script, Qt6Script
scripttools, Qt5ScriptTools scripttools, Qt6ScriptTools
scxml, Qt5Scxml scxml, Qt6Scxml
sensors, Qt5Sensors sensors, Qt6Sensors
serialbus, Qt5SerialBus serialbus, Qt6SerialBus
serialport, Qt5SerialPort serialport, Qt6SerialPort
sql, Qt5Sql sql, Qt6Sql
svg, Qt5Svg svg, Qt6Svg
testlib, Qt5Test testlib, Qt6Test
texttospeech, Qt5TextToSpeech texttospeech, Qt6TextToSpeech
uitools, Qt5UiTools uitools, Qt6UiTools
waylandclient, Qt5WaylandClient waylandclient, Qt6WaylandClient
waylandcompositor, Qt5WaylandCompositor waylandcompositor, Qt6WaylandCompositor
webchannel, Qt5WebChannel webchannel, Qt6WebChannel
webengine, Qt5WebEngine webengine, Qt6WebEngine
webenginecore, Qt5WebEngineCore webenginecore, Qt6WebEngineCore
webenginewidgets, Qt5WebEngineWidgets webenginewidgets, Qt6WebEngineWidgets
webkit, Qt5WebKit webkit, Qt6WebKit
webkitwidgets, Qt5WebKitWidgets webkitwidgets, Qt6WebKitWidgets
websockets, Qt5WebSockets websockets, Qt6WebSockets
widgets, Qt5Widgets widgets, Qt6Widgets
x11extras, Qt5X11Extras x11extras, Qt6X11Extras
xml, Qt5Xml xml, Qt6Xml
xmlpatterns, Qt5XmlPatterns xmlpatterns, Qt6XmlPatterns
+422 -148
View File
@@ -28,6 +28,17 @@ from collections import OrderedDict
import git import git
from util import _file_write, open_auto from util import _file_write, open_auto
AVX2_CFLAGS = "-march=x86-64-v3"
AVX2_LCFLAGS = "-march=x86-64-v3"
AVX2_LFLAGS = "-Wl,-z,x86-64-v3"
AVX512_CFLAGS = "-march=x86-64-v4 -mprefer-vector-width=512"
AVX512_FCFLAGS = "-march=x86-64-v4 -mprefer-vector-width=256"
AVX512_LCFLAGS = "-march=x86-64-v4"
AVX512_LFLAGS = "-Wl,-z,x86-64-v4"
APX_CFLAGS = "-march=x86-64-v3 -mapxf -mavx10.1"
APX_LCFLAGS = "-march=x86-64-v3"
APX_LFLAGS = "-Wl,-z,x86-64-v3"
class Specfile(object): class Specfile(object):
"""Holds data and methods needed to write the spec file.""" """Holds data and methods needed to write the spec file."""
@@ -148,8 +159,17 @@ class Specfile(object):
# if package is verified, include the signature in the source tarball # if package is verified, include the signature in the source tarball
if self.keyid and self.config.signature: if self.keyid and self.config.signature:
# We'll need gnupg to verify the signature. Need to add it here so it's ready before write_buildreq
self.requirements.add_buildreq("gnupg")
count += 1 count += 1
self._write_strip(f"Source{count} : {self.config.signature}") self._write_strip(f"Source{count} : {self.config.signature}")
self.config.signature_macro = f"%{{SOURCE{count}}}"
# Also include the public key in the source tarball.
count += 1
self._write_strip(f"Source{count} : {self.keyid}.pkey")
self.config.pkey_macro = f"%{{SOURCE{count}}}"
for source in self.config.extra_sources: for source in self.config.extra_sources:
count += 1 count += 1
@@ -419,6 +439,12 @@ class Specfile(object):
def write_prep(self): def write_prep(self):
"""Write prep section to spec file.""" """Write prep section to spec file."""
self._write_strip("%prep") self._write_strip("%prep")
if self.keyid and self.config.signature:
self._write_strip("mkdir .gnupg")
self._write_strip("chmod 700 .gnupg")
self._write_strip(f"gpg --homedir .gnupg --import {self.config.pkey_macro}")
self._write_strip(f"gpg --homedir .gnupg --status-fd 1 --verify {self.config.signature_macro} %{{SOURCE0}} > gpg.status")
self._write_strip(f"grep -E '^\\[GNUPG:\\] (GOODSIG|EXPKEYSIG) {self.keyid}' gpg.status")
self.write_prep_prepend() self.write_prep_prepend()
prefix = self.content.prefixes[self.url] prefix = self.content.prefixes[self.url]
if self.config.default_pattern == 'R': if self.config.default_pattern == 'R':
@@ -431,6 +457,8 @@ class Specfile(object):
extract_cmd = 'tar xf {}' extract_cmd = 'tar xf {}'
if archive.endswith('.zip'): if archive.endswith('.zip'):
extract_cmd = 'unzip -q {}' extract_cmd = 'unzip -q {}'
if archive.endswith('.bz2') and not archive.endswith('.tar.bz2'):
extract_cmd = 'bzcat {0} > $(basename "{0}" .bz2)'
self._write_strip('cd %{_builddir}') self._write_strip('cd %{_builddir}')
archive_file = os.path.basename(archive) archive_file = os.path.basename(archive)
if self.config.archive_details.get(archive + "prefix"): if self.config.archive_details.get(archive + "prefix"):
@@ -481,11 +509,7 @@ class Specfile(object):
if self.config.subdir: if self.config.subdir:
self._write_strip("popd") self._write_strip("popd")
if self.config.default_pattern == "distutils3" or self.config.default_pattern == "pyproject": if self.config.default_pattern != 'cmake':
self._write_strip("pushd ..")
self._write_strip("cp -a {} buildavx2".format(self.content.tarball_prefix))
self._write_strip("popd")
elif self.config.default_pattern != 'cmake':
if self.config.config_opts['32bit']: if self.config.config_opts['32bit']:
self._write_strip("pushd ..") self._write_strip("pushd ..")
self._write_strip("cp -a {} build32".format(self.content.tarball_prefix)) self._write_strip("cp -a {} build32".format(self.content.tarball_prefix))
@@ -498,6 +522,10 @@ class Specfile(object):
self._write_strip("pushd ..") self._write_strip("pushd ..")
self._write_strip("cp -a {} buildavx512".format(self.content.tarball_prefix)) self._write_strip("cp -a {} buildavx512".format(self.content.tarball_prefix))
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_apx']:
self._write_strip("pushd ..")
self._write_strip("cp -a {} buildapx".format(self.content.tarball_prefix))
self._write_strip("popd")
if self.config.config_opts['openmpi']: if self.config.config_opts['openmpi']:
self._write_strip("pushd ..") self._write_strip("pushd ..")
self._write_strip("cp -a {} build-openmpi".format(self.content.tarball_prefix)) self._write_strip("cp -a {} build-openmpi".format(self.content.tarball_prefix))
@@ -566,7 +594,7 @@ class Specfile(object):
flags.extend(["-Ofast", "-fno-semantic-interposition", "-falign-functions=32"]) flags.extend(["-Ofast", "-fno-semantic-interposition", "-falign-functions=32"])
if not self.config.config_opts['full-debug-info'] and not self.config.config_opts['use_clang']: if not self.config.config_opts['full-debug-info'] and not self.config.config_opts['use_clang']:
flags.extend(["-gno-variable-location-views", "-gno-column-info", "-femit-struct-debug-baseonly", "-fdebug-types-section", "-gz=zstd", "-g1"]) flags.extend(["-gno-variable-location-views", "-gno-column-info", "-femit-struct-debug-baseonly", "-fdebug-types-section", "-gz=zstd", "-g1"])
if self.config.default_pattern != 'qmake': if self.config.default_pattern != 'qmake' or self.config.default_pattern != 'qmake6':
if self.config.config_opts['use_lto']: if self.config.config_opts['use_lto']:
flags.extend(["-O3", lto, "-ffat-lto-objects"]) flags.extend(["-O3", lto, "-ffat-lto-objects"])
if self.config.config_opts['use_clang']: if self.config.config_opts['use_clang']:
@@ -699,6 +727,7 @@ class Specfile(object):
self.write_license_files() self.write_license_files()
self._write_strip("export GOAMD64=v2")
if self.config.config_opts['32bit']: if self.config.config_opts['32bit']:
self._write_strip("pushd ../build32/" + self.config.subdir) self._write_strip("pushd ../build32/" + self.config.subdir)
self._write_strip("%make_install32 {} {}".format(self.config.extra_make_install, self._write_strip("%make_install32 {} {}".format(self.config.extra_make_install,
@@ -718,16 +747,25 @@ class Specfile(object):
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_avx2']: if self.config.config_opts['use_avx2']:
self._write_strip("GOAMD64=v3")
self._write_strip("pushd ../buildavx2/" + self.config.subdir) self._write_strip("pushd ../buildavx2/" + self.config.subdir)
self._write_strip("%s_v3 %s\n" % (self.config.install_macro, self.config.extra_make_install)) self._write_strip("%s_v3 %s\n" % (self.config.install_macro, self.config.extra_make_install))
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_avx512']: if self.config.config_opts['use_avx512']:
self._write_strip("GOAMD64=v4")
self._write_strip("pushd ../buildavx512/" + self.config.subdir) self._write_strip("pushd ../buildavx512/" + self.config.subdir)
self._write_strip("%s_v4 %s\n" % (self.config.install_macro, self.config.extra_make_install)) self._write_strip("%s_v4 %s\n" % (self.config.install_macro, self.config.extra_make_install))
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_apx']:
self._write_strip("GOAMD64=v3")
self._write_strip("pushd ../buildapx/" + self.config.subdir)
self._write_strip("%s_va %s\n" % (self.config.install_macro, self.config.extra_make_install))
self._write_strip("popd")
if self.config.config_opts['openmpi']: if self.config.config_opts['openmpi']:
self._write_strip("GOAMD64=v3")
self._write_strip("pushd ../build-openmpi/" + self.config.subdir) self._write_strip("pushd ../build-openmpi/" + self.config.subdir)
self.write_install_openmpi() self.write_install_openmpi()
self._write_strip("popd") self._write_strip("popd")
@@ -735,6 +773,7 @@ class Specfile(object):
if self.config.subdir: if self.config.subdir:
self._write_strip("pushd " + self.config.subdir) self._write_strip("pushd " + self.config.subdir)
self._write_strip("GOAMD64=v2")
self._write_strip("%s %s\n" % (self.config.install_macro, self.config.extra_make_install)) self._write_strip("%s %s\n" % (self.config.install_macro, self.config.extra_make_install))
if self.config.subdir: if self.config.subdir:
@@ -795,10 +834,12 @@ class Specfile(object):
skips = "" skips = ""
for setuid in self.setuid: for setuid in self.setuid:
skips = f"{skips} --skip-path {setuid}" skips = f"{skips} --skip-path {setuid}"
if self.config.config_opts['use_avx2'] or self.config.default_pattern == "distutils3" or self.config.default_pattern == "pyproject": if self.config.config_opts['use_avx2']:
self._write_strip('/usr/bin/elf-move.py avx2 %{buildroot}-v3 %{buildroot} %{buildroot}/usr/share/clear/filemap/filemap-%{name}' + skips) self._write_strip('/usr/bin/elf-move.py avx2 %{buildroot}-v3 %{buildroot} %{buildroot}/usr/share/clear/filemap/filemap-%{name}' + skips)
if self.config.config_opts['use_avx512']: if self.config.config_opts['use_avx512']:
self._write_strip('/usr/bin/elf-move.py avx512 %{buildroot}-v4 %{buildroot} %{buildroot}/usr/share/clear/filemap/filemap-%{name}' + skips) self._write_strip('/usr/bin/elf-move.py avx512 %{buildroot}-v4 %{buildroot} %{buildroot}/usr/share/clear/filemap/filemap-%{name}' + skips)
if self.config.config_opts['use_apx']:
self._write_strip('/usr/bin/elf-move.py apx %{buildroot}-va %{buildroot} %{buildroot}/usr/share/clear/filemap/filemap-%{name}' + skips)
def write_exclude_deletes(self): def write_exclude_deletes(self):
"""Write out deletes for excluded files.""" """Write out deletes for excluded files."""
@@ -861,6 +902,8 @@ class Specfile(object):
self.write_license_files() self.write_license_files()
self._write_strip("export GOAMD64=v2")
if self.config.subdir: if self.config.subdir:
self._write_strip("pushd " + self.config.subdir) self._write_strip("pushd " + self.config.subdir)
@@ -884,20 +927,30 @@ class Specfile(object):
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_avx2']: if self.config.config_opts['use_avx2']:
self._write_strip("GOAMD64=v3")
self._write_strip("pushd clr-build-avx2") self._write_strip("pushd clr-build-avx2")
self._write_strip("%s_v3 %s || :\n" % (self.config.install_macro, self.config.extra_make_install)) self._write_strip("%s_v3 %s || :\n" % (self.config.install_macro, self.config.extra_make_install))
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_avx512']: if self.config.config_opts['use_avx512']:
self._write_strip("GOAMD64=v4")
self._write_strip("pushd clr-build-avx512") self._write_strip("pushd clr-build-avx512")
self._write_strip("%s_v4 %s || :\n" % (self.config.install_macro, self.config.extra_make_install)) self._write_strip("%s_v4 %s || :\n" % (self.config.install_macro, self.config.extra_make_install))
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_apx']:
self._write_strip("GOAMD64=v3")
self._write_strip("pushd clr-build-apx")
self._write_strip("%s_va %s || :\n" % (self.config.install_macro, self.config.extra_make_install))
self._write_strip("popd")
if self.config.config_opts['openmpi']: if self.config.config_opts['openmpi']:
self._write_strip("GOAMD64=v3")
self._write_strip("pushd clr-build-openmpi") self._write_strip("pushd clr-build-openmpi")
self.write_install_openmpi() self.write_install_openmpi()
self._write_strip("popd") self._write_strip("popd")
self._write_strip("GOAMD64=v2")
self._write_strip("pushd clr-build") self._write_strip("pushd clr-build")
self._write_strip("%s %s\n" % (self.config.install_macro, self.config.extra_make_install)) self._write_strip("%s %s\n" % (self.config.install_macro, self.config.extra_make_install))
self._write_strip("popd") self._write_strip("popd")
@@ -980,6 +1033,7 @@ class Specfile(object):
self.write_profile_payload("configure") self.write_profile_payload("configure")
if self.config.subdir: if self.config.subdir:
self._write_strip("pushd {}".format(self.config.subdir)) self._write_strip("pushd {}".format(self.config.subdir))
self._write_strip("export GOAMD64=v2")
self._write_strip("{0}%configure {1} {2} {3}" self._write_strip("{0}%configure {1} {2} {3}"
.format(self.get_profile_use_flags(), .format(self.get_profile_use_flags(),
self.config.disable_static, self.config.disable_static,
@@ -1008,11 +1062,12 @@ class Specfile(object):
self._write_strip("unset PKG_CONFIG_PATH") self._write_strip("unset PKG_CONFIG_PATH")
self._write_strip("pushd ../buildavx2/" + self.config.subdir) self._write_strip("pushd ../buildavx2/" + self.config.subdir)
self.write_build_prepend() self.write_build_prepend()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip("GOAMD64=v3")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('LDFLAGS="$LDFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self._write_strip("%configure {0} {1} {2} " self._write_strip("%configure {0} {1} {2} "
.format(self.config.disable_static, .format(self.config.disable_static,
self.config.extra_configure, self.config.extra_configure,
@@ -1024,11 +1079,12 @@ class Specfile(object):
self._write_strip("unset PKG_CONFIG_PATH") self._write_strip("unset PKG_CONFIG_PATH")
self._write_strip("pushd ../buildavx512/" + self.config.subdir) self._write_strip("pushd ../buildavx512/" + self.config.subdir)
self.write_build_prepend() self.write_build_prepend()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 -Wl,-z,x86-64-v4 "') self._write_strip("GOAMD64=v4")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 -Wl,-z,x86-64-v4 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v4 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX512_FCFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX512_LCFLAGS} "')
self._write_strip("%configure {0} {1} {2} " self._write_strip("%configure {0} {1} {2} "
.format(self.config.disable_static, .format(self.config.disable_static,
self.config.extra_configure, self.config.extra_configure,
@@ -1036,16 +1092,35 @@ class Specfile(object):
self.write_make_line() self.write_make_line()
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_apx']:
self._write_strip("unset PKG_CONFIG_PATH")
self._write_strip("pushd ../buildapx/" + self.config.subdir)
self.write_build_prepend()
self._write_strip("GOAMD64=v3")
self._write_strip('CC="gcc-14"')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {APX_LCFLAGS} "')
self._write_strip("%configure --host=x86_64-clr-linux-gnu {0} {1} {2} "
.format(self.config.disable_static,
self.config.extra_configure,
self.config.extra_configure_avx2))
self.write_make_line()
self._write_strip("popd")
if self.config.config_opts['openmpi']: if self.config.config_opts['openmpi']:
self._write_strip("pushd ../build-openmpi/" + self.config.subdir) self._write_strip("pushd ../build-openmpi/" + self.config.subdir)
self._write_strip(". /usr/share/defaults/etc/profile.d/modules.sh") self._write_strip(". /usr/share/defaults/etc/profile.d/modules.sh")
self._write_strip("module load openmpi") self._write_strip("module load openmpi")
self.write_build_prepend() self.write_build_prepend()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v3 "') self._write_strip("GOAMD64=v3")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self._write_strip("./configure {0} \\\n{1} {2}" self._write_strip("./configure {0} \\\n{1} {2}"
.format(self.config.conf_args_openmpi, .format(self.config.conf_args_openmpi,
self.config.disable_static, self.config.disable_static,
@@ -1065,6 +1140,7 @@ class Specfile(object):
self.write_profile_payload("configure_ac") self.write_profile_payload("configure_ac")
if self.config.subdir: if self.config.subdir:
self._write_strip("pushd " + self.config.subdir) self._write_strip("pushd " + self.config.subdir)
self._write_strip("export GOAMD64=v2")
self._write_strip("{0}%reconfigure {1} {2} {3}" self._write_strip("{0}%reconfigure {1} {2} {3}"
.format(self.get_profile_use_flags(), .format(self.get_profile_use_flags(),
self.config.disable_static, self.config.disable_static,
@@ -1092,11 +1168,12 @@ class Specfile(object):
self._write_strip("unset PKG_CONFIG_PATH") self._write_strip("unset PKG_CONFIG_PATH")
self._write_strip("pushd ../buildavx2/" + self.config.subdir) self._write_strip("pushd ../buildavx2/" + self.config.subdir)
self.write_build_prepend() self.write_build_prepend()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip("GOAMD64=v3")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self._write_strip("%reconfigure {0} {1} {2} " self._write_strip("%reconfigure {0} {1} {2} "
.format(self.config.disable_static, .format(self.config.disable_static,
self.config.extra_configure, self.config.extra_configure,
@@ -1108,11 +1185,12 @@ class Specfile(object):
self._write_strip("unset PKG_CONFIG_PATH") self._write_strip("unset PKG_CONFIG_PATH")
self._write_strip("pushd ../buildavx512/" + self.config.subdir) self._write_strip("pushd ../buildavx512/" + self.config.subdir)
self.write_build_prepend() self.write_build_prepend()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 -Wl,-z,x86-64-v4 "') self._write_strip("GOAMD64=v4")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 -Wl,-z,x86-64-v4 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 -Wl,-z,x86-64-v4 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=256 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v4 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX512_FCFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX512_LCFLAGS} "')
self._write_strip("%reconfigure {0} {1} {2} " self._write_strip("%reconfigure {0} {1} {2} "
.format(self.config.disable_static, .format(self.config.disable_static,
self.config.extra_configure, self.config.extra_configure,
@@ -1120,6 +1198,24 @@ class Specfile(object):
self.write_make_line() self.write_make_line()
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_apx']:
self._write_strip("unset PKG_CONFIG_PATH")
self._write_strip("pushd ../buildapx/" + self.config.subdir)
self.write_build_prepend()
self._write_strip("GOAMD64=v3")
self._write_strip('CC="gcc-14"')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {APX_LCFLAGS} "')
self._write_strip("%reconfigure --host=x86_64-clr-linux-gnu {0} {1} {2} "
.format(self.config.disable_static,
self.config.extra_configure,
self.config.extra_configure_avx2))
self.write_make_line()
self._write_strip("popd")
self._write_strip("\n") self._write_strip("\n")
self.write_check() self.write_check()
self.write_make_install() self.write_make_install()
@@ -1132,6 +1228,7 @@ class Specfile(object):
self.write_profile_payload("make") self.write_profile_payload("make")
if self.config.subdir: if self.config.subdir:
self._write_strip("pushd " + self.config.subdir) self._write_strip("pushd " + self.config.subdir)
self._write_strip("export GOAMD64=v2")
self.write_make_line() self.write_make_line()
if self.config.subdir: if self.config.subdir:
self._write_strip("popd") self._write_strip("popd")
@@ -1144,21 +1241,35 @@ class Specfile(object):
if self.config.config_opts['use_avx2']: if self.config.config_opts['use_avx2']:
self._write_strip("pushd ../buildavx2" + self.config.subdir) self._write_strip("pushd ../buildavx2" + self.config.subdir)
self.write_build_prepend() self.write_build_prepend()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip("GOAMD64=v3")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self.write_make_line() self.write_make_line()
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_avx512']: if self.config.config_opts['use_avx512']:
self._write_strip("pushd ../buildavx512" + self.config.subdir) self._write_strip("pushd ../buildavx512" + self.config.subdir)
self.write_build_prepend() self.write_build_prepend()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 -Wl,-z,x86-64-v4 "') self._write_strip("GOAMD64=v4")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 -Wl,-z,x86-64-v4 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=512 -Wl,-z,x86-64-v4 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v4 -mprefer-vector-width=256 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v4 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX512_FCFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX512_LCFLAGS} "')
self.write_make_line()
self._write_strip("popd")
if self.config.config_opts['use_apx'] and not self.config.config_opts['use_clang']:
self._write_strip("pushd ../buildapx" + self.config.subdir)
self.write_build_prepend()
self._write_strip("GOAMD64=v3")
self._write_strip('CC=gcc-14')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {APX_LCFLAGS} "')
self.write_make_line() self.write_make_line()
self._write_strip("popd") self._write_strip("popd")
@@ -1172,6 +1283,7 @@ class Specfile(object):
self.write_lang_c(export_epoch=True) self.write_lang_c(export_epoch=True)
self.write_variables() self.write_variables()
self.write_profile_payload("autogen") self.write_profile_payload("autogen")
self._write_strip("export GOAMD64=v2")
self._write_strip("{0}%autogen {1} {2} {3}" self._write_strip("{0}%autogen {1} {2} {3}"
.format(self.get_profile_use_flags(), .format(self.get_profile_use_flags(),
self.config.disable_static, self.config.disable_static,
@@ -1197,11 +1309,12 @@ class Specfile(object):
if self.config.config_opts['use_avx2']: if self.config.config_opts['use_avx2']:
self._write_strip("pushd ../buildavx2/" + self.config.subdir) self._write_strip("pushd ../buildavx2/" + self.config.subdir)
self.write_build_prepend() self.write_build_prepend()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip("GOAMD64=v3")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self._write_strip("%autogen {0} {1} {2} " self._write_strip("%autogen {0} {1} {2} "
.format(self.config.disable_static, .format(self.config.disable_static,
self.config.extra_configure, self.config.extra_configure,
@@ -1212,11 +1325,12 @@ class Specfile(object):
if self.config.config_opts['use_avx512']: if self.config.config_opts['use_avx512']:
self._write_strip("pushd ../buildavx512/" + self.config.subdir) self._write_strip("pushd ../buildavx512/" + self.config.subdir)
self.write_build_prepend() self.write_build_prepend()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v4 -Wl,-z,x86-64-v4 -mprefer-vector-width=512"') self._write_strip("GOAMD64=v4")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v4 -Wl,-z,x86-64-v4 -mprefer-vector-width=512"') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v4 -Wl,-z,x86-64-v4 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v4 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v4 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX512_FCFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX512_LCFLAGS} "')
self._write_strip("%autogen {0} {1} {2} " self._write_strip("%autogen {0} {1} {2} "
.format(self.config.disable_static, .format(self.config.disable_static,
self.config.extra_configure, self.config.extra_configure,
@@ -1224,6 +1338,23 @@ class Specfile(object):
self.write_make_line() self.write_make_line()
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['use_apx'] and not self.config.config_opts['use_clang']:
self._write_strip("pushd ../buildapx/" + self.config.subdir)
self.write_build_prepend()
self._write_strip("GOAMD64=v3")
self._write_strip('CC=gcc-14')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {APX_LCFLAGS} "')
self._write_strip("%autogen --host=x86_64-clr-linux-gnu {0} {1} {2} "
.format(self.config.disable_static,
self.config.extra_configure,
self.config.extra_configure_apx))
self.write_make_line()
self._write_strip("popd")
self.write_check() self.write_check()
self.write_make_install() self.write_make_install()
@@ -1239,18 +1370,34 @@ class Specfile(object):
self._write_strip(f"pypi-dep-fix.py . {module}") self._write_strip(f"pypi-dep-fix.py . {module}")
self._write_strip("python3 -m build --wheel --skip-dependency-check --no-isolation " + self.config.extra_configure) self._write_strip("python3 -m build --wheel --skip-dependency-check --no-isolation " + self.config.extra_configure)
self._write_strip("pushd ../buildavx2/" + self.config.subdir) if self.config.config_opts['use_avx2']:
self.write_build_prepend() self._write_strip("pushd ../buildavx2/" + self.config.subdir)
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self.write_build_prepend()
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
for module in self.config.pypi_overrides: self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self._write_strip(f"pypi-dep-fix.py . {module}") for module in self.config.pypi_overrides:
self._write_strip("python3 -m build --wheel --skip-dependency-check --no-isolation " + self.config.extra_configure) self._write_strip(f"pypi-dep-fix.py . {module}")
self._write_strip("\n") self._write_strip("python3 -m build --wheel --skip-dependency-check --no-isolation " + self.config.extra_configure)
self._write_strip("popd") self._write_strip("\n")
self._write_strip("popd")
if self.config.config_opts['use_apx'] and not self.config.config_opts['use_clang']:
self._write_strip("pushd ../buildapx/" + self.config.subdir)
self.write_build_prepend()
self._write_strip('CC=gcc-14')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {APX_LCFLAGS} "')
for module in self.config.pypi_overrides:
self._write_strip(f"pypi-dep-fix.py . {module}")
self._write_strip("python3 -m build --wheel --skip-dependency-check --no-isolation " + self.config.extra_configure)
self._write_strip("\n")
self._write_strip("popd")
self._write_strip("\n") self._write_strip("\n")
if self.config.subdir: if self.config.subdir:
@@ -1276,14 +1423,26 @@ class Specfile(object):
self._write_strip("cat %{buildroot}/usr/lib/python3*/site-packages/*/requires.txt || :") self._write_strip("cat %{buildroot}/usr/lib/python3*/site-packages/*/requires.txt || :")
self._write_strip("echo ----[ mark ]----") self._write_strip("echo ----[ mark ]----")
self._write_strip("pushd ../buildavx2/" + self.config.subdir) if self.config.config_opts['use_avx2']:
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip("pushd ../buildavx2/" + self.config.subdir)
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
self._write_strip("python3 -m installer --destdir=%{buildroot}-v3 dist/*.whl") self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self._write_strip("popd") self._write_strip("python3 -m installer --destdir=%{buildroot}-v3 dist/*.whl")
self._write_strip("popd")
if self.config.config_opts['use_apx'] and not self.config.config_opts['use_clang']:
self._write_strip("pushd ../buildapx/" + self.config.subdir)
self._write_strip('CC=gcc-14')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {APX_LCFLAGS} "')
self._write_strip("python3 -m installer --destdir=%{buildroot}-va dist/*.whl")
self._write_strip("popd")
self.write_find_lang() self.write_find_lang()
@@ -1302,18 +1461,34 @@ class Specfile(object):
if self.config.subdir: if self.config.subdir:
self._write_strip("popd") self._write_strip("popd")
self._write_strip("pushd ../buildavx2/" + self.config.subdir) if self.config.config_opts['use_avx2']:
self.write_build_prepend() self._write_strip("pushd ../buildavx2/" + self.config.subdir)
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self.write_build_prepend()
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
for module in self.config.pypi_overrides: self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self._write_strip(f"pypi-dep-fix.py . {module}") for module in self.config.pypi_overrides:
self._write_strip("python3 setup.py build " + self.config.extra_configure) self._write_strip(f"pypi-dep-fix.py . {module}")
self._write_strip("\n") self._write_strip("python3 setup.py build " + self.config.extra_configure)
self._write_strip("popd") self._write_strip("\n")
self._write_strip("popd")
if self.config.config_opts['use_apx'] and not self.config.config_opts['use_clang']:
self._write_strip("pushd ../buildapx/" + self.config.subdir)
self.write_build_prepend()
self._write_strip('CC=gcc-14')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {APX_LCFLAGS} "')
for module in self.config.pypi_overrides:
self._write_strip(f"pypi-dep-fix.py . {module}")
self._write_strip("python3 setup.py build " + self.config.extra_configure)
self._write_strip("\n")
self._write_strip("popd")
self.write_build_append() self.write_build_append()
self.write_check() self.write_check()
@@ -1336,14 +1511,26 @@ class Specfile(object):
self._write_strip("cat %{buildroot}/usr/lib/python3*/site-packages/*/requires.txt || :") self._write_strip("cat %{buildroot}/usr/lib/python3*/site-packages/*/requires.txt || :")
self._write_strip("echo ----[ mark ]----") self._write_strip("echo ----[ mark ]----")
self._write_strip("pushd ../buildavx2/" + self.config.subdir) if self.config.config_opts['use_avx2']:
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip("pushd ../buildavx2/" + self.config.subdir)
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 "') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -m64 -march=x86-64-v3 "') self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
self._write_strip("python3 -tt setup.py build install --root=%{buildroot}-v3") self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {AVX2_LCFLAGS} "')
self._write_strip("popd") self._write_strip("python3 -tt setup.py build install --root=%{buildroot}-v3")
self._write_strip("popd")
if self.config.config_opts['use_apx'] and not self.config.config_opts['use_clang']:
self._write_strip("pushd ../buildapx/" + self.config.subdir)
self._write_strip('CC=gcc-14')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip(f'LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS {APX_LCFLAGS} "')
self._write_strip("python3 -tt setup.py build install --root=%{buildroot}-va")
self._write_strip("popd")
self.write_find_lang() self.write_find_lang()
@@ -1368,39 +1555,58 @@ class Specfile(object):
self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -Wl,-z -Wl,relro"\n') self._write_strip('LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS -Wl,-z -Wl,relro"\n')
self._write_strip("mkdir -p %{buildroot}/usr/lib64/R/library") self._write_strip("mkdir -p %{buildroot}/usr/lib64/R/library")
self._write_strip("mkdir -p %{buildroot}-v3/usr/lib64/R/library")
self._write_strip("mkdir -p %{buildroot}-v4/usr/lib64/R/library")
self._write_strip("mkdir -p %{buildroot}-va/usr/lib64/R/library")
self._write_strip("\n") self._write_strip("\n")
self._write_strip("mkdir -p ~/.R") self._write_strip("mkdir -p ~/.R")
self._write_strip("mkdir -p ~/.stash")
self._write_strip("echo \"CFLAGS = $CFLAGS -march=x86-64-v3 -ftree-vectorize -mno-vzeroupper\" > ~/.R/Makevars") if self.config.config_opts['use_avx2']:
self._write_strip("echo \"FFLAGS = $FFLAGS -march=x86-64-v3 -ftree-vectorize -mno-vzeroupper \" >> ~/.R/Makevars") self._write_strip(f"echo \"CFLAGS = $CFLAGS {AVX2_CFLAGS} -ftree-vectorize -mno-vzeroupper\" > ~/.R/Makevars")
self._write_strip("echo \"CXXFLAGS = $CXXFLAGS -march=x86-64-v3 -ftree-vectorize -mno-vzeroupper \" >> ~/.R/Makevars") self._write_strip(f"echo \"FFLAGS = $FFLAGS {AVX2_CFLAGS} -ftree-vectorize -mno-vzeroupper \" >> ~/.R/Makevars")
self._write_strip(f"echo \"CXXFLAGS = $CXXFLAGS {AVX2_CFLAGS} -ftree-vectorize -mno-vzeroupper \" >> ~/.R/Makevars")
self._write_strip("R CMD INSTALL " self._write_strip("R CMD INSTALL "
"--install-tests " f"{self.config.extra_configure} "
"--use-LTO " "--install-tests "
"--built-timestamp=${SOURCE_DATE_EPOCH} " "--use-LTO "
"--data-compress=none " "--built-timestamp=${SOURCE_DATE_EPOCH} "
"--compress=none " "--data-compress=none "
"--build -l " "--compress=none "
"%{buildroot}/usr/lib64/R/library .") "--build -l "
self._write_strip("for i in `find %{buildroot}/usr/lib64/R/ -name \"*.so\"`; do mv $i $i.avx2 ; mv $i.avx2 ~/.stash/; done\n") "%{buildroot}-v3/usr/lib64/R/library .")
self._write_strip("echo \"CFLAGS = $CFLAGS -march=x86-64-v4 -ftree-vectorize -mno-vzeroupper -mprefer-vector-width=512 \" > ~/.R/Makevars") if self.config.config_opts['use_avx512']:
self._write_strip("echo \"FFLAGS = $FFLAGS -march=x86-64-v4 -ftree-vectorize -mno-vzeroupper -mprefer-vector-width=512 \" >> ~/.R/Makevars") self._write_strip(f"echo \"CFLAGS = $CFLAGS {AVX512_CFLAGS} -ftree-vectorize -mno-vzeroupper \" > ~/.R/Makevars")
self._write_strip("echo \"CXXFLAGS = $CXXFLAGS -march=x86-64-v4 -ftree-vectorize -mno-vzeroupper -mprefer-vector-width=512 \" >> ~/.R/Makevars") self._write_strip(f"echo \"FFLAGS = $FFLAGS {AVX512_CFLAGS} -ftree-vectorize -mno-vzeroupper \" >> ~/.R/Makevars")
self._write_strip(f"echo \"CXXFLAGS = $CXXFLAGS {AVX512_CFLAGS} -ftree-vectorize -mno-vzeroupper \" >> ~/.R/Makevars")
self._write_strip("R CMD INSTALL " self._write_strip("R CMD INSTALL "
"--preclean " "--preclean "
"--install-tests " f"{self.config.extra_configure} "
"--use-LTO " "--install-tests "
"--no-test-load " "--use-LTO "
"--data-compress=none " "--no-test-load "
"--compress=none " "--data-compress=none "
"--built-timestamp=${SOURCE_DATE_EPOCH} " "--compress=none "
"--build -l " "--built-timestamp=${SOURCE_DATE_EPOCH} "
"%{buildroot}/usr/lib64/R/library .") "--build -l "
self._write_strip("for i in `find %{buildroot}/usr/lib64/R/ -name \"*.so\"`; do mv $i $i.avx512 ; mv $i.avx512 ~/.stash/; done\n") "%{buildroot}-v4/usr/lib64/R/library .")
if self.config.config_opts['use_apx']:
self._write_strip(f"echo \"CFLAGS = $CFLAGS {APX_CFLAGS} -ftree-vectorize -mno-vzeroupper\" > ~/.R/Makevars")
self._write_strip(f"echo \"FFLAGS = $FFLAGS {APX_CFLAGS} -ftree-vectorize -mno-vzeroupper \" >> ~/.R/Makevars")
self._write_strip(f"echo \"CXXFLAGS = $CXXFLAGS {AVX2_CFLAGS} -ftree-vectorize -mno-vzeroupper \" >> ~/.R/Makevars")
self._write_strip("R CMD INSTALL "
f"{self.config.extra_configure} "
"--install-tests "
"--use-LTO "
"--built-timestamp=${SOURCE_DATE_EPOCH} "
"--data-compress=none "
"--compress=none "
"--build -l "
"%{buildroot}-va/usr/lib64/R/library .")
self._write_strip("echo \"CFLAGS = $CFLAGS -ftree-vectorize \" > ~/.R/Makevars") self._write_strip("echo \"CFLAGS = $CFLAGS -ftree-vectorize \" > ~/.R/Makevars")
self._write_strip("echo \"FFLAGS = $FFLAGS -ftree-vectorize \" >> ~/.R/Makevars") self._write_strip("echo \"FFLAGS = $FFLAGS -ftree-vectorize \" >> ~/.R/Makevars")
@@ -1408,6 +1614,7 @@ class Specfile(object):
self._write_strip("R CMD INSTALL " self._write_strip("R CMD INSTALL "
"--preclean " "--preclean "
f"{self.config.extra_configure} "
"--use-LTO " "--use-LTO "
"--install-tests " "--install-tests "
"--data-compress=none " "--data-compress=none "
@@ -1415,7 +1622,6 @@ class Specfile(object):
"--built-timestamp=${SOURCE_DATE_EPOCH} " "--built-timestamp=${SOURCE_DATE_EPOCH} "
"--build -l " "--build -l "
"%{buildroot}/usr/lib64/R/library .") "%{buildroot}/usr/lib64/R/library .")
self._write_strip("cp ~/.stash/* %{buildroot}/usr/lib64/R/library/*/libs/ || :")
self._write_strip("%{__rm} -rf %{buildroot}%{_datadir}/R/library/R.css") self._write_strip("%{__rm} -rf %{buildroot}%{_datadir}/R/library/R.css")
self.write_find_lang() self.write_find_lang()
@@ -1432,6 +1638,7 @@ class Specfile(object):
self._write_strip("mkdir -p clr-build") self._write_strip("mkdir -p clr-build")
self._write_strip("pushd clr-build") self._write_strip("pushd clr-build")
self.write_variables() self.write_variables()
self._write_strip("export GOAMD64=v2")
self._write_strip("%cmake {} {}".format(self.config.cmake_srcdir, self.extra_cmake)) self._write_strip("%cmake {} {}".format(self.config.cmake_srcdir, self.extra_cmake))
self.write_profile_payload("cmake") self.write_profile_payload("cmake")
@@ -1444,10 +1651,11 @@ class Specfile(object):
self._write_strip("pushd clr-build-avx2") self._write_strip("pushd clr-build-avx2")
self.write_build_prepend() self.write_build_prepend()
self.write_variables() self.write_variables()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -march=x86-64-v3 -m64 -Wl,-z,x86-64-v3"') self._write_strip("GOAMD64=v3")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -march=x86-64-v3 -m64 -Wl,-z,x86-64-v3"') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -march=x86-64-v3 -m64 -Wl,-z,x86-64-v3"') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -march=x86-64-v3 -m64 -Wl,-z,x86-64-v3"') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
self._write_strip("%cmake {} {}".format(self.config.cmake_srcdir, self.extra_cmake)) self._write_strip("%cmake {} {}".format(self.config.cmake_srcdir, self.extra_cmake))
self.write_make_line() self.write_make_line()
self._write_strip("popd") self._write_strip("popd")
@@ -1457,10 +1665,26 @@ class Specfile(object):
self._write_strip("pushd clr-build-avx512") self._write_strip("pushd clr-build-avx512")
self.write_build_prepend() self.write_build_prepend()
self.write_variables() self.write_variables()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -march=x86-64-v4 -m64 -Wl,-z,x86-64-v4 -mprefer-vector-width=512"') self._write_strip("GOAMD64=v4")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -march=x86-64-v4 -m64 -Wl,-z,x86-64-v4 -mprefer-vector-width=512"') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -march=x86-64-v4 -m64 -Wl,-z,x86-64-v4 -mprefer-vector-width=512"') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -march=x86-64-v4 -m64 "') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX512_CFLAGS} "')
self._write_strip("%cmake {} {}".format(self.config.cmake_srcdir, self.extra_cmake))
self.write_make_line()
self._write_strip("popd")
if self.config.config_opts['use_apx'] and not self.config.config_opts['use_clang']:
self._write_strip("mkdir -p clr-build-apx")
self._write_strip("pushd clr-build-apx")
self.write_build_prepend()
self.write_variables()
self._write_strip("GOAMD64=v3")
self._write_strip('CC=gcc-14')
self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {APX_CFLAGS} {APX_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {APX_CFLAGS} "')
self._write_strip("%cmake {} {}".format(self.config.cmake_srcdir, self.extra_cmake)) self._write_strip("%cmake {} {}".format(self.config.cmake_srcdir, self.extra_cmake))
self.write_make_line() self.write_make_line()
self._write_strip("popd") self._write_strip("popd")
@@ -1486,10 +1710,11 @@ class Specfile(object):
self._write_strip("module load openmpi") self._write_strip("module load openmpi")
self.write_build_prepend() self.write_build_prepend()
self.write_variables() self.write_variables()
self._write_strip('CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -march=x86-64-v3 -m64 -Wl,-z,x86-64-v3"') self._write_strip("GOAMD64=v3")
self._write_strip('CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -march=x86-64-v3 -m64 -Wl,-z,x86-64-v3"') self._write_strip(f'CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS -march=x86-64-v3 -m64 -Wl,-z,x86-64-v3"') self._write_strip(f'CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip('FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -march=x86-64-v3 -m64"') self._write_strip(f'FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "')
self._write_strip(f'FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS {AVX2_CFLAGS} "')
self.write_cmake_line_openmpi() self.write_cmake_line_openmpi()
self.write_make_line() self.write_make_line()
self._write_strip("module unload openmpi") self._write_strip("module unload openmpi")
@@ -1523,7 +1748,18 @@ class Specfile(object):
if self.config.subdir: if self.config.subdir:
self._write_strip("pushd " + self.config.subdir) self._write_strip("pushd " + self.config.subdir)
self._write_strip("%qmake {} {}".format(extra_qmake_args, self.config.extra_configure)) self._write_strip('export QMAKE_CFLAGS="$CFLAGS"')
self._write_strip('export QMAKE_CXXFLAGS="$CXXFLAGS"')
self._write_strip('export QMAKE_LFLAGS="$LDFLAGS"')
self._write_strip('export QMAKE_LIBDIR=/usr/lib64')
self._write_strip('export QMAKE_CFLAGS_RELEASE=')
self._write_strip('export QMAKE_CXXFLAGS_RELEASE=')
if self.config.make_command:
qmake = self.config.make_command
else:
qmake = "qmake6"
self._write_strip(f"{qmake} {extra_qmake_args} {self.config.extra_configure}")
self._write_strip("test -r config.log && cat config.log") self._write_strip("test -r config.log && cat config.log")
self.write_make_line() self.write_make_line()
@@ -1532,9 +1768,9 @@ class Specfile(object):
if self.config.config_opts['use_avx2']: if self.config.config_opts['use_avx2']:
self._write_strip("pushd ../buildavx2/" + self.config.subdir) self._write_strip("pushd ../buildavx2/" + self.config.subdir)
self._write("%qmake 'QT_CPU_FEATURES.x86_64 += avx avx2 bmi bmi2 f16c fma lzcnt popcnt'\\\n") self._write(f"{qmake} 'QT_CPU_FEATURES.x86_64 += avx avx2 bmi bmi2 f16c fma lzcnt popcnt'\\\n")
self._write(" QMAKE_CFLAGS+=\"-march=x86-64-v3 -Wl,-z,x86-64-v3\" QMAKE_CXXFLAGS+=\"-march=x86-64-v3 -Wl,-z,x86-64-v3\" \\\n") self._write(f' QMAKE_CFLAGS+="{AVX2_CFLAGS} {AVX2_LFLAGS}" QMAKE_CXXFLAGS+="{AVX2_CFLAGS} {AVX2_LFLAGS}" \\\n')
self._write(" QMAKE_LFLAGS+=-march=x86-64-v3 {} {}\n".format(extra_qmake_args, self.config.extra_configure)) self._write(f' QMAKE_LFLAGS+="{AVX2_LCFLAGS}" {extra_qmake_args} {self.config.extra_configure}\n')
self.write_make_line() self.write_make_line()
self._write_strip("popd") self._write_strip("popd")
@@ -1597,14 +1833,16 @@ class Specfile(object):
self.write_variables() self.write_variables()
if self.config.subdir: if self.config.subdir:
self._write_strip("pushd " + self.config.subdir) self._write_strip("pushd " + self.config.subdir)
self._write_strip("export GOAMD64=v2")
self._write_strip('meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} {1} builddir' self._write_strip('meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} {1} builddir'
.format(self.config.extra_configure, .format(self.config.extra_configure,
self.config.extra_configure64)) self.config.extra_configure64))
self._write_strip("ninja -v -C builddir") self._write_strip("ninja -v -C builddir")
if self.config.config_opts['use_avx2']: if self.config.config_opts['use_avx2']:
self._write_strip("GOAMD64=v3")
if self.config.config_opts['pgo'] and self.config.profile_payload != "": if self.config.config_opts['pgo'] and self.config.profile_payload != "":
self._write_strip('CFLAGS="$CFLAGS_GENERATE -m64 -march=x86-64-v3 -O3 -Wl,-z,x86-64-v3" CXXFLAGS="$CXXFLAGS_GENERATE ' self._write_strip(f'CFLAGS="$CFLAGS_GENERATE {AVX2_CFLAGS} {AVX2_LFLAGS} " CXXFLAGS="$CXXFLAGS_GENERATE '
'-m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 " LDFLAGS="$LDFLAGS_GENERATE -m64 -march=x86-64-v3" ' f'{AVX2_CFLAGS} {AVX2_LFLAGS} " LDFLAGS="$LDFLAGS_GENERATE {AVX2_LCFLAGS} " '
'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} ' 'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} '
'{1} builddiravx2'.format(self.config.extra_configure, self.config.extra_configure64)) '{1} builddiravx2'.format(self.config.extra_configure, self.config.extra_configure64))
self._write_strip('ninja -v -C builddiravx2') self._write_strip('ninja -v -C builddiravx2')
@@ -1612,21 +1850,22 @@ class Specfile(object):
self._write_strip("\n".join(self.config.profile_payload)) self._write_strip("\n".join(self.config.profile_payload))
self._write_strip('popd') self._write_strip('popd')
self._write_strip('rm -rf builddiravx2') self._write_strip('rm -rf builddiravx2')
self._write_strip('CFLAGS="$CFLAGS_USE -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 -O3" CXXFLAGS="$CXXFLAGS_USE ' self._write_strip(f'CFLAGS="$CFLAGS_USE {AVX2_CFLAGS} {AVX2_LFLAGS} " CXXFLAGS="$CXXFLAGS_USE '
'-m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 " LDFLAGS="$LDFLAGS_USE -m64 -march=x86-64-v3" ' f'{AVX2_CFLAGS} {AVX2_LFLAGS} " LDFLAGS="$LDFLAGS_USE {AVX2_LCFLAGS} " '
'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} ' 'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} '
'{1} builddiravx2'.format(self.config.extra_configure, self.config.extra_configure64)) '{1} builddiravx2'.format(self.config.extra_configure, self.config.extra_configure64))
self._write_strip('ninja -v -C builddiravx2') self._write_strip('ninja -v -C builddiravx2')
else: else:
self._write_strip('CFLAGS="$CFLAGS -m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 -O3" CXXFLAGS="$CXXFLAGS ' self._write_strip(f'CFLAGS="$CFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} " CXXFLAGS="$CXXFLAGS '
'-m64 -march=x86-64-v3 -Wl,-z,x86-64-v3 " LDFLAGS="$LDFLAGS -m64 -march=x86-64-v3" ' f'{AVX2_CFLAGS} {AVX2_LFLAGS} " LDFLAGS="$LDFLAGS {AVX2_LCFLAGS} " '
'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} ' 'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} '
'{1} builddiravx2'.format(self.config.extra_configure, self.config.extra_configure64)) '{1} builddiravx2'.format(self.config.extra_configure, self.config.extra_configure64))
self._write_strip('ninja -v -C builddiravx2') self._write_strip('ninja -v -C builddiravx2')
if self.config.config_opts['use_avx512']: if self.config.config_opts['use_avx512']:
self._write_strip("GOAMD64=v4")
if self.config.config_opts['pgo'] and self.config.profile_payload != "": if self.config.config_opts['pgo'] and self.config.profile_payload != "":
self._write_strip('CFLAGS="$CFLAGS_GENERATE -m64 -march=x86-64-v4 -Wl,-z,x86-64-v4 -O3" CXXFLAGS="$CXXFLAGS_GENERATE ' self._write_strip(f'CFLAGS="$CFLAGS_GENERATE {AVX512_CFLAGS} {AVX512_LFLAGS} " CXXFLAGS="$CXXFLAGS_GENERATE '
'-m64 -march=x86-64-v4 -Wl,-z,x86-64-v4 -mprefer-vector-width=512" LDFLAGS="$LDFLAGS_GENERATE -m64 -march=x86-64-v4" ' f'{AVX512_CFLAGS} {AVX512_LFLAGS} " LDFLAGS="$LDFLAGS_GENERATE {AVX512_LCFLAGS} " '
'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} ' 'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} '
'{1} builddiravx512'.format(self.config.extra_configure, self.config.extra_configure64)) '{1} builddiravx512'.format(self.config.extra_configure, self.config.extra_configure64))
self._write_strip('ninja -v -C builddiravx512') self._write_strip('ninja -v -C builddiravx512')
@@ -1634,17 +1873,44 @@ class Specfile(object):
self._write_strip("\n".join(self.config.profile_payload)) self._write_strip("\n".join(self.config.profile_payload))
self._write_strip('popd') self._write_strip('popd')
self._write_strip('rm -rf builddiravx512') self._write_strip('rm -rf builddiravx512')
self._write_strip('CFLAGS="$CFLAGS_USE -m64 -march=x86-64-v4 -Wl,-z,x86-64-v4 -O3 -mprefer-vector-width=512" CXXFLAGS="$CXXFLAGS_USE ' self._write_strip(f'CFLAGS="$CFLAGS_USE {AVX512_CFLAGS} {AVX512_LFLAGS} " CXXFLAGS="$CXXFLAGS_USE '
'-m64 -march=x86-64-v4 -Wl,-z,x86-64-v4 -mprefer-vector-width=512" LDFLAGS="$LDFLAGS_USE -m64 -march=x86-64-v4" ' f'{AVX512_CFLAGS} {AVX512_LFLAGS} " LDFLAGS="$LDFLAGS_USE {AVX512_LCFLAGS} " '
'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} ' 'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} '
'{1} builddiravx512'.format(self.config.extra_configure, self.config.extra_configure64)) '{1} builddiravx512'.format(self.config.extra_configure, self.config.extra_configure64))
self._write_strip('ninja -v -C builddiravx512') self._write_strip('ninja -v -C builddiravx512')
else: else:
self._write_strip('CFLAGS="$CFLAGS -m64 -march=x86-64-v4 -Wl,-z,x86-64-v4 -O3 -mprefer-vector-width=512" CXXFLAGS="$CXXFLAGS ' self._write_strip(f'CFLAGS="$CFLAGS {AVX512_CFLAGS} {AVX512_LFLAGS} " CXXFLAGS="$CXXFLAGS '
'-m64 -march=x86-64-v4 -Wl,-z,x86-64-v4 -mprefer-vector-width=512" LDFLAGS="$LDFLAGS -m64 -march=x86-64-v4" ' f'{AVX512_CFLAGS} {AVX512_LFLAGS} " LDFLAGS="$LDFLAGS {AVX512_LCFLAGS} " '
'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} ' 'meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} '
'{1} builddiravx512'.format(self.config.extra_configure, self.config.extra_configure64)) '{1} builddiravx512'.format(self.config.extra_configure, self.config.extra_configure64))
self._write_strip('ninja -v -C builddiravx512') self._write_strip('ninja -v -C builddiravx512')
if self.config.config_opts['use_apx'] and not self.config.config_opts['use_clang']:
self._write_strip("GOAMD64=v3")
self._write_strip('CC=gcc-14')
if self.config.config_opts['pgo'] and self.config.profile_payload != "":
self._write_strip(f'CFLAGS="$CFLAGS_GENERATE {APX_CFLAGS} {APX_LFLAGS} "'
f' CXXFLAGS="$CXXFLAGS_GENERATE {AVX2_CFLAGS} {AVX2_LFLAGS} "'
f' LDFLAGS="$LDFLAGS_GENERATE {APX_LCFLAGS} " '
' meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} '
' {1} builddirapx'.format(self.config.extra_configure, self.config.extra_configure64))
self._write_strip('ninja -v -C builddirapx')
self._write_strip('pushd builddirapx')
self._write_strip("\n".join(self.config.profile_payload))
self._write_strip('popd')
self._write_strip('rm -rf builddirapx')
self._write_strip(f'CFLAGS="$CFLAGS_USE {APX_CFLAGS} {APX_LFLAGS} "'
f' CXXFLAGS="$CXXFLAGS_USE {AVX2_CFLAGS} {AVX2_LFLAGS} "'
f' LDFLAGS="$LDFLAGS_USE {APX_LCFLAGS} " '
' meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} '
' {1} builddirapx'.format(self.config.extra_configure, self.config.extra_configure64))
self._write_strip('ninja -v -C builddirapx')
else:
self._write_strip(f'CFLAGS="$CFLAGS {APX_CFLAGS} {APX_LFLAGS} "'
f' CXXFLAGS="$CXXFLAGS {AVX2_CFLAGS} {AVX2_LFLAGS} "'
f' LDFLAGS="$LDFLAGS {APX_LCFLAGS} " '
' meson --libdir=lib64 --prefix=/usr --buildtype=plain {0} '
' {1} builddirapx'.format(self.config.extra_configure, self.config.extra_configure64))
self._write_strip('ninja -v -C builddirapx')
if self.config.subdir: if self.config.subdir:
self._write_strip("popd") self._write_strip("popd")
if self.config.config_opts['32bit']: if self.config.config_opts['32bit']:
@@ -1663,6 +1929,7 @@ class Specfile(object):
self._write_strip("%install") self._write_strip("%install")
self.write_variables() self.write_variables()
self.write_install_prepend() self.write_install_prepend()
self._write_strip("export GOAMD64=v2")
self.write_license_files() self.write_license_files()
if self.config.config_opts['32bit']: if self.config.config_opts['32bit']:
self._write_strip('pushd ../build32/' + self.config.subdir) self._write_strip('pushd ../build32/' + self.config.subdir)
@@ -1683,10 +1950,17 @@ class Specfile(object):
if self.config.subdir: if self.config.subdir:
self._write_strip("pushd " + self.config.subdir) self._write_strip("pushd " + self.config.subdir)
if self.config.config_opts['use_avx2']: if self.config.config_opts['use_avx2']:
self._write_strip("GOAMD64=v3")
self._write_strip('DESTDIR=%{buildroot}-v3 ninja -C builddiravx2 install') self._write_strip('DESTDIR=%{buildroot}-v3 ninja -C builddiravx2 install')
if self.config.config_opts['use_avx512']: if self.config.config_opts['use_avx512']:
self._write_strip("GOAMD64=v4")
self._write_strip('DESTDIR=%{buildroot}-v4 ninja -C builddiravx512 install') self._write_strip('DESTDIR=%{buildroot}-v4 ninja -C builddiravx512 install')
if self.config.config_opts['use_apx'] and not self.config.config_opts['use_clang']:
self._write_strip("GOAMD64=v3")
self._write_strip('CC=gcc-14')
self._write_strip('DESTDIR=%{buildroot}-va ninja -C builddirapx install')
self._write_strip("GOAMD64=v2")
self._write_strip("DESTDIR=%{buildroot} ninja -C builddir install") self._write_strip("DESTDIR=%{buildroot} ninja -C builddir install")
if self.config.subdir: if self.config.subdir:
self._write_strip("popd") self._write_strip("popd")
+41 -2
View File
@@ -17,6 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import bz2
import configparser import configparser
import os import os
import re import re
@@ -25,7 +26,7 @@ import tarfile
import zipfile import zipfile
import download import download
from util import do_regex, get_sha1sum, print_fatal, write_out from util import call, do_regex, get_sha1sum, print_fatal, write_out
class Source(): class Source():
@@ -50,6 +51,8 @@ class Source():
"""Determine compression type.""" """Determine compression type."""
if self.url.lower().endswith(('.zip', 'jar')): if self.url.lower().endswith(('.zip', 'jar')):
self.type = 'zip' self.type = 'zip'
elif self.url.lower().endswith(('.bz2')) and not self.url.lower().endswith(('.tar.bz2')):
self.type = 'bz2'
else: else:
self.type = 'tar' self.type = 'tar'
@@ -78,6 +81,9 @@ class Source():
print_fatal("Not a valid tar file.") print_fatal("Not a valid tar file.")
sys.exit(1) sys.exit(1)
def set_bz2_prefix(self):
"""No prefix for plain bz2 archives."""
def set_zip_prefix(self): def set_zip_prefix(self):
"""Determine prefix folder name of zip file.""" """Determine prefix folder name of zip file."""
if zipfile.is_zipfile(self.path): if zipfile.is_zipfile(self.path):
@@ -108,6 +114,15 @@ class Source():
with tarfile.open(self.path) as content: with tarfile.open(self.path) as content:
content.extractall(path=extraction_path) content.extractall(path=extraction_path)
def extract_bz2(self, extraction_path):
"""Extract plain bz2 file in path."""
with bz2.BZ2File(self.path, 'rb') as content:
data = content.read()
newfile = self.path.rsplit('/', 1)[1]
newfile = newfile.rsplit('.bz2', 1)[0]
with open(os.path.join(extraction_path), mode='wb') as f:
f.write(data)
def extract_zip(self, extraction_path): def extract_zip(self, extraction_path):
"""Extract zip in path.""" """Extract zip in path."""
with zipfile.ZipFile(self.path, 'r') as content: with zipfile.ZipFile(self.path, 'r') as content:
@@ -120,7 +135,7 @@ def convert_version(ver_str, name):
# them out with expensive regular expressions # them out with expensive regular expressions
banned_subs = ["x86.64", "source", "src", "all", "bin", "release", "rh", banned_subs = ["x86.64", "source", "src", "all", "bin", "release", "rh",
"ga", ".ce", "lcms", "onig", "linux", "gc", "sdk", "orig", "ga", ".ce", "lcms", "onig", "linux", "gc", "sdk", "orig",
"jurko", "%2f", "%2F", "%20"] "jurko", "%2f", "%2F", "%20", "x265"]
# package names may be modified in the version string by adding "lib" for # package names may be modified in the version string by adding "lib" for
# example. Remove these from the name before trying to remove the name from # example. Remove these from the name before trying to remove the name from
@@ -169,6 +184,7 @@ class Content():
self.prefixes = dict() self.prefixes = dict()
self.config = config self.config = config
self.base_path = base_path self.base_path = base_path
self.autogenerated_tarball = None
def write_upstream(self, sha, tarfile, mode="w"): def write_upstream(self, sha, tarfile, mode="w"):
"""Write the upstream hash to the upstream file.""" """Write the upstream hash to the upstream file."""
@@ -198,6 +214,14 @@ class Content():
main_src = Source(url, '', src_path, self.config.default_pattern) main_src = Source(url, '', src_path, self.config.default_pattern)
return main_src return main_src
def process_autogenerated_source(self, url):
"""Download any autogenerated source tarball for comparison."""
autogenerated_src = None
if url:
src_path = self.check_or_get_file(url, os.path.basename(url), mode="")
autogenerated_src = Source(url, '../autogenerated-tmp', src_path, self.config.default_pattern)
return autogenerated_src
def print_header(self): def print_header(self):
"""Print header for autospec run.""" """Print header for autospec run."""
print("\n") print("\n")
@@ -280,6 +304,9 @@ class Content():
name = re.sub(r"release-", '', name) name = re.sub(r"release-", '', name)
name = re.sub(r"\d*$", '', name) name = re.sub(r"\d*$", '', name)
self.rawname = name self.rawname = name
# Identify the auto-generated tarball URL for comparison
if "/releases/download/" in self.url:
self.autogenerated_tarball = "https://github.com/" + match.group(1).strip() + "/" + self.repo + "/archive/refs/tags/" + match.group(3).strip() + ".tar.gz"
version = match.group(3).replace(name, '') version = match.group(3).replace(name, '')
if "/archive/" not in self.url: if "/archive/" not in self.url:
version = re.sub(r"^[-_.a-zA-Z]+", "", version) version = re.sub(r"^[-_.a-zA-Z]+", "", version)
@@ -412,3 +439,15 @@ class Content():
archives_src = self.process_archives() archives_src = self.process_archives()
# Extract all sources # Extract all sources
self.extract_sources(main_src, archives_src) self.extract_sources(main_src, archives_src)
# Download and process any auto-generated source-tree archive for comparison
autogenerated_src = self.process_autogenerated_source(self.autogenerated_tarball)
# Extract autogenerated source for comparison
if autogenerated_src:
autogenerated_src.extract(os.path.join(self.base_path, 'autogenerated-tmp'))
# Move the autogenerated source to a non-version-named directory for consistent diffs
call(f"mv autogenerated-tmp/{autogenerated_src.prefix} autogenerated", check=True, cwd=self.base_path)
call("diff -u -r --unidirectional-new-file ../autogenerated ./",
logfile="archive.diff.in", check=False, cwd=os.path.join(self.base_path, main_src.prefix))
call("grep -A14 -E '^(diff|Only in)' archive.diff.in",
logfile="archive.diff", check=False, cwd=os.getcwd())
call("rm archive.diff.in", check=False, cwd=os.getcwd())
+3 -2
View File
@@ -150,8 +150,9 @@ def binary_in_path(binary):
def write_out(filename, content, mode="w"): def write_out(filename, content, mode="w"):
"""File.write convenience wrapper.""" """File.write convenience wrapper."""
with open_auto(filename, mode) as require_f: if mode:
require_f.write(content) with open_auto(filename, mode) as require_f:
require_f.write(content)
def open_auto(*args, **kwargs): def open_auto(*args, **kwargs):
+26 -1
View File
@@ -621,12 +621,30 @@ class TestBuildreq(unittest.TestCase):
"valid": "valid", "valid": "valid",
"valid_but_commented": "valid_but_commented", "valid_but_commented": "valid_but_commented",
"different_name": "another_name", "different_name": "another_name",
"qt6.module1": "qt6module1",
"qt6.module2": "qt6module2",
"kf6.module3": "kf6module3",
"kf6.module4": "kf6module4",
".module5": "namodule5",
".module6": "namodule6"
} }
content = ''' content = '''
find_package(valid) find_package(valid)
#find_package(foo) #find_package(foo)
# find_package(valid_but_commented) # find_package(valid_but_commented)
find_package(different_name) find_package(different_name)
find_package(Qt6 stuff
module1
module2)
find_package(KF6 stuff
module3
module4
)
find_package(NOT_HANDLED_NAMESPACE stuff
module5
module6
)
''' '''
with tempfile.TemporaryDirectory() as tmpd: with tempfile.TemporaryDirectory() as tmpd:
with open(os.path.join(tmpd, 'fname'), 'w') as f: with open(os.path.join(tmpd, 'fname'), 'w') as f:
@@ -634,7 +652,14 @@ find_package(different_name)
self.reqs.parse_cmake(os.path.join(tmpd, 'fname'), cmake_modules, False) self.reqs.parse_cmake(os.path.join(tmpd, 'fname'), cmake_modules, False)
self.assertEqual(self.reqs.buildreqs, self.assertEqual(self.reqs.buildreqs,
set(['valid', 'another_name'])) set(['valid',
'another_name',
'qt6module1',
'qt6module2',
'kf6module3',
'kf6module4',
'namodule5',
'namodule6']))
def test_r_desc_field_begin(self): def test_r_desc_field_begin(self):
"""Test parsing of the first R description field.""" """Test parsing of the first R description field."""
+67
View File
@@ -33,6 +33,7 @@ class TestFiles(unittest.TestCase):
"/opt/two", "/opt/two",
"/V3/opt/two", "/V3/opt/two",
"/V4/opt/two", "/V4/opt/two",
"/VA/opt/two",
"/usr/etc/three", "/usr/etc/three",
"/usr/local/four", "/usr/local/four",
"/usr/src/five", "/usr/src/five",
@@ -58,6 +59,7 @@ class TestFiles(unittest.TestCase):
self.fm.push_package_file('/etc/test-fn') self.fm.push_package_file('/etc/test-fn')
self.fm.push_package_file('/V3/etc/test-fn') self.fm.push_package_file('/V3/etc/test-fn')
self.fm.push_package_file('/V4/etc/test-fn') self.fm.push_package_file('/V4/etc/test-fn')
self.fm.push_package_file('/VA/etc/test-fn')
self.assertTrue(self.fm.has_banned) self.assertTrue(self.fm.has_banned)
self.assertFalse(self.fm.newfiles_printed) self.assertFalse(self.fm.newfiles_printed)
@@ -84,6 +86,7 @@ class TestFiles(unittest.TestCase):
self.assertTrue(self.fm.compat_exclude('/usr/lib64/libfoo.so')) self.assertTrue(self.fm.compat_exclude('/usr/lib64/libfoo.so'))
self.assertTrue(self.fm.compat_exclude('/V3/usr/lib64/libfoo.so')) self.assertTrue(self.fm.compat_exclude('/V3/usr/lib64/libfoo.so'))
self.assertTrue(self.fm.compat_exclude('/V4/usr/lib64/libfoo.so')) self.assertTrue(self.fm.compat_exclude('/V4/usr/lib64/libfoo.so'))
self.assertTrue(self.fm.compat_exclude('/VA/usr/lib64/libfoo.so'))
def test_compat_exclude_not_compat_mode(self): def test_compat_exclude_not_compat_mode(self):
""" """
@@ -94,6 +97,7 @@ class TestFiles(unittest.TestCase):
self.assertFalse(self.fm.compat_exclude('/usr/lib64/libfoo.so')) self.assertFalse(self.fm.compat_exclude('/usr/lib64/libfoo.so'))
self.assertFalse(self.fm.compat_exclude('/V3/usr/lib64/libfoo.so')) self.assertFalse(self.fm.compat_exclude('/V3/usr/lib64/libfoo.so'))
self.assertFalse(self.fm.compat_exclude('/V4/usr/lib64/libfoo.so')) self.assertFalse(self.fm.compat_exclude('/V4/usr/lib64/libfoo.so'))
self.assertFalse(self.fm.compat_exclude('/VA/usr/lib64/libfoo.so'))
def test_file_pat_match(self): def test_file_pat_match(self):
""" """
@@ -107,6 +111,8 @@ class TestFiles(unittest.TestCase):
self.fm.push_package_file.assert_called_with('/V3/test-fn', 'main') self.fm.push_package_file.assert_called_with('/V3/test-fn', 'main')
self.assertTrue(self.fm.file_pat_match('/V4/test-fn', r'^/test-fn', 'main')) self.assertTrue(self.fm.file_pat_match('/V4/test-fn', r'^/test-fn', 'main'))
self.fm.push_package_file.assert_called_with('/V4/test-fn', 'main') self.fm.push_package_file.assert_called_with('/V4/test-fn', 'main')
self.assertTrue(self.fm.file_pat_match('/VA/test-fn', r'^/test-fn', 'main'))
self.fm.push_package_file.assert_called_with('/VA/test-fn', 'main')
def test_file_pat_match_exclude(self): def test_file_pat_match_exclude(self):
""" """
@@ -117,6 +123,7 @@ class TestFiles(unittest.TestCase):
self.assertTrue(self.fm.file_pat_match('/test-fn', r'^/test-fn', 'main')) self.assertTrue(self.fm.file_pat_match('/test-fn', r'^/test-fn', 'main'))
self.assertTrue(self.fm.file_pat_match('/V3/test-fn', r'^/test-fn', 'main')) self.assertTrue(self.fm.file_pat_match('/V3/test-fn', r'^/test-fn', 'main'))
self.assertTrue(self.fm.file_pat_match('/V4/test-fn', r'^/test-fn', 'main')) self.assertTrue(self.fm.file_pat_match('/V4/test-fn', r'^/test-fn', 'main'))
self.assertTrue(self.fm.file_pat_match('/VA/test-fn', r'^/test-fn', 'main'))
self.fm.push_package_file.assert_not_called() self.fm.push_package_file.assert_not_called()
def test_file_pat_match_replacement(self): def test_file_pat_match_replacement(self):
@@ -130,6 +137,8 @@ class TestFiles(unittest.TestCase):
self.fm.push_package_file.assert_called_with('/V3/testfn', 'main') self.fm.push_package_file.assert_called_with('/V3/testfn', 'main')
self.assertTrue(self.fm.file_pat_match('/V4/test-fn', r'/test-fn', 'main', '/testfn')) self.assertTrue(self.fm.file_pat_match('/V4/test-fn', r'/test-fn', 'main', '/testfn'))
self.fm.push_package_file.assert_called_with('/V4/testfn', 'main') self.fm.push_package_file.assert_called_with('/V4/testfn', 'main')
self.assertTrue(self.fm.file_pat_match('/VA/test-fn', r'/test-fn', 'main', '/testfn'))
self.fm.push_package_file.assert_called_with('/VA/testfn', 'main')
def test_file_pat_match_replacement_no_glob(self): def test_file_pat_match_replacement_no_glob(self):
""" """
@@ -143,6 +152,42 @@ class TestFiles(unittest.TestCase):
self.fm.push_package_file.assert_called_with('/V3/test-fn', 'main') self.fm.push_package_file.assert_called_with('/V3/test-fn', 'main')
self.assertTrue(self.fm.file_pat_match('/V4/test-fn', r'^/test-fn', 'main', '/testfn')) self.assertTrue(self.fm.file_pat_match('/V4/test-fn', r'^/test-fn', 'main', '/testfn'))
self.fm.push_package_file.assert_called_with('/V4/test-fn', 'main') self.fm.push_package_file.assert_called_with('/V4/test-fn', 'main')
self.assertTrue(self.fm.file_pat_match('/VA/test-fn', r'^/test-fn', 'main', '/testfn'))
self.fm.push_package_file.assert_called_with('/VA/test-fn', 'main')
def test_file_windows_exe_not_allowed(self):
"""
Test that Windows exe and dll files are excluded
"""
self.fm.push_package_file = MagicMock()
self.fm.config.config_opts['allow_exe'] = False
self.fm.push_file('/usr/bin/foo.exe', 'test')
self.fm.push_file('/usr/lib64/foo.dll', 'test')
self.fm.push_file('/usr/lib/python3.12/site-packages/nsist/msvcrt/x86/api-ms-win-core-console-l1-1-0.dll', 'test')
self.fm.push_file('/usr/lib/python3.12/site-packages/installer/_scripts/t32.exe', 'test')
self.assertIn('/usr/bin/foo.exe', self.fm.excludes)
self.assertIn('/usr/lib64/foo.dll', self.fm.excludes)
self.assertIn('/usr/lib/python3.12/site-packages/nsist/msvcrt/x86/api-ms-win-core-console-l1-1-0.dll', self.fm.excludes)
self.assertIn('/usr/lib/python3.12/site-packages/installer/_scripts/t32.exe', self.fm.excludes)
def test_file_windows_exe_allowed(self):
"""
Test that Windows exe and dll files are not excluded
"""
self.fm.push_package_file = MagicMock()
self.fm.config.config_opts['allow_exe'] = True
self.fm.push_file('/usr/bin/foo.exe', 'test')
self.fm.push_file('/usr/lib64/foo.dll', 'test')
self.fm.push_file('/usr/lib/python3.12/site-packages/nsist/msvcrt/x86/api-ms-win-core-console-l1-1-0.dll', 'test')
self.fm.push_file('/usr/lib/python3.12/site-packages/installer/_scripts/t32.exe', 'test')
self.assertIn('/usr/bin/foo.exe', self.fm.files)
self.assertIn('/usr/lib64/foo.dll', self.fm.files)
self.assertIn('/usr/lib/python3.12/site-packages/nsist/msvcrt/x86/api-ms-win-core-console-l1-1-0.dll', self.fm.files)
self.assertIn('/usr/lib/python3.12/site-packages/installer/_scripts/t32.exe', self.fm.files)
self.assertNotIn('/usr/bin/foo.exe', self.fm.excludes)
self.assertNotIn('/usr/lib64/foo.dll', self.fm.excludes)
self.assertNotIn('/usr/lib/python3.12/site-packages/nsist/msvcrt/x86/api-ms-win-core-console-l1-1-0.dll', self.fm.excludes)
self.assertNotIn('/usr/lib/python3.12/site-packages/installer/_scripts/t32.exe', self.fm.excludes)
def test_file_pat_match_no_match(self): def test_file_pat_match_no_match(self):
""" """
@@ -203,6 +248,9 @@ class TestFiles(unittest.TestCase):
self.fm.push_file('/V4/foobar', '') self.fm.push_file('/V4/foobar', '')
calls = [call('/V4/foobar', 'foobar-extras')] calls = [call('/V4/foobar', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls) self.fm.push_package_file.assert_has_calls(calls)
self.fm.push_file('/VA/foobar', '')
calls = [call('/VA/foobar', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls)
def test_push_package_file_glob_empty(self): def test_push_package_file_glob_empty(self):
""" """
@@ -220,6 +268,9 @@ class TestFiles(unittest.TestCase):
self.fm.push_file('/V4/leftglobrightglob', '') self.fm.push_file('/V4/leftglobrightglob', '')
calls = [call('/V4/leftglob*rightglob', 'foobar-extras')] calls = [call('/V4/leftglob*rightglob', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls) self.fm.push_package_file.assert_has_calls(calls)
self.fm.push_file('/VA/leftglobrightglob', '')
calls = [call('/VA/leftglob*rightglob', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls)
def test_push_package_file_glob_left_match(self): def test_push_package_file_glob_left_match(self):
""" """
@@ -237,6 +288,9 @@ class TestFiles(unittest.TestCase):
self.fm.push_file('/V4/leftglobrightglob', '') self.fm.push_file('/V4/leftglobrightglob', '')
calls = [call('/V4/leftglob*', 'foobar-extras')] calls = [call('/V4/leftglob*', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls) self.fm.push_package_file.assert_has_calls(calls)
self.fm.push_file('/VA/leftglobrightglob', '')
calls = [call('/VA/leftglob*', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls)
def test_push_package_file_glob_right_match(self): def test_push_package_file_glob_right_match(self):
""" """
@@ -254,6 +308,9 @@ class TestFiles(unittest.TestCase):
self.fm.push_file('/V4/leftglobrightglob', '') self.fm.push_file('/V4/leftglobrightglob', '')
calls = [call('/V4/*rightglob', 'foobar-extras')] calls = [call('/V4/*rightglob', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls) self.fm.push_package_file.assert_has_calls(calls)
self.fm.push_file('/VA/leftglobrightglob', '')
calls = [call('/VA/*rightglob', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls)
def test_push_package_file_glob_leftright_match(self): def test_push_package_file_glob_leftright_match(self):
""" """
@@ -271,6 +328,9 @@ class TestFiles(unittest.TestCase):
self.fm.push_file('/V4/leftglobstuffrightglob', '') self.fm.push_file('/V4/leftglobstuffrightglob', '')
calls = [call('/V4/leftglob*rightglob', 'foobar-extras')] calls = [call('/V4/leftglob*rightglob', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls) self.fm.push_package_file.assert_has_calls(calls)
self.fm.push_file('/VA/leftglobstuffrightglob', '')
calls = [call('/VA/leftglob*rightglob', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls)
def test_push_package_file_glob_multi_match(self): def test_push_package_file_glob_multi_match(self):
""" """
@@ -288,6 +348,9 @@ class TestFiles(unittest.TestCase):
self.fm.push_file('/V4/leftglobstuff/stuffrightglob', '') self.fm.push_file('/V4/leftglobstuff/stuffrightglob', '')
calls = [call('/V4/leftglob*/*rightglob', 'foobar-extras')] calls = [call('/V4/leftglob*/*rightglob', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls) self.fm.push_package_file.assert_has_calls(calls)
self.fm.push_file('/VA/leftglobstuff/stuffrightglob', '')
calls = [call('/VA/leftglob*/*rightglob', 'foobar-extras')]
self.fm.push_package_file.assert_has_calls(calls)
def test_push_file_setuid(self): def test_push_file_setuid(self):
""" """
@@ -313,6 +376,8 @@ class TestFiles(unittest.TestCase):
self.fm.push_package_file.assert_has_calls([call('/V3/usr/bin/test', 'bin')]) self.fm.push_package_file.assert_has_calls([call('/V3/usr/bin/test', 'bin')])
self.fm.push_file('/V4/usr/bin/test', '') self.fm.push_file('/V4/usr/bin/test', '')
self.fm.push_package_file.assert_has_calls([call('/V4/usr/bin/test', 'bin')]) self.fm.push_package_file.assert_has_calls([call('/V4/usr/bin/test', 'bin')])
self.fm.push_file('/VA/usr/bin/test', '')
self.fm.push_package_file.assert_has_calls([call('/VA/usr/bin/test', 'bin')])
def test_push_file_match_pkg_name_dependency(self): def test_push_file_match_pkg_name_dependency(self):
""" """
@@ -327,6 +392,8 @@ class TestFiles(unittest.TestCase):
self.fm.push_package_file.assert_has_calls([call('/V3/usr/share/doc/testball/*', 'doc')]) self.fm.push_package_file.assert_has_calls([call('/V3/usr/share/doc/testball/*', 'doc')])
self.fm.push_file('/V4/usr/share/doc/testball/', 'testball') self.fm.push_file('/V4/usr/share/doc/testball/', 'testball')
self.fm.push_package_file.assert_has_calls([call('/V4/usr/share/doc/testball/*', 'doc')]) self.fm.push_package_file.assert_has_calls([call('/V4/usr/share/doc/testball/*', 'doc')])
self.fm.push_file('/VA/usr/share/doc/testball/', 'testball')
self.fm.push_package_file.assert_has_calls([call('/VA/usr/share/doc/testball/*', 'doc')])
def test_push_file_no_match(self): def test_push_file_no_match(self):
""" """