← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~lgp171188/launchpad:rocketfuel-setup-fixes-postgres-14 into launchpad:master

 


Diff comments:

> diff --git a/utilities/launchpad-database-setup b/utilities/launchpad-database-setup
> index b3cae18..beb3fd3 100755
> --- a/utilities/launchpad-database-setup
> +++ b/utilities/launchpad-database-setup
> @@ -101,7 +101,7 @@ echo Waiting 10 seconds for postgresql to come up...
>  sleep 10
>  
>  echo "Creating postgresql user $USER"
> -sudo -u postgres /usr/lib/postgresql/$pgversion/bin/createuser -a -d "$USER"
> +sudo -u postgres /usr/lib/postgresql/$pgversion/bin/createuser -s -d "$USER"

'-a' is a flag that existed in PostgreSQL 8.0 and no longer works with PostgreSQL 14. Its replacement/equivalent is the '-s' flag.

>  
>  echo
>  echo Looks like everything went ok.
> diff --git a/utilities/rocketfuel-setup b/utilities/rocketfuel-setup
> index 8edae82..242286d 100755
> --- a/utilities/rocketfuel-setup
> +++ b/utilities/rocketfuel-setup
> @@ -90,43 +89,7 @@ for hostname in $hostnames; do
>    dev_host;
>  done
>  
> -# Enable relevant Ubuntu package repositories
> -if ! grep -qE "^deb https?:.* ${DISTRIB_CODENAME} .*universe" /etc/apt/sources.list; then
> -    echo "Please enable the 'universe' component in /etc/apt/sources.list'"
> -    exit 1
> -fi
> -if ! grep -qE "^deb https?:.* ${DISTRIB_CODENAME} .*multiverse" /etc/apt/sources.list; then
> -    echo "Please enable the 'multiverse' component in /etc/apt/sources.list'"
> -    exit 1
> -fi

I removed this because 'universe' and 'multiverse' components are always enabled in the focal and noble LXD images that we use. I also got confirmation from the CPC team that there are no plans to changes this.

> -
> -LPDEV_SOURCES="/etc/apt/sources.list.d/launchpad-dev.list"
> -if [ ! -e $LPDEV_SOURCES ]; then
> -  sudo touch $LPDEV_SOURCES
> -fi
> -
> -LP_PPA="deb http://ppa.launchpad.net/launchpad/ppa/ubuntu ${DISTRIB_CODENAME} main"
> -if ! grep -q "^${LP_PPA}" $LPDEV_SOURCES; then
> -  echo "Adding ~launchpad PPA repository to package source list."
> -  echo "$LP_PPA"  | sudo tee -a $LPDEV_SOURCES
> -fi
> -REQUIRED_PPA_KEYS="2AF499CB24AC5F65461405572D1FFB6C0A5174AF"
> -
> -# Get the key used to sign the launchpad-developer-dependencies in the PPA.
> -for key in $REQUIRED_PPA_KEYS; do
> -   if ! sudo APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 \
> -       apt-key adv --list-keys --with-colons --fingerprint | grep -qE "^fpr:+$key"; then
> -     echo "Retrieving key $key."
> -     if ! gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "$key"; then
> -       echo "Could not retrieve key $key."
> -       exit 1
> -     fi
> -     if ! gpg --export -a "$key" | sudo apt-key add -; then
> -       echo "Could not install key $key."
> -       exit 1
> -     fi
> -   fi
> -done
> +sudo add-apt-repository ppa:launchpad/ppa
>  
>  do_install() {
>    if ! dpkg -s "$pkg" | grep -q "^Status: install ok installed"; then
> @@ -140,6 +103,10 @@ do_install() {
>  
>  sudo apt update
>  REQUIRED_PACKAGES="launchpad-developer-dependencies apache2 libapache2-mod-wsgi-py3"
> +if [ $INSTALL_POSTGRES_14 == 1 ]; then
> +  sudo add-apt-repository ppa:launchpad/postgresql-ports

I have tested this using my PPA, ppa:lgp171188/lpdev and have copied the backported packages to the above PPA. So this should work once the copied packages are published.

> +  REQUIRED_PACKAGES="launchpad-database-dependencies-14 ${REQUIRED_PACKAGES}"
> +fi
>  for pkg in $REQUIRED_PACKAGES; do
>    do_install;
>  done


-- 
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/477225
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:rocketfuel-setup-fixes-postgres-14 into launchpad:master.



References