Skip to content

Commit 73fa976

Browse files
committed
Add a quick README
Signed-off-by: Michał Górny <[email protected]>
1 parent 80b6174 commit 73fa976

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

README.rst

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
====================================================
2+
Dockerfiles for building kernel/PyPy binary packages
3+
====================================================
4+
5+
6+
Configuration
7+
=============
8+
Before running any builds, you may want to create ``localconfig.bash``.
9+
This file is sourced automatically and contains environment variables
10+
to configure the builds. The common use is to define
11+
``DOCKER_HOST_${ARCH}`` variables, to list hosts used for builds, e.g.::
12+
13+
DOCKER_HOST_ARM64=ssh://jiji.arm.dev.gentoo.org
14+
DOCKER_HOST_PPC64LE=ssh://bogsucker.ppc64.dev.gentoo.org
15+
16+
All builds require ``local.diff`` file which is applied on top of
17+
``gentoo.git``. You prepare your changes, then do e.g.::
18+
19+
git diff origin > ${BINPKG_DOCKER}/local.diff
20+
21+
This is done automatically by ``bump-kernels`` script
22+
from mgorny-dev-scripts_.
23+
24+
25+
Building kernels
26+
================
27+
The usual way to build kernels is to prepare the bumps and write them
28+
into ``local.diff``, e.g. using::
29+
30+
bump-kernel 6.6.{7,8} 6.1.{68,69} 5.15.{143,143} 5.10.{204,205}
31+
32+
Then run the following target::
33+
34+
make ${ARCH}-gentoo-kernel-${VERSION}
35+
36+
Where ``ARCH`` is one of: ``amd64``, ``arm64``, ``ppc64le``, ``x86``,
37+
and ``VERSION`` is two-component version, e.g.::
38+
39+
make amd64-gentoo-kernel-{6.{6,1},5.{15,10}}
40+
41+
42+
Building PyPy
43+
=============
44+
Bump the main and ``-exe`` PyPy builds, and write the changes
45+
to ``local.diff``, e.g.::
46+
47+
cd dev-python/pypy-exe
48+
pkgbump pypy-exe-7.3.{13,14}.ebuild
49+
pkgcommit --bump
50+
cd ../pypy
51+
pkgbump pypy-7.3.{13,14}.ebuild
52+
pkgcommit --bump
53+
git diff origin > ${BINPKG_DOCKER}/local.diff
54+
55+
Afterwards run the target::
56+
57+
make ${ARCH}-pypy${SUFFIX}
58+
make ${ARCH}-musl-pypy${SUFFIX}
59+
60+
No suffix means building PyPy2.7, otherwise a suffix such as ``3_9``
61+
or ``3_10`` is to be used (matching package name).
62+
63+
64+
Transferring binary packages
65+
============================
66+
The ``rsync`` target is provided to copy ``~/binpkg`` tree from all
67+
Docker hosts to the current machine, and then to your devspace::
68+
69+
make rsync
70+
71+
72+
Build dependency cache
73+
======================
74+
When building dependencies, the process automatically keeps a cache
75+
of binary package within the image. For this cache to be useful,
76+
it needs to be copied to the host by running::
77+
78+
make ${ARCH}-kernel-sync
79+
80+
Then, when running builds one needs to start a web server with
81+
the packages::
82+
83+
python -m http.server -b 127.0.0.1 -d binpkg-cache/amd64 8787
84+
85+
86+
.. _mgorny-dev-scripts: https://github.com/projg2/mgorny-dev-scripts/

0 commit comments

Comments
 (0)