summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cirrus.yml2
-rw-r--r--Makefile14
-rw-r--r--README.md4
-rw-r--r--contrib/msi/podman.bat25
-rw-r--r--contrib/msi/podman.wxs5
-rw-r--r--docs/links-to-html.lua5
-rwxr-xr-xdocs/podman-remote.sh105
-rw-r--r--docs/tutorials/README.md8
-rw-r--r--docs/tutorials/mac_client.md (renamed from mac_client.md)0
-rw-r--r--docs/tutorials/remote_client.md (renamed from remote_client.md)4
10 files changed, 153 insertions, 19 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 39275f6db..663fb91b8 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -491,7 +491,7 @@ special_testing_cgroupv2_task:
TEST_REMOTE_CLIENT: true
TEST_REMOTE_CLIENT: false
- timeout_in: 20m
+ timeout_in: 120m
networking_script: '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/networking.sh'
setup_environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
diff --git a/Makefile b/Makefile
index 0dc72ce4d..6734ef1b0 100644
--- a/Makefile
+++ b/Makefile
@@ -165,8 +165,13 @@ podman-remote: .gopathok $(PODMAN_VARLINK_DEPENDENCIES) ## Build with podman on
$(GO_BUILD) $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS) remoteclient" -o bin/$@ $(PROJECT)/cmd/podman
.PHONY: podman.msi
-podman.msi: podman-remote-windows ## Will always rebuild exe as there is no podman-remote-windows.exe target to verify timestamp
- wixl -D VERSION=$(RELEASE_NUMBER) -o bin/podman-v$(RELEASE_NUMBER).msi contrib/msi/podman.wxs
+podman.msi: podman-remote podman-remote-windows docs ## Will always rebuild exe as there is no podman-remote-windows.exe target to verify timestamp
+ rm -rf bin/windows
+ mkdir -p bin/windows
+ docs/podman-remote.sh windows bin/windows docs
+ find bin/windows -print \
+ |wixl-heat --var var.ManSourceDir --component-group ManFiles --directory-ref INSTALLDIR --prefix bin/windows/ >bin/windows/pages.wsx
+ wixl -D VERSION=$(RELEASE_NUMBER) -D ManSourceDir=bin/windows -o podman-v$(RELEASE_NUMBER).msi contrib/msi/podman.wxs bin/windows/pages.wsx
podman-remote-%: .gopathok $(PODMAN_VARLINK_DEPENDENCIES) ## Build podman for a specific GOOS
$(eval BINSFX := $(shell test "$*" != "windows" || echo ".exe"))
@@ -316,8 +321,9 @@ $(MANPAGES): %: %.md .gopathok
docs: $(MANPAGES) ## Generate documentation
-install-podman-remote-docs: docs
- @(cd docs; ./podman-remote.sh ./remote)
+install-podman-remote-docs: podman-remote docs
+ rm -rf docs/remote
+ docs/podman-remote.sh darwin docs/remote docs
man-page-check:
./hack/man-page-checker
diff --git a/README.md b/README.md
index f04dd75d5..4cdccd3a9 100644
--- a/README.md
+++ b/README.md
@@ -102,10 +102,10 @@ includes tables showing Docker commands and their Podman equivalent commands.
**[Tutorials](docs/tutorials)**
Tutorials on using Podman.
-**[Remote Client](remote_client.md)**
+**[Remote Client](https://github.com/containers/libpod/blob/master/docs/tutorials/remote_client.md)**
A brief how-to on using the Podman remote-client.
-**[Basic Setup and Use of Podman in a Rootless environment](https://github.com/containers/libpod/blob/master/docs/tutorials/rootless_tutorial.md)
+**[Basic Setup and Use of Podman in a Rootless environment](https://github.com/containers/libpod/blob/master/docs/tutorials/rootless_tutorial.md)**
A tutorial showing the setup and configuration necessary to run Rootless Podman.
**[Release Notes](RELEASE_NOTES.md)**
diff --git a/contrib/msi/podman.bat b/contrib/msi/podman.bat
index 091c1c4c4..e0c7e1137 100644
--- a/contrib/msi/podman.bat
+++ b/contrib/msi/podman.bat
@@ -3,6 +3,14 @@ setlocal enableextensions
title Podman
+if "%1" EQU "" (
+ goto run_help
+)
+
+if "%1" EQU "/?" (
+ goto run_help
+)
+
:: If remote-host is given on command line -- use it
setlocal enabledelayedexpansion
for %%a in (%*) do (
@@ -39,5 +47,22 @@ set /p user="Please enter the remote user name: "
:run_podman
endlocal
podman-remote-windows.exe %*
+goto end
+
+:run_help
+set run=start "Podman Help" /D "%~dp0" /B
+
+if not "%3" == "" (
+ %run% "podman-%2-%3.html
+ goto end
+)
+
+if not "%2" == "" (
+ %run% "podman-%2.html
+ goto end
+)
+
+%run% "%podman-remote.html"
+goto end
:End
diff --git a/contrib/msi/podman.wxs b/contrib/msi/podman.wxs
index 77c6e2815..ec62a93c5 100644
--- a/contrib/msi/podman.wxs
+++ b/contrib/msi/podman.wxs
@@ -5,6 +5,10 @@
<?error VERSION must be defined via command line argument?>
<?endif?>
+ <?ifndef var.ManSourceDir?>
+ <?define ManSourceDir = "bin/windows" ?>
+ <?endif?>
+
<Product Name="Podman $(var.VERSION)" Id="*" UpgradeCode="696BAB5D-CA1F-4B05-B123-320F245B8D6D" Version="$(var.VERSION)" Language="1033" Manufacturer="Red Hat Inc.">
<Package Id="*" Keywords="Installer" Description="Red Hat's Podman $(var.VERSION) Installer" Comments="Apache 2.0 License" Manufacturer="Red Hat Inc." InstallScope="perMachine" InstallerVersion="100" Compressed="yes"/>
@@ -34,6 +38,7 @@
<Feature Id="Complete" Level="1">
<ComponentRef Id="INSTALLDIR_Component"/>
<ComponentRef Id="MainExecutable"/>
+ <ComponentGroupRef Id="ManFiles"/>
</Feature>
<Icon Id="podman.ico" SourceFile="contrib/msi/podman-logo.ico"/>
diff --git a/docs/links-to-html.lua b/docs/links-to-html.lua
new file mode 100644
index 000000000..74072a9e4
--- /dev/null
+++ b/docs/links-to-html.lua
@@ -0,0 +1,5 @@
+# links-to-html.lua
+function Link(el)
+ el.target = string.gsub(el.target, "%.1.md", ".html")
+ return el
+end
diff --git a/docs/podman-remote.sh b/docs/podman-remote.sh
index db3bb6d50..2f8e76d1b 100755
--- a/docs/podman-remote.sh
+++ b/docs/podman-remote.sh
@@ -1,11 +1,100 @@
-#!/bin/sh
+#!/bin/bash -e
+# Assemble remote man pages for darwin or windows from markdown files
-BREWDIR=$1
-mkdir -p $BREWDIR
-docs() {
-[ -z $1 ] || type="-$1"
-for i in $(podman-remote $1 --help | sed -n '/^Available Commands:/,/^Flags:/p'| sed -e '1d;$d' -e '/^$/d' | awk '{print $1}'); do install podman$type-$i.1 $BREWDIR 2>/dev/null || install links/podman$type-$i.1 $BREWDIR; done
+PLATFORM=$1 ## windows or darwin
+TARGET=$2 ## where to output files
+SOURCES=${@:3} ## directories to find markdown files
+
+PODMAN=${PODMAN:-bin/podman-remote} ## location overridden for testing
+
+function usage() {
+ echo >&2 "$0 PLATFORM TARGET SOURCES..."
+ echo >&2 "PLATFORM: Is either darwin or windows."
+ echo >&2 "TARGET: Is the directory where files will be staged."
+ echo >&2 "SOURCES: Are the directories to source markdown files."
+}
+
+function fail() {
+ echo >&2 -e "$@\n"
+ usage
+ exit 1
+}
+
+case $PLATFORM in
+'darwin')
+ EXT=1
+ PUBLISHER=darwin_fn
+ ;;
+'windows')
+ EXT=1.md
+ PUBLISHER=windows_fn
+ ;;
+'-help')
+ usage
+ exit 0
+ ;;
+*) fail '"darwin" and "windows" are currently the only supported platforms.' ;;
+esac
+
+if [[ -z $TARGET ]]; then
+ fail 'TARGET directory is required'
+fi
+
+if [[ -z $SOURCES ]]; then
+ fail 'At least one SOURCE directory is required'
+fi
+
+if [[ ! -x $PODMAN ]]; then
+ fail "$PODMAN does not exist"
+fi
+
+## darwin_fn copies the markdown page or link to flattened directory
+function darwin_fn() {
+ local markdown=$1
+ local file=$(basename $markdown)
+ local dir=$(dirname $markdown)
+
+ if [[ -f $dir/links/$file ]]; then
+ markdown=$dir/links/$file
+ fi
+ install $markdown $TARGET
+}
+
+## windows_fn converts the markdown page or link to HTML
+function windows_fn() {
+ local markdown=$1
+ local file=$(basename $markdown)
+ local dir=$(dirname $markdown)
+
+ if [[ ! -f $markdown ]]; then
+ local link=$(sed -e 's?.so man1/\(.*\)?\1?' <$dir/links/${file%.md})
+ markdown=$dir/$link.md
+ fi
+ pandoc --ascii --lua-filter=$dir/links-to-html.lua -o $TARGET/${file%.$EXT}.html $markdown
+}
+
+## pub_pages finds and publishes the remote manual pages
+function pub_pages() {
+ local source=$1
+ local publisher=$2
+ for f in $(ls $source/podman-remote*$EXT); do
+ $publisher $f
+ done
+
+ for c in "container" "image" "pod" "volume" ""; do
+ local cmd=${c:+-$c}
+ for s in $($PODMAN $c --help | sed -n '/^Available Commands:/,/^Flags:/p' | sed -e '1d;$d' -e '/^$/d' | awk '{print $1}'); do
+ $publisher $source/podman$cmd-$s.$EXT
+ done
+ done
}
-docs
-for cmd in 'container image pod volume'; do docs $cmd; done
+## walk the SOURCES for markdown sources
+mkdir -p $TARGET
+for s in $SOURCES; do
+ if [[ -d $s ]]; then
+ pub_pages $s $PUBLISHER
+ else
+ echo >&2 "Warning: $s does not exist"
+ fi
+done
diff --git a/docs/tutorials/README.md b/docs/tutorials/README.md
index 5dc01f794..c340d683f 100644
--- a/docs/tutorials/README.md
+++ b/docs/tutorials/README.md
@@ -12,6 +12,10 @@ Learn how to setup Podman and perform some basic commands with the utility.
The steps required to setup rootless Podman are enumerated.
-**[Setup on OS X](https://github.com/containers/libpod/blob/master/mac_client.md)**
+**[Setup on OS X](https://github.com/containers/libpod/blob/master/doc/tutorials/mac_client.md)**
-Special setup for running the Podman remote client on a Mac and connecting to Podman running on a Linux VM are documented \ No newline at end of file
+Special setup for running the Podman remote client on a Mac and connecting to Podman running on a Linux VM are documented
+
+**[Remote Client](https://github.com/containers/libpod/blob/master/doc/tutorials/remote_client.md)**
+
+A brief how-to on using the Podman remote-client.
diff --git a/mac_client.md b/docs/tutorials/mac_client.md
index bf08e8cc1..bf08e8cc1 100644
--- a/mac_client.md
+++ b/docs/tutorials/mac_client.md
diff --git a/remote_client.md b/docs/tutorials/remote_client.md
index be5c918c8..197ff3d26 100644
--- a/remote_client.md
+++ b/docs/tutorials/remote_client.md
@@ -19,8 +19,8 @@ system as a user with privileges to the varlink socket (more on this later).
## Building the remote client
At this time, the remote-client is not being packaged for any distribution. It must be built from
-source. To set up your build environment, see [Installation notes](install.md) and follow the
-section [Building from scratch](install.md#building-from-scratch). Once you can successfully
+source. To set up your build environment, see [Installation notes](https://github.com/containers/libpod/blob/master/install.md) and follow the
+section [Building from scratch](https://github.com/containers/libpod/blob/master/install.md#building-from-scratch). Once you can successfully
build the regular Podman binary, you can now build the remote-client.
```
$ make podman-remote