phase1,phase2: s/master/main for phase{1,2} master
authorPaul Spooren <mail@aparcar.org>
Tue, 23 May 2023 21:02:48 +0000 (23:02 +0200)
committerPetr Štetiar <ynezz@true.cz>
Sat, 13 Apr 2024 04:52:44 +0000 (04:52 +0000)
More and more projects are switching their repositories to use the
'main' branch instead of the 'master' branch. This also includes many
Linux upstream trees as well. Some trees are even removing their
'master' branches already.

I think this is becoming more and more mainstream and expected of
projects, so we should do the same.

References: https://openwrt.org/voting/2023-02-27
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit facelift]
.flake8 [new file with mode: 0644]
.github/dependabot.yml [new file with mode: 0644]
.github/workflows/build-push.yml
.gitignore
docker/config.ini
phase1/config.ini.example
phase1/master.cfg
phase2/config.ini.example
phase2/master.cfg
requirements-dev.txt
scripts/makebranch.sh

diff --git a/.flake8 b/.flake8
new file mode 100644 (file)
index 0000000..66380a1
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,4 @@
+[flake8]
+max-line-length = 140
+per-file-ignores =
+    phase2/master.cfg: E101,E117,E128,E201,E202,E203,E221,E225,E251,E266,E302,E305,E501,W191
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644 (file)
index 0000000..41039d6
--- /dev/null
@@ -0,0 +1,15 @@
+# Set update schedule for GitHub Actions
+
+version: 2
+updates:
+
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      # Check for updates to GitHub Actions every week
+      interval: "weekly"
+    # Prefix all commit messages with "CI" plus its scope, that is, a
+    # list of updated dependencies
+    commit-message:
+      prefix: "CI"
+      include: "scope"
index f568ed661fe312e375bbe6d09ac46840b2c7ef4f..1ae0f275cf01ef35cbeca72762cf86fc04e06022 100644 (file)
@@ -28,9 +28,9 @@ jobs:
 
     steps:
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
-      - uses: actions/setup-python@v4
+      - uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python-version }}
 
@@ -40,6 +40,9 @@ jobs:
       - name: Lint with ruff
         run: ruff phase*/master.cfg
 
+      - name: Lint with flake8
+        run: flake8 phase*/master.cfg
+
       - name: Stylecheck with black
         run: black phase1/master.cfg
 
@@ -63,14 +66,14 @@ jobs:
 
     steps:
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Environment variables
         run: |
           echo "GIT_SHA_SHORT=${GITHUB_SHA::${{ env.GITHUB_SHA_LEN }}}" >> $GITHUB_ENV
 
       - name: Build container and export it to local Docker
-        uses: docker/build-push-action@v4
+        uses: docker/build-push-action@v5
         with:
           load: true
           tags: local/${{ matrix.container_flavor }}
@@ -105,7 +108,7 @@ jobs:
 
     steps:
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Environment variables
         run: |
@@ -113,19 +116,19 @@ jobs:
 
       - name: Docker meta
         id: meta
-        uses: docker/metadata-action@v4
+        uses: docker/metadata-action@v5
         with:
           images: name=ghcr.io/${{ github.repository }}/build${{ matrix.container_flavor }}-v${{ env.BUILDBOT_VERSION }}
 
       - name: Login to GitHub Container Registry
-        uses: docker/login-action@v2
+        uses: docker/login-action@v3
         with:
           registry: ghcr.io
           username: ${{ github.actor }}
           password: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Build container again and push it
-        uses: docker/build-push-action@v4
+        uses: docker/build-push-action@v5
         with:
           push: true
           tags: ${{ steps.meta.outputs.tags }}
index 0d4e15fcff942daaea0f1aab1d2f04a6977dd3da..5c68e090d88049fe43706b1151165ae9b4a90372 100644 (file)
@@ -27,3 +27,4 @@ phase[12]/twistd.*
 !.ruff.toml
 !tests
 !tests/**/*
+!.flake8
index da868eaa64f87cfe11b56dfab75195812f11bb26..6278d3decbc098a2c841faf9d616d33dfa183f89 100644 (file)
@@ -27,7 +27,7 @@ persistent = false
 
 [repo]
 url = https://git.openwrt.org/openwrt/openwrt.git
-branch = master
+branch = main
 
 [rsync]
 binary_url = upload@rsync-server::data/bin
