From 0c1370b5f1b3e8abc934ea913a4377f05f32e4a9 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Mon, 7 Aug 2017 22:05:24 +0300 Subject: Initial static build --- docs/wiki/Development-guide/index.html | 77 ++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 docs/wiki/Development-guide/index.html (limited to 'docs/wiki/Development-guide') 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 @@ + + + + + + postmarketOS + + + + + + + + + + + + + + + +
+
+ +

+ + postmarketOS +

+
+ + +

Development guide

+

Tips

+

If happens often that we commit changes and then we realize that we forgot to regenerate APKBUILD checksums. This is noticed by Travis (example) but you might want to avoid it.

+

You can install the following git hook that is run every time before you commit.

+

Copy the following code to .git/hooks/pre-commit inside your pmbootstrap repository:

+
#!/bin/bash
+#
+# PostmarketOS pre-commit hook
+# Checks for bad checksums
+
+./test/check_checksums.py
+ + +

Now this is what happens when you forgot to regenerate checksums for some aport and try to commit

+
$ 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
+ + +

After that, simply do git commit -a --amend -n (-n is necessary so that this time the hook is not triggered).

+ +
+
+ + \ No newline at end of file -- cgit v1.3.1