From d268cd00346f64241b794bf96c2df06f7a97b1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sun, 5 May 2019 12:02:02 +0200 Subject: [PATCH 1/4] Upgrade to gitea 1.8.0 --- conf/source/arm.src | 4 ++-- conf/source/arm_1.7.src | 5 +++++ conf/source/armv7.src | 4 ++-- conf/source/armv7_1.7.src | 5 +++++ conf/source/i386.src | 4 ++-- conf/source/i386_1.7.src | 5 +++++ conf/source/x86-64.src | 4 ++-- conf/source/x86-64_1.7.src | 5 +++++ manifest.json | 2 +- scripts/upgrade | 4 ++++ 10 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 conf/source/arm_1.7.src create mode 100644 conf/source/armv7_1.7.src create mode 100644 conf/source/i386_1.7.src create mode 100644 conf/source/x86-64_1.7.src diff --git a/conf/source/arm.src b/conf/source/arm.src index 8f37252..c542419 100644 --- a/conf/source/arm.src +++ b/conf/source/arm.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-arm-6 -SOURCE_SUM=c38394be40634b0e1bd0fac0898474ff50e4535af610c12ee16ec3cabd2d4771 +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.0/gitea-1.8.0-linux-arm-6 +SOURCE_SUM=46922ec7b9f4d87cd7ac3546fb2b152d211a79042446838b3c4f0796b3fc0a02 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/arm_1.7.src b/conf/source/arm_1.7.src new file mode 100644 index 0000000..8f37252 --- /dev/null +++ b/conf/source/arm_1.7.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-arm-6 +SOURCE_SUM=c38394be40634b0e1bd0fac0898474ff50e4535af610c12ee16ec3cabd2d4771 +SOURCE_SUM_PRG=sha256sum +SOURCE_FILENAME=gitea +SOURCE_EXTRACT=false diff --git a/conf/source/armv7.src b/conf/source/armv7.src index 5eb2360..874ebe1 100644 --- a/conf/source/armv7.src +++ b/conf/source/armv7.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-arm-7 -SOURCE_SUM=fd4ba028a30eb2fac1f8570fd3f6157f0c46c21992a2062dd7a6751cc8a47f2f +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.0/gitea-1.8.0-linux-arm-7 +SOURCE_SUM=134eb209071cb9fa2ddc7b58d343f5af5ddc9e718f6567e25bc4fdebd2d98dc0 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/armv7_1.7.src b/conf/source/armv7_1.7.src new file mode 100644 index 0000000..5eb2360 --- /dev/null +++ b/conf/source/armv7_1.7.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-arm-7 +SOURCE_SUM=fd4ba028a30eb2fac1f8570fd3f6157f0c46c21992a2062dd7a6751cc8a47f2f +SOURCE_SUM_PRG=sha256sum +SOURCE_FILENAME=gitea +SOURCE_EXTRACT=false diff --git a/conf/source/i386.src b/conf/source/i386.src index 2fcf64e..7569b54 100644 --- a/conf/source/i386.src +++ b/conf/source/i386.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-386 -SOURCE_SUM=a420bccb17e6e1c317c014475ce5a5bf8091da123cc55b0569660ae43ababf44 +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.0/gitea-1.8.0-linux-386 +SOURCE_SUM=bc10af5cadd945c1d3a83dd5d3292f19337020e3bd6e04ad9882d1c190cc964c SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/i386_1.7.src b/conf/source/i386_1.7.src new file mode 100644 index 0000000..2fcf64e --- /dev/null +++ b/conf/source/i386_1.7.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-386 +SOURCE_SUM=a420bccb17e6e1c317c014475ce5a5bf8091da123cc55b0569660ae43ababf44 +SOURCE_SUM_PRG=sha256sum +SOURCE_FILENAME=gitea +SOURCE_EXTRACT=false diff --git a/conf/source/x86-64.src b/conf/source/x86-64.src index ce97cc3..c64c23e 100644 --- a/conf/source/x86-64.src +++ b/conf/source/x86-64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-amd64 -SOURCE_SUM=49b733a3272dc49cb869c1ba9624a9880168f27b8112197d0c7fa32411dbf625 +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.0/gitea-1.8.0-linux-amd64 +SOURCE_SUM=917497fd7ac3bd3d1c953cf11a117ccb0d7bcadb86243d3bc031fb4c9253c7ff SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/x86-64_1.7.src b/conf/source/x86-64_1.7.src new file mode 100644 index 0000000..ce97cc3 --- /dev/null +++ b/conf/source/x86-64_1.7.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-amd64 +SOURCE_SUM=49b733a3272dc49cb869c1ba9624a9880168f27b8112197d0c7fa32411dbf625 +SOURCE_SUM_PRG=sha256sum +SOURCE_FILENAME=gitea +SOURCE_EXTRACT=false diff --git a/manifest.json b/manifest.json index a02bf1e..37df4e4 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ }, "url": "http://gitea.io", "license": "MIT", - "version": "1.7.3~ynh1", + "version": "1.8.0~ynh1", "maintainer": { "name": "rafi59", "email": "rafi59_dev@srvmaison.fr.nf" diff --git a/scripts/upgrade b/scripts/upgrade index 72ff9c9..a96d874 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -143,6 +143,10 @@ case $upstream_version in ynh_setup_source $final_path source/${architecture}_1.6 restart_gitea ;& +"1.6."* ) + ynh_setup_source $final_path source/${architecture}_1.7 + restart_gitea +;& esac # Install gitea From 7673931ef886f95ca5ea79268ef1f0732071bd67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 7 May 2019 10:56:04 +0200 Subject: [PATCH 2/4] Manage version upgrade when gitea install is < 1.7 --- scripts/upgrade | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a96d874..127e9bd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,8 +99,16 @@ config_nginx # DB migration #================================================= -# Support for the time when the upstream_version was not updated -upstream_version=${upstream_version:-1.7} +# Before the version 1.7 the upstream version was not stored +# The way to find the version for the install < 1.7 is to parse the binary file to find which version is installed +if [ -z ${upstream_version:-} ]; then + for version in "0.0." "1.0." "1.1." "1.2." "1.3." "1.4." "1.5." "1.6." "1.7."; do + if strings $final_path/gitea | grep -P "^${version//./\\.}\d"; then + upstream_version="${version}0" + break + fi + done +fi restart_gitea() { # Set permissions @@ -112,7 +120,7 @@ restart_gitea() { } case $upstream_version in -"0.0.1" ) +"0.0."* ) ynh_setup_source $final_path source/${architecture}_1.0 set_permission systemctl start $app From 33dc90b06fa89b2fb64c7b88e72db8f5b18b90ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 13 May 2019 15:49:34 +0200 Subject: [PATCH 3/4] Upgrade to gitea 1.8.1 and use temporary armv6 build for armv7 --- conf/source/arm.src | 4 ++-- conf/source/armv7.src | 5 ++++- conf/source/i386.src | 4 ++-- conf/source/x86-64.src | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/conf/source/arm.src b/conf/source/arm.src index c542419..6187fd0 100644 --- a/conf/source/arm.src +++ b/conf/source/arm.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.0/gitea-1.8.0-linux-arm-6 -SOURCE_SUM=46922ec7b9f4d87cd7ac3546fb2b152d211a79042446838b3c4f0796b3fc0a02 +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.1/gitea-1.8.1-linux-arm-6 +SOURCE_SUM=c4996c2f413945bb131e7096751838ef49c5e9e40ce33b280f45ecd13e895274 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/armv7.src b/conf/source/armv7.src index 874ebe1..72f33b6 100644 --- a/conf/source/armv7.src +++ b/conf/source/armv7.src @@ -1,4 +1,7 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.0/gitea-1.8.0-linux-arm-7 +# The armv7 build is brocken +# See : https://github.com/go-gitea/gitea/issues/6700 +# Use temporary the armv6 binary +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.1/gitea-1.8.1-linux-arm-6 SOURCE_SUM=134eb209071cb9fa2ddc7b58d343f5af5ddc9e718f6567e25bc4fdebd2d98dc0 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea diff --git a/conf/source/i386.src b/conf/source/i386.src index 7569b54..285cfe6 100644 --- a/conf/source/i386.src +++ b/conf/source/i386.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.0/gitea-1.8.0-linux-386 -SOURCE_SUM=bc10af5cadd945c1d3a83dd5d3292f19337020e3bd6e04ad9882d1c190cc964c +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.1/gitea-1.8.1-linux-386 +SOURCE_SUM=6fad1b9eede60e270d845ad962b61520af1673e7f7c6a1422c29e32947019409 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/x86-64.src b/conf/source/x86-64.src index c64c23e..2d54d0b 100644 --- a/conf/source/x86-64.src +++ b/conf/source/x86-64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.0/gitea-1.8.0-linux-amd64 -SOURCE_SUM=917497fd7ac3bd3d1c953cf11a117ccb0d7bcadb86243d3bc031fb4c9253c7ff +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.1/gitea-1.8.1-linux-amd64 +SOURCE_SUM=cc985b7947cdd50cb47a68bbb51e3a8519d0d2710a9696255928ae9912dca598 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false From 6dd0a6d7c4bef365785cc7349d73e52e06c89386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 13 May 2019 16:23:42 +0200 Subject: [PATCH 4/4] Fix armv7 checksum --- conf/source/armv7.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/source/armv7.src b/conf/source/armv7.src index 72f33b6..2fe7b3b 100644 --- a/conf/source/armv7.src +++ b/conf/source/armv7.src @@ -2,7 +2,7 @@ # See : https://github.com/go-gitea/gitea/issues/6700 # Use temporary the armv6 binary SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.1/gitea-1.8.1-linux-arm-6 -SOURCE_SUM=134eb209071cb9fa2ddc7b58d343f5af5ddc9e718f6567e25bc4fdebd2d98dc0 +SOURCE_SUM=c4996c2f413945bb131e7096751838ef49c5e9e40ce33b280f45ecd13e895274 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false