The new QtIoVerifier class is largely based on GnomeOrgVerifier.
Also add a unit test for the successful verification case.
(Most of qt package tarballs are large, so I picked the smallest one,
qtspeech, which is 98KB.)
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Keys now must be stored in the individual packages. autospec will import them
there (as opposed to this central locations). Packages were updated with their
current pub keys where possible.
This test suite is extremely hard to keep up-to-date and is no longer as
valuable now that unit tests have been written for much of the code
base. Actual functional testing can be done against package repos
without requiring them to be included in the autospec repository.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Create 3 separate infile files, the infile_handler reads in the
inputs and determnes how to parse them. The --infile argument now
allows a url, file, or directory of files to be passed as the
input. The infile_handler determines that type of input, calls the
correct parser depending on the filetype, and calls the update to
the specfile.
The infile parsers contains the scraping and parsing for all file
types. Currently it scrapes both .bb and .inc files and stores the
data into one dictionary. Because these files are both for recipes
their data corresponds and the .inc file takes presedence.
The infile update spec file udpates aspects of the specfile that
have been scraped and stored into a dict from the infile parsers
file. If there exists a value for ROS_SPN in the .bb file, use that
when replace the ROS_SNP value in the replace PV function.
Signed-off-by: Gabi Beyer <gabib@live.com>
Add --infile argument that takes a url, path, or directory
to a bitbake/recipe file. It scrapes the .bb/.inc file for
configuration data and stores it in a dictionary. This
architecture can be used for multiple file formats.
Also adds some initial unit tests for scraping functionality.
Signed-off-by: Gabi Beyer <gabib@live.com>
Create a mock function that copies files from the testfiles
directory to a tmp directory, when attempting to download
files from the network.
Create a mock function for head_request that returns 404 for
a few specified urls, and 200 for the rest.
The mock calls will allow the functionality of the pkg_integrity
program to be tested and not dependent on networking. Tests will
no longer need to be skipped in travis with the removal of
network dependency.
Removed a few tests that were not specific to pkg_integrity, but
instead were testing the importing and exporting abilities
of the gpg key server.
Added mock as a requirement to the requirements.txt file.
Signed-off-by: Gabi Beyer <gabib@live.com>
The lib_to_so boolean option in options.conf for a specific package
causes files ending with .so to be added to the lib subpackage instead
of the dev subpackage. This is helpful for packages with a plugin
architecture that use .so files as their plugins. Specific examples of
the packages this is helpful for is mesa and elfutils.
Functional tests updated.
A proxy redirect to localhost prevents package builds from accessing the
internet (they will receive a connection refused). Package build access
to the internet is a security issue if successful, and a very long
timeout if the build is behind an actual proxy.
Update the functional tests to reflect this change.
Update functional tests to reflect the recent version and name detection
changes, such as the addition of the [configuration] section of the
options.conf file.
This patch allows users to specify requires_add and requires_ban to
augment the automatic runtime requirement handling.
As part of this change, the handling of python requires has been
modified so that they are managed under generic requires instead of
their own special mechanism. python requires detection was also improved
by adding install_requires section contents when the section is detected
in setup.py.
The primary change aside from python handling is to remove main_requires
handling in files.py and consolidate requires fully in buildreq.py.
Changes have been pushed recently that require testing updates. This
patch updates the configuration file and spec file expectations for the
functional tests.
verify_required requires the package to be verified for the build to
continue. If a package is ever verified, this configuration is
automatically set to prevent future regressions. If a regression does
occur in the future but there is a valid reason, a developer must
manually unset the verify_require flag to build the package. This is a
safety mechanism.
Instead of using the date the configure file was modified, use the UNIX
epoch time for the SOURCE_DATE_EPOCH environment variable. This allows
reproducible package binaries per autospec build.
Functional tests updated to match change and 'unittest' make target
added to ease testing.
The cmake package was reworked to move cmake modules out of the
cmake-dev subpackage. This change just restores autospec to not add
cmake-dev to any cmake pattern's BuildRequires.
Previously we were printing the README.clear contents from the tarball
directory (my fault) instead of the autospec directory. Print from
correct directory and update tests to check output for README.clear
output.
This involves moving the tests to the top-level tests/ directory, adding
a Makefile target (make test_autospec) to run the functional tests, and
adding a tests/README.rst to explain the various testing files and test
structure.