Created attachment 222823 [details]
patch for build with libressl >= 2.9
thanks for writing bsdec2-image-upload! Attached is a patch that should make the build work with libressl >= 2.9, which introduced SSL_set1_host(), so it's not necessary for bsdec2-image-upload to provide its own implementation, in this case.
I'm afraid my patch is a bit "pragmatic"; I tried to follow the style of matching it to a specific openssl API version as was done in sslreq.c, but 2.9 introduced the mentioned function above, but not SSL_set_hostflags(), both being within the same #if block, so I pragmatically added a libressl specific check :-/
Also, INT_MAX wasn't declared, so I added the needed #include. I'm not sure from which libressl version on this is necessary, though.
Since Colin seems to be maintainer and author, I guess this patch could be merged upstream instead of adding it to the ports' patches..? Sorry, I wasn't sure what to do, there might also be a less hacky way of addressing this, I guess.
Thanks for pointing this out! Can you tell me something about the system you're running where this is needed? I'd like to be able to test the changes I make (which as you note will be in the upstream git repository) before updating the ports tree.
(Also, not entirely relevant here, but I'd love to hear more about how you're using this / what you're doing in EC2 if you're able to share any details. I often find that I'm working more or less blindly, on the basis of "well, this seems like it might be useful to someone, some day" and hearing from actual users can be incredibly helpful!)
Oops, I forgot to share some details on the machine I'm running this on. It's a 12.1/amd64, poudriere build, ports tree from yesterday, with "DEFAULT_VERSIONS+=ssl=libressl" in make.conf. (w/ clang 8.0.1)
When I then created the patch I ran it without poudriere, on a 12.1/amd64 also, same for make.conf. I did look at different libressl versions to poinpoint what I described to v2.9.
(About the off-topic question: no problem! In essence, I migrate a CentOS setup at the dayjob, that builds AMIs locally for servers for a game, uploads them, etc.. And CentOS is officially dead, so there you go. Time has to be spent to migrate anyways, and I'm more of a BSD guy and thus more familiar with it, I migrate it slowly to FreeBSD. Thanks to poudriere-image(8), and tools like yours, I'll replace automatically half of the previous system, etc.. overall less future maintenance. And yeah, the feeling of working more or less blindly, believe me I know what you mean. But hey, tools like this one are useful for others for sure, I certainly appreciate it!)
Created attachment 222835 [details]
update to net/bsdec2-image-upload port
I've made changes to the bsdec2-image-upload upstream, and I've patched the port to use this new version.
Tassilo: Can you verify that the patch (applied to the /usr/ports/net/bsdec2-image-upload directory) works?
Patch seems to apply fine and it builds now with version 1.4 and libressl 3.1.4. Thanks for the quick feedback!
Thanks, committed as ports r566627.