Skip to content

[gpg-error, libassuan] update versions, add native Windows support#26433

Closed
wrobelda wants to merge 55 commits intomicrosoft:masterfrom
wrobelda:gpgerror_assuan_msvc
Closed

[gpg-error, libassuan] update versions, add native Windows support#26433
wrobelda wants to merge 55 commits intomicrosoft:masterfrom
wrobelda:gpgerror_assuan_msvc

Conversation

@wrobelda
Copy link
Copy Markdown
Contributor

@wrobelda wrobelda commented Aug 19, 2022

This is a re-spin of #20447, plus additional work:

  • gpg-error: Replaces usage of SMP fork with a vanilla source for Windows builds; updates to 1.45
  • assuan: Adds support for building on Windows with vanilla source; updates to 2.5.5
  • shiftmedia-libgcrypt: SMP fork doesn't support arm/arm64 builds, update the manifest accordingly

TODO:

  • Depends on [windres-rc] support --define, --include-dir #26454

  • gpg-error: doesn't support cross-compiling.See https://dev.gnupg.org/T5687 for the reference, and the https://github.com/gpg/libgpg-error/blob/master/README#L119 linked there. actually, it only requires mkheader tool from host package to work.

  • gpg-error: UWP doesn't compile right now, errors below. Looking at MSDN (e.g https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-sethandleinformation), they all seems to be WIN32 API only, yet oddly enough, SMP builds it just fine under UWP, without any apparent quirks — that is outside of the SMP.patch, which we also use. What gives?

    .././../src/8c47a9dea1-5df8669d00.clean/src/spawn-w32.c(267): error C2065: 'HANDLE_FLAG_INHERIT': undeclared identifier
    .././../src/8c47a9dea1-5df8669d00.clean/src/spawn-w32.c(271): error C2065: 'HANDLE_FLAG_INHERIT': undeclared identifier
    .././../src/8c47a9dea1-5df8669d00.clean/src/spawn-w32.c(546): error C2065: 'STARTF_USESTDHANDLES': undeclared identifier
    .././../src/8c47a9dea1-5df8669d00.clean/src/spawn-w32.c(546): error C2065: 'STARTF_USESHOWWINDOW': undeclared identifier
    .././../src/8c47a9dea1-5df8669d00.clean/src/spawn-w32.c(620): error C2065: 'ASFW_ANY': undeclared identifier
    .././../src/8c47a9dea1-5df8669d00.clean/src/spawn-w32.c(675): error C2065: 'STARTF_USESTDHANDLES': undeclared identifier
    .././../src/8c47a9dea1-5df8669d00.clean/src/spawn-w32.c(675): error C2065: 'STARTF_USESHOWWINDOW': undeclared identifier
    .././../src/8c47a9dea1-5df8669d00.clean/src/spawn-w32.c(863): error C2065: 'STARTF_USESHOWWINDOW': undeclared identifier
    
  • libassuan: the environ.patch resorts to using https://docs.microsoft.com/en-us/cpp/c-runtime-library/environ-wenviron, which has no support on UWP. A better fix would be to get rid of assuan's own setenv and resort to gnulib's.

  • Which triplets are supported/not supported? Have you updated the [CI baseline]

    All, except UWP. See above for details.

  • Does your PR follow the maintainer guide?

    Yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

    Yes

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for libgpg-error have changed but the version was not updated
version: 1.45
old SHA: 4161b1127ec34f0af0f925b1f725e41df9705e3e
new SHA: 90baa0af27508dd22a87e919f962e0012a6f075e
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for libgpg-error have changed but the version was not updated
version: 1.45
old SHA: 4161b1127ec34f0af0f925b1f725e41df9705e3e
new SHA: 90baa0af27508dd22a87e919f962e0012a6f075e
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***
error: checked-in files for libassuan have changed but the version was not updated
version: 2.5.3#4
old SHA: cf0ffd2dfbb239d338524fc0ea59311a869144c0
new SHA: c0b8f9db06ac5ed669ac3e2fcdf73a1e98e6eb64
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

@wrobelda wrobelda force-pushed the gpgerror_assuan_msvc branch from 428e613 to e4325ac Compare August 21, 2022 18:15
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for libgpg-error have changed but the version was not updated
version: 1.45
old SHA: 4161b1127ec34f0af0f925b1f725e41df9705e3e
new SHA: 90baa0af27508dd22a87e919f962e0012a6f075e
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***
error: checked-in files for libassuan have changed but the version was not updated
version: 2.5.3#4
old SHA: cf0ffd2dfbb239d338524fc0ea59311a869144c0
new SHA: f1b8e54957fd7f1af3ae3dccf5379c7c10fdeb20
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

