forked from open-quantum-safe/openssh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a first pass at resolving all of the merge conflicts between the current tip of `OQS-v8` and the `V_9_7_P1` tag in upstream OpenSSH. The merge strategy here differs a bit from previous upstream merges (e.g. PR open-quantum-safe#106 and PR open-quantum-safe#121) where all of the changes were squashed and incorporated into a single commit and applied to the trunk. This is a more typical `git merge` in that we retain both parents and their commit histories. This will make future merges more straightforward by allowing git to notice the shared history and avoid marking these merged commits as conflicting changes. Here's the git-foo used to script the merge and handle the false positives from the "squash merges". ``` oqs_tip=OQS-v8 openssh_release=V_9_7_P1 git merge ${openssh_release} base=`git merge-base ${oqs_tip} ${openssh_release}` for f in `git diff --name-only --diff-filter=U`; do # This fetches all of the commits which touched the file since the merge base # Filter out the two commits for the 8.6 and 8.9 merges since they are technically already incorporated conflicts=$(git log --oneline ${base}..${oqs_tip} -- $f | ggrep -v -P '(1f58edd|f058d3168)') # Check if we have no OQS-OpenSSH conflicts specific if [[ -z ${conflicts} ]]; then echo "$f has no conflicts" # Resolve the conflict by taking the upstream version of the file git checkout --theirs -- $f git add $f else echo "$f has conflicts" echo ${conflicts} # Send all of the OQS diffs to a file to help resolve the merge conflicts for c in `echo ${conflicts} | cut -d ' ' -f1`; do git show $c -- $f >> ~/conflicting_diffs.t done fi done ``` For the remaining conflicts, I went through each file one-by-one with this pseudo-algorithm: 1. Incorporate all changes from both sides that have no direct conflicts. 2. Look for OQS specific changes with conflicts and apply them as-appropriate. 3. Take the upstream version for any remaining conflicts. Callouts from this process: - `sshkey.c` and `sshkey.h` experienced a major refactor upstream that impacted how OQS modified these files. I simply took the upstream versions for now and plan to address the conflict properly in a separate PR. - Kept `README.md` as-is from OQS and applied changes to `README.original.md`. - Took `.depend` from upstream, will update in a subsequent commit. - `version.h` retained the 2022-01 datestamp from OQS, will update this when we're ready to stage a release. - In `ssh-keygen.c` the `OQS_TEMPLATE_FRAGMENT_PRINT_RESOURCE_RECORDS_START` template changed to accept two additional arguments `opts` and `nopts`. I added these in manually for now. To self-check I did the following: - Test build by running `build_openssh.sh` and finding compiler errors. - Run `git diff HEAD V_9_7_P1` to highlight all the changes and assert that all changes were introduced by OQS alone. This last process flagged a handful of issues. Mostly around duplicated code blocks from taking them from previous upstream merges and this current merge and git not noticing it. With that out of the way, I'm reasonably confident that this PR is pretty close to upstream v9.7 with only the changes from OQS applied to it. So after all that, what's working so far? `build_openssh.sh` will build the project but fail to install with some error about unknown key types. What's next? - Properly handle the merge conflicts in `sshkey.(c|h)`. - Regenerate `.depend`. - Fix the impacted OQS templates and regenerate the source. - Cut a new `OQS-v9` branch and update `version.h`.
- Loading branch information
Showing
279 changed files
with
18,225 additions
and
11,728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml) | ||
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml) | ||
[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml) | ||
master : | ||
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:master) | ||
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:master) | ||
[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml?query=branch:master) | ||
[![CIFuzz](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml) | ||
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh) | ||
[![Coverity Status](https://scan.coverity.com/projects/21341/badge.svg)](https://scan.coverity.com/projects/openssh-portable) | ||
|
||
9.4 : | ||
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_4)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_4) | ||
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_4)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_4) | ||
|
||
9.3 : | ||
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_3)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_3) | ||
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_3)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.