Skip to content

Commit f66f6de

Browse files
committed
v2.1.0
v2.1.0 docs v2.1.0 v2.1.0 v2.1.0 workflows docs
1 parent 574f360 commit f66f6de

File tree

11 files changed

+3612
-324
lines changed

11 files changed

+3612
-324
lines changed

.github/workflows/ci-alpine-build.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ on:
2020
description: "debug builds"
2121
required: true
2222
type: string
23-
23+
script_name:
24+
description: "script name"
25+
required: true
26+
type: string
2427
jobs:
2528
build-alpine:
2629
runs-on: ubuntu-24.04
@@ -44,6 +47,7 @@ jobs:
4447

4548
env:
4649
qbt_build_dir: "qbt-build"
50+
script_name: ${{ inputs.script_name }}
4751

4852
steps:
4953
- name: Checkout ${{ inputs.distinct_id }}
@@ -99,8 +103,11 @@ jobs:
99103
- name: Docker - apk install bash ${{ inputs.distinct_id }}
100104
run: docker exec -w /root multiarch apk add bash
101105

102-
- name: Docker - Bootstrap ${{ inputs.distinct_id }}
103-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh -bs-a
106+
- name: Docker - Bootstrap deps ${{ inputs.distinct_id }}
107+
run: docker exec -w /root multiarch bash ${script_name} bootstrap_deps
108+
109+
- name: Docker - Bootstrap build ${{ inputs.distinct_id }}
110+
run: docker exec -w /root multiarch bash ${script_name} -bs-a
104111

105112
- name: Host - qBittorrent v5 transition ${{ inputs.distinct_id }}
106113
run: |
@@ -115,43 +122,43 @@ jobs:
115122

116123
- name: Docker - zlib-ng ${{ inputs.distinct_id }}
117124
if: env.disable_qt5 != 'yes'
118-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh zlib
125+
run: docker exec -w /root multiarch bash ${script_name} zlib
119126

120127
- name: Docker - iconv ${{ inputs.distinct_id }}
121128
if: env.disable_qt5 != 'yes'
122-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh iconv
129+
run: docker exec -w /root multiarch bash ${script_name} iconv
123130

124131
- name: Docker - icu ${{ inputs.distinct_id }}
125132
if: env.disable_qt5 != 'yes'
126-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh icu
133+
run: docker exec -w /root multiarch bash ${script_name} icu
127134

128135
- name: Docker - openssl ${{ inputs.distinct_id }}
129136
if: env.disable_qt5 != 'yes'
130-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh openssl
137+
run: docker exec -w /root multiarch bash ${script_name} openssl
131138

132139
- name: Docker - boost ${{ inputs.distinct_id }}
133140
if: env.disable_qt5 != 'yes'
134-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh boost
141+
run: docker exec -w /root multiarch bash ${script_name} boost
135142

136143
- name: Docker - libtorrent ${{ inputs.distinct_id }}
137144
if: env.disable_qt5 != 'yes'
138-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh libtorrent
145+
run: docker exec -w /root multiarch bash ${script_name} libtorrent
139146

140147
- name: Docker - double_conversion ${{ inputs.distinct_id }}
141148
if: matrix.qbt_build_tool == '' && env.disable_qt5 != 'yes'
142-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh double_conversion
149+
run: docker exec -w /root multiarch bash ${script_name} double_conversion
143150

144151
- name: Docker - qtbase ${{ inputs.distinct_id }}
145152
if: env.disable_qt5 != 'yes'
146-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh qtbase
153+
run: docker exec -w /root multiarch bash ${script_name} qtbase
147154

148155
- name: Docker - qttools ${{ inputs.distinct_id }}
149156
if: env.disable_qt5 != 'yes'
150-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh qttools
157+
run: docker exec -w /root multiarch bash ${script_name} qttools
151158

152159
- name: Docker - qbittorrent ${{ inputs.distinct_id }}
153160
if: env.disable_qt5 != 'yes'
154-
run: docker exec -w /root multiarch bash qbittorrent-nox-static.sh qbittorrent
161+
run: docker exec -w /root multiarch bash ${script_name} qbittorrent
155162

156163
- name: Docker - Set release asset name ${{ inputs.distinct_id }}
157164
if: env.disable_qt5 != 'yes'

.github/workflows/ci-debian-build.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "debug builds"
2020
required: true
2121
type: string
22+
script_name:
23+
description: "script name"
24+
required: true
25+
type: string
2226

