This release adds the "-C/--cleanup" flag to clean up the mock chroots
after a build. It also ensures that mock will build unique chroots for
each build, useful for automation environments where autospec is run in
parallel.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Add -C/--cleanup to tell mock to clean up the chroot after it completes
the build. This is useful for wrapping programs which run several
instances of autospec automatically. Use this flag to determine when we
actually need a unique uniqueext (automation environments) and when
those uniquexts can be reused (developer running one-offs).
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
This prevents collisions when two instances are trying to build the same
package in parallel. Unit tests added as well.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Allow users to specify requires that are not dropped during existence
detection and os-packages list checking.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Several platforms are using Python 3.5 or lower. Replace the new f"..."
style strings with the traditional "...".format() style strings.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Fixes#14
Instead of adding the entire URL to the upstream file, only add the
archive basename after the sha1.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
These tests regularly fail in Travis for unknown reasons. Skip them
until the tests can be rewritten.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Instead of calling each test target individually, call the unittest
target to run all available tests in the test directory.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
This allows python3 unittest to properly generate the tests when running
all the tests in the tests directory.
Also adds a fix to test_test.py to reset buildpattern.default_pattern
every test. This was a bug introduced by running all tests at once -
this was not being cleared correctly.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Asciidoc being in the configure log should not cause it to be added to
the build requires automatically. This is also intended to enable
asciidoc to be removed from use entirely.
The lib submodule requiring the config submodule was an artifact of
how autospec used to work before the stateless implementation in Clear
Linux. config is now mostly used for systemd configuration and unit
files which do not need to be pulled in for library use cases. So to
avoid having lib pull in systemd units that need the bin submodule,
stop having lib require config.
Instead of throwing an exception when pycurl errors are encountered
(such as timeouts), gracefully handle the error and exit. This helps
calling processes understand the error it is seeing and either retry or
continue without interruption.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
when g-ir-scanner is required, gobject-introspection
will be added as build requirement.
gobject-introspection-dev is not pulled because we
require the binary and not source files in gobject-introspection.
Aditionally, gobject-introspection requires glibc-bin to use 'ldd'
(which is required by g-ir-scanner at some point).
Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
initial support for meson builds, this pattern will be
used if 'meson.build' file is found in project to be
packaged.
Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
Remove leading space character before queryformat command.
Remove newline, since repoquery seems to automatically
include them, and remove double quotes since they are
printed in the output.
Signed-off-by: Gabi Beyer <gabrielle.n.beyer@intel.com>
Due to pkg_scan being informational as opposed to functional,
do not run pkg_scan file if it would cause breakage.
If /var/lib/rpm does not exist, skip whatrequires execution.
Also, added try statements around both commands in pkg_scan
file. If they reach the except, return from the function and
continue with autospec as normal.
Signed-off-by: Gabi Beyer <gabrielle.n.beyer@intel.com>
Wrap tar -tf command in try-except to print meaningful error message and
exit when tarball is malformed. Error message includes tarball file type
to help with debug.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>