[Xfce4-commits] <archive:master> Add how-to-mirror page.
Nick Schermer
noreply at xfce.org
Fri Nov 25 21:44:01 CET 2011
Updating branch refs/heads/master
to 2669bbed24ea344874c4916a149cb090e7691f5f (commit)
from f4ba4b31f565ed67510ec6231234687763b83fed (commit)
commit 2669bbed24ea344874c4916a149cb090e7691f5f
Author: Nick Schermer <nick at xfce.org>
Date: Fri Nov 25 21:43:08 2011 +0100
Add how-to-mirror page.
fancyindex/main.rb | 9 +++-
fancyindex/views/howtomirror.haml | 51 ++++++++++++++++++
fancyindex/views/index.haml | 102 ++++++++++++-------------------------
fancyindex/views/layout.haml | 41 +++++++++++++++
4 files changed, 132 insertions(+), 71 deletions(-)
diff --git a/fancyindex/main.rb b/fancyindex/main.rb
index e460190..7c12b64 100644
--- a/fancyindex/main.rb
+++ b/fancyindex/main.rb
@@ -11,7 +11,12 @@ module Fancyindex
# used in the xfce weather plugin
get '/geolocation' do
content_type 'application/xml', :charset => 'utf-8'
- haml :geolocation
+ haml :geolocation, :layout => false
+ end
+
+ get '/howtomirror' do
+ @title = "How to become a mirror for Xfce"
+ haml :howtomirror, :ugly => true
end
get '/*' do |requesturi|
@@ -33,6 +38,8 @@ module Fancyindex
@dir.each {|c, o| @dir[c] = 'D' if col == c and order == o}
@archive = Archive.new(path, requesturi, col, order == 'D')
+
+ @title = "Index of #{@archive.href if @archive}"
haml :index, :ugly => true
end
end
diff --git a/fancyindex/views/howtomirror.haml b/fancyindex/views/howtomirror.haml
new file mode 100644
index 0000000..b23b323
--- /dev/null
+++ b/fancyindex/views/howtomirror.haml
@@ -0,0 +1,51 @@
+%h2 How to become a mirror for Xfce
+%p
+ The Xfce Desktop Enviroment has mirror sites from all around the world,
+ but we are always looking for more <strong>reliable</strong> and
+ <strong>well connected</strong> sites that can help us distribute our software.
+
+%h3 Requirements
+%p
+ We have a few requirements for those wishing to run a mirror:
+%ul
+ %li
+ At least 10 GB of available disk space. The current distribution
+ directory is around 6 GB, but we wish to leave room for expansion.
+ %li
+ You must do an update-check at least once a day and preferably
+ between 2 and 4 times per day.
+ %li
+ Allow rsync access to the mirror for the Xfce archive server (IP is
+ 138.48.2.107), so we can check the contents of the mirror.
+
+%h3 Inform us!
+%p
+ Before you can start to become a mirror, please create a bug in our
+ %a{:href => 'https://bugzilla.xfce.org'} Bug Tracker.
+ You'll need to sign up for an account, then create a new bug in
+ classicifation "WWW" and product "archive.xfce.org".
+%p
+ In the bug we will discuss if your mirror offer fills a need (while
+ we really appreciate it, it is unnecessary to have multiple mirrors
+ at the same location using the same connectivity). If it does the IP of your
+ server will be <strong>whitelisted</strong> on the main rsync mirror.
+
+%h3 Mirroring Techniques
+%p
+ We only support rsync for updating mirrors.
+%p
+ After your IP is whitelisted, update your mirror with:
+%pre
+ rsync -az --quiet --delete rsync://archive.xfce.org/archive.xfce.org /path/to/mirror
+
+%h3 Almost ready...
+%p
+ Once the site is configured, tested, and updating consistently, contact us
+ again (in the same bug) to give us rsync module information and HTTP
+ URL of your mirror. We will then add the mirror to MirrorBrain.
+%p
+ After a short while the mirror will appear in the
+ %a{:href => 'http://archive.xfce.org/xfce/4.8/fat_tarballs/xfce-4.8.tar.bz2.mirrorlist'} mirrorlist
+ pages.
+%p
+ Thanks!
diff --git a/fancyindex/views/index.haml b/fancyindex/views/index.haml
index 87d64eb..fb77392 100644
--- a/fancyindex/views/index.haml
+++ b/fancyindex/views/index.haml
@@ -1,70 +1,32 @@
-!!!
-%html{:xmlns => 'http://www.w3.org/1999/xhtml'}
- %head
- %meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}/
- %title Index of #{@archive.href}
- %link{:rel => 'stylesheet', :href => 'http://www.xfce.org/style/mirrorbrain.css', :media => 'all', :type => 'text/css'}/
- %link{:rel => 'shortcut icon', :href => '/favicon.ico'}/
- %body
- %div{:id => 'xfce-header'}
- %div
- %h1{:id => 'xfce-header-title'} Xfce Archive
- %h5{:id => 'xfce-header-subtitle'} Sub domains
-
- %ul
- %li
- %a{:href => 'http://www.xfce.org', :title => 'Go to the homepage'} Home
- %li
- %a{:href => 'http://docs.xfce.org', :title => 'Official documentation'} Docs
- %li
- %a{:href => 'http://archive.xfce.org', :title => 'Download location of tarballs', :class => 'active'} Archive
- %li
- %a{:href => 'http://wiki.xfce.org', :title => 'Community documentation'} Wiki
- %li
- %a{:href => 'http://forum.xfce.org', :title => 'Community forums'} Forum
- %li
- %a{:href => 'http://bugzilla.xfce.org', :title => 'Report and track bugs'} Bugs
- %li
- %a{:href => 'http://blog.xfce.org', :title => 'Visit the blog'} Blog
- %li
- %a{:href => 'http://translations.xfce.org', :title => 'Help translating the Xfce project'} Translate
- %li
- %a{:href => 'http://git.xfce.org', :title => 'Project repositories'} GIT
- %div{:id => 'xfce-header-clear'}
-
- %div{:id => 'mirrorbrain-wrap'}
- %h2 Index of #{@archive.hreflink}
- %table{:cellspacing => 0, :cellpadding => 3}
- %tr
- %th
- %th{:class => 'namecol'}
- %a{:href => "?C=N;O=#{@dir['N']}"} Name
- %th
- %a{:href => "?C=M;O=#{@dir['M']}"} Last modified
- %th
- %a{:href => "?C=S;O=#{@dir['S']}"} Size
- %th
- - if @archive.parent
- %tr
- %td
- %img{:src => '/public/up.png', :alt => 'up.png'}
- %td
- %a{:href => @archive.parent } Parent Directory
- %td
- %td -
- %td
- - for item in @archive.list_items
- %tr
- %td
- %img{:src => "/public/#{item.iconname}.png", :alt => item.iconname}
- %td{:nowrap => 'nowrap'}
- %a{:href => item.href } #{item.name}
- %td #{item.mtime}
- %td #{item.size}
- %td
- - href = item.mirrorlist
- - if href
- %a{:href => href} Details
- %hr
- %a{:href => 'http://mirrorbrain.org', :title => 'Powered by MirrorBrain'}
- %img{:src => '/public/mb.png', :alt => 'MirrorBrain', :border => 0, :align => 'right'}
+%h2 Index of #{@archive.hreflink}
+%table{:cellspacing => 0, :cellpadding => 3}
+ %tr
+ %th
+ %th{:class => 'namecol'}
+ %a{:href => "?C=N;O=#{@dir['N']}"} Name
+ %th
+ %a{:href => "?C=M;O=#{@dir['M']}"} Last modified
+ %th
+ %a{:href => "?C=S;O=#{@dir['S']}"} Size
+ %th
+ - if @archive.parent
+ %tr
+ %td
+ %img{:src => '/public/up.png', :alt => 'up.png'}
+ %td
+ %a{:href => @archive.parent } Parent Directory
+ %td
+ %td -
+ %td
+ - for item in @archive.list_items
+ %tr
+ %td
+ %img{:src => "/public/#{item.iconname}.png", :alt => item.iconname}
+ %td{:nowrap => 'nowrap'}
+ %a{:href => item.href } #{item.name}
+ %td #{item.mtime}
+ %td #{item.size}
+ %td
+ - href = item.mirrorlist
+ - if href
+ %a{:href => href} Details
diff --git a/fancyindex/views/layout.haml b/fancyindex/views/layout.haml
new file mode 100644
index 0000000..ad8b0f8
--- /dev/null
+++ b/fancyindex/views/layout.haml
@@ -0,0 +1,41 @@
+!!!
+- puts "renderlayout"
+%html{:xmlns => 'http://www.w3.org/1999/xhtml'}
+ %head
+ %meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}/
+ %title #{@title}
+ %link{:rel => 'stylesheet', :href => 'http://www.xfce.org/style/mirrorbrain.css', :media => 'all', :type => 'text/css'}/
+ %link{:rel => 'shortcut icon', :href => '/favicon.ico'}/
+ %body
+ %div{:id => 'xfce-header'}
+ %div
+ %h1{:id => 'xfce-header-title'} Xfce Archive
+ %h5{:id => 'xfce-header-subtitle'} Sub domains
+
+ %ul
+ %li
+ %a{:href => 'http://www.xfce.org', :title => 'Go to the homepage'} Home
+ %li
+ %a{:href => 'http://docs.xfce.org', :title => 'Official documentation'} Docs
+ %li
+ %a{:href => 'http://archive.xfce.org', :title => 'Download location of tarballs', :class => 'active'} Archive
+ %li
+ %a{:href => 'http://wiki.xfce.org', :title => 'Community documentation'} Wiki
+ %li
+ %a{:href => 'http://forum.xfce.org', :title => 'Community forums'} Forum
+ %li
+ %a{:href => 'http://bugzilla.xfce.org', :title => 'Report and track bugs'} Bugs
+ %li
+ %a{:href => 'http://blog.xfce.org', :title => 'Visit the blog'} Blog
+ %li
+ %a{:href => 'http://translations.xfce.org', :title => 'Help translating the Xfce project'} Translate
+ %li
+ %a{:href => 'http://git.xfce.org', :title => 'Project repositories'} GIT
+ %div{:id => 'xfce-header-clear'}
+
+ %div{:id => 'mirrorbrain-wrap'}
+ =yield
+ %hr
+ %a{:href => '/howtomirror'} Become a mirror!
+ %a{:href => 'http://mirrorbrain.org', :title => 'Powered by MirrorBrain'}
+ %img{:src => '/public/mb.png', :alt => 'MirrorBrain', :border => 0, :align => 'right'}
More information about the Xfce4-commits
mailing list