archlinuxcn / lilac Goto Github PK
View Code? Open in Web Editor NEWLilac is the build bot for archlinuxcn
License: GNU General Public License v3.0
Lilac is the build bot for archlinuxcn
License: GNU General Public License v3.0
syringa has been built successfully: https://build.archlinuxcn.org/packages/#/syringa
But every time lilac running, I will got an error report:
{"logger_name": "nvchecker.core", "name": "syringa", "event": "unexpected error happened", "level": "error"}
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/nvchecker/core.py", line 152, in worker
ret = await get_version(name, conf, keyman=self.keymanager)
File "/usr/lib/python3.7/site-packages/nvchecker/get_version.py", line 62, in get_version
version = await func(name, conf, **kwargs)
File "/usr/lib/python3.7/site-packages/nvchecker/source/github.py", line 24, in get_version
check_ratelimit(e, name)
File "/usr/lib/python3.7/site-packages/nvchecker/source/github.py", line 22, in get_version
return await get_version_real(name, conf, **kwargs)
File "/usr/lib/python3.7/site-packages/nvchecker/source/github.py", line 64, in get_version_real
async with session.get(url, headers=headers, **kwargs) as res:
File "/usr/lib/python3.7/site-packages/nvchecker/source/tornado_httpclient.py", line 62, in __aenter__
return await to_asyncio_future(client.fetch(self.req))
tornado.httpclient.HTTPClientError: HTTP 404: Not Found
I'm not so sure what's wrong with it, can you have a look ?
重现方式
$git reset --hard
HEAD is now at c990c5d config.ini: don't override my env variable
$cp config.ini.sample config.ini
$./lilac
[E 09-16 22:34:24.999 lilac:462] unexpected error
Traceback (most recent call last):
File "./lilac", line 455, in <module>
setup()
File "./lilac", line 450, in setup
os.chdir(REPODIR)
FileNotFoundError: [Errno 2] No such file or directory: '/path/to/gitrepo'
$./lilac
[E 09-16 22:34:42.695 lilac:462] unexpected error
Traceback (most recent call last):
File "./lilac", line 455, in <module>
setup()
File "./lilac", line 440, in setup
lockit()
File "./lilac", line 68, in lockit
lock = os.open(mydir+'/.lock', os.O_WRONLY | os.O_CREAT, 600)
PermissionError: [Errno 13] Permission denied: '/home/petron/.lilac/.lock'
AUR上的很多包的某些支持都是只写optdepends的
如果能自动加到makedepends就能打开这些支持
作为binary源应该还是默认打开所有支持的吧?
如 archlinuxcn/repo#929
除此之外我还见过某些包有不提供PKGBUILD只提供arch binaries的。
Waiting for archlinuxcn/repo#883.
能添加一下包描述吗?
这是用来干嘛的
This is how current Lilac resolves dependencies:
Lines 53 to 61 in 8746570
It cannot resolve dependencies more than two layers. An example is lxqt-panel-git, whose dependency tree is:
lxqt-panel-git
lxqt-globalkeys-git
liblxqt-git
libqtxdg-git
libsysstat-git
A solution (workaround?) is using archlinux-x86_64
as the build prefix.
看了下Lilac的代碼,修好這個問題似乎得改不少地方,因此先開個坑,有空再研究。
Here is the traceback:
[D 01-20 18:19:43.732 lilaclib:386] running ['recv_gpg_keys'], not using pty, showing output
Traceback (most recent call last):
File "lilac.py", line 13, in <module>
single_main()
File "/home/stephen/worktmp/lilac_test/lilaclib.py", line 380, in single_main
accept_noupdate = True,
File "/home/stephen/worktmp/lilac_test/lilaclib.py", line 282, in lilac_build
recv_gpg_keys()
File "/home/stephen/worktmp/lilac_test/lilaclib.py", line 453, in recv_gpg_keys
run_cmd(['recv_gpg_keys'])
File "/home/stephen/worktmp/lilac_test/lilaclib.py", line 394, in run_cmd
p = subprocess.Popen(cmd, stdout = stdout, stderr = subprocess.STDOUT)
File "/usr/lib/python3.4/subprocess.py", line 858, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.4/subprocess.py", line 1456, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'recv_gpg_keys'
And here, I find a way to solve it:
diff --git a/lilaclib.py b/lilaclib.py
index b3a3c21..f9f47e7 100644
--- a/lilaclib.py
+++ b/lilaclib.py
@@ -450,4 +450,4 @@ def build_prefix_to_arch(cmd):
return 'x86_64'
def recv_gpg_keys():
- run_cmd(['recv_gpg_keys'])
+ run_cmd([os.path.join(os.path.realpath(os.path.dirname(__file__)), 'recv_gpg_keys')])
就是现在有两个包a
, b
第一个需要
depends=['b']
第二个需要
depends=['a']
这时候lilac会怎么处理呢?
PS. 严格来说a
是b
的依赖,b
是a
的可选依赖,但是如果b
作为a
的依赖的话,a
会开启额外的编译支持
devtools 里面的 xxx-build 系列似乎都不支持参数的样子。
之前在寫倉庫中的lilac.py的時候,時不時會碰到PKGBUILD中部分變量(主要是depends
和mekedepends
)不正確/完整的問題。
雖說理論上應該等上游(對於我的幾例來說就是AUR)修改,但有時候上游修改太慢,所以有時直接就在lilac.py中修改了,直到上游修正再改回去。
這樣,那部分工具函數就要複製過來過去地,稍顯累贅。故而想是否可以將其加入lilac代碼庫中,以便重用、訂正以及更多人使用。
這裏基本上是直接將之前用的代碼複製過來,並增加了兩個入口函數(add_depends
和add_makedepends
)。
如果認爲可以合併的話,現在還有兩個問題:
edit_file
)移至(另一個?)次級模塊中的某個地方?如题
希望可以有lilac --no-email --no-git-push这样的参数。。
比如在keras的PKGBUILD中
pkgrel="1"
如果通过修改成下面任意
pkgrel=1.1
pkgrel="1.1"
来trigger rebuild,build出来的都是
pkgrel="1"
archrepo2也不会识别rebuild出来的包
通过lilac.py去掉引号也是如此
情况是包a
是包b
的依赖,包b
是包c
的依赖
所以b/lilac.py
中
depends = ['a']
c/lilac.py
中
depends = ['b']
然而如果此时a
不存在的话,会产生报错邮件
软件包 b 的 lilac.py 指定了 depends,然而其中的 [Dependency(pkgdir=PosixPath('/path/to/repo/a'), pkgname='a')] 并不在本仓库中。
这个没什么问题,但还会收到一封
软件包 c 的 lilac.py 指定了 depends,然而其中的 [Dependency(pkgdir=PosixPath('/path/to/repo/a'), pkgname='a')] 并不在本仓库中。
这个就有一点迷惑了,因为c/lilac.py
中并没有写
depends = ['a', 'b']
就是lilac中的379-380行
if need_update:
run_cmd(['nvtake', nvchecker_file] + list(need_update))
是不是应该改成:
if update_succeeded:
run_cmd(['nvtake', nvchecker_file] + list(update_succeeded))
?
如题
一开始的时候
命令执行失败!
命令 ['extra-x86_64-build', '--', '-I',
...
'--', '--holdver'] 返回了错误号 255。命令的输出如下:
:: Synchronizing package databases...
core is up to date
extra 1653.9 KiB 11.3M/s 00:00 [######################] 100%
community 4.5 MiB 11.2M/s 00:00 [######################] 100%
之后
编译命令输出如下:
:: Synchronizing package databases...
core is up to date
extra 1653.9 KiB 11.3M/s 00:00 [######################] 100%
community 4.5 MiB 11.2M/s 00:00 [######################] 100%
感觉十分冗余。。。
之前出过一些问题,所以我的系统里 $PYTHONPATH
是空的,现在我想在自己的电脑上学习并使用 lilac
打包,设置 $PYTHONPATH
真的必须吗?
求各位解答,非常感谢! 🙇 @lilydjwg @zsrkmyn @farseerfc
之前遇到的问题:
好几个软件包(anaconda, docear, cppreference-qt, android-sdk-build-tools) 4:40 PM收到lilac发的错误邮件,内容都一样:
发生未知错误!调用栈如下:
Traceback (most recent call last):
File "/home/lilydjwg/bin/lilac", line 89, in build_package
depends = DEPENDS.get(package, ()),
File "/home/lilydjwg/soft/lilac/lilaclib.py", line 351, in lilac_build
call_build_cmd(bp, depend_packages, pkgs_to_build)
NameError: name 'bp' is not defined
不知道是不是已经修复?
比如
build_prefix=['extra-x86_64', 'extra-i686']
是否支持呢?
https://github.com/archlinuxcn/lilac/blob/master/lilaclib.py#L253
除了添加.gitignore中的文件外,
还有其他可能会出错吗
另外我觉得这些文件是不是没添加上也ok呢?
就是说except里直接pass可不可以呢
I encountered a problem yesterday that the moe lilac sent me a e-mail to remind me the that vim-youcompleteme-git was failed to build AGAIN! The error occured while runing makepkg -od
.
I did a research and found it was mainly due to the existing of the old $srcdir
generated by last runing of makepkg -od
, and a patch was applied twice:
==> 正在开始 prepare()...
-> Setting up Git submodules...
patching file YouCompleteMe/autoload/youcompleteme.vim
patching file ycmd/default_settings.json
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file ycmd/default_settings.json.rej
==> 错误: 在 prepare() 中发生一个错误。
正在放弃...
Since the file to be patched is actually in a git submodule, It keeps patched (but not reset to the origin one at the process of extracting sources) at the second time makepkg -od
running. The submodule in PKGBUILD is initialized as the wiki says.
I think about some solutions, but don't know which is best:
git submodule init
in PKGBUILD. However, this is unnacessary in most cases and may make PKGBUILD a little bit confusing.$srcdir
(or more specifically, remove it) in lilac.py
. However, due to the different setting of BUILDDIR
in ~/.makepkg.conf
or /etc/makepkg.conf
, it is not easy to obtain the location where the $srcdir
is.makepkg -od --noprepare
here. This is a bit tricky and since pkgver()
is executed after prepare()
, pkgver
may be wrongly acquired by lilac due to the skip of prepare()
.makepkg -odc
at the line mentioned above. This force makepkg
remove the $srcdir
after obtaining the sources and running pkgver()
to update PKGBUILD. (I prefer this)So, which one is preferable?
As discussed in #13
具体来说,是
在調整其他時發現,api.py
中的single_main()
函數調用lilac_build()
時未傳入depends
參數。
所以這個意思是當使用single_main()
時depends = [...]
不會被考慮?還是說我漏掉了什麼東西?
我的朋友Canplayer(昵称)决定为lilac设计一组Logo。现在草案有如下几个(原谅我没有整齐地排列它们),有建议、抑或需要完全重新设计可以提出,也请一同决定最后的Logo样式。Logo暂定为CC-BY 3.0协议。
-------------------------分割线-------------------------
@lilydjwg @MarvelousBlack @OriginCode 朋友给加了包之后是这样
-------------------------分割线-------------------------
使用打包丝带的版本:
#!/bin/sh
sed -e 's/^M$//g' -e 's/^.*^M//g' -e 's/^[(B//g' -e 's/^[\[[0-9]*[mK]//g' -e 's/ *$//g' -i "$@"
sed '/^____/{:i;s/\n/^M/;N;/\n____/bi;s/^.*^M//}' -i "$@"
干掉了色彩输出和各种进度条
最后一行是我在编译tensorflow时遇到的,多数情况应该不需要
depends
in lilac.py
currently doesn't recurse, so one has to list all indirect dependent packages as well.
如题,我在mpv-git使用的auto bump代码感觉效果还挺好的。。。
我正在想可不可以把那个设置成默认的行为?
目前想到的问题有:
rebuild
文件)比如我添加了一个新的包a到repo, 然后lilac a
会报错unknown packages: {'a'}
其实是因为 No such file or directory: repodir+'/a'
理论上说只要先git pull就好了...
因为 cargo-git 依赖 rust-git,而 rust-git 也有更新。
现在lilac的log转存文件那里感觉很不美观
是基于重定向的,应该是为了适配run_cmd的输出
所以我们能不能把run_cmd的输出改用logger输出?
这样我们可以只通过加一个handler就能把log转存到文件,
并且如果使用RotatingFileHandler的话,还可以只存最近若干次的log
包括 register、第三方 repo、已下载的文件。如果能共享编译结果就更好的(sccache)。
如题,希望可以
depends = ['blah']
timeout = 7200 #2h
这样
主要是最近收到了chromium-dev的报错邮件
发生未知错误!调用栈如下:
Traceback (most recent call last):
File "/home/lilydjwg/soft/lilac/lilac", line 174, in build_package
bindmounts = BIND_MOUNTS,
File "/home/lilydjwg/soft/lilac/lilaclib.py", line 435, in lilac_build
call_build_cmd(build_prefix, depend_packages, bindmounts)
File "/home/lilydjwg/soft/lilac/lilaclib.py", line 464, in call_build_cmd
build_output = run_cmd(cmd, use_pty=True)
File "/home/lilydjwg/soft/lilac/lilaclib.py", line 509, in run_cmd
r = os.read(rfd, 4096)
File "/home/lilydjwg/scripts/python/pylib/myutils.py", line 175, in timed_out
raise TimeoutError
TimeoutError
然后我在build机上完整build了一遍
archlinuxcn-x86_64-build 115740.41s user 4526.14s system 2245% cpu 1:29:16.75 total
话说之前提到的默认用zstd做pacman默认压缩的事情咋样了啊。。。
什么时候换zstd啊,我们可以提前跟进么?
如题。
类似的还有add_makedepends
不修改PKGBUILD的前提下
$ cat update-submodules.sh
#!/bin/bash
gitname=$1
[ -z "$2" ] && branch=master || branch=$2
[ ! -d $gitname ] && makepkg --verifysource && rmdir src
cd $gitname
if [ `git config --get core.bare` == "true" ]
then
mkdir .git
mv * .git
git config --local --bool core.bare false
git checkout $branch
fi
git reset --hard HEAD~1
git pull origin $branch
git submodule update --init
for i in `git submodule status | awk '{print $2}'`
do
git config --file=.gitmodules submodule.$i.url "$(realpath .)/$i"
done
git add .
git commit -m 'makepkg'
#extra-x86_64-build -- -D `realpath $gitname`
可以重复利用submodule
抛砖引玉了。。。
就是列一下要写哪些。。目前已知的有
还有啥
如题
问题出在wps-office的时候
PKGEXT=".pkg.tar"
Traceback (most recent call last):
File "/home/lilydjwg/bin/lilac", line 111, in build_package
depends = DEPENDS.get(package, ()),
File "/home/lilydjwg/soft/lilac/lilaclib.py", line 412, in lilac_build
raise Exception('no package built')
Exception: no package built
我手上有些包可以从网上自动下载sum...比如说类似于这样的PKGBUILD
_sha1="$(curl https://www.giss.nasa.gov/tools/panoply/download/Panoply-${pkgver}.sha1.txt 2>/dev/null | grep 'PanoplyJ..zip' | grep -o '^[^ ]')"
sha1sums=("${_sha1}"
...
update_pkgver_and_pkgrel貌似会强制makepkg -g 然后updpkgsum,不知道可不可以让它变成可选项。默认还是自动updpkgsum啦,但是如果能够给定一个参数的话,可以只update pkgver,不update sum
现在只发一个TimeoutError,应该把*-build
的log有多少发多少吧?
在 lilac2/api.py
的第27行,有一個單獨成行且非調用的 git_push
。
不知它在那是什麼用處?
我看 cmd.py
裏它是一個函數,所以好像這樣放在那沒任何用?
比方说,lilac.py中指明了
depends=['python2-a']
python2-a与python-a由同一个PKGBUILD打出来的,package base叫a
所以我在repo中添加了a/PKGBUILD及a/package.list
python-a
python2-a
但是此时lilac.py的check_depends中的_check_dir无法检测到python2-a这个文件夹
于是就报错了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.