| Summary: | devtool add fails to create tags when tag.gpgSign is set | ||
|---|---|---|---|
| Product: | [Yocto Project Subprojects] eSDK | Reporter: | 90degs2infty |
| Component: | eSDK | Assignee: | Paul Eggleton <bluelightning> |
| Status: | RESOLVED FIXED | QA Contact: | Francisco Pedraza <francisco.j.pedraza.gonzalez> |
| Severity: | normal | ||
| Priority: | Medium | CC: | ccasciato, randy.macleod, saisneha196 |
| Version: | 4.3.4 | ||
| Target Milestone: | 6.1 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | NEWCOMER | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
Can you send a patch to the list? As an aside, we need to fix the general problem of people's git configs conflicting with the assumptions that devtool needs but that's out of scope for this bug. Bulk move of all unassigned 5.2 medium importance bugs to 5.3. Add the --no-sign to git-tag command. I would like to work on this bug Confirmed fixed in commit b5c84b07b8. Dropping this as no further work needed. Sai, I agree that it's fixed. For next time, some tips / requests: Put a link in such as the one in question: https://git.openembedded.org/openembedded-core/commit/?id=b5c84b07b87eafb4f68f7662b6cf26d8b73e3247 a commit ID assumes that it's oe-core which is usually true. The link makes things easier for anyone who might want confirm the fix. Also, as is the case, here, you can just resolve the defect. People will get an email and re-open it if there's a problem. Other than the automated tests, we don't have a dedicated test team to run QA on each commit. Thanks, ../Randy |
On a fresh install of the eSDK, `devtool add` fails when the user has `tag.gpgSign` enabled in the git config. ``` $ git config --get tag.gpgSign true $ devtool add <some-repo> NOTE: Starting bitbake server... NOTE: Starting bitbake server... INFO: Fetching <some-repo>... WARNING: You are using a local hash equivalence server but have configured an sstate mirror. This will likely mean no sstate will match from the mirror. You may wish to disable the hash equivalence use (BB_HASHSERVE), or use a hash equivalence server alongside the sstate mirror. Loading cache: 100% |##########################################################################################| Time: 0:00:00 Loaded 1844 entries from dependency cache. Parsing recipes: 100% |########################################################################################| Time: 0:00:01 Parsing of 913 .bb files complete (912 cached, 1 parsed). 1845 targets, 61 skipped, 0 masked, 0 errors. Summary: There was 1 WARNING message. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |#####################################################################################| Time: 0:00:00 Sstate summary: Wanted 1 Local 0 Mirrors 0 Missed 1 Current 0 (0% match, 0% complete) NOTE: Executing Tasks NOTE: Tasks Summary: Attempted 3 tasks of which 0 didn't need to be rerun and all succeeded. INFO: Fetching submodules... INFO: Using default source tree path <some-path> NOTE: Reconnecting to bitbake server... NOTE: Retrying server connection (#1)... (06:18:29.073018) NOTE: Reconnecting to bitbake server... NOTE: Reconnecting to bitbake server... NOTE: Retrying server connection (#1)... (06:18:29.073018) NOTE: Retrying server connection (#1)... (06:18:29.073018) NOTE: Starting bitbake server... Traceback (most recent call last): File "/path/to/esdk/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 349, in <module> ret = main() ^^^^^^ File "/path/to/esdk/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 336, in main ret = args.func(args, config, basepath, workspace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/path/to/esdk/layers/build/scripts/lib/devtool/standard.py", line 235, in add setup_git_repo(srctree, args.version, 'devtool', d=tinfoil.config_data) File "/path/to/esdk/layers/build/scripts/lib/devtool/__init__.py", line 234, in setup_git_repo bb.process.run('git tag -f %s' % basetag, cwd=repodir) File "/path/to/esdk/layers/build/bitbake/lib/bb/process.py", line 189, in run raise ExecutionError(cmd, pipe.returncode, stdout, stderr) bb.process.ExecutionError: Execution of 'git tag -f devtool-base' failed with exit code 1: Vim: Error reading input, exiting... Vim: Finished. error: There was a problem with the editor 'nvim'. Please supply the message using either -m or -F option. ``` The reason is - at least to my understanding of git's documentation at [1] - that `git tag` defaults to a lightweight tag only when not asked to sign the tag: > To create a lightweight tag, don’t supply any of the -a, -s, or -m options, just provide a tag name With `tag.gpgSign` being set, git defaults to an annotated tag. This then forces git into asking for a tag message, which in turn breaks `devtool add`'s execution. To fix the issue, simply force git to not sign the commit (I guess auto-generated tags shouldn't be signed anyway) by adding `--no-sign` to above command, i.e. execute `git tag --no-sign -f devtool-base`. See the docs at [2] for additional details. [1] https://git-scm.com/book/en/v2/Git-Basics-Tagging [2] https://git-scm.com/docs/git-tag