您的位置:首页 > 其它

使用layman来同步管理你远程的git,svn仓库的方法[原创]

2009-03-06 17:25 986 查看
我BLOG上的地址
linuxsir gentoo 版上的地址 http://www.linuxsir.org/bbs/thread345898.html
cat /etc/layman/oahong-gentoo.xml
代码:<?xml version="1.0" ?>
<layman>

<overlay
type = "git"
src = "git://gitorious.org/exherbo-cn/oahong-gentoo.git"
contact = "oahong@gmail.com"
status = "unofficial"
name = "oahong-gentoo">

<link>
//http://www.gitorious.org/projects/exherbo-cn
</link>

<description>
A collection of useful ebuilds from scratch.
</description>
</overlay>

</layman>rsync 版本 http://gentoo.o0o.nu/sectools.xml 这里可以下载
代码:<?xml version="1.0" encoding="UTF-8"?>
<layman>
<overlay type="rsync" src="rsync://gentoo.o0o.nu/sectools" contact="anton.bugs.gm@il.com" name="sectools">

<link> http://gentoo.o0o.nu/portage/ </link>
<description>Gentoo security tools overlay</description>

</overlay>
</layman>svn版本
代码:<layman>
<overlay name = "betelgeuse" status = "official"
contact = "betelgeuse@gentoo.org"
src = "https://overlays.gentoo.org/svn/dev/betelgeuse" type = "svn">
<link>https://overlays.gentoo.org/svn/dev/betelgeuse</link>
<description>Betelgeuse's developer overlay</description>
</overlay>简单的几个地方解释一下
代码:type = "git" <<<---- 这里是指远程仓库的类型,有svn, git, rsync, hg等
src = "git://gitorious.org/exherbo-cn/oahong-gentoo.git" <<<--- 这个是源地址很重要,会用git的朋友可能一眼就看明白了,比如在github把那个地址抄下来就是了
contact = "oahong@gmail.com" << --- 联系人
status = "unofficial" << --- 非官方仓库 (进官方了就不用自己弄了,嘿嘿)
name = "oahong-gentoo"> << --- overlay的名字,即是 layman -a overlay_name 要用到的,如果要空格的话layman -a " abcd efgh " 括起来,不过不建议这么用cat /etc/layman/layman.cfg
------------------------------------------------------------
代码:[MAIN]

#-----------------------------------------------------------
# Defines the directory where overlays should be installed

storage : /usr/local/portage/layman

#-----------------------------------------------------------
# Remote overlay lists will be stored here
# layman will append _md5(url).xml to each filename

cache : %(storage)s/cache

#-----------------------------------------------------------
# The list of locally installed overlays

local_list: %(storage)s/overlays.xml

#-----------------------------------------------------------
# Path to the make.conf file that should be modified by
# layman

make_conf : %(storage)s/make.conf

#-----------------------------------------------------------
# URLs of the remote lists of overlays (one per line) or
# local overlay definitions
#
#overlays : http://www.gentoo.org/proj/en/overlays/layman-global.txt # http://dev.gentoo.org/~wrobel/layman/global-overlays.xml # http://mydomain.org/my-layman-list.xml # file:///usr/portage/local/layman/my-list.xml

overlays : http://www.gentoo.org/proj/en/overlays/layman-global.txt http://github.com/joshuar/ephemeral-gentoo-overlay/tree/master%2Foverlay.xml?raw=true http://gentoo.o0o.nu/sectools.xml file:///etc/layman/oahong-gentoo.xml
#layman -f
#layman -a xxx

#-----------------------------------------------------------
# Proxy support
#
#proxy : http://[user:pass@]www.my-proxy.org:3128
#-----------------------------------------------------------
# Strict checking of overlay definitions
#
# Set either to "yes" or "no". If "no" layman will issue
# warnings if an overlay definition is missing either
# description or contact information.
#
nocheck : yes

#-----------------------------------------------------------
# Umask settings
#
# layman should usually work with a umask of 0022. You should
# only change this setting if you are absolutely certain that
# you know what you are doing.
#
#umask : 0022------------------------------------------------------------

layman -f
layman -a oahong-gentoo
cd /usr/local/portage/layman 去ls一下
以后layman -S 就帮忙把它给同步了

代码:在/etc/layman/layman.cfg文件中可以找到以下的备注信息
#overlays : http://www.gentoo.org/proj/en/overlays/layman-global.txt # http://dev.gentoo.org/~wrobel/layman/global-overlays.xml # http://mydomain.org/my-layman-list.xml # file:///usr/portage/local/layman/my-list.xml <<---- 因为拷到本地来使用,所以就选它了其实xml看了一下英文也没啥好解释的,参考http://www.gentoo.org/proj/en/overla...man-global.txt 抄一个相同类型的照猫画虎就成了
同步到layman的目录中,我一般是不相接加入 make.conf 里,只是建一个本地的overlay,因为会跟现在有一些仓库冲突,然后软链接过来使用
嘿嘿,很简单了吧,以后自己建一个git的仓库就可以用上这招了,让gentoo来得更方便一点吧
PS: 要是能加注彩色就棒了,目前只会 [ code ]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  #Gentoo
相关文章推荐