免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1671 | 回复: 0
打印 上一主题 下一主题

Creating an Android Mirror [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-27 09:45 |只看该作者 |倒序浏览
Creating an Android Mirror
1. Prerequisites/Assumptions
install repo git http://sites.google.com/a/android.com/opensource/download
2.Setting up a Git Server
    a.sudo apt-get install git-daemon
    b.change iptables, git-daemon use tcp port 9481
    sudo /sbin/iptables -A INPUT -p tcp -m tcp --dport 9481 -j ACCEPT
    c.config /etc/sv/git-daemon/run, to export git trees in "/opt/coderepo"
====================================================
#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec git-daemon --verbose --export-all --base-path=/opt/coderepo /opt/coderepo
====================================================
     restart git-daemon: sudo /etc/init.d/git-daemon retart
    d.git-dameon log file: /var/log/git-daemon/current
3. Using Git Behind a Firewall
install corkscrew  http://www.agroman.net/corkscrew
create a new file called "git-proxy.sh" with following contents and replace  and
==================================================
#!/bin/sh
exec /usr/bin/corkscew   $*
==================================================
chmod a+x git-proxy.sh
git config --global core.gitproxy '/git-proxy.sh'
to configure git to only use the proxy for specific URLs
git config --global core.gitproxy '"/git-proxy.sh" for kernel.org' 'for kernel.org$'
4. Create the mirror.
mkdir /opt/coderepo/myandroid
cd /opt/coderepo/myandroid
repo init -u git://android.git.kernel.org/platform/manifest.git --mirror
repo sync
5.change manifest.git config, if not , can not push code change
cd /opt/coderepo/myandroid/platform/manifest.git
edit config file, add following lines
[daemon]
    uploadpack=true
    uploadarch=true
    receivepack=true
6. change manifest.git
a.clone manifest.git
cd ~
git clone git://android.git.kernel.org/platform/manifest.git
b.Edit the file "~/manifest.git/default.xml"
 
 
   /myandroid/"
            review="review.source.android.com" />
   
c. commit and push this change.
git commit -a
git push git:///myandroid/platform/manifest.git
7. The setup of the mirror is now complete.  make a test
cd ~
mkdir testmirror
repo init -u git:///myandroid/platform/manifest.git
repo sync
8.References
http://www.kernel.org/pub/software/scm/git/docs/git-daemon.html
http://sites.google.com/a/android.com/opensource/download
http://sites.google.com/a/android.com/opensource/download/using-repo
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/92787/showart_2060961.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP