[v2,3/4] build_patches: change to git am format

Submitted by Tim Niemeyer on July 8, 2017, 11 a.m.

Details

Message ID 1499511609-30508-3-git-send-email-tim@tn-x.org
State Accepted
Headers show

Commit Message

Tim Niemeyer July 8, 2017, 11 a.m.
With git am format, it is easier to apply the patches locally.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
---

Changes in v2:
- New patch

 .../openwrt/0001-sysupgrade-no-config-save.patch   | 25 ++++++++++++++++++++++
 .../openwrt/0001-sysupgrade_no_config_save.patch   | 13 -----------
 build_patches/openwrt/0002-set-root-password.patch | 22 +++++++++++++++++++
 build_patches/openwrt/0002-set_root_password.patch |  8 -------
 .../openwrt/0003-ntpd-host-as-string.patch         | 20 +++++++++++++----
 .../openwrt/0004-ar71xx-4.4-l2tp-stats.patch       | 20 +++++++++++++++--
 buildscript                                        |  2 +-
 7 files changed, 82 insertions(+), 28 deletions(-)
 create mode 100644 build_patches/openwrt/0001-sysupgrade-no-config-save.patch
 delete mode 100644 build_patches/openwrt/0001-sysupgrade_no_config_save.patch
 create mode 100644 build_patches/openwrt/0002-set-root-password.patch
 delete mode 100644 build_patches/openwrt/0002-set_root_password.patch
 mode change 100755 => 100644 build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch

Patch hide | download patch | download mbox

