Create release branch

From postmarketOS
Jump to: navigation, search

This is relevant for maintaining the repository only, regular users will not need this guide.

Checklist

Creating a new release branch, like "v20.05":

  • git checkout -b v20.05 master
  • git push
  • protect the new release branch in gitlab, so nobody can force-push to it
  • remove channels.cfg (should only be in master)
  • adjust channel in pmaports.cfg
  • remove packages:
    • device/testing
    • cross/*-armhf, cross/*-x86
    • unused firmware packages (see script below)
  • run pmbootstrap aportgen for packages in cross
  • add the new branch to master's channels.cfg
  • bpo
    • add the branch to bpo's config, for x86_64 only
    • wait until all packages for x86_64 are built and published, fix packages as necessary
    • after x86_64 is published, activate more arches (if you activate them before, the builds will fail due to missing cross compilers!)

Remove unused firmware packages

After removing device/testing/*, the related firmware packages should be removed as well. This script adds them for removal, read it, run it, then do git status and git commit.

#!/bin/sh -e
PMAPORTS=~/code/pmaports

# $1: pkgname
firmware_mentioned_anywhere() {
	local pkgname="$1"

	cd "$PMAPORTS"
	for dir in *; do
		[ -d "$dir" ] || continue
		[ "$dir" = "firmware" ] && continue
		
		git -C "$dir" grep -q "$pkgname" && return 0
	done
	return 1
}

cd "$PMAPORTS/firmware"
for i in *; do
	if firmware_mentioned_anywhere "$i"; then
		echo "# $i was found"
	else
		git rm -r "$PMAPORTS/firmware/$i"
	fi
done
echo "# done"