mirror of
https://github.com/containers/podman.git
synced 2025-07-04 01:48:28 +08:00
Add gvproxy to Windows packages
Updated build scripts and installer build scripts to include gvproxy.exe. Includes tutorial on setting up a Podman VM with QEMU and gvproxy on Windows. Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
This commit is contained in:
15
Makefile
15
Makefile
@ -477,7 +477,7 @@ $(MANPAGES): %: %.md .install.md2man docdir
|
||||
-e 's/\[\([^]]*\)](http[^)]\+)/\1/g' \
|
||||
-e 's;<\(/\)\?\(a\|a\s\+[^>]*\|sup\)>;;g' \
|
||||
-e 's/\\$$/ /g' $< |\
|
||||
$(GOMD2MAN) -in /dev/stdin -out $(subst source/markdown,build/man,$@)
|
||||
$(GOMD2MAN) -out $(subst source/markdown,build/man,$@)
|
||||
|
||||
.PHONY: docdir
|
||||
docdir:
|
||||
@ -731,7 +731,7 @@ podman-remote-release-%.zip: test/version/version ## Build podman-remote for %=$
|
||||
$(MAKE) $(GOPLAT) podman-remote; \
|
||||
fi
|
||||
if [[ "$(GOOS)" == "windows" ]]; then \
|
||||
$(MAKE) $(GOPLAT) TMPDIR="" win-sshproxy; \
|
||||
$(MAKE) $(GOPLAT) TMPDIR="" win-gvproxy; \
|
||||
fi
|
||||
if [[ "$(GOOS)" == "darwin" ]]; then \
|
||||
$(MAKE) $(GOPLAT) podman-mac-helper;\
|
||||
@ -751,7 +751,7 @@ podman.msi: test/version/version ## Build podman-remote, package for installati
|
||||
podman-v%.msi: test/version/version
|
||||
# Passing explicitly OS and ARCH, because ARM is not supported by wixl https://gitlab.gnome.org/GNOME/msitools/-/blob/master/tools/wixl/builder.vala#L3
|
||||
$(MAKE) GOOS=windows GOARCH=amd64 podman-remote-windows-docs
|
||||
$(MAKE) GOOS=windows GOARCH=amd64 clean-binaries podman-remote podman-winpath win-sshproxy
|
||||
$(MAKE) GOOS=windows GOARCH=amd64 clean-binaries podman-remote podman-winpath win-gvproxy
|
||||
$(eval DOCFILE := docs/build/remote/windows)
|
||||
find $(DOCFILE) -print | \
|
||||
wixl-heat --var var.ManSourceDir --component-group ManFiles \
|
||||
@ -761,16 +761,17 @@ podman-v%.msi: test/version/version
|
||||
-o $@ contrib/msi/podman.wxs $(DOCFILE)/pages.wsx --arch x64
|
||||
|
||||
# Checks out and builds win-sshproxy helper. See comment on GV_GITURL declaration
|
||||
.PHONY: win-sshproxy
|
||||
win-sshproxy: test/version/version
|
||||
.PHONY: win-gvproxy
|
||||
win-gvproxy: test/version/version
|
||||
rm -rf tmp-gv; mkdir tmp-gv
|
||||
(cd tmp-gv; \
|
||||
git init; \
|
||||
git remote add origin $(GV_GITURL); \
|
||||
git fetch --depth 1 origin $(GV_SHA); \
|
||||
git checkout FETCH_HEAD; make win-sshproxy)
|
||||
git checkout FETCH_HEAD; make win-gvproxy win-sshproxy)
|
||||
mkdir -p bin/windows/
|
||||
cp tmp-gv/bin/win-sshproxy.exe bin/windows/
|
||||
cp tmp-gv/bin/gvproxy.exe bin/windows/
|
||||
rm -rf tmp-gv
|
||||
|
||||
.PHONY: package
|
||||
@ -804,6 +805,8 @@ install.remote:
|
||||
$(DESTDIR)$(BINDIR)/podman$(BINSFX)
|
||||
test "${GOOS}" != "windows" || \
|
||||
install -m 755 $(SRCBINDIR)/win-sshproxy.exe $(DESTDIR)$(BINDIR)
|
||||
test "${GOOS}" != "windows" || \
|
||||
install -m 755 $(SRCBINDIR)/gvproxy.exe $(DESTDIR)$(BINDIR)
|
||||
test "${GOOS}" != "darwin" || \
|
||||
install -m 755 $(SRCBINDIR)/podman-mac-helper $(DESTDIR)$(BINDIR)
|
||||
test -z "${SELINUXOPT}" || \
|
||||
|
@ -34,6 +34,9 @@
|
||||
<Component Id="WinSshProxyExecutable" Guid="0DA730AB-2F97-40E8-A8FC-356E88EAA4D2" Win64="Yes">
|
||||
<File Id="4A2AD125-34E7-4BD8-BE28-B2A9A5EDBEB5" Name="win-sshproxy.exe" Source="bin/windows/win-sshproxy.exe" KeyPath="yes"/>
|
||||
</Component>
|
||||
<Component Id="GvProxyExecutable" Guid="1A4A2975-AD2D-44AA-974B-9B343C098333" Win64="Yes">
|
||||
<File Id="0C9BDFB8-1DBD-4E51-BE7B-3F55478DACB7" Name="gvproxy.exe" Source="bin/windows/gvproxy.exe" KeyPath="yes"/>
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
@ -47,6 +50,7 @@
|
||||
<ComponentRef Id="MainExecutable"/>
|
||||
<ComponentRef Id="WinPathExecutable"/>
|
||||
<ComponentRef Id="WinSshProxyExecutable"/>
|
||||
<ComponentRef Id="GvProxyExecutable"/>
|
||||
<ComponentGroupRef Id="ManFiles"/>
|
||||
</Feature>
|
||||
|
||||
|
@ -132,6 +132,7 @@ FetchPanel
|
||||
|
||||
.\build-hooks.bat; ExitOnError
|
||||
SignItem @("artifacts/win-sshproxy.exe",
|
||||
"artifacts/gvproxy.exe",
|
||||
"artifacts/podman.exe",
|
||||
"artifacts/podman-msihooks.dll",
|
||||
"artifacts/podman-wslkerninst.exe")
|
||||
|
@ -29,6 +29,9 @@
|
||||
</Component>
|
||||
<Component Id="WinSshProxyExecutable" Guid="0DA730AB-2F97-40E8-A8FC-356E88EAA4D2" Win64="yes">
|
||||
<File Id="WinSshProxyExecutableFile" Name="win-sshproxy.exe" Source="artifacts/win-sshproxy.exe" KeyPath="yes"/>
|
||||
</Component>
|
||||
<Component Id="GvProxyExecutable" Guid="1A4A2975-AD2D-44AA-974B-9B343C098333" Win64="yes">
|
||||
<File Id="GvProxyExecutableFile" Name="gvproxy.exe" Source="artifacts/gvproxy.exe" KeyPath="yes"/>
|
||||
</Component>
|
||||
<Component Id="GuideHTMLComponent" Guid="8B23C76B-F7D4-4030-8C46-1B5729E616B5" Win64="yes">
|
||||
<File Id="GuideHTMLFile" Name="welcome-podman.html" Source="docs/podman-for-windows.html" KeyPath="yes"/>
|
||||
@ -60,6 +63,7 @@
|
||||
<ComponentRef Id="EnvEntriesComponent"/>
|
||||
<ComponentRef Id="MainExecutable"/>
|
||||
<ComponentRef Id="WinSshProxyExecutable"/>
|
||||
<ComponentRef Id="GvProxyExecutable"/>
|
||||
<ComponentRef Id="GuideHTMLComponent"/>
|
||||
<ComponentGroupRef Id="ManFiles"/>
|
||||
<ComponentGroupRef Id="WSLFeature"/>
|
||||
|
@ -123,8 +123,13 @@ try {
|
||||
Remove-Item -Recurse -Force -Path expand
|
||||
}
|
||||
|
||||
$loc = Get-ChildItem -Recurse -Path . -Name gvproxy.exe
|
||||
if (!$loc) {
|
||||
throw "Could not obtain gvproxy.exe"
|
||||
}
|
||||
|
||||
Write-Host "Copying artifacts"
|
||||
Foreach ($fileName in "win-sshproxy.exe", "podman.exe") {
|
||||
Foreach ($fileName in "gvproxy.exe", "win-sshproxy.exe", "podman.exe") {
|
||||
Copy-Artifact($fileName)
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ SOURCES=${@:3} ## directories to find markdown files
|
||||
# invoked in a cross-compilation environment, so even if PLATFORM=windows
|
||||
# we need an actual executable that we can invoke).
|
||||
if [[ -z "$PODMAN" ]]; then
|
||||
DETECTED_OS=$(env -i HOME="$HOME" PATH="$PATH" go env GOOS)
|
||||
DETECTED_OS=$(env -i HOME="$HOME" PATH="$PATH" GOROOT="$GOROOT" go env GOOS)
|
||||
case $DETECTED_OS in
|
||||
windows)
|
||||
PODMAN=bin/windows/podman.exe ;;
|
||||
|
132
docs/tutorials/qemu-remote-tutorial.md
Normal file
132
docs/tutorials/qemu-remote-tutorial.md
Normal file
File diff suppressed because one or more lines are too long
@ -38,7 +38,7 @@ class Preprocessor():
|
||||
outfile = os.path.splitext(infile)[0]
|
||||
outfile_tmp = outfile + '.tmp.' + str(os.getpid())
|
||||
|
||||
with open(infile, 'r', encoding='utf-8') as fh_in, open(outfile_tmp, 'w', encoding='utf-8') as fh_out:
|
||||
with open(infile, 'r', encoding='utf-8') as fh_in, open(outfile_tmp, 'w', encoding='utf-8', newline='\n') as fh_out:
|
||||
for line in fh_in:
|
||||
# '@@option foo' -> include file options/foo.md
|
||||
if line.startswith('@@option '):
|
||||
@ -71,7 +71,7 @@ class Preprocessor():
|
||||
"""
|
||||
for optionfile in self.used_by:
|
||||
tmpfile = optionfile + '.tmp'
|
||||
with open(optionfile, 'r', encoding='utf-8') as fh_in, open(tmpfile, 'w', encoding='utf-8') as fh_out:
|
||||
with open(optionfile, 'r', encoding='utf-8') as fh_in, open(tmpfile, 'w', encoding='utf-8', newline='\n') as fh_out:
|
||||
fh_out.write("####> This option file is used in:\n")
|
||||
used_by = ', '.join(x for x in self.used_by[optionfile])
|
||||
fh_out.write(f"####> podman {used_by}\n")
|
||||
@ -82,6 +82,7 @@ class Preprocessor():
|
||||
fh_out.write(line)
|
||||
# Compare files; only rewrite if the new one differs
|
||||
if not filecmp.cmp(optionfile, tmpfile):
|
||||
os.unlink(optionfile)
|
||||
os.rename(tmpfile, optionfile)
|
||||
else:
|
||||
os.unlink(tmpfile)
|
||||
|
Reference in New Issue
Block a user