Commit Graph

369 Commits

Author SHA1 Message Date
Arjan van de Ven 6aa47c052d help is a doc 2017-04-21 16:20:28 +00:00
Matthew Johnson 33b98ebaba Add option to add all *.so$ files to lib subpackage
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.
2017-04-18 16:48:08 -07:00
Matthew Johnson 5fd6b5d857 Add proxy exports to %build sections
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.
2017-04-18 10:19:42 -07:00
Victor Rodriguez 75f94a4ced Change /usr/lib64/avx2/ to /usr/lib64/haswell/
This patch is necesary to re autospec packages that build libraries
under /usr/lib64/avx2/ due to new glibc patch:

    x86: Set dl_platform and dl_hwcap from CPU features

With this new patch ld.so will search "haswell" instead of "avx2".

Signed-off-by: Victor Rodriguez <victor.rodriguez.bahena@intel.com>
2017-04-17 17:43:35 +00:00
Matthew Johnson 1807f694f1 Set security_sensitive flag if CVE found during build
If a CVE was patched for the package, at any point in the package's
history, there is a good chance it is a security sensitive package.
Automatically set the security_sensitive flag for the package.
2017-04-17 09:23:09 -07:00
Arjan van de Ven 0ffa45280d don't print empty req 2017-04-16 19:51:09 +00:00
Arjan van de Ven c6b1c8260f fix typo for 32 bit .a files 2017-04-15 17:49:11 +00:00
Arjan van de Ven aa2ee6fb8b more patterns 2017-04-10 16:29:05 +00:00
Arjan van de Ven e60d5a152a even less uploading 2017-04-10 01:58:01 +00:00
Arjan van de Ven 64019601bc we don't want to put all texi files in our license database iether 2017-04-10 01:56:20 +00:00
Arjan van de Ven cdba28cd39 clean up pip scanning and man page scanning 2017-04-09 17:38:18 +00:00
Arjan van de Ven 6c8707f58e two more items for the blacklist 2017-04-08 18:46:02 +00:00
Alex Jaramillo f9ff1e11b1 Adding shasum verification for domain gnome.org
Implemented support for hash verification of packages from
download.gnome.org. This commit includes tests for domain
based verification (pypi ang gnome)
2017-04-06 21:42:26 +00:00
Matthew Johnson 6958fc2d03 tarball: fix bug where variable is referenced before assignment
tarball_prefix is actually a local variable at this scope and must be
initialized before being checked.
2017-04-04 18:20:42 -07:00
Matthew Johnson 2ebf8f3212 Update functional tests for version/name detection changes
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.
2017-04-04 17:30:11 -07:00
Matthew Johnson 1ecdc45959 Convert name argument from list to string
Due to an 'nargs' specification in the argument parser, the name
argument was being read as a list. The list was then always accessed as
name_argument[0] to access the name. This patch removes the 'nargs'
specifier so name is always a string and removes the logic to parse the
list.

If both version and name arguments exist, set them and skip automated
detection. If one is not set, continue with the automated detection
since the URL parsing for both are done together, override at the end.
2017-04-04 17:30:11 -07:00
Matthew Johnson 872a1d1e12 Add command-line version configuration
Autospec is unable to accurately parse every type of URL for the correct
name and version of the package. When this is the case, the detected
version can be overwritten by the --version argument on the command
line.
2017-04-04 17:30:11 -07:00
Matthew Johnson 9ba5bd1e05 Detect 'alpha' version similar to 'beta'
Add 'alpha' to acceptable version suffixes and add a test URL to
packageurls.
2017-04-04 12:56:35 -07:00
Matthew Johnson f658ebfc92 Check for build log after mock command
Before attempting to parse the build results, check that the build log
actually exists. If it does not exist, print a fatal error and exit.
This error often occurs on Clear Linux if the user is part of the mock
group.
2017-04-04 12:21:03 -07:00
Arjan van de Ven 81e90d7463 ensure a locales subpackage exists 2017-04-04 13:28:39 +00:00
Arjan van de Ven e51661d3cd *.gir goes into data 2017-04-04 13:19:59 +00:00
Matthew Johnson d08d57b711 Move large lists to config files for better maintainability
Two large lists in the license module moved to configuration files
license_blacklist and license_translations. These files are read in by
the config module and are accessible from there.
2017-04-03 20:36:12 -07:00
Matthew Johnson 1c09a0c5a4 license: Remove manual license detection functions
Instead of manually searching for identifying strings in package
licenses, rely on the configuration file and license server to set the
license information. Remove unit tests that tested these functions.

Convert license_blacklist back to dict for faster lookup times.
2017-04-03 20:36:12 -07:00
Matthew Johnson 0c51d2697c Use Make ${CURDIR} instead of invoking pwd at runtime 2017-04-03 20:36:12 -07:00
Matthew Johnson 5a805b704a Refactor and test the license module
Several changes to the license module including changes to where local
hashes are stored. Tests were added as well. Detailed changes below.

config:
  - Move the license hashes from an internal repo to a config file
    (license_hashes) in autospec.

test_license:
  - Unit tests added
  - Unit test target added to autospec Makefile
  - COPYING_TEST file added with GPL-3.0 text for test purposes

