593 Commits
Author SHA1 Message Date
Matthew Johnson 48d17550a7 Release v1.2.0
This release adds several new features:
* Bitbake infile parsing using the --infile flag (see README)
* Support override file for %description section
* Default python pattern now distutils3 instead of distutils23
* Improved Rust/Cargo support
* Improved 32bit make/make_install args support
* Print fingerprint of imported pubkey
* Change default keyring to package repository with fallback the
  autospec repository.
* Improved output

...makes some configuration updates:
* Adds several new public keys
* Adds lines to configure_whitelist
* Adds patterns for failed_patterns

...and makes several fixes as well:
* Print guessed commitmessage as string instead of list
* Fix several issues with catkin support
* Follow redirects by the license server
* Add a couple new URL patterns
* Remove unneeded V and VERBOSE flags for make lines
* Remove no-longer-used functional test suite
* Turn off string interpolation for URLs containing '%'
* Respect [autospec][urlban] for archive URLs

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
v1.2.0
2018-01-18 15:20:26 -08:00
Matthew Johnson 02c63d802c Record imported public key in commit message
When the user chooses to import a public key during the autospec run
display information on that key in the commit message.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-18 15:20:30 -08:00
Matthew Johnson 6593bfb3b5 Change default keyring to package directory
Instead of relying on a centralized keyring that resides in the autospec
repository, make the default keyring the package directory itself. Any
key imports will be to the package repository and will be committed as
part of the automatic autospec commit.

Retain the autospec repo keyring as a fallback keyring when the public
key does not exist in the package repo.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-18 15:20:30 -08:00
Matthew Johnson a7e0d4b53e Add --fingerprint output when importing pubkeys
Fixes #79

Print the key's fingerprint so the user can cross-reference a PGP key
server and make a more informed decision to import the public key.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-18 08:51:18 -08:00
Matthew Johnson 7e28a3a7de Print instructions when not automatically committing
When skipping automatic git commit due to --skip-git flag print a
message informing the user they must commit their changes themselves.

Fixes #89

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-17 17:02:23 -08:00
Matthew Johnson 4b2ca0518b Respect [autospec][urlban] for archive URLs
Fixes #104

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-17 17:02:02 -08:00
Matthew Johnson 4d4ae84553 Add new mappings to failed_commands
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-17 13:43:25 -08:00
Matthew Johnson 56eaaea26c Construct gnome git urls with github
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-17 13:43:08 -08:00
William Douglas 165752000c Add 32bit versions of make/make_install args
Add make32_args and make32_install_args config file handling to allow
specific options to be passed that are specific to the 32bit builds.
2018-01-17 13:42:50 -08:00
William Douglas 4befc85602 Fixups for rust/cargo building
Improve rust/cargo support by:
1) Better handling only toplevel Cargo configuration files for dependency
lookup.
2) Adding runtime requirements for buildreq packages in order to get
dependencies from non directly dependent packages resolved.
3) Add cargo as a buildreq for rust packages to handle the rustc/cargo
split.
4) Add cargo detection from failed_commands.
5) Fix rust source directory destination to not append version in case
the package name already had version information in it.
6) Get name and version information from crates.io package files.
2018-01-16 14:17:09 -08:00
Matthew Johnson 3dd33f1daf Add several new strings to the configure_whitelist
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-12 10:32:56 -08:00
Matthew Johnson 7c3dd04b17 Fix mismatched quotes in specfile write
The intention here is to use the self.cmake_srcdir variable, not print
the literal string to the file...

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-12 10:32:42 -08:00
Matthew Johnson e7b1302768 Check for ConfigParser regressions in all source files
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-11 17:31:49 -08:00
Matthew Johnson 9739ab703a Turn off ConfigParser string interpolation
configparser.ConfigParser attempts to interpolate "%" characters in the
values of the key-value pairs when parsing. This is absolutely unwanted
behavior, especially when parsing URLs such as

<sourceforge url>/joe-editor/files/JOE%20sources/<joe tar>

which cause an uncaught exception.

Turn off interpolation by passing the interpolation=None argument to
ConfigParser.

