Setting up the build environment on HDD: Difference between revisions

From Alpine Linux
(→‎Introduction: Clarification on HDD-installation)
(use https links)
 
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= Setting up a 'edge' build environment on HDD =
== Introduction  ==
In earlier days, Alpine used a separate Gentoo build environment. Nowadays we build in Alpine itself, and things are much simpler.
 
We will host this build environment on a HDD installed Alpine, using the "edge" repository.


== Introduction  ==
Another method is to setup a clean Alpine build environment inside another system, using a [[Installing Alpine Linux in a chroot|chroot]] or some form of [[:Category:Virtualization|virtualization]]. The host system may also be Alpine, or may be something else.
We will host this build environment on a HDD installed Alpine.


== Boot you build environment  ==
== Boot your build environment  ==
Boot [http://dl-3.alpinelinux.org/alpine/v1.9/iso/alpine-1.9.0-i386.iso alpine-1.9.0] on a box with a HDD.<BR>
Boot the latest [https://alpinelinux.org/downloads Alpine Linux image] on a box with a HDD.


== Basic setup ==
== Basic setup ==
Set basic environment settings.
Set basic environment settings (when prompted for disk, select the disk(s) that you wish to use, and use them in sys mode.  Note that if you specify two disks, soft raid will be setup on them automatically).
setup-alpine
{{Cmd|setup-alpine}}


== Change repository ==
For more details, see [[Installation]] or [[setup-alpine]].
Change repository to use 'edge'
vi /etc/apk/repositories
The file should look like this
<PRE>
http://dl-4.alpinelinux.org/alpine/edge/packages/main/
http://dl-4.alpinelinux.org/alpine/edge/packages/testing/
http://dl-4.alpinelinux.org/alpine/edge/packages/x11/
</PRE>
'''''Note:''' You can replace 'dl-4' with some other available [[Downloads|mirror]].''


Update/upgrade your system
== Change your repository to use "edge" ==
apk update
apk upgrade


== Prepare HDD ==
{{Cat|/etc/apk/repositories|https://dl-4.alpinelinux.org/alpine/edge/main/
Install your system on HDD
https://dl-4.alpinelinux.org/alpine/edge/testing/
setup-disk
}}
Reboot your system


== Update repository ==
{{Note|You can replace 'dl-4' with some other available [https://mirrors.alpinelinux.org/ mirror].}}
Refresh the repository
 
apk update
== Update/upgrade your system ==
{{Cmd|apk update
apk upgrade}}
 
Next, [[setup your system and account for building packages]].
 
Then reboot your system.


== Start building packages ==
== Start building packages ==
Now you can move on to [[Creating_an_Alpine_package|creating packages for Alpine.]]
Now you can move on to [[Creating_an_Alpine_package|creating packages for Alpine.]]
[[Category:Development]]
[[Category:Installation]]

Latest revision as of 11:33, 7 August 2023

Introduction

In earlier days, Alpine used a separate Gentoo build environment. Nowadays we build in Alpine itself, and things are much simpler.

We will host this build environment on a HDD installed Alpine, using the "edge" repository.

Another method is to setup a clean Alpine build environment inside another system, using a chroot or some form of virtualization. The host system may also be Alpine, or may be something else.

Boot your build environment

Boot the latest Alpine Linux image on a box with a HDD.

Basic setup

Set basic environment settings (when prompted for disk, select the disk(s) that you wish to use, and use them in sys mode. Note that if you specify two disks, soft raid will be setup on them automatically).

setup-alpine

For more details, see Installation or setup-alpine.

Change your repository to use "edge"

Contents of /etc/apk/repositories

https://dl-4.alpinelinux.org/alpine/edge/main/ https://dl-4.alpinelinux.org/alpine/edge/testing/
Note: You can replace 'dl-4' with some other available mirror.

Update/upgrade your system

apk update apk upgrade

Next, setup your system and account for building packages.

Then reboot your system.

Start building packages

Now you can move on to creating packages for Alpine.