Skip to content

Commit

Permalink
Merge pull request #13 from ublue-os/main
Browse files Browse the repository at this point in the history
[pull] main from ublue-os:main
  • Loading branch information
pull[bot] authored Oct 27, 2024
2 parents 88eb0aa + 1b4d96c commit 45d9867
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
is_latest_version: true
is_stable_version: true
kernel_flavor: bazzite # must match a kernel_flavor from akmods repo
kernel_version: 6.11.5-303.bazzite.fc41.x86_64 # must match a cached version of the above flavor
kernel_version: 6.11.5-304.bazzite.fc41.x86_64 # must match a cached version of the above flavor
exclude:
- base_name: bazzite
target_nvidia_flavor: nvidia
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
CHANGELOG_FORMAT = """\
{handwritten}
From previous `{target}` version `{prev}` there have been the following changes. **One package per new version shown.**
Visit [bazzite.gg](https://bazzite.gg) for more information and to download Bazzite.
From previous `{target}` version `{prev}` there have been the following changes. **One package per new version shown.**
### Major packages
| Name | Version |
| --- | --- |
Expand All @@ -58,6 +58,15 @@
| **[HHD](https://github.com/hhd-dev/hhd)** | {pkgrel:hhd} |
{changes}
### How to update
For current users, type the following to rebase to this version:
```bash
# For this branch (if latest):
bazzite-rollback-helper rebase {target}
# For this specific image:
bazzite-rollback-helper rebase {curr}
```
"""
HANDWRITTEN_PLACEHOLDER = """\
This is an automatically generated changelog for release `{curr}`."""
Expand Down Expand Up @@ -287,6 +296,10 @@ def get_commits(prev_manifests, manifests, workdir: str):
if not commit:
continue
hash, short, subject = commit.split(" ", 2)

if subject.lower().startswith("merge"):
continue

