Skip to content

Commit

Permalink
Fixes for bookworm
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Feb 8, 2025
1 parent 7f30316 commit 4018c70
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 23 deletions.
6 changes: 3 additions & 3 deletions debian-setup/debian-setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Debian bullseye setup on a virtual server.
# Debian GNU/Linux setup on a virtual server.
#
# VERSION :3.0.0
# URL :https://github.com/szepeviktor/debian-server-tools
Expand Down Expand Up @@ -82,8 +82,8 @@
export IMAGE_ARCH="amd64"
export IMAGE_MACHINE="x86_64"
export IMAGE_ID="Debian"
export IMAGE_CODENAME="bullseye"
#export IMAGE_CODENAME="bookworm"
export IMAGE_CODENAME="bookworm"
#export IMAGE_CODENAME="trixie"

# "A real danger for the future of GNU/Linux"
# https://skarnet.org/software/s6/systemd.html
Expand Down
6 changes: 3 additions & 3 deletions debian-setup/debian-setup2.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Continue Debian bullseye setup on a virtual server.
# Continue Debian GNU/Linux setup on a virtual server.
#
# VERSION :3.0.0
# URL :https://github.com/szepeviktor/debian-server-tools
Expand Down Expand Up @@ -55,9 +55,9 @@ packages/s-nail
packages/goaccess

# From backports
# List available backports: apt-get upgrade -t bullseye-backports
# List available backports: apt-get upgrade -t bookworm-backports
# @nonDebian
##Pkg_install_quiet -t bullseye-backports
##Pkg_install_quiet -t bookworm-backports

packages/needrestart

Expand Down
10 changes: 6 additions & 4 deletions debian-setup/packages/libpam-modules
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ sed -i -e 's|^\(password\t\+requisite\t\+pam_cracklib\.so\).\+$|\1 retry=3 difok
/etc/pam.d/common-password

# Nice welcome screen
# @FIXME Python 2 does not handle UTF-8 in YAML
printf '*\n*** %s ***\n*\n\n' "$(Data get-value system.trespass-warning)" >/etc/motd.tail

Data get-value system.host-color "7" > /etc/hostcolor
Data get-value system.host-color "7" >/etc/hostcolor

if [ -d /etc/update-motd.d ]; then
# Remove default uname script
# Remove default uname scripts
if [ -f /etc/update-motd.d/10-uname ] && [ "$(stat -c "%s" /etc/update-motd.d/10-uname)" == 23 ]; then
rm /etc/update-motd.d/10-uname
fi
if [ -f /etc/update-motd.d/92-unattended-upgrades ] && [ "$(stat -c "%s" /etc/update-motd.d/92-unattended-upgrades)" == 165 ]; then
rm /etc/update-motd.d/92-unattended-upgrades
fi
# Halt on non-empty script directory
test -z "$(find /etc/update-motd.d/ -type f -prune)"
else
Expand All @@ -31,7 +33,7 @@ fi
mv /etc/motd "/etc/motd~"

# Make motd a symlink
ln -sf /var/run/motd /etc/motd
ln -s -f /var/run/motd /etc/motd

# Install scripts
Dinstall input/update-motd.d/00-header
Expand Down
6 changes: 3 additions & 3 deletions debian-setup/packages/redis-server
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

set -e -x

# @TODO move to v4.0 in stretch-backports
# @TODO Migrate to Valkey

# @TODO Prevent shutdown during background saving
# Prevent shutdown during background saving
cat >/etc/sysctl.d/redis-overcommit.conf <<"EOF"
# https://redis.io/topics/faq#background-saving-fails-with-a-fork-error-under-linux-even-if-i-have-a-lot-of-free-ram
#vm.overcommit_memory = 1
EOF

