Skip to content

Commit bebf66d

Browse files
authored
Use packages from end-4/ii-package-builds for fedora (#3288)
2 parents bfad75c + adb36f4 commit bebf66d

6 files changed

Lines changed: 26 additions & 254 deletions

File tree

sdata/dist-fedora/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Note:
1111
- Author: [ririko6z](https://github.com/ririko6z)
1212

1313
## Tested
14-
- It has been tested on Fedora 43 (KDE Plasma Desktop Edition) on the `x86_64` platform.
14+
- It has been tested on Fedora Everything 44 on the `x86_64` platform.
1515

1616
## Post installation
1717
- Fix the issue of the right column crashing when clicking the `Details` button in Wi-Fi mode. Edit this file: `~/.config/illogical-impulse/config.json`
@@ -24,4 +24,3 @@ Note:
2424
+ "bluetooth": "kcmshell6 kcm_bluetooth",
2525
+ "network": "plasmawindowed org.kde.plasma.networkmanagement",
2626
```
27-

sdata/dist-fedora/SPECS/cpptrace.spec

Lines changed: 0 additions & 43 deletions
This file was deleted.

sdata/dist-fedora/SPECS/matugen.spec

Lines changed: 0 additions & 37 deletions
This file was deleted.

sdata/dist-fedora/SPECS/quickshell-git.spec

Lines changed: 0 additions & 87 deletions
This file was deleted.

sdata/dist-fedora/feddeps.toml

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -134,33 +134,10 @@ packages = [
134134
]
135135
install_opts = ["--setopt=install_weak_deps=False"]
136136

137-
# Quickshell-git
138-
[groups.quickshell]
137+
[groups.illogical-impulse]
139138
packages = [
140-
"qt6-qtdeclarative",
141-
"qt6-qtbase",
142-
"jemalloc",
143-
"qt6-qtsvg",
144-
"pipewire-libs",
145-
"libxcb",
146-
"wayland-devel",
147-
"qt6-qtwayland",
148-
"qt5-qtwayland",
149-
"libdrm",
150-
"breakpad",
151-
"kf6-kirigami",
152-
"libunwind-devel",
153-
# NOTE: Below are custom dependencies of illogical-impulse
154-
"qt6-qt5compat",
155-
"qt6-qtimageformats",
156-
"qt6-qtpositioning",
157-
"qt6-qtquicktimeline",
158-
"qt6-qtsensors",
159-
"qt6-qttools",
160-
"qt6-qttranslations",
161-
"qt6-qtvirtualkeyboard",
162-
"kdialog",
163-
"kf6-syntax-highlighting"
139+
"quickshell-git",
140+
"matugen"
164141
]
165142

166143
# Screencapture

sdata/dist-fedora/install-deps.sh

Lines changed: 22 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -23,61 +23,20 @@ function r() {
2323
[ "$original_id" == "$last_id" ] || yq -i ".dnf.transaction_ids += [ $last_id ]" "$user_config" || :
2424
}
2525

26-
# Start building and install the missing RPM package locally.
27-
function install_RPMS() {
28-
local local_specs local_rpms
29-
rpmbuildroot="${rpmbuildroot:-${REPO_ROOT}/cache/rpmbuild}"
30-
31-
x rm -rf "${REPO_ROOT}/cache/rpmbuild"
32-
x mkdir -p "$rpmbuildroot"/{BUILD,RPMS,SOURCES}
33-
x cp -r "${REPO_ROOT}/sdata/dist-fedora/SPECS" "$rpmbuildroot/"
34-
35-
x cd $rpmbuildroot/SPECS
36-
37-
packages=(
38-
"cpptrace"
39-
"quickshell-git"
40-
"matugen"
41-
)
42-
for package in "${packages[@]}"; do
43-
echo "start $package"
44-
45-
spec="$rpm_specs/$package.spec"
46-
installed_rpm_stamp=$(rpm -q --qf '%{NVRA}\n' "$package" 2>/dev/null || true)
47-
spec_stamp=$(rpmspec -q --qf '%{NVRA}\n' "$spec")
48-
arch=$(rpm --eval "%_arch") # if we somehow want aarch64??
49-
built_rpm_path="$rpmbuildroot/RPMS/$arch/$spec_stamp.rpm"
50-
51-
[[ -f "$spec" ]] || {
52-
echo "Missing spec: $spec"
53-
continue
54-
}
55-
56-
echo "rpm_specs=$rpm_specs"
57-
echo "spec=$spec"
58-
echo "spec_stamp=$spec_stamp"
59-
60-
if [[ "$installed_rpm_stamp" == "$spec_stamp" ]]; then
61-
printf "$installed_rpm_stamp is installed and up to date. Skipping.\n"
62-
continue
63-
fi
64-
# Download sources
65-
x spectool -g -C "$rpmbuildroot/SOURCES" "$spec"
66-
# Install build dependencies
67-
r x sudo dnf builddep -y "$spec"
68-
# Build the RPM package locally. If it fails, download it from COPR.
69-
if ! rpmbuild -bb --define "_topdir $rpmbuildroot" --define "debug_package %{nil}" "$spec"; then
70-
printf "${STY_RED}Local build encountered an issue. Downloading $(basename "$spec" .spec) from COPR. Report the issue to Discussions pls.${STY_RST}\n"
71-
sudo dnf install -y $(basename "$spec" .spec)
72-
nolock_qs=true
73-
fi
74-
75-
if [[ -f "$rpmbuildroot/RPMS/x86_64/$spec_stamp.rpm" ]]; then
76-
echo -e "${STY_BLUE}Next command:${STY_RST} sudo dnf install $rpmbuildroot/RPMS/x86_64/$spec_stamp.rpm -y"
77-
r x sudo dnf install "$rpmbuildroot/RPMS/x86_64/$spec_stamp.rpm" -y
78-
fi
79-
done
80-
x cd ${REPO_ROOT}
26+
# Init local RPM repo and download rpms from releases there.
27+
function init_local_repo() {
28+
url="https://api.github.com/repos/end-4/ii-package-builds/releases/tags/packages-fedora"
29+
path="$HOME/.cache/illogical-impulse-repo"
30+
31+
rm -rf -- "$path"
32+
mkdir -p "$path"
33+
34+
for file in $(curl -s "$url" | jq -r '.assets[].browser_download_url'); do
35+
name=$(basename "$file")
36+
echo "Downloading $file"
37+
curl --max-time 10 -L --fail --show-error --progress-bar -o "$path/$name" "$file"
38+
createrepo_c "$path"
39+
done
8140
}
8241

8342
# -------------------------
@@ -102,7 +61,7 @@ v sudo dnf versionlock delete quickshell-git 2>/dev/null
10261
v sudo dnf install yq -y
10362

10463
# Install development tools
105-
r v sudo dnf install @development-tools fedora-packager -y
64+
r v sudo dnf install createrepo_c -y
10665

10766
# Install COPR repositories
10867
copr_repos_json=$(yq -o=j '.copr.repos // []' "$deps_data_file")
@@ -111,9 +70,9 @@ for copr in ${copr_repos_array[@]}; do
11170
v sudo dnf copr enable "$copr" -y
11271
done
11372

114-
# Build and install locally RPMS
115-
showfun install_RPMS
116-
v install_RPMS
73+
# Init local repo with prebuilt rpms
74+
showfun init_local_repo
75+
v init_local_repo
11776

11877
# Install packages from toml file
11978
deps_data=$(yq -o=j '.' "$deps_data_file")
@@ -125,6 +84,10 @@ while IFS= read -r deps_list_key; do
12584
install_opts=$(echo $deps_data | yq ".groups.\"$deps_list_key\" | select(has(\"install_opts\")) | .install_opts[]")
12685
package_list=$(echo $deps_data | yq ".groups.\"$deps_list_key\".packages | unique | .[]")
12786

87+
if [[ $deps_list_key == 'illogical-impulse' ]]; then
88+
install_opts="$install_opts --repofrompath=illogical-impulse,file://$HOME/.cache/illogical-impulse-repo --nogpgcheck"
89+
fi
90+
12891
r v sudo dnf install -y $install_opts $package_list </dev/tty
12992

13093
echo "----------------------------------------"

0 commit comments

Comments
 (0)