-
Notifications
You must be signed in to change notification settings - Fork 785
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
Documentation does not mention Windows binary of Skopeo. #715
Comments
We do test Windows cross-compilation of c/image, so it is probably buildable, but I wouldn’t be at all surprised if Skopeo were a pretty bad Windows citizen (WRT configuration file paths and the like), and not extremely surprised if it were broken due to different path syntax or the like (though there was at least one Windows-based user of the c/image library at one point).
Frankly, making Windows work, and work smoothly, and having everything well documented, would be mostly dependent on someone interested contributing that. We are definitely interested, at least enough not to sabotage that :) , but lack both access and time to do it ourselves. Same for providing pre-built binaries; on Linux it is more or less an intentional choice not to, because a single binary is not portable to various Linuxes; on Windows it might be more practical, but again dependent on someone integrating that into the current build system. |
SO, it very much seems possible. I was able to build a Windows binary just this evening (completely unrelated to @m86194 request). I made a small tweak to the Makefile (created a Windows build target) and it does compile. I will test it out tomorrow at work on a Windows machine and see if its usable. If you are curious about the addition to the Makefile take a look at my fork of this project. |
First of all, please notice I am not requesting a windows build (which would be nice, though) but that the documentation is clearer about what can be expected from a new user coming to the project. (I need a dockerless image mirrorer) because it is slowly showing up in google searches for this kind of utility. I fully understand that you have limited resources and this is to be considered an internal Redhat tool which just happens to be useful to others, instead of a fully funded product. I am just letting you know that people like me want to know this pretty quickly when triaging posibillities. @xphyr this sounds very interesting. If it is usable, I'd like to have a look at it. Thanks. |
Well, first of all this is not an Internal Red Hat Tool. Skopeo is a fully open source project and we welcome it running on any platform. Linux, MAC, Windows ... If we get contributors working on the Windoews and MAC Ports that would be great. The primary developers right now are Linux users and therefore it gets the most attention. We are working to make Podman easier to consume on Windows and MAC, so I don't see a reason why we would not want to get Skopeo easily available on those platforms as well. |
I was able to test the windows binary and it works for what we needed (doing remote inspection of images). From an initial look, I believe the Mac Port and Windows port would be similar in nature, leveraging the "binary-static" targets in the Makefile to eliminate anything that requires CGO or linux only features like brtfs. I will take some additional time over the next few days to try and test the other functionality of the tool on these non-linux OSes. |
Great, thanks for looking into this. |
Over the weekend I tested the functionality of the Windows and OSX builds, using the Make file in my fork and I documented the results in the readme as well. Generally speaking, inspect, copy & delete work, as does the various storage subsystems except those specifically tied to the linux operating system (such as "ostree support"). It looks like this was known for OSX, but not for Windows. If there is interest, I would be happy to work on a binary release process for OSX/Windows so that others could leverage this tool on alternative platforms without the need for installing Go and Make. My first thought would be to either use either:
Please let me know if this is something you would like to accept into the project and I will work on putting it together. |
Yes, I think we are very interested in this. |
Absolutely, thanks for looking into this, @xphyr ! |
I have been able to make relatively few changes to the build process and I now have a travis build that runs against Linux, OSX and Windows and passes all tests successfully. I am now working on how to get travis to create a github "release" so that we can upload a compiled binary for windows and osx. The on-going work is in my fork if anyone is interested in seeing progress or has any feedback. |
Great! Some quick observations looking at that branch (without checking to verify that what I’m talking about is practical right now, it may just be my ignorance):
|
Thanks @mtrmac for the feedback. I agree the multiple build targets was getting a bit much, and I really like your solution. I will look to incorporate this into the work I am doing. |
End of the weekend update, my football team lost, but I was able to clean up the multiple build targets, and make "make" do something much more sane. I am now detecting the need for "containers_image_openpgp" dynamically, similar to the detection of OSTREE, LIBDM and BTRFS tags. This has us back to just "binary-local" and "binary-local-static" targets. I have also backed out the explicit requirement to build static and the BUILD_OS is auto-detected on start, but can be over-ridden for testing purposes. I also had success in publishing a Windows and OSX build binary to my fork. I have done a preliminary test of the Windows binary and it works. If you check my fork under releases you will see a Windows and OSX (darwin) release file for version 0.1.40-xphyr. I am wondering if I should tackle #580 while I am in the Makefile making changes. After reading 580, as well as the comments above about not needing containers should I attempt to strip the container build targets from the Makefile, or do we want to do that as a separate PR (if at all). |
hello all! do you guys still have an interest to use GoReleaser to make the releases? Can I open a PR? |
@sebastianwebber we're interested, @xphyr have you made any further progress? |
hey @TomSweeneyRedHat and @xphyr I added a draft PR but i need some info to finish. |
Hello all, sorry I must be honest, I completely forgot about this. We got a version working for windows for my prior employer using my fork and then I had to move on... my fork is very outdated so I should really go back and take a look at if my make file changes would still work. Using GoReleaser is a good idea and I could take a look at what what @sebastianwebber has put together for it ... the question becomes does the skopeo project want to take on a different build process or stick with "make"... (BTW I am now a Red Hatter (yeah!) so I can hopefully see this through to completion now. ) I think what I need to know is if we want to incorportate fixes for #580 as well as getting a windows build working and getting binary releases out there or not. |
@xphyr welcome to Red Hat! @mtrmac and @vrothberg 's call, but I'd like to stick with make if we can. But if it turns out it's not possible to pull off a windows build that way, I'd not be against a separate build. @xphyr did you want to tackle #580? If not, we probably can twist @parkervanroy 's arm and ask him to take a look. |
and I'll try using Parker's real GitHub handle this time, @ParkerVR. Parker please see the above comment. |
@TomSweeneyRedHat happy to look into this, but I don’t have much bandwidth this week and am moving next week- can get into it after that. |
@TomSweeneyRedHat thanks for the welcome .. who knew a year ago I would be here! I will take a look at both the windows build as well as tackling #580 I have not looked at this in a while, so will take me a few minutes to get back up to speed. I will status this issue later in the week with where I have gotten. |
@ParkerVR Stick to the shortnames work. |
@ashley-cui PTAL |
Related: containers/podman#11809 |
Can this be a batch file or even perhaps an appveyor build definition? |
Does it make any sense to consider moving from the mtrmac/gpgme gpgme wrapper that requires additional native libraries and CGO and instead moving to a native Go implementation? From golang/go#44226:
So possibly:
It'd allow getting away from things like https://github.com/containers/skopeo/blob/4fda005a3e83727c93caa63f014d165ea1fe6cc2/cmd/skopeo/cgo_pthread_ordering_workaround.go Are there any other aspects that rely on CGO? |
for building 64bit version appveyor.yml
|
@lsm5 ^^ Also, it might help to have community builds happening on appveyor to allow for testing Windows, but non-blocking/unreleased. WDYT? |
Yeah, so using the maintained GpgME library to interact with a maintained As for other Go implementations: It’s a code that could be integrated, but a significant subset (by no means all) users that strongly need signatures are also subject to various certification requirements like FIPS 140, which requires clearing of all memory containing private keys after it is no longer used, which is pretty much impossible to do purely in a garbage-collected language like Go, without specific language/compiler/runtime support for that, or without farming the key management to a different-language implementation. I’d guess (without any data at all) that there are quite a lot of Windows users who want Skopeo for the ordinary
containers/storage device-mapper support (probably irrelevant for Windows), the |
I expect it would be a rough experience, because none of the code has been written with any effort to be a good Windows citizen (e.g. use the right locations to store configuration/caches/state), and probably without much knowledge what that even means. With that caveat, if anyone is wiling to test the current state and propose improvements, any help with Windows support would be welcome. |
@xphyr have you made any further progress? could i download a binary file for windows now ? |
I needed a Windows binary on GitHub, so I used the excellent instructions at #715 (comment) to build one, and put it here: https://github.com/gaborcsardi/skopeo/releases It is 64 bit with gpgme. It is just a zip-ped up skopeo directory that contains the required exe and dll files. The only difference to the instructions is that I did I did some very basic testing only. i.e. running a couple of commands against a remote registry. I did run a quick Windows 10 virus scan on it, but the usual disclaimers apply. It is probably better to run the build on your machine for yourself. |
Thanks a lot @gaborcsardi for provided skopeo for windows release!
for additional information
I hope somebody will find this usefull :) |
@mpils Thanks!
|
A friendly reminder that this issue had no activity for 30 days. |
Thanks @gaborcsardi for the Windows version, this save my life 👍 . Any chance to have the latest Skopeo version Windows build on your fork ? |
@PeeZu I just put v1.9.3 at https://github.com/gaborcsardi/skopeo/releases However, this is even less tested than the previous version, so please do let me know if it works for you or not. Thanks! |
Awesome @gaborcsardi ! First usage seems working as expected, thanks ! |
@gaborcsardi So you manually performed these steps? As commented by Rickaro, it might be helpful to set up a Powershell script or a CI defintion: #715 (comment) and contribute this to the project. Even though they might not publish releases, it does show the build artifacts and build state. I am testing with an automated build as provided by @Rickaro, though some changes are needed as Skopeo needs a more recent version of the Go toolset (otherwise it fails on |
I've recently come across spokeo while needing to work with images from hosts without docker runtimes to pull. This is a great utility and part of this requirement is running the tool from a windows host. I've successfully cross compiled from the main branch following @Rickaro 's instructions here: #715 (comment) with gpgme. I'm only using it for the aspect of copy and sync, however I'm not sure what other tests to run to ensure there are issues with the other commands. With the change to stop calling gpgme-config and using CGO overrides (ebc5573) the build failed due to a windows install of gpg4me not including a pkg-config file. I ended up creating one manually. Once the project build, the other issue was that it would try to create invalid windows directories, in this case failing on a colon. We could replace with something like "_" which is what curl does, or perhaps URL encoding (%3A) so the information of what was replaced is retained. I ended up placing this in a runtime check for windows. I didn't spend too much time on coming up with an ideal solution but it worked for now.
All this said, I have some questions:
|
We did a small test with skopeo on Windows, but eventually decided to use different logic to deal with our requirement. An additional binary, built and maintained by us, was not the ideal path forward. So, unfortunately I can not say more than 'it worked', though our testing has been minimal. We might revisit this at some later time, though for now we have concluded and fulfilled our requirement differently. Note: I work on CRC/OpenShift Local (and work on Podman Desktop/podman machine integrations) providing support on multiple platforms. |
Yes, typically. As an alternative, there is some precedent in c/image for using a run-time check based on comparing
Long-term, I’m not much of a fan — it would make it much harder to start using containers (or OCI artifacts) for non-Linux systems in the future. This equally, or perhaps even more, applies to macOS. I appreciate that in a short-term horizon, defaulting the OS of images to copy to Linux is quite convenient. Maybe that can be achieved using a shell alias.
#787 contains some pointers at the implementation mechanism. Those |
That's probably |
I've made a github repo that cross-compiles the non-gpg version, and puts it up in a release. That's sufficient for my needs, but would welcome a PR to build a better version. Does so once a week so it will always keep up to date with releases. https://github.com/passcod/winskopeo |
A quick read of the documentation did not immediately reveal how I got a Windows (10 if that matters) binary of skopeo for me to use against our OpenShift cluster. I do not have Go experience so I didn't just go ahead and build it.
It would be nice if the documentation clearly stated:
Thanks
/Thorbjørn
The text was updated successfully, but these errors were encountered: