Skip to content

CI: backport improvements to openssl-3.0 branch - #19500

Closed
thesamesam wants to merge 7 commits into
openssl:openssl-3.0from
thesamesam:backport-ci-3
Closed

thesamesam wants to merge 7 commits into
openssl:openssl-3.0from
thesamesam:backport-ci-3

Conversation

@thesamesam

Copy link
Copy Markdown
Contributor

This backports #18639 and #19450 to the openssl-3.0 branch.

If it's fine with you folks, I'd like to do the same to 1.1.1 too, as ultimately these compilers are being used by distros, so we want to know if something breaks.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#18639)

(cherry picked from commit 6332f4c)
Signed-off-by: Sam James <[email protected]>
Notably, this might have caught openssl#18225, as Clang 14 wasn't - and is not yet
until this commit - in OpenSSL's CI.

It makes sense to ensure CI tests compilers used in newer Linux distributions:
* Fedora 36 ships with GCC 12
* Ubuntu 22.04 ships with Clang 14

We switch from 'ubuntu-latest' (which can change meaning but currently points
to ubuntu-20.04) to ubuntu-20.04 for the older existing compilers, and
ubuntu-22.04 for the newer ones added by this commit.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#18639)

(cherry picked from commit 712c13c)
Signed-off-by: Sam James <[email protected]>
We have to use the PPA provided by LLVM because Clang 15 isn't
officially part of Ubuntu 22.04 (or any other Ubuntu release yet),
see https://apt.llvm.org/ for details.

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#19450)

(cherry picked from commit 75ecda9)
Signed-off-by: Sam James <[email protected]>
The loop never uses the value of 'line'.

Fixes this error with Clang 15:
```
crypto/pem/pem_lib.c:821:14: error: variable 'line' set but not used [-Werror,-Wunused-but-set-variable]
    int len, line, ret = 0, end = 0, prev_partial_line_read = 0, partial_line_read = 0;
             ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#19450)

(cherry picked from commit 71bc497)
Signed-off-by: Sam James <[email protected]>
The loop never uses the value of 'ln'.

Fixes this error with Clang 15:
```
crypto/txt_db/txt_db.c:24:10: error: variable 'ln' set but not used [-Werror,-Wunused-but-set-variable]
    long ln = 0;
         ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#19450)

(cherry picked from commit f9e8e2c)
Signed-off-by: Sam James <[email protected]>
The value of 'l' isn't ever actually used.

Fixes this error with Clang 15:
```
crypto/x509/x_name.c:506:9: error: variable 'l' set but not used [-Werror,-Wunused-but-set-variable]
    int l, i;
        ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#19450)

(cherry picked from commit c713186)
Signed-off-by: Sam James <[email protected]>
The value of 'num_failed_inner' isn't ever used.

Fixes this error with Clang 15:
```
test/testutil/driver.c:341:17: error: variable 'num_failed_inner' set but not used [-Werror,-Wunused-but-set-variable]
            int num_failed_inner = 0;
                ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#19450)

(cherry picked from commit 6a94c58)
Signed-off-by: Sam James <[email protected]>
@t8m t8m added approval: review pending This pull request needs review by a committer approval: otc review pending triaged: bug The issue/pr is/fixes a bug branch: 3.0 Applies to openssl-3.0 branch (EOL) branch: 3.1 Applies to openssl-3.1 (EOL) labels Oct 26, 2022

@t8m t8m left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK for 3.1 and 3.0. IMO we do not want this in 1.1.1. That branch is security-fix only and accommodating compiler changes there is outside of scope for it.

@hlandau hlandau added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Oct 26, 2022
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Oct 27, 2022
@openssl-machine

Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

@thesamesam

Copy link
Copy Markdown
Contributor Author

OK for 3.1 and 3.0. IMO we do not want this in 1.1.1. That branch is security-fix only and accommodating compiler changes there is outside of scope for it.

Thanks. On merge, could you handle doing 3.1 too please (as this PR is for 3.0)? I can make another PR if needed of course, but it should apply cleanly. Just let me know.

@levitte

levitte commented Oct 27, 2022

Copy link
Copy Markdown
Member

I'll attempt the merge now

openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>

(cherry picked from commit 6332f4c)
Signed-off-by: Sam James <[email protected]>

Reviewed-by: Hugo Landau <[email protected]>
(Merged from #19500)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
Notably, this might have caught #18225, as Clang 14 wasn't - and is not yet
until this commit - in OpenSSL's CI.

It makes sense to ensure CI tests compilers used in newer Linux distributions:
* Fedora 36 ships with GCC 12
* Ubuntu 22.04 ships with Clang 14

We switch from 'ubuntu-latest' (which can change meaning but currently points
to ubuntu-20.04) to ubuntu-20.04 for the older existing compilers, and
ubuntu-22.04 for the newer ones added by this commit.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>

(cherry picked from commit 712c13c)
Signed-off-by: Sam James <[email protected]>

Reviewed-by: Hugo Landau <[email protected]>
(Merged from #19500)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
We have to use the PPA provided by LLVM because Clang 15 isn't
officially part of Ubuntu 22.04 (or any other Ubuntu release yet),
see https://apt.llvm.org/ for details.

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit 75ecda9)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
The loop never uses the value of 'line'.

Fixes this error with Clang 15:
```
crypto/pem/pem_lib.c:821:14: error: variable 'line' set but not used [-Werror,-Wunused-but-set-variable]
    int len, line, ret = 0, end = 0, prev_partial_line_read = 0, partial_line_read = 0;
             ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit 71bc497)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
The loop never uses the value of 'ln'.

Fixes this error with Clang 15:
```
crypto/txt_db/txt_db.c:24:10: error: variable 'ln' set but not used [-Werror,-Wunused-but-set-variable]
    long ln = 0;
         ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit f9e8e2c)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
