[PATCH] Add help content subpackage (#1072033)

Martin Kolman mkolman at redhat.com
Fri Nov 28 12:02:28 UTC 2014


Add the anaconda-user-help subpackage to host the content
for the built-in help system.

The subpackage is built from a separate tarball that contains the
RHEL7 installation guide and a build script that generates the
Anaconda help content from the installation guide files.

The sub package also has its own version, as it should be eventually
split to a separate package, so that there are no weird version number
jumps once that happens.

The version number is based RHEL version being targeted by the help
content. For example anaconda-user-help-7.1.1 means that it is
targeting RHEL7.1 and that it is the first release of the help content
package for this RHEL version.

Related: rhbz#1072033
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 anaconda.spec.in | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/anaconda.spec.in b/anaconda.spec.in
index 9d06fa1..811428d 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -8,12 +8,15 @@ License: GPLv2+
 Group:   Applications/System
 URL:     http://fedoraproject.org/wiki/Anaconda
 
+%define anacondabuild %{name}-#VERSION#
+%define helpver 7.1.1
 # To generate Source0 do:
 # git clone http://git.fedorahosted.org/git/anaconda.git
 # git checkout -b archive-branch anaconda-%%{version}-%%{release}
 # ./autogen.sh
 # make dist
 Source0: %{name}-%{version}.tar.bz2
+Source1: anaconda-user-help-%{helpver}.tar.gz
 
 # Versions of required components (done so we make sure the buildrequires
 # match the requires versions of things).
@@ -68,6 +71,8 @@ BuildRequires: dbus-devel >= %{dbusver}
 BuildRequires: dbus-python
 BuildRequires: rpm-devel >= %{rpmver}
 BuildRequires: libarchive-devel >= %{libarchivever}
+# required for help content generation
+BuildRequires: python-lxml
 %ifarch %livearches
 BuildRequires: desktop-file-utils
 %endif
@@ -157,6 +162,7 @@ system.
 Summary: Graphical user interface for the Anaconda installer
 Requires: anaconda-core = %{version}-%{release}
 Requires: anaconda-widgets = %{version}-%{release}
+Requires: anaconda-user-help = %{helpver}
 Requires: python-meh-gui >= %{mehver}
 Requires: gnome-icon-theme-symbolic
 Requires: system-logos
@@ -211,8 +217,16 @@ The 'anaconda' dracut module handles installer-specific boot tasks and
 options. This includes driver disks, kickstarts, and finding the anaconda
 runtime on NFS/HTTP/FTP servers or local disks.
 
+%package user-help
+Version: %{helpver}
+Summary: Content for the Anaconda built-in help system
+
+%description user-help
+This package hold the content for the Anaconda built-in help system.
+
 %prep
 %setup -q
+%setup -a 1
 
 %build
 %configure --disable-static \
@@ -220,10 +234,17 @@ runtime on NFS/HTTP/FTP servers or local disks.
            --enable-gtk-doc
 %{__make} %{?_smp_mflags}
 
+# generate content for the help system
+( cd anaconda-user-help-%{helpver} && python prepare_anaconda_help_content.py )
+
 %install
 %{make_install}
 find %{buildroot} -type f -name "*.la" | xargs %{__rm}
 
+# install the help content
+mkdir -p %{buildroot}%{_datadir}/anaconda/help
+cp -r %{_builddir}/%{anacondabuild}/anaconda-user-help-%{helpver}/anaconda_help_content/* %{buildroot}%{_datadir}/anaconda/help
+
 %ifarch %livearches
 desktop-file-install ---dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/liveinst.desktop
 %endif
@@ -299,6 +320,9 @@ update-desktop-database &> /dev/null || :
 %{_prefix}/lib/dracut/modules.d/80%{name}/*
 %{_prefix}/libexec/anaconda/dd_*
 
+%files user-help
+%{_datadir}/anaconda/help/*
+
 %changelog
 * Tue Nov 25 2014 Brian C. Lane <bcl at redhat.com> - 19.31.111-1
 - Fix pylint errors in the last addons.py commit. (clumens)
-- 
1.9.3



More information about the anaconda-patches mailing list