diff options
| author | Yuval Adam <_@yuv.al> | 2017-08-07 22:05:24 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2017-08-07 22:05:24 +0300 |
| commit | 0c1370b5f1b3e8abc934ea913a4377f05f32e4a9 (patch) | |
| tree | 64822a223696279b0869417a59a8112a7de5ad66 /docs/wiki/Development-guide/index.html | |
| parent | 91d00222d692b80a8eb22f0f193479545846ac89 (diff) | |
Initial static build
Diffstat (limited to 'docs/wiki/Development-guide/index.html')
| -rw-r--r-- | docs/wiki/Development-guide/index.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/docs/wiki/Development-guide/index.html b/docs/wiki/Development-guide/index.html new file mode 100644 index 0000000..ecb29d2 --- /dev/null +++ b/docs/wiki/Development-guide/index.html @@ -0,0 +1,77 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + + <title>postmarketOS</title> + + <meta name="description" content="Aiming for a 10 year life-cycle for smartphones"> + <meta name="keywords" content="postmarketOS"> + + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="robots" content="all"> + + <link rel="canonical" href="https://postmarketos.org/wiki/Development-guide/"> + + <link href="/static/css/tachyons.min.css" rel="stylesheet"> + <link href="/static/css/main.css" rel="stylesheet"> + </head> + + <body> + <div class="mw7 center"> + <div class="cf ph2-ns"> + <a class="title" href="/"> + <h1 class="f2 lh-title"> + <img src="/static/img/recycle.png"></img> + <span>postmarketOS</span> + </h1> + </a> + <div class="menu"> + <ul> + <li><a href="/">Home</a></li> + <li><a href="/wiki/">Wiki</a></li> + <li><a href="/blog/">Blog</a></li> + </ul> + </div> + +<h1>Development guide</h1> +<h2>Tips</h2> +<p>If happens often that we commit changes and then we realize that we forgot to regenerate APKBUILD checksums. This is noticed by Travis (<a href="https://travis-ci.org/postmarketOS/pmbootstrap/builds/261056579">example</a>) but you might want to avoid it. </p> +<p>You can install the following git hook that is run every time before you commit. </p> +<p>Copy the following code to <code>.git/hooks/pre-commit</code> inside your <code>pmbootstrap</code> repository:</p> +<pre class="codehilite"><code class="language-bash">#!/bin/bash +# +# PostmarketOS pre-commit hook +# Checks for bad checksums + +./test/check_checksums.py</code></pre> + + +<p>Now this is what happens when you forgot to regenerate checksums for some aport and try to commit</p> +<pre class="codehilite"><code class="language-bash">$ git commit -a +Checking device-qemu-aarch64 for correct checksums +[13:45:23] (native) generate checksums for device-qemu-aarch64 +[13:45:23] Done +MM aports/device/device-qemu-aarch64/APKBUILD + +diff --git a/aports/device/device-qemu-aarch64/APKBUILD b/aports/device/device-qemu-aarch64/APKBUILD +index 99b811b..c4cee6c 100644 +--- a/aports/device/device-qemu-aarch64/APKBUILD ++++ b/aports/device/device-qemu-aarch64/APKBUILD +@@ -21,4 +21,4 @@ package() { + "$pkgdir"/etc/deviceinfo + } + +-sha512sums="a18ab789c19d8802be6a9e9c842f4c304f267bd78f46b096b4ba6609430d1544e0a9eca9bc22db67a0728efae3aad6c2def9f7e64157d31aeb31b4bb839076d5 deviceinfo" ++sha512sums="8df46383685a40a96b7c604c29d413ecdd4b4a9b92cb61f452283042f189b1ca01cb70632fec0711dd67229e0501729762c6841359ac7ea455f516b512abce9c deviceinfo" + +** The checksums are not correct</code></pre> + + +<p>After that, simply do <code>git commit -a --amend -n</code> (<code>-n</code> is necessary so that this time the hook is not triggered).</p> + + </div> + </div> + </body> +</html>
\ No newline at end of file |
