mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-09-16 14:49:10 +02:00
Revert "fix(linkwarden): stop installing packages Debian 11 no longer serves (#3047)"
This reverts commit 296bb3767a.
This commit is contained in:
@@ -1,10 +1,4 @@
|
|||||||
|
|
||||||
## 2.16.2 (2026-09-05)
|
|
||||||
- Update to latest version from linkwarden/linkwarden (changelog : https://github.com/linkwarden/linkwarden/releases)
|
|
||||||
- Stop installing vim, sudo, gnupg2 and lsb-release at build time. Debian 11 reached LTS end on 2026-08-31 and deb.debian.org no longer serves some of the debs that its frozen bullseye-security index still lists, which is what broke the 2.16.2 build.
|
|
||||||
- Run the Postgres bootstrap through su instead of sudo, as the ente and postgres_15 add-ons already do
|
|
||||||
- Fetch the bullseye-security suite from security.debian.org instead of the deb.debian.org CDN, which 404s on debs that suite still lists
|
|
||||||
|
|
||||||
## 2.16.1 (2026-08-22)
|
## 2.16.1 (2026-08-22)
|
||||||
- Update to latest version from linkwarden/linkwarden (changelog : https://github.com/linkwarden/linkwarden/releases)
|
- Update to latest version from linkwarden/linkwarden (changelog : https://github.com/linkwarden/linkwarden/releases)
|
||||||
|
|
||||||
|
|||||||
@@ -30,38 +30,15 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
|||||||
|
|
||||||
ENV PGDATA=/config/postgres
|
ENV PGDATA=/config/postgres
|
||||||
# Adapt campaign
|
# Adapt campaign
|
||||||
#
|
|
||||||
# Nothing is installed from the base image's own Debian suites before the PGDG
|
|
||||||
# repository is added. Debian 11 reached LTS end on 2026-08-31 and its frozen
|
|
||||||
# bullseye-security index still lists debs that deb.debian.org no longer serves
|
|
||||||
# (sudo 1.9.5p2-3+deb11u4 among them), so every avoidable package here is a
|
|
||||||
# build that fails for reasons unrelated to this add-on:
|
|
||||||
# - vim was never used by the add-on.
|
|
||||||
# - sudo is replaced by su in 99-run.sh, matching the ente and postgres_15
|
|
||||||
# add-ons.
|
|
||||||
# - gnupg2 is unnecessary: apt has read ASCII-armoured keys since 1.4.
|
|
||||||
# - lsb-release is unnecessary: /etc/os-release carries the codename.
|
|
||||||
# curl is already present in the upstream linkwarden image.
|
|
||||||
#
|
|
||||||
# postgresql-16's own dependencies still come from bullseye-security, and
|
|
||||||
# deb.debian.org serves that suite inconsistently now: libc-l10n, exim4-base and
|
|
||||||
# libpython3.9-minimal all 404'd there during a build while every one of them was
|
|
||||||
# 200 on security.debian.org, the origin deb.debian.org is a CDN alias for. Point
|
|
||||||
# the security suite straight at the origin. If a future base image stops using
|
|
||||||
# /etc/apt/sources.list this sed fails the build loudly, which is the point:
|
|
||||||
# whoever rebases it has to revisit this.
|
|
||||||
# hadolint ignore=DL3015
|
# hadolint ignore=DL3015
|
||||||
RUN \
|
RUN \
|
||||||
# Change data directory
|
# Change data directory
|
||||||
mv /data /data_linkwarden && \
|
mv /data /data_linkwarden && \
|
||||||
\
|
\
|
||||||
# Fetch the security suite from its origin rather than the CDN
|
|
||||||
sed -i 's|deb.debian.org/debian-security|security.debian.org/debian-security|g' /etc/apt/sources.list && \
|
|
||||||
\
|
|
||||||
# Install postgres
|
# Install postgres
|
||||||
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc -o /etc/apt/trusted.gpg.d/postgresql.asc && \
|
apt-get update && apt-get install vim gnupg2 lsb-release sudo curl -y && \
|
||||||
. /etc/os-release && \
|
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc| gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg && \
|
||||||
echo "deb https://apt.postgresql.org/pub/repos/apt ${VERSION_CODENAME}-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
|
sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
|
||||||
apt-get update && apt-get install -y postgresql-16 && \
|
apt-get update && apt-get install -y postgresql-16 && \
|
||||||
sed -i "/data_directory/c data_directory = '/config/postgres'" /etc/postgresql/*/main/postgresql.conf
|
sed -i "/data_directory/c data_directory = '/config/postgres'" /etc/postgresql/*/main/postgresql.conf
|
||||||
|
|
||||||
|
|||||||
@@ -45,5 +45,5 @@ schema:
|
|||||||
STORAGE_FOLDER: str?
|
STORAGE_FOLDER: str?
|
||||||
slug: linkwarden
|
slug: linkwarden
|
||||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/linkwarden
|
url: https://github.com/alexbelgium/hassio-addons/tree/master/linkwarden
|
||||||
version: "2.16.2"
|
version: "2.16.1"
|
||||||
webui: "[PROTO:ssl]://[HOST]:[PORT:3000]"
|
webui: "[PROTO:ssl]://[HOST]:[PORT:3000]"
|
||||||
|
|||||||
@@ -62,28 +62,23 @@ if [[ "$DATABASE_URL" == *"localhost"* ]]; then
|
|||||||
# Create folder
|
# Create folder
|
||||||
if [ ! -e /config/postgres/postgresql.conf ]; then
|
if [ ! -e /config/postgres/postgresql.conf ]; then
|
||||||
echo "... init folder"
|
echo "... init folder"
|
||||||
su - postgres -c "/usr/lib/postgresql/16/bin/initdb -D /config/postgres"
|
sudo -u postgres /usr/lib/postgresql/16/bin/initdb -D /config/postgres
|
||||||
fi
|
fi
|
||||||
chown -R postgres:postgres /config/postgres
|
chown -R postgres:postgres /config/postgres
|
||||||
chmod 0700 /config/postgres
|
chmod 0700 /config/postgres
|
||||||
|
|
||||||
echo "... starting server"
|
echo "... starting server"
|
||||||
# su - resets PATH to the login default, which has no /usr/sbin
|
sudo -u postgres service postgresql start
|
||||||
su - postgres -c "/usr/sbin/service postgresql start"
|
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
echo "... create user and table"
|
echo "... create user and table"
|
||||||
# Both statements go to psql on stdin over the local socket, so neither the
|
|
||||||
# password nor a connection URI ends up in the process arguments
|
|
||||||
# Set password
|
# Set password
|
||||||
su - postgres -c 'psql' <<'SQL'
|
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'homeassistant';"
|
||||||
ALTER USER postgres WITH PASSWORD 'homeassistant';
|
|
||||||
SQL
|
|
||||||
|
|
||||||
# Create database if does not exist
|
# Create database if does not exist
|
||||||
su - postgres -c 'psql' <<'SQL' || true
|
echo "CREATE DATABASE linkwarden; GRANT ALL PRIVILEGES ON DATABASE linkwarden to postgres;
|
||||||
CREATE DATABASE linkwarden; GRANT ALL PRIVILEGES ON DATABASE linkwarden to postgres;
|
\q" > setup_postgres.sql
|
||||||
SQL
|
sudo -u postgres bash -c 'cat setup_postgres.sql | psql "postgres://postgres:homeassistant@localhost:5432"' || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"last_update": "2026-09-05",
|
"last_update": "2026-08-22",
|
||||||
"repository": "alexbelgium/hassio-addons",
|
"repository": "alexbelgium/hassio-addons",
|
||||||
"slug": "linkwarden",
|
"slug": "linkwarden",
|
||||||
"source": "github",
|
"source": "github",
|
||||||
"upstream_repo": "linkwarden/linkwarden",
|
"upstream_repo": "linkwarden/linkwarden",
|
||||||
"upstream_version": "2.16.2"
|
"upstream_version": "2.16.1"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user