• Renaming main git branches from debian/master to debian/latest

    From Amin Bandali@21:1/5 to All on Tue Aug 29 04:40:01 2023
    Hi folks,

    Jeremy (Cc'd) and I propose to rename the main git development branch
    for Debian GNOME team from 'debian/master' to 'debian/latest', and
    similarly from 'ubuntu/master' to 'ubuntu/latest' where they exist.

    Rationale
    ---------

    - This aligns with the 2020 update to DEP-14.

    - debian/latest would also parallel upstream/latest, which we use for
    our git-buildpackage workflow.

    - This follows the industry-wide efforts towards deprecation of the
    term 'master' where possible.

    Implementation details
    ----------------------

    We believe it would be best if we make this change across all of our repositories under the gnome-team group on Salsa, on a single day.

    We propose to do this on Monday, 4 September 2023.

    Once the change is carried out, you'd need to manually checkout the debian/latest branch or just do a new 'gbp clone' to continue working
    on gnome-team packages.

    GitHub added a feature to simplify renaming branches, but GitLab
    doesn't have this yet. So, to automate this, we can use sed, git
    itself, and the glab CLI tool by GitLab to make the following changes:

    1. Change debian-branch in debian/gbp.conf from 'debian/master' to
    'debian/latest'. This will cause many gbp commands to fail until
    the user switches to the debian/latest branch, so it's a helpful
    hint.

    2. Push that change to both debian/master and debian/latest.

    3. Update each repo's settings on Salsa to use debian/latest as the
    default branch.

    4. Update each repo's settings on Salsa to "protect" debian/master to
    prevent any future pushes to the branch, effectively archiving it.

    5. If ubuntu/master exists, follow similar steps as 1, 2, and 4.

    6. Update the gnome-team group settings on Salsa to use debian/latest
    as the default branch for new projects (repos) going forward.

    I have written a small script, git-debian-latest.sh, to carry out
    steps 1 through 5. You can find it attached to this message.

    I welcome and appreciate your feedback/suggestions, and I would be
    happy to try and address any questions or concerns you may have.

    Thanks,
    -a


    References
    ----------

    https://dep-team.pages.debian.net/deps/dep14/ https://github.com/github/renaming
    https://inclusivenaming.org
    https://gitlab.com/gitlab-org/cli


    #!/bin/sh

    # Copyright (C) 2023 Canonical Ltd.
    #
    # Author: Amin Bandali <bandali@ubuntu.com>
    # This file:
    # https://people.ubuntu.com/~bandali/gnome-team/git-debian-latest.sh
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License version 3, as
    # published by the Free Software Foundation.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with this program. If not, see <https://www.gnu.org/licenses/>.

    set -ux

    # glab repo clone -g gnome-team --paginate

    master_to_latest()
    {
    sed -i "/debian-branch/s|$1/master|$1/latest|" debian/gbp.conf
    git add debian/gbp.conf
    git commit -m"Change debian-branch from $1/master to $1/latest"
    git push origin "$1/master"
    git branch -m "$1/latest"
    git push -u origin "$1/latest"
    }

    for dir in ./*/
    do
    (
    cd $dir
    if [ -d .git ] && [ "$(git branch --show-current)" = "debian/master" ]
    then
    # debian/master -> debian/latest
    master_to_latest debian
    if git show-ref -q ubuntu/master
    then
    # ubuntu/master -> ubuntu/latest
    git branch ubuntu/master origin/ubuntu/master
    git checkout ubuntu/master
    master_to_latest ubuntu
    fi

    # make debian/latest the default branch
    glab api -XPUT /projects/:id -F 'default_branch=debian/latest'

    # prevent pushes and merges into debian/master
    glab api -XPOST /projects/:id/protected_branches \
    -F 'name=debian/master' \
    -F 'push_access_level=0' \
    -F 'merge_access_level=0'
    if git show-ref -q ubuntu/master
    then
    # prevent pushes and merges into ubuntu/master
    glab api -XPOST /projects/:id/protected_branches \
    -F 'name=ubuntu/master' \
    -F 'push_access_level=0' \
    -F 'merge_access_level=0'
    fi
    fi
    )
    done

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Amin Bandali@21:1/5 to Amin Bandali on Sun Sep 3 15:40:01 2023
    Hi all,

    Just a quick reminder/heads-up that tomorrow I plan to proceed with
    renaming of the default branch of all of the gnome-team repos from debian/master to debian/latest (and ubuntu/master to ubuntu/latest
    where applicable), and archive the old ones afterwards (by adding
    branch protection rules so they can no longer be pushed to).

    Best,
    -a

    Amin Bandali writes:

    Hi folks,

    Jeremy (Cc'd) and I propose to rename the main git development branch
    for Debian GNOME team from 'debian/master' to 'debian/latest', and
    similarly from 'ubuntu/master' to 'ubuntu/latest' where they exist.

    Rationale
    ---------

    - This aligns with the 2020 update to DEP-14.

    - debian/latest would also parallel upstream/latest, which we use for
    our git-buildpackage workflow.

    - This follows the industry-wide efforts towards deprecation of the
    term 'master' where possible.

    Implementation details
    ----------------------

    We believe it would be best if we make this change across all of our repositories under the gnome-team group on Salsa, on a single day.

    We propose to do this on Monday, 4 September 2023.

    Once the change is carried out, you'd need to manually checkout the debian/latest branch or just do a new 'gbp clone' to continue working
    on gnome-team packages.

    GitHub added a feature to simplify renaming branches, but GitLab
    doesn't have this yet. So, to automate this, we can use sed, git
    itself, and the glab CLI tool by GitLab to make the following changes:

    1. Change debian-branch in debian/gbp.conf from 'debian/master' to
    'debian/latest'. This will cause many gbp commands to fail until
    the user switches to the debian/latest branch, so it's a helpful
    hint.

    2. Push that change to both debian/master and debian/latest.

    3. Update each repo's settings on Salsa to use debian/latest as the
    default branch.

    4. Update each repo's settings on Salsa to "protect" debian/master to
    prevent any future pushes to the branch, effectively archiving it.

    5. If ubuntu/master exists, follow similar steps as 1, 2, and 4.

    6. Update the gnome-team group settings on Salsa to use debian/latest
    as the default branch for new projects (repos) going forward.

    I have written a small script, git-debian-latest.sh, to carry out
    steps 1 through 5. You can find it attached to this message.

    I welcome and appreciate your feedback/suggestions, and I would be
    happy to try and address any questions or concerns you may have.

    Thanks,
    -a


    References
    ----------

    https://dep-team.pages.debian.net/deps/dep14/ https://github.com/github/renaming
    https://inclusivenaming.org
    https://gitlab.com/gitlab-org/cli

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Amin Bandali@21:1/5 to All on Mon Sep 4 18:50:01 2023
    Hi again folks,

    This is [mostly] done now: except for the repos listed below that were
    either empty or had a default branch other than 'debian/master', the 'debian/master' branch for all other gnome-team repos has been renamed
    to 'debian/latest', the new branch name set as the default branch, and
    the old branch effectively archived (using branch protection rules to
    disallow pushes). Similarly for 'ubuntu/master' to 'ubuntu/latest'.

    Further, the target branch for all open merge requests that targeted 'debian/master' has been updated to 'debian/latest'.

    The scripts (and corresponding outputs) used for making these changes
    are available under: https://people.ubuntu.com/~bandali/gnome-team/

    Finally, here are the repos that were skipped by the script - I plan
    to have a closer look at these through this week and potentially make
    similar changes for them where appropriate:

    foliate
    folks
    gir-rust-code-generator
    gnome-font-downloader
    gnome-kiosk
    gnome-shell-extension-alphabetical-grid
    gnome-shell-extension-arc-menu
    gnome-shell-extension-dash-to-panel
    gnome-shell-extension-disconnect-wifi
    gnome-shell-extension-freon
    gnome-shell-extension-gamemode
    gnome-shell-extension-harddisk-led
    gnome-shell-extension-hide-activities
    gnome-shell-extension-hide-veth
    gnome-shell-extension-impatience
    gnome-shell-extension-move-clock
    gnome-shell-extension-multi-monitors
    gnome-shell-extension-no-annoyance
    gnome-shell-extension-pixelsaver
    gnome-shell-extension-refreshwifi
    gnome-shell-extension-remove-dropdown-arrows gnome-shell-extension-system-monitor
    gnome-shell-extension-tiling-assistant
    gnome-shell-extension-tilix-dropdown
    gnome-shell-extension-tilix-shortcut
    gnome-shell-extension-trash
    gnome-shell-extension-volume-mixer
    gnome-themes
    gtuber
    libhandy
    libmediaart
    mozjs
    passes-gtk
    utils

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)