Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 20, 2025

This PR addresses the MacOS build issues identified in #132 with minimal, surgical changes to ensure cross-platform compatibility without breaking existing Linux workflows.

Issues Fixed

1. Bash Version Compatibility

MacOS ships with bash 3.2.57 which doesn't support declare -A (associative arrays require bash 4.0+). The scripts used hardcoded /bin/bash shebangs.

Solution: Updated shebangs from #!/bin/bash -eu to #!/usr/bin/env bash with separate set -eu lines, allowing the system to find the appropriate bash version.

2. OpenSSL Download Failures

The OpenSSL download URL redirects from openssl.org to GitHub, but curl wasn't following redirects, causing silent failures.

Solution:

  • Updated URL to use GitHub releases directly: https://github.com/openssl/openssl/releases/download/openssl-${SSL_VERSION}/openssl-${SSL_VERSION}.tar.gz
  • Added --location flag to curl for redirect handling

3. Docker Logging Driver

The default journald logging driver isn't available on MacOS, requiring manual environment variable changes.

Solution: Changed default from journald to json-file in docker-compose, which works universally. Linux users can still set LOG_DRIVER=journald if preferred.

Documentation Updates

  • Added MacOS prerequisites section with bash upgrade instructions
  • Updated logging documentation with examples for both json-file and journald options
  • Provided clear cross-platform usage guidance

Testing

✅ All bash scripts pass syntax validation
✅ Script functions execute correctly with associative arrays
✅ Changes are minimal and focused on actual compatibility issues
✅ No breaking changes to existing workflows

The build should now work seamlessly on both Linux and MacOS without requiring manual file modifications.

Fixes #132.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Contributor Author

Copilot AI commented Aug 20, 2025

@JoshMcCullough 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI and others added 2 commits August 20, 2025 20:01
Co-authored-by: JoshMcCullough <4859660+JoshMcCullough@users.noreply.github.com>
Co-authored-by: JoshMcCullough <4859660+JoshMcCullough@users.noreply.github.com>
Copilot AI changed the title [WIP] Build fails on MacOS Fix build failures on MacOS by addressing cross-platform compatibility issues Aug 20, 2025
Copilot AI requested a review from JoshMcCullough August 20, 2025 20:08
Copilot finished work on behalf of JoshMcCullough August 20, 2025 20:08
Co-authored-by: JoshMcCullough <4859660+JoshMcCullough@users.noreply.github.com>
Copilot AI changed the title Fix build failures on MacOS by addressing cross-platform compatibility issues Fix build failures on MacOS by addressing bash compatibility and OpenSSL download issues Aug 20, 2025
Copilot AI requested a review from JoshMcCullough August 20, 2025 20:52
Copilot finished work on behalf of JoshMcCullough August 20, 2025 20:52
@JoshMcCullough
Copy link
Contributor

@joan7770 please report back here if this resolves the Mac build issues or what work is left to do.

@joan7770
Copy link
Contributor

@JoshMcCullough Builds fine now

@JoshMcCullough JoshMcCullough marked this pull request as ready for review August 20, 2025 22:33
@JoshMcCullough JoshMcCullough merged commit 44d83b8 into master Aug 20, 2025
@JoshMcCullough JoshMcCullough deleted the copilot/fix-132 branch August 20, 2025 22:33
@fitzyjoe
Copy link
Contributor

Very nice, @JoshMcCullough

JoshMcCullough added a commit to w453y/ngx-http-auth-jwt-module that referenced this pull request Sep 17, 2025
…SSL download issues (TeslaGov#153)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoshMcCullough <4859660+JoshMcCullough@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fails on MacOS

4 participants