Development using git:Creating patches: Difference between revisions

From Alpine Linux
(Copied page from old wiki)
 
(colobocel)
Line 1: Line 1:
erorc4touze
= Creating patches for aports =
= Creating patches for aports =



Revision as of 13:28, 20 February 2008

erorc4touze

Creating patches for aports

After you did a checkout of the svn-sources you might want to add your changes to the apk-packages you build. (note: this applies to packages only to apk packages in aports directory)

The easiest way is the following:

  1. Go to the package you want to edit, for example dhcp:
% cd ~/SVN/alpine-builder/trunk/packages/aports/dhcp


Make sure you have the upstream precompiled binary package:

% aports/dhcp% scp username@deva:/var/www/localhost/htdocs/alpine/v1.3/binpkgs/dhcp-3.0.3-r9.bin.tar.bz2 ~/SVN/alpine-builder/trunk/packages/binpkgs


Clean up unpack the binary package as .orig copy.

% make clean && make orig

Make your chages

% vim work/data/etc/init.d/dhcp

Now make sure you have no stale files lying around like work/data/etc/init.d/dhcp~. Check that everything looks ok

% make diff

Create the patch directory if it does not exist:

% mkdir -p patches

Create the patch. It must has the .patch extension. Try to give it a meaningful name.

% make diff > patches/10-mypatch.patch

Rebuild the package with the patch.

% make clean && make

Test your package and verify it works as expected.

Add it to svn:

% svn add patches/10-mypatch.patch

You can send the patch(es) to the alpine-devel mailing list if you dont have svn commit access,