<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=EvanCarroll</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=EvanCarroll"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/EvanCarroll"/>
	<updated>2026-04-25T23:41:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Include:Abuild-keygen&amp;diff=18667</id>
		<title>Include:Abuild-keygen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Include:Abuild-keygen&amp;diff=18667"/>
		<updated>2021-02-19T05:46:21Z</updated>

		<summary type="html">&lt;p&gt;EvanCarroll: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For abuild a public/private rsa key pair is needed. &amp;lt;tt&amp;gt;abuild-keygen&amp;lt;/tt&amp;gt; does the generation of those keys for you.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|abuild-keygen -a -i}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;abuild-keygen options&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;-a&#039;&#039;&#039;  Set PACKAGER_PRIVKEY=&amp;lt;generated key&amp;gt; in abuild.conf&lt;br /&gt;
* &#039;&#039;&#039;-i&#039;&#039;&#039;  Install public key into /etc/apk/keys using sudo&lt;br /&gt;
* &#039;&#039;&#039;-h&#039;&#039;&#039;  Show this help&lt;br /&gt;
* &#039;&#039;&#039;-n&#039;&#039;&#039;  Non-interactive. Use defaults&lt;br /&gt;
* &#039;&#039;&#039;-q&#039;&#039;&#039;  Quiet mode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating keys manually ====&lt;br /&gt;
&lt;br /&gt;
In older versions of Alpine, we had to manually create keys for signing packages and indexes. This explains how. Nowadays you can just use &amp;lt;code&amp;gt;abuild-keygen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Since the public key needs to be unique for each developer, the email address should be used as name for the public key.&lt;br /&gt;
&lt;br /&gt;
Create the private key:&lt;br /&gt;
{{cmd|openssl genrsa -out &#039;&#039;emailaddress.priv&#039;&#039; 2048}}&lt;br /&gt;
&lt;br /&gt;
{{tip|Append &#039;&#039;-aes256&#039;&#039; if you want it encrypted, but then you&#039;ll need to enter the password for every package you sign}}&lt;br /&gt;
&lt;br /&gt;
Create the public key:&lt;br /&gt;
{{cmd|openssl rsa -in &#039;&#039;emailaddress.priv&#039;&#039; -pubout -out /etc/apk/keys/&#039;&#039;emailaddress&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
The public key should be distributed and installed into {{Path|/etc/apk/keys}} on the alpine box that will install the packages.  The private key, when created by &amp;lt;code&amp;gt;abuild&amp;lt;/code&amp;gt;, is installed into {{Path|~/.abuild/$something.rsa}}. This basically means that the main developer&#039;s public keys should be in {{Path|/etc/apk/keys}} on all Alpine boxes.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>EvanCarroll</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Include:Abuild-keygen&amp;diff=18666</id>
		<title>Include:Abuild-keygen</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Include:Abuild-keygen&amp;diff=18666"/>
		<updated>2021-02-19T05:45:41Z</updated>

		<summary type="html">&lt;p&gt;EvanCarroll: added note about the default for private key&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For abuild a public/private rsa key pair is needed. &amp;lt;tt&amp;gt;abuild-keygen&amp;lt;/tt&amp;gt; does the generation of those keys for you.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|abuild-keygen -a -i}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;abuild-keygen options&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;-a&#039;&#039;&#039;  Set PACKAGER_PRIVKEY=&amp;lt;generated key&amp;gt; in abuild.conf&lt;br /&gt;
* &#039;&#039;&#039;-i&#039;&#039;&#039;  Install public key into /etc/apk/keys using sudo&lt;br /&gt;
* &#039;&#039;&#039;-h&#039;&#039;&#039;  Show this help&lt;br /&gt;
* &#039;&#039;&#039;-n&#039;&#039;&#039;  Non-interactive. Use defaults&lt;br /&gt;
* &#039;&#039;&#039;-q&#039;&#039;&#039;  Quiet mode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating keys manually ====&lt;br /&gt;
&lt;br /&gt;
In older versions of Alpine, we had to manually create keys for signing packages and indexes. This explains how. Nowadays you can just use &amp;lt;code&amp;gt;abuild-keygen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Since the public key needs to be unique for each developer, the email address should be used as name for the public key.&lt;br /&gt;
&lt;br /&gt;
Create the private key:&lt;br /&gt;
{{cmd|openssl genrsa -out &#039;&#039;emailaddress.priv&#039;&#039; 2048}}&lt;br /&gt;
&lt;br /&gt;
{{tip|Append &#039;&#039;-aes256&#039;&#039; if you want it encrypted, but then you&#039;ll need to enter the password for every package you sign}}&lt;br /&gt;
&lt;br /&gt;
Create the public key:&lt;br /&gt;
{{cmd|openssl rsa -in &#039;&#039;emailaddress.priv&#039;&#039; -pubout -out /etc/apk/keys/&#039;&#039;emailaddress&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
The public key should be distributed and installed into {{Path|/etc/apk/keys}} on the alpine box that will install the packages.  The private key, when created by {{cmd|abuild}}, is installed into {{Path|~/.abuild/$something.rsa}}. This basically means that the main developer&#039;s public keys should be in {{Path|/etc/apk/keys}} on all Alpine boxes.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>EvanCarroll</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Include:Setup_your_system_and_account_for_building_packages&amp;diff=18665</id>
		<title>Include:Setup your system and account for building packages</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Include:Setup_your_system_and_account_for_building_packages&amp;diff=18665"/>
		<updated>2021-02-18T19:37:12Z</updated>

		<summary type="html">&lt;p&gt;EvanCarroll: That&amp;#039;s what sudo -e is for.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The {{Pkg|alpine-sdk}} is a metapackage that pulls in the most essential packages used to build new packages. Install those packages now: &lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add alpine-sdk sudo}}&lt;br /&gt;
&lt;br /&gt;
This would be a good time to create a normal user account for you to work in. (You weren&#039;t going to develop as root now, were you!) To create the user:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|adduser &amp;lt;yourusername&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To make life easier later, it&#039;s a good idea to add this user to {{Path|/etc/sudoers}}. Append the line&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;yourusername&amp;gt;    ALL=(ALL) ALL&lt;br /&gt;
&lt;br /&gt;
using the command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|visudo}}&lt;br /&gt;
&lt;br /&gt;
Now logout of the root account, and login as &amp;lt;yourusername&amp;gt;. From here on everything can be done in a normal user account, and operations that require superuser privileges can be done with sudo.&lt;br /&gt;
&lt;br /&gt;
The [[Aports_tree|aports tree]] is in git so before we clone the it, let&#039;s configure git.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git config --global user.name &amp;quot;Your Full Name&amp;quot;&lt;br /&gt;
git config --global user.email &amp;quot;your@email.address&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
Read carefully [[Development using git]] to grasp basic Git operations and how to configure for sending email patches.&lt;br /&gt;
&lt;br /&gt;
Now we can clone the [[Aports_tree|aports tree]]. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone https://gitlab.alpinelinux.org/alpine/aports}}&lt;br /&gt;
&lt;br /&gt;
Before we start creating or modifying [[APKBUILD_Reference|APKBUILD]] files, we need to setup abuild for our system and user. Edit the file {{Path|abuild.conf}} to your requirements:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|sudo -e /etc/abuild.conf}}&lt;br /&gt;
&lt;br /&gt;
Most of the defaults can be left alone, unless you are developing for a custom platform, in which case the comments in the file should guide you. The one field to edit is PACKAGER, so that you can get credit (or blame) for packages you create.&lt;br /&gt;
&lt;br /&gt;
To use &#039;abuild -r&#039; command to install dependency packages automatically.&lt;br /&gt;
{{Cmd|sudo addgroup &amp;lt;yourusername&amp;gt; abuild}}&lt;br /&gt;
&lt;br /&gt;
We also need to prepare the location where the build process caches files when they are downloaded. By default this is {{Path|/var/cache/distfiles/}}. To create this directory and ensure that it is writeable, enter the following commands:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|sudo mkdir -p /var/cache/distfiles&lt;br /&gt;
sudo chmod a+w /var/cache/distfiles}}&lt;br /&gt;
&lt;br /&gt;
As an alternative to the second command, you can add yourself to the abuild group:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|sudo chgrp abuild /var/cache/distfiles&lt;br /&gt;
sudo chmod g+w /var/cache/distfiles}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Remember to logout and login again for the group change to have effect.}}&lt;br /&gt;
&lt;br /&gt;
The last step is to configure the security keys with the [[Abuild-keygen|abuild-keygen]] script for [[Abuild|abuild]] with the command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|abuild-keygen -a -i}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>EvanCarroll</name></author>
	</entry>
</feed>