-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brew formula #1275
Brew formula #1275
Conversation
Also: Allow "howard-hinnant-date" for dependency name to address brew-install issue when creating a homebrew formula Make homebrew formula pass brew audit - Sorted the dependencies into the order required by brew audit - Switched to using tarball (not zip) for release runformula.sh: (script to install pistache brew formula) - Allow "--HEAD" as a parameter - Add "skipaudit" option to runformula.sh - Provide/update usage/help message for runformula.sh - Provide --force Option on runformula.sh - Provide specific output regarding which formula file is being copied where. Created brew.yaml (github runner for the brew formula)
bldscripts/gccmacsetup.sh Added this script, which configures gcc on macOS pist_syslog.cc Uses syslog for gcc on macOS. The macOS logging doesn't compile under gcc. Removed some trailing whitespace listener.cc Suppress a warning in openssl/ssl.h that shows up with gcc-on-macOS router.cc Avoid allocating a zero-sized array (not allowed by gcc) http_server_test.cc Explicitly sign a "0" to avoid integer comparison warning Removed some trailing whitespace mime_test.cc Handle a locale exception that can happen with gcc on macOS macos.yaml Fix: Use gccmacsetup.sh in macos.yaml for GCC Builds Convenience Build Scripts (bldscripts/*) - Copied the revised versions from the "windows" branch. This moves the helper scripts (helpers to the main scripts) into a subdirectory "helpers". Merged in the local changes from this branch. Building on macOS.txt: Updated regarding building with GCC fd_utils.cc: Address integer-size warning in fd_utils.cc version.txt Update Version
Newer headers (like pist_strerror_r.h) added to install_headers in /include/pistache/meson.build.
winornix.h, pist_strerror_r.h, pist_strerror_r.cc: Wrap strerror_r for Apple GCC case (Apple GCC defaults to XSI strerror_r, which is not the strerror_r we want). Fixes compile error for GCC on macOS. Also: winornix.h: we wrap errno.h with pst_errno.h in all non-Linux cases. Fixes a compile issue on openBSD.
This reverts commit ace82a6.
There were 4 issues (1 error, 3 warnings) that showed up in the Launchpad Arm-32 build following merge of the Windows-support PR, all to do with integer sign and width conversions. Addressing those issues here.
Building on macOS.txt - Update to reflect brew install Also: pistache.rb updated for latest Pistache version
Void static initialization order fiasco in case an application itself uses statics which depend on the library.
Use strings in include strings definitions to avoid replacements by macros. This solves the issues with errno.h which could have end up in strange include errors, before.
Make sure, that every compilation unit has an include to pist_quote.h where needed. Additionally removed dupplicate includes.
Removed some comment lines that I presume were added during earlier debugging.
* GitHub fully deprecated support for their macOS 12 image as of Dec 3rd 2024 per: actions/runner-images#10721
Allow fallback for httplib on macos and linux even with nofallback On macOS, meson doesn't seem to find cpp-httplib even when cpp-httplib has been installed in the system (i.e. even when cpp-httplib has been installed with brew); I don't know why. This causes a particular issue with Pistache's brew formula, since brew's "std_meson_args", used by the formula, includes "--wrap-mode=nofallback", preventing meson from using our httplib subproject as a fallback (brew wants us to use brew to install each dependency, in preference to using a subproject). We workaround the issue in tests/meson.build by effectively doing the fallback to the cpp-httplib subproject without using meson dependency's "fallback:" option. Plus, follow the above logic on Linux when --wrap-mode=nofallback is set, to enable linuxbrew. Also: - Enable Homebrew to find libcurl on linux - Using release Pistache for the formula Updates after Homebrew Review: pistache.rb: - Correctly identify which dependency are build-only - Add zlib and libcurl as dependencies for linuxbrew - Remove redundant --buildtype=release - Update to Pistache release v0.4.26 runformula.sh: - Drop the copyright+license SPDX message from pistache.rb when copying pistache.rb to homebrew-core folder brew.yaml - Remove macOS-12 from brew.yaml
pist_syslog.cc - There was a duplicate basename_r here, probably a result of an automated merge issue. Removed. rest_server_test.cc rest_swagger_server_test.cc router_test.cc - Suppress gcc "unused-parameter" warning for httplib.h, causing Ubuntu build issue.
Also: Add Comment About GitHub Rate Limit in brew.yaml
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1275 +/- ##
==========================================
+ Coverage 77.34% 77.37% +0.02%
==========================================
Files 57 57
Lines 7659 7664 +5
==========================================
+ Hits 5924 5930 +6
+ Misses 1735 1734 -1 ☔ View full report in Codecov by Sentry. |
README.md
Outdated
@@ -103,7 +107,7 @@ $ sudo apt update | |||
$ sudo apt install libpistache-dev | |||
``` | |||
|
|||
#### Ubuntu PPA (Stable) | |||
### Ubuntu PPA (Stable) | |||
|
|||
Currently there are no stable release of Pistache published into the [stable](https://launchpad.net/~pistache+team/+archive/ubuntu/stable) PPA. However, when that time comes, run the following to install a stable package: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgreatwood, this isn't really an issue you created, but feel free to fix this paragraph to reflect the fact that we now have stable releases in the stable PPA.
Updated README and pushed to the same PR
…On Thu, Dec 26, 2024 at 10:54 AM Kip ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In README.md
<#1275 (comment)>:
> @@ -103,7 +107,7 @@ $ sudo apt update
$ sudo apt install libpistache-dev
```
-#### Ubuntu PPA (Stable)
+### Ubuntu PPA (Stable)
Currently there are no stable release of Pistache published into the [stable](https://launchpad.net/~pistache+team/+archive/ubuntu/stable) PPA. However, when that time comes, run the following to install a stable package:
@dgreatwood <https://github.com/dgreatwood>, this isn't really an issue
you created, but feel free to fix this paragraph to reflect the fact that
we now have stable releases in the stable PPA.
—
Reply to this email directly, view it on GitHub
<#1275 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFMA27HOYHIGH3VGGMASM32HRGFFAVCNFSM6AAAAABUHPLOFGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMRTGQYTSNJVGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
NOTICE: This email and its attachments may contain privileged and
confidential information, only for the viewing and use of the intended
recipient. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, distribution, acting upon, or use of the
information contained in this email and its attachments is strictly
prohibited and that this email and its attachments must be immediately
returned to the sender and deleted from your system. If you received this
email erroneously, please notify the sender immediately. Xage Security,
Inc. and its affiliates will never request personal information (e.g.,
passwords, Social Security numbers) via email. Report suspicious emails to
***@***.*** ***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments :)
.github/workflows/brew.yaml
Outdated
@@ -0,0 +1,91 @@ | |||
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't write this, I do not own copyright on the file :)
I'll look at these :-)
…On Fri, Dec 27, 2024 at 6:37 AM Andrea Pappacoda ***@***.***> wrote:
***@***.**** commented on this pull request.
Two small comments :)
------------------------------
In .github/workflows/brew.yaml
<#1275 (comment)>:
> @@ -0,0 +1,91 @@
+# SPDX-FileCopyrightText: 2022 Andrea Pappacoda
I didn't write this, I do not own copyright on the file :)
------------------------------
In meson.build
<#1275 (comment)>:
> +# howardhinnant/date has several names - look for them, from the most
+# to the least explicit name.
+# In Meson 0.60.0, this can be replaced with a simpler:
+#
+# dependency('howardhinnant-date', 'hinnant-date', 'date')
+#
+date_dep = dependency('howard-hinnant-date', required: false)
+if not date_dep.found()
+ date_dep = dependency('howardhinnant-date', required: false)
+endif
+if not date_dep.found()
+ date_dep = dependency('hinnant-date', required: false)
+endif
+if not date_dep.found()
+ date_dep = dependency('date', fallback: ['hinnant-date', 'date_dep'])
+endif
+
Why is this here? It's the same code as below, and it's only needed if
there's no working stdlib's C++20 chrono library.
—
Reply to this email directly, view it on GitHub
<#1275 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFMA26T6JABQDMOC3OF4OT2HVQ3DAVCNFSM6AAAAABUHPLOFGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMRUGEZDCNRZGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
NOTICE: This email and its attachments may contain privileged and
confidential information, only for the viewing and use of the intended
recipient. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, distribution, acting upon, or use of the
information contained in this email and its attachments is strictly
prohibited and that this email and its attachments must be immediately
returned to the sender and deleted from your system. If you received this
email erroneously, please notify the sender immediately. Xage Security,
Inc. and its affiliates will never request personal information (e.g.,
passwords, Social Security numbers) via email. Report suspicious emails to
***@***.*** ***@***.***>
|
1cfbb4f
to
acf2126
Compare
brew.yaml was commonly hitting a GitHub rate limit by doing unauthenticated GitHub access. We have reduced unauthenticated access in brew.yaml in two ways: 1/ For brew install and test phases, we are providing an access token to brew via the HOMEBREW_GITHUB_API_TOKEN environment variable. We use a fine-grained personal access token restricted to a single repository and with all permissions left on "No Access". and 2/ For brew audit, we cannot use the access token described above - since the brew audit objects to it. So we have simply eliminated doing a brew audit from the workflow. Taken together, these measures seem to be enough to avoid the rate limit issue. homebrew/runformula.sh: Added the "--auditonly" option (but this is not used in the workflow). Also: Update README to Reflect Stable PPA Versions
acf2126
to
a96e084
Compare
This PR adds the Homebrew formula for Pistache to the Pistache source tree. This is the formula used by the popular brew package manager to install Pistache on macOS.
Updated files:
New files: