Skip to content

Commit 7822dab

Browse files
committed
docs: add Fedora bootstrap and runtime guidance
1 parent ba137f2 commit 7822dab

6 files changed

Lines changed: 202 additions & 37 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ sudo dnf install ./ro-control-*.rpm
7171

7272
See [docs/BUILDING.md](docs/BUILDING.md) for full instructions.
7373

74+
Fedora quick bootstrap:
75+
76+
```bash
77+
./scripts/fedora-bootstrap.sh
78+
```
79+
80+
For Fedora-specific runtime notes, see [docs/FEDORA.md](docs/FEDORA.md).
81+
7482
### CLI Quick Examples
7583

7684
```bash

README.tr.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ sudo dnf install ./ro-control-*.rpm
7171

7272
Tam talimatlar için [docs/BUILDING.md](docs/BUILDING.md) dosyasına bakın.
7373

74+
Fedora hızlı kurulum:
75+
76+
```bash
77+
./scripts/fedora-bootstrap.sh
78+
```
79+
80+
Fedora çalışma notları için [docs/FEDORA.md](docs/FEDORA.md) dosyasına bakın.
81+
7482
### CLI Hızlı Örnekler
7583

7684
```bash

docs/BUILDING.md

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ This guide covers building ro-Control from source on Linux systems with Qt 6 and
1616

1717
---
1818

19+
## Fedora Quick Bootstrap
20+
21+
```bash
22+
./scripts/fedora-bootstrap.sh
23+
```
24+
25+
The script installs Fedora dependencies, builds the app, and runs tests by default.
26+
For Fedora-specific runtime notes, see [FEDORA.md](FEDORA.md).
27+
28+
---
29+
1930
## Install Dependencies
2031

2132
```bash
@@ -32,6 +43,12 @@ sudo dnf install \
3243
polkit-devel
3344
```
3445

46+
Runtime tools used by diagnostics and driver operations:
47+
48+
```bash
49+
sudo dnf install dnf polkit pciutils mokutil kmod
50+
```
51+
3552
---
3653

3754
## Clone the Repository
@@ -48,25 +65,15 @@ cd ro-Control
4865
### Debug Build (for development)
4966

5067
```bash
51-
mkdir build && cd build
52-
cmake .. -DCMAKE_BUILD_TYPE=Debug
53-
make -j$(nproc)
68+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
69+
cmake --build build -j$(nproc)
5470
```
5571

5672
### Release Build
5773

5874
```bash
59-
mkdir build && cd build
60-
cmake .. -DCMAKE_BUILD_TYPE=Release
61-
make -j$(nproc)
62-
```
63-
64-
### Faster builds with Ninja (optional)
65-
66-
```bash
67-
mkdir build && cd build
68-
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
69-
ninja
75+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
76+
cmake --build build -j$(nproc)
7077
```
7178

7279
### Refresh translations (recommended before release)
@@ -81,19 +88,19 @@ cmake --build build
8188
## Run
8289

8390
```bash
84-
# From the build directory
85-
./ro-control
91+
# From the repository root
92+
./build/ro-control
8693
```
8794

8895
CLI examples:
8996

9097
```bash
91-
./ro-control help
92-
./ro-control version
93-
./ro-control status
94-
./ro-control diagnostics --json
95-
./ro-control driver install --proprietary --accept-license
96-
./ro-control driver update
98+
./build/ro-control help
99+
./build/ro-control version
100+
./build/ro-control status
101+
./build/ro-control diagnostics --json
102+
./build/ro-control driver install --proprietary --accept-license
103+
./build/ro-control driver update
97104
```
98105

99106
> **Note:** Driver install/remove operations require PolicyKit authentication. The UI will prompt you automatically.
@@ -110,27 +117,25 @@ After `cmake --install`, the CLI integration also installs:
110117
## Install System-Wide
111118

112119
```bash
113-
cd build
114-
sudo make install
120+
sudo cmake --install build
115121
```
116122

117123
This installs:
118-
- Binary `/usr/local/bin/ro-control`
119-
- Privileged helper `/usr/local/libexec/ro-control-helper`
120-
- Desktop entry `/usr/local/share/applications/`
121-
- Icons `/usr/local/share/icons/`
122-
- AppStream metadata `/usr/local/share/metainfo/`
123-
- PolicyKit policy `/usr/local/share/polkit-1/actions/`
124+
- Binary -> `/usr/local/bin/ro-control`
125+
- Privileged helper -> `/usr/local/libexec/ro-control-helper`
126+
- Desktop entry -> `/usr/local/share/applications/`
127+
- Icons -> `/usr/local/share/icons/`
128+
- AppStream metadata -> `/usr/local/share/metainfo/`
129+
- PolicyKit policy -> `/usr/local/share/polkit-1/actions/`
124130

125131
---
126132

127133
## Build with Tests
128134

129135
```bash
130-
mkdir build && cd build
131-
cmake .. -DBUILD_TESTS=ON
132-
make -j$(nproc)
133-
ctest --output-on-failure
136+
cmake -S . -B build -G Ninja -DBUILD_TESTS=ON
137+
cmake --build build -j$(nproc)
138+
ctest --test-dir build --output-on-failure
134139
```
135140

136141
---
@@ -177,9 +182,8 @@ cmake --build build
177182
After making changes, always verify the build passes before submitting a PR:
178183

179184
```bash
180-
cd build
181-
make -j$(nproc)
182-
ctest --output-on-failure
185+
cmake --build build -j$(nproc)
186+
ctest --test-dir build --output-on-failure
183187
```
184188