@@ -36,7 +36,7 @@ source_url = upload@rsync-server::data/src
 source_password = secret
 sdk_url = upload@rsync-server::data/bin/targets
 sdk_password = secret
-sdk_pattern = openwrt-sdk-*.tar.xz
+sdk_pattern = openwrt-sdk-*.tar.*
 
 [gpg]
 key = -----BEGIN PGP PRIVATE KEY BLOCK-----
index d7262bd0bbd400610360427fec2a42290f88c171..267184f01594584fbfd74aaa00b3163d551e1fcd 100644 (file)
@@ -49,8 +49,8 @@ config_seed = # Seed configuration
 [branch openwrt-22.03]
 name = openwrt-22.03
 
-[branch master]
-name = master
+[branch main]
+name = main
 
 [worker 1]
 phase = 1
index 2d6f3045d17d5f59d2c12b4ccb04f07aaa159bc2..4e7cbc109152bb953f84e614904ed731ef842a90 100644 (file)
@@ -107,7 +107,7 @@ pb_port = inip1.get("port") or 9989
 # a shorter alias to save typing.
 c = BuildmasterConfig = {}
 
-####### PROJECT IDENTITY
+# PROJECT IDENTITY
 
 # the 'title' string will appear at the top of this buildbot
 # installation's html.WebStatus home page (linked to the
@@ -124,7 +124,7 @@ c["titleURL"] = ini["general"].get("title_url")
 
 c["buildbotURL"] = inip1.get("buildbot_url")
 
-####### BUILDWORKERS
+# BUILDWORKERS
 
 # The 'workers' list defines the set of recognized buildworkers. Each element is
 # a Worker object, specifying a unique worker name and password.  The same
@@ -266,7 +266,8 @@ def prioritizeBuilders(master, builders):
         pos = 99
         for name, prio in bldrNamePrio.items():
             if bldr.name.startswith(name):
-                pos = prio + 50 - min(hiprio, 50)    # higher priority (larger positive number) raises position
+                # higher priority (larger positive number) raises position
+                pos = prio + 50 - min(hiprio, 50)
                 break
 
         # pos order: janitor/local (0), tag builds if any [1..50], !tag builds [51...]
@@ -292,7 +293,7 @@ def prioritizeBuilders(master, builders):
 
 c["prioritizeBuilders"] = prioritizeBuilders
 
-####### CHANGESOURCES
+# CHANGESOURCES
 
 # find targets
 targets = dict()
@@ -358,7 +359,7 @@ c["change_source"].append(
     )
 )
 
-####### SCHEDULERS
+# SCHEDULERS
 
 # Configure the Schedulers, which decide how to react to incoming changes.
 
@@ -541,7 +542,7 @@ c["schedulers"].append(
     schedulers.Triggerable(name="trigger", builderNames=builderNames, priority=20)
 )
 
-####### BUILDERS
+# BUILDERS
 
 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
 # what steps, and which workers can execute them.  Note that any particular build will
@@ -549,7 +550,7 @@ c["schedulers"].append(
 
 
 def IsNoMasterBuild(step):
-    return step.getProperty("branch") != "master"
+    return step.getProperty("branch") != "main"
 
 
 def IsUsignEnabled(step):
@@ -576,7 +577,7 @@ def GetBaseVersion(branch):
     if re.match(r"^[^-]+-[0-9]+\.[0-9]+$", branch):
         return branch.split("-")[1]
     else:
-        return "master"
+        return "main"
 
 
 @properties.renderer
@@ -587,7 +588,7 @@ def GetVersionPrefix(props):
         r"^v[0-9]+\.[0-9]+\.[0-9]+(?:-rc[0-9]+)?$", props["tag"]
     ):
         return "%s/" % props["tag"][1:]
-    elif basever != "master":
+    elif basever != "main":
         return "%s-SNAPSHOT/" % basever
     else:
         return ""
@@ -882,7 +883,11 @@ def prepareFactory(target):
             name="gitverify",
             description="Ensuring that Git HEAD is pointing to a branch or tag",
             descriptionDone="Git HEAD is sane",
