Skip to content

Commit

Permalink
Update supported operating systems
Browse files Browse the repository at this point in the history
Add support for Jammy and Bookworm, remove support for Stretch, Xenial
and Bionic plus some traces of even older versions.

See: #87
  • Loading branch information
sagepe committed Dec 5, 2023
1 parent ae29151 commit cde14de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 36 deletions.
24 changes: 6 additions & 18 deletions bin/install-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ update_apt_sources() {
echo -n "Updating APT sources... "
if [ x"$DISTRIBUTION" = x"ubuntu" ] ; then
case "$DISTVERSION" in
xenial|bionic|focal)
focal|jammy)
: # Do nothing, these should have everything.
;;
*)
Expand All @@ -141,10 +141,6 @@ update_apt_sources() {
esac
elif [ x"$DISTRIBUTION" = x"debian" ] ; then
case "$DISTVERSION" in
stretch)
BACKPORTS=true
SECURITY="$DISTVERSION/updates"
;;
buster)
BACKPORTS=false
SECURITY="$DISTVERSION/updates"
Expand All @@ -153,6 +149,10 @@ update_apt_sources() {
BACKPORTS=false
SECURITY="$DISTVERSION-security"
;;
bookworm)
BACKPORTS=false
SECURITY="$DISTVERSION-security"
;;
*)
notice_msg "Unsupported distribution and version combination $DISTRIBUTION $DISTVERSION"
;;
Expand Down Expand Up @@ -189,7 +189,7 @@ update_mysociety_apt_sources() {
# We build packages targetted at Debian releases.
# Try and select the most appropritate ones for Ubuntu.
case "$DISTVERSION" in
xenial|stretch|bionic|buster|focal|bullseye)
focal|jammy|buster|bullseye|bookworm)
cat > /etc/apt/sources.list.d/mysociety-debian.list <<EOF
deb http://debian.mysociety.org $DISTVERSION main
EOF
Expand Down Expand Up @@ -386,8 +386,6 @@ install_website_packages() {
EXACT_PACKAGES="$CONF_DIRECTORY/packages.$DISTRIBUTION-$DISTVERSION"
DIST_PACKAGES="$CONF_DIRECTORY/packages.$DISTRIBUTION"
FALLBACK_PACKAGES="$CONF_DIRECTORY/packages.generic"
PRECISE_PACKAGES="$CONF_DIRECTORY/packages.ubuntu-precise"
SQUEEZE_PACKAGES="$CONF_DIRECTORY/packages.debian-squeeze"
# Allow override by setting PACKAGE_SUFFIX
if [ -n "$PACKAGE_SUFFIX" ] && [ -e "$CONF_DIRECTORY/packages.$PACKAGE_SUFFIX" ]; then
PACKAGES_FILE="$CONF_DIRECTORY/packages.$PACKAGE_SUFFIX"
Expand All @@ -403,16 +401,6 @@ install_website_packages() {
elif [ -e "$FALLBACK_PACKAGES" ]
then
PACKAGES_FILE="$FALLBACK_PACKAGES"
# Otherwise, if this is Ubuntu, and there's a version specifically
# for precise, use that:
elif [ x"$DISTRIBUTION" = x"ubuntu" ] && [ -e "$PRECISE_PACKAGES" ]
then
PACKAGES_FILE="$PRECISE_PACKAGES"
# Otherwise, if this is Debian, and there's a version specifically
# for squeeze, use that:
elif [ x"$DISTRIBUTION" = x"debian" ] && [ -e "$SQUEEZE_PACKAGES" ]
then
PACKAGES_FILE="$SQUEEZE_PACKAGES"
else
error_msg "Could not find a packages file to use - please contribute one."
exit 1
Expand Down
24 changes: 6 additions & 18 deletions shlib/installfns
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ update_apt_sources() {
echo -n "Updating APT sources... "
if [ x"$DISTRIBUTION" = x"ubuntu" ] ; then
case "$DISTVERSION" in
xenial|bionic|focal)
focal|jammy)
: # Do nothing, these should have everything.
;;
*)
Expand All @@ -141,10 +141,6 @@ update_apt_sources() {
esac
elif [ x"$DISTRIBUTION" = x"debian" ] ; then
case "$DISTVERSION" in
stretch)
BACKPORTS=true
SECURITY="$DISTVERSION/updates"
;;
buster)
BACKPORTS=false
SECURITY="$DISTVERSION/updates"
Expand All @@ -153,6 +149,10 @@ update_apt_sources() {
BACKPORTS=false
SECURITY="$DISTVERSION-security"
;;
bookworm)
BACKPORTS=false
SECURITY="$DISTVERSION-security"
;;
*)
notice_msg "Unsupported distribution and version combination $DISTRIBUTION $DISTVERSION"
;;
Expand Down Expand Up @@ -189,7 +189,7 @@ update_mysociety_apt_sources() {
# We build packages targetted at Debian releases.
# Try and select the most appropritate ones for Ubuntu.
case "$DISTVERSION" in
xenial|stretch|bionic|buster|focal|bullseye)
focal|jammy|buster|bullseye|bookworm)
cat > /etc/apt/sources.list.d/mysociety-debian.list <<EOF
deb http://debian.mysociety.org $DISTVERSION main
EOF
Expand Down Expand Up @@ -386,8 +386,6 @@ install_website_packages() {
EXACT_PACKAGES="$CONF_DIRECTORY/packages.$DISTRIBUTION-$DISTVERSION"
DIST_PACKAGES="$CONF_DIRECTORY/packages.$DISTRIBUTION"
FALLBACK_PACKAGES="$CONF_DIRECTORY/packages.generic"
PRECISE_PACKAGES="$CONF_DIRECTORY/packages.ubuntu-precise"
SQUEEZE_PACKAGES="$CONF_DIRECTORY/packages.debian-squeeze"
# Allow override by setting PACKAGE_SUFFIX
if [ -n "$PACKAGE_SUFFIX" ] && [ -e "$CONF_DIRECTORY/packages.$PACKAGE_SUFFIX" ]; then
PACKAGES_FILE="$CONF_DIRECTORY/packages.$PACKAGE_SUFFIX"
Expand All @@ -403,16 +401,6 @@ install_website_packages() {
elif [ -e "$FALLBACK_PACKAGES" ]
then
PACKAGES_FILE="$FALLBACK_PACKAGES"
# Otherwise, if this is Ubuntu, and there's a version specifically
# for precise, use that:
elif [ x"$DISTRIBUTION" = x"ubuntu" ] && [ -e "$PRECISE_PACKAGES" ]
then
PACKAGES_FILE="$PRECISE_PACKAGES"
# Otherwise, if this is Debian, and there's a version specifically
# for squeeze, use that:
elif [ x"$DISTRIBUTION" = x"debian" ] && [ -e "$SQUEEZE_PACKAGES" ]
then
PACKAGES_FILE="$SQUEEZE_PACKAGES"
else
error_msg "Could not find a packages file to use - please contribute one."
exit 1
Expand Down

0 comments on commit cde14de

Please sign in to comment.