Skip to content

Commit

Permalink
Merge pull request #8299 from edsantiago/ci_reenable_manpage_xref
Browse files Browse the repository at this point in the history
[CI:DOCS] Restore man page cross-checker
  • Loading branch information
openshift-merge-robot authored Nov 11, 2020
2 parents 1952420 + b0601cb commit 12dbc1f
Show file tree
Hide file tree
Showing 23 changed files with 55 additions and 43 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,6 @@ docdir:
.PHONY: docs
docs: $(MANPAGES) ## Generate documentation

.PHONE: xref_helpmsgs_manpages
xref_helpmsgs_manpages:
./hack/xref-helpmsgs-manpages

install-podman-remote-%-docs: podman-remote docs $(MANPAGES)
rm -rf docs/build/remote
mkdir -p docs/build/remote
Expand All @@ -405,6 +401,7 @@ install-podman-remote-%-docs: podman-remote docs $(MANPAGES)
.PHONY: man-page-check
man-page-check:
hack/man-page-checker
hack/xref-helpmsgs-manpages

.PHONY: swagger-check
swagger-check:
Expand Down
4 changes: 4 additions & 0 deletions contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ function _run_validate() {
# Confirm compile via prior task + cache
bin/podman --version
bin/podman-remote --version

# FIXME FIXME FIXME: 2020-11-10: remove once Fedora 33 has FindBin
perl -MFindBin -e 0 &>/dev/null || dnf -y install perl-FindBin

make validate # Some items require a build
}

Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-create.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ The initialization time needed for a container to bootstrap. The value can be ex
The maximum time allowed to complete the healthcheck before an interval is considered failed. Like start-period, the
value can be expressed in a time format such as `1m22s`. The default value is `30s`.

**-h**, **--hostname**=*name*
#### **-h**, **--hostname**=*name*

Container host name

Expand Down
8 changes: 4 additions & 4 deletions docs/source/markdown/podman-image-trust.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ Require signature (“signedBy”).
Trust may be updated using the command **podman image trust set** for an existing trust scope.

## OPTIONS
**-h**, **--help**
#### **-h**, **--help**
Print usage statement.

**-f**, **--pubkeysfile**=*KEY1*
#### **-f**, **--pubkeysfile**=*KEY1*
A path to an exported public key on the local system. Key paths
will be referenced in policy.json. Any path to a file may be used but locating the file in **/etc/pki/containers** is recommended. Options may be used multiple times to
require an image be signed by multiple keys. The **--pubkeysfile** option is required for the **signedBy** type.

**-t**, **--type**=*value*
#### **-t**, **--type**=*value*
The trust type for this policy entry.
Accepted values:
**signedBy** (default): Require signatures with corresponding list of
Expand All @@ -59,7 +59,7 @@ Trust may be updated using the command **podman image trust set** for an existin
#### **--raw**
Output trust policy file as raw JSON

**-j**, **--json**
#### **-j**, **--json**
Output trust as JSON for machine parsing

## EXAMPLES
Expand Down
4 changes: 2 additions & 2 deletions docs/source/markdown/podman-images.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Displays locally stored images, their names, and their IDs.

## OPTIONS

**-a**, **--all**
#### **-a**, **--all**

Show all images (by default filter out the intermediate image layers). The default is false.

#### **--digests**

Show image digests

**-f**, **--filter**=*filter*
#### **-f**, **--filter**=*filter*

Filter output based on conditions provided

Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-import.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Note: `:` is a restricted character and cannot be part of the file name.

## OPTIONS

**-c**, **--change**=*instruction*
#### **-c**, **--change**=*instruction*

Apply the following possible instructions to the created image:
**CMD** | **ENTRYPOINT** | **ENV** | **EXPOSE** | **LABEL** | **STOPSIGNAL** | **USER** | **VOLUME** | **WORKDIR**
Expand Down
4 changes: 2 additions & 2 deletions docs/source/markdown/podman-info.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Displays information pertinent to the host, current storage stats, configured co

## OPTIONS

**-D**, **--debug**
#### **-D**, **--debug**

Show additional information

**-f**, **--format**=*format*
#### **-f**, **--format**=*format*

Change output format to "json" or a Go template.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-logs.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ to run containers such as CRI-O, the last started container could be from either

The latest option is not supported on the remote client.

**-n**, **--names**
#### **-n**, **--names**

Output the container name in the log

Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-network-create.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Upon completion of creating the network, Podman will display the path to the new
Disables the DNS plugin for this network which if enabled, can perform container to container name
resolution.

**-d**, **--driver**
#### **-d**, **--driver**

Driver to manage the network (default "bridge"). Currently only `bridge` is supported.

Expand Down
4 changes: 4 additions & 0 deletions docs/source/markdown/podman-play-kube.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ The [username[:password]] to use to authenticate with the registry if required.
If one or both values are not supplied, a command line prompt will appear and the
value can be entered. The password is entered without echo.

#### **--log-driver**=driver

Set logging driver for all created containers.

#### **--network**=*cni networks*

A comma-separated list of the names of CNI networks the pod should join.
Expand Down
10 changes: 7 additions & 3 deletions docs/source/markdown/podman-pod-create.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The image that will be created for the infra container. Default: "k8s.gcr.io/pau

Set a static IP for the pod's shared network.

**-l**, **--label**=*label*
#### **-l**, **--label**=*label*

Add metadata to a pod (e.g., --label com.example.key=value).

Expand All @@ -75,7 +75,7 @@ Read in a line delimited file of labels.

Set a static MAC address for the pod's shared network.

**-n**, **--name**=*name*
#### **-n**, **--name**=*name*

Assign a name to the pod.

Expand All @@ -96,6 +96,10 @@ Set network mode for the pod. Supported values are
- **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
- **port_handler=slirp4netns**: Use the slirp4netns port forwarding.

#### **--network-alias**=strings

Add a DNS alias for the container. When the container is joined to a CNI network with support for the dnsname plugin, the container will be accessible through this name from other containers in the network.

#### **--no-hosts**=**true**|**false**

Disable creation of /etc/hosts for the pod.
Expand All @@ -104,7 +108,7 @@ Disable creation of /etc/hosts for the pod.

Write the pod ID to the file.

**-p**, **--publish**=*port*
#### **-p**, **--publish**=*port*

Publish a port or range of ports from the pod to the host.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-pod-inspect.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ to run pods such as CRI-O, the last started pod could be from either of those me

The latest option is not supported on the remote client.

**-f**, **--format**=*format*
#### **-f**, **--format**=*format*

Change the default output format. This can be of a supported type like 'json'
or a Go template.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-restart.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The latest option is not supported on the remote client.
#### **--running**
Restart all containers that are already in the *running* state.

**-t**, **--time**=*time*
#### **-t**, **--time**=*time*
Timeout to wait before forcibly stopping the container.


Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-run.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ value can be expressed in a time format such as **1m22s**. The default value is

Print usage statement

**-h**, **--hostname**=*name*
#### **-h**, **--hostname**=*name*

Container host name

Expand Down
4 changes: 2 additions & 2 deletions docs/source/markdown/podman-system-connection-add.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The user will be prompted for the remote ssh login password or key file pass phr

## OPTIONS

**-d**, **--default**=*false*
#### **-d**, **--default**=*false*

Make the new destination the default for this user.

Expand All @@ -25,7 +25,7 @@ Path to ssh identity file. If the identity file has been encrypted, Podman promp
If no identity file is provided and no user is given, Podman defaults to the user running the podman command.
Podman prompts for the login password on the remote server.

**-p**, **--port**=*port*
#### **-p**, **--port**=*port*

Port for ssh destination. The default value is `22`.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-system-df.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Show podman disk usage

Pretty-print images using a Go template

**-v**, **--verbose**[=*true|false*]
#### **-v**, **--verbose**[=*true|false*]
Show detailed information on space usage