out += (
COMMIT_FORMAT.replace("{short}", short)
.replace("{subject}", subject)
Expand Down Expand Up @@ -326,9 +339,9 @@ def generate_changelog(
finish = ""

# Remove .0 from curr
curr = re.sub(r"\.\d{1,2}$", "", curr)
curr_pretty = re.sub(r"\.\d{1,2}$", "", curr)
# Remove target- from curr
curr_pretty = re.sub(rf"^[a-z]+-", "", curr)
curr_pretty = re.sub(rf"^[a-z]+-", "", curr_pretty)
pretty = target.capitalize() + " (F" + curr_pretty
if finish and target != "stable":
pretty += ", #" + finish[:7]
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/generate_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
- name: Get target
id: get-target
run: |
echo "target=${{ github.event.inputs.target || github.ref }}" > $GITHUB_OUTPUT
TARGET="${{ github.event.inputs.target || github.ref }}"
TARGET="${TARGET##*/}"
echo "target=$TARGET" >> $GITHUB_OUTPUT
- name: Generate Release Text
id: generate-release
Expand Down
14 changes: 13 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
ostree container commit

# Setup firmware
# Downgrade firmware to address galileo waking while asleep
RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
mkdir -p /tmp/linux-firmware-neptune && \
curl -Lo /tmp/linux-firmware-neptune/cs35l41-dsp1-spk-cali.bin https://gitlab.com/evlaV/linux-firmware-neptune/-/raw/"${JUPITER_FIRMWARE_VERSION}"/cs35l41-dsp1-spk-cali.bin && \
Expand Down Expand Up @@ -271,6 +270,13 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
mv -vf /tmp/linux-firmware-galileo/* /usr/lib/firmware/qca/ && \
rm -rf /tmp/linux-firmware-galileo && \
rm -rf /usr/share/alsa/ucm2/conf.d/acp5x/Valve-Jupiter-1.conf && \
mkdir -p /tmp/aw87559 && \
mkdir -p /usr/lib/firmware/aw87559 && \
curl -Lo /tmp/aw87559/aw87xxx_acf.bin https://github.com/orangepi-xunlong/firmware/raw/refs/heads/master/aw87xxx_acf.bin && \
xz --check=crc32 /tmp/aw87559/aw87xxx_acf.bin && \
mv -vf /tmp/aw87559/aw87xxx_acf.bin.xz /usr/lib/firmware/aw87559/aw87xxx_acf.bin.xz && \
ln -s /usr/lib/firmware/aw87559/aw87xxx_acf.bin.xz /usr/lib/firmware/aw87xxx_acf.bin.xz && \
rm -rf /tmp/aw87559 && \
if [[ "${IMAGE_FLAVOR}" =~ "asus" ]]; then \
curl -Lo /etc/yum.repos.d/_copr_lukenukem-asus-linux.repo https://copr.fedorainfracloud.org/coprs/lukenukem/asus-linux/repo/fedora-$(rpm -E %fedora)/lukenukem-asus-linux-fedora-$(rpm -E %fedora).repo && \
rpm-ostree install \
Expand Down Expand Up @@ -421,6 +427,7 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
ydotool \
yafti \
stress-ng \
btrfs-assistant \
lsb_release && \
rpm-ostree install \
ublue-update && \
Expand All @@ -430,6 +437,7 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
sed -i 's/max_cpu_load_percent.*/max_cpu_load_percent = 100.0/' /etc/ublue-update/ublue-update.toml && \
sed -i 's/max_mem_percent.*/max_mem_percent = 90.0/' /etc/ublue-update/ublue-update.toml && \
sed -i 's/dbus_notify.*/dbus_notify = false/' /etc/ublue-update/ublue-update.toml && \
sed -i 's/ --xdg-runtime=\\"${XDG_RUNTIME_DIR}\\"//g' /usr/bin/btrfs-assistant-launcher && \
curl -Lo /usr/bin/installcab https://raw.githubusercontent.com/KyleGospo/steam-proton-mf-wmv/master/installcab.py && \
chmod +x /usr/bin/installcab && \
curl -Lo /usr/bin/install-mf-wmv https://github.com/KyleGospo/steam-proton-mf-wmv/blob/master/install-mf-wmv.sh && \
Expand Down Expand Up @@ -551,6 +559,8 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
mutter \
mutter-common \
gnome-shell && \
rpm-ostree install \
nautilus-gsconnect \
Expand Down Expand Up @@ -704,6 +714,7 @@ RUN rm -f /etc/profile.d/toolbox.sh && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-steam.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-rar.repo && \
sed -i 's#/var/lib/selinux#/etc/selinux#g' /usr/lib/python3.*/site-packages/setroubleshoot/util.py && \
mkdir -p /etc/flatpak/remotes.d && \
curl -Lo /etc/flatpak/remotes.d/flathub.flatpakrepo https://dl.flathub.org/repo/flathub.flatpakrepo && \
systemctl enable brew-dir-fix.service && \
Expand All @@ -720,6 +731,7 @@ RUN rm -f /etc/profile.d/toolbox.sh && \
systemctl enable bazzite-hardware-setup.service && \
systemctl disable tailscaled.service && \
systemctl enable dev-hugepages1G.mount && \
systemctl enable bazzite-snapper-setup && \
systemctl --global enable bazzite-user-setup.service && \
systemctl --global enable podman.socket && \
systemctl --global enable systemd-tmpfiles-setup.service && \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
%global extension just-perfection
%global uuid %{extension}-desktop@%{extension}

Name: gnome-shell-extension-%{extension}
Version: 30.0
Release: %autorelease
Summary: GNOME Shell extension to change behavior and disable UI elements
License: GPL-3.0-only
URL: https://gitlab.gnome.org/jrahmatzadeh/just-perfection
BuildArch: noarch

Source: %{url}/-/archive/%{version}/%{extension}-%{version}.tar.gz

BuildRequires: glib2-devel
BuildRequires: gettext

Requires: gnome-shell >= 45
Recommends: gnome-extensions-app
Provides: %{extension} = %{version}-%{release}


%description
%{summary}.


%prep
%autosetup -n %{extension}-%{version}

# fix spurious-executable-perm and script-without-shebang rpmlint warnings/errors
find -type f -print -exec chmod 644 {} \;


%build
glib-compile-resources \
--sourcedir src/data \
src/data/resources.gresource.xml


%install
pushd src

# install main extension files
install -d -m 0755 %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}
cp -r --preserve=timestamps \
*.js stylesheet.css metadata.json \
lib data/resources.gresource \
%{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}

# install the schema file
install -D -p -m 0644 \
schemas/org.gnome.shell.extensions.%{extension}.gschema.xml \
%{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.%{extension}.gschema.xml

popd

# install locale files
pushd po
for po in *.po; do
install -d -m 0755 %{buildroot}%{_datadir}/locale/${po%.po}/LC_MESSAGES
msgfmt -o %{buildroot}%{_datadir}/locale/${po%.po}/LC_MESSAGES/%{extension}.mo $po
done
popd
%find_lang %{extension}


%files -f %{extension}.lang
%license LICENSE
%doc CHANGELOG.md
%{_datadir}/gnome-shell/extensions/%{uuid}
%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.%{extension}.gschema.xml


%changelog
%autochangelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Create a default snapper config if snapper is unconfigured
After=local-fs.target

[Service]
Type=oneshot
ExecStart=/usr/libexec/bazzite-snapper-setup

[Install]
WantedBy=multi-user.target
4 changes: 4 additions & 0 deletions system_files/desktop/shared/usr/libexec/bazzite-snapper-setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
if ! snapper get-config >/dev/null 2>&1; then
snapper create-config /var/home
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# subvolume to snapshot
# With ostree it is pointless to snapshot /,
# so we set the root config to snapshot /var/home instead
SUBVOLUME="/var/home"

# filesystem type
FSTYPE="btrfs"


# btrfs qgroup for space aware cleanup algorithms
QGROUP=""


# fraction or absolute size of the filesystems space the snapshots may use
SPACE_LIMIT="0.5"

# fraction or absolute size of the filesystems space that should be free
FREE_LIMIT="0.2"


# users and groups allowed to work with config
ALLOW_USERS=""
ALLOW_GROUPS=""

# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory
SYNC_ACL="no"


# start comparing pre- and post-snapshot in background after creating
# post-snapshot
BACKGROUND_COMPARISON="yes"


# run daily number cleanup
NUMBER_CLEANUP="yes"

# limit for number cleanup
NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="50"
NUMBER_LIMIT_IMPORTANT="10"


# create hourly snapshots
TIMELINE_CREATE="yes"

# cleanup hourly snapshots after some time
TIMELINE_CLEANUP="yes"

# limits for timeline cleanup
TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="8"
TIMELINE_LIMIT_DAILY="4"
TIMELINE_LIMIT_WEEKLY="4"
TIMELINE_LIMIT_MONTHLY="3"
TIMELINE_LIMIT_YEARLY="0"


# cleanup empty pre-post-pairs
EMPTY_PRE_POST_CLEANUP="yes"

# limits for empty pre-post-pair cleanup
EMPTY_PRE_POST_MIN_AGE="90"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name='X-Pardus-Apps.directory'
translate=true

[org/gnome/desktop/app-folders/folders/Utilities]
apps=['yafti.desktop', 'system-update.desktop', 'webapp-manager.desktop', 'tuned-gui.desktop', 'rog-control-center.desktop', 'fish.desktop', 'tuned-gui.desktop', 'nvtop.desktop', 'yelp.desktop', 'btop.desktop', 'com.github.tchx84.Flatseal.desktop', 'io.github.flattool.Warehouse.desktop', 'it.mijorus.gearlever.desktop', 'com.mattjakeman.ExtensionManager.desktop', 'org.gnome.tweaks.desktop', 'com.github.GradienceTeam.Gradience', 'io.github.fastrizwaan.WineZGUI.desktop', 'setroubleshoot.desktop', 'org.rncbc.qsynth.desktop', 'bazzite-documentation.desktop', 'bazzite-landing.desktop', 'discourse.desktop', 'de.leopoldluley.Clapgrep.desktop']
apps=['yafti.desktop', 'system-update.desktop', 'webapp-manager.desktop', 'tuned-gui.desktop', 'rog-control-center.desktop', 'fish.desktop', 'tuned-gui.desktop', 'nvtop.desktop', 'yelp.desktop', 'btop.desktop', 'com.github.tchx84.Flatseal.desktop', 'io.github.flattool.Warehouse.desktop', 'it.mijorus.gearlever.desktop', 'com.mattjakeman.ExtensionManager.desktop', 'org.gnome.tweaks.desktop', 'com.github.GradienceTeam.Gradience', 'io.github.fastrizwaan.WineZGUI.desktop', 'setroubleshoot.desktop', 'org.rncbc.qsynth.desktop', 'bazzite-documentation.desktop', 'bazzite-landing.desktop', 'discourse.desktop', 'de.leopoldluley.Clapgrep.desktop', 'btrfs-assistant.desktop']
categories=['X-GNOME-Utilities']
name='X-GNOME-Utilities.directory'
translate=true
Expand Down

0 comments on commit 45d9867

Please sign in to comment.