# NB the phase1 build factory assumes workers are single-build only
def prepareFactory(target):
- ts = target.split("/")
+ (target, subtarget) = target.split("/")
factory = BuildFactory()
descriptionDone=".config seeded",
command=Interpolate(
"printf 'CONFIG_TARGET_%(kw:target)s=y\\nCONFIG_TARGET_%(kw:target)s_%(kw:subtarget)s=y\\nCONFIG_SIGNED_PACKAGES=%(kw:usign:#?|y|n)s\\n' >> .config",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
usign=GetUsignKey,
),
)
description="Checking architecture",
descriptionDone="Architecture validated",
command='grep -sq CONFIG_TARGET_%s=y .config && grep -sq CONFIG_TARGET_SUBTARGET=\\"%s\\" .config'
- % (ts[0], ts[1]),
+ % (target, subtarget),
logEnviron=False,
want_stdout=False,
want_stderr=False,
"-p",
Interpolate(
"bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/%(prop:kernelversion)s",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
],
haltOnFailure=True,
"-va",
Interpolate(
"bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/packages/",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
Interpolate(
"bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/%(prop:kernelversion)s/",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
],
haltOnFailure=True,
"CONFIG_SIGNED_PACKAGES=",
Interpolate(
"PACKAGE_SUBDIRS=bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/%(prop:kernelversion)s/",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
],
env=MakeEnv(),
descriptionDone="Files to sign packed",
command=Interpolate(
"find bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/ bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/ -mindepth 1 -maxdepth 2 -type f -name sha256sums -print0 -or -name Packages -print0 | xargs -0 tar -czf sign.tar.gz",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
haltOnFailure=True,
doStepIf=IsSignEnabled,
factory.addStep(
FileUpload(
workersrc="sign.tar.gz",
- masterdest="%s/signing/%s.%s.tar.gz" % (work_dir, ts[0], ts[1]),
+ masterdest="%s/signing/%s.%s.tar.gz" % (work_dir, target, subtarget),
haltOnFailure=True,
doStepIf=IsSignEnabled,
)
descriptionDone="Files signed",
command=[
"%s/signall.sh" % (scripts_dir),
- "%s/signing/%s.%s.tar.gz" % (work_dir, ts[0], ts[1]),
+ "%s/signing/%s.%s.tar.gz" % (work_dir, target, subtarget),
Interpolate("%(prop:branch)s"),
],
env={"CONFIG_INI": os.getenv("BUILDMASTER_CONFIG", "./config.ini")},
factory.addStep(
FileDownload(
name="dlsigntargz",
- mastersrc="%s/signing/%s.%s.tar.gz" % (work_dir, ts[0], ts[1]),
+ mastersrc="%s/signing/%s.%s.tar.gz" % (work_dir, target, subtarget),
workerdest="sign.tar.gz",
haltOnFailure=True,
doStepIf=IsSignEnabled,
"-p",
Interpolate(
"tmp/upload/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
prefix=GetVersionPrefix,
),
],
"-p",
Interpolate(
"tmp/upload/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/kmods/%(prop:kernelversion)s",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
prefix=GetVersionPrefix,
),
],
Interpolate(
"%(kw:url)s/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/sha256sums",
url=GetRsyncParams.withArgs("bin", "url"),
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
prefix=GetVersionPrefix,
),
"target-sha256sums",
"target-sha256sums",
Interpolate(
"bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/sha256sums",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
"rsynclist",
],
"--exclude=/kmods/",
"--files-from=rsynclist",
"--delay-updates",
- "--partial-dir=.~tmp~%s~%s" % (ts[0], ts[1]),
+ "--partial-dir=.~tmp~%s~%s" % (target, subtarget),
]
+ rsync_defopts
+ [
Interpolate("-a%(prop:rsync_ipv4:+4)s"),
Interpolate(
"bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
Interpolate(
"%(kw:url)s/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/",
url=GetRsyncParams.withArgs("bin", "url"),
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
prefix=GetVersionPrefix,
),
],
"--existing",
"--ignore-existing",
"--delay-updates",
- "--partial-dir=.~tmp~%s~%s" % (ts[0], ts[1]),
+ "--partial-dir=.~tmp~%s~%s" % (target, subtarget),
]
+ rsync_defopts
+ [
Interpolate("-a%(prop:rsync_ipv4:+4)s"),
Interpolate(
"bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
Interpolate(
"%(kw:url)s/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/",
url=GetRsyncParams.withArgs("bin", "url"),
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
prefix=GetVersionPrefix,
),
],
"../rsync.sh",
"--delete",
"--delay-updates",
- "--partial-dir=.~tmp~%s~%s" % (ts[0], ts[1]),
+ "--partial-dir=.~tmp~%s~%s" % (target, subtarget),
]
+ rsync_defopts
+ [
Interpolate("-a%(prop:rsync_ipv4:+4)s"),
Interpolate(
"bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/%(prop:kernelversion)s/",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
Interpolate(
"%(kw:url)s/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/kmods/%(prop:kernelversion)s/",
url=GetRsyncParams.withArgs("bin", "url"),
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
prefix=GetVersionPrefix,
),
],
+ [
Interpolate(
"--partial-dir=.~tmp~%(kw:target)s~%(kw:subtarget)s~%(prop:workername)s",
- target=ts[0],
- subtarget=ts[1],
+ target=target,
+ subtarget=subtarget,
),
Interpolate("-a%(prop:rsync_ipv4:+4)s"),
"dl/",