设为首页
收藏本站
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
平台
Portal
论坛
BBS
文库
项目
群组
Group
我的博客
Space
搜索
搜索
热搜:
shell
linux
mysql
本版
用户
LinuxSir.cn,穿越时空的Linuxsir!
»
论坛
›
Linux 发行版讨论区 —— LinuxSir.cn
›
Gentoo Linux
›
使用layman来同步管理你远程的git,svn仓库的方法[分享] ...
返回列表
查看:
2965
|
回复:
7
使用layman来同步管理你远程的git,svn仓库的方法[分享]
[复制链接]
axlrose
axlrose
当前离线
积分
1466
IP卡
狗仔卡
发表于 2009-3-6 17:40:30
|
显示全部楼层
|
阅读模式
我BLOG上的地址
http://hi.baidu.com/3444542/blog ... c8a7dbfc1f10e4.html
linuxsir gentoo 版上的地址
http://www.linuxsir.cn/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/overlays/layman-global.txt
抄一个相同类型的照猫画虎就成了
同步到layman的目录中,我一般是不相接加入 make.conf 里,只是建一个本地的overlay,因为会跟现在有一些仓库冲突,然后软链接过来使用
嘿嘿,很简单了吧,以后自己建一个git的仓库就可以用上这招了,让gentoo来得更方便一点吧
PS: 要是能加注彩色就棒了,目前只会 [ code ]
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
显身卡
zhllg
zhllg
当前离线
积分
8505
IP卡
狗仔卡
发表于 2009-3-7 00:43:10
|
显示全部楼层
很好,很好!
回复
支持
反对
使用道具
举报
显身卡
aiezue
aiezue
当前离线
积分
39
IP卡
狗仔卡
发表于 2009-3-9 09:12:54
|
显示全部楼层
好贴支持!回去就搞
回复
支持
反对
使用道具
举报
显身卡
wd_afei
wd_afei
当前离线
积分
2326
IP卡
狗仔卡
发表于 2009-3-9 09:36:22
|
显示全部楼层
我觉得这个做法好奇怪。。。。
update 那几个 repo , 写个脚本也就2分钟的事情。。。何必。。
回复
支持
反对
使用道具
举报
显身卡
zxbing
zxbing
当前离线
积分
63
IP卡
狗仔卡
发表于 2009-3-9 12:57:10
|
显示全部楼层
有时间试一下
回复
支持
反对
使用道具
举报
显身卡
sheep204
sheep204
当前离线
积分
1156
IP卡
狗仔卡
发表于 2009-3-9 13:46:42
|
显示全部楼层
支持一下,自己用不上,但是了解了 !
回复
支持
反对
使用道具
举报
显身卡
Adbear
Adbear
当前离线
积分
41
IP卡
狗仔卡
发表于 2010-1-6 18:55:09
|
显示全部楼层
很好啊,收藏了
回复
支持
反对
使用道具
举报
显身卡
yyh3345
yyh3345
当前离线
积分
104
IP卡
狗仔卡
发表于 2010-1-7 20:23:27
|
显示全部楼层
很好,使用了.
回复
支持
反对
使用道具
举报
显身卡
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
浏览过的版块
Debian Linux
Redhat/Fedora/CentOS Linux
服务器架设、应用、维护
Linux 程序设计专题讨论
Linux 基础讨论区(新手速成)
开源软件专题讨论
Copyright © 2002-2023
LinuxSir.cn
(http://www.linuxsir.cn/) 版权所有 All Rights Reserved.
Powered by
RedflagLinux!
技术支持:
中科红旗
|
京ICP备19024520号
快速回复
返回顶部
返回列表