From dbf890f0825b11265f00d60deabc912a21b890b4 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 6 Apr 2016 11:26:44 +0200 Subject: [PATCH] generate manpage with pve-doc-generator, bump version to 4.0-49 --- Makefile | 27 +++++-------- PVE/CLI/pvesm.pm | 99 ------------------------------------------------ changelog.Debian | 6 +++ 3 files changed, 16 insertions(+), 116 deletions(-) diff --git a/Makefile b/Makefile index 80ad454..24405b9 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ RELEASE=4.1 VERSION=4.0 PACKAGE=libpve-storage-perl -PKGREL=48 +PKGREL=49 DESTDIR= PREFIX=/usr @@ -10,7 +10,6 @@ BINDIR=${PREFIX}/bin SBINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/share/man DOCDIR=${PREFIX}/share/doc/${PACKAGE} -PODDIR=${DOCDIR}/pod MAN1DIR=${MANDIR}/man1/ BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/ @@ -22,6 +21,9 @@ GITVERSION:=$(shell cat .git/refs/heads/master) DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb +# this require package pve-doc-generator +export NOVIEW=1 +include /usr/share/pve-doc-generator/pve-doc-generator.mk all: ${DEB} @@ -29,28 +31,18 @@ all: ${DEB} dinstall: deb dpkg -i ${DEB} -%.1.gz: %.1.pod - rm -f $@ - cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@.tmp - mv $@.tmp $@ - -pvesm.1.pod: PVE/CLI/pvesm.pm PVE/Storage.pm - perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_pod_manpage();" >$@.tmp - mv $@.tmp $@ - pvesm.bash-completion: perl -I. -T -e "use PVE::CLI::pvesm; PVE::CLI::pvesm->generate_bash_completions();" >$@.tmp mv $@.tmp $@ .PHONY: install -install: pvesm.1.pod pvesm.1.gz pvesm.bash-completion +install: pvesm.1 pvesm.bash-completion install -d ${DESTDIR}${SBINDIR} install -m 0755 pvesm ${DESTDIR}${SBINDIR} make -C PVE install install -d ${DESTDIR}/usr/share/man/man1 - install -d ${DESTDIR}${PODDIR} - install -m 0644 pvesm.1.gz ${DESTDIR}/usr/share/man/man1/ - install -m 0644 pvesm.1.pod ${DESTDIR}/${PODDIR} + install -m 0644 pvesm.1 ${DESTDIR}/usr/share/man/man1/ + gzip -9 ${DESTDIR}/usr/share/man/man1/pvesm.1 install -m 0644 -D pvesm.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pvesm .PHONY: deb ${DEB} @@ -72,8 +64,9 @@ deb ${DEB}: lintian ${DEB} .PHONY: clean -clean: - rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1.pod *.1.gz *.tmp pvesm.bash-completion +clean: + make cleanup-docgen + rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1 *.tmp pvesm.bash-completion find . -name '*~' -exec rm {} ';' .PHONY: distclean diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm index 771c881..6630f87 100755 --- a/PVE/CLI/pvesm.pm +++ b/PVE/CLI/pvesm.pm @@ -178,102 +178,3 @@ our $cmddef = { }; 1; - -__END__ - -=head1 NAME - -pvesm - PVE Storage Manager - -=head1 SYNOPSIS - -=include synopsis - -=head1 DESCRIPTION - -=head2 Storage pools - -Each storage pool is uniquely identified by its . - -=head3 Storage content - -A storage can support several content types, for example virtual disk -images, cdrom iso images, openvz templates or openvz root directories -(C, C, C, C). - -=head2 Volumes - -A volume is identified by the , followed by a storage type -dependent volume name, separated by colon. A valid looks like: - - local:230/example-image.raw - - local:iso/debian-501-amd64-netinst.iso - - local:vztmpl/debian-5.0-joomla_1.5.9-1_i386.tar.gz - - iscsi-storage:0.0.2.scsi-14f504e46494c4500494b5042546d2d646744372d31616d61 - -To get the filesystem path for a use: - - pvesm path - - -=head1 EXAMPLES - - # scan iscsi host for available targets - pvesm iscsiscan -portal - - # scan nfs server for available exports - pvesm nfsscan - - # add storage pools - pvesm add - pvesm add dir --path - pvesm add nfs --path --server --export - pvesm add lvm --vgname - pvesm add iscsi --portal --target - - # disable storage pools - pvesm set --disable 1 - - # enable storage pools - pvesm set --disable 0 - - # change/set storage options - pvesm set - pvesm set --shared 1 - pvesm set local --format qcow2 - pvesm set --content iso - - # remove storage pools - does not delete any data - pvesm remove - - # alloc volumes - pvesm alloc [--format ] - - # alloc 4G volume in local storage - use auto generated name - pvesm alloc local '' 4G - - # free volumes (warning: destroy/deletes all volume data) - pvesm free - - # list storage status - pvesm status - - # list storage contents - pvesm list [--vmid ] - - # list volumes allocated by VMID - pvesm list --vmid - - # list iso images - pvesm list --iso - - # list openvz templates - pvesm list --vztmpl - - # show filesystem path for a volume - pvesm path - -=include pve_copyright diff --git a/changelog.Debian b/changelog.Debian index 96949b8..943e8e3 100644 --- a/changelog.Debian +++ b/changelog.Debian @@ -1,3 +1,9 @@ +libpve-storage-perl (4.0-49) unstable; urgency=medium + + * generate manpage with pve-doc-generator + + -- Proxmox Support Team Wed, 06 Apr 2016 11:24:32 +0200 + libpve-storage-perl (4.0-48) unstable; urgency=medium * zfs_parse_zvol_list: simplify regex