## EXAMPLE
Expand Down
4 changes: 2 additions & 2 deletions docs/source/markdown/podman-volume-create.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Specify the volume driver name (default local).

Print usage statement

**-l**, **--label**=*label*
#### **-l**, **--label**=*label*

Set metadata for a volume (e.g., --label mykey=value).

**-o**, **--opt**=*option*
#### **-o**, **--opt**=*option*

Set driver specific options.
For the default driver, `local`, this allows a volume to be configured to mount a filesystem on the host.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/markdown/podman-volume-inspect.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Volumes can be queried individually by providing their full name or a unique par

## OPTIONS

**-a**, **--all**
#### **-a**, **--all**

Inspect all volumes.

**-f**, **--format**=*format*
#### **-f**, **--format**=*format*

Format volume output using Go template

Expand Down
4 changes: 2 additions & 2 deletions docs/source/markdown/podman-volume-ls.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ flag. Use the **--quiet** flag to print only the volume names.

## OPTIONS

**-f**, **--filter**=*filter*
#### **-f**, **--filter**=*filter*

Filter volume output.

Expand All @@ -26,7 +26,7 @@ Format volume output using Go template.

Print usage statement.

**-q**, **--quiet**
#### **-q**, **--quiet**

Print volume output in quiet mode. Only print the volume names.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/markdown/podman-volume-prune.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ unused volumes. To bypass the confirmation, use the **--force** flag.

## OPTIONS

**-f**, **--force**
#### **-f**, **--force**

Do not prompt for confirmation.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/markdown/podman-volume-rm.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Volumes can be removed individually by providing their full name or a unique par

## OPTIONS

**-a**, **--all**
#### **-a**, **--all**

Remove all volumes.

**-f**, **--force**
#### **-f**, **--force**

Remove a volume by force.
If it is being used by containers, the containers will be removed first.
Expand Down
2 changes: 1 addition & 1 deletion hack/podman-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function die() {
# the command name but not its description.
function podman_commands() {
$PODMAN help "$@" |\
awk '/^Available Commands:/{ok=1;next}/^Flags:/{ok=0}ok { print $1 }' |\
awk '/^Available Commands:/{ok=1;next}/^Options:/{ok=0}ok { print $1 }' |\
grep .
}

Expand Down
19 changes: 11 additions & 8 deletions hack/xref-helpmsgs-manpages
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ sub podman_help {
unless $subcommand eq 'help'; # 'help' not in man
}
}
elsif ($section eq 'flags') {
elsif ($section eq 'options') {
# Handle '--foo' or '-f, --foo'
if ($line =~ /^\s{1,10}(--\S+)\s/) {
print "> podman @_ $1\n" if $debug;
Expand Down Expand Up @@ -293,7 +293,7 @@ sub podman_man {
elsif ($line =~ /^\#\#\s+(SUB)?COMMANDS/) {
$section = 'commands';
}
elsif ($line =~ /^\#\#/) {
elsif ($line =~ /^\#\#[^#]/) {
$section = '';
}

Expand Down Expand Up @@ -329,12 +329,15 @@ sub podman_man {
}

@most_recent_flags = ();
# Handle any variation of '**--foo**, **-f**'
while ($line =~ s/^\*\*((--[a-z0-9-]+)|(-.))\*\*(,\s+)?//g) {
$man{$1} = 1;

# Keep track of them, in case we see 'Not implemented' below
push @most_recent_flags, $1;
# As of PR #8292, all options are <h4> and anchored
if ($line =~ s/^\#{4}\s+//) {
# Handle any variation of '**--foo**, **-f**'
while ($line =~ s/^\*\*((--[a-z0-9-]+)|(-.))\*\*(,\s+)?//g) {
$man{$1} = 1;

# Keep track of them, in case we see 'Not implemented' below
push @most_recent_flags, $1;
}
}
}
}
Expand Down

0 comments on commit 12dbc1f

Please sign in to comment.