Thanks for your work on +1 maintenance!

One bit I want to call attention to:

On Mon, Apr 04, 2022 at 10:17:44PM -0700, Bryce Harrington wrote:
> ## NBS ##

> I uploaded no-change rebuilds of the 11 NBS packages to a PPA; 4 of
> these build successfully, so I uploaded the no-change rebuilds to jammy:

>  libosmocore - 1.6.0-3build1
>  osmo-pcu - 0.8.0-3build3
>  mbedtls - 2.28.0-1build1
>  ncbi-vdb - 2.11.2+dfsg-4build2

> libosmocore and mebdtls successfully transitioned.  The other two are
> still in proposed but I ran out of +1 maint time before I could
> investigate, so leaving for next person and hoping they're at least
> nudged forward.

ncbi-vdb and osmo-pcu were already present in -proposed and blocked by
autopkgtests; there was no need for a no-change rebuild here.

libosmocore and mbedtls also didn't need rebuilds, they were the source
packages whose binaries *are* NBS and it is the other reverse-dependencies
of these packages that need to be resolved.

I recommend using the attached script for no-change rebuilds, as it will
reliably calculate the set of packages that need uploading for a given old
NBS dependency and a new expected dependency; it just needs to be run in an
environment with a full set of sources for the dev series and the -proposed
pocket.  It will also tell you exactly *why* no-change uploads are not
needed for some packages (i.e.: package is already built in -proposed;
package present in -proposed but not built).

I unfortunately do not have a good place to publish it at the moment so that
it's more visible to developers.  Suggestions welcome.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
#!/bin/sh

set -e

dry_run=false
excludes=""
changelog=""

while [ $# -gt 0 ]; do
        case $1 in
                --dry-run)
                        dry_run=:
                        ;;
                --exclude)
                        shift
                        excludes="$1 $excludes"
                        ;;
                --changelog)
                        shift
                        changelog="$1"
                        ;;
                *)
                        if [ -z "$olddep" ]; then
                                olddep=$1
                        elif [ -z "$newdep" ]; then
                                newdep=$1
                        else
                                echo "Unknown argument: $1"
                                exit 1
                        fi
                        ;;
        esac
        shift
done

sudo apt-get install wget ubuntu-dev-tools grep-dctrl devscripts equivs dput \
        distro-info

release=$(distro-info -d)

if [ -z "$changelog" ]; then
        changelog="No-change rebuild against $newdep"
fi

echo "Transitioning $olddep -> $newdep"

oldre=$(echo "$olddep" | sed -e's/+/\\+/g')
newre=$(echo "$newdep" | sed -e's/+/\\+/g')

# don't include our own source package in the list of those needing rebuilds...
oursrc=$(grep-dctrl -n -sSource:Package -w -FPackage "$oldre" 
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_"$release"_*Packages |head 
-n1)
for pkg in $(
        grep-dctrl -n -sSource:Package \( -w -FDepends "$oldre" \
                -o -w -FPre-Depends "$oldre" \) \
                -a '!' -X -FSource:Package "$oursrc" \
                
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_"$release"_*Packages \
                
/var/lib/apt/lists/*.ubuntu.com_ubuntu*_dists_"$release"-proposed_*Packages \
        | sed -e's/(.*)//' | sort -u)
do
        # special-casing when needed
        skip_package=false
        for exclude in $excludes; do
                if [ "$pkg" = "$exclude" ]; then
                        skip_package=:
                fi
        done
        if $skip_package; then
                continue
        fi

        if grep-dctrl -q -FSource:Package -X "$pkg" \
                      -a '!' -w -FDepends "$oldre" \
                      -a -w -FDepends "$newre" \
                      
/var/lib/apt/lists/*.ubuntu.com_ubuntu*_dists_"$release"-proposed_*Packages
        then
                echo "Package $pkg already fixed in $release-proposed."
                continue
        fi

        if proposed_ver=$(grep-dctrl -sVersion -n -FPackage -X "$pkg" 
/var/lib/apt/lists/*.ubuntu.com_ubuntu*_dists_"$release"-proposed_*Sources)
        then
                echo "Package $pkg already present in $release-proposed (but 
not fixed)"
                if ! grep-dctrl -q -FSource:Package -X "$pkg" \
                                -a -FVersion -X "$proposed_ver" \
                                
/var/lib/apt/lists/*.ubuntu.com_ubuntu*_dists_$release-proposed_*Packages
                then
                        echo " (Package $pkg not built in $release-proposed)"
                        continue
                fi
        fi

        echo "Rebuilding $pkg"
        if $dry_run; then
                continue
        fi
        apt-get source $pkg
        build_failed=false
        (cd ${pkg}-*
         dch -R "$changelog"
         update-maintainer
         dch -r -D "$release" ''
         debuild --no-lintian -S -nc
        ) || build_failed=:

        if $build_failed; then
                rm -rf ${pkg}[-_]*
                continue
        fi
        dput ${pkg}*_source.changes
        rm -r ${pkg}[-_]*
done

Attachment: signature.asc
Description: PGP signature

-- 
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Reply via email to