This function will manage all profile_payload handling. For patterns
that require special handling, the pattern argument can be passed to
specify the pattern name.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
We may get a message "<package>.license not found" even
if the file exists.
The <package>.license file is manually created but the
licenses in the file may be silently rejected due to being
blacklisted.
For example adding "GPL" or "BSD" to abc.license while autospecing
a package "abc" can produce the error:
"[FATAL] Cannot find any license or abc.license file!"
eventhough the abc.license manifestly exists.
This patch modifies the original error message and also prints out
some additional messages, such as:
[WARNING] abc.license: blacklisted license GPL ignored.
[WARNING] abc.license: blacklisted license BSD ignored.
...
[FATAL] Cannot find any license or a valid abc.license file!
Note: With this patch "add_license" only fails (returns False) if trying
to add a blacklisted license, it always returns True for non-blacklisted
licenses. This required to change the unit test "test_add_license_present"
accordingly.
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
This change eliminates the ability for header files to change path
without rebuilding. This limitation is being added because of changes
to exclude (to remove files rather than exclude them) making it
difficult to move header content to extras.
I am seeing some requests to access 'apache.snapshots.https' instead of
'central', so make the regex more generic to match any mirror.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
All mvn packages in Clear Linux OS recently gained mvn() Provides, most
of which have the form:
mvn(GROUPID:ARTIFACTID:TYPE) = VER
If classifiers are present, they have the form:
mvn(GROUPID:ARTIFACTID:TYPE:CLASSIFIER) = VER
Because maven's error messages for missing artifacts list the missing
group ID, artifact ID, type, and optional classifier similar to the
above format, the fail pattern handling for these are simple.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
I found some additional mappings to add, some that were obsolete, and
some that needed correction.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
write_install_append() is already called by write_buildpattern(), so it
should not be called in pattern-specific code.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Since our 32-bit builds are for compatibility with old software that
hasn't been updated in ages, it's reasonable to add this flag so that we
also support software that simply hasn't been recompiled in nearly 15
years (the -mstackrealign flag was added in 2006, but the ABI change
happened some time before that).
Addresses distribution#1152.
Added URL pattern with host repository.mapr.com.
There are some binary jar is located outside of repo.maven
hostname.
Signed-off-by: Choong Yin Thong <yin.thong.choong@intel.com>
Autospec can detect license "GFDL1.1".
In this happens, a package build will end up with the
following error:
"ERROR: License 'GFDL1.1' is not an allowed SPDX license ID"
This patch translates "GFDL1.1" into the corresponding SPDX
license "GFDL-1.1".
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Autospec fails for several gnome packages with:
meson.build:1:0: ERROR: Could not execute Vala compiler "valac"
This had to be fixed by manually adding "vala" to
buildreq_add file.
This patch adds "BuildRequires : vala" to the spec file if the
pattern "ERROR: Could not execute Vala compiler" is detected.
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Reduce code duplication by moving identical code blocks into a new
function, write_license_files().
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
We don't want to make bundles that include all the deps for *extras* rpms,
these are most likely removed or optional components. We may have to
create separate used_libs_extras files for them instead.
We ignore the package name when searching for -extras-.
Java-based packages often have pom, jar, and/or xml files for sources.
We want to ignore them to prevent them from being added to package
repos.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
check_or_get_file is calling for the tarball and for each
archive, this provokes that upstream is reset every time, and
the latest archive is written twice as process_archives creates
the shasum again.
Let's remove the second shasum creation from process_archives, and
add a mode="a" parameter to check_or_get_file function for the archives,
and use mode="w" for the source tarball.
Fixes#440
Instead of the excludes file adding '%exclude' macros for files that
are not being shipped in the binary rpms, they cause the file to be
deleted entirely.
This causes a few ripple effects in other parts of the subpackage file
manipulation code where excludes were used to avoid files being added
to multiple subpackages. To work around this, don't allow calls that
add files to a specific subpackage to fall through into the general
push_package_file fallthrough or file_pat_match calls. Also don't add
files that are still intended to be shipped to show up on the excludes
list.
The go.mod file will typically live in a subdirectory of source tree
walk, so remove the restriction on where to find the go.mod.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
The 'upstream' file may not exist when creating a new package from
scratch, so ignore FileNotFoundError for unlink() here.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Openjdk9 is no longer under development and would be deprecated on July
26 of 2019 on Clear Linux. So, it would be replaced by Openjdk11
which is the current LTS.
Signed-off-by: Athenas Jimenez <athenas.jimenez.gonzalez@intel.com>
Update support for handling go packages by handling missing go
dependencies. Make use of go modules and the go proxy (see
https://tip.golang.org/cmd/go/#hdr-Module_proxy_protocol for more
details on the proxy implementation) to discover what artifacts are
needed.
A new go-dep build_pattern that will package all versions that the
go-proxy finds is also added as part of this change. Additional rework
of the golang build_pattern (and Makefile build_pattern as a number of
go packages use Makefiles) to use module vendoring when module
configuration is detected was added as well.
The new functionality is also intended to be used by a higher level
tool that will wrap autospec calls to build missing dependencies as
well as the requested package.
Request timeout is set to 30s. But connection timeout and low speed
window timeouts are set back to 10s as they didn't cause any errors
Signed-off-by: Mandar Thorat <mandar.chandrakant.thorat@intel.com>
To start with, try setting the following timeouts:
- connection timeout of 10 seconds
- request timeout of 10 seconds
- speed limit timeout of 1 byte/sec in a 10-second window
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
In some cases, the lack of escaping here leads to unhandled exceptions.
For example, if `tarball.name` == `libsigc++`, then an exception is
raised due to `++` not being a valid sequence in the regular expression.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Add a blacklist of packages that ship with R so that autospec can ignore
them and avoid printing a "skipping" progress message for them.
Eventually, we want to autopopulate this list, so I added a FIXME too.
Fixes#420
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Occasionally, within a build round, rpmbuild may succeed *and* new build
dependencies are detected, thus requiring another build round. But if
one or more of those new dependencies does not yet exist in the repo,
the root log scan returns an error and autospec falls through, commits
the result, and returns success.
Avoid this issue by resetting the success flag at the beginning of every
build round.
Fixes#419
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
We cannot split on whitespace alone, because dependencies may be
specified like 'igraph(>= 1.0.1)', with no intervening space between the
package name and the open parenthesis.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Since the introduction of the C.UTF-8 locale for builds, R now prints
left/right curly single quotes in its error messages.
Adapt to this behavior by accepting U+2018 (left single quotation mark)
and U+2019 (right single quotation mark) in addition to the apostrophes
for the R fail patterns.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
To improve tracking of units that are enabled for restart by
clr-service-restart, add a new config file `service_restart`. It lists
one or more unit names (with full path), one unit per line. The %install
section is updated accordingly.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>