2327
jobs:
2428
build:
@@ -30,7 +34,7 @@ jobs:
3034
fail-fast: false
3135
matrix:
3236
container_id: [debian, ubuntu]
33-
container_codename: [bookworm, jammy, noble]
37+
container_codename: [bullseye, bookworm, focal, jammy, noble]
3438
qbt_build_tool: ["cmake", "qmake"]
3539
qbt_libtorrent_version: ["1.2", "2.0"]
3640
exclude:
@@ -51,10 +55,13 @@ jobs:
5155
qbt_qt_version: "6"
5256

5357
name: "${{ matrix.container_id }}-${{ matrix.container_codename }}-${{ matrix.qbt_libtorrent_version }}-qt-${{ matrix.qbt_qt_version }}-${{ matrix.qbt_build_tool }}"
58+
5459
env: # host
5560
qbt_build_dir: "qbt-build"
5661
disable_qt5: ""
5762
artifact_name: "${{ matrix.container_id }}-${{ matrix.container_codename }}-${{ matrix.qbt_libtorrent_version }}-qt-${{ matrix.qbt_qt_version }}-${{ matrix.qbt_build_tool }}-nox"
63+
script_name: ${{ inputs.script_name }}
64+
5865
container:
5966
image: ${{ matrix.container_id }}:${{ matrix.container_codename }}
6067
env: # container
@@ -88,8 +95,11 @@ jobs:
8895
with:
8996
persist-credentials: false
9097

91-
- name: Bootstrap all ${{ inputs.distinct_id }}
92-
run: bash qbittorrent-nox-static.sh -bs-a
98+
- name: Bootstrap deps ${{ inputs.distinct_id }}
99+
run: bash ${script_name} bootstrap_deps
100+
101+
- name: Bootstrap build ${{ inputs.distinct_id }}
102+
run: bash ${script_name} -bs-a
93103

94104
- name: Host - qBittorrent v5 transition ${{ inputs.distinct_id }}
95105
run: |
@@ -103,47 +113,47 @@ jobs:
103113
104114
- name: glibc ${{ inputs.distinct_id }}
105115
if: env.disable_qt5 != 'yes'
106-
run: bash qbittorrent-nox-static.sh glibc
116+
run: bash ${script_name} glibc
107117

108118
- name: zlib ${{ inputs.distinct_id }}
109119
if: env.disable_qt5 != 'yes'
110-
run: bash qbittorrent-nox-static.sh zlib
120+
run: bash ${script_name} zlib
111121

112122
- name: iconv ${{ inputs.distinct_id }}
113123
if: env.disable_qt5 != 'yes'
114-
run: bash qbittorrent-nox-static.sh iconv
124+
run: bash ${script_name} iconv
115125

116126
- name: icu ${{ inputs.distinct_id }}
117127
if: env.disable_qt5 != 'yes'
118-
run: bash qbittorrent-nox-static.sh icu
128+
run: bash ${script_name} icu
119129

120130
- name: openssl ${{ inputs.distinct_id }}
121131
if: env.disable_qt5 != 'yes'
122-
run: bash qbittorrent-nox-static.sh openssl
132+
run: bash ${script_name} openssl
123133

124134
- name: boost ${{ inputs.distinct_id }}
125135
if: env.disable_qt5 != 'yes'
126-
run: bash qbittorrent-nox-static.sh boost
136+
run: bash ${script_name} boost
127137

128138
- name: libtorrent ${{ inputs.distinct_id }}
129139
if: env.disable_qt5 != 'yes'
130-
run: bash qbittorrent-nox-static.sh libtorrent
140+
run: bash ${script_name} libtorrent
131141

132142
- name: double conversion ${{ inputs.distinct_id }}
133143
if: env.disable_qt5 != 'yes' && matrix.qbt_build_tool == 'cmake'
134-
run: bash qbittorrent-nox-static.sh double_conversion
144+
run: bash ${script_name} double_conversion
135145

136146
- name: qtbase ${{ inputs.distinct_id }}
137147
if: env.disable_qt5 != 'yes'
138-
run: bash qbittorrent-nox-static.sh qtbase
148+
run: bash ${script_name} qtbase
139149

140150
- name: qttools ${{ inputs.distinct_id }}
141151
if: env.disable_qt5 != 'yes'
142-
run: bash qbittorrent-nox-static.sh qttools
152+
run: bash ${script_name} qttools
143153

