Skip to content

Commit

Permalink
Merge pull request #221 from Automattic/set-debian-frontend
Browse files Browse the repository at this point in the history
fix: set `DEBIAN_FRONTEND` to `noninteractive`
  • Loading branch information
sjinks authored Jun 1, 2024
2 parents 3109c93 + 4c300e5 commit 272a889
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion features/src/cron/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "cron",
"name": "Cron",
"description": "Enables cron in the Dev Environment",
"version": "1.1.1",
"version": "1.1.2",
"options": {
"enabled": {
"type": "boolean",
Expand Down
1 change: 1 addition & 0 deletions features/src/cron/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if [ "${ENABLED:-}" = 'true' ]; then

case "${ID_LIKE}" in
"debian")
export DEBIAN_FRONTEND=noninteractive
# In Ubuntu Noble, cron now depends on systemd. We need to install busybox-static and use it as crond/crontab to avoid garbage in the system.
PACKAGES_NOREMOVE=""
PACKAGES=""
Expand Down
2 changes: 1 addition & 1 deletion features/src/mailpit/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "mailpit",
"name": "Mailpit",
"description": "Sets up Mailpit into the Dev Environment",
"version": "1.1.1",
"version": "1.1.2",
"options": {
"enabled": {
"type": "boolean",
Expand Down
1 change: 1 addition & 0 deletions features/src/mailpit/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if [ "${ENABLED}" = "true" ]; then

case "${ID_LIKE}" in
"debian")
export DEBIAN_FRONTEND=noninteractive
PACKAGES=""
if ! hash curl >/dev/null 2>&1; then
PACKAGES="${PACKAGES} curl"
Expand Down
2 changes: 1 addition & 1 deletion features/src/mariadb/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "MariaDB",
"id": "mariadb",
"version": "1.1.1",
"version": "1.1.2",
"description": "Sets up MariaDB into the Dev Environment",
"options": {
"installDatabaseToWorkspaces": {
Expand Down
3 changes: 2 additions & 1 deletion features/src/mariadb/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ fi

case "${ID_LIKE}" in
"debian")
export DEBIAN_FRONTEND=noninteractive
PACKAGES="mariadb-client mariadb-server"
if ! hash envsubst >/dev/null 2>&1; then
PACKAGES="${PACKAGES} gettext"
fi

apt-get update
# shellcheck disable=SC2086
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ${PACKAGES}
apt-get install -y --no-install-recommends ${PACKAGES}
apt-get clean
rm -rf /var/lib/apt/lists/*
update-rc.d -f mariadb remove
Expand Down
2 changes: 1 addition & 1 deletion features/src/mc/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "mc",
"name": "Midnight Commander",
"description": "Installs Midnight Commander into the Dev Environment",
"version": "1.1.0",
"version": "1.1.1",
"options": {
"enabled": {
"type": "boolean",
Expand Down
1 change: 1 addition & 0 deletions features/src/mc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if [ "${ENABLED:-}" = "true" ]; then

case "${ID_LIKE}" in
"debian")
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends mc
apt-get clean
Expand Down
2 changes: 1 addition & 1 deletion features/src/memcached/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "memcached",
"id": "memcached",
"version": "1.3.1",
"version": "1.3.2",
"description": "Sets up memcached into the Dev Environment",
"options": {
"enabled": {
Expand Down
1 change: 1 addition & 0 deletions features/src/memcached/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if [ "${ENABLED}" = "true" ]; then

case "${ID_LIKE}" in
"debian")
export DEBIAN_FRONTEND=noninteractive
PACKAGES="memcached"
if ! hash envsubst >/dev/null 2>&1; then
PACKAGES="${PACKAGES} gettext"
Expand Down
2 changes: 1 addition & 1 deletion features/src/ssh/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "ssh",
"name": "SSH",
"description": "Sets up SSH into the Dev Environment",
"version": "1.1.1",
"version": "1.1.2",
"options": {
"enabled": {
"type": "boolean",
Expand Down
1 change: 1 addition & 0 deletions features/src/ssh/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if [ "${ENABLED:-}" = "true" ]; then

case "${ID_LIKE}" in
"debian")
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends openssh-server
apt-get clean
Expand Down
2 changes: 1 addition & 1 deletion features/src/su-exec/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "su-exec",
"name": "su-exec",
"version": "1.0.1",
"version": "1.0.2",
"description": "Provides su-exec for running commands as another user"
}
1 change: 1 addition & 0 deletions features/src/su-exec/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fi

case "${ID_LIKE}" in
"debian")
export DEBIAN_FRONTEND=noninteractive
PACKAGES=""
if ! dpkg -s libc6-dev >/dev/null 2>&1; then
PACKAGES="${PACKAGES} libc6-dev"
Expand Down
2 changes: 1 addition & 1 deletion features/src/vip-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "vip-cli",
"name": "VIP-CLI",
"version": "1.4.2",
"version": "1.4.3",
"description": "Installs VIP-CLI into the Dev Environment",
"options": {
"enabled": {
Expand Down
1 change: 1 addition & 0 deletions features/src/vip-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if [ "${ENABLED}" = "true" ]; then

case "${ID_LIKE}" in
"debian")
export DEBIAN_FRONTEND=noninteractive
PACKAGES=""

if ! hash curl >/dev/null 2>&1; then
Expand Down
2 changes: 1 addition & 1 deletion features/src/wp-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "wp-cli",
"name": "WP CLI",
"version": "1.1.2",
"version": "1.1.3",
"description": "Sets up wp-cli in the devcontainer",
"options": {
"nightly": {
Expand Down
1 change: 1 addition & 0 deletions features/src/wp-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if ! hash wget >/dev/null 2>&1; then

case "${ID_LIKE}" in
"debian")
export DEBIAN_FRONTEND=noninteractive
PACKAGES="wget"
if ! hash update-ca-certificates >/dev/null 2>&1; then
PACKAGES="${PACKAGES} ca-certificates"
Expand Down
2 changes: 1 addition & 1 deletion features/src/xdebug/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Xdebug",
"id": "xdebug",
"version": "1.4.0",
"version": "1.4.1",
"description": "Configures Xdebug for the Dev Environment",
"options": {
"enabled": {
Expand Down
1 change: 1 addition & 0 deletions features/src/xdebug/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ SUFFIX=

case "${ID_LIKE}" in
debian)
export DEBIAN_FRONTEND=noninteractive
apt-get update
case "${PHP_VERSION}" in
8.1)
Expand Down
2 changes: 1 addition & 1 deletion images/src/ubuntu-base/.devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"x-build": {
"name": "Ubuntu",
"image-name": "ubuntu-base",
"image-version": "0.0.10"
"image-version": "0.0.11"
},
"remoteUser": "vscode",
"containerEnv": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"id": "syslog",
"name": "Syslog",
"description": "Installs the syslog service from busybox",
"version": "1.0.2"
"version": "1.0.3"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

export DEBIAN_FRONTEND=noninteractive

apt-get update
apt-get install -y --no-install-recommends busybox-static busybox-syslogd
apt-get clean
Expand Down

0 comments on commit 272a889

Please sign in to comment.