ebuild学习记录

由于chrom os 是基于gentoo linux 的ebuild 进行包管理的所以想要在chrom os安装一些插件和库,就逃不掉ebuild的魔掌

 

建立自己的 Overlay

假设在 /us/local 目录中创建自己的 Overlay,方式是:

# mkdir -p /usr/local/portage

需要将 Overlay 路径告知 Portage 管理系统,即在 /etc/make.conf 文件中添加以下代码:

PORTDIR_OVERLAY="/usr/local/portage"                  #通过这个文件也可以知道本环境中已有的OVERLAY路径

为了让我们的 Overlay 能够被 Portage 管理系统所接受,需要在 /usr/local/portage 中创建 metadata 子目录,并在该目录内添加内容为 masters = gentoo 的 layout.conf 文件[1],并且存储库不应该自动同步(因为它不受rsync服务器,git镜像或其他存储库源的支持):即:

# mkdir  /usr/local/portage/metadata
masters  =  gentoo 
auto-sync  =  false

最后,还需要在 `/usr/local/portage 中创建 profiles 子目录,并在该目录内添加 repo_name 文件。我们可以在这份文件中设置 Overlay 名称,只需将 Overlay 名称写入该文件即可。例如,我将我的 Overlay 命名为 garfileo

# echo "garfileo" > /usr/local/portage/profiles/repo_name

通过在/etc/portage/repos.conf中创建存储库配置文件来启用本地系统上的存储库,通知Portage可以找到本地存储库的位置:
文件 /etc/portage/repos.conf/localrepo.conf

[localrepo] 
location  =  / usr / local / portage

在ebuild中不使用网络下载而使用本地包。


将准备好的包源文件(例如foo-1.0.tar.bz2)放到固定目录下(例如:/mnt/host/source/.cache/distfiles/target/)。

在ebuild文件中修改SRC_URI参数使它指向我们准备好的包文件,例如:

SRC_URI="file:///mnt/host/source/.cache/distfiles/target/foo-1.0.tar.bz2"        (注意file:后面是三个/)

然后加上: 

RESTRICT="mirror"      使ebuild编译安装过程中不使用镜像链接下载而是使用SRC_URI指定的链接下载对应包文件。   参考:  http://forums.gentoo.org/viewtopic-t

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Fetching upstream changes from git@github. com:a792883583/treeHoleScore.git > /usr/bin/git --version # timeout=10 > git --version # 'git version 1.8.3.1' using GIT _ASKPASS to set credentials github > /usr/bin/git fetch --tags --progress git@github. com:a792883583/treeHoleScore.git +refs/heads/*:refs/remotes/origin/* # timeout=10 ERROR: Error fetching remote repo 'origin' hudson. plugins.git.GitException: Failed to fetch from git@github. com:a792883583/treeHoleScore.git at hudson. plugins . git .GitSCM. fetchFrom(GitSCM. java:1003) at hudson. plugins .git .GitSCM. retrieveChanges(GitSCM. java:1245) at hudson.plugins.git.GitsCM. checkout(GitSCM. java:1309) at hudson.scm. SCM. checkout(SCM. java:540) at hudson. mode1. AbstractProject . checkout(AbstractProject . java:1240) at hudson. model AbstractBuild$AbstractBuildExecution. def aultCheckout (AbstractBuild. java:649) at jenkins .scm. SCMCheckoutStrategy . checkout(SCMCheckoutStrategy . java:85) at hudson . model. AbstractBuild$AbstractBuildExecution. run(AbstractBuild. java:521) at hudson.model . Run. execute(Run. java:1900) at hudson.model. FreeSty1eBuild.run(FreeStyleBuild.java:44) at hudson. model. ResourceController . execute(ResourceController . java:101) at hudson. model. Executor .run(Executor. java:442) Caused by: hudson. plugins.git .GitException: Command "/usr/bin/git fetch --tags --progress git@github . com: a792883583/treeHoleScore.git +refs/heads/* :refs/remotes/origin/*" returned status code 128: stdout: stderr: Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci .plugins.gitclient .CliGitAPIImp1.1aunchCommandIn(CliGitAPImp1.java:2734) at org.jenkinsci .plugins.gitclient .CliGitAPIImp1.1aunchCommandWithCredentials(CliGitAPIImpl.java:2111) at org.jenkinsci.plugins . gitclient .CliGitAPIImp1$1. execute(CliGitAPIImp1.java:623) at hudson.p1ugins . git .GitSCM. fetchFrom (GitSCM. java:1001) 11 more ERROR: Error fetching remote repo ' origin' Finished: FAILURE
最新发布
02-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值