diff --git a/build_patches/openwrt/0001-sysupgrade-no-config-save.patch b/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
new file mode 100644
index 0000000..eabd5df
--- /dev/null
+++ b/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
@@ -0,0 +1,25 @@ 
+From 1115262b144c9fbdb9101a29681cf3d0f332f167 Mon Sep 17 00:00:00 2001
+From: Tim Niemeyer <tim@tn-x.org>
+Date: Sat, 8 Jul 2017 10:46:59 +0200
+Subject: [PATCH 1/7] sysupgrade no config save
+
+---
+ package/base-files/files/sbin/sysupgrade | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
+index c095ca8..4a97d36 100755
+--- a/package/base-files/files/sbin/sysupgrade
++++ b/package/base-files/files/sbin/sysupgrade
+@@ -104,7 +104,7 @@ EOF
+ add_uci_conffiles() {
+ 	local file="$1"
+ 	( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
+-		/etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
++		/etc/sysupgrade.conf 2>/dev/null) \
+ 		-type f -o -type l 2>/dev/null;
+ 	  opkg list-changed-conffiles ) | sort -u > "$file"
+ 	return 0
+-- 
+2.1.4
+
diff --git a/build_patches/openwrt/0001-sysupgrade_no_config_save.patch b/build_patches/openwrt/0001-sysupgrade_no_config_save.patch
deleted file mode 100644
index 8c6566f..0000000
--- a/build_patches/openwrt/0001-sysupgrade_no_config_save.patch
+++ /dev/null
@@ -1,13 +0,0 @@ 
-Index: package/base-files/files/sbin/sysupgrade
-===================================================================
---- package/base-files/files/sbin/sysupgrade
-+++ package/base-files/files/sbin/sysupgrade
-@@ -104,7 +104,7 @@
- add_uci_conffiles() {
- 	local file="$1"
- 	( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
--		/etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
-+		/etc/sysupgrade.conf 2>/dev/null) \
- 		-type f -o -type l 2>/dev/null;
- 	  opkg list-changed-conffiles ) | sort -u > "$file"
- 	return 0
diff --git a/build_patches/openwrt/0002-set-root-password.patch b/build_patches/openwrt/0002-set-root-password.patch
new file mode 100644
index 0000000..c09165d
--- /dev/null
+++ b/build_patches/openwrt/0002-set-root-password.patch
@@ -0,0 +1,22 @@ 
+From 5d70b1bbf367a69b876c49c22928e5897b1e8efd Mon Sep 17 00:00:00 2001
+From: Tim Niemeyer <tim@tn-x.org>
+Date: Sat, 8 Jul 2017 10:47:28 +0200
+Subject: [PATCH 2/7] set root password
+
+---
+ package/base-files/files/etc/shadow | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow
+index 4b4154f..b8d180a 100644
+--- a/package/base-files/files/etc/shadow
++++ b/package/base-files/files/etc/shadow
+@@ -1,4 +1,4 @@
+-root::0:0:99999:7:::
++root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:99999:7:::
+ daemon:*:0:0:99999:7:::
+ ftp:*:0:0:99999:7:::
+ network:*:0:0:99999:7:::
+-- 
+2.1.4
+
diff --git a/build_patches/openwrt/0002-set_root_password.patch b/build_patches/openwrt/0002-set_root_password.patch
deleted file mode 100644
index 05a1be0..0000000
--- a/build_patches/openwrt/0002-set_root_password.patch
+++ /dev/null
@@ -1,8 +0,0 @@ 
---- package/base-files/files/etc/shadow
-+++ package/base-files/files/etc/shadow
-@@ -1,4 +1,4 @@
--root::0:0:99999:7:::
-+root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:99999:7:::
- daemon:*:0:0:99999:7:::
- ftp:*:0:0:99999:7:::
- network:*:0:0:99999:7:::
diff --git a/build_patches/openwrt/0003-ntpd-host-as-string.patch b/build_patches/openwrt/0003-ntpd-host-as-string.patch
index fe5ae4d..ac492a0 100644
--- a/build_patches/openwrt/0003-ntpd-host-as-string.patch
+++ b/build_patches/openwrt/0003-ntpd-host-as-string.patch
@@ -1,7 +1,16 @@ 
-diff --git package/utils/busybox/files/sysntpd package/utils/busybox/files/sysntpd
-index 98260be..07b738c 100755
---- package/utils/busybox/files/sysntpd
-+++ package/utils/busybox/files/sysntpd
+From 90e6f265608037301cd0b865b172a642dd2a254a Mon Sep 17 00:00:00 2001
+From: Tim Niemeyer <tim@tn-x.org>
+Date: Sat, 8 Jul 2017 10:47:56 +0200
+Subject: [PATCH 3/7] ntpd host as string
+
+---
+ package/utils/busybox/files/sysntpd | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/package/utils/busybox/files/sysntpd b/package/utils/busybox/files/sysntpd
+index e693e40..12383a4 100755
+--- a/package/utils/busybox/files/sysntpd
++++ b/package/utils/busybox/files/sysntpd
 @@ -30,7 +30,7 @@ get_dhcp_ntp_servers() {
  
  validate_ntp_section() {
@@ -11,3 +20,6 @@  index 98260be..07b738c 100755
  }
  
  start_service() {
+-- 
+2.1.4
+
diff --git a/build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch b/build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch
old mode 100755
new mode 100644
index 9ee3516..5425702
--- a/build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch
+++ b/build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch
@@ -1,5 +1,18 @@ 
---- target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bit-systems.patch	1970-01-01 01:00:00.000000000 +0100
-+++ target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bit-systems.patch	2016-03-12 18:41:32.818602442 +0100
+From f4724465e4cdbfecdd934893f6fc0c81f7038e1b Mon Sep 17 00:00:00 2001
+From: Tim Niemeyer <tim@tn-x.org>
+Date: Sat, 8 Jul 2017 10:48:53 +0200
+Subject: [PATCH 4/7] ar71xx-4.4-l2tp-stats
+
+---
+ ...-stats-counter-overflow-on-32-bit-systems.patch | 38 ++++++++++++++++++++++
+ 1 file changed, 38 insertions(+)
+ create mode 100644 target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bit-systems.patch
+
+diff --git a/target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bit-systems.patch b/target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bit-systems.patch
+new file mode 100644
+index 0000000..4348aea
+--- /dev/null
++++ b/target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bit-systems.patch
 @@ -0,0 +1,38 @@
 +From 19b1c8733b99f13005f2d8918bce588f0b2556f8 Mon Sep 17 00:00:00 2001
 +From: Dominik Heidler <dominik@heidler.eu>
@@ -39,3 +52,6 @@ 
 +-- 
 +2.7.2
 +
+-- 
+2.1.4
+
diff --git a/buildscript b/buildscript
index c6af21e..f6d6297 100755
--- a/buildscript
+++ b/buildscript
@@ -122,7 +122,7 @@  get_source() {
 patch_target() {
     if [ "$(find "$PWD"/build_patches/openwrt/*.patch 2> /dev/null | wc -l)" -ge 1 ]; then
         for patch in "$PWD"/build_patches/openwrt/*.patch; do
-            patch --no-backup-if-mismatch -p0 -d "$target" -i "$patch"
+            patch --no-backup-if-mismatch -p1 -d "$target" -i "$patch"
         done
     fi
 }

Comments

Adrian Schmutzler July 27, 2017, 11:22 a.m.
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Auch wenn mir nicht ganz klar ist, warum das notwendig ist...

> -----Original Message-----
> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf
> Of Tim Niemeyer
> Sent: Samstag, 8. Juli 2017 13:00
> To: franken-dev@freifunk.net
> Subject: [PATCH v2 3/4] build_patches: change to git am format
> 
> With git am format, it is easier to apply the patches locally.
> 
> Signed-off-by: Tim Niemeyer <tim@tn-x.org>
> ---
> 
> Changes in v2:
> - New patch
> 
>  .../openwrt/0001-sysupgrade-no-config-save.patch   | 25
> ++++++++++++++++++++++
>  .../openwrt/0001-sysupgrade_no_config_save.patch   | 13 -----------
>  build_patches/openwrt/0002-set-root-password.patch | 22
> +++++++++++++++++++
>  build_patches/openwrt/0002-set_root_password.patch |  8 -------
>  .../openwrt/0003-ntpd-host-as-string.patch         | 20 +++++++++++++----
>  .../openwrt/0004-ar71xx-4.4-l2tp-stats.patch       | 20 +++++++++++++++--
>  buildscript                                        |  2 +-
>  7 files changed, 82 insertions(+), 28 deletions(-)  create mode 100644
> build_patches/openwrt/0001-sysupgrade-no-config-save.patch
>  delete mode 100644
> build_patches/openwrt/0001-sysupgrade_no_config_save.patch
>  create mode 100644 build_patches/openwrt/0002-set-root-password.patch
>  delete mode 100644 build_patches/openwrt/0002-
> set_root_password.patch
>  mode change 100755 => 100644
> build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch
> 
> diff --git a/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
> b/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
> new file mode 100644
> index 0000000..eabd5df
> --- /dev/null
> +++ b/build_patches/openwrt/0001-sysupgrade-no-config-save.patch
> @@ -0,0 +1,25 @@
> +From 1115262b144c9fbdb9101a29681cf3d0f332f167 Mon Sep 17 00:00:00
> 2001
> +From: Tim Niemeyer <tim@tn-x.org>
> +Date: Sat, 8 Jul 2017 10:46:59 +0200
> +Subject: [PATCH 1/7] sysupgrade no config save
> +
> +---
> + package/base-files/files/sbin/sysupgrade | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/package/base-files/files/sbin/sysupgrade
> b/package/base-files/files/sbin/sysupgrade
> +index c095ca8..4a97d36 100755
> +--- a/package/base-files/files/sbin/sysupgrade
> ++++ b/package/base-files/files/sbin/sysupgrade
> +@@ -104,7 +104,7 @@ EOF
> + add_uci_conffiles() {
> + 	local file="$1"
> + 	( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
> +-		/etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
> ++		/etc/sysupgrade.conf 2>/dev/null) \
> + 		-type f -o -type l 2>/dev/null;
> + 	  opkg list-changed-conffiles ) | sort -u > "$file"
> + 	return 0
> +--
> +2.1.4
> +
> diff --git a/build_patches/openwrt/0001-sysupgrade_no_config_save.patch
> b/build_patches/openwrt/0001-sysupgrade_no_config_save.patch
> deleted file mode 100644
> index 8c6566f..0000000
> --- a/build_patches/openwrt/0001-sysupgrade_no_config_save.patch
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -Index: package/base-files/files/sbin/sysupgrade
> -
> ==========================================================
> =========
> ---- package/base-files/files/sbin/sysupgrade
> -+++ package/base-files/files/sbin/sysupgrade
> -@@ -104,7 +104,7 @@
> - add_uci_conffiles() {
> - 	local file="$1"
> - 	( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
> --		/etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
> -+		/etc/sysupgrade.conf 2>/dev/null) \
> - 		-type f -o -type l 2>/dev/null;
> - 	  opkg list-changed-conffiles ) | sort -u > "$file"
> - 	return 0
> diff --git a/build_patches/openwrt/0002-set-root-password.patch
> b/build_patches/openwrt/0002-set-root-password.patch
> new file mode 100644
> index 0000000..c09165d
> --- /dev/null
> +++ b/build_patches/openwrt/0002-set-root-password.patch
> @@ -0,0 +1,22 @@
> +From 5d70b1bbf367a69b876c49c22928e5897b1e8efd Mon Sep 17 00:00:00
> 2001
> +From: Tim Niemeyer <tim@tn-x.org>
> +Date: Sat, 8 Jul 2017 10:47:28 +0200
> +Subject: [PATCH 2/7] set root password
> +
> +---
> + package/base-files/files/etc/shadow | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/package/base-files/files/etc/shadow
> b/package/base-files/files/etc/shadow
> +index 4b4154f..b8d180a 100644
> +--- a/package/base-files/files/etc/shadow
> ++++ b/package/base-files/files/etc/shadow
> +@@ -1,4 +1,4 @@
> +-root::0:0:99999:7:::
> ++root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:99999:7:::
> + daemon:*:0:0:99999:7:::
> + ftp:*:0:0:99999:7:::
> + network:*:0:0:99999:7:::
> +--
> +2.1.4
> +
> diff --git a/build_patches/openwrt/0002-set_root_password.patch
> b/build_patches/openwrt/0002-set_root_password.patch
> deleted file mode 100644
> index 05a1be0..0000000
> --- a/build_patches/openwrt/0002-set_root_password.patch
> +++ /dev/null
> @@ -1,8 +0,0 @@
> ---- package/base-files/files/etc/shadow
> -+++ package/base-files/files/etc/shadow
> -@@ -1,4 +1,4 @@
> --root::0:0:99999:7:::
> -+root:$1$OmvoKpjK$e.lPVnBxsrAbNV4EoH3xb1:0:0:99999:7:::
> - daemon:*:0:0:99999:7:::
> - ftp:*:0:0:99999:7:::
> - network:*:0:0:99999:7:::
> diff --git a/build_patches/openwrt/0003-ntpd-host-as-string.patch
> b/build_patches/openwrt/0003-ntpd-host-as-string.patch
> index fe5ae4d..ac492a0 100644
> --- a/build_patches/openwrt/0003-ntpd-host-as-string.patch
> +++ b/build_patches/openwrt/0003-ntpd-host-as-string.patch
> @@ -1,7 +1,16 @@
> -diff --git package/utils/busybox/files/sysntpd
> package/utils/busybox/files/sysntpd
> -index 98260be..07b738c 100755
> ---- package/utils/busybox/files/sysntpd
> -+++ package/utils/busybox/files/sysntpd
> +From 90e6f265608037301cd0b865b172a642dd2a254a Mon Sep 17 00:00:00
> 2001
> +From: Tim Niemeyer <tim@tn-x.org>
> +Date: Sat, 8 Jul 2017 10:47:56 +0200
> +Subject: [PATCH 3/7] ntpd host as string
> +
> +---
> + package/utils/busybox/files/sysntpd | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/package/utils/busybox/files/sysntpd
> b/package/utils/busybox/files/sysntpd
> +index e693e40..12383a4 100755
> +--- a/package/utils/busybox/files/sysntpd
> ++++ b/package/utils/busybox/files/sysntpd
>  @@ -30,7 +30,7 @@ get_dhcp_ntp_servers() {
> 
>   validate_ntp_section() {
> @@ -11,3 +20,6 @@ index 98260be..07b738c 100755
>   }
> 
>   start_service() {
> +--
> +2.1.4
> +
> diff --git a/build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch
> b/build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch
> old mode 100755
> new mode 100644
> index 9ee3516..5425702
> --- a/build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch
> +++ b/build_patches/openwrt/0004-ar71xx-4.4-l2tp-stats.patch
> @@ -1,5 +1,18 @@
> ----
> target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bit-
> systems.patch	1970-01-01 01:00:00.000000000 +0100
> -+++
> target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bit-
> systems.patch	2016-03-12 18:41:32.818602442 +0100
> +From f4724465e4cdbfecdd934893f6fc0c81f7038e1b Mon Sep 17 00:00:00
> 2001
> +From: Tim Niemeyer <tim@tn-x.org>
> +Date: Sat, 8 Jul 2017 10:48:53 +0200
> +Subject: [PATCH 4/7] ar71xx-4.4-l2tp-stats
> +
> +---
> + ...-stats-counter-overflow-on-32-bit-systems.patch | 38
> ++++++++++++++++++++++
> + 1 file changed, 38 insertions(+)
> + create mode 100644
> target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bit-
> systems.patch
> +
> +diff --git
> a/target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bi
> t-systems.patch
> b/target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bi
> t-systems.patch
> +new file mode 100644
> +index 0000000..4348aea
> +--- /dev/null
> ++++
> b/target/linux/ar71xx/patches-4.4/fix-l2tp-stats-counter-overflow-on-32-bi
> t-systems.patch
>  @@ -0,0 +1,38 @@
>  +From 19b1c8733b99f13005f2d8918bce588f0b2556f8 Mon Sep 17 00:00:00
> 2001
>  +From: Dominik Heidler <dominik@heidler.eu> @@ -39,3 +52,6 @@
>  +--
>  +2.7.2
>  +
> +--
> +2.1.4
> +
> diff --git a/buildscript b/buildscript
> index c6af21e..f6d6297 100755
> --- a/buildscript
> +++ b/buildscript
> @@ -122,7 +122,7 @@ get_source() {
>  patch_target() {
>      if [ "$(find "$PWD"/build_patches/openwrt/*.patch 2> /dev/null | wc
-l)" -
> ge 1 ]; then
>          for patch in "$PWD"/build_patches/openwrt/*.patch; do
> -            patch --no-backup-if-mismatch -p0 -d "$target" -i "$patch"
> +            patch --no-backup-if-mismatch -p1 -d "$target" -i "$patch"
>          done
>      fi
>  }
> --
> 2.1.4
> 
> --
> franken-dev mailing list
> franken-dev@freifunk.net
> http://lists.freifunk.net/mailman/listinfo/franken-dev-freifunk.net