-            command='git rev-parse --abbrev-ref HEAD | grep -vxqF HEAD || git show-ref --tags --dereference 2>/dev/null | sed -ne "/^$(git rev-parse HEAD) / { s|^.*/||; s|\\^.*||; p }" | grep -qE "^v[0-9][0-9]\\."',
+            command=(
+                "git rev-parse --abbrev-ref HEAD | grep -vxqF HEAD || "
+                "git show-ref --tags --dereference 2>/dev/null | sed -ne "
+                '"/^$(git rev-parse HEAD) / { s|^.*/||; s|\\^.*||; p }" | grep -qE "^v[0-9][0-9]\\."'
+            ),
             haltOnFailure=True,
         )
     )
@@ -944,7 +949,9 @@ def prepareFactory(target):
             name="newconfig",
             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",
+                "printf 'CONFIG_TARGET_%(kw:target)s=y\\n"
+                "CONFIG_TARGET_%(kw:target)s_%(kw:subtarget)s=y\\n"
+                "CONFIG_SIGNED_PACKAGES=%(kw:usign:#?|y|n)s\\n' >> .config",
                 target=target,
                 subtarget=subtarget,
                 usign=GetUsignKey,
@@ -1145,7 +1152,11 @@ def prepareFactory(target):
             name="kernelversion",
             property="kernelversion",
             description="Finding the effective Kernel version",
-            command="make --no-print-directory -C target/linux/ val.LINUX_VERSION val.LINUX_RELEASE val.LINUX_VERMAGIC | xargs printf '%s-%s-%s\\n'",
+            command=(
+                "make --no-print-directory -C target/linux/ "
+                "val.LINUX_VERSION val.LINUX_RELEASE val.LINUX_VERMAGIC | "
+                "xargs printf '%s-%s-%s\\n'"
+            ),
             env={"TOPDIR": Interpolate("%(prop:builddir)s/build")},
         )
     )
@@ -1341,7 +1352,10 @@ def prepareFactory(target):
             description="Packing files to sign",
             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",
+                "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=target,
                 subtarget=subtarget,
             ),
@@ -1674,7 +1688,11 @@ def prepareFactory(target):
             name="sourcelist",
             description="Finding source archives to upload",
             descriptionDone="Source archives to upload found",
-            command="find dl/ -maxdepth 1 -type f -not -size 0 -not -name '.*' -not -name '*.hash' -not -name '*.dl' -newer .config -printf '%f\\n' > sourcelist",
+            command=(
+                "find dl/ -maxdepth 1 -type f -not -size 0 "
+                "-not -name '.*' -not -name '*.hash' -not -name "
+                "'*.dl' -newer .config -printf '%f\\n' > sourcelist"
+            ),
             haltOnFailure=True,
         )
     )
@@ -1775,7 +1793,7 @@ for brname in branchNames:
         )
 
 
-####### STATUS TARGETS
+# STATUS TARGETS
 
 # 'status' is a list of Status Targets. The results of each build will be
 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
@@ -1826,7 +1844,7 @@ c["revlink"] = util.RevlinkMatch(
     r"https://git.openwrt.org/?p=openwrt/\1.git;a=commit;h=%s",
 )
 
-####### DB URL
+# DB URL
 
 c["db"] = {
     # This specifies what database buildbot uses to store its state.  You can leave
index ba8ff76731f95cdd0f9dfb6cc6b5d03ed00386ab..ec0e6dbfc355cec938cc05867d4ac490de261fa4 100644 (file)
@@ -20,7 +20,7 @@ git_ssh_key = -----BEGIN RSA PRIVATE KEY-----
 
 [repo]
 url = https://git.openwrt.org/openwrt/openwrt.git
-branch = master
+branch = main
 
 [rsync]
 binary_url = user@example.org::upload-packages
@@ -29,7 +29,7 @@ source_url = user@example.org::upload-sources
 source_password = example2
 sdk_url = user@example.org::download-binary
 sdk_password = example3
-sdk_pattern = openwrt-sdk-*.tar.xz
+sdk_pattern = openwrt-sdk-*.tar.*
 
 [gpg]
 key = -----BEGIN PGP PRIVATE KEY BLOCK-----
index ae994cdcb05e8fda13dc8839a222a951b73cf350..c399c66eb0fc9467e250e85d6b2652d99388abab 100644 (file)
@@ -70,7 +70,6 @@ if ini.has_option("phase2", "persistent"):
        persistent = ini.getboolean("phase2", "persistent")
 
 c['workers'] = []
-max_builds = dict()
 
 for section in ini.sections():
        if section.startswith("worker "):
@@ -78,21 +77,12 @@ for section in ini.sections():
                        ini.has_option(section, "phase") and ini.getint(section, "phase") == 2:
                        name = ini.get(section, "name")
                        password = ini.get(section, "password")
-                       sl_props = { 'shared_wd': False }
-                       max_builds[name] = 1
-
-                       if ini.has_option(section, "builds"):
-                               max_builds[name] = ini.getint(section, "builds")
-
-                       if max_builds[name] == 1:
-                               sl_props['shared_wd'] = True
+                       sl_props = { 'shared_wd': True }
 
                        if ini.has_option(section, "shared_wd"):
                                sl_props['shared_wd'] = ini.getboolean(section, "shared_wd")
-                               if sl_props['shared_wd'] and (max_builds != 1):
-                                       raise ValueError('max_builds must be 1 with shared workdir!')
 
-                       c['workers'].append(Worker(name, password, max_builds = max_builds[name], properties = sl_props))
+                       c['workers'].append(Worker(name, password, max_builds = 1, properties = sl_props))
 
 # 'workerPortnum' defines the TCP port to listen on for connections from workers.
 # This must match the value configured into the buildworkers (with their
@@ -125,7 +115,7 @@ if ini.has_option("rsync", "source_url"):
 
 rsync_sdk_url = None
 rsync_sdk_key = None
-rsync_sdk_pat = "openwrt-sdk-*.tar.xz"
+rsync_sdk_pat = "openwrt-sdk-*.tar.*"
 
 if ini.has_option("rsync", "sdk_url"):
        rsync_sdk_url = ini.get("rsync", "sdk_url")
@@ -139,7 +129,7 @@ if ini.has_option("rsync", "sdk_pattern"):
 rsync_defopts = ["-4", "-v", "--timeout=120"]
 
 repo_url = ini.get("repo", "url")
-repo_branch = "master"
+repo_branch = "main"
 
 if ini.has_option("repo", "branch"):
        repo_branch = ini.get("repo", "branch")
@@ -187,7 +177,7 @@ def parse_feed_entry(line):
        if parts[0].startswith("src-git"):
                feeds.append(parts)
                url = parts[2].strip().split(';')
-               branch = url[1] if len(url) > 1 else 'master'
+               branch = url[1] if len(url) > 1 else 'main'
                feedbranches[url[0]] = branch
                c['change_source'].append(GitPoller(url[0], branch=branch, workdir='%s/%s.git' %(os.getcwd(), parts[1]), pollinterval=300))
 
@@ -277,13 +267,6 @@ def GetDirectorySuffix(props):
                        return "-%02d.%02d" %(int(m.group(1)), int(m.group(2)))
        return ""
 
-@properties.renderer
-def GetNumJobs(props):
-       if props.hasProperty("workername") and props.hasProperty("nproc"):
-               return str(int(props["nproc"]) / max_builds[props["workername"]])
-       else:
-               return "1"
-
 @properties.renderer
 def GetCwd(props):
        if props.hasProperty("builddir"):
@@ -297,7 +280,7 @@ def IsArchitectureSelected(target):
        def CheckArchitectureProperty(step):
                try:
                        options = step.getProperty("options")
-                       if type(options) is dict:
+                       if isinstance(options, dict):
                                selected_arch = options.get("architecture", "all")
                                if selected_arch != "all" and selected_arch != target:
                                        return False
@@ -574,7 +557,7 @@ for arch in arches:
                description = "Building packages",
                workdir = "build/sdk",
                timeout = 3600,
-               command = ["make", Interpolate("-j%(kw:jobs)s", jobs=GetNumJobs), "IGNORE_ERRORS=n m y", "BUILD_LOG=1", "CONFIG_AUTOREMOVE=y", "CONFIG_SIGNED_PACKAGES="],
+               command = ["make", Interpolate("-j%(prop:nproc:-1)s"), "IGNORE_ERRORS=n m y", "BUILD_LOG=1", "CONFIG_AUTOREMOVE=y", "CONFIG_SIGNED_PACKAGES="],
                env = {'CCACHE_BASEDIR': Interpolate("%(kw:cwd)s", cwd=GetCwd)},
                haltOnFailure = True))
 
@@ -589,7 +572,10 @@ for arch in arches:
                description = "Calculating checksums",
                descriptionDone="Checksums calculated",
                workdir = "build/sdk",
