-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Reorganize and overhaul Makefile & release archive workflows #9381
Reorganize and overhaul Makefile & release archive workflows #9381
Conversation
Note to me: Confirm OSX and Static build tasks capture release and binary artifacts |
Oof..."homeless" and wrong arch errors 😖 |
1f5a7e4
to
72480d1
Compare
ugh...this is getting out of hand...our
😢 |
6f3fc60
to
1d63ef4
Compare
Cirrus Build tasks are now producing release-ready archives:
|
@mheon PTAL - this fixes the missing OSX zip we noticed during the 3.0 release. I'm a little nervous about the target rename, please let me know if you have a better idea. |
Why do we need the rename, for reference? |
I tried to explain this in the commit message, but it's complex, so I probably failed. I'll try again: Wildcard targets are greedy (match as much as possible), and the order they appear is also significant. Previously, the Since the @edsantiago speaks Makefile fairly well, maybe he has some idea for a simpler solution that gets us our tarballs, zips, msi's, and cross-compiled binaries. Though, fair-warning: this is a rat's nest mapping exercise. |
Update: Had an idea this morning for (perhaps) a better way to tackle this problem. I can start with a vastly simplified Makefile, where all targets simply touch a file. Perhaps this will allow me to re-arrange the targets in such a way so that they all function as intended, without me wanting to gouge out my eyeballs. Then use this as a template for updating the actual Makefile. Ugh...still sounds like it will be quite a bit of work. @mheon is there any pressure to solving this problem in the near-term (e.g. for an important release/branch)? |
Not really? And honestly, even if there were, I can build the OS X binaries myself without altering my own process. This obviously isn't ideal but it does work. |
I feel the context here is important: An extremely long, detailed, manual podman release workflow. Still your're right, there is a "plan b" available, so perhaps this isn't super urgent. Thanks for the input. I'll flip this back to |
A friendly reminder that this PR had no activity for 30 days. |
@cevich what should we do with this PR, it is still in WIP state? |
Yes, still a WIP. I'm procrastinating on it until I finish working on the new get_ci_vm since Makefile is so brain-hurty. I'll resume work here next week most likely. |
Also sort the explicit files by name, since the list is growing. Signed-off-by: Chris Evich <[email protected]>
Signed-off-by: Chris Evich <[email protected]>
Previously this was needed for an automated release process. That automation has long since been removed. Simplify the Makefile by removing the target and references. Signed-off-by: Chris Evich <[email protected]>
Instead of shelling out frequently to resolve the current directory, use the Makefile built-in `$(CURDIR)`. It has the exact same meaning w/in the context of a `Makefile`. Ref.: https://www.gnu.org/software/make/manual/html_node/Quick-Reference.html Signed-off-by: Chris Evich <[email protected]>
Confirmed, the FOO = $(shell echo $$RANDOM)
BAR = one two $(FOO)
BAZ = $(shell echo "$(BAR)" | tee foobarbaz)
target_one:
@echo "This is $@" | tee $@
-cat foobarbaz
target_two:
@echo "This is $(BAZ)" | tee $@
-cat foobarbaz I'll add a comment above the definitions to make this situation more clear. |
An in-line Python script, while flexible, is arguably more complex and less stable than the long-lived `grep`, `awk`, and `printf`. Make use of these simple tools to display a column-aligned table of target and description help output. Also, the first target that appears in a Makefile is considered the default (when no target is specified on the command-line). However, despite it's name, the `default` target was not listed first. Fix this, and redefine "default" target to "all" as intended, instead of "help". Lastly, add a small workaround for a vim syntax-hilighting bug. Signed-off-by: Chris Evich <[email protected]>
Over several years the podman Makefile has become a bloated complex mess. This impedes both debugging and maintenance, besides causing general eye-strain. Fix this by adding a simple navigation/layout guide, to help developers quickly find what's needed. Re-organize the entire file according to the new layout guide. Add section headers that call out the purpose of the encompassed content, and are easy to locate with search-tools. Note: No recipes or definitions have been altered by this commit, only re-arranged. Signed-off-by: Chris Evich <[email protected]>
* Incorporate changes from abandoned containers#9918: Use dedicated `bin` sub-directories for `windows` and `darwin` when building `podman-remote`. The linux flavor remains under `bin` as before. * Fix MacOS Documentation-generation for release-packaging. The `install-podman-remote-%-docs` target requires local execution of `podman-remote`, but it was assuming GOOS=linux. Fix this by dynamically discovering the local OS/architecture type while still permitting cross-building of MacOS binaries under Linux. * Unify temporary directory/file behavior to use a common template. In case of left-over temporary items left in the repository, update the `clean` target accordingly to remove them. * Fix broken podman-remote-static and MacOS release archive targets mismatching the `podman-remote-%` target. Disambiguate this target for all platforms by spelling each out in full, instead of using a wild-card recipe. * Fix Windows-installer target to properly recognize existing output files and not constantly rebuild every time. * Include the podman version number in the Windows-installer target in case a user downloads multiple releases. * Include a subdirectory containing the podman version number for both `tar.gz` and `zip` targets. This prevents users clobbering existing directories when un-archiving from releases. Signed-off-by: Chris Evich <[email protected]>
97de2c1
to
b6b0b6e
Compare
Rebased and force-pushed with all'y'alls suggestions. Hopefully the tests will remain green. |
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.
LGTM, thank you! One test flake (#9751), restarted.
/lgtm |
## TODO(ssbarnea): make version number predictable, it should not change | ||
## on each execution, producing duplicates. |
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.
Should scrape_version()
be exposed to take care of this TODO?
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.
Oh, good catch. I have no idea why specifically that TODO was added, but from the text it seems we could remove it.
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.
This came in by #4601
I looked through contrib/build_rpm.sh
but don't see any references or direct use of hack/get_release_info.sh
or scraping one of the podman-*-release
target filenames.
@ssbarnea is this TODO
in the Makefile package:
target relevant to any of the release targets present in the Makefile or just something internal for the package:
target?
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.
(Let's not hold up this PR for the question...it's not worth re-running all the tests just to remove a TODO
- if necessary).
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cevich, edsantiago, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I hope no major changes come out of this from the behaviour point of view. What happens inside does bot concern me much. I already use and parse that Makefile with https://pypi.org/project/mk/ as I consider it a good model of makefile that exposes/documented its targets. |
Correct, this was my intention for the most part. I don't know anything about
HTH |
@cevich Yeah, nothing to worry. I was able to easily fix it with https://github.com/pycontribs/mk/pull/65/files -- this being the only side effect. In fact it worked quite nice. |
Reviewer Note: The diff here is enormous and likely unwieldy to look at all in one go. I've broken the changes up in stand-alone stages to reduce your eye-strain.