license:
  - scan_for_licenses: separate out search strings from conditional to
    make the code more readable and remove unused parameter (required a
    change to where autospec.py called the function).
  - remove duplicate licenses from license_translation list.
  - convert license_blacklist dict to list (values were unused, it was
    being treated as a list anyways).
  - separate out search strings from code in license_from_copying_hash
    and license_from_doc.
  - move curl code out of `with open(file) as fname:` clause in
    license_from_copying_hash.
2017-04-03 20:36:12 -07:00
Alex Jaramillo f61aecd6ae Cleaning after test
Public key import was not cleanning after running. With this
change the state of the keyring will be reverted to the
original state after the test runs.
2017-04-03 16:07:10 +00:00
Ikey Doherty 85354af4a3 keyring: Import signing key for polkit
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2017-04-03 15:42:20 +01:00
Alex Jaramillo eef4a36662 Adding xrdp Adam Freiberg key 2017-03-31 22:39:00 +00:00
Matthew Johnson 54abe01146 Add sys.exit after print_fatal
This should have been done in a previous commit that added print_fatal
to this function.
2017-03-30 15:29:54 -07:00
Matthew Johnson 20b4d3b0da Discriminate between python3 and python2 files 2017-03-30 15:29:54 -07:00
Matthew Johnson d497f7e2cb files: general cleanup of module
The files module was being treated like a class, in that it was
necessary to keep state throughout the entire autospec run. Convert the
files module to a class and make some other general clean ups. This
changed how the files module was instantiated and called by the main
autospec module and other modules such as tarball and config.

Test the files module with unit tests and add the target to the
makefile.
2017-03-28 22:35:11 -07:00
Alberto Murillo 0f01471d6e Translate backports.ssl-match-hostname to backports.ssl_match_hostname
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2017-03-28 11:45:41 -06:00
Arjan van de Ven 9df68343b4 Xtst pattern 2017-03-27 15:42:37 +00:00
Arjan van de Ven b1ef215b66 add err pattern 2017-03-27 15:18:55 +00:00
Arjan van de Ven 1d52b9d205 add parted 2017-03-27 15:16:13 +00:00
Arjan van de Ven 703bb8cca7 two more patterns 2017-03-22 17:28:13 +00:00
William Douglas 098186cafd Add timeout for get_signature_url
Instead of the default timeout, just wait 5s before timing out in
get_signature_url and handle the exception instead of raising out of the
function.
2017-03-20 17:44:21 +00:00
Arjan van de Ven 61f4767d09 print python requirements from pip data 2017-03-19 01:16:39 +00:00
Alberto Murillo ad39bc2015 Set curl.FOLLOWLOCATION to true on PyPiVerifier.get_info()
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2017-03-17 15:26:03 -06:00
William Douglas 02c5ce782f Test python3 rather than python2
When attempting to test python packages, test the python3 portion rather
than python2 as that is the priority for Clear Linux.

This patch is still bad as we don't detect the minor version of python
in use. I'd appreciate suggestions for improvement.
2017-03-15 18:43:34 +00:00
Matthew Johnson 86eeb86fb7 Only grab prefix from first tarball contents directory
Instead of grabbing the tarball prefix from the first or second line in
the tarball contents, iterate through the lines until a properly formed
line is found. The prefix will usually be grabbed from the first line,
but cases where we have to keep looking are as follows:

tar -tf <tarfile>

name-with-no-trailing-slash
name-with-trailing-slash/README
name-with-trailing-slash/...
...

or

./
./name-with-trailing-slash/README
./name-with-trailing-slash/...
...

In both cases we want "name-with-trailing-slash." If the tarball prefix
cannot be determined, a fatal error will be printed and autospec will
exit.
2017-03-15 18:00:37 +00:00
Arjan van de Ven 5c3aaa8c65 show python2 and python3 separate in pythons subpackage 2017-03-15 00:48:34 +00:00
Matthew Johnson f756d93669 tarball: Fix tar_file path reference
Recent tempfiles change attempted to improve the way paths were
referenced in the tarball module, but this one was missed. Fix the
broken reference, which was breaking some package builds.
2017-03-14 15:54:15 +00:00
Alberto Murillo a5811d1872 Blacklist two more licenses
The following "licenses" where found in ceph package
  - 1.0
  - Version

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2017-03-13 10:11:49 -06:00
Auke Kok 84b2193867 Add musl PGP key. 2017-03-09 13:54:42 -08:00
Matthew Johnson 8384daf05e Use secure temporary directory instead of public
Autospec previously used an unsecure public temporary directory as its
working directory. This patch creates a secure temporary directory only
accessible by the creating user ID.
2017-03-09 11:55:58 -08:00
Matthew Johnson 5580b46e43 Allow http github URLs when parsing for version
This shortcoming was identified when a github package URL was changed to
http from https. The 's' character is made optional when parsing the
github URL and two test cases are added to the packageurl list for
testing.
2017-03-09 11:05:59 -08:00
Miguel Bernal Marin bea5b00f84 license: change print to print_warning
Change print to print_warning when a license is unknown.
2017-03-09 09:35:18 -06:00
Miguel Bernal Marin 69e37e3f1d license: fix exit code when license not found
When a license is not found, autospec return 0 as exit code. This patch
change print to print_fatal and adds sys.exit(1)
2017-03-09 09:28:12 -06:00
Miguel Bernal Marin 1c4a243271 fix exit code when build fail
When a build fail autospec return 0 as exit code. This patch
change the print to print_fatal message and call sys.exit(1)

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2017-03-09 09:06:40 -06:00