144154
- name: qbittorrent ${{ inputs.distinct_id }}
145155
if: env.disable_qt5 != 'yes'
146-
run: bash qbittorrent-nox-static.sh qbittorrent
156+
run: bash ${script_name} qbittorrent
147157

148158
- name: Upload ${{ env.artifact_name }} artifacts ${{ inputs.distinct_id }}
149159
if: env.disable_qt5 != 'yes'

.github/workflows/ci-main-reusable-caller.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ name: ci - main reusable caller
44
on:
55
workflow_dispatch:
66
inputs:
7+
script_name:
8+
description: "Which script to run?"
9+
required: true
10+
default: "qbt-nox-static.bash"
11+
type: choice
12+
options: ["qbt-nox-static.bash", "qbittorrent-nox-static.sh"]
713
debian-build:
814
description: "Debian: build"
915
required: true
@@ -66,6 +72,7 @@ jobs:
6672
workflow-files: ${{ github.event.inputs.workflow-files == 'true' && 'yes' || 'no' }}
6773
icu: ${{ github.event.inputs.icu == 'true' && 'no' || 'yes' }}
6874
debug: ${{ github.event.inputs.debug == 'true' && 'yes' || 'no' }}
75+
script_name: ${{ github.event.inputs.script_name }}
6976

7077
ci-alpine-build:
7178
if: always() && github.event.inputs.alpine-build == 'true'
@@ -82,6 +89,7 @@ jobs:
8289
workflow-files: ${{ github.event.inputs.workflow-files == 'true' && 'yes' || 'no' }}
8390
icu: ${{ github.event.inputs.icu == 'true' && 'no' || 'yes' }}
8491
debug: ${{ github.event.inputs.debug == 'true' && 'yes' || 'no' }}
92+
script_name: ${{ github.event.inputs.script_name }}
8593

8694
ci-alpine-release:
8795
needs: [ci-alpine-build]

