<?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=CarloMonte</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=CarloMonte"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/CarloMonte"/>
	<updated>2026-04-25T18:31:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=24411</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=24411"/>
		<updated>2023-08-23T06:47:51Z</updated>

		<summary type="html">&lt;p&gt;CarloMonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Move|Git|All git development articles should be consolidated}}&lt;br /&gt;
&lt;br /&gt;
This document describes how to use [https://git-scm.com git] for Alpine Linux development and related projects. If you just want to browse the Alpine git repositories, please visit [https://git.alpinelinux.org/aports git.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
== Basic Git usage ==&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Configuration}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with colored output use:&lt;br /&gt;
 {{Cmd|git config --global color.ui true&lt;br /&gt;
git config --global core.pager more}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with proxy server:&lt;br /&gt;
 {{Cmd|git config --global http.proxy &amp;lt;nowiki&amp;gt;http://proxy_ip:proxy_port&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Cloning a repository via Git ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to work with the Alpine git repository...&lt;br /&gt;
&lt;br /&gt;
* ...without write access.&lt;br /&gt;
* ...with write access.&lt;br /&gt;
&lt;br /&gt;
[https://git.alpinelinux.org/aports git.alpinelinux.org] shows all available Alpine git repositories.&lt;br /&gt;
&lt;br /&gt;
=== Without write access ===&lt;br /&gt;
&lt;br /&gt;
If you want to clone the Alpine aports repository, switch to the directory you want to have the &#039;&#039;aports/&#039;&#039; directory in and launch git.&lt;br /&gt;
 &lt;br /&gt;
{{Cmd|git clone &amp;lt;nowiki&amp;gt;git://git.alpinelinux.org/aports.git&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are using proxy server:&lt;br /&gt;
 {{Cmd|git clone https://git.alpinelinux.org/aports}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you want only the last 3 revisions:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone &amp;lt;nowiki&amp;gt;git://git.alpinelinux.org/aports.git&amp;lt;/nowiki&amp;gt; --depth 3}}&lt;br /&gt;
&lt;br /&gt;
Use the command below to see the full log of the trunk. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|git log}}&lt;br /&gt;
&lt;br /&gt;
=== Submitting work without write access ===&lt;br /&gt;
&lt;br /&gt;
You can still [https://wiki.alpinelinux.org/wiki/Creating_patches submit a patch] without write access to the Alpine repository. For this you need to create an account on Alpine&#039;s GitLab, fork the desired repository (the fork resides on the server), clone the fork on your computer, make your changes into a separate branch, push the squashed branch to the fork (as branch; do not merge/rebase it into the master!) and create a merge request for that branch through the GitLab Web GUI.&lt;br /&gt;
&lt;br /&gt;
=== With write access ===&lt;br /&gt;
&lt;br /&gt;
If you have write access to the Alpine repository, the URL needs to be adjusted for cloning a repository&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone git@git.alpinelinux.org:aports}}&lt;br /&gt;
&lt;br /&gt;
Alternatively you can set the remote url of an exisiting git clone:&lt;br /&gt;
{{Cmd|git remote set-url origin git@git.alpinelinux.org:aports}}&lt;br /&gt;
&lt;br /&gt;
== General GIT Workflow ==&lt;br /&gt;
# Make your file edits in your local checkout of the local copy of repository.&lt;br /&gt;
# Commit the changes in your local repository: {{Cmd|git commit}}&lt;br /&gt;
# Bring the rest of your local repository up to date: {{Cmd|git pull --rebase}}&lt;br /&gt;
# Check what you are going to push: {{Cmd|git log origin..master}}&lt;br /&gt;
# Move your changes up to the master if you have write access {{Cmd|git push}} or [[Creating_patches|create a patch]] if not.&lt;br /&gt;
&lt;br /&gt;
== Other related articles ==&lt;br /&gt;
&lt;br /&gt;
* [[Development_using_git:Basic_usage| Basic usage]]&lt;br /&gt;
* [[Package Maintainers]]&lt;br /&gt;
* [[Creating patches]]&lt;br /&gt;
* [[Development_using_git:Developer_repositories|Developer repositories]]&lt;br /&gt;
* [[Development_using_git:Cgit| Using Cgit]]&lt;br /&gt;
* [[Development using git:Quality assurance]]&lt;br /&gt;
* [[Gitolite]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
{{:Development_using_git:Documentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Git]]&lt;/div&gt;</summary>
		<author><name>CarloMonte</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Patch_Workflow&amp;diff=24358</id>
		<title>Patch Workflow</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Patch_Workflow&amp;diff=24358"/>
		<updated>2023-08-16T06:44:43Z</updated>

		<summary type="html">&lt;p&gt;CarloMonte: /* My patch got rejected. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a &#039;&#039;&#039;very draft&#039;&#039;&#039; docs that aims to have a defined workflow for sending and applying patch.&lt;br /&gt;
&lt;br /&gt;
It provides a background both for alpine developers and contributors.&lt;br /&gt;
&lt;br /&gt;
It&#039;s in the form of FAQ, but it might be changed with a better approach.&lt;br /&gt;
&lt;br /&gt;
Also, a graphical workflow would be useful. A nice idea is here: [https://sourceware.org/glibc/wiki/Patch%20Review%20Workflow]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== I want to contribute to Alpine project by sending patches.  How can i do this? == &lt;br /&gt;
&lt;br /&gt;
First of all, thanks :)&lt;br /&gt;
&lt;br /&gt;
Please, take a look at [[Development_using_git]] and docs linked to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How should i submit a patch to alpine-aports ML?  == &lt;br /&gt;
&lt;br /&gt;
You can follow this document: [[Creating_patches]]&lt;br /&gt;
&lt;br /&gt;
Please note that Patchwork is able to catch the patch if they are sent inline, rather than as attachment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ok, now i&#039;ve an aports git tree ready and i&#039;ve sent a patch to alpine-aports ML. And now? ==&lt;br /&gt;
&lt;br /&gt;
Well done. Now the patch is in our workflow.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve sent the patch, it is going to be injected in patchwork.alpinelinux.org.&lt;br /&gt;
&lt;br /&gt;
There&#039;s a web interface where you can see all the patches sent to git.&lt;br /&gt;
&lt;br /&gt;
From there,  alpine delevopers will check the patch and proceed accordingly.&lt;br /&gt;
&lt;br /&gt;
Workflow status are:&lt;br /&gt;
&lt;br /&gt;
New:&lt;br /&gt;
    Patch has been submitted to the list, and none of the maintainers has changed it&#039;s state since. Under Review:: &lt;br /&gt;
Accepted:&lt;br /&gt;
    When a patch has been applied to a custodian repository that gets used for pulling from into upstream, they are put into &amp;quot;accepted&amp;quot; state. &lt;br /&gt;
Rejected:&lt;br /&gt;
    Rejected means we just don&#039;t want to do what the patch does. &lt;br /&gt;
RFC:&lt;br /&gt;
    The patch is not intended to be applied to any of the mainline repositories, but merely for discussing or testing some idea or new feature. &lt;br /&gt;
Not Applicable:&lt;br /&gt;
    The patch does not apply cleanly against the current U-Boot repository, most probably because it was made against a much older version of U-Boot, or because the submitter&#039;s mailer mangled it (for example by converting TABs into SPACEs, or by breaking long lines). &lt;br /&gt;
Changes Requested:&lt;br /&gt;
    The patch looks mostly OK, but requires some rework before it will be accepted for mainline. Awaiting Upstream:: &lt;br /&gt;
Superseeded:&lt;br /&gt;
    Patches are marked as &#039;superseeded&#039; when the poster submits a new version of these patches. &lt;br /&gt;
Deferred:&lt;br /&gt;
    Deferred usually means the patch depends on something else that isn&#039;t upstream, such as patches that only apply against some specific other repository. &lt;br /&gt;
Archived:&lt;br /&gt;
    Archiving puts the patch away somewhere where it doesn&#039;t appear in the normal pages and needs extra effort to get to. &lt;br /&gt;
&lt;br /&gt;
We also can put patches in a &amp;quot;bundle&amp;quot;. I don&#039;t know yet if that has any deeper sense but to mark them to be handled together, like a patch series that logically belongs together. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Set &amp;quot;approved&amp;quot; on webif does not have an impact on the git tree.&lt;br /&gt;
If is actually approved, after pwclient git-am the state of the patch will automatically be changed to &amp;quot;approved&amp;quot;.&lt;br /&gt;
This is the right way to change state.&lt;br /&gt;
Generally speaking, change the state on webif is not needed.&lt;br /&gt;
Webpage only report what the user does with pwclient tool.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== I&#039;m an alpine developer. How can I start to use patchwork ? ==  &lt;br /&gt;
&lt;br /&gt;
There are two ways to work with patches from alpine-aports Mailing List:&lt;br /&gt;
&lt;br /&gt;
.1 Web Interface: https://patchwork.alpinelinux.org/{{dead link}}&lt;br /&gt;
&lt;br /&gt;
.2 On your local build environment, you need pwclient:&lt;br /&gt;
&lt;br /&gt;
    apk add pwclient &lt;br /&gt;
    cd $your_aports_dir&lt;br /&gt;
    pwclient list&lt;br /&gt;
&lt;br /&gt;
This command returns the list of patches sent to alpine-aports@lists.alpinelinux.org and injected in patchwork workflow.&lt;br /&gt;
&lt;br /&gt;
look at the patch:&lt;br /&gt;
&lt;br /&gt;
    pwclient view $PATCH_ID.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s assume is 66:&lt;br /&gt;
&lt;br /&gt;
    pwclient view 66&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
host:~/aports$ pwclient view 66&lt;br /&gt;
Content-Type: text/plain; charset=&amp;quot;utf-8&amp;quot;&lt;br /&gt;
MIME-Version: 1.0&lt;br /&gt;
Content-Transfer-Encoding: 7bit&lt;br /&gt;
Subject: [alpine-aports] testing/proxychains-ng: install and install-config&lt;br /&gt;
 returns 1 in case of error&lt;br /&gt;
From: Francesco Colista &amp;lt;fcolista@alpinelinux.org&amp;gt;&lt;br /&gt;
X-Patchwork-Id: 66&lt;br /&gt;
Message-Id: &amp;lt;1430294296-26952-1-git-send-email-fcolista@alpinelinux.org&amp;gt;&lt;br /&gt;
To: alpine-aports@lists.alpinelinux.org&lt;br /&gt;
Cc: Francesco Colista &amp;lt;fcolista@alpinelinux.org&amp;gt;&lt;br /&gt;
Date: Wed, 29 Apr 2015 07:58:16 +0000&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
 testing/proxychains-ng/APKBUILD | 5 ++---&lt;br /&gt;
 1 file changed, 2 insertions(+), 3 deletions(-)&lt;br /&gt;
&lt;br /&gt;
diff --git a/testing/proxychains-ng/APKBUILD b/testing/proxychains-ng/APKBUILD&lt;br /&gt;
index 463a2ac..b40ba25 100644&lt;br /&gt;
--- a/testing/proxychains-ng/APKBUILD&lt;br /&gt;
+++ b/testing/proxychains-ng/APKBUILD&lt;br /&gt;
@@ -2,7 +2,7 @@&lt;br /&gt;
 # Maintainer: Francesco Colista &amp;lt;fcolista@alpinelinux.org&amp;gt;&lt;br /&gt;
 pkgname=proxychains-ng&lt;br /&gt;
 pkgver=4.8.1&lt;br /&gt;
-pkgrel=0&lt;br /&gt;
+pkgrel=1&lt;br /&gt;
 pkgdesc=&amp;quot;This tool provides proxy server support to any app.&amp;quot;&lt;br /&gt;
 url=&amp;quot;https://github.com/rofl0r/proxychains-ng&amp;quot;&lt;br /&gt;
 arch=&amp;quot;all&amp;quot;&lt;br /&gt;
@@ -36,8 +36,7 @@ build() {&lt;br /&gt;
 &lt;br /&gt;
 package() {&lt;br /&gt;
        cd &amp;quot;$_builddir&amp;quot;&lt;br /&gt;
-       make DESTDIR=&amp;quot;$pkgdir&amp;quot; install&lt;br /&gt;
-       make DESTDIR=&amp;quot;$pkgdir&amp;quot; install-config&lt;br /&gt;
+       make DESTDIR=&amp;quot;$pkgdir&amp;quot; install install-config || return 1&lt;br /&gt;
        ln -s proxychains4 &amp;quot;$pkgdir&amp;quot;/usr/bin/proxychains&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it looks fine, try to apply the patch, first, in your git tree, and test it.&lt;br /&gt;
&lt;br /&gt;
There are three ways to apply patch in the local tree. We are going to show all of them...then choose what is more fitting for you.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;.1 pwclient apply&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; pwclient apply command apply patch using -p1. So patch is applied starting from the current dir.&lt;br /&gt;
    pwclient apply 66&lt;br /&gt;
This apply patch in your local git tree.&lt;br /&gt;
Then you can:&lt;br /&gt;
    abuild -r.&lt;br /&gt;
If patch is ok, then you need to reset the your git tree (because it got modified by applying the patch).&lt;br /&gt;
so: &lt;br /&gt;
    git checkout --&lt;br /&gt;
then &lt;br /&gt;
    pwclient git-am 66&lt;br /&gt;
&lt;br /&gt;
this apply and commit the patch in one shot.&lt;br /&gt;
&lt;br /&gt;
Last step is pushing the change to git repo with:&lt;br /&gt;
    git pull--rebase &amp;amp;&amp;amp; git push&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;.2 pwclient get&#039;&#039;&#039;&lt;br /&gt;
    pwclient get 66&lt;br /&gt;
update the APKBUILD in order to apply the patch, then build it with the usual:&lt;br /&gt;
&lt;br /&gt;
    abuild -r&lt;br /&gt;
&lt;br /&gt;
If patch is ok, then you need to reset the your git tree (because it got modified by applying the patch).&lt;br /&gt;
so: &lt;br /&gt;
    git checkout --&lt;br /&gt;
then &lt;br /&gt;
    pwclient git-am 66&lt;br /&gt;
&lt;br /&gt;
this apply and commit the patch in one shot.&lt;br /&gt;
&lt;br /&gt;
Last step is pushing the change to git repo with:&lt;br /&gt;
    git pull--rebase &amp;amp;&amp;amp; git push&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;.3 pwclient git-am&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This can be done by:&lt;br /&gt;
    pwclient git-am 66&lt;br /&gt;
&lt;br /&gt;
Since this command aply and commits directly as already stated before, the last step is pushing the change to git repo with:&lt;br /&gt;
    git pull--rebase &amp;amp;&amp;amp; git push &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patch does not apply. And now? ==&lt;br /&gt;
If you have used &lt;br /&gt;
    pwclient apply&lt;br /&gt;
or &lt;br /&gt;
    pwclient get&lt;br /&gt;
Then you shoud go for:&lt;br /&gt;
    git checkout&lt;br /&gt;
&lt;br /&gt;
If you have used&lt;br /&gt;
    pwclient git-am&lt;br /&gt;
&lt;br /&gt;
Then patch is committed, so you need to &lt;br /&gt;
    git reset HEAD@{1}&lt;br /&gt;
This uses the last entry in the reflog.&lt;br /&gt;
If you did other things in between, look at:&lt;br /&gt;
    git reflog&lt;br /&gt;
to see which number corresponds to which commit.&lt;br /&gt;
&lt;br /&gt;
== Oh, looks that someone else already applied the patch while i was going to do it. Now, when i try to git pull --rebase, i got: &amp;quot;It looks like git-am is in progress. Cannot rebase.&amp;quot; and now? ==&lt;br /&gt;
&lt;br /&gt;
    git am --abort&lt;br /&gt;
&lt;br /&gt;
== I sent a patch that was already applied.  ==&lt;br /&gt;
 &lt;br /&gt;
At the moment, patchwork does not allow to comment reasons for a state change (it&#039;s in their todo list)&lt;br /&gt;
&lt;br /&gt;
So, we can simple set it as &amp;quot;Not Applicable&amp;quot; (since &amp;quot;Duplicate&amp;quot; does not exists)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== My patch got rejected. == &lt;br /&gt;
 &lt;br /&gt;
You&#039;ll be alerted via email about that.&lt;br /&gt;
You can ask why patch is got rejected on #alpine-devel IRC channel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Git]]&lt;/div&gt;</summary>
		<author><name>CarloMonte</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Udhcpc&amp;diff=24357</id>
		<title>Udhcpc</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Udhcpc&amp;diff=24357"/>
		<updated>2023-08-16T06:42:39Z</updated>

		<summary type="html">&lt;p&gt;CarloMonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Expand|Please help us expand this article by contributing.}}&lt;br /&gt;
&lt;br /&gt;
You may want to customize the behavior of the default DHCP client (&amp;lt;code&amp;gt;udhcpc&amp;lt;/code&amp;gt; from busybox), which is called by &amp;lt;code&amp;gt;/sbin/ifup&amp;lt;/code&amp;gt; by having &amp;quot;&amp;lt;code&amp;gt;dhcp&amp;lt;/code&amp;gt;&amp;quot; in &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The default behavior is driven by the script &amp;lt;code&amp;gt;/usr/share/udhcpc/default.script&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Entries in &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt; for DHCP interfaces will drive the &amp;lt;code&amp;gt;udhcpc&amp;lt;/code&amp;gt; command line. For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
        hostname myhostname&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will set these parameters on the command line:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-i eth0 -x hostname:myhostname&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The hostname will send the DHCP option to the server to tell the server the name of this client.&lt;br /&gt;
&lt;br /&gt;
The documentation for &amp;lt;code&amp;gt;udhcpc&amp;lt;/code&amp;gt; can be found in [https://udhcp.busybox.net/README.udhcpc the busybox udhcpc readme file]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add arbitrary command line parameters to the &amp;lt;code&amp;gt;udhcpc_opts&amp;lt;/code&amp;gt; setting in &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;. See the example of &amp;lt;code&amp;gt;udhcpc_opts&amp;lt;/code&amp;gt; in [[Configure Networking#IPv4 DHCP Configuration|the main networking article]].&lt;br /&gt;
&lt;br /&gt;
The default configuration of &amp;lt;code&amp;gt;udhcpc&amp;lt;/code&amp;gt; may be overridden by &amp;lt;code&amp;gt;/etc/udhcpc/udhcpc.conf&amp;lt;/code&amp;gt;. Please see &amp;lt;code&amp;gt;/usr/share/udhcpc/default.script&amp;lt;/code&amp;gt; for how the values are used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;udhcpc.conf&amp;lt;/code&amp;gt; accepts the following key:value pairs:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;15&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! key&lt;br /&gt;
| default value&lt;br /&gt;
| possible values&lt;br /&gt;
| meaning&lt;br /&gt;
|-&lt;br /&gt;
| RESOLV_CONF&lt;br /&gt;
| /etc/resolv.conf&lt;br /&gt;
| no ; NO ; -&lt;br /&gt;
| do not overwrite or alternative path for resolv.conf&lt;br /&gt;
|-&lt;br /&gt;
| NO_DNS&lt;br /&gt;
| -&lt;br /&gt;
| &amp;lt;list of iface names&amp;gt;&lt;br /&gt;
| Prevent overwriting of resolv.conf on a per-interface basis&lt;br /&gt;
|-&lt;br /&gt;
| NO_GATEWAY&lt;br /&gt;
| -&lt;br /&gt;
| &amp;lt;list of iface names&amp;gt;&lt;br /&gt;
| List of interfaces where DHCP routes are ignored&lt;br /&gt;
|-&lt;br /&gt;
| IF_METRIC&lt;br /&gt;
| -&lt;br /&gt;
| &amp;lt;metric value&amp;gt;&lt;br /&gt;
| offset value for routing metric&lt;br /&gt;
|-&lt;br /&gt;
| IF_PEER_DNS&lt;br /&gt;
| yes&lt;br /&gt;
| &amp;lt;anything but yes&amp;gt;&lt;br /&gt;
| please use RESOLV_CONF or NO_DNS instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example &amp;lt;code&amp;gt;/etc/udhcpc/udhcpc.conf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 RESOLV_CONF=&amp;quot;no&amp;quot; # Prevents overwriting of /etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
Custom scripts can be added as &amp;lt;code&amp;gt;/etc/udhcpc/pre-*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/etc/udhcpc/post-*&amp;lt;/code&amp;gt; to be run before/after deconfig/renew/bound DHCP events. They must be set as &#039;&#039;&#039;executable&#039;&#039;&#039; by root, e.g. &amp;lt;code&amp;gt;chmod 744&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As an example, &amp;lt;code&amp;gt;/etc/udhcpc/post-bound/mtu&amp;lt;/code&amp;gt; could contain, to change the interface MTU from the default (1500) to 1492, which is useful if [https://en.wikipedia.org/wiki/Maximum_transmission_unit on ADSL that uses PPPoE] (which uses 8 bytes for its own header):&lt;br /&gt;
&lt;br /&gt;
 r=$(/sbin/ip route | grep ^default | head -n 1)&lt;br /&gt;
 # Needs iproute2 package, rather than busybox&#039;s &amp;quot;ip&amp;quot;, to change mtu&lt;br /&gt;
 /sbin/ip route replace $r mtu 1492&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Hack alert:&amp;lt;/b&amp;gt;&lt;br /&gt;
I needed to restart my firewall (which replaces the &amp;lt;code&amp;gt;iptables&amp;lt;/code&amp;gt; script from Alpine) when the client binds to a new IP, so I added the following line in the function &amp;lt;code&amp;gt;bound()&amp;lt;/code&amp;gt;, right after &#039;&amp;lt;code&amp;gt;resolvconf&amp;lt;/code&amp;gt;&#039;:&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/iptables reload&lt;br /&gt;
&lt;br /&gt;
The reload drops all firewall rules, re-acquires the Internal and external IPs, and re-writes the rules. I&#039;m sure there is a better way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:Embedded Systems]]&lt;/div&gt;</summary>
		<author><name>CarloMonte</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Udhcpc&amp;diff=24356</id>
		<title>Udhcpc</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Udhcpc&amp;diff=24356"/>
		<updated>2023-08-16T06:41:00Z</updated>

		<summary type="html">&lt;p&gt;CarloMonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Expand|Please help us expand this article by contributing.}}&lt;br /&gt;
&lt;br /&gt;
You may want to customize the behavior of the default DHCP client (&amp;lt;code&amp;gt;udhcpc&amp;lt;/code&amp;gt; from busybox), which is called by &amp;lt;code&amp;gt;/sbin/ifup&amp;lt;/code&amp;gt; by having &amp;quot;&amp;lt;code&amp;gt;dhcp&amp;lt;/code&amp;gt;&amp;quot; in &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The default behavior is driven by the script &amp;lt;code&amp;gt;/usr/share/udhcpc/default.script&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Entries in &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt; for DHCP interfaces will drive the &amp;lt;code&amp;gt;udhcpc&amp;lt;/code&amp;gt; command line. For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
        hostname myhostname&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will set these parameters on the command line:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-i eth0 -x hostname:myhostname&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The hostname will send the DHCP option to the server to tell the server the name of this client.&lt;br /&gt;
&lt;br /&gt;
The documentation for &amp;lt;code&amp;gt;udhcpc&amp;lt;/code&amp;gt; can be found in [https://udhcp.busybox.net/README.udhcpc the busybox udhcpc readme file]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add arbitrary command line parameters to the &amp;lt;code&amp;gt;udhcpc_opts&amp;lt;/code&amp;gt; setting in &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;. See the example of &amp;lt;code&amp;gt;udhcpc_opts&amp;lt;/code&amp;gt; in [[Configure Networking#IPv4 DHCP Configuration|the main networking article]].&lt;br /&gt;
&lt;br /&gt;
The default configuration of &amp;lt;code&amp;gt;udhcpc&amp;lt;/code&amp;gt; may be overridden by &amp;lt;code&amp;gt;/etc/udhcpc/udhcpc.conf&amp;lt;/code&amp;gt;. Please see &amp;lt;code&amp;gt;/usr/share/udhcpc/default.script&amp;lt;/code&amp;gt; for how the values are used.&lt;br /&gt;
&lt;br /&gt;
Authorized key:value pairs for &amp;lt;code&amp;gt;udhcpc.conf&amp;lt;/code&amp;gt; are:&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;15&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! key&lt;br /&gt;
| default value&lt;br /&gt;
| possible values&lt;br /&gt;
| meaning&lt;br /&gt;
|-&lt;br /&gt;
| RESOLV_CONF&lt;br /&gt;
| /etc/resolv.conf&lt;br /&gt;
| no ; NO ; -&lt;br /&gt;
| do not overwrite or alternative path for resolv.conf&lt;br /&gt;
|-&lt;br /&gt;
| NO_DNS&lt;br /&gt;
| -&lt;br /&gt;
| &amp;lt;list of iface names&amp;gt;&lt;br /&gt;
| Prevent overwriting of resolv.conf on a per-interface basis&lt;br /&gt;
|-&lt;br /&gt;
| NO_GATEWAY&lt;br /&gt;
| -&lt;br /&gt;
| &amp;lt;list of iface names&amp;gt;&lt;br /&gt;
| List of interfaces where DHCP routes are ignored&lt;br /&gt;
|-&lt;br /&gt;
| IF_METRIC&lt;br /&gt;
| -&lt;br /&gt;
| &amp;lt;metric value&amp;gt;&lt;br /&gt;
| offset value for routing metric&lt;br /&gt;
|-&lt;br /&gt;
| IF_PEER_DNS&lt;br /&gt;
| yes&lt;br /&gt;
| &amp;lt;anything but yes&amp;gt;&lt;br /&gt;
| please use RESOLV_CONF or NO_DNS instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example &amp;lt;code&amp;gt;/etc/udhcpc/udhcpc.conf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 RESOLV_CONF=&amp;quot;no&amp;quot; # Prevents overwriting of /etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
Custom scripts can be added as &amp;lt;code&amp;gt;/etc/udhcpc/pre-*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/etc/udhcpc/post-*&amp;lt;/code&amp;gt; to be run before/after deconfig/renew/bound DHCP events. They must be set as &#039;&#039;&#039;executable&#039;&#039;&#039; by root, e.g. &amp;lt;code&amp;gt;chmod 744&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As an example, &amp;lt;code&amp;gt;/etc/udhcpc/post-bound/mtu&amp;lt;/code&amp;gt; could contain, to change the interface MTU from the default (1500) to 1492, which is useful if [https://en.wikipedia.org/wiki/Maximum_transmission_unit on ADSL that uses PPPoE] (which uses 8 bytes for its own header):&lt;br /&gt;
&lt;br /&gt;
 r=$(/sbin/ip route | grep ^default | head -n 1)&lt;br /&gt;
 # Needs iproute2 package, rather than busybox&#039;s &amp;quot;ip&amp;quot;, to change mtu&lt;br /&gt;
 /sbin/ip route replace $r mtu 1492&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Hack alert:&amp;lt;/b&amp;gt;&lt;br /&gt;
I needed to restart my firewall (which replaces the &amp;lt;code&amp;gt;iptables&amp;lt;/code&amp;gt; script from Alpine) when the client binds to a new IP, so I added the following line in the function &amp;lt;code&amp;gt;bound()&amp;lt;/code&amp;gt;, right after &#039;&amp;lt;code&amp;gt;resolvconf&amp;lt;/code&amp;gt;&#039;:&lt;br /&gt;
&lt;br /&gt;
  /etc/init.d/iptables reload&lt;br /&gt;
&lt;br /&gt;
The reload drops all firewall rules, re-acquires the Internal and external IPs, and re-writes the rules. I&#039;m sure there is a better way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:Embedded Systems]]&lt;/div&gt;</summary>
		<author><name>CarloMonte</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=24354</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=24354"/>
		<updated>2023-08-15T17:29:17Z</updated>

		<summary type="html">&lt;p&gt;CarloMonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Move|Git|All git development articles should be consolidated}}&lt;br /&gt;
&lt;br /&gt;
This document describes how to use [https://git-scm.com git] for Alpine Linux development and related projects. If you just want to browse the Alpine git repositories, please visit [https://git.alpinelinux.org/aports git.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
== Basic Git usage ==&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Configuration}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with colored output use:&lt;br /&gt;
 {{Cmd|git config --global color.ui true&lt;br /&gt;
git config --global core.pager more}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with proxy server:&lt;br /&gt;
 {{Cmd|git config --global http.proxy &amp;lt;nowiki&amp;gt;http://proxy_ip:proxy_port&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Cloning a repository via Git ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to work with the Alpine git repository...&lt;br /&gt;
&lt;br /&gt;
* ...without write access.&lt;br /&gt;
* ...with write access.&lt;br /&gt;
&lt;br /&gt;
[https://git.alpinelinux.org/aports git.alpinelinux.org] shows all available Alpine git repositories.&lt;br /&gt;
&lt;br /&gt;
=== Without write access ===&lt;br /&gt;
&lt;br /&gt;
If you want to clone the Alpine aports repository, switch to the directory you want to have the &#039;&#039;aports/&#039;&#039; directory in and launch git.&lt;br /&gt;
 &lt;br /&gt;
{{Cmd|git clone &amp;lt;nowiki&amp;gt;git://git.alpinelinux.org/aports.git&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are using proxy server:&lt;br /&gt;
 {{Cmd|git clone https://git.alpinelinux.org/aports}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you want only the last 3 revisions:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone &amp;lt;nowiki&amp;gt;git://git.alpinelinux.org/aports.git&amp;lt;/nowiki&amp;gt; --depth 3}}&lt;br /&gt;
&lt;br /&gt;
Use the command below to see the full log of the trunk. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|git log}}&lt;br /&gt;
&lt;br /&gt;
=== Submitting work without write access ===&lt;br /&gt;
&lt;br /&gt;
You can still [https://wiki.alpinelinux.org/wiki/Creating_patches submit a patch] without write access to the Alpine repository. For this you need to create an account on Alpine&#039;s GitLab, fork the desired repository (the fork resides on the server), clone the fork on your computer, make your changes into a separate branch, push the branch to the fork (as branch; do not merge/rebase it into the master!) and create a merge request for that branch through the GitLab Web GUI.&lt;br /&gt;
&lt;br /&gt;
=== With write access ===&lt;br /&gt;
&lt;br /&gt;
If you have write access to the Alpine repository, the URL needs to be adjusted for cloning a repository&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone git@git.alpinelinux.org:aports}}&lt;br /&gt;
&lt;br /&gt;
Alternatively you can set the remote url of an exisiting git clone:&lt;br /&gt;
{{Cmd|git remote set-url origin git@git.alpinelinux.org:aports}}&lt;br /&gt;
&lt;br /&gt;
== General GIT Workflow ==&lt;br /&gt;
# Make your file edits in your local checkout of the local copy of repository.&lt;br /&gt;
# Commit the changes in your local repository: {{Cmd|git commit}}&lt;br /&gt;
# Bring the rest of your local repository up to date: {{Cmd|git pull --rebase}}&lt;br /&gt;
# Check what you are going to push: {{Cmd|git log origin..master}}&lt;br /&gt;
# Move your changes up to the master if you have write access {{Cmd|git push}} or [[Creating_patches|create a patch]] if not.&lt;br /&gt;
&lt;br /&gt;
== Other related articles ==&lt;br /&gt;
&lt;br /&gt;
* [[Development_using_git:Basic_usage| Basic usage]]&lt;br /&gt;
* [[Package Maintainers]]&lt;br /&gt;
* [[Creating patches]]&lt;br /&gt;
* [[Development_using_git:Developer_repositories|Developer repositories]]&lt;br /&gt;
* [[Development_using_git:Cgit| Using Cgit]]&lt;br /&gt;
* [[Development using git:Quality assurance]]&lt;br /&gt;
* [[Gitolite]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
{{:Development_using_git:Documentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Git]]&lt;/div&gt;</summary>
		<author><name>CarloMonte</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=24347</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=24347"/>
		<updated>2023-08-15T16:35:45Z</updated>

		<summary type="html">&lt;p&gt;CarloMonte: /* Submitting work without write access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Move|Git|All git development articles should be consolidated}}&lt;br /&gt;
&lt;br /&gt;
This document describes how to use [https://git-scm.com git] for Alpine Linux development and related projects. If you just want to browse the Alpine git repositories, please visit [https://git.alpinelinux.org/aports git.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
== Basic Git usage ==&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Configuration}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with colored output use:&lt;br /&gt;
 {{Cmd|git config --global color.ui true&lt;br /&gt;
git config --global core.pager more}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with proxy server:&lt;br /&gt;
 {{Cmd|git config --global http.proxy &amp;lt;nowiki&amp;gt;http://proxy_ip:proxy_port&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Cloning a repository via Git ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to work with the Alpine git repository...&lt;br /&gt;
&lt;br /&gt;
* ...without write access.&lt;br /&gt;
* ...with write access.&lt;br /&gt;
&lt;br /&gt;
[https://git.alpinelinux.org/aports git.alpinelinux.org] shows all available Alpine git repositories.&lt;br /&gt;
&lt;br /&gt;
=== Without write access ===&lt;br /&gt;
&lt;br /&gt;
If you want to clone the Alpine aports repository, switch to the directory you want to have the &#039;&#039;aports/&#039;&#039; directory in and launch git.&lt;br /&gt;
 &lt;br /&gt;
{{Cmd|git clone &amp;lt;nowiki&amp;gt;git://git.alpinelinux.org/aports.git&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are using proxy server:&lt;br /&gt;
 {{Cmd|git clone https://git.alpinelinux.org/aports}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you want only the last 3 revisions:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone &amp;lt;nowiki&amp;gt;git://git.alpinelinux.org/aports.git&amp;lt;/nowiki&amp;gt; --depth 3}}&lt;br /&gt;
&lt;br /&gt;
Use the command below to see the full log of the trunk. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|git log}}&lt;br /&gt;
&lt;br /&gt;
=== Submitting work without write access ===&lt;br /&gt;
&lt;br /&gt;
You can still [https://wiki.alpinelinux.org/wiki/Creating_patches submit a patch] without write access to the Alpine repository. For this you need to create an account on Alpine&#039;s GitLab, fork the desired repository (the fork resides on the server), clone the fork on your computer, make your changes into a separate branch, push the branch and create a merge request for that branch through the GitLab Web GUI.&lt;br /&gt;
&lt;br /&gt;
=== With write access ===&lt;br /&gt;
&lt;br /&gt;
If you have write access to the Alpine repository, the URL needs to be adjusted for cloning a repository&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone git@git.alpinelinux.org:aports}}&lt;br /&gt;
&lt;br /&gt;
Alternatively you can set the remote url of an exisiting git clone:&lt;br /&gt;
{{Cmd|git remote set-url origin git@git.alpinelinux.org:aports}}&lt;br /&gt;
&lt;br /&gt;
== General GIT Workflow ==&lt;br /&gt;
# Make your file edits in your local checkout of the local copy of repository.&lt;br /&gt;
# Commit the changes in your local repository: {{Cmd|git commit}}&lt;br /&gt;
# Bring the rest of your local repository up to date: {{Cmd|git pull --rebase}}&lt;br /&gt;
# Check what you are going to push: {{Cmd|git log origin..master}}&lt;br /&gt;
# Move your changes up to the master if you have write access {{Cmd|git push}} or [[Creating_patches|create a patch]] if not.&lt;br /&gt;
&lt;br /&gt;
== Other related articles ==&lt;br /&gt;
&lt;br /&gt;
* [[Development_using_git:Basic_usage| Basic usage]]&lt;br /&gt;
* [[Package Maintainers]]&lt;br /&gt;
* [[Creating patches]]&lt;br /&gt;
* [[Development_using_git:Developer_repositories|Developer repositories]]&lt;br /&gt;
* [[Development_using_git:Cgit| Using Cgit]]&lt;br /&gt;
* [[Development using git:Quality assurance]]&lt;br /&gt;
* [[Gitolite]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
{{:Development_using_git:Documentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Git]]&lt;/div&gt;</summary>
		<author><name>CarloMonte</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=24346</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=24346"/>
		<updated>2023-08-15T16:35:05Z</updated>

		<summary type="html">&lt;p&gt;CarloMonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Move|Git|All git development articles should be consolidated}}&lt;br /&gt;
&lt;br /&gt;
This document describes how to use [https://git-scm.com git] for Alpine Linux development and related projects. If you just want to browse the Alpine git repositories, please visit [https://git.alpinelinux.org/aports git.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
== Basic Git usage ==&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Configuration}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with colored output use:&lt;br /&gt;
 {{Cmd|git config --global color.ui true&lt;br /&gt;
git config --global core.pager more}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with proxy server:&lt;br /&gt;
 {{Cmd|git config --global http.proxy &amp;lt;nowiki&amp;gt;http://proxy_ip:proxy_port&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Cloning a repository via Git ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to work with the Alpine git repository...&lt;br /&gt;
&lt;br /&gt;
* ...without write access.&lt;br /&gt;
* ...with write access.&lt;br /&gt;
&lt;br /&gt;
[https://git.alpinelinux.org/aports git.alpinelinux.org] shows all available Alpine git repositories.&lt;br /&gt;
&lt;br /&gt;
=== Without write access ===&lt;br /&gt;
&lt;br /&gt;
If you want to clone the Alpine aports repository, switch to the directory you want to have the &#039;&#039;aports/&#039;&#039; directory in and launch git.&lt;br /&gt;
 &lt;br /&gt;
{{Cmd|git clone &amp;lt;nowiki&amp;gt;git://git.alpinelinux.org/aports.git&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are using proxy server:&lt;br /&gt;
 {{Cmd|git clone https://git.alpinelinux.org/aports}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you want only the last 3 revisions:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone &amp;lt;nowiki&amp;gt;git://git.alpinelinux.org/aports.git&amp;lt;/nowiki&amp;gt; --depth 3}}&lt;br /&gt;
&lt;br /&gt;
Use the command below to see the full log of the trunk. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|git log}}&lt;br /&gt;
&lt;br /&gt;
=== Submitting work without write access ===&lt;br /&gt;
&lt;br /&gt;
You can still [https://wiki.alpinelinux.org/wiki/Creating_patches submit a patch] without write access to the Alpine repository. For this you need to create an account on Aline&#039;s GitLab, fork the desired repository (the fork resides on the server), clone the fork on your computer, make your changes into a separate branch, push the branch and create a merge request through the GitLab Web GUI.&lt;br /&gt;
&lt;br /&gt;
=== With write access ===&lt;br /&gt;
&lt;br /&gt;
If you have write access to the Alpine repository, the URL needs to be adjusted for cloning a repository&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone git@git.alpinelinux.org:aports}}&lt;br /&gt;
&lt;br /&gt;
Alternatively you can set the remote url of an exisiting git clone:&lt;br /&gt;
{{Cmd|git remote set-url origin git@git.alpinelinux.org:aports}}&lt;br /&gt;
&lt;br /&gt;
== General GIT Workflow ==&lt;br /&gt;
# Make your file edits in your local checkout of the local copy of repository.&lt;br /&gt;
# Commit the changes in your local repository: {{Cmd|git commit}}&lt;br /&gt;
# Bring the rest of your local repository up to date: {{Cmd|git pull --rebase}}&lt;br /&gt;
# Check what you are going to push: {{Cmd|git log origin..master}}&lt;br /&gt;
# Move your changes up to the master if you have write access {{Cmd|git push}} or [[Creating_patches|create a patch]] if not.&lt;br /&gt;
&lt;br /&gt;
== Other related articles ==&lt;br /&gt;
&lt;br /&gt;
* [[Development_using_git:Basic_usage| Basic usage]]&lt;br /&gt;
* [[Package Maintainers]]&lt;br /&gt;
* [[Creating patches]]&lt;br /&gt;
* [[Development_using_git:Developer_repositories|Developer repositories]]&lt;br /&gt;
* [[Development_using_git:Cgit| Using Cgit]]&lt;br /&gt;
* [[Development using git:Quality assurance]]&lt;br /&gt;
* [[Gitolite]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
{{:Development_using_git:Documentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Git]]&lt;/div&gt;</summary>
		<author><name>CarloMonte</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Creating_patches&amp;diff=24324</id>
		<title>Creating patches</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Creating_patches&amp;diff=24324"/>
		<updated>2023-08-15T15:14:37Z</updated>

		<summary type="html">&lt;p&gt;CarloMonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;New aports should normally go into testing repository. After a reasonable testing period if the package is complete (e.g. it has an init script, it has a working and sane default configuration, etc.) and it has a maintainer it can be moved into community repository. Main repository is for packages that are either core of the linux system or are dependencies of other core packages. A package in main cannot have a dependency in community or testing and a package in community cannot have a dependency on packages in testing.&lt;br /&gt;
&lt;br /&gt;
There are currently two ways to contribute to propose changes, via Gitlab and via the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Submitting patches via Gitlab ==&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
To submit patches on [https://gitlab.alpinelinux.org Alpine Linux&#039; Gitlab instance] you first have to create an account for it [https://gitlab.alpinelinux.org/users/sign_in here]. It&#039;s recommended to set a SSH key now, refer to the [https://docs.gitlab.com/ee/ssh/ Gitlab docs] for how to do that. &lt;br /&gt;
&lt;br /&gt;
=== Creating a merge request ===&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;re all setup you have to fork the repository you want to contribute to, for example if you want to open a merge request for aports you would have to fork [https://gitlab.alpinelinux.org/alpine/aports alpine/aports], see the [https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html#creating-a-fork Gitlab docs] if you&#039;re having problems with that. Other repositories belonging to Alpine Linux live in the [https://gitlab.alpinelinux.org/alpine Alpine organisation]. If you already have an old fork, first clone it and then update it as shown below.&lt;br /&gt;
&lt;br /&gt;
After forking you can clone the repository like so:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone git@gitlab.alpinelinux.org:$USER/$REPO.git}}&lt;br /&gt;
&lt;br /&gt;
Replace $USER with the nickname of your Gitlab account and $REPO with the repository you want to work on. Now you can change to another branch (e.g. the name of the package you want to edit) with:&lt;br /&gt;
&lt;br /&gt;
(If necessary, update an old fork first, see [[#Rebasing against Alpine Linux&#039;s master|rebasing]], below)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git checkout -b pkgname}}&lt;br /&gt;
&lt;br /&gt;
Do your changes now and then push with:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git push -u origin $branchname }}&lt;br /&gt;
&lt;br /&gt;
Gitlab will print an URL to create a merge request in your terminal.&lt;br /&gt;
&lt;br /&gt;
=== Amending changes to a merge request ===&lt;br /&gt;
&lt;br /&gt;
If reviewers requested changes or if you noticed that something should be changed about your merge request&#039;s change you can simply amend your changes to the right commit and force push. So if you want to change the commit at the tip of your branch you can simply do:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git commit --amend}}&lt;br /&gt;
&lt;br /&gt;
If you want to change a commit that&#039;s not at the tip of your branch you can do:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git commit --fixup $SHA1_OF_COMMIT_YOU_WANT_TO_FIX}}&lt;br /&gt;
&lt;br /&gt;
Afterwards you have to force-push in order to update your merge request:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git push -f origin}}&lt;br /&gt;
&lt;br /&gt;
=== Rebasing against Alpine Linux&#039;s master ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s best to always stay up-to-date with the state of the upstream Alpine Linux repository to ensure that no merge conflicts happen later on. To do that you first have to add a new git remote which points to the upstream repository (instead of your fork):&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git remote add upstream https://gitlab.alpinelinux.org/alpine/$REPO}}&lt;br /&gt;
&lt;br /&gt;
Now you can fetch all changes with:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git fetch --all}}&lt;br /&gt;
&lt;br /&gt;
And then you can rebase with:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git rebase}}&lt;br /&gt;
&lt;br /&gt;
== BROKEN AS OF 2023-08: Submitting patches via the mailing list ==&lt;br /&gt;
&lt;br /&gt;
Patches should be created with git and submitted to [mailto:alpine-aports@lists.alpinelinux.org alpine-aports] mailing list with &#039;&#039;git send-email&#039;&#039; (which needs the &#039;&#039;git-email&#039;&#039; Alpine package).&lt;br /&gt;
&lt;br /&gt;
=== Only the last commit with &#039;git send-email&#039; ===&lt;br /&gt;
&lt;br /&gt;
To submit the last commit as a patch to [mailto:alpine-aports@lists.alpinelinux.org alpine-aports] mailing list:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git send-email --to alpine-aports@lists.alpinelinux.org -1}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|You save the To-address (does not require &#039;--to alpine-aports@lists.alpinelinux.org&#039;) in the git config with: {{Cmd|git config sendemail.to alpine-aports@lists.alpinelinux.org}}}}&lt;br /&gt;
&lt;br /&gt;
The first line in commit message will be &#039;&#039;subject&#039;&#039; and the long description (separated with empty line) will be the body in the email. The example below shows &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
testing/packagename: new aport &amp;lt;- header&lt;br /&gt;
&lt;br /&gt;
https://example.com/packagename &amp;lt;- body&lt;br /&gt;
wonderful package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|The git send-email command is provided by the &#039;&#039;&#039;git-email&#039;&#039;&#039; package (&#039;&#039;&#039;git-perl&#039;&#039;&#039; in v2.7 and older). }}&lt;br /&gt;
&lt;br /&gt;
See [[Development using git#Email_configuration]] on how configure SMTP Auth.&lt;br /&gt;
&lt;br /&gt;
=== Multiple commits with &#039;git send-email&#039; ===&lt;br /&gt;
&lt;br /&gt;
If you have many commits you can create a directory with patches and send them with &amp;lt;tt&amp;gt;git send-email&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;rm -Rf patches&lt;br /&gt;
mkdir patches&lt;br /&gt;
git format-patch -o patches origin&lt;br /&gt;
git send-email patches --compose --no-chain-reply-to --to alpine-aports@lists.alpinelinux.org&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
You can also format patches for the last x number of commits with:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;git format-patch -x -o patches&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
This will produce the patches for each local commit in the directory &amp;quot;patches&amp;quot; and send them.&lt;br /&gt;
Use &#039;&#039;&#039;--no-chain-reply-to&#039;&#039;&#039; to avoid that each patch is sent as a &#039;&#039;reply&#039;&#039; to the previous patch.&lt;br /&gt;
&lt;br /&gt;
Eg.&lt;br /&gt;
* [PATCH 0/m]&lt;br /&gt;
** [PATCH 1/m]&lt;br /&gt;
*** [PATCH 2/m]&lt;br /&gt;
**** ...&lt;br /&gt;
&lt;br /&gt;
With the option &#039;&#039;&#039;--no-chain-reply-to&#039;&#039;&#039; the patches will be sent as a reply to the first email, the &#039;&#039;cover letter&#039;&#039; (the [PATCH 0/m]) and will make the email thread nicer.&lt;br /&gt;
Like this:&lt;br /&gt;
* [PATCH 0/m]&lt;br /&gt;
** [PATCH 1/m]&lt;br /&gt;
** [PATCH 2/m]&lt;br /&gt;
** ..&lt;br /&gt;
&lt;br /&gt;
=== Resend an updated patch ===&lt;br /&gt;
Sometimes patches are rejected due to minor issues in the patch. Do not send an incremental patch on top of your initial, bad, patch. Instead, recreate the patch and send a new, fixed version of your patch. (use &#039;&#039;git commit --amend&#039;&#039; to edit a local commit).&lt;br /&gt;
&lt;br /&gt;
When you sending a second version of the patch use &#039;&#039;&#039;--subject-prefix &amp;quot;PATCH v2&amp;quot;&#039;&#039;&#039; to indicate that this is a new version of a previously sent patch. You may also use &#039;&#039;&#039;--in-reply-to &amp;lt;message-id&amp;gt;&#039;&#039;&#039; where &amp;lt;message-id&amp;gt; the the id of email requesting the resend.&lt;br /&gt;
&lt;br /&gt;
You should also write a note on the what was changed. Use &#039;&#039;&#039;--annotate&#039;&#039;&#039; for this and write the comment under the three dashes &amp;quot;---&amp;quot; so the note is not included in the commit message. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Subject: [PATCH v2] testing/mypackage: new aport&lt;br /&gt;
&lt;br /&gt;
https://example.com&lt;br /&gt;
Example package&lt;br /&gt;
---&lt;br /&gt;
Changes v1 -&amp;gt; v2:&lt;br /&gt;
 - removed depends&lt;br /&gt;
 - added zlib-dev to makedepends&lt;br /&gt;
&lt;br /&gt;
 testing/mypackage/APKBUILD | 41 +++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
 1 file changed, 41 insertions(+)&lt;br /&gt;
 create mode 100644 testing/mypackage/APKBUILD&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the notes that are below the &amp;quot;---&amp;quot; will not be included in the commit message.&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Git]]&lt;/div&gt;</summary>
		<author><name>CarloMonte</name></author>
	</entry>
</feed>