This 'packages' file looks like a config file, but because it typically
exists outside the package git repo, we want avoid a later attempt to
commit it.
This change also makes the "fatal: pathspec 'packages' did not match any
files" error message disappear.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This helper function is meant to be used throughout autospec as a
replacement for most uses of open(), especially whenever reading
arbitrary data from upstream sources.
It reads/writes data in UTF-8 always, with invalid UTF-8 characters
escaped with Python's "surrogate" escaping mechanism. This ensures that
any Latin-1 or other non-UTF-8 compatible encoded data can successfully
be read in and later written out without data corruption.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Autospec may encounter "GPL+" license. This is not a valid
SPDX license. The meaning of GPL+ is not well defined, therefore
blcklisting seems the proper way to handle it. This way it is
handled the same way as "GPL", which is blaclisted for the same reason.
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
If blank lines appear in the file list from the build log, skip them.
In particular, this fix also resolves a persistent autospec warning I am
seeing when testing the latest release of mock:
[WARNING] Removing directory from file list
The empty string in the above warning message originates from the empty
string being added to the files list, as two blank lines appear after
the files list from the build log.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
By default, qmake builds make thin objects.
Added a missing space for the non-LTO case, as that's concatenated to
the args in the package-supplied "configure" file.
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
This pattern would add the ability to create bootstraps specfiles for
maven dependencies(aka artifacts). These boostraps would be use as a
way to solve the dependencies for Java projects that use Maven as a
build tool.
Signed-off-by: Athenas Jimenez <athenas.jimenez.gonzalez@intel.com>
fixing a typo when building for avx2, moved first argument to upper
line to make it more evident
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Switching to flat file handling using the same conf file parsing as
other config files like extras and dev_extras.
Moves to two different config files for the file list and the requires
list.
Usually needed when it's a .zip file without a prefix, which results
in weird mv errors when launching Autospec. This also makes it
possible to have more sources (like .jar).
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
The actual output of the unzip -q -l commands used in build_zip()
doesn't include the archive name. Removing it from the mock UNZIP_OUT so
unit tests match reality.
'futures' provides concurrent.futures, which has been part of the Python
standard library since the 3.2 release, so it should not be added as a
dependency anymore.
Any remaining Python 2 packages can manually require
'deprecated-futures-legacypython' as needed.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
The names of existing CVE patches, as detected from an existing spec
file, have been detected as new CVE patches by mistake, and the
resulting git commit summaries explicitly mention the previously fixed
CVEs.
Fix the issue by lowercasing the patch names when populated the list of
old patches, because the code block below this one also lowercases them
prior to checking their names.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Instead of adding --noclobber to the cp and mv commands for moving
archive contents into the destination directory, if the prefix paths
where the archive and main tarball were extracted match, ignore the
destination completely and don't even execute the mv or write the cp to
the spec file.
Some software packages break distribution into a core tarball then
additional tarballs with extra features or content. LibreOffice is one
such example. The additional tarballs provide files in the same
directory tree. The most efficient way to unpack all of these with the
current archive functionality is to place them at the same base dir, ./
At two points during autospec, the code to handle archives attempts to
either move or copy the contents of archive tarballs to the final
directory. If ./ is the unpacking directory, the files are already in
the same place, so mv and cp will fail, complaining that src and dst are
the same.
Add '-n' (no clobber) to these mv and cp commands, so that they simply
do nothing when the files are already in the correct final destination.
Clear ships with a patch in GCC that allows ignoring the -Werror
compilation flag if this environment variable is set. -Werror is a
useful flag for the upstream package maintainers, but is a source of
headaches for downstream users.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
libcdio-2.1.0 has test files named "copying.iso" and "copying-rr.iso",
which are of course not text files -- but autospec considers those to
be license files.
Perform a little bit of refactoring, calculating the hash only after
the license has been properly detected.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit changes the syntax of the attrs control file and
actually makes use of it for %file setup.
New syntax of the `attrs` file is `<mode> <user> <group> <filename>`
(space separated).
e.g:
4755 root messagebus /usr/libexec/dbus-daemon-launch-helper
Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
The CI infra will occasionally choose Ubuntu 16.04 LTS by default
instead of 14.04 LTS, which results in pycurl failing to build due to a
missing dependency (libgnutls-dev).
Resolve the issue by installing the missing dependency and forcing
xenial (16.04) as the default.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
The Clear Linux OS developer tooling recently gained the ability to
create trimmed-down patches from autospec commits, dumping them to files
named "for-review.txt".
Update .gitignore to ignore these files.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
When adding a file to extras (as well as excludes, setuid etc.), the
files are added to the exclude list dynamically. Instead, load all known
files upfront.
Also, process file-configured subpackages (-extras, custom-extras etc.)
first and only then process "built-in" (pattern-based) packages (such as
-lib64, -lib32, -autostart etc.)
The CMake pattern reuses the same sources by doing different
out-of-tree builds. The copied sources are not useful.
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
Updating expected dev package definition to accomodate:
make -dev packages require: the main package
so that installing -dev gives you a functional component
detect a few more meson patterns
add a staticdev subpackage to host .a files
make -dev packages require: the main package
so that installing -dev gives you a functional component