-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
berkeley-db: Build db_dump185 compatibility util #191419
Open
trinitronx
wants to merge
1
commit into
Homebrew:master
Choose a base branch
from
trinitronx:enable-berkeley-db-dump185
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It seems like a huge pain to install this on Linux. Can we just do it on macOS?
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.
Possibly, although then it would not be in feature parity with the already built macOS binaries. From time to time, I find myself on Linux needing some BSD-specific tool (or vice versa). The idea was to keep things working the same across different OS for a better user experience. A big plus!
Also, I did spend a few days doing all the hard work already. 😅 🤷
While it might seem like this at first glance, the simpler-looking alternatives were either not supported 1, or Debian-specific (and hiding complexity). Plus, I figured the policy for Linuxbrew would be to keep things building independently without tying into system dependencies on one distro or another.
This avoids locking to Debian build tools, which would have the usual simpler-looking
apt-get build-dep ...
,apt-get source ...
,debuild
method 2. Otherwise, just installingapt-get install libdb1-compat
and building against system libs worked but then again only works on Debian-based distros and creates a build dependency on something outside Homebrew.The usual method on Debian is to unpack the
.orig.tar.gz
and.debian.tar.xz
files and just rundebuild
, which applies all the patches inside the unpackeddebian/patches
directory which came from the*.debian.tar.xz
archive. We could have done that here withsystem
commands and it would look cleaner, but then it would depend on Debian-specific build tools and increase the build dependencies needed.Footnotes
At first, I tried using
↩patch
withapply %W [ ... ]
nested inside theresource
block for the debian source code, simlar to howmytop
does with a top-level.debian.tar.xz
Formulapatch
. However, nesting this to patch anotherresource
didn't appear to be supported in the current Ruby Formulary DSL. Also,patch
only expected a single patch via URL or possibly more via:DATA
with an embedded__END__
section. Although, using that wouldn't be ideal because all patches are already from upstream and we'd need to then duplicate & maintain them in this Formula to use:DATA
. Although it didn't work, it would've looked much simpler if we could nest them like:While this might look simple, it hides complexity and also yields more build dependencies. For example:
debuild
internally applies thedebian/patches
viaquilt push -a
, runsdpkg-buildpackage
and more, hiding all the complexity inside one command. Yet, again this uses more Debian-specific packaging tools internally which increases the build dependency list and locks it into only working on Debian-based distros. ↩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 appreciate that you've done a lot of work here, but keeping this around just isn't very maintainable. Sorry!
If you need
db_dump185
on Linux, I suggest hosting a version of this formula in your own tap.