Add a unit tests to report when ConfigParser(...) is called in the
codebase without setting interpolation to None.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-11 17:24:39 -08:00
Matthew Johnson eb4ba41d37 Remove no-longer-used functional test suite
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>
2018-01-11 14:47:39 -08:00
Matthew Johnson 6cfd31086a Remove remaining VERBOSE make flags
Finish the work of 9bb89743d4 and remove
remaining VERBOSE flags for make. As mentioned in the previous commit
autospec does not parse the verbose output from make, so the flag is not
necessary and causes a considerable slowdown when parsing large build
logs.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-10 16:27:54 -08:00
Matthew Johnson e7fc47f019 Import new public key (Matthew Johnson)
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-10 10:58:59 -08:00
Patrick McCarty 00ae2e0cfb Import new public key (William Douglas)
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-01-10 10:53:33 -08:00
William Douglas 6e5e7f6107 Import new public key FPComplete
This key is needed to verify the signature for 'stack' release
tarballs.
2018-01-03 09:02:26 -08:00
Arzhan Kinzhalin a950d006a4 Add Arzhan Kinzhalin to known signers.
Needed to verify clrtrust release signatures.

pub   rsa2048 2017-10-02 [SC] [expires: 2022-10-01]
      42EE4AEEE3AA6BA74215C289C9D50845DE5519CB
uid           Arzhan Kinzhalin (kai) <arzhan@kinzhalin.com>
uid           Arzhan Kinzhalin (kai) <arzhan.i.kinzhalin@intel.com>
sub   rsa2048 2017-10-02 [E] [expires: 2022-10-01]

Yours faithfully.
2017-12-26 09:53:43 -08:00
Arzhan Kinzhalin a148072bf7 Do not follow location when using HEAD request.
Suffice to get 302 or 200 on HEAD. Subsequent locations may point to
arbitrary servers which may return 403 on HEAD (while allow GET). This
issue happens with releases hosted on github.com, for example.
2017-12-22 16:58:12 -08:00
Leandro Dorileo f718e18275 more catkin patterns
Depending on the dependencies name catkin will break the line or not,
this new patterns will catch more errors.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2017-12-19 13:48:29 -08:00
Matthew Johnson 4bf66cbc4e Change default python buildpattern to distutils3
Change default python buildpattern from distutils23 (both python2 and
python3) to distutils3 (python3 only). This is a step toward deprecating
python2 usage in distro packages. Any packages that rely on python2
should have "distutils23" added to the build_pattern configuration file
to maintain their python2 subpackage (or, preferrably, built with
python3 only as is default).

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2017-12-19 12:10:56 -08:00
Matthew Johnson 9bb89743d4 Remove verbose flag for make line
Autospec does not parse the verbose output from make, so V=1 is not
necessary and slows down autospec build log parsing considerably. If
users want to debug a build at that level they should add the V=1 back
manually.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2017-12-14 15:11:50 -08:00
Leandro Dorileo af19c7e567 add new url pattern
Consider package names with an underscore separator.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2017-12-14 14:50:03 -08:00
Matthew Johnson 4897e3974e Follow redirects from license server
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2017-12-13 14:24:01 -08:00
Leandro Dorileo 28d7fb63c4 catkin: add the detected module (not only the pkgconfig)
We want to add a buildreq of the package providing the detected module'
pkgconfig (-lib/-dev), but, the package providing it will not install
the expected cmake files then make sure we also add it.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2017-12-07 16:45:29 -08:00
Leandro Dorileo 04161a1c24 catkin: add one more catkin failure pattern
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2017-12-07 16:45:29 -08:00
Leandro Dorileo b0f8925c97 catkin: fix issue with CMakeLists.txt parsing
Only try to parse CMakeLists.txt (looking for catkin' deps) only if
the CMakeLists.txt being processed is in the root tarball dir or in
the cmake_srcdir directory. With this we prevent to detect
dependencies on undesired sub components.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2017-12-07 16:45:29 -08:00
Gabi Beyer 77584ce991 Add README information for infile argument
Provide information ahout the infile parser to the README for a
better user experience.

Signed-off-by: Gabi Beyer <Gabib@live.com>
2017-12-06 15:02:32 -08:00
Patrick McCarty 834314211c Import new public key (Thomas Orgis)
This key is needed to verify the signature for 'mpg123' release
tarballs.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2017-12-05 09:01:10 -08:00
Patrick McCarty 9c5f24d17a Support spec %description section override
Resolves #34

In case the user wants to override the base package %description content
autodetected by autospec, add support for a config file named
"description" to provide the content instead.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2017-12-04 14:45:40 -08:00
Matthew Johnson 76a62e0c10 Print commitmessage as a string
commitmessage is a list and is being printed as a string representation
of a list. Join it to a string to the print looks sane.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2017-12-01 14:22:33 -08:00
Patrick McCarty 52f5d0e2ea Add new public key from Andy Wingo
I verified that the fingerprint on this key matches the one listed on
PGP key servers.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2017-12-01 12:27:00 -08:00
Gabi Beyer 7da1d6c9e8 Add infile print statements
Add print statements with the INFILE header to show when a value
from the infile has been incorporated into the autospec build
of a package.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer a904b9869a Logic to write bb tasks to files as comments
Bitbake files contain executable tasks like configure and install.
Additionally, some have operations like append and prepend with
the task names. Scrape these commands, perform the operations and
store them in the dictionary as appropriate.

Then, after updating the specfile, write these patterns, as
comments to their mapped file name.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer 5d4644720c Add request requirement and pass infile dict
To use the infile_dict after the creation of the specfile, it
must be passed into the package function.

Also the requirement request for python is needed.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer 5474ed39d1 fix make check for infile
Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer 953dffd893 Move license to update sooner
Add the license from the recipe file to the spec licenses
prior to the specfile creation, so that tarball analysis
that does not find a license file will get one from the
bitbake file.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer 0ef4314c4d scrape src url from bb and inc file
Get the source url to set the url if one is not passed into
autospec. This allows a user to use an infile file as the
source for the tarball, and prevents them having to manually
find the url. It also requires that the variable PV and ROS_SPN
are replaced with their correct strings (version and name,
respectively).

Changed the name of the infile_parsers.py file to infile_bb_parser
since it is specific to recipe files.

Have string read into lists and joined to fix spacing issues.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer aef3399d10 Refactor to use multiple files and change inputs
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>
2017-11-30 09:07:19 -08:00
Gabi Beyer 07d0d53470 Add update license function and fix comments
Add comments to the update functions (summary, license, build
deps) within the funcion.

Add an update_license function that appends any licenses scraped
from the bb file to the autospec licenses list if they don't
already exist.

Also added unittests for functionality

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer bc7f5a8b51 Update dependencies in specfile from infile
The specfile dependencies are a set, so create a set from the
deps scraped from the bb file, union the two sets, and write
it to the specfile.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer 0a1def5f0b Update specfile summary from infile file
If the specfile doesn't have a summary in the specfile, it
is overwritten by the summary provided by the bitbake recipe.

Signed-off-by: Gabi Beyer <gabib@live.com>
2017-11-30 09:07:19 -08:00
Gabi Beyer 8b0c5439e5 Initial commit for infile parser
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>
2017-11-30 09:07:19 -08:00
Caio Marcelo de Oliveira Filho 25724b09a1 Extra case for name/version extraction with GitHub
In this case, the project uses one GitHub repo to distribute different
packages. The existing extraction rules are not enough

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2017-11-29 17:55:47 -08:00
Matthew Johnson c98571de01 Release v1.1.8
* Add catkin build pattern recognition
* Add configuration file for cmake_srcdir
* Add failed_commands pattern for ldap-dev
* Update README.rst

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
v1.1.8
2017-11-28 15:23:42 -08:00
Matthew Johnson be834de817 Clean up README format
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2017-11-28 15:22:13 -08:00
Matthew Johnson 934269f006 Update README
Update README to latest options and configurations available in
autospec.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2017-11-28 15:22:13 -08:00
Leandro Dorileo 5b152f172e catkin: introduce catkin pattern recognition
Catkin is based on cmake and is a way to package/build modules as a
cmake components. This patch recognizes the patterns and handle the
dependencies, every catkin package provides a package-config descriptor
so it's pretty safe to rely on that.
2017-11-28 15:21:51 -08:00