From d1c8ff941aba7f5f85ad22d747d727a52bf87c18 Mon Sep 17 00:00:00 2001 From: Bruno Cornec Date: Fri, 1 Apr 2016 18:19:26 +0200 Subject: [PATCH 1/4] - RPM build needs python-future --- pbconf/pbfilter/rpm.pbf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pbconf/pbfilter/rpm.pbf b/pbconf/pbfilter/rpm.pbf index 5fd5749..22655a0 100644 --- a/pbconf/pbfilter/rpm.pbf +++ b/pbconf/pbfilter/rpm.pbf @@ -14,8 +14,8 @@ filter PBLIC = ASL 2.0 #filter PBDEP = # PBBDEP is replaced by the list of build dependencies -filter PBBDEP = python-devel, python-setuptools, python-pbr, python-sphinx -filter PBDEP = python-docopt, python-tortilla, python-jinja2, python-pbr, python-docopt, python-simplejson +filter PBBDEP = python-devel, python-setuptools, python-pbr, python-sphinx, python-future +filter PBDEP = python-docopt, python-tortilla, python-jinja2, python-pbr, python-simplejson # PBSUF is replaced by the package suffix ($pb->{'suf'} in code) filter PBSUF = $pb->{'suf'} From 993f3f2825f15a146943f729b3a7ee8ddd6bae60 Mon Sep 17 00:00:00 2001 From: Bruno Cornec Date: Sat, 2 Apr 2016 01:24:20 +0200 Subject: [PATCH 2/4] Precise python modules versions needed for RPM build --- pbconf/pbfilter/rpm.pbf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pbconf/pbfilter/rpm.pbf b/pbconf/pbfilter/rpm.pbf index 22655a0..6075b8e 100644 --- a/pbconf/pbfilter/rpm.pbf +++ b/pbconf/pbfilter/rpm.pbf @@ -14,8 +14,8 @@ filter PBLIC = ASL 2.0 #filter PBDEP = # PBBDEP is replaced by the list of build dependencies -filter PBBDEP = python-devel, python-setuptools, python-pbr, python-sphinx, python-future -filter PBDEP = python-docopt, python-tortilla, python-jinja2, python-pbr, python-simplejson +filter PBBDEP = python-devel,python-setuptools,python-pbr >= 0.8,python-sphinx >= 1.3.1,python-future >= 0.15.2 +filter PBDEP = python-docopt >= 0.6.2,python-tortilla >= 0.4.1,python-jinja2 >= 2.7.3,python-pbr >= 0.8,python-simplejson >= 3.8.1 # PBSUF is replaced by the package suffix ($pb->{'suf'} in code) filter PBSUF = $pb->{'suf'} From 04e55914437dc64eea3c22656324646aebe3192b Mon Sep 17 00:00:00 2001 From: Bruno Cornec Date: Sat, 2 Apr 2016 02:03:07 +0200 Subject: [PATCH 3/4] Fix RPM build for 0.3 - Adds entry for management of /var/log/python-redfish by the RPM (not used I think it shouldn't be handled that way) - python-requests >= 2.9.1 is a mandatory installation dep - Removal for now of the python3 compatible line causing problems with setuptools --- install.sh | 11 +++++++++-- pbconf/pbfilter/rpm.pbf | 2 +- pbconf/python-redfish/rpm/python-redfish.spec | 6 ++++-- requirements.txt | 3 ++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 7d4c71e..82770e1 100755 --- a/install.sh +++ b/install.sh @@ -1,22 +1,29 @@ #!/bin/bash -# Syntax: install.sh +# Syntax: install.sh set -x export rootdir=$1 export sitelib=$2 export prefix=$3 -#python setup.py install --skip-build --prefix=$prefix +#export varlog=$4 + python setup.py install --skip-build --root=$rootdir --prefix=$prefix rm -rf $rootdir/$sitelib/redfish/old +# Documentation installation for i in 1; do mkdir -p $rootdir/$prefix/share/man/man$i install -m 644 doc/build/man/*.$i $rootdir/$prefix/share/man/man$i done + install -d 755 $rootdir/$prefix/share/doc/PBPKG/html/_static install -m 644 doc/build/singlehtml/*.html $rootdir/$prefix/share/doc/PBPKG/html install -m 644 doc/build/singlehtml/_static/* $rootdir/$prefix/share/doc/PBPKG/html/_static + # Hardcoded for now to solve the delivery of the conf file still not correct with setup.py mkdir -p $rootdir/etc mv $rootdir/$prefix/etc/redfish-client.conf $rootdir/etc/redfish-client.conf + +# Log files management +#mkdir -p $rootdir/$varlog/PBPKG diff --git a/pbconf/pbfilter/rpm.pbf b/pbconf/pbfilter/rpm.pbf index 6075b8e..8083890 100644 --- a/pbconf/pbfilter/rpm.pbf +++ b/pbconf/pbfilter/rpm.pbf @@ -15,7 +15,7 @@ filter PBLIC = ASL 2.0 # PBBDEP is replaced by the list of build dependencies filter PBBDEP = python-devel,python-setuptools,python-pbr >= 0.8,python-sphinx >= 1.3.1,python-future >= 0.15.2 -filter PBDEP = python-docopt >= 0.6.2,python-tortilla >= 0.4.1,python-jinja2 >= 2.7.3,python-pbr >= 0.8,python-simplejson >= 3.8.1 +filter PBDEP = python-docopt >= 0.6.2,python-tortilla >= 0.4.1,python-jinja2 >= 2.7.3,python-pbr >= 0.8,python-simplejson >= 3.8.1,python-requests >= 2.9.1 # PBSUF is replaced by the package suffix ($pb->{'suf'} in code) filter PBSUF = $pb->{'suf'} diff --git a/pbconf/python-redfish/rpm/python-redfish.spec b/pbconf/python-redfish/rpm/python-redfish.spec index a50760c..6011042 100644 --- a/pbconf/python-redfish/rpm/python-redfish.spec +++ b/pbconf/python-redfish/rpm/python-redfish.spec @@ -23,14 +23,15 @@ PBDESC %build %{__python} setup.py build -# Deal with doc + +# Build minimal documentation cd doc make man make singlehtml make latexpdf %install -./install.sh %{buildroot} %{python_sitelib} %{_prefix} +./install.sh %{buildroot} %{python_sitelib} %{_prefix} #%{_logdir} %files %doc README.rst examples/[a-z]*.py LICENSE @@ -44,5 +45,6 @@ make latexpdf %{python_sitelib}/redfish/tests/*.py* %{python_sitelib}/python_redfish* %{_mandir}/man1/* +#%{_logdir}/PBREALPKG %changelog PBLOG diff --git a/requirements.txt b/requirements.txt index 14b281f..d38b06a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,8 @@ Jinja2>=2.7.3 Sphinx>=1.2.3 docopt>=0.6.2 simplejson>=3.8.1 +requests>=2.9.1 # Python3 compat future>=0.15.2 -configparser>=3.3.0; python_version < '3' +#configparser>=3.3.0; python_version < '3' From f876aa6711e03632b8bcf68378e7a83b3279675a Mon Sep 17 00:00:00 2001 From: Bruno Cornec Date: Mon, 4 Apr 2016 19:35:03 +0200 Subject: [PATCH 4/4] New version of PR #38 - Put back python funny syntax in requirements.txt - Create a PB macro (for now in all.pbf) to alter the requirements.txt to remove the funny python syntax --- pbconf/pbfilter/all.pbf | 1 + pbconf/python-redfish/rpm/python-redfish.spec | 2 ++ requirements.txt | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pbconf/pbfilter/all.pbf b/pbconf/pbfilter/all.pbf index 8e9647e..45f42d8 100644 --- a/pbconf/pbfilter/all.pbf +++ b/pbconf/pbfilter/all.pbf @@ -69,3 +69,4 @@ filter PBLOG = yes filter PBCONFFILE = /etc/redfish-client.conf filter PBTEMPLATEPATH = /usr/share/redfish-client/templates +filter PBPYTHON3FILTER = perl -pi -e "s|configparser>=3.3.0; python_version < '3'|configparser>=3.3.0|" requirements.txt diff --git a/pbconf/python-redfish/rpm/python-redfish.spec b/pbconf/python-redfish/rpm/python-redfish.spec index 6011042..0307058 100644 --- a/pbconf/python-redfish/rpm/python-redfish.spec +++ b/pbconf/python-redfish/rpm/python-redfish.spec @@ -22,6 +22,8 @@ PBDESC %setup -q %build +# Fix for now as long as setuptools isn't more recent in distributions +PBPYTHON3FILTER %{__python} setup.py build # Build minimal documentation diff --git a/requirements.txt b/requirements.txt index d38b06a..8130bed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,4 @@ requests>=2.9.1 # Python3 compat future>=0.15.2 -#configparser>=3.3.0; python_version < '3' +configparser>=3.3.0; python_version < '3'