# @TODO Allow high backlog
# Allow high backlog
cat >/etc/sysctl.d/redis-tcp-listen-backlog.conf <<"EOF"
# https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
##net.ipv4.tcp_max_syn_backlog = 512
Expand Down
6 changes: 3 additions & 3 deletions debian-setup/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
system:
fqdn: ##host.example.com
uuid: ##/usr/sbin/dmidecode -s system-uuid | tr '[:upper:]' '[:lower:]'
os: "Debian ‘bullseye"
os: "Debian ‘bookworm"
install-date: ##YYYY-MM-DD
# tput sgr0;for C in {1..7};do tput setaf $C;echo -n "■${C}■ ";tput sgr0;done;echo
host-color: 7
Expand Down Expand Up @@ -185,8 +185,8 @@ packaging:
list-command: gem list
location: /usr/lib/ruby/vendor_ruby

# shyaml get-values bullseye-backports </root/server.yml | xargs -- apt-get install -t bullseye-backports # -y
bullseye-backports:
# shyaml get-values bookworm-backports </root/server.yml | xargs -- apt-get install -t bookworm-backports # -y
bookworm-backports:
- init-system-helpers
- needrestart
- geoipupdate
Expand Down
2 changes: 1 addition & 1 deletion package/apt-sources/goaccess.list
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Goaccess
deb http://deb.goaccess.io/ bullseye main
deb http://deb.goaccess.io/ bookworm main
#K: wget -qO- https://deb.goaccess.io/goaccess.gpg.key >/etc/apt/trusted.gpg.d/goaccess.gpg
#M: https://goaccess.io/download#distro
2 changes: 1 addition & 1 deletion package/apt-sources/sury-php.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DEB.SURY.ORG (is in CZ)
deb https://packages.sury.org/php/ bullseye main
deb https://packages.sury.org/php/ bookworm main
#K: wget -qO/etc/apt/trusted.gpg.d/sury-php.gpg https://packages.sury.org/php/apt.gpg
#M: https://packages.sury.org/php/README.txt
#P: printf 'Package: openssl libssl-dev libssl-doc libssl1.1\nPin: origin "packages.sury.org"\nPin-Priority: -1\n' >/etc/apt/preferences.d/sury-openssl.pref
2 changes: 1 addition & 1 deletion webserver/GitLab-CI-Runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ docker run --rm -i -t -v /opt:/etc/gitlab-runner gitlab/gitlab-runner:latest reg
# --url "https://gitlab.com/" \
# --registration-token "PROJECT-REGISTRATION-TOKEN" \
# --executor "docker" \
# --docker-image "php:7.4-bullseye" \
# --docker-image "php:7.4-bookworm" \
# --description "gitlab-runner on UpCloud" \
# --tag-list "upcloud,docker" \
# --run-untagged \
Expand Down
3 changes: 2 additions & 1 deletion webserver/php-fpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ PHP_TZ="UTC"
CWD="$(dirname "${BASH_SOURCE[0]}")"

# Later versions of Ondřej Surý's PHP-FPM "Depends: systemd | systemd-tmpfiles"
Pkg_install_quiet systemd-standalone-tmpfiles/bullseye-backports
Pkg_install_quiet systemd-standalone-tmpfiles/bookworm-backports
# Alternative
# @nonDebian
#Pkg_install_quiet opentmpfiles

# @nonDebian
Expand Down
6 changes: 3 additions & 3 deletions webserver/systemd-tmpfiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
Later versions of Ondřej Surý's PHP-FPM packages
[depend on `systemd`](https://github.com/oerdnj/deb.sury.org/issues/1347).

`systemd-tmpfiles` provides one symlink to the `opentmpfiles` command.
### Building with equivs

### Building
`systemd-tmpfiles` provides one symlink to the `opentmpfiles` command.

1. Install [equivs version 2.1+](https://packages.debian.org/buster/equivs)
1. Build the dummy package: `equivs-build systemd-tmpfiles`

### Installation
### Installation with equivs

1. Install [opentmpfiles](https://packages.debian.org/sid/opentmpfiles)
1. Install the dummy package: `dpkg -i ./systemd-tmpfiles_*_amd64.deb`

0 comments on commit 4018c70

Please sign in to comment.