From 2eff45c90b698b9da7a498f02ec7a1231c509d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=A0=E8=BD=B6=E7=BE=A4?= Date: Fri, 30 Jan 2015 11:59:57 +0800 Subject: [PATCH] move help from wiki to mirror site (many help left to be translated from moinmoin to markdown) --- index.html | 66 ++++++++++++++++++++++++++----------- static/js/marked.min.js | 6 ++++ wiki/aosp.md | 46 ++++++++++++++++++++++++++ wiki/aosp.wiki | 35 ++++++++++++++++++++ wiki/archlinuxcn.wiki | 24 ++++++++++++++ wiki/homebrew.wiki | 34 +++++++++++++++++++ wiki/linux.wiki | 23 +++++++++++++ wiki/nodesource.wiki | 16 +++++++++ wiki/pypi.wiki | 21 ++++++++++++ wiki/raspbian.wiki | 73 +++++++++++++++++++++++++++++++++++++++++ wiki/repo-ck.wiki | 24 ++++++++++++++ wiki/ubuntu.wiki | 47 ++++++++++++++++++++++++++ 12 files changed, 396 insertions(+), 19 deletions(-) create mode 100644 static/js/marked.min.js create mode 100644 wiki/aosp.md create mode 100644 wiki/aosp.wiki create mode 100644 wiki/archlinuxcn.wiki create mode 100644 wiki/homebrew.wiki create mode 100644 wiki/linux.wiki create mode 100644 wiki/nodesource.wiki create mode 100644 wiki/pypi.wiki create mode 100644 wiki/raspbian.wiki create mode 100644 wiki/repo-ck.wiki create mode 100644 wiki/ubuntu.wiki diff --git a/index.html b/index.html index aab1569..dc8c77a 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ 清华大学 TUNA 镜像源 - + @@ -16,6 +16,7 @@ + @@ -62,8 +63,8 @@ 清华用户您好,我们发现您正在通过校外线路访问 mirrors(可能是因为您设置了校外的DNS服务器), 为避免产生不必要的校外流量, - 建议您通过 http://mirrors.i.tuna.tsinghua.edu.cn/ - 访问和使用 TUNA mirrors 资源。 + 建议您通过 http://mirrors.i.tuna.tsinghua.edu.cn/ + 访问和使用 TUNA mirrors 资源。
@@ -72,13 +73,13 @@
  • 若您需要通过本站建立镜像,请提前联系管理员。
  • AOSP 镜像服务单 IP 并发数限制为 4, 因版权原因,我们无法提供 Android SDK 镜像,有任何疑问, 请联系管理员。
  • -
    +
    如果您有任何问题或建议,请发送邮件到 issues+mirrors@tuna.tsinghua.edu.cn, 或前往 https://issues.tuna.tsinghua.edu.cn/?queue=mirrors 反馈。
    If you have any issues, please email issues+mirrors@tuna.tsinghua.edu.cn, or submit a ticket via https://issues.tuna.tsinghua.edu.cn/?queue=mirrors.
    - +
    @@ -101,7 +102,7 @@ - +
    @@ -145,6 +146,20 @@
    + + @@ -152,8 +167,8 @@ {{mirrors}} - {{name}} - {{if help}} {{/if}} + {{name}} + {{if help}} {{/if}} {{last_update}} {{status}} @@ -171,17 +186,30 @@ $(document).ready(function(){ 'fail': 'label-warning' }; var help_page = { - 'AOSP': 'https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/android', - 'ubuntu': 'https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/ubuntu', - 'raspbian': 'https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/raspbian', - 'nodesource': 'https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/nodesource', - 'pypi': "https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/pypi", - 'archlinuxcn': 'https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/archlinuxcn', - 'linux.git': 'https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/linux.git', - 'homebrew': 'https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/homebrew', - 'repo-ck': 'https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/repo-ck' + 'AOSP': '/wiki/aosp.md', + + + + + + + + } + $('#HelpModal').on('show.bs.modal', function (event) { + var button = $(event.relatedTarget) // Button that triggered the modal + var help_url = button.data('help') + var modal = $(this) + $.get(help_url, function(data) { + if (help_url.match(/\.md$/)) { + data = marked(data) + } + + modal.find('.modal-body').html(data) + }) + }) + window.refreshMirrorList = function() { $.getJSON("/static/tunasync.json", function(data) { var mirrors = []; @@ -193,7 +221,7 @@ $(document).ready(function(){ } var result = Mark.up(mir_tmpl, {mirrors: mirrors}); $('#mirror-list').html(result); - $('#mirror-list i[data-toggle="tooltip"]').tooltip() + $('#mirror-list i[data-toggle2="tooltip"]').tooltip() }); setTimeout(refreshMirrorList, 10000); } @@ -201,7 +229,7 @@ $(document).ready(function(){ $.getJSON("/static/tunet.json", function(alert) { if (alert) { - $('#thu-alert').removeClass('hidden'); + $('#thu-alert').removeClass('hidden'); }; }); diff --git a/static/js/marked.min.js b/static/js/marked.min.js new file mode 100644 index 0000000..a5164c4 --- /dev/null +++ b/static/js/marked.min.js @@ -0,0 +1,6 @@ +/** + * marked - a markdown parser + * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) + * https://github.com/chjj/marked + */ +(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:cap[1]==="pre"||cap[1]==="script"||cap[1]==="style",text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=escape(this.smartypants(cap[0]));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
    "+(escaped?code:escape(code,true))+"\n
    "}return'
    '+(escaped?code:escape(code,true))+"\n
    \n"};Renderer.prototype.blockquote=function(quote){return"
    \n"+quote+"
    \n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); \ No newline at end of file diff --git a/wiki/aosp.md b/wiki/aosp.md new file mode 100644 index 0000000..62ce2a0 --- /dev/null +++ b/wiki/aosp.md @@ -0,0 +1,46 @@ +Android 镜像使用帮助 +==================== + +参考 Google 教程 , +将 `https://android.googlesource.com/` 全部使用 +`git://aosp.tuna.tsinghua.edu.cn/android/` 代替即可。 + +**本站资源有限,每个 IP 限制并发数为 4, 请勿使用 `repo sync -j8` +这样的方式同步。** + +替换已有的AOSP源代码的remote +---------------------------- + +如果你之前已经通过某种途径获得了AOSP的源码,但是你希望以后通过TUNA同步,只需要将 +`.repo/manifests.git/config` +中的 + + + url = https://android.googlesource.com/platform/manifest + + +改为下面的code即可: + + + url = git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest + + +**这个方法也可以用来在同步Cyanogenmod代码的时候从TUNA同步部分代码** + +FAQ +--- + +1\. 镜像的是什么? + +`. - 是按照 google 指南建立的镜像 git 仓库` + +2\. 为何不能通过浏览器访问? + +`. - 暂时没有 gitweb, 而且反正是 git bare 仓库,没有可以直接看到的内容` + +3\. 出现\`curl: (22) The requested URL returned error: 404 Not Found +Server does not provide clone.bundle; ignoring.\`怎么办? + +`. - 无视即可` + +------------------------------------------------------------------------ diff --git a/wiki/aosp.wiki b/wiki/aosp.wiki new file mode 100644 index 0000000..8e6b20a --- /dev/null +++ b/wiki/aosp.wiki @@ -0,0 +1,35 @@ +## page was renamed from MirrorHelp/android += Android 镜像使用帮助 = +参考 Google 教程 https://source.android.com/source/downloading.html, 将 `https://android.googlesource.com/` 全部使用 `git://aosp.tuna.tsinghua.edu.cn/android/` 代替即可。 + +'''本站资源有限,每个 IP 限制并发数为 4, 请勿使用 `repo sync -j8` 这样的方式同步。''' + +== 替换已有的AOSP源代码的remote == +如果你之前已经通过某种途径获得了AOSP的源码,但是你希望以后通过TUNA同步,只需要将{{{.repo/manifests.git/config}}}中的 + +{{{ + url = https://android.googlesource.com/platform/manifest +}}} +改为下面的code即可: + +{{{ + url = git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest +}}} + +'''这个方法也可以用来在同步Cyanogenmod代码的时候从TUNA同步部分代码''' +== FAQ == +1. 镜像的是什么? + + . - 是按照 google 指南建立的镜像 git 仓库 + +2. 为何不能通过浏览器访问? + + . - 暂时没有 gitweb, 而且反正是 git bare 仓库,没有可以直接看到的内容 + +3. 出现`curl: (22) The requested URL returned error: 404 Not Found Server does not provide clone.bundle; ignoring.`怎么办? + + . - 无视即可 + +---- +CategoryMirrorUsage + diff --git a/wiki/archlinuxcn.wiki b/wiki/archlinuxcn.wiki new file mode 100644 index 0000000..21eb83b --- /dev/null +++ b/wiki/archlinuxcn.wiki @@ -0,0 +1,24 @@ +## page was renamed from MirrorHelpTemplate +## 被“@”包围起来的是宏(macro),在你保存此页面的时候会替换掉。具体替换成什么你保存之后就知道了…… += ArchlinuxCN 镜像使用帮助 = + +Arch Linux 中文社区仓库 是由 Arch Linux 中文社区驱动的非官方用户仓库。包含中文用户常用软件、工具、字体/美化包等。 + +完整的包信息列表(包名称/架构/维护者/状态)请 [[https://github.com/archlinuxcn/repo|点击这里]] 查看。 + + * 官方仓库地址:http://repo.archlinuxcn.org + * 镜像地址: http://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/ + +使用方法:在 `/etc/pacman.conf` 文件末尾添加以下两行: + +{{{ +[archlinuxcn] +SigLevel = Optional TrustAll +Server = http://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch +}}} + +之后安装 `archlinuxcn-keyring` 包导入 GPG key。 + +---- +CategoryMirrorUsage + diff --git a/wiki/homebrew.wiki b/wiki/homebrew.wiki new file mode 100644 index 0000000..98bc1c6 --- /dev/null +++ b/wiki/homebrew.wiki @@ -0,0 +1,34 @@ +#acl +All:write += Homebrew 镜像使用帮助 = + +== 替换现有上游 == +{{{ +cd /usr/local +git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew.git +brew update +}}} +如果速度还是很慢,可以尝试以下操作: +{{{ +cd ~/tmp +git clone git://mirrors.tuna.tsinghua.edu.cn/homebrew.git +rm -rf /usr/local/.git +rm -rf /usr/local/Library +cp -R homebrew/.git /usr/local/ +cp -R homebrew/Library /usr/local/ +}}} +然后重试update。 + +== 使用homebrew-science或者homebrew-python == +{{{ +cd /usr/local/Library/Taps/homebrew/homebrew-science +git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew-science.git + +cd /usr/local/Library/Taps/homebrew/homebrew-python +git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew-python.git + +brew update +}}} + +---- +CategoryMirrorUsage + diff --git a/wiki/linux.wiki b/wiki/linux.wiki new file mode 100644 index 0000000..aaa89ba --- /dev/null +++ b/wiki/linux.wiki @@ -0,0 +1,23 @@ +## page was renamed from MirrorHelpTemplate +## 被“@”包围起来的是宏(macro),在你保存此页面的时候会替换掉。具体替换成什么你保存之后就知道了…… += Linux Kernel Git 镜像使用帮助 = + +如需克隆 linux 代码,使用 +{{{ +git clone git://mirrors.tuna.tsinghua.edu.cn/linux.git +}}} + +若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 +{{{ +git remote add tuna git://mirrors.tuna.tsinghua.edu.cn/linux.git +}}} + +或运行 +{{{ +git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/linux.git +}}} +将默认上游设置为 TUNA 镜像 + +---- +CategoryMirrorUsage + diff --git a/wiki/nodesource.wiki b/wiki/nodesource.wiki new file mode 100644 index 0000000..5bf4488 --- /dev/null +++ b/wiki/nodesource.wiki @@ -0,0 +1,16 @@ += Nodesource 镜像使用帮助 = + +Nodesource 为 debian, ubuntu, fedora, RHEL 等发行版提供预编译的 nodejs 和 npm 等软件包。 + +== debian/ubuntu 使用方法 == + +运行 +{{{ +curl -sL https://deb.nodesource.com/setup | sudo bash - +}}} + +编辑 `/etc/apt/sources.list.d/nodesource.list`,把 `https://deb.nodesource.com/node/` 替换为 `http://mirrors.tuna.tsinghua.edu.cn/nodesource/deb/` 即可。 + +---- +CategoryMirrorUsage + diff --git a/wiki/pypi.wiki b/wiki/pypi.wiki new file mode 100644 index 0000000..b9873ca --- /dev/null +++ b/wiki/pypi.wiki @@ -0,0 +1,21 @@ +## page was renamed from MirrorHelpTemplate +## 被“@”包围起来的是宏(macro),在你保存此页面的时候会替换掉。具体替换成什么你保存之后就知道了…… += pypi 镜像使用帮助 = + +pypi 镜像每 5 分钟同步一次。 + +== 临时使用 == +{{{ +pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package +}}} +注意,`simple` 不能少, 是 `https` 而不是 `http` +== 设为默认 == +修改 `~/.pip/pip.conf` (没有就创建一个), 修改 `index-url`至tuna,例如 +{{{ +[global] +index-url = https://pypi.tuna.tsinghua.edu.cn/simple +}}} + +---- +CategoryMirrorUsage + diff --git a/wiki/raspbian.wiki b/wiki/raspbian.wiki new file mode 100644 index 0000000..6f98d7c --- /dev/null +++ b/wiki/raspbian.wiki @@ -0,0 +1,73 @@ += Raspbian 镜像使用帮助 = + +== Raspbian 简介 == + +Raspbian 是专门用于 ARM 卡片式计算机 Raspberry Pi® “树莓派”的操作系统。 + +Raspberry Pi® “树莓派”是 2012 年问世的 ARM 计算机,旨在为儿童和所有的计算机爱好者提供一套廉价的编程学习与硬件 DIY 平台。树莓派基于 ARM11,具有 1080P 高清视频解析能力,附带用于硬件开发的 GPIO 接口,使用Linux操作系统。售价仅 $25~$35。 + +Raspbian 系统是 Debian 7.0/wheezy 的定制版本。得益于 Debian从7.0/wheezy 开始引入的“带硬件浮点加速的ARM架构”(armhf),Debian 7.0 在树莓派上的运行性能有了很大提升。Raspbian 默认使用 LXDE 桌面,内置 C 和 Python 编译器。 + +Raspbian 是树莓派的开发与维护机构 The Raspbeery Pi Foundation “树莓派基金会”,推荐用于树莓派的首选系统。 + +由于以下原因,Raspbian 需要单独组建软件仓库,而不能使用 Debian 的仓库: + * Debian下所有的软件包都需要用 armhf 重新编译。 + * 树莓派有部分特有的软件包,例如 BCM2835 CPU 的 GPIO 底层操作库。 + * 树莓派用户倾向于探索、尝试最新的软件。这与 Debian 软件源的策略完全不同。 + + +== 系统架构与版本 == + +架构: + * armhf + +版本: + * wheezy + * jessie + +注:Raspbian 系统由于从诞生开始就基于(为了armhf,也必须基于)当时还是 testing 版本的 7.0/wheezy,所以 Raspbian 不倾向于使用 stable/testing 表示版本。 + +== 使用说明 == + +基本与 Debian 一致。使用管理员权限(经由sudo),编辑 `/etc/apt/sources.list` 文件。参考命令行为: + +{{{ +pi@raspberrypi ~ $ sudo nano /etc/apt/sources.list +}}} + +删除原文件所有内容,用以下内容取代: + +{{{ +deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main non-free contrib +deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main non-free contrib +}}} + +注意:网址末尾的{{{raspbian}}}重复两次是必须的。因为Raspbian的仓库中除了APT软件源还包含其他代码。APT软件源不在仓库的根目录,而在{{{raspbian/}}}子目录下。 + +编辑镜像站后,请使用{{{sudo apt-get update}}}命令,更新软件源列表,同时检查您的编辑是否正确。 + +== 声明 == + +Raspbian是由独立开发者维护的,与树莓派硬件的开发与维护者The Raspberry Pi Foundation“树莓派基金会”并无直接联系。 + +== 相关链接 == +=== Raspbian 链接 === + * Raspbian主页: [[http://www.raspbian.org/]] + * 文档: [[http://www.raspbian.org/RaspbianDocumentation]] + * Bug Tracker: [[http://www.raspbian.org/RaspbianBugs]] + * 镜像列表: [[http://www.raspbian.org/RaspbianMirrors]] + * Debian首页: [[http://www.debian.org/]] + +=== 树莓派链接 === + * 树莓派基金会主页: [[http://www.raspberrypi.org/]] + * 树莓派基金会论坛Raspbian版块: [[http://raspberrypi.org/phpBB3/viewforum.php?f=66]] + +== 关于本文档 == + +本文档内容由 Raspberry Pi 中文社区“[[http://bbs.shumeipai.org|树莓爱好者论坛]]”提供。按照[[http://creativecommons.org/licenses/by-nc/3.0/cn/|知识共享署名-非商业性使用 3.0 中国大陆许可协议]]授权清华大学镜像站使用。 + + + +---- +CategoryMirrorUsage + diff --git a/wiki/repo-ck.wiki b/wiki/repo-ck.wiki new file mode 100644 index 0000000..a382e2e --- /dev/null +++ b/wiki/repo-ck.wiki @@ -0,0 +1,24 @@ +#acl +All:write += Archlinux repo-ck 镜像使用帮助 = + +[[http://repo-ck.com/|repo-ck]] 是 [[https://archlinux.org/|Arch]] 的非官方仓库,内有包含 ck 补丁、BFS 调度器等,通用或为特定CPU架构优化过的内核,以及内核相关的软件包,是居家旅行,优化折腾的必备良药。更多内容,参考 [[https://wiki.archlinux.org/index.php/repo-ck|ArchWiki]]。 + +== 食用方法 == + +在 `/etc/pacman.conf` 里添加 + +{{{ +[repo-ck] +Server = http://mirrors.tuna.tsinghua.edu.cn/repo-ck/$arch +}}} + +再增加 GPG 信任: +{{{ +pacman-key -r 5EE46C4C && pacman-key --lsign-key 5EE46C4C +}}} + +之后 `pacman -Sy` 即可。 + +---- +CategoryMirrorUsage + diff --git a/wiki/ubuntu.wiki b/wiki/ubuntu.wiki new file mode 100644 index 0000000..aa989cc --- /dev/null +++ b/wiki/ubuntu.wiki @@ -0,0 +1,47 @@ +## page was renamed from MirrorHelpTemplate +## 被“@”包围起来的是宏(macro),在你保存此页面的时候会替换掉。具体替换成什么你保存之后就知道了…… += Ubuntu 镜像使用帮助 = + +Ubuntu 的软件源配置文件是 `/etc/apt/sources.list`。将系统自带的该文件做个备份,将该文件替换为下面内容,即可使用 TUNA 的软件源镜像。 + +注意:Ubuntu 的版本代号(codename)是直接写在软件源配置文件中的,所以不同的版本所需的配置文件内容不通用。 +下面仅贴出了最常用的版本的可用配置文件,其余版本请自行做相应修改(参考[[#更多|这里]])。 + +=== 14.04 LTS === +{{{ +deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main multiverse restricted universe +deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe +deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe +deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main multiverse restricted universe +deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main multiverse restricted universe +deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main multiverse restricted universe +deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe +deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe +deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main multiverse restricted universe +deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main multiverse restricted universe +}}} + +=== 更多 === +更多版本的设置,请参看下表中列出的 Ubuntu 版本号和代号的对应关系,将上面的配置中的代号全部替换为相应代号即可。 + +|| 版本号 || 代号 || 完整代号 || +|| 8.04 LTS || hardy || Hardy Heron || +|| 10.04 LTS || lucid || Lucid Lynx || +|| 10.10 || maverick || Maverick Meerkat || +|| 11.04 || natty || Natty Narwhal || +|| 11.10 || oneiric || Oneiric Ocelot || +|| 12.04 LTS || precise || Precise Pangolin || +|| 12.10 || quantal || Quantal Quetzal || +|| 13.04 || raring || Raring Ringtail || +|| 13.10 || saucy || Saucy Salamander || +|| 14.04 LTS || trusty || Trusty Tahr || +|| 14.10 || utopic || Utopic Unicorn || + + +=== 参考 === +Ubuntu 相关内容参考自 http://mirror.bjtu.edu.cn/cn/howto.html + + +---- +CategoryMirrorUsage +