[buildbot] phase2: use sha2rsync.pl for 'targetupload'

LEDE Commits lede-commits at lists.infradead.org
Thu Nov 16 03:48:42 PST 2023


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/c3ddb0db167d2bcced98b80c4640d9b657bdbc0d

commit c3ddb0db167d2bcced98b80c4640d9b657bdbc0d
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Wed Nov 15 11:50:01 2023 +0100

    phase2: use sha2rsync.pl for 'targetupload'
    
    Align with phase1 (3246628)
    
    Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
 phase2/master.cfg | 39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/phase2/master.cfg b/phase2/master.cfg
index 774f1a6..42946be 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -689,6 +689,18 @@ for arch in arches:
 			haltOnFailure = True
 		))
 
+	# download remote sha256sums to 'target-sha256sums'
+	factory.addStep(ShellCommand(
+		name = "target-sha256sums",
+		description = "Fetching remote sha256sums for arch",
+		command = ["rsync"] + rsync_defopts + ["-z", Interpolate("%(kw:rsyncbinurl)s/packages%(kw:suffix)s/%(kw:archname)s/sha256sums", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0]), "arch-sha256sums"],
+		env={'RSYNC_PASSWORD': rsync_bin_key},
+		logEnviron = False,
+		haltOnFailure = False,
+		flunkOnFailure = False,
+		warnOnFailure = False,
+	))
+
 	factory.addStep(FileDownload(
 		name="dlrsync.sh",
 		mastersrc = scripts_dir + "/rsync.sh",
@@ -696,6 +708,21 @@ for arch in arches:
 		mode = 0o755
 	))
 
+	factory.addStep(FileDownload(
+		name = "dlsha2rsyncpl",
+		mastersrc = "sha2rsync.pl",
+		workerdest = "../sha2rsync.pl",
+		mode = 0o755,
+	))
+
+	factory.addStep(ShellCommand(
+		name = "buildlist",
+		description = "Building list of files to upload",
+		workdir = "build/sdk",
+		command = ["../../../sha2rsync.pl", "../../arch-sha256sums", "bin/packages/%s/sha256sums" %(arch[0]), "rsynclist"],
+		haltOnFailure = True,
+	))
+
 	factory.addStep(ShellCommand(
 		name = "uploadprepare",
 		description = "Preparing package directory",
@@ -710,7 +737,17 @@ for arch in arches:
 		name = "packageupload",
 		description = "Uploading package files",
 		workdir = "build/sdk",
-		command = ["../../../rsync.sh"] + rsync_defopts + ["--delete", "--checksum", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-a", "bin/packages/%s/" %(arch[0]), Interpolate("%(kw:rsyncbinurl)s/packages%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
+		command = ["../../../rsync.sh"] + rsync_defopts + ["--files-from=rsynclist", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-a", "bin/packages/%s/" %(arch[0]), Interpolate("%(kw:rsyncbinurl)s/packages%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
+		env={'RSYNC_PASSWORD': rsync_bin_key},
+		haltOnFailure = True,
+		logEnviron = False
+	))
+
+	factory.addStep(ShellCommand(
+		name = "packageprune",
+		description = "Pruning package files",
+		workdir = "build/sdk",
+		command = ["../../../rsync.sh"] + rsync_defopts + ["--delete", "--existing", "--ignore-existing", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-a", "bin/packages/%s/" %(arch[0]), Interpolate("%(kw:rsyncbinurl)s/packages%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
 		env={'RSYNC_PASSWORD': rsync_bin_key},
 		haltOnFailure = True,
 		logEnviron = False




More information about the lede-commits mailing list