Skip to content

Primes v1.2.0

Compare
Choose a tag to compare
@moebius-rex moebius-rex released this 05 May 20:28
· 59 commits to main since this release
054a1c5

Release notes

Primes v1.2.0 introduces Go language implementations of the Sieve of Eratosthenes algorithm to the Primes project, including:

  • a utility package that implements the algorithm as a Go structure with associated member functions
  • an app that uses cgo to implement the algorithm by calling functions in the existing C shared library implementation, /usr/local/lib/libcsieve.so

Other tweaks in this release include:

  • all implementations that depend on the C shared library now reference it via soft links in /usr/local
  • setup.sh now checks that /usr/local is writable, and if not, displays a message to try again using sudo to complete the project installation

Tech note

As a required part of this release, Go language package installations were added to each of the Docker image configuration files provided with the project. However, this caused the Ubuntu Docker image build to hang. This turned out to be a known issue with the tzdata package installer's interactive dialog and can be addressed in several ways, including:

  • rolling back to an earlier version of Ubuntu, like 18.04 LTS (Bionic Beaver):
FROM ubuntu:bionic
  • disabling all interactive package installation dialogs only while building the image (by using the ARG, not ENV, build instruction):
RUN apt-get update  -y
RUN apt-get upgrade -y

# disable all interactive package installation dialogs while building the image
ARG DEBIAN_FRONTEND=noninteractive

# install utilities
RUN apt-get install -y file less tree vim
  • disabling interactive dialog for the tzdata package installation only:
RUN apt-get update  -y
RUN apt-get upgrade -y

# disable tzdata interactive package installation dialogs while building the image
RUN DEBIAN_FRONTEND=noninteractive && apt-get install -y tzdata

# install utilities
RUN apt-get install -y file less tree vim
  • installing tzdata before any other packages:
RUN apt-get update  -y
RUN apt-get upgrade -y

# disable all interactive installation dialogs
RUN apt-get install -y tzdata

# install utilities
RUN apt-get install -y file less tree vim

All of the above options solve the problem. We chose to disable all interactive dialogs, because:

  • they clearly make no sense, since Docker image building is not an interactive process
  • using ARG instead of ENV means that interactive dialogs are disabled only during image builds and not while running containers
  • we don't want one "badly behaved" installer tying us to a particular Ubuntu release
  • we're not creating an additional package dependency (tzdata) in our Docker file