Here are some patches to make setting up a stand alone OBS install easier.
They mostly remove some hard code URLs, allowing the use of the
environment configuration files.
Also included is a patch for the obs-server.spec file to make it work
with a tarball made from current development tree.
All of the patches are against r1638.
--
David B. Anderson
Linux Networx
Sr. Software Engineer
Email: danderson@lnxi.com
Phone: (801) 649-1311
--- ../obs-r/buildservice/src/webclient/app/helpers/application_helper.rb 2007-05-11 16:04:41.000000000 -0600
+++ buildservice/src/webclient/app/helpers/application_helper.rb 2007-05-11 15:46:42.000000000 -0600
@@ -28,8 +28,12 @@
:project => project, :package => package
end
+ def link_to_repo(message='', repo='')
+ link_to "Build Service Software #{message}", URL_SW_REPO_HOST + "/#{repo}"
+ end
+
def repo_url(project, repo='' )
- '
http://software.opensuse.org/download/' + project.gsub(':', ':/') + "/#{repo}"
+ URL_SW_REPO_HOST + '/download/' + project.gsub(':', ':/') + "/#{repo}"
end
--- ../obs-r/buildservice/src/backend/BSConfig.pm 2007-05-11 16:04:41.000000000 -0600
+++ buildservice/src/backend/BSConfig.pm 2007-05-11 15:46:42.000000000 -0600
@@ -27,6 +27,8 @@
our $stageserver = 'rsync://149.44.161.5/put-repos-main';
our $stageserver_sync = 'rsync://149.44.161.5/trigger-repos-sync';
our $repodownload = '
http://software.opensuse.org/download/repositories';
+our $gpgkeyurl = '
http://software.opensuse.org/openSUSE-Build-Service.asc';
+our $gpgcheck_flag ='1';
our $sign = '/root/bin/sign';
our $bsdir = '/bs';
our $keyfile = '/bs/openSUSE-Build-Service.asc';
--- ../obs-r/buildservice/src/webclient/config/environments/development.rb 2007-05-11 16:04:41.000000000 -0600
+++ buildservice/src/webclient/config/environments/development.rb 2007-05-11 15:46:42.000000000 -0600
@@ -42,3 +42,8 @@
### ICHAIN_HOST = "212.12.12.12"
ICHAIN_TEST_USER = "test"
+# Software Repository Machine Path
+URL_SW_REPO_HOST = "
http://software.opensuse.org"
+
+# API Machine URL
+URL_API_HOST ="
https://api.opensuse.org"
--- ../obs-r/buildservice/src/webclient/app/views/main/index.rhtml 2007-05-11 16:04:41.000000000 -0600
+++ buildservice/src/webclient/app/views/main/index.rhtml 2007-05-11 15:46:42.000000000 -0600
@@ -16,7 +16,10 @@
It can build packages for various Linux distributions.<br/>
Most of the advanced features are still missing, but the basic build functionality is there.</p>
-<p class="description">Everyone can download the resulting software packages via the <a href="http://software.opensuse.org">software browsing interface</a>.</p>
+<p class="description">Everyone can download the resulting software packages via the
+ <%= link_to_repo 'browsing interface'
+ -%>.
+</p>
<!--
--- ../obs-r/buildservice/src/webclient/app/helpers/package_helper.rb 2007-05-11 16:04:41.000000000 -0600
+++ buildservice/src/webclient/app/helpers/package_helper.rb 2007-05-11 15:46:42.000000000 -0600
@@ -4,25 +4,29 @@
def build_log_url( project, package, platform, arch )
#get_frontend_url_for( :controller => 'result' ) +
# "/#{project}/#{platform}/#{package}/#{arch}/log"
- "
https://api.opensuse.org/result/#%7Bproject%7D/#%7Bplatform%7D/#%7Bpackage%7..."
+ URL_API_HOST + '/result/' + "#{project}/#{platform}/#{package}/#{arch}/log"
end
def file_url( project, package, filename )
#get_frontend_url_for( :controller => 'source') +
# "/#{project}/#{package}/#{filename}"
- "
https://api.opensuse.org/source/#%7Bproject%7D/#%7Bpackage%7D/#%7Bfilename%7..."
+ URL_API_HOST + '/source/' + "#{project}/#{package}/#{filename}"
end
def rpm_url( project, package, repository, arch, filename )
#get_frontend_url_for( :controller => 'rpm' ) +
# "/#{project}/#{repository}/#{package}/#{arch}/#{filename}"
- "
https://api.opensuse.org/rpm/#%7Bproject%7D/#%7Brepository%7D/#%7Bpackage%7D..."
+ URL_API_HOST + '/rpm/' + "#{project}/#{repository}/#{package}/#{arch}/#{filename}"
end
def human_readable_fsize( bytes )
- number_to_human_size(bytes, 2)
+ hs = number_to_human_size(bytes.to_i)
+ if hs == nil
+ hs = bytes
+ end
+ hs
end
end
--- ../obs-r/buildservice/src/webclient/app/views/user/request_ichain.rhtml 2007-05-11 16:04:41.000000000 -0600
+++ buildservice/src/webclient/app/views/user/request_ichain.rhtml 2007-05-11 15:46:42.000000000 -0600
@@ -12,7 +12,7 @@
</p>
<p>
You do NOT need an account to download packages. Please go to
- <a href="http://software.opensuse.org/download/">http://software.opensuse.org/download/</a>
+ <%= link_to_repo 'downloads', 'download' %>
for downloading packages.
</p>
<p>The build service team will enable your account for the
--- ../obs-r/buildservice/src/backend/worker/BSConfig.pm 2007-05-11 16:04:41.000000000 -0600
+++ buildservice/src/backend/worker/BSConfig.pm 2007-05-11 15:46:42.000000000 -0600
@@ -27,6 +27,8 @@
our $stageserver = 'rsync://149.44.161.5/put-repos-main';
our $stageserver_sync = 'rsync://149.44.161.5/trigger-repos-sync';
our $repodownload = '
http://software.opensuse.org/download/repositories';
+our $gpgkeyurl = '
http://software.opensuse.org/openSUSE-Build-Service.asc';
+our $gpgcheck_flag ='1';
our $sign = '/root/bin/sign';
our $bsdir = '/bs';
our $keyfile = '/bs/openSUSE-Build-Service.asc';
--- /home/danderson/Work/src/tmp/obs/rpm/obs-server.spec.org 2007-05-01 17:17:51.000000000 -0600
+++ obs-server.spec 2007-05-11 16:22:46.000000000 -0600
@@ -75,17 +75,44 @@
#
# Install all web and frontend parts.
#
+
+# First make sure our build root is clean
+rm -rf %{buildroot}
+mkdir -p %{buildroot}
+
+
for i in common frontend webclient; do
mkdir -p $RPM_BUILD_ROOT/srv/www/obs/
cp -a $i $RPM_BUILD_ROOT/srv/www/obs/$i
done
+
+#These are to fix the files requires section below as these
+#directories have been removed from the tarball.
+#If these directories are not really needed then remove this section
+#and the entries in the file section
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/frontend/components
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/frontend/log
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/frontend/tmp
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/frontend/tmp/sockets
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/frontend/tmp/sessions
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/frontend/tmp/cache
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/webclient/components
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/webclient/db
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/webclient/vendor
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/webclient/log
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/webclient/tmp
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/webclient/tmp/sockets
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/webclient/tmp/sessions
+install -d -m 755 $RPM_BUILD_ROOT/srv/www/obs/webclient/tmp/cache
+
+
# configure lighttpd web service
mkdir -p $RPM_BUILD_ROOT/etc/lighttpd/vhosts.d/
install -m 0644 %SOURCE7 $RPM_BUILD_ROOT/etc/lighttpd/vhosts.d/
install -m 0644 %SOURCE9 $RPM_BUILD_ROOT/etc/lighttpd/vhosts.d/rails.inc
install -m 0644 %SOURCE8 $RPM_BUILD_ROOT/etc/lighttpd/
-rm $RPM_BUILD_ROOT/srv/www/obs/frontend/README_LOGIN
-rm $RPM_BUILD_ROOT/srv/www/obs/frontend/files/specfiletemplate
+rm -f $RPM_BUILD_ROOT/srv/www/obs/frontend/README_LOGIN
+rm -f $RPM_BUILD_ROOT/srv/www/obs/frontend/files/specfiletemplate
# fix path
for i in $RPM_BUILD_ROOT/srv/www/obs/*/config/environment.rb; do
sed "s,/srv/www/opensuse/common/current/lib,/srv/www/obs/common/lib," \