185189
See [CONTRIBUTING.md](../CONTRIBUTING.md) for the full contribution guide.

docs/FEDORA.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Fedora Run Guide
2+
3+
This guide is focused on running `ro-control` on Fedora Workstation/Spin systems.
4+
5+
## 1) Bootstrap (recommended)
6+
7+
From the repository root:
8+
9+
```bash
10+
./scripts/fedora-bootstrap.sh
11+
```
12+
13+
Optional flags via environment variables:
14+
15+
```bash
16+
ENABLE_TESTS=0 BUILD_TYPE=Debug ./scripts/fedora-bootstrap.sh
17+
INSTALL_AFTER_BUILD=1 INSTALL_PREFIX=/usr ./scripts/fedora-bootstrap.sh
18+
```
19+
20+
## 2) Manual dependency install (equivalent)
21+
22+
Build dependencies:
23+
24+
```bash
25+
sudo dnf install -y \
26+
cmake \
27+
extra-cmake-modules \
28+
gcc-c++ \
29+
ninja-build \
30+
qt6-qtbase-devel \
31+
qt6-qtdeclarative-devel \
32+
qt6-qttools-devel \
33+
qt6-qtwayland-devel \
34+
kf6-qqc2-desktop-style \
35+
polkit-devel
36+
```
37+
38+
Runtime tools used by diagnostics and driver workflows:
39+
40+
```bash
41+
sudo dnf install -y dnf polkit pciutils mokutil kmod
42+
```
43+
44+
## 3) Build and run
45+
46+
```bash
47+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
48+
cmake --build build -j"$(nproc)"
49+
ctest --test-dir build --output-on-failure
50+
./build/ro-control
51+
```
52+
53+
## 4) Install (optional)
54+
55+
```bash
56+
sudo cmake --install build
57+
```
58+
59+
## 5) Driver management prerequisites
60+
61+
- `ro-control` invokes privileged operations through `pkexec`.
62+
- For proprietary NVIDIA flow, the app enables RPM Fusion and installs
63+
`akmod-nvidia` using `dnf`.
64+
- A reboot is required after install/update/remove flows.
65+
- On Secure Boot systems, kernel module signing policy may still require manual steps.
66+
67+
## 6) Quick verification
68+
69+
```bash
70+
./build/ro-control diagnostics --json
71+
./build/ro-control status
72+
```
73+
74+
If GPU telemetry is unavailable, verify `nvidia-smi` is present and working.

packaging/rpm/ro-control.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ Requires: kf6-qqc2-desktop-style
2626
Requires: polkit
2727
Requires: dnf
2828
Requires: /usr/bin/pkexec
29+
Requires: pciutils
30+
Recommends: mokutil
31+
Recommends: kmod
2932

3033
%description
3134
ro-Control is a Qt6/KDE Plasma desktop application that helps users

scripts/fedora-bootstrap.sh

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5+
BUILD_DIR="${BUILD_DIR:-$ROOT_DIR/build}"
6+
BUILD_TYPE="${BUILD_TYPE:-Release}"
7+
GENERATOR="${GENERATOR:-Ninja}"
8+
ENABLE_TESTS="${ENABLE_TESTS:-1}"
9+
INSTALL_AFTER_BUILD="${INSTALL_AFTER_BUILD:-0}"
10+
INSTALL_PREFIX="${INSTALL_PREFIX:-/usr/local}"
11+
12+
build_reqs=(
13+
cmake
14+
extra-cmake-modules
15+
gcc-c++
16+
ninja-build
17+
qt6-qtbase-devel
18+
qt6-qtdeclarative-devel
19+
qt6-qttools-devel
20+
qt6-qtwayland-devel
21+
kf6-qqc2-desktop-style
22+
polkit-devel
23+
)
24+
25+
runtime_tools=(
26+
dnf
27+
polkit
28+
pciutils
29+
mokutil
30+
kmod
31+
)
32+
33+
echo "[1/4] Installing Fedora build dependencies..."
34+
sudo dnf install -y "${build_reqs[@]}"
35+
36+
echo "[2/4] Installing runtime utilities used by diagnostics/driver workflows..."
37+
sudo dnf install -y "${runtime_tools[@]}"
38+
39+
cmake_args=(
40+
-S "$ROOT_DIR"
41+
-B "$BUILD_DIR"
42+
-G "$GENERATOR"
43+
-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
44+
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX"
45+
)
46+
47+
if [[ "$ENABLE_TESTS" == "1" ]]; then
48+
cmake_args+=( -DBUILD_TESTS=ON )
49+
else
50+
cmake_args+=( -DBUILD_TESTS=OFF )
51+
fi
52+
53+
echo "[3/4] Configuring and building ($BUILD_TYPE)..."
54+
cmake "${cmake_args[@]}"
55+
cmake --build "$BUILD_DIR" -j"$(nproc)"
56+
57+
if [[ "$ENABLE_TESTS" == "1" ]]; then
58+
echo "[3.1/4] Running test suite..."
59+
ctest --test-dir "$BUILD_DIR" --output-on-failure
60+
fi
61+
62+
echo "[4/4] Done."
63+
echo "Run from build dir: $BUILD_DIR/ro-control"
64+
65+
if [[ "$INSTALL_AFTER_BUILD" == "1" ]]; then
66+
echo "Installing to $INSTALL_PREFIX..."
67+
sudo cmake --install "$BUILD_DIR"
68+
fi

0 commit comments

Comments
 (0)