#3 Add buildbot-www subpackage
Merged 5 years ago by ngompa. Opened 5 years ago by frantisekz.
rpms/ frantisekz/buildbot master  into  master

file modified
+69 -6
@@ -16,6 +16,17 @@ 

  URL:            https://buildbot.net

  Source0:        %{pypi_source buildbot}

  Source1:        %{pypi_source buildbot-worker}

+ Source2:        https://files.pythonhosted.org/packages/1f/aa/66fcc2ce560759bab61cdbaa04ab2bfd58b7d0afb5bbd6a08d1785e1dd13/%{name}_www-%{version}-py2.py3-none-any.whl

+ Source3:        https://files.pythonhosted.org/packages/aa/19/a4a8f19b0256811a9e91c2c6f8827aac37617ad00da2189b5ad1cb45fd48/%{name}_waterfall_view-%{version}-py2.py3-none-any.whl

+ Source4:        https://files.pythonhosted.org/packages/34/b7/28509b4f5183d454f0099c6b2ee4161b0d49208a2231657fa1633f4b6e10/%{name}_grid_view-%{version}-py2.py3-none-any.whl

+ Source5:        https://files.pythonhosted.org/packages/f3/f4/8531190f8ad2c11c978e43994b7138dedd8ff4b8163a4b4e8745e4e3bed9/%{name}_console_view-%{version}-py2.py3-none-any.whl

+ 

+ # To get latest sources for buildbot-www

+ # export VERSION=1.6.0;

+ # for PROJECT in buildbot-www buildbot-waterfall-view buildbot-grid-view buildbot-console-view; do

+ #   curl -s "https://pypi.org/pypi/$PROJECT/$VERSION/json" \

+ #   | jq -r ".releases | .\"$VERSION\" | .[] | select(.packagetype == \"bdist_wheel\") | .url"

+ # done

  

  BuildArch:      noarch

  
@@ -109,6 +120,31 @@ 

  This package contains only the buildworker implementation.

  The buildbot-master package contains the buildmaster.

  

+ %package www

+ Summary:        Build/test automation system

+ 

+ # Script to get bundled js

+ # cat \

+ # ./www/codeparameter/package.json \

+ # ./www/console_view/package.json	\

+ # ./www/base/package.json	\

+ # ./www/waterfall_view/package.json \

+ # ./www/data_module/package.json \

+ # ./www/grid_view/package.json \

+ # | jq '.dependencies' | sed 's/[{}, ]//g' | sort -u

+ 

+ Provides:        bundled(guanlecoja) = 0.8.0

+ Provides:        bundled(guanlecoja) = 0.8.3

+ Provides:        bundled(gulp) = 3.9.0

+ Provides:        bundled(gulp) = 3.9.1

+ Provides:        bundled(gulp-shell) = 0.4.1

+ Provides:        bundled(http-proxy) = 1.11.1

+ Provides:        bundled(minimist) = 1.1.1

+ Provides:        bundled(shelljs) = 0.5.3

+ 

+ %description www

+ Provides web frontend for buildbot.

+ 

  %if %{with docs}

  %package doc

  Summary:        Buildbot documentation
@@ -118,7 +154,7 @@ 

  %endif

  

  %prep

- %autosetup -p1 -a1

+ %setup -q -b0 -b1 -b2 -b3 -b4 -b5

  

  %build

  %py3_build
@@ -130,13 +166,31 @@ 

  popd

  %endif

  

- pushd %{name}-worker-%{version}

+ pushd ../%{name}-worker-%{version}

  %py3_build

  popd

  

  

  %install

  %py3_install

+ 

+ # unpack wheel -www packages

+ pushd ..

+ 

+ cp -R %{name}_www %{buildroot}/%{python3_sitelib}/

+ cp -R %{name}_www-%{version}.dist-info %{buildroot}/%{python3_sitelib}/

+ 

+ cp -R %{name}_waterfall_view %{buildroot}/%{python3_sitelib}/

+ cp -R %{name}_waterfall_view-%{version}.dist-info %{buildroot}/%{python3_sitelib}/

+ 

+ cp -R %{name}_grid_view %{buildroot}/%{python3_sitelib}/

+ cp -R %{name}_grid_view-%{version}.dist-info %{buildroot}/%{python3_sitelib}/

+ 

+ cp -R %{name}_console_view %{buildroot}/%{python3_sitelib}/

+ cp -R %{name}_console_view-%{version}.dist-info %{buildroot}/%{python3_sitelib}/

+ 

+ popd

+ 

  install -Dpm0644 -t %{buildroot}%{_mandir}/man1 docs/buildbot.1

  

  %if %{with docs}
@@ -145,7 +199,7 @@ 

  %endif

  

  # install worker files

- pushd %{name}-worker-%{version}

+ pushd ../%{name}-worker-%{version}

  %py3_install

  install -Dpm0644 -t %{buildroot}%{_mandir}/man1 docs/buildbot-worker.1

  popd
@@ -168,7 +222,6 @@ 

  %{_mandir}/man1/buildbot.1*

  %{python3_sitelib}/buildbot/

  %{python3_sitelib}/buildbot-*egg-info/

- %{_datadir}/%{name}

  

  %files worker

  %doc NEWS UPGRADING
@@ -178,6 +231,16 @@ 

  %{python3_sitelib}/buildbot_worker/

  %{python3_sitelib}/buildbot_worker-*egg-info/

  

+ %files www

+ %{python3_sitelib}/buildbot_www/

+ %{python3_sitelib}/buildbot_www-%{version}.dist-info/

+ %{python3_sitelib}/buildbot_waterfall_view/

+ %{python3_sitelib}/buildbot_waterfall_view-%{version}.dist-info/

+ %{python3_sitelib}/buildbot_grid_view/

+ %{python3_sitelib}/buildbot_grid_view-%{version}.dist-info/

+ %{python3_sitelib}/buildbot_console_view/

+ %{python3_sitelib}/buildbot_console_view-%{version}.dist-info/

+ 

  %if %{with docs}

  %files doc

  %{_pkgdocdir}/
@@ -327,7 +390,7 @@ 

  

  * Tue Mar  3 2009 Gianluca Sforna <giallu gmail com> - 0.7.10p1-2

  - New upstream release

- - darcs only avaliable on ix86 platforms 

+ - darcs only avaliable on ix86 platforms

  

  * Thu Feb 26 2009 Gianluca Sforna <giallu gmail com> - 0.7.10-1

  - New upstream release
@@ -347,7 +410,7 @@ 

  - new upstream release

  

  * Thu Jan  3 2008 Gianluca Sforna <giallu gmail com> - 0.7.6-2

- - pick up new .egg file 

+ - pick up new .egg file

  

  * Mon Oct 15 2007 Gianluca Sforna <giallu gmail com> - 0.7.6-1

  - new upstream release

Adds buildbot's web frontend which is missing in Fedora package. There is bunch of bundled javascript, but it looks like it's allowed as per Fedora wiki/Node.js [0]
Having frontend packaged would result in working buildbot with web UI (so one can use example.cfg to get it working).

I wasn't able to find short urls for whl files on pythonhosted, but if there are such, it would be better to use them for sure.

[0] https://fedoraproject.org/wiki/Packaging:Node.js?rd=Node.js/#Client-side_JavaScript

rebased onto fe59c0a

5 years ago

As far as I'm aware, we're not allowed to use the wheels. However, the source tarballs from GitHub include the generated JS deps.

Metadata Update from @ignatenkobrain:
- Request assigned

5 years ago

@ignatenkobrain The tricky part, which I hadn't untangled yet locally, was getting the setup.py to be able to import from previously installed modules into buildroot too.

@ngompa I've tried using source tarballs, I was able to make setup.py to import installed modules (by adding buildroot path to PYTHONPATH). Unfortunately, I can't find that code right now. Is it what you want or did I misunderstand you?

However, it seems it tries to compile all the javascripts and that's not going to work IMO.

@frantisekz That is what I want, yes. The buildbot_pkg module probably needs to be patched to support an environment variable to not compile JS or at least detect when the JS is already compiled and not run it again.

Why is it not ok to use the wheels (in particular, extract parts of them)? It's an official artifact of the project, the same way a tarball is.

@kparal We've never allowed it historically, because wheels are the binary output for Python distribution, and Fedora requires "build from source" for everything.

Not everything, some javascripts are ok to be bundled, I believe? Either way, you're proposing to take the same files from a tarball instead of the wheel. So what is the difference? In both cases the "compiled" javascripts would be used directly.

This needs to be above the %description www to be counted as part of the subpackage metadata.

This is redundant.

This is redundant and already implied.

@kparal In this case, you're right, but generally this is not true for eggs/wheels.

rebased onto 0b7222b

5 years ago

@ngompa I think your feedback should be addressed now, thanks! I've also rebased on top of latest master.

This script comment should be with the Provides, not in the description.

1 new commit added

  • Fix Build
5 years ago

@ngompa Yeah, I've overlooked that, thanks!

Also, buildbot is not buildable as-is in dist git at the moment. After @ignatenkobrain update to 1.6.0 , it is failing on non-existing %{_datadir}/%{name} . I've removed that line and also edited some paths, see latest commit in this PR.

Let's go with this for now, and then when we can fix it to work from source, let's fix it then. I have an idea of how to fix it, but I need more time to dig into it.

Pull-Request has been merged by ngompa

5 years ago