@wrobelda wrobelda changed the title [libassuan] WIndows support (WIP) [gpg-error, libassuan] WIndows support (WIP) Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for libgpg-error have changed but the version was not updated
version: 1.45
old SHA: 4161b1127ec34f0af0f925b1f725e41df9705e3e
new SHA: 90baa0af27508dd22a87e919f962e0012a6f075e
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

@wrobelda wrobelda changed the title [gpg-error, libassuan] WIndows support (WIP) [gpg-error, libassuan] Windows support (WIP) Aug 21, 2022
github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/libassuan/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Aug 21, 2022
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for libassuan have changed but the version was not updated
version: 2.5.5#4
old SHA: 073fe31fe90bff5522d3488d056968f78545a3d5
new SHA: 593827454a0070433589cc9c403fa96de567fd1d
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

github-actions[bot]
github-actions bot previously approved these changes Aug 23, 2022
@JackBoosY
Copy link
Copy Markdown
Contributor

I saw you have 2 items unresolved?

@wrobelda
Copy link
Copy Markdown
Contributor Author

I saw you have 2 items unresolved?

They both pertain to UWP support. I left them as is, for reference, as adding support for UWP would be too difficult right now. The manifest was updated to reflect lack of UWP support.

In other words, this is ready for inclusion.

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/libassuan/debug/bin/libassuan-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../..")

if(TARGET_TRIPLET STREQUAL HOST_TRIPLET )
vcpkg_copy_tools(TOOL_NAMES mkheader SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we don't need the debug tool?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You mean you'd prefer a release build of that tool to be copied? This is used to generate headers, as in it's a build tool, so I chose a debug one cause I assumed it would be easier for consumers to figure out a compilation problem if they needed to. But that's rather an overkill, so I can copy the release one instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the tools, we only need to install the release version since the user don't need to debug it.


/* This file is processed by configure to create versioninfo.rc */

-#line __LINE__ "versioninfo.rc.in"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we need the upstream approval here.

Copy link
Copy Markdown
Contributor Author

@wrobelda wrobelda Aug 30, 2022

Choose a reason for hiding this comment

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

Why? VS' link.exe cannot process the __LINE__ macro, so it needs to be removed. SMP fork does the same. It's only needed for error messages and debugging anyway, to indicate the line of the code causing error.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

But generally speaking, what do you mean by "upstream approval"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For C/C++ code logic modification, we should submit PR to upstream and get official approval.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

GnuPG does not officially support Windows outside of mingw32 and they are only willing to accept patches that don't otherwise increase their maintenance burden: https://dev.gnupg.org/T6150#162142

I intend to upstream as many of these patches as possible, an example of which is linked to above, but I assume majority simply are not acceptable, as they're too hacky. I don't think there's anything that can be done here.

That having said, this rule seems newish and/or arbitrary, as I and others have contributed muted GnuPG libraries previously and while using a separate fork to build a seemingly-vanilla library was (rightfully) deemed too misleading, building with patches was never questioned. Upstreaming any patches used was merely a nice-to-see, not a requirement. Has anything changed in that regard?

CCing @BillyONeal as well for his input.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, we can accept changes that do not modify the business logic.
However, I hope we try not to add conditions when applying patches, a patch should be common to all triplets.

@@ -0,0 +1,38 @@
--- libassuan.orig/src/mkheader.c 2013-03-15 20:26:09.000000000 +0100
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above.

@@ -0,0 +1,38 @@
diff --git a/src/Makefile.am b/src/Makefile.am
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above.


{ "INPUT", std_handler_input, std_help_input, 0 },
{ "OUTPUT", std_handler_output, std_help_output, 0 },
- { } };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why remove this iteam here? Is the array size changed?

"port-version": 0
},
{
"git-tree": "f1b8e54957fd7f1af3ae3dccf5379c7c10fdeb20",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"git-tree": "f1b8e54957fd7f1af3ae3dccf5379c7c10fdeb20",
"git-tree": "cf0ffd2dfbb239d338524fc0ea59311a869144c0",

Please note that for the json files in versions//.json, we should only add content.

"port-version": 1
},
{
"git-tree": "dbf73da3059248231b38818267251589d2b37b50",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"git-tree": "dbf73da3059248231b38818267251589d2b37b50",
"git-tree": "f69b9722e8207f50879ed85697253223eb014a9c",

@JackBoosY JackBoosY assigned Cheney-W and unassigned JackBoosY Oct 14, 2022
@Cheney-W
Copy link
Copy Markdown
Contributor

Pinging @wrobelda Could you please address the review suggestions and solve this conflict? Thanks!

@Cheney-W
Copy link
Copy Markdown
Contributor

Convert this PR to draft since there is no progress. Please ping us if this PR is ready for review again.

@Cheney-W
Copy link
Copy Markdown
Contributor

Closing this PR since it seems that no progress is being made. Please ping us to reopen if work is still being done.

@Cheney-W Cheney-W closed this Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:port-update The issue is with a library, which is requesting update new revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants