Setting up the build environment on HDD: Difference between revisions

From Alpine Linux
(use https links)
(Removed obsolete content and replaced with transclusion Include:Upgrading to Edge)
Line 1: Line 1:
== Introduction  ==
In earlier days, Alpine Linux used a separate Gentoo build environment. Install Alpine Linux in [[Setting up disks manually|System Disk]] mode i.e traditional or classic harddisk installation.
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.
Alternates methods are to setup a clean Alpine Linux 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 Linux, or may be something else.


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.
{{Tip| Alpine Linux can be [[Tutorials_and_Howtos#Desktop|configured to daily drive ]] as a development desktop system.}}


== Boot your build environment  ==
== Upgrade to edge ==
Boot the latest [https://alpinelinux.org/downloads Alpine Linux image] on a box with a HDD.


== Basic setup ==
{{:Include:Upgrading to Edge}}
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).
{{Cmd|setup-alpine}}


For more details, see [[Installation]] or [[setup-alpine]].
== Contribute ==


== Change your repository to use "edge" ==
Proceed to [[Creating_an_Alpine_package|create new package]] or [[Development using git:Creating patches|create and submit patches]] for Alpine Linux.
 
{{Cat|/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 [https://mirrors.alpinelinux.org/ mirror].}}
 
== 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 ==
Now you can move on to [[Creating_an_Alpine_package|creating packages for Alpine.]]


[[Category:Development]]
[[Category:Development]]
[[Category:Installation]]

Revision as of 14:14, 17 February 2025

In earlier days, Alpine Linux used a separate Gentoo build environment. Install Alpine Linux in System Disk mode i.e traditional or classic harddisk installation.

Alternates methods are to setup a clean Alpine Linux build environment inside another system, using a chroot or some form of virtualization. The host system may also be Alpine Linux, or may be something else.

Tip: Alpine Linux can be configured to daily drive as a development desktop system.

Upgrade to edge

An upgrade of Alpine Linux from a stable version to the rolling development version edge basically requires the same steps as Upgrading to latest release.

There are only two differences:-

  • When editing the /etc/apk/repositories file, all referenced repository versions (such as v3.22 or latest-stable) therein need to be pointing to edge as follows.

    Contents of /etc/apk/repositories

    #/media/cdrom/apks http://dl-cdn.alpinelinux.org/alpine/edge/main http://dl-cdn.alpinelinux.org/alpine/edge/community @testing http://dl-cdn.alpinelinux.org/alpine/edge/testing
  • When the upgrade completes, edge currently issues an encouragement to run a "/usr merge" script that would update the base filesystem hierarchy:
usr_merge_nag.sh: 
* WARNING: The current system is not /usr-merged. You are encouraged to
* migrate manually to ensure the best-possible support. See
* https://alpinelinux.org/posts/2025-10-01-usr-merge.html for more details
Applying this change should not affect general users. For background information on this process, consult the news release, including its listing of the types of installations that may be affected.
This update is not currently a requirement but will be implemented in the future.
To attempt its implementation with a dry run first that should foresee errors in execution:
# As per a standard system upgrade to Edge or to a new release
doas apk upgrade -aU    

# Install the script
doas apk add merge-usr

# Simulate the outcome of the merge: do a "dry run".  This would report any errors onscreen
doas merge-usr --dryrun

# If any error is reported, it would be appreciated if you could kindly open an issue at https://gitlab.alpinelinux.org/alpine/aports/–/issues/new 

# WARNING: The next step would be to run the script, but it is only to be run as long as the steps above were performed without any errors
doas merge-usr

# The script would no longer be required and may now be deleted from the system
doas apk del merge-usr

# Remember to sync and reboot, as per usual after a system upgrade
doas sync
doas reboot

Contribute

Proceed to create new package or create and submit patches for Alpine Linux.