Comments (17)
直接在 /var/cache
里建立 cargo 和 sccache 目录,然后每次 build 的时候传 -d
参数给 makechrootpkg
,把 cache 目录 bind 进去,再对 makepkg
设置环境变量, 就像这样:
*-x86_64-build ... -- -d /var/cache/sccache -d /var/cache/cargo -- SCCACHE_DIR=/var/cache/sccache CARGO_HOME=/var/cache/cargo
是否可行?
但是怎样传正确的 PATH 给 makepkg 让它使用 sccache 呢?
from lilac.
权限呢?你试试看行不行?
PS: cargo 的 registry 也要共享,不然好像得每次打包都 clone 一份……还有包文件的缓存(就整个 ~/.cargo 共享好了)
from lilac.
权限除了 777 还没有想到更好的方法…毕竟 build 的时候是用 builduser。
共享了 CARGO_HOME 的下就包括了 registry 了吧(实际测试时 build 了两次 ydcv-rs,也只有一次更新过 index 和下载过 crates)?CARGO_HOME 的 registry/ 下包括了 index、src 和 cache 三个目录。我对 cargo 不太了解,本来是想解决 ccache 问题才看到这个 issue
from lilac.
builduser 好像就是当前用户耶。这样的话只要放我家里就可以了。我先拿 ~/.cargo 试试看,可以的话我继续加 ccache 什么的。
from lilac.
好像对 exa-git 有效,对 servo-git 无效呢。
from lilac.
servo-git 要 archlinuxcn-x86_64-build -- -d /home/zsrkmyn/.cargo:/build/.cargo -- CARGO_HOME=/build/.cargo
。
可以看 python/servo/command_base.py
里第 250 行。
from lilac.
或者是 python/servo/bootstrap_commands.py
的 372 行,我也不确定是哪里起的作用
from lilac.
你能弄明白它默认把 CARGO_HOME 设到哪里了么?
from lilac.
应该是 /build/servo-git/src/servo/.cargo
,就是 mach 文件所在目录。从 mach 的 mian()
里传进去的。
以下是废话……
在 python/mach_bootstrap.py
257 行定义了 populate_context
处理 'topdir'
,271 行作为 handler 传给 mach
对象,在 python/_virtualenv/lib/python2.7/site-packages/mach/main.py
380 行把该 handler 传给 context
实例的构造函数,142 行 ContextWrapper
中把这个 handler 设成了 context
对象的 _handler
属性,然后获取 context.topdir
的利用这个 handler 获取 topdir
。真麻烦 (
from lilac.
哦。也就是在 chroot 里边,打包好就被干掉了……这样的话,在打包脚本里设置环境变量更合理 @farseerfc
from lilac.
所以应该在 PKGBUILD 里设置 PATH 和 CARGO_HOME 变量吗?这样会不会很麻烦?直接通过 *-*-build 传进去呢?
from lilac.
就 servo 特殊啊。
from lilac.
但是 CARGO_HOME 本身对 cargo 也有效,man cargo
里有写。(虽然感觉除了 servo 一般不会去动这个环境变量
from lilac.
sscache 没实现,registry 和下载的包都应该共享好了。
from lilac.
第三方 repo呢?。。。
主要是有些git包的submodule每次都得下载一遍。。。
from lilac.
submodule 都是在 PKGBUILD 里处理的呀。
from lilac.
from lilac.
Related Issues (20)
- makepkg -od --noprepare 需要加上 -A参数
- pkgbuild.check_srcinfo对多arch的支持不好 HOT 14
- config中添加对nvchecker的细化配置
- Add a license statement HOT 24
- 当一个包更新时,同时更新依赖它的包 HOT 8
- The `vcs` nvchecker plugin uses no-longer existent "oldver" HOT 5
- add_xxx functions break string substitutions HOT 2
- Does lilac work with docker/ansible HOT 12
- Maintainer checker not working properly? HOT 2
- recv_gpg_keys: use another key server than keys.gnupg.net HOT 2
- Document for English HOT 4
- AUR packages can not be used HOT 3
- Does not run when python-pygitgub is installed HOT 2
- AUR Co-maintainers are not properly parsed
- Support for invoking commands when a build succeeded / failed. HOT 2
- giving options to use a custom pacman.conf HOT 7
- `lilac2.api.obtain_optdepends` 不能正常工作
- https://github.com/archlinuxcn/lilac/blob/master/usage.rst?plain=1#L50 is an invalid URL
- [Help] Enter a lilac user HOT 2
- Exit find comannd with non-zero code HOT 24
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lilac.