[PATCH] Include help content in the Anaconda tarball
Vratislav Podzimek
vpodzime at redhat.com
Mon Nov 10 07:09:59 UTC 2014
On Fri, 2014-11-07 at 17:48 +0100, Martin Kolman wrote:
> When creating the Anaconda tarball clone the Installation Guide
> repository, run a help processing script (which is part of the repo)
> that generates help content for Anaconda and then include it in the tarball.
>
> It is possible to override the Installation Guide repo URL by creating
> an "installation_guide_repo_url" file in the working directory
> containing the alternative repo URL.
>
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
> Makefile.am | 29 ++++++++++++++++++++++++++---
> data/help/en-US/Makefile.am | 4 ++--
> 2 files changed, 28 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 37a05b5..3edfa49 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -47,6 +47,8 @@ ARCHIVE_TAG = $(PACKAGE_NAME)-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)
> TX_PULL_ARGS = -a --disable-overwrite
> TX_PUSH_ARGS = -s
>
> +INSTALLATION_GUIDE_REPO_URL = git://git.fedorahosted.org/git/docs/install-guide.git
> +
> tag:
> @git tag -s -a -m "Tag as $(ARCHIVE_TAG)" $(ARCHIVE_TAG)
> @echo "Tagged as $(ARCHIVE_TAG)"
> @@ -62,11 +64,11 @@ po-empty:
> exit 1 ; \
> done
>
> -scratch: po-empty
> +scratch: po-empty get-help
> $(MAKE) ARCHIVE_TAG=HEAD dist
> git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
>
> -scratch-bumpver: po-empty
> +scratch-bumpver: po-empty get-help
> @opts="-n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT)" ; \
> if [ ! -z "$(IGNORE)" ]; then \
> opts="$${opts} -i $(IGNORE)" ; \
> @@ -83,7 +85,7 @@ scratch-bumpver: po-empty
> ( cd $(srcdir) && scripts/makebumpver $${opts} ) || exit 1 ; \
> $(MAKE) -C po $(PACKAGE_NAME).pot-update ;
>
> -release:
> +release: get-help
> $(MAKE) dist && $(MAKE) tag && git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
>
> api:
> @@ -188,3 +190,24 @@ runglade:
> GLADE_CATALOG_SEARCH_PATH=$(srcdir)/widgets/glade \
> GLADE_MODULE_SEARCH_PATH=$(builddir)/widgets/src/.libs \
> glade ${GLADE_FILE}
> +
> +
> +# Get content for the Anaconda built-in help system by cloning the
> +# installation guide git repository and running the help processing
> +# script (it is part of the repository).
> +# Once the help content has been generated copy it to our help folder,
> +# so that it can be included in the tarball.
> +# Skip the git clone if the repository already exists but run git pull
> +# to make sure it is up to date. We also clone the repository
> +# without history as it si rather big (>400 MB!), which is quite
> +# an overkill for <100 kB of help conent. :)
> +get-help:
> + if [ ! -d "install-guide" ]; then \
> + if [ -f "installation_guide_repo_url" ]; then \
> + git clone --depth=1 `cat installation_guide_repo_url` ; \
> + else \
> + git clone --depth=1 $(INSTALLATION_GUIDE_REPO_URL) ; \
> + fi ; \
> + fi ; \
> + ( cd install-guide && git pull --rebase && python prepare_anaconda_help_content.py )
> + cp -r install-guide/anaconda_help_content/* $(srcdir)/data/help
> diff --git a/data/help/en-US/Makefile.am b/data/help/en-US/Makefile.am
> index b7aa1bc..b97e343 100644
> --- a/data/help/en-US/Makefile.am
> +++ b/data/help/en-US/Makefile.am
> @@ -17,7 +17,7 @@
> #
> # Author: Martin Kolman <mkolman at redhat.com>
>
> -enplaceholderdir = $(datadir)/anaconda/help/en-US
> -dist_enplaceholder_DATA = FedoraPlaceholder.html FedoraPlaceholderWithLinks.html RHEL7Placeholder.html RHEL7PlaceholderWithLinks.html
> +enhelpcontentdir = $(datadir)/anaconda/help/en-US
> +dist_enhelpcontent_DATA = *.html *.xml
>
> MAINTAINERCLEANFILES = Makefile.in
Looks good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list