Bug 257938 - net/bsdec2-image-upload: fix build with libressl >= 3.3.2
Summary: net/bsdec2-image-upload: fix build with libressl >= 3.3.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Colin Percival
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-19 07:01 UTC by Tassilo Philipp
Modified: 2021-08-21 21:15 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (cperciva)


Attachments
tiny #ifdef version check patch (423 bytes, text/plain)
2021-08-19 07:01 UTC, Tassilo Philipp
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tassilo Philipp 2021-08-19 07:01:36 UTC
Created attachment 227318 [details]
tiny #ifdef version check patch

Heya Colin,

libressl 3.3.2 introduced SSL_set_hostflags(), which conflicts with the one you provided in sslreq.c for versions that don't have it. Attached is a patch to fix the build for when using bsdec2-image-upload with libressl >= 3.3.2. Builds fine in poudriere.

The patch is just a tiny #ifdef version check, there might be a better way to test this... dunno.
Comment 1 Colin Percival freebsd_committer freebsd_triage 2021-08-19 19:03:42 UTC
Hi Tassilo,

As it happens, I was planning on updating the port soon; can you open a PR in the upstream repository (https://github.com/cperciva/bsdec2-image-upload), ideally following the same style as I used for SSL_set1_host (i.e. a conditional #define HAVE_SSL_SET_HOSTFLAGS and then wrap the function with an #ifndef)?
Comment 2 Tassilo Philipp 2021-08-19 23:05:24 UTC
Hi,

I can surely work on a better patch, but then probably need to mail it to you or attach it here, if that's fine with you, as I neither have nor plan to have a github account.

Question while here, since you mentioned updating the port (and given you know the EC2 API surely better than I do): would it be a lot of work to support AMI tagging to it? In other words, upload to AWS and have the final AMI on AWS then have a list of tags added to it, on the fly.
Comment 3 Tassilo Philipp 2021-08-19 23:10:34 UTC
(oh yeah, thinking about it, it's true that opening a PR with a patch, here, is not ideal, given you are also the author of the tool.... my bad, didn't think of that)
Comment 4 Colin Percival freebsd_committer freebsd_triage 2021-08-21 21:14:51 UTC
Thanks, fixed!  (Assuming nothing went wrong -- please test version 1.4.4 from the ports tree.)

> Question while here, since you mentioned updating the port (and given you know > the EC2 API surely better than I do): would it be a lot of work to support AMI > tagging to it? In other words, upload to AWS and have the final AMI on AWS then > have a list of tags added to it, on the fly.

It would take a bit of extra code, but it's certainly possible.  Just need to make CopyImage calls after the image is copied around to all the regions.  (Or a single call if the image isn't being copied everywhere.)

That said, I don't think this is something the FreeBSD project would use (nor is it something I have a personal need for) so it's probably not a feature I'll get around to adding any time soon...