Skip to content

Commit 656ae38

Browse files
kouraulcd
andauthored
GH-45436: [Docs][Packaging][Linux] Update how to build .deb/.rpm (#45481)
### Rationale for this change If we can build .deb/.rpm, we can debug .deb/.rpm build easily. ### What changes are included in this PR? Update `dev/tasks/linux-packages/README.md`. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #45436 Lead-authored-by: Sutou Kouhei <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Co-authored-by: Raúl Cumplido <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
1 parent d1bf856 commit 656ae38

File tree

1 file changed

+79
-6
lines changed

1 file changed

+79
-6
lines changed

dev/tasks/linux-packages/README.md

+79-6
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,89 @@
2525
* Docker
2626
* Tools to build tar.gz for Apache Arrow C++ and GLib
2727

28-
## How to build .deb packages
28+
## How to build .deb packages for all supported platforms
29+
30+
```bash
31+
cd dev/tasks/linux-packages/apache-arrow
32+
rake version:update
33+
rake apt:build
34+
```
35+
36+
## How to build only specific .deb packages for supported platforms
37+
38+
The following command line shows all supported platforms, bear in mind
39+
to execute this command from your root `arrow` clone folder:
40+
41+
```bash
42+
for x in dev/tasks/linux-packages/apache-arrow/apt/{debian,ubuntu}*; do basename $x; done
43+
```
44+
45+
You can specify target platforms by setting `APT_TARGETS`:
46+
47+
```bash
48+
cd dev/tasks/linux-packages/apache-arrow
49+
rake version:update
50+
rake apt:build APT_TARGETS=debian-bookworm,ubuntu-noble
51+
```
52+
53+
## How to debug .deb packages build
54+
55+
You can use `apt:build:console` task to debug .deb packages build:
56+
57+
```bash
58+
cd dev/tasks/linux-packages/apache-arrow
59+
rake version:update
60+
rake apt:build:console APT_TARGETS=debian-bookworm
61+
```
62+
63+
It will show a Bash prompt. You can start .deb build by `/host/build.sh`:
2964

3065
```console
31-
% rake version:update
32-
% rake apt
66+
host$ rake apt:build:console APT_TARGETS=debian-bookworm
67+
container$ /host/build.sh
68+
```
69+
70+
You can keep the Bash session even when the .deb build failed. You can
71+
debug in the Bash session.
72+
73+
## How to build .rpm packages for all supported platforms
74+
75+
```bash
76+
cd dev/tasks/linux-packages/apache-arrow
77+
rake yum:build
78+
```
79+
80+
## How to build only specific .rpm packages for supported platforms
81+
82+
The following command line shows all supported platforms, bear in mind
83+
to execute this command from your root `arrow` clone folder:
84+
85+
```bash
86+
for x in dev/tasks/linux-packages/apache-arrow/yum/{alma,amazon,centos}*; do basename $x; done
3387
```
3488

35-
## How to build .rpm packages
89+
You can specify target platforms by setting `YUM_TARGETS`:
90+
91+
```bash
92+
cd dev/tasks/linux-packages/apache-arrow
93+
rake yum:build YUM_TARGETS=almalinux-9,amazon-linux-2023
94+
```
95+
96+
## How to debug .rpm packages build
97+
98+
You can use `yum:build:console` task to debug .rpm packages build:
99+
100+
```bash
101+
cd dev/tasks/linux-packages/apache-arrow
102+
rake yum:build:console YUM_TARGETS=almalinux-9
103+
```
104+
105+
It will show a Bash prompt. You can start .rpm build by `/host/build.sh`:
36106

37107
```console
38-
% rake version:update
39-
% rake yum
108+
host$ rake yum:build:console YUM_TARGETS=almalinux-9
109+
container$ /host/build.sh
40110
```
111+
112+
You can keep the Bash session even when the .rpm build failed. You can
113+
debug in the Bash session.

0 commit comments

Comments
 (0)