changelog.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
### v2.1.0 - 17/01/2025
2+
3+
`qbt-nox-static.bash` will be a created alongside the `qbittorrent-nox-static.sh`.
4+
5+
`qbt-nox-static.bash``v2.1.0`
6+
7+
`qbt-nox-static.bash` will start `v2.1.0` and `qbittorrent-nox-static.sh` will be frozen at `v2.0.14`going forward.
8+
9+
This is to avoid breaking anything. `v2.1.0` is not really changing the outcome but the behaviour of the script towards that outcome. So the least disruptive way is the opt in route.
10+
11+
I also wanted to changed the extension from `sh` to `bash` as it is a bash script.
12+
13+
Main changes:
14+
15+
A reworked dependency and module installation logic, which has changed the default behaviour of the script. The script was designed to be run in a docker and needs `curl` and `git` to perform basic test functions. So it would automatically try to install all deps from a single array when run as root or with sudo to able to then do the basic interactions.
16+
17+
This has been changed so that the script makes does not modify the host or create files if just called by it's name. It will do basic dependency checks and offer options to install what's needed.
18+
19+
It can now only install the required test dependencies or perform basic functions if they are already installed meaning the basic features and help functions are usable without installing the full suits of dependencies.
20+
21+
Updated the default build flags to be a bit more modern which breaks building on some older systems.
22+
23+
Removed build script support for buster and focal due to conflicts with updated builds flags and will support current releases only going forward.
24+
25+
general refactoring towards more consistent use of arrays data throughout the script.
26+
27+
credits: Borrowed some build flags from here [qbittorrent/docker-qbittorrent-nox](https://github.com/qbittorrent/docker-qbittorrent-nox/blob/main/Dockerfile#L59-L61)
28+
29+
### v2.0.15 - 17/01/2025
30+
31+
`qbittorrent-nox-static.sh` only
32+
33+
fixed: optimize was not working as intended for being spelt inconsistently and the checks for crossbuilding were not correct.
34+
changed: optimize now accepts a quoted string of flags. `-o "-things -to -pass"
35+
36+
structure tweaks and layout.
37+
138
### v2.0.14 - 31/12/2024
239

340
fix: libtorrent `v1.2` and boost `1.86.0` check to not ignore `RC_1_2`

docs/astro.config.mjs

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,7 @@
11
import { defineConfig } from "astro/config";
22
import starlight from "@astrojs/starlight";
3-
import { ExpressiveCodeTheme } from "@astrojs/starlight/expressive-code";
4-
import fs from "node:fs";
5-
import path from "node:path";
63
import starlightImageZoom from "starlight-image-zoom";
74

8-
// Define allowed paths relative to project root
9-
const ALLOWED_PATHS = ["src/themes/expressive-code"];
10-
11-
function readFileSyncSafe(url) {
12-
if (url.protocol !== "file:") {
13-
throw new Error("Invalid URL protocol");
14-
}
15-
16-
// Convert URL to filesystem path and normalize
17-
const filePath = path.normalize(url.pathname);
18-
19-
// Ensure path is within allowed directories
20-
const isAllowed = ALLOWED_PATHS.some((allowedPath) =>
21-
filePath.includes(path.normalize(allowedPath))
22-
);
23-
24-
if (!isAllowed) {
25-
throw new Error("Access to this directory is not allowed");
26-
}
27-
28-
return fs.readFileSync(url, "utf-8");
29-
}
30-
31-
const jsoncStringLight = readFileSyncSafe(
32-
new URL(
33-
"./src/themes/expressive-code/Snazzy-Light-color-theme.json",
34-
import.meta.url
35-
)
36-
);
37-
38-
const jsoncStringDark = readFileSyncSafe(
39-
new URL(
40-
"./src/themes/expressive-code/aura-soft-dark-soft-text-color-theme.json",
41-
import.meta.url
42-
)
43-
);
44-
45-
const darkMode = ExpressiveCodeTheme.fromJSONString(jsoncStringDark);
46-
const lightMode = ExpressiveCodeTheme.fromJSONString(jsoncStringLight);
47-
485
// https://astro.build/config
496
export default defineConfig({
507
site: "https://userdocs.github.io",
@@ -59,19 +16,6 @@ export default defineConfig({
5916
components: {
6017
Header: "./src/components/Header.astro",
6118
},
62-
expressiveCode: {
63-
themes: [darkMode, lightMode],
64-
tabWidth: 0,
65-
styleOverrides: {
66-
borderRadius: "0.1rem",
67-
frames: {
68-
shadowColor: "none",
69-
},
70-
},
71-
defaultProps: {
72-
frame: "none",
73-
},
74-
},
7519

7620
social: {
7721
github: "https://github.com/userdocs/qbittorrent-nox-static",

docs/ec.config.mjs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { pluginCollapsibleSections } from "@expressive-code/plugin-collapsible-sections";
2+
import { ExpressiveCodeTheme } from "@astrojs/starlight/expressive-code";
3+
import fs from "node:fs";
4+
import path from "node:path";
5+
6+
// Define allowed paths relative to project root
7+
const ALLOWED_PATHS = ["src/themes/expressive-code"];
8+
9+
function readFileSyncSafe(url) {
10+
if (url.protocol !== "file:") {
11+
throw new Error("Invalid URL protocol");
12+
}
13+
14+
// Convert URL to filesystem path and normalize
15+
const filePath = path.normalize(url.pathname);
16+
17+
// Ensure path is within allowed directories
18+
const isAllowed = ALLOWED_PATHS.some((allowedPath) =>
19+
filePath.includes(path.normalize(allowedPath))
20+
);
21+
22+
if (!isAllowed) {
23+
throw new Error("Access to this directory is not allowed");
24+
}
25+
26+
return fs.readFileSync(url, "utf-8");
27+
}
28+
29+
const jsoncStringLight = readFileSyncSafe(
30+
new URL(
31+
"./src/themes/expressive-code/Snazzy-Light-color-theme.json",
32+
import.meta.url
33+
)
34+
);
35+
36+
const jsoncStringDark = readFileSyncSafe(
37+
new URL(
38+
"./src/themes/expressive-code/aura-soft-dark-soft-text-color-theme.json",
39+
import.meta.url
40+
)
41+
);
42+
43+
const darkMode = ExpressiveCodeTheme.fromJSONString(jsoncStringDark);
44+
const lightMode = ExpressiveCodeTheme.fromJSONString(jsoncStringLight);
45+
46+
/** @type {import('@astrojs/starlight/expressive-code').StarlightExpressiveCodeOptions} */
47+
export default {
48+
// Example: Using a custom plugin (which makes this `ec.config.mjs` file necessary)
49+
plugins: [pluginCollapsibleSections()],
50+
defaultProps: {
51+
collapseStyle: "collapsible-start",
52+
frame: "none",
53+
},
54+
themes: [darkMode, lightMode],
55+
tabWidth: 0,
56+
styleOverrides: {
57+
borderRadius: "0.1rem",
58+
frames: {
59+
shadowColor: "none",
60+
},
61+
},
62+
};

0 commit comments

Comments
 (0)