From 8560e6c230786928346c50529536919e7fcefc6c Mon Sep 17 00:00:00 2001 From: Bruno Cornec Date: Sat, 30 Apr 2016 01:02:52 +0200 Subject: [PATCH] Fix rpm build - Working rpm build For mageia 5 and Fedora 23 - Review mageia 5 and Fedora 23 dependencies and upload missing one on ftp server - pbr not used in package build anymore, called by pb in 0.14.1 version. Fully standalone version after sbx2build - Fix doc production and man pages - update gitignore for latest pb version - Remove useless pb filters - Will become real 0.3 (no code change, just build infra) --- .gitignore | 11 +++++++--- doc/source/faq.rst | 2 +- install.sh | 10 ++++----- pbconf/pbfilter/debian-3.1.pbf | 11 ---------- pbconf/pbfilter/debian-4.0.pbf | 11 ---------- pbconf/pbfilter/debian-5.0.pbf | 11 ---------- pbconf/pbfilter/debian-6.0.pbf | 11 ---------- pbconf/pbfilter/debian-7.0.pbf | 11 ---------- pbconf/pbfilter/fedora-1.pbf | 9 -------- pbconf/pbfilter/fedora-2.pbf | 9 -------- pbconf/pbfilter/fedora-3.pbf | 9 -------- pbconf/pbfilter/fedora-4.pbf | 9 -------- pbconf/pbfilter/fedora-5.pbf | 9 -------- pbconf/pbfilter/fedora-6.pbf | 9 -------- pbconf/pbfilter/fedora-7.pbf | 9 -------- pbconf/pbfilter/fedora.pbf | 2 ++ pbconf/pbfilter/md.pbf | 2 ++ pbconf/pbfilter/rpm.pbf | 4 ++-- pbconf/pbfilter/ubuntu-6.06.pbf | 11 ---------- pbconf/pbfilter/ubuntu-7.04.pbf | 11 ---------- pbconf/pbfilter/ubuntu-7.10.pbf | 11 ---------- pbconf/pbfilter/ubuntu-8.04.pbf | 11 ---------- pbconf/pbfilter/ubuntu-8.10.pbf | 11 ---------- pbconf/pbfilter/ubuntu-9.04.pbf | 11 ---------- pbconf/python-redfish/rpm/python-redfish.spec | 21 ++++++++++--------- 25 files changed, 31 insertions(+), 205 deletions(-) delete mode 100644 pbconf/pbfilter/debian-3.1.pbf delete mode 100644 pbconf/pbfilter/debian-4.0.pbf delete mode 100644 pbconf/pbfilter/debian-5.0.pbf delete mode 100644 pbconf/pbfilter/debian-6.0.pbf delete mode 100644 pbconf/pbfilter/debian-7.0.pbf delete mode 100644 pbconf/pbfilter/fedora-1.pbf delete mode 100644 pbconf/pbfilter/fedora-2.pbf delete mode 100644 pbconf/pbfilter/fedora-3.pbf delete mode 100644 pbconf/pbfilter/fedora-4.pbf delete mode 100644 pbconf/pbfilter/fedora-5.pbf delete mode 100644 pbconf/pbfilter/fedora-6.pbf delete mode 100644 pbconf/pbfilter/fedora-7.pbf delete mode 100644 pbconf/pbfilter/ubuntu-6.06.pbf delete mode 100644 pbconf/pbfilter/ubuntu-7.04.pbf delete mode 100644 pbconf/pbfilter/ubuntu-7.10.pbf delete mode 100644 pbconf/pbfilter/ubuntu-8.04.pbf delete mode 100644 pbconf/pbfilter/ubuntu-8.10.pbf delete mode 100644 pbconf/pbfilter/ubuntu-9.04.pbf diff --git a/.gitignore b/.gitignore index 6ec79a6..30fe283 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ var/ *.egg-info/ .installed.cfg *.egg +AUTHORS +ChangeLog # PyInstaller # Usually these files are written by a python script from a template @@ -57,9 +59,12 @@ docs/_build/ # PyBuilder target/ -# Project-Builder.org -delivery/ -build/ +# Project-Builder.org 0.14.1 +pbdelivery/ +pbbuild/ + +# ctags +tags # Pydev .project diff --git a/doc/source/faq.rst b/doc/source/faq.rst index 8e53b2a..3067024 100644 --- a/doc/source/faq.rst +++ b/doc/source/faq.rst @@ -4,7 +4,7 @@ FAQ - Q1 : error in setup command: Invalid environment marker: (python_version < '3') - This error is caused by old setuptools revisions that do not understant "python_version < '3'". + This error is caused by an old setuptools version that does not understand "python_version < '3'". Upgrade setuptools using:: pip install --upgrade setuptools diff --git a/install.sh b/install.sh index b0a8ef8..dffc4d9 100755 --- a/install.sh +++ b/install.sh @@ -11,17 +11,17 @@ export pkg=$5 # Documentation installation only if [ $python = "doc" ]; then - install -d 755 $rootdir/$prefix/share/doc/$5/html/_static - install -m 644 doc/build/singlehtml/*.html $rootdir/$prefix/share/doc/$5/html - install -m 644 doc/build/singlehtml/_static/* $rootdir/$prefix/share/doc/$5/html/_static - install -m 644 doc/build/latex/*.pdf $rootdir/$prefix/share/doc/$5/ + install -d 755 $rootdir/$prefix/share/doc/$5/manual/html/_static + install -m 644 doc/build/singlehtml/*.html $rootdir/$prefix/share/doc/$5/manual/html + install -m 644 doc/build/singlehtml/_static/* $rootdir/$prefix/share/doc/$5/manual/html/_static + install -m 644 doc/build/latex/*.pdf $rootdir/$prefix/share/doc/$5/manual/ exit 0 fi pyver=`$python --version 2>&1 | perl -p -e 's|.* ([2-3])\..*|$1|'` $python setup.py install --skip-build --root=$rootdir --prefix=$prefix -rm -rf $rootdir/$sitelib/redfish/old +rm -rf $rootdir/$sitelib/redfish/old $rootdir/$prefix/share/doc/$5/html $rootdir/$prefix/share/doc/$5/*.pdf # Hardcoded for now to solve the delivery of the conf file still not correct with setup.py mkdir -p $rootdir/etc diff --git a/pbconf/pbfilter/debian-3.1.pbf b/pbconf/pbfilter/debian-3.1.pbf deleted file mode 100644 index b4eaf1d..0000000 --- a/pbconf/pbfilter/debian-3.1.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for debian build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.6.1 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 4 - diff --git a/pbconf/pbfilter/debian-4.0.pbf b/pbconf/pbfilter/debian-4.0.pbf deleted file mode 100644 index 88f897f..0000000 --- a/pbconf/pbfilter/debian-4.0.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for debian build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.6.1 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 5 - diff --git a/pbconf/pbfilter/debian-5.0.pbf b/pbconf/pbfilter/debian-5.0.pbf deleted file mode 100644 index 2fa6292..0000000 --- a/pbconf/pbfilter/debian-5.0.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for debian build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.8.0 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 7 - diff --git a/pbconf/pbfilter/debian-6.0.pbf b/pbconf/pbfilter/debian-6.0.pbf deleted file mode 100644 index 2fa6292..0000000 --- a/pbconf/pbfilter/debian-6.0.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for debian build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.8.0 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 7 - diff --git a/pbconf/pbfilter/debian-7.0.pbf b/pbconf/pbfilter/debian-7.0.pbf deleted file mode 100644 index f9a8238..0000000 --- a/pbconf/pbfilter/debian-7.0.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for debian build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.9.4 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 9 - diff --git a/pbconf/pbfilter/fedora-1.pbf b/pbconf/pbfilter/fedora-1.pbf deleted file mode 100644 index 67bfb52..0000000 --- a/pbconf/pbfilter/fedora-1.pbf +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# -# Filter for old fedora build -# - -# PBSUF is replaced by the package suffix ($pb->{'suf'} in code) -filter PBSUF = $pb->{'suf'} - diff --git a/pbconf/pbfilter/fedora-2.pbf b/pbconf/pbfilter/fedora-2.pbf deleted file mode 100644 index 67bfb52..0000000 --- a/pbconf/pbfilter/fedora-2.pbf +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# -# Filter for old fedora build -# - -# PBSUF is replaced by the package suffix ($pb->{'suf'} in code) -filter PBSUF = $pb->{'suf'} - diff --git a/pbconf/pbfilter/fedora-3.pbf b/pbconf/pbfilter/fedora-3.pbf deleted file mode 100644 index 67bfb52..0000000 --- a/pbconf/pbfilter/fedora-3.pbf +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# -# Filter for old fedora build -# - -# PBSUF is replaced by the package suffix ($pb->{'suf'} in code) -filter PBSUF = $pb->{'suf'} - diff --git a/pbconf/pbfilter/fedora-4.pbf b/pbconf/pbfilter/fedora-4.pbf deleted file mode 100644 index 67bfb52..0000000 --- a/pbconf/pbfilter/fedora-4.pbf +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# -# Filter for old fedora build -# - -# PBSUF is replaced by the package suffix ($pb->{'suf'} in code) -filter PBSUF = $pb->{'suf'} - diff --git a/pbconf/pbfilter/fedora-5.pbf b/pbconf/pbfilter/fedora-5.pbf deleted file mode 100644 index 67bfb52..0000000 --- a/pbconf/pbfilter/fedora-5.pbf +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# -# Filter for old fedora build -# - -# PBSUF is replaced by the package suffix ($pb->{'suf'} in code) -filter PBSUF = $pb->{'suf'} - diff --git a/pbconf/pbfilter/fedora-6.pbf b/pbconf/pbfilter/fedora-6.pbf deleted file mode 100644 index 67bfb52..0000000 --- a/pbconf/pbfilter/fedora-6.pbf +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# -# Filter for old fedora build -# - -# PBSUF is replaced by the package suffix ($pb->{'suf'} in code) -filter PBSUF = $pb->{'suf'} - diff --git a/pbconf/pbfilter/fedora-7.pbf b/pbconf/pbfilter/fedora-7.pbf deleted file mode 100644 index 67bfb52..0000000 --- a/pbconf/pbfilter/fedora-7.pbf +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# -# Filter for old fedora build -# - -# PBSUF is replaced by the package suffix ($pb->{'suf'} in code) -filter PBSUF = $pb->{'suf'} - diff --git a/pbconf/pbfilter/fedora.pbf b/pbconf/pbfilter/fedora.pbf index 7c5bf4d..8fc50ec 100644 --- a/pbconf/pbfilter/fedora.pbf +++ b/pbconf/pbfilter/fedora.pbf @@ -24,3 +24,5 @@ filter PBSUF = %{dist} # PBOBS is replaced by the Obsolete line #filter PBOBS = +filter PB2PYTHON2BDEP = texlive-multirow,texlive-upquote,texlive-wrapfig,texlive-threepartttble,texlive-titlesec +filter PB2PYTHON3BDEP = texlive-multirow,texlive-upquote,texlive-wrapfig,texlive-threepartttble,texlive-titlesec diff --git a/pbconf/pbfilter/md.pbf b/pbconf/pbfilter/md.pbf index 20fe4a7..bb66d29 100644 --- a/pbconf/pbfilter/md.pbf +++ b/pbconf/pbfilter/md.pbf @@ -6,3 +6,5 @@ filter PBGRP = Development/Python # Cf: http://wiki.mandriva.com/en/Development/Packaging/Licenses #filter PBLIC = GPL +filter PB2PYTHON2BDEP = python-pkg-resources >= 18, texlive-dist +filter PB2PYTHON3BDEP = python3-pkg-resources >= 18, texlive-dist diff --git a/pbconf/pbfilter/rpm.pbf b/pbconf/pbfilter/rpm.pbf index b01ef59..e1ebdff 100644 --- a/pbconf/pbfilter/rpm.pbf +++ b/pbconf/pbfilter/rpm.pbf @@ -14,9 +14,9 @@ filter PBLIC = ASL 2.0 #filter PBDEP = # PBBDEP is replaced by the list of build dependencies -filter PBPYTHON2BDEP = python-devel,python-setuptools,python-sphinx >= 1.2.3,python-future >= 0.15.2 +filter PBPYTHON2BDEP = python-devel,python-setuptools >= 18,python-sphinx >= 1.2.3,python-future >= 0.15.2,python-docopt >= 0.6.2,python-requests >= 2.9.1,python-simplejson >= 3.8.1,python-configparser >= 3.3.0,texlive,python-sphinx_rtd_theme filter PBPYTHON2DEP = python-docopt >= 0.6.2,python-tortilla >= 0.4.1,python-jinja2 >= 2.7.3,python-simplejson >= 3.8.1,python-requests >= 2.9.1,python-configparser >= 3.3.0 -filter PBPYTHON3BDEP = python3-devel,python3-setuptools,python3-sphinx >= 1.2.3,python3-future >= 0.15.2 +filter PBPYTHON3BDEP = python3-devel,python3-setuptools >= 18,python3-sphinx >= 1.2.3,python3-future >= 0.15.2,python3-docopt >= 0.6.2,python3-requests >= 2.9.1,python3-simplejson >= 3.8.1,texlive,python3-sphinx_rtd_theme filter PBPYTHON3DEP = python3-docopt >= 0.6.2,python3-tortilla >= 0.4.1,python3-jinja2 >= 2.7.3,python3-simplejson >= 3.8.1,python3-requests >= 2.9.1 filter PBPYTHON3PKG = python3-redfish diff --git a/pbconf/pbfilter/ubuntu-6.06.pbf b/pbconf/pbfilter/ubuntu-6.06.pbf deleted file mode 100644 index 9f8c61f..0000000 --- a/pbconf/pbfilter/ubuntu-6.06.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for ubuntu build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.6.2 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 4 - diff --git a/pbconf/pbfilter/ubuntu-7.04.pbf b/pbconf/pbfilter/ubuntu-7.04.pbf deleted file mode 100644 index 9f8c61f..0000000 --- a/pbconf/pbfilter/ubuntu-7.04.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for ubuntu build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.6.2 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 4 - diff --git a/pbconf/pbfilter/ubuntu-7.10.pbf b/pbconf/pbfilter/ubuntu-7.10.pbf deleted file mode 100644 index 9f8c61f..0000000 --- a/pbconf/pbfilter/ubuntu-7.10.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for ubuntu build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.6.2 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 4 - diff --git a/pbconf/pbfilter/ubuntu-8.04.pbf b/pbconf/pbfilter/ubuntu-8.04.pbf deleted file mode 100644 index 1855642..0000000 --- a/pbconf/pbfilter/ubuntu-8.04.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for ubuntu build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.7.3 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 4 - diff --git a/pbconf/pbfilter/ubuntu-8.10.pbf b/pbconf/pbfilter/ubuntu-8.10.pbf deleted file mode 100644 index 1855642..0000000 --- a/pbconf/pbfilter/ubuntu-8.10.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for ubuntu build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.7.3 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 4 - diff --git a/pbconf/pbfilter/ubuntu-9.04.pbf b/pbconf/pbfilter/ubuntu-9.04.pbf deleted file mode 100644 index 4f2c95a..0000000 --- a/pbconf/pbfilter/ubuntu-9.04.pbf +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# -# Filter for ubuntu build -# -# PBDEBSTD is replaced by the Debian standard version -filter PBDEBSTD = 3.8.0 - -# PBDEBCOMP is replaced by the Debian Compatibility value -filter PBDEBCOMP = 4 - diff --git a/pbconf/python-redfish/rpm/python-redfish.spec b/pbconf/python-redfish/rpm/python-redfish.spec index 89185a9..498c8ed 100644 --- a/pbconf/python-redfish/rpm/python-redfish.spec +++ b/pbconf/python-redfish/rpm/python-redfish.spec @@ -13,7 +13,7 @@ Url: PBURL Source: PBREPO/PBSRC Requires: PBPYTHON2DEP BuildArch: noarch -BuildRequires: PBPYTHON2BDEP +BuildRequires: PBPYTHON2BDEP, PB2PYTHON2BDEP %description PBDESC @@ -21,12 +21,12 @@ Python2 version. %package -n PBPYTHON3PKG Summary: %{summary} / Python 3 library -BuildRequires: PBPYTHON3BDEP +BuildRequires: PBPYTHON3BDEP, PB2PYTHON3BDEP Requires: PBPYTHON3DEP %package -n PBREALPKG-doc Summary: %{summary} / Documentation -BuildRequires: PBPYTHON3BDEP +BuildRequires: PBPYTHON3BDEP, PB2PYTHON3BDEP Requires: PBPYTHON3DEP %description -n PBPYTHON3PKG @@ -42,6 +42,8 @@ Documentation # Fix for now as long as setuptools isn't more recent in distributions PBPYTHON3FILTER cp -a . %{py3dir} +# python3 doesn't provide configparser at all +(cd %{py3dir} ; perl -pi -e "s|configparser>=3.3.0||" requirements.txt) %build pushd %{py3dir} @@ -74,32 +76,31 @@ popd %files %doc README.rst examples/[a-z]*.py LICENSE +%exclude %{_docdir}/PBREALPKG/html +%exclude %{_docdir}/PBREALPKG/*.pdf %{_bindir}/redfish-client %dir %{_datadir}/redfish-client %{_datadir}/redfish-client/templates/* %config(noreplace) %{_sysconfdir}/redfish-client.conf %dir %{python_sitelib}/redfish %{python_sitelib}/redfish/*.py* -#%{python_sitelib}/redfish/tests/*.py* %{python_sitelib}/python_redfish* # Needs improvement to host all .1 man pages but not the py3 ones %{_mandir}/man1/PBREALPKG.1* %{_mandir}/man1/*-py2.1* %files -n PBPYTHON3PKG -%doc README.rst examples/[a-z]*.py LICENSE +%doc README.rst examples/[a-z]*.py LICENSE AUTHORS ChangeLog %dir %{python3_sitelib}/redfish %{python3_sitelib}/redfish/*.py* %{python3_sitelib}/redfish/__pycache__/*.py* -#%{python3_sitelib}/redfish/tests/*.py* -#%{python3_sitelib}/redfish/tests/__pycache__/*.py* %{python3_sitelib}/python_redfish* %{_mandir}/man1/*-py3.1* %files -n PBREALPKG-doc -%{_docdir}/PBREALPKG/html/_static/* -%{_docdir}/PBREALPKG/html/index.html -%{_docdir}/PBREALPKG/*.pdf +%{_docdir}/PBREALPKG/manual/html/_static/* +%{_docdir}/PBREALPKG/manual/html/index.html +%{_docdir}/PBREALPKG/manual/*.pdf %changelog PBLOG