The value of 'l' isn't ever actually used.

Fixes this error with Clang 15:
```
crypto/x509/x_name.c:506:9: error: variable 'l' set but not used [-Werror,-Wunused-but-set-variable]
    int l, i;
        ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit c713186)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
The value of 'num_failed_inner' isn't ever used.

Fixes this error with Clang 15:
```
test/testutil/driver.c:341:17: error: variable 'num_failed_inner' set but not used [-Werror,-Wunused-but-set-variable]
            int num_failed_inner = 0;
                ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit 6a94c58)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)
@levitte

levitte commented Oct 27, 2022

Copy link
Copy Markdown
Member

It cherry-picked cleanly to 3.1


Merged

3.0:

e701d98 CI: add GCC 11
33da0e2 CI: Upgrade to Ubuntu 22.04 to add GCC 12, Clang 13, Clang 14
49c2c81 CI: add Clang 15
15d698d pem: fix -Wunused-but-set-variable
e8c8f6f txt_db: fix -Wunused-but-set-variable
1b85fc8 x509: fix -Wunused-but-set-variable
1cfc95b test: driver: fix -Wunused-but-set-variable

3.1:

259b9dd CI: add GCC 11
8024730 CI: Upgrade to Ubuntu 22.04 to add GCC 12, Clang 13, Clang 14
1462e6f CI: add Clang 15
e556b05 pem: fix -Wunused-but-set-variable
6bfde83 txt_db: fix -Wunused-but-set-variable
551aa3b x509: fix -Wunused-but-set-variable
49e5865 test: driver: fix -Wunused-but-set-variable

@levitte levitte closed this Oct 27, 2022
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>

(cherry picked from commit 6332f4c)
Signed-off-by: Sam James <[email protected]>

Reviewed-by: Hugo Landau <[email protected]>
(Merged from #19500)

(cherry picked from commit e701d98)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
Notably, this might have caught #18225, as Clang 14 wasn't - and is not yet
until this commit - in OpenSSL's CI.

It makes sense to ensure CI tests compilers used in newer Linux distributions:
* Fedora 36 ships with GCC 12
* Ubuntu 22.04 ships with Clang 14

We switch from 'ubuntu-latest' (which can change meaning but currently points
to ubuntu-20.04) to ubuntu-20.04 for the older existing compilers, and
ubuntu-22.04 for the newer ones added by this commit.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>

(cherry picked from commit 712c13c)
Signed-off-by: Sam James <[email protected]>

Reviewed-by: Hugo Landau <[email protected]>
(Merged from #19500)

(cherry picked from commit 33da0e2)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
We have to use the PPA provided by LLVM because Clang 15 isn't
officially part of Ubuntu 22.04 (or any other Ubuntu release yet),
see https://apt.llvm.org/ for details.

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit 75ecda9)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)

(cherry picked from commit 49c2c81)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
The loop never uses the value of 'line'.

Fixes this error with Clang 15:
```
crypto/pem/pem_lib.c:821:14: error: variable 'line' set but not used [-Werror,-Wunused-but-set-variable]
    int len, line, ret = 0, end = 0, prev_partial_line_read = 0, partial_line_read = 0;
             ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit 71bc497)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)

(cherry picked from commit 15d698d)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
The loop never uses the value of 'ln'.

Fixes this error with Clang 15:
```
crypto/txt_db/txt_db.c:24:10: error: variable 'ln' set but not used [-Werror,-Wunused-but-set-variable]
    long ln = 0;
         ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit f9e8e2c)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)

(cherry picked from commit e8c8f6f)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
The value of 'l' isn't ever actually used.

Fixes this error with Clang 15:
```
crypto/x509/x_name.c:506:9: error: variable 'l' set but not used [-Werror,-Wunused-but-set-variable]
    int l, i;
        ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit c713186)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)

(cherry picked from commit 1b85fc8)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
The value of 'num_failed_inner' isn't ever used.

Fixes this error with Clang 15:
```
test/testutil/driver.c:341:17: error: variable 'num_failed_inner' set but not used [-Werror,-Wunused-but-set-variable]
            int num_failed_inner = 0;
                ^
1 error generated.
```

Signed-off-by: Sam James <[email protected]>

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit 6a94c58)
Signed-off-by: Sam James <[email protected]>

(Merged from #19500)

(cherry picked from commit 1cfc95b)
@thesamesam

Copy link
Copy Markdown
Contributor Author

Thanks!

@thesamesam
thesamesam deleted the backport-ci-3 branch October 27, 2022 09:49
@thesamesam thesamesam mentioned this pull request May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: 3.0 Applies to openssl-3.0 branch (EOL) branch: 3.1 Applies to openssl-3.1 (EOL) triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants