diff --git a/PACKAGING_FRAMEWORKS b/PACKAGING_FRAMEWORKS index fd52e97..d3adbfd 100644 --- a/PACKAGING_FRAMEWORKS +++ b/PACKAGING_FRAMEWORKS @@ -1,71 +1,73 @@ This is a quick description on how KDE Frameworks packaging is done. [ ] Ensure that the tags from the last release have been pushed! [ ] Ensure everything is green in https://build.kde.org/view/Frameworks/ [ ] Ensure everything is green in http://ci-logs.kde.flaska.net/matrix.html [ ] ssh -A pkgframeworks@lxr.kde.org, and from there: Update version file with the correct version number, commit, push. Edit config, ensure dry_run=0 cd ~/release-tools/ rm -rf sources versions REVISIONS_AND_HASHES l10n tags.git cd ../src && ./kdesrc-build --src-only && cd ../release-tools && ./list_frameworks.sh && ./update_l10n.sh ; ./increase_frameworks_version.sh step1 && ./increase_frameworks_version.sh step2 + # takes 17 minutes + [ ] In case this detected new frameworks, check that step1/step2 worked. [ ] Pack the sources: ./make_rc_tag.sh # takes 7 minutes [ ] Locally, ensure the rc tag compiles (to avoid e.g. a bad .po file breaking the build) $ edit extragear/utils/kdesrc-build/kf5-frameworks-build-include to add tag v5.12.0-rc1 in module-set frameworks $ kdesrc-build frameworks [ ] All good, pack it up. $ ./remote-gpg ./pack_all.sh # takes 7 minutes [ ] If you have ssh access to ftpadmin@racnoss.kde.org: ./upload_all.sh # cannot be done from a resumed screen... [ ] Write the list of changes in markdown format, into a file called changelog This is partly automated with ./generate_changelog.sh [ ] Locally, run $ ./grab_from_scripty.sh && ./mail_release_team.sh * To update a tag+tarball after making fixes (grabbing all changes from master) (this is the lazy version of the next solution, it re-commits all po files so it's not as good) ./make_rc_tag.sh kconfigwidgets && ./pack.sh kconfigwidgets && ./upload_all.sh (and re-run ./create_sources_inc if already done) * To update a tag+tarball by cherry-picking a single fix With a script: ./make_updated_tarball.sh newrc|patchrelease The manual way: git checkout local_release (if no such branch exists, there are no translations, just pull master and tag, or make a branch for cherry-picking) git fetch ; git cherry-pick -x sha1 (or git merge origin/master) ; git tag -a vx.y.z-rcN -m "" ; git push --tags Update N in tags.git, check version file, ./pack.sh ; ./upload_all.sh (and re-run ./create_sources_inc if already done) * cat versions/* > REVISIONS_AND_HASHES, if you want to send it all-in-one-go after updates Several days later: [ ] 8 hours before the release: $ ssh ftpadmin@racnoss.kde.org "chmod a+rx ~/stable/frameworks/5.xx ; ls -l ~/stable/frameworks" [ ] ./tag_all.sh && ./create_sources_inc # takes 5 minutes (not from a resumed screen, for the git push in inqlude-data) cd ../www ; vi index.php # remove the old entry svn commit [ ] Email changelog text to kde-devel@kde.org and kde-core-devel@kde.org, and another mail to kde-announce@kde.org, by running, locally: $ ./grab_from_scripty.sh && ./mail_announcement.sh [ ] Post to the dot on https://dot.kde.org/content/contribute-story [ ] Update the version numbers right away in master. vi version ./increase_frameworks_version.sh step1 To make a patchlevel release: * Use the cherry-pick procedure above. Run "./create_sources_inc x.y.z", commit the new info file. Edit info/kde-frameworks-*.php: mention the "known bugs" and include the new info file under the main one. diff --git a/pack.sh b/pack.sh index 2733e6d..666f8bc 100755 --- a/pack.sh +++ b/pack.sh @@ -1,112 +1,112 @@ #!/bin/bash . utils.sh repo_to_pack=$1 force=$2 if [ -z "$repo_to_pack" ]; then echo "No repo given" exit fi mkdir -p versions # Determine where in sources/ the tarball should go. # Output: $destination function adjustDestination() { local repo=$1 metainfo=$srcdir/frameworks/$repo/metainfo.yaml if [ -f $metainfo ]; then portingAid=`readYamlEntry $metainfo portingAid` if [ "$portingAid" = "true" ]; then destination=$destination/portingAids fi fi } function determineVersion() { # Determine version from tag: v5.28.0-rc2 -> 5.28.0, v5.28.1 -> 5.28.1 version=`echo $tag | sed -e 's/^v//;s/-rc.*//'` versionFilePath=$PWD/versions/$repo_to_pack if [ $repo_to_pack == "kirigami" ]; then tarFile="kirigami2" else tarFile="$repo_to_pack" fi tarFile=$tarFile-$version.tar.xz destination=sources adjustDestination $repo mkdir -p $destination echo $destination/$tarFile } inputfile=tags.git cat $inputfile | while read repo tag; do if [ "$repo_to_pack" = "$repo" ]; then repoLine="$repo $tag" determineVersion checkDownloadUptodate "git" "$destination/$tarFile" $tag uptodate=$? if [ $uptodate = 1 ]; then echo "$repo is already up to date, no need to re-download. Use -f as second parameter if you want to force" break; fi checkout=1 echo "$repoLine" echo "$repoLine" > $versionFilePath basename=$repo-$version if [ $repo == "kirigami" ]; then basename="kirigami2-$version" fi echo "$basename" while [ $checkout -eq 1 ]; do rev=`get_git_rev $tag` oldpwd=$PWD cd $destination if [ "$dry_run" = "0" ]; then git archive --remote=kde:$repo $tag --prefix $basename/ | tar x else $cmd "git archive --remote=kde:$repo $tag --prefix $basename/ | tar x" fi errorcode=$PIPESTATUS # grab error code from git archive if [ $errorcode -eq 0 ]; then rev2=`get_git_rev $tag` if [ "$rev" = "$rev2" ]; then checkout=0 if [ "$dry_run" = "0" ]; then tar c --owner 0 --group 0 --numeric-owner $basename | xz -9 > $tarFile else $cmd "tar c --owner 0 --group 0 --numeric-owner $basename | $cmd xz -9 > $tarFile" fi if [ $make_zip -eq 1 ]; then $cmd rm -f $basename.zip $cmd zip -r $basename.zip $basename || exit 1 fi else # someone made a change meanwhile, retry rm -f $tarFile fi rm -rf $basename else echo "git archive --remote=kde:$repo $tag --prefix $basename/ failed with error code $errorcode" fi cd $oldpwd done if [ "$dry_run" = "0" ]; then echo "$rev" echo "$rev" >> $versionFilePath sha256sum $destination/$tarFile >> $versionFilePath fi $cmd rm -f $destination/$tarFile.sig - $cmd gpg2 --digest-algo SHA512 --armor --detach-sign -o $destination/$tarFile.sig -s $destination/$tarFile + $cmd gpg2 --digest-algo SHA512 --armor --detach-sign -o $destination/$tarFile.sig -s $destination/$tarFile || exit 1 fi done diff --git a/pack_all.sh b/pack_all.sh index 0e32e4c..681be5a 100755 --- a/pack_all.sh +++ b/pack_all.sh @@ -1,19 +1,23 @@ #!/bin/bash +logfile=logs/$0.log +exec > >(tee -a $logfile) +exec 2> >(tee -a $logfile >&2) + . config # Make sure gpg-remote is running gpg2 --digest-algo SHA512 --armor --detach-sign -o /dev/null -s config || exit 2 cat modules.git | while read repo branch; do ( bash pack.sh $repo $1 ) done if [ "$release_l10n_separately" = "1" ]; then bash pack_l10n.sh fi # for sending to kde-packager@kde.org cat versions/* > REVISIONS_AND_HASHES diff --git a/upload_all.sh b/upload_all.sh index 2a98936..8bf9ef6 100755 --- a/upload_all.sh +++ b/upload_all.sh @@ -1,22 +1,22 @@ #!/bin/bash . utils.sh . config # Don't read version from the version file, it might already be N+1 when doing a patch release N.1 version=`head -n 1 REVISIONS_AND_HASHES | perl -e 'while(<>) { print $1 if (m/ v([0-9\.]*)/) }'` # version=x.y.z ==> dir=x.y # Patch-level releases go into the same directory, since they are typically just one framework dir=`echo $version | sed -e 's/\.[0-9]$//'` dest=stable/frameworks/$dir $cmd ssh ftpadmin@racnoss.kde.org "mkdir $dest 2>/dev/null && chmod o-rx $dest" $cmd rsync --progress -v -a -e "ssh -x" -r sources/* ftpadmin@racnoss.kde.org:$dest/ # Make diff of local changes to commit (from my own computer, so they don't come from scripty) git diff > to_commit.diff -echo "Done, now run ./grab_from_scripty.sh locally" +echo "Done, now ./generate_changelog.sh and then run ./grab_from_scripty.sh locally"