From 03c3d23bad46457934c5beef98ea9819ee9340c3 Mon Sep 17 00:00:00 2001 From: zay168 <123703001+zay168@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:22:59 +0100 Subject: [PATCH 1/2] fix: use supported wkhtmltox packages for Linux setup --- .github/helper/install.sh | 17 +++++++++++++++++ README.md | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 9a6e38187f..fc862a857e 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -33,6 +33,23 @@ mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "GRANT ALL PRIVILEGES ON mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "FLUSH PRIVILEGES" install_whktml() { + local arch os_like wkhtml_package + + arch="$(dpkg --print-architecture)" + os_like="$(. /etc/os-release && printf '%s %s' "$ID" "$ID_LIKE")" + + if echo "$os_like" | grep -Eq '(^| )ubuntu( |$)'; then + wkhtml_package="wkhtmltox_0.12.6.1-3.jammy_${arch}.deb" + elif echo "$os_like" | grep -Eq '(^| )debian( |$)'; then + wkhtml_package="wkhtmltox_0.12.6.1-3.bookworm_${arch}.deb" + fi + + if [ -n "$wkhtml_package" ]; then + wget -O "/tmp/${wkhtml_package}" "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/${wkhtml_package}" + sudo apt install -y xvfb xfonts-75dpi xfonts-base "/tmp/${wkhtml_package}" + return + fi + wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz tar -xf /tmp/wkhtmltox.tar.xz -C /tmp sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf diff --git a/README.md b/README.md index 2c4c1024f8..7c85fc4487 100644 --- a/README.md +++ b/README.md @@ -92,10 +92,11 @@ Use the following credentials to log in: ### Local -1. Set up bench by following the [Installation Steps](https://frappeframework.com/docs/user/en/installation) and start the server and keep it running +1. Set up bench by following the [Installation Steps](https://docs.frappe.io/framework/user/en/installation) and start the server and keep it running ```sh $ bench start ``` + For Debian and Ubuntu derivatives, install the distro-specific `wkhtmltox` package from the official [wkhtmltopdf packaging releases](https://github.com/wkhtmltopdf/packaging/releases/tag/0.12.6.1-3) (`bookworm` for Debian/Parrot, `jammy` for Ubuntu) instead of using the placeholder `wkhtmltox_file.deb` command from the generic downloads page. 2. In a separate terminal window, run the following commands ```sh $ bench new-site hrms.localhost From 7063d12b25a074bb3d517a659a646b27f2df4e4b Mon Sep 17 00:00:00 2001 From: zay168 <123703001+zay168@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:43:36 +0100 Subject: [PATCH 2/2] fix: preserve wkhtmltox fallback on install failure --- .github/helper/install.sh | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index fc862a857e..b14ebd8218 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -44,9 +44,9 @@ install_whktml() { wkhtml_package="wkhtmltox_0.12.6.1-3.bookworm_${arch}.deb" fi - if [ -n "$wkhtml_package" ]; then - wget -O "/tmp/${wkhtml_package}" "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/${wkhtml_package}" - sudo apt install -y xvfb xfonts-75dpi xfonts-base "/tmp/${wkhtml_package}" + if [ -n "$wkhtml_package" ] \ + && wget -O "/tmp/${wkhtml_package}" "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/${wkhtml_package}" \ + && sudo apt install -y xvfb xfonts-75dpi xfonts-base "/tmp/${wkhtml_package}"; then return fi diff --git a/README.md b/README.md index 7c85fc4487..e87df96681 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Use the following credentials to log in: 1. Set up bench by following the [Installation Steps](https://docs.frappe.io/framework/user/en/installation) and start the server and keep it running ```sh - $ bench start + bench start ``` For Debian and Ubuntu derivatives, install the distro-specific `wkhtmltox` package from the official [wkhtmltopdf packaging releases](https://github.com/wkhtmltopdf/packaging/releases/tag/0.12.6.1-3) (`bookworm` for Debian/Parrot, `jammy` for Ubuntu) instead of using the placeholder `wkhtmltox_file.deb` command from the generic downloads page. 2. In a separate terminal window, run the following commands