-               command = "cd bin/packages/%s; " %(arch[0]) + "find . -type f -not -name 'sha256sums' -printf \"%P\n\" | sort | xargs -r ../../../staging_dir/host/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$!\1 *\2!p' > sha256sums)",
+               command = "cd bin/packages/%s; " %(arch[0])
+               + "find . -type f -not -name 'sha256sums' -printf \"%P\n\" | "
+               + "sort | xargs -r ../../../staging_dir/host/bin/mkhash -n sha256 | "
+               + r"sed -ne 's!^\(.*\) \(.*\)$!\1 *\2!p' > sha256sums",
                haltOnFailure = True
        ))
 
@@ -658,7 +644,7 @@ for arch in arches:
 
        factory.addStep(FileDownload(
                name = "dlsha2rsyncpl",
-               mastersrc = "sha2rsync.pl",
+               mastersrc = scripts_dir + "/sha2rsync.pl",
                workerdest = "../sha2rsync.pl",
                mode = 0o755,
        ))
@@ -667,7 +653,7 @@ for arch in arches:
                name = "buildlist",
                description = "Building list of files to upload",
                workdir = "build/sdk",
-               command = ["../../../sha2rsync.pl", "../../arch-sha256sums", "bin/packages/%s/sha256sums" %(arch[0]), "rsynclist"],
+               command = ["../../sha2rsync.pl", "../arch-sha256sums", "bin/packages/%s/sha256sums" %(arch[0]), "rsynclist"],
                haltOnFailure = True,
        ))
 
@@ -685,7 +671,7 @@ for arch in arches:
                name = "packageupload",
                description = "Uploading package files",
                workdir = "build/sdk",
-               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])],
+               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
@@ -695,7 +681,7 @@ for arch in arches:
                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])],
+               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
@@ -735,7 +721,7 @@ for arch in arches:
                name = "logupload",
                description = "Uploading failure logs",
                workdir = "build/sdk",
-               command = ["../../../rsync.sh"] + rsync_defopts + ["--delete", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-az", "faillogs/", Interpolate("%(kw:rsyncbinurl)s/faillogs%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
+               command = ["../../rsync.sh"] + rsync_defopts + ["--delete", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-az", "faillogs/", Interpolate("%(kw:rsyncbinurl)s/faillogs%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
                env={'RSYNC_PASSWORD': rsync_bin_key},
                haltOnFailure = False,
                flunkOnFailure = False,
@@ -756,7 +742,7 @@ for arch in arches:
                        name = "sourceupload",
                        description = "Uploading source archives",
                        workdir = "build/sdk",
-                       command = ["../../../rsync.sh"] + rsync_defopts + ["--files-from=sourcelist", "--size-only", "--delay-updates",
+                       command = ["../../rsync.sh"] + rsync_defopts + ["--files-from=sourcelist", "--size-only", "--delay-updates",
                                        Interpolate("--partial-dir=.~tmp~%(kw:archname)s~%(prop:workername)s", archname=arch[0]), "-a", "dl/", "%s/" %(rsync_src_url)],
                        env={'RSYNC_PASSWORD': rsync_src_key},
                        haltOnFailure = False,
index e1cb65f0c300f27d7e01c96f567b13f524fba55d..e373155b03b77f05156cf6566d4158860f2eac4c 100644 (file)
@@ -1,3 +1,4 @@
 cram==0.7
-black==23.3.0
-ruff==0.0.267
+black==23.12.1
+ruff==0.1.9
+flake8==6.1.0
index e92c04c1bf281cbc20d4da00ef9fbeb03184a426..355014cab6cee1592d1e30dfba183e4514a59670 100755 (executable)
@@ -77,8 +77,8 @@ githash="$(git log --format=%h -1)"
 
 prev_branch="$(git symbolic-ref -q HEAD)"
 
-if [ "$prev_branch" != "refs/heads/master" ]; then
-       echo "Expecting current branch name to be \"master\"," \
+if [ "$prev_branch" != "refs/heads/main" ]; then
+       echo "Expecting current branch name to be \"main\"," \
             "but it is \"${prev_branch#refs/heads/}\" - aborting."
 
        exit 1
@@ -101,7 +101,7 @@ while read type name url; do
 
                                        if [ -z "$ref" ]; then
                                                echo "WARNING: Feed \"$name\" provides no" \
-                                                    "\"lede-$version\" branch - using master!" >&2
+                                                    "\"lede-$version\" branch - using main!" >&2
                                        else
                                                url="$url;lede-$version"
                                        fi