‘Smock’ 意思是更简单的 mock,是一个脚本,使 mock 可以在一个命令中编译多个 SRPM。 例如:
smock.pl --arch=i386 --arch=x86_64 \
--distro=fedora-9 --distro=fedora-10 \
*.src.rpm
上面的命令行将给定的 SRPM 按照 BuildRequires 排序,然后在四个不同的 mock 环境里(Fedora {9,10} {i386,x86_64}) 中编译。每个软件包编译后可以为后续的软件包所用。如果出现错误,只要重新开始(已编译的软件包会被跳过)。
脚本的作者是 Dan Berrange,我(Richard Jones)做了修改。我们在打包 MinGW 和 OCaml 过程中已经用了很久了。
根据 Seth Vidal,这个脚本的功能可能将被整合到 mock 中。
原文见 ANNOUNCE: Smock (simpler mock) – a mock wrapper for chain building
‘Smock’ stands for ‘simpler mock’. It’s a script that runs on top of
mock, allowing you to chain-build a series of RPMs from a single
command.
smock.pl --arch=i386 --arch=x86_64 \
--distro=fedora-9 --distro=fedora-10 \
*.src.rpm
The above command would arrange the SRPMs into the correct order
according to their BuildRequires, then build each in the four separate
mock environments Fedora {9,10} {i386,x86_64}. It makes the result of
each previous package build available to subsequent packages, and in
case of error it is fully restartable (it skips packages which have
already been built).The script was written by Dan Berrange and extensively hacked on by
me. This is how we've been building the MinGW & OCaml packages for
quite a while.Available from:
http://hg.et.redhat.com/misc/fedora-mingw--devel/
(click 'manifest' then 'smock')
Please read the README file!
Example output:
http://www.annexia.org/tmp/mingw/fedora-9/
Example wrapper script we use for MinGW:
http://hg.et.redhat.com/misc/fedora-mingw--devel/?f=d3dc6fa7cddd;file=build-everything-in-mock.sh
Commands we use for OCaml:
cd fedora
for f in ocaml*; do (cd $f/devel && make srpm); done
smock.pl --arch=i386 --arch=x86_64 --distro=fedora-rawhide \
ocaml*/devel/*.src.rpm
Rich.
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.