WIP: Compile on windows #891

Draft
michael wants to merge 3 commits from michael/garage:mzhang/windows-build into main
First-time contributor

Still WIP, I still need to do some research into how to achieve a similar effect as the permissions-setting part that I commented out, but this now builds on Windows.

I'm going to try to add the Windows node into my Garage cluster to see how it fares.

Something important to note is that on Windows, libpnet requires the additional library npcap for Packet.lib.

I don't know how to automate building any of this yet, but for now I just got rid of the compile errors from unix-specific features

Remaining TODOs:

  • Fix permissions of generated key file
  • Determine file size of mount
Still WIP, I still need to do some research into how to achieve a similar effect as the permissions-setting part that I commented out, but **this now builds on Windows.** I'm going to try to add the Windows node into my Garage cluster to see how it fares. Something important to note is that on Windows, [libpnet] requires the additional library [npcap] for Packet.lib. I don't know how to automate building any of this yet, but for now I just got rid of the compile errors from unix-specific features [libpnet]: https://github.com/libpnet/libpnet [npcap]: https://npcap.com Remaining TODOs: - [ ] Fix permissions of generated key file - [ ] Determine file size of mount
michael added 2 commits 2024-10-21 13:22:52 +00:00
michael added 1 commit 2024-10-21 15:32:40 +00:00
determine windows free disk size
Some checks failed
ci/woodpecker/pr/debug Pipeline failed
9ee1231e5b
michael force-pushed mzhang/windows-build from 9ee1231e5b to 03e954560e 2024-10-21 15:33:49 +00:00 Compare
Author
First-time contributor

The file size thing still frequently reports ? for the windows build. will investigate later

The file size thing still frequently reports `?` for the windows build. will investigate later
Owner

Fix permissions of generated key file

I think we can ignore this on Windows for now. The "correct" solution would probably be to use NT ACLs to restrict read access to the secret key, but I think we can just leave this for later and for now just not do anything particular when running on Windows. Also, it's probably not necessary to set the readonly attribute, we can just skip this and make the code simpler.

> Fix permissions of generated key file I think we can ignore this on Windows for now. The "correct" solution would probably be to use NT ACLs to restrict read access to the secret key, but I think we can just leave this for later and for now just not do anything particular when running on Windows. Also, it's probably not necessary to set the readonly attribute, we can just skip this and make the code simpler.
Owner

Determine file size of mount

We can also keep this for later as an open issue if you want this PR to be merged as is.

> Determine file size of mount We can also keep this for later as an open issue if you want this PR to be merged as is.
Some checks failed
ci/woodpecker/pr/debug Pipeline failed
Required
Details
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u mzhang/windows-build:michael-mzhang/windows-build
git checkout michael-mzhang/windows-build
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#891
No description provided.