mirror of
https://github.com/ublue-os/packages.git
synced 2026-11-03 21:49:48 -09:00
chore: remove unused and unmaintained packages (#1176)
This commit is contained in:
parent
4dcbeb1ee5
commit
5e893363d4
47 changed files with 0 additions and 2091 deletions
|
|
@ -1,36 +0,0 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
# FIXME: add no-source-twice fix
|
||||
|
||||
# ls aliases
|
||||
if [ "$(command -v eza)" ]
|
||||
alias ll='eza -l --icons=auto --group-directories-first'
|
||||
alias l.='eza -d .*'
|
||||
alias ls='eza'
|
||||
alias l1='eza -1'
|
||||
end
|
||||
|
||||
# ugrep for grep
|
||||
if [ "$(command -v ug)" ]
|
||||
alias grep='ug'
|
||||
alias egrep='ug -E'
|
||||
alias fgrep='ug -F'
|
||||
alias xzgrep='ug -z'
|
||||
alias xzegrep='ug -zE'
|
||||
alias xzfgrep='ug -zF'
|
||||
end
|
||||
|
||||
# bat for cat
|
||||
alias cat='bat --style=plain --pager=never' 2>/dev/null
|
||||
|
||||
if status is-interactive
|
||||
# Initialize atuin before starship to ensure proper command history capture
|
||||
# Atuin allows these flags: "--disable-up-arrow" and/or "--disable-ctrl-r"
|
||||
# Use by setting a universal variable, e.g. set -U ATUIN_INIT_FLAGS "--disable-up-arrow"
|
||||
# Or set in config.fish before this file is sourced
|
||||
[ "$(command -v atuin)" ] && eval "$(atuin init fish $ATUIN_INIT_FLAGS)"
|
||||
|
||||
[ "$(command -v starship)" ] && eval "$(starship init fish)"
|
||||
|
||||
[ "$(command -v zoxide)" ] && eval "$(zoxide init fish)"
|
||||
end
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Check if bling has already been sourced so that we dont break atuin. https://github.com/atuinsh/atuin/issues/380#issuecomment-1594014644
|
||||
[ "${BLING_SOURCED:-0}" -eq 1 ] && return
|
||||
BLING_SOURCED=1
|
||||
|
||||
# ls aliases
|
||||
if [ "$(command -v eza)" ]; then
|
||||
alias ll='eza -l --icons=auto --group-directories-first'
|
||||
alias l.='eza -d .*'
|
||||
alias ls='eza'
|
||||
alias l1='eza -1'
|
||||
fi
|
||||
|
||||
# ugrep for grep
|
||||
if [ "$(command -v ug)" ]; then
|
||||
alias grep='ug'
|
||||
alias egrep='ug -E'
|
||||
alias fgrep='ug -F'
|
||||
alias xzgrep='ug -z'
|
||||
alias xzegrep='ug -zE'
|
||||
alias xzfgrep='ug -zF'
|
||||
fi
|
||||
|
||||
# bat for cat
|
||||
alias cat='bat --style=plain --pager=never' 2>/dev/null
|
||||
|
||||
HOMEBREW_PREFIX="${HOMEBREW_PREFIX:-/home/linuxbrew/.linuxbrew}"
|
||||
|
||||
# set ATUIN_INIT_FLAGS in your ~/.bashrc before ublue-bling is sourced.
|
||||
# Atuin allows these flags: "--disable-up-arrow" and/or "--disable-ctrl-r"
|
||||
ATUIN_INIT_FLAGS=${ATUIN_INIT_FLAGS:-""}
|
||||
|
||||
if [ "$(basename $(readlink /proc/$$/exe))" = "bash" ]; then
|
||||
# Initialize direnv before bash-preexec to avoid PROMPT_COMMAND conflicts
|
||||
# See: https://github.com/rcaloras/bash-preexec/pull/143
|
||||
[ "$(command -v direnv)" ] && eval "$(direnv hook bash)"
|
||||
[ -f "/etc/profile.d/bash-preexec.sh" ] && . "/etc/profile.d/bash-preexec.sh"
|
||||
[ -f "/usr/share/bash-prexec" ] && . "/usr/share/bash-prexec"
|
||||
[ -f "/usr/share/bash-prexec.sh" ] && . "/usr/share/bash-prexec.sh"
|
||||
[ -f "${HOMEBREW_PREFIX}/etc/profile.d/bash-preexec.sh" ] && . "${HOMEBREW_PREFIX}/etc/profile.d/bash-preexec.sh"
|
||||
# Initialize atuin before starship to ensure proper command history capture
|
||||
# See: https://github.com/atuinsh/atuin/issues/2804
|
||||
[ "$(command -v atuin)" ] && eval "$(atuin init bash ${ATUIN_INIT_FLAGS})"
|
||||
[ "$(command -v starship)" ] && eval "$(starship init bash)"
|
||||
[ "$(command -v zoxide)" ] && eval "$(zoxide init bash)"
|
||||
elif [ "$(basename $(readlink /proc/$$/exe))" = "zsh" ]; then
|
||||
# Initialize direnv before atuin to avoid PROMPT_COMMAND conflicts
|
||||
[ "$(command -v direnv)" ] && eval "$(direnv hook zsh)"
|
||||
# Initialize atuin before starship to ensure proper command history capture
|
||||
[ "$(command -v atuin)" ] && eval "$(atuin init zsh ${ATUIN_INIT_FLAGS})"
|
||||
[ "$(command -v starship)" ] && eval "$(starship init zsh)"
|
||||
[ "$(command -v zoxide)" ] && eval "$(zoxide init zsh)"
|
||||
fi
|
||||
|
|
@ -1,235 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
# coloring / ugum chooser
|
||||
source /usr/lib/ujust/ujust.sh
|
||||
|
||||
get_config() {
|
||||
MOTD_CONFIG_FILE="${MOTD_CONFIG_FILE:-/etc/ublue-os/bling.json}"
|
||||
QUERY="$1"
|
||||
FALLBACK="$2"
|
||||
shift
|
||||
shift
|
||||
OUTPUT="$(jq -r "$QUERY" "$MOTD_CONFIG_FILE" 2>/dev/null || echo "$FALLBACK")"
|
||||
if [ "$OUTPUT" == "null" ] ; then
|
||||
echo "$FALLBACK"
|
||||
return
|
||||
fi
|
||||
echo "$OUTPUT"
|
||||
}
|
||||
|
||||
|
||||
# Exit Handling
|
||||
function Exiting() {
|
||||
printf "%s%sExiting...%s\n" "${red}" "${bold}" "${normal}"
|
||||
printf "Rerun script with %s%sujust $BLING_CLI_NAME%s\n" "${blue}" "${bold}" "${normal}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Trap function
|
||||
function ctrl_c() {
|
||||
printf "\n%s\n" "Signal SIGINT caught"
|
||||
Exiting
|
||||
}
|
||||
|
||||
# Brew Bundle Install
|
||||
function brew-bundle() {
|
||||
echo 'Installing bling from Homebrew 🍻🍻🍻'
|
||||
brew bundle --file "$BLING_BREW_BUNDLE_PATH"
|
||||
}
|
||||
|
||||
# Pixi Install Global
|
||||
function pixi-install-global() {
|
||||
echo 'Installing bling with pixi (global install) 🐍🐍🐍'
|
||||
|
||||
if [ ! -f "$BLING_PIXI_PACKAGES_FILE" ]; then
|
||||
echo "Error: Pixi packages file not found at $BLING_PIXI_PACKAGES_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
packages="$(cat "$BLING_PIXI_PACKAGES_FILE" | grep -v '^#' | grep -v '^$' | tr '\n' ' ')"
|
||||
|
||||
if [ -z "$packages" ]; then
|
||||
echo "Error: No packages found in $BLING_PIXI_PACKAGES_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pixi global install $packages
|
||||
}
|
||||
|
||||
# Check if bling is already sourced
|
||||
# 0 for yes
|
||||
# 1 for no
|
||||
function is-bling-installed() {
|
||||
shell="$1"
|
||||
shift
|
||||
|
||||
line=""
|
||||
BLING_SCRIPT_SOURCE="bling.sh"
|
||||
TARGET_CONFIG_FILE="${HOME}/.bashrc"
|
||||
case "${shell}" in
|
||||
"fish")
|
||||
BLING_SCRIPT_SOURCE="bling.fish"
|
||||
TARGET_CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish"
|
||||
;;
|
||||
"zsh")
|
||||
BLING_SCRIPT_SOURCE="bling.sh"
|
||||
TARGET_CONFIG_FILE="${ZDOTDIR:-$HOME}/.zshrc"
|
||||
;;
|
||||
"bash")
|
||||
BLING_SCRIPT_SOURCE="bling.sh"
|
||||
TARGET_CONFIG_FILE="${HOME}/.bashrc"
|
||||
;;
|
||||
*)
|
||||
echo 'Unknown shell. You are on your own.'
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
# Prevents grep erroring out when theres no config file for the shell
|
||||
touch "$TARGET_CONFIG_FILE"
|
||||
line="$(grep -n "source $BLING_CLI_DIRECTORY/$BLING_SCRIPT_SOURCE" "$TARGET_CONFIG_FILE")"
|
||||
line="$(grep -Eo '^[^:]+' <<< "$line")"
|
||||
|
||||
if [[ -n "${line}" ]]; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
# Add Bling
|
||||
function add-bling() {
|
||||
shell="$1"
|
||||
shift
|
||||
|
||||
if [[ "${BLING_USE_PIXI}" == "1" ]]; then
|
||||
pixi-install-global || Exiting
|
||||
else
|
||||
brew-bundle || Exiting
|
||||
fi
|
||||
|
||||
echo 'Setting up your Shell 🐚🐚🐚'
|
||||
case "${shell}" in
|
||||
"fish")
|
||||
echo 'Adding bling to your config.fish 🐟🐟🐟'
|
||||
cat<<EOF >> "${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish"
|
||||
### bling.fish source start
|
||||
test -f $BLING_CLI_DIRECTORY/bling.fish && source $BLING_CLI_DIRECTORY/bling.fish
|
||||
### bling.fish source end
|
||||
EOF
|
||||
;;
|
||||
"zsh")
|
||||
echo 'Adding bling to your .zshrc 💤💤💤'
|
||||
cat<<EOF >> "${ZDOTDIR:-$HOME}/.zshrc"
|
||||
### bling.sh source start
|
||||
test -f $BLING_CLI_DIRECTORY/bling.sh && source $BLING_CLI_DIRECTORY/bling.sh
|
||||
### bling.sh source end
|
||||
EOF
|
||||
;;
|
||||
"bash")
|
||||
echo 'Adding bling to your .bashrc 💥💥💥'
|
||||
cat<<EOF >> "${HOME}/.bashrc"
|
||||
### bling.sh source start
|
||||
test -f $BLING_CLI_DIRECTORY/bling.sh && source $BLING_CLI_DIRECTORY/bling.sh
|
||||
### bling.sh source end
|
||||
EOF
|
||||
;;
|
||||
*)
|
||||
echo 'Unknown shell. You are on your own.'
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Remove bling, handle if old method
|
||||
function remove-bling() {
|
||||
shell="$1"
|
||||
shift
|
||||
|
||||
case "${shell}" in
|
||||
"fish")
|
||||
sed -i '/### bling.fish source start/,/### bling.fish source end/d' \
|
||||
"${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish" \
|
||||
|| \
|
||||
line=$(grep -n "source $BLING_CLI_DIRECTORY/bling.fish" \
|
||||
"${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish" \
|
||||
| grep -Eo '^[^:]+') \
|
||||
&& \
|
||||
sed -i "${line}"d "${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish"
|
||||
;;
|
||||
"zsh")
|
||||
sed -i '/### bling.sh source start/,/### bling.sh source end/d' \
|
||||
"${ZDOTDIR:-$HOME}/.zshrc" \
|
||||
|| \
|
||||
line=$(grep -n "source $BLING_CLI_DIRECTORY/bling.sh" \
|
||||
"${ZDOTDIR:-$HOME}/.zshrc" \
|
||||
| grep -Eo '^[^:]+') && sed -i "${line}"d \
|
||||
"${ZDOTDIR:-$HOME}/.zshrc"
|
||||
;;
|
||||
"bash")
|
||||
sed -i '/### bling.sh source start/,/### bling.sh source end/d' \
|
||||
"${HOME}/.bashrc" \
|
||||
|| \
|
||||
line=$(grep -n "source $BLING_CLI_DIRECTORY/bling.sh" \
|
||||
"${HOME}/.bashrc" \
|
||||
| grep -Eo '^[^:]+') && sed -i "${line}"d \
|
||||
"${HOME}/.bashrc"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function main() {
|
||||
# Get Shell
|
||||
shell=$(basename "$SHELL")
|
||||
reentry="$1"
|
||||
clear
|
||||
if [[ -n "${reentry:-}" ]]; then
|
||||
printf "%s%s%s\n\n" "${bold}" "$reentry" "$normal"
|
||||
fi
|
||||
|
||||
# Check if bling is enabled and display
|
||||
printf "Shell:\t%s%s%s%s\n" "${green}" "${bold}" "${shell}" "${normal}"
|
||||
if is-bling-installed "${shell}"; then
|
||||
printf "Bling:\t%s%sEnabled%s\n" "${green}" "${bold}" "${normal}"
|
||||
else
|
||||
printf "Bling:\t%s%sDisabled%s\n" "${red}" "${bold}" "${normal}"
|
||||
fi
|
||||
|
||||
# ugum enable/disable
|
||||
CHOICE=$(Choose enable disable cancel)
|
||||
|
||||
# Enable/Disable. Recurse if bad option.
|
||||
case "${CHOICE,,}" in
|
||||
"enable")
|
||||
if is-bling-installed "${shell}"; then
|
||||
main "Bling is already configured ..."
|
||||
fi
|
||||
trap ctrl_c SIGINT
|
||||
add-bling "${shell}"
|
||||
printf "%s%sInstallation Complete%s ... please close and reopen your terminal!" "${green}" "${bold}" "${normal}"
|
||||
printf "Check out the documentation at: https://docs.projectbluefin.io/command-line\n"
|
||||
exit 0
|
||||
;;
|
||||
"disable")
|
||||
if ! is-bling-installed "${shell}"; then
|
||||
main "Bling is not yet configured ..."
|
||||
fi
|
||||
trap ctrl_c SIGINT
|
||||
remove-bling "${shell}"
|
||||
printf "%s%sBling Removed%s ... please close and reopen your terminal\n" "${red}" "${bold}" "${normal}"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
Exiting
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
BLING_CLI_NAME="$(get_config '."bling-cli-name"' "bluefin-cli")"
|
||||
BLING_CLI_DIRECTORY="$(get_config '."bling-cli-path"' "/usr/share/ublue-os/bling")"
|
||||
BLING_BREW_BUNDLE_PATH="$(get_config '."bling-brew-bundle-path"' "/usr/share/ublue-os/homebrew/$BLING_CLI_NAME.Brewfile")"
|
||||
BLING_PIXI_PACKAGES_FILE="$(get_config '."bling-pixi-package-path"' "/usr/share/ublue-os/bling/${BLING_CLI_NAME}.pixi.list")"
|
||||
BLING_USE_PIXI="$(get_config '."use-pixi-bling"' "0")"
|
||||
|
||||
# Entrypoint
|
||||
main ""
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
%global debug_package %{nil}
|
||||
|
||||
Name: ublue-bling
|
||||
Version: 0.1.13
|
||||
Release: 1%{?dist}
|
||||
Summary: Universal Blue Bling CLI setup scripts
|
||||
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ublue-os/packages
|
||||
VCS: {{{ git_dir_vcs }}}
|
||||
Source: {{{ git_dir_pack }}}
|
||||
|
||||
Requires: gum
|
||||
BuildArch: noarch
|
||||
# FIXME: make ublue-builder be able to handle stuff like this
|
||||
# Requires: ublue-os-just
|
||||
|
||||
%description
|
||||
Universal Blue Bling CLI setup scripts
|
||||
|
||||
%prep
|
||||
{{{ git_dir_setup_macro }}}
|
||||
|
||||
%install
|
||||
install -Dm0755 ./src/%{name} %{buildroot}%{_libexecdir}/%{name}
|
||||
# Intented to either be symlinked into the correct directories or be used directly
|
||||
install -Dm0755 ./src/bling.sh %{buildroot}%{_datadir}/ublue-os/bling/bling.sh
|
||||
install -Dm0755 ./src/bling.fish %{buildroot}%{_datadir}/ublue-os/bling/bling.fish
|
||||
|
||||
%files
|
||||
%{_libexecdir}/%{name}
|
||||
%{_datadir}/ublue-os/bling/bling.*sh
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/sh
|
||||
# shellcheck shell=sh disable=SC1091,SC2039,SC2166
|
||||
# Check for interactive bash and that we haven't already been sourced.
|
||||
if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BREW_BASH_COMPLETION-}" = x ]; then
|
||||
|
||||
# Check for recent enough version of bash.
|
||||
if [ "${BASH_VERSINFO[0]}" -gt 4 ] ||
|
||||
[ "${BASH_VERSINFO[0]}" -eq 4 -a "${BASH_VERSINFO[1]}" -ge 2 ]; then
|
||||
if [ -w /home/linuxbrew/.linuxbrew ]; then
|
||||
if ! test -L /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew; then
|
||||
/home/linuxbrew/.linuxbrew/bin/brew completions link > /dev/null
|
||||
fi
|
||||
fi
|
||||
if test -d /home/linuxbrew/.linuxbrew/etc/bash_completion.d; then
|
||||
for rc in /home/linuxbrew/.linuxbrew/etc/bash_completion.d/*; do
|
||||
if test -r "$rc"; then
|
||||
. "$rc"
|
||||
fi
|
||||
done
|
||||
unset rc
|
||||
fi
|
||||
fi
|
||||
BREW_BASH_COMPLETION=1
|
||||
export BREW_BASH_COMPLETION
|
||||
fi
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
[[ -d /home/linuxbrew/.linuxbrew && $- == *i* ]] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#This file sets the resource limits for the users logged in via PAM,
|
||||
#more specifically, users logged in on via SSH or tty (console).
|
||||
#Limits related to terminals in Wayland/Xorg sessions depend on a
|
||||
#change to /etc/systemd/user.conf.
|
||||
#This does not affect resource limits of the system services.
|
||||
#This file overrides defaults set in /etc/security/limits.conf
|
||||
|
||||
* soft nofile 4096
|
||||
root soft nofile 4096
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
enable brew-setup.service
|
||||
enable brew-update.timer
|
||||
enable brew-upgrade.timer
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
[Unit]
|
||||
Description=Setup Brew
|
||||
Wants=basic.target
|
||||
After=basic.target
|
||||
ConditionPathExists=!/etc/.linuxbrew
|
||||
ConditionPathExists=!/var/home/linuxbrew/.linuxbrew
|
||||
ConditionPathExists=/usr/share/homebrew.tar.zst
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/mkdir -p /tmp/homebrew
|
||||
ExecStart=/usr/bin/mkdir -p /var/home/linuxbrew
|
||||
ExecStart=/usr/bin/tar --zstd -xvf /usr/share/homebrew.tar.zst -C /tmp/homebrew
|
||||
ExecStart=/usr/bin/cp -R -n /tmp/homebrew/home/linuxbrew/.linuxbrew /var/home/linuxbrew
|
||||
ExecStart=/usr/bin/chown -R 1000:1000 /var/home/linuxbrew
|
||||
ExecStart=/usr/bin/rm -rf /tmp/homebrew
|
||||
ExecStart=/usr/bin/touch /etc/.linuxbrew
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target multi-user.target
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[Unit]
|
||||
Description=Auto update brew for mutable brew installs
|
||||
After=local-fs.target
|
||||
After=network-online.target
|
||||
ConditionPathIsSymbolicLink=/home/linuxbrew/.linuxbrew/bin/brew
|
||||
|
||||
[Service]
|
||||
# Override the user if different UID/User
|
||||
User=1000
|
||||
Type=oneshot
|
||||
Environment=HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar
|
||||
Environment=HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew
|
||||
Environment=HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew
|
||||
ExecStart=/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew update"
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=Timer for brew update for mutable brew
|
||||
Wants=network-online.target
|
||||
|
||||
[Timer]
|
||||
OnBootSec=10min
|
||||
OnUnitInactiveSec=6h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
[Unit]
|
||||
Description=Upgrade Brew packages
|
||||
After=local-fs.target
|
||||
After=network-online.target
|
||||
ConditionPathIsSymbolicLink=/home/linuxbrew/.linuxbrew/bin/brew
|
||||
|
||||
[Service]
|
||||
# Override the user if different UID/User
|
||||
User=1000
|
||||
Type=oneshot
|
||||
Environment=HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar
|
||||
Environment=HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew
|
||||
Environment=HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew
|
||||
ExecStart=/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew upgrade"
|
||||
# Prevent Brew from overriding important system binaries like:
|
||||
# systemctl, loginctl, dbus-*, python*
|
||||
ExecStartPost=-/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew unlink systemd"
|
||||
ExecStartPost=-/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew unlink dbus"
|
||||
ExecStartPost=-/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew unlink python"
|
||||
ExecStartPost=-/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew unlink gsettings"
|
||||
ExecStartPost=-/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew unlink bash"
|
||||
ExecStartPost=-/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew unlink rpm"
|
||||
ExecStartPost=-/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew unlink qdbus"
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=Timer for brew upgrade for on image brew
|
||||
Wants=network-online.target
|
||||
|
||||
[Timer]
|
||||
OnBootSec=30min
|
||||
OnUnitInactiveSec=8h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
d /var/lib/homebrew 0755 1000 1000 - -
|
||||
d /var/cache/homebrew 0755 1000 1000 - -
|
||||
d /var/home/linuxbrew 0755 1000 1000 - -
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/fish
|
||||
#shellcheck disable=all
|
||||
if status --is-interactive
|
||||
if [ -d /home/linuxbrew/.linuxbrew ]
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
if test -d (brew --prefix)/share/fish/completions
|
||||
set -p fish_complete_path (brew --prefix)/share/fish/completions
|
||||
end
|
||||
if test -d (brew --prefix)/share/fish/vendor_completions.d
|
||||
set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
%global debug_package %{nil}
|
||||
# renovate: datasource=github-releases depName=ublue-os/packages
|
||||
%define homebrew_release homebrew-2025-11-04-01-29-53
|
||||
|
||||
Name: ublue-brew
|
||||
Version: 0.1.13
|
||||
Release: 1%{?dist}
|
||||
Summary: Homebrew integration for Universal Blue systems
|
||||
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ublue-os/packages
|
||||
VCS: {{{ git_dir_vcs }}}
|
||||
Source0: {{{ git_dir_pack }}}
|
||||
Source1: https://github.com/ublue-os/packages/releases/download/%{homebrew_release}/homebrew-x86_64.tar.zst
|
||||
Source2: https://github.com/ublue-os/packages/releases/download/%{homebrew_release}/homebrew-aarch64.tar.zst
|
||||
|
||||
BuildRequires: systemd-rpm-macros
|
||||
Requires: gcc
|
||||
Requires: zstd
|
||||
|
||||
%description
|
||||
Homebrew integration for Universal Blue systems
|
||||
|
||||
%prep
|
||||
{{{ git_dir_setup_macro }}}
|
||||
|
||||
%install
|
||||
# I have no idea how to do sources that can differ from the buildroot's architecture
|
||||
# FIXME: This is nasty and terrible.
|
||||
SOURCE_FILE=""
|
||||
if [ "$(arch)" == "x86_64" ]; then
|
||||
SOURCE_FILE=%{SOURCE1}
|
||||
else
|
||||
SOURCE_FILE=%{SOURCE2}
|
||||
fi
|
||||
install -Dpm0644 "${SOURCE_FILE}" %{buildroot}/%{_datadir}/homebrew.tar.zst
|
||||
install -Dpm0644 -t %{buildroot}%{_unitdir}/ ./src%{_unitdir}/*.service
|
||||
install -Dpm0644 -t %{buildroot}%{_unitdir}/ ./src%{_unitdir}/*.timer
|
||||
install -Dpm0644 -t %{buildroot}%{_prefix}/lib/systemd/system-preset/ ./src%{_prefix}/lib/systemd/system-preset/*.preset
|
||||
install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_conf.d/ ./src%{_datadir}/fish/vendor_conf.d/%{name}.fish
|
||||
install -Dpm0644 -t %{buildroot}%{_sysconfdir}/security/limits.d/ ./src%{_sysconfdir}/security/limits.d/*.conf
|
||||
install -Dpm0644 -t %{buildroot}%{_sysconfdir}/profile.d/ ./src%{_sysconfdir}/profile.d/*.sh
|
||||
install -Dpm0644 -t %{buildroot}%{_prefix}/lib/tmpfiles.d/ ./src%{_prefix}/lib/tmpfiles.d/*.conf
|
||||
|
||||
%post
|
||||
%systemd_post brew-setup.service
|
||||
|
||||
%preun
|
||||
%systemd_preun brew-setup.service
|
||||
|
||||
%files
|
||||
%{_sysconfdir}/profile.d/brew.sh
|
||||
%{_datadir}/homebrew.tar.zst
|
||||
%{_sysconfdir}/profile.d/brew-bash-completion.sh
|
||||
%{_datadir}/fish/vendor_conf.d/%{name}.fish
|
||||
%{_sysconfdir}/security/limits.d/*brew*.conf
|
||||
%{_unitdir}/brew-setup.service
|
||||
%{_unitdir}/brew-update.timer
|
||||
%{_unitdir}/brew-update.service
|
||||
%{_unitdir}/brew-upgrade.timer
|
||||
%{_unitdir}/brew-upgrade.service
|
||||
%{_prefix}/lib/systemd/system-preset/01-homebrew.preset
|
||||
%{_prefix}/lib/tmpfiles.d/*brew.conf
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
THEME=$(dconf read /org/gnome/desktop/interface/accent-color 2>/dev/null || echo -e "$DEFAULT_THEME")
|
||||
# Dconf will fail if the accent-color has not been changed yet
|
||||
if [ "$THEME" == "" ] ; then
|
||||
# Gsettings will not update if the system's schemas have not been configured properly
|
||||
THEME=$(gsettings get org.gnome.desktop.interface accent-color 2>/dev/null || echo -e "$DEFAULT_THEME")
|
||||
fi
|
||||
THEME=${THEME//\'/}
|
||||
THEME=${FASTFETCH_FORCE_THEME:-$THEME}
|
||||
|
||||
FASTFETCH_COLOR_SET="38;2;53;132;228"
|
||||
case $THEME in
|
||||
"blue")
|
||||
FASTFETCH_COLOR_SET="38;2;53;132;228"
|
||||
;;
|
||||
"green")
|
||||
FASTFETCH_COLOR_SET="38;2;58;148;74"
|
||||
;;
|
||||
"orange")
|
||||
FASTFETCH_COLOR_SET="38;2;237;91;0"
|
||||
;;
|
||||
"pink")
|
||||
FASTFETCH_COLOR_SET="38;2;213;97;153"
|
||||
;;
|
||||
"purple")
|
||||
FASTFETCH_COLOR_SET="38;2;139;62;165"
|
||||
;;
|
||||
"red")
|
||||
FASTFETCH_COLOR_SET="38;2;230;45;66"
|
||||
;;
|
||||
"slate")
|
||||
FASTFETCH_COLOR_SET="38;2;111;131;150"
|
||||
;;
|
||||
"teal")
|
||||
FASTFETCH_COLOR_SET="38;2;33;144;164"
|
||||
;;
|
||||
"yellow")
|
||||
FASTFETCH_COLOR_SET="38;2;200;136;0"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $FASTFETCH_COLOR_SET
|
||||
exit 0
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
get_config() {
|
||||
FASTFETCH_CONFIG_FILE="${FASTFETCH_CONFIG_FILE:-/etc/ublue-os/fastfetch.json}"
|
||||
QUERY="$1"
|
||||
FALLBACK="$2"
|
||||
shift
|
||||
shift
|
||||
OUTPUT="$(jq -r "$QUERY" "$FASTFETCH_CONFIG_FILE" 2>/dev/null || echo "$FALLBACK")"
|
||||
if [ "$OUTPUT" == "null" ] ; then
|
||||
echo "$FALLBACK"
|
||||
return
|
||||
fi
|
||||
echo "$OUTPUT"
|
||||
}
|
||||
|
||||
DEFAULT_THEME="$(get_config '."default-theme"' "slate")"
|
||||
FASTFETCH_CONFIG="$(get_config '."fastfetch-config"' "/usr/share/ublue-os/fastfetch.jsonc")"
|
||||
SHUFFLE_LOGO="$(get_config '."shuffle-logo"' "false")"
|
||||
LOGO_DIRECTORY="$(get_config '."logo-directory"' "/usr/share/ublue-os/fastfetch")"
|
||||
|
||||
if [ "$SHUFFLE_LOGO" == "true" ] ; then
|
||||
FETCH_LOGO="$(/usr/bin/find "$LOGO_DIRECTORY" -type f | /usr/bin/shuf -n 1)"
|
||||
/usr/bin/fastfetch --logo "$FETCH_LOGO" --color "$(/usr/libexec/ublue-bling-fastfetch)" --config "$FASTFETCH_CONFIG" "$@"
|
||||
else
|
||||
/usr/bin/fastfetch --color "$(/usr/libexec/ublue-bling-fastfetch)" --config "$FASTFETCH_CONFIG" "$@"
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
alias neofetch='/usr/libexec/ublue-fastfetch'
|
||||
alias neowofetch='/usr/libexec/ublue-fastfetch'
|
||||
alias fastfetch='/usr/libexec/ublue-fastfetch'
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
alias neofetch='/usr/libexec/ublue-fastfetch'
|
||||
alias neowofetch='/usr/libexec/ublue-fastfetch'
|
||||
alias fastfetch='/usr/libexec/ublue-fastfetch'
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
%global debug_package %{nil}
|
||||
|
||||
Name: ublue-fastfetch
|
||||
Version: 0.1.4
|
||||
Release: 1%{?dist}
|
||||
Summary: Fastfetch configuration for Universal Blue systems
|
||||
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ublue-os/packages
|
||||
VCS: {{{ git_dir_vcs }}}
|
||||
Source: {{{ git_dir_pack }}}
|
||||
|
||||
Requires: fastfetch
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Fastfetch configuration for Universal Blue systems
|
||||
|
||||
%prep
|
||||
{{{ git_dir_setup_macro }}}
|
||||
|
||||
%install
|
||||
install -Dm0755 -t %{buildroot}%{_libexecdir}/ ./src/%{name}
|
||||
install -Dm0755 -t %{buildroot}%{_libexecdir}/ ./src/ublue-bling-fastfetch
|
||||
install -Dm0755 ./src/vendor.sh %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
|
||||
install -Dm0755 ./src/vendor.fish %{buildroot}%{_datadir}/fish/vendor_conf.d/%{name}.fish
|
||||
|
||||
%files
|
||||
%{_libexecdir}/%{name}
|
||||
%{_libexecdir}/ublue-bling-fastfetch
|
||||
%{_sysconfdir}/profile.d/%{name}.sh
|
||||
%{_datadir}/fish/vendor_conf.d/%{name}.fish
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"document": {
|
||||
"margin": 2
|
||||
},
|
||||
"block_quote": {
|
||||
"indent": 1,
|
||||
"indent_token": "│ "
|
||||
},
|
||||
"paragraph": {},
|
||||
"list": {
|
||||
"level_indent": 2
|
||||
},
|
||||
"heading": {
|
||||
"block_suffix": "\n",
|
||||
"color": "33",
|
||||
"bold": true
|
||||
},
|
||||
"h1": {
|
||||
"block_prefix": "\n",
|
||||
"block_suffix": "\n"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "▌ "
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "┃ "
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "│ "
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "┆ "
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "┊ ",
|
||||
"bold": false
|
||||
},
|
||||
"text": {},
|
||||
"strikethrough": {
|
||||
"crossed_out": true
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"color": "33",
|
||||
"bold": true
|
||||
},
|
||||
"hr": {
|
||||
"format": "\n──────\n"
|
||||
},
|
||||
"item": {
|
||||
"block_prefix": "• "
|
||||
},
|
||||
"enumeration": {
|
||||
"block_prefix": ". "
|
||||
},
|
||||
"task": {
|
||||
"ticked": "[✓] ",
|
||||
"unticked": "[ ] "
|
||||
},
|
||||
"link": {
|
||||
"underline": true
|
||||
},
|
||||
"link_text": {
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"underline": true
|
||||
},
|
||||
"image_text": {
|
||||
"format": "Image: {{.text}}"
|
||||
},
|
||||
"code": {
|
||||
"prefix": " ",
|
||||
"suffix": " ",
|
||||
"bold": true
|
||||
},
|
||||
"code_block": {},
|
||||
"table": {},
|
||||
"definition_list": {},
|
||||
"definition_term": {},
|
||||
"definition_description": {
|
||||
"block_prefix": "\n🠶 "
|
||||
},
|
||||
"html_block": {},
|
||||
"html_span": {}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"document": {
|
||||
"margin": 2
|
||||
},
|
||||
"block_quote": {
|
||||
"indent": 1,
|
||||
"indent_token": "│ "
|
||||
},
|
||||
"paragraph": {},
|
||||
"list": {
|
||||
"level_indent": 2
|
||||
},
|
||||
"heading": {
|
||||
"block_suffix": "\n",
|
||||
"color": "34",
|
||||
"bold": true
|
||||
},
|
||||
"h1": {
|
||||
"block_prefix": "\n",
|
||||
"block_suffix": "\n"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "▌ "
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "┃ "
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "│ "
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "┆ "
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "┊ ",
|
||||
"bold": false
|
||||
},
|
||||
"text": {},
|
||||
"strikethrough": {
|
||||
"crossed_out": true
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"color": "34",
|
||||
"bold": true
|
||||
},
|
||||
"hr": {
|
||||
"format": "\n──────\n"
|
||||
},
|
||||
"item": {
|
||||
"block_prefix": "• "
|
||||
},
|
||||
"enumeration": {
|
||||
"block_prefix": ". "
|
||||
},
|
||||
"task": {
|
||||
"ticked": "[✓] ",
|
||||
"unticked": "[ ] "
|
||||
},
|
||||
"link": {
|
||||
"underline": true
|
||||
},
|
||||
"link_text": {
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"underline": true
|
||||
},
|
||||
"image_text": {
|
||||
"format": "Image: {{.text}}"
|
||||
},
|
||||
"code": {
|
||||
"prefix": " ",
|
||||
"suffix": " ",
|
||||
"bold": true
|
||||
},
|
||||
"code_block": {},
|
||||
"table": {},
|
||||
"definition_list": {},
|
||||
"definition_term": {},
|
||||
"definition_description": {
|
||||
"block_prefix": "\n🠶 "
|
||||
},
|
||||
"html_block": {},
|
||||
"html_span": {}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"document": {
|
||||
"margin": 2
|
||||
},
|
||||
"block_quote": {
|
||||
"indent": 1,
|
||||
"indent_token": "│ "
|
||||
},
|
||||
"paragraph": {},
|
||||
"list": {
|
||||
"level_indent": 2
|
||||
},
|
||||
"heading": {
|
||||
"block_suffix": "\n",
|
||||
"color": "208",
|
||||
"bold": true
|
||||
},
|
||||
"h1": {
|
||||
"block_prefix": "\n",
|
||||
"block_suffix": "\n"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "▌ "
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "┃ "
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "│ "
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "┆ "
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "┊ ",
|
||||
"bold": false
|
||||
},
|
||||
"text": {},
|
||||
"strikethrough": {
|
||||
"crossed_out": true
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"color": "208",
|
||||
"bold": true
|
||||
},
|
||||
"hr": {
|
||||
"format": "\n──────\n"
|
||||
},
|
||||
"item": {
|
||||
"block_prefix": "• "
|
||||
},
|
||||
"enumeration": {
|
||||
"block_prefix": ". "
|
||||
},
|
||||
"task": {
|
||||
"ticked": "[✓] ",
|
||||
"unticked": "[ ] "
|
||||
},
|
||||
"link": {
|
||||
"underline": true
|
||||
},
|
||||
"link_text": {
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"underline": true
|
||||
},
|
||||
"image_text": {
|
||||
"format": "Image: {{.text}}"
|
||||
},
|
||||
"code": {
|
||||
"prefix": " ",
|
||||
"suffix": " ",
|
||||
"bold": true
|
||||
},
|
||||
"code_block": {},
|
||||
"table": {},
|
||||
"definition_list": {},
|
||||
"definition_term": {},
|
||||
"definition_description": {
|
||||
"block_prefix": "\n🠶 "
|
||||
},
|
||||
"html_block": {},
|
||||
"html_span": {}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"document": {
|
||||
"margin": 2
|
||||
},
|
||||
"block_quote": {
|
||||
"indent": 1,
|
||||
"indent_token": "│ "
|
||||
},
|
||||
"paragraph": {},
|
||||
"list": {
|
||||
"level_indent": 2
|
||||
},
|
||||
"heading": {
|
||||
"block_suffix": "\n",
|
||||
"color": "212",
|
||||
"bold": true
|
||||
},
|
||||
"h1": {
|
||||
"block_prefix": "\n",
|
||||
"block_suffix": "\n"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "▌ "
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "┃ "
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "│ "
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "┆ "
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "┊ ",
|
||||
"bold": false
|
||||
},
|
||||
"text": {},
|
||||
"strikethrough": {
|
||||
"crossed_out": true
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"color": "212",
|
||||
"bold": true
|
||||
},
|
||||
"hr": {
|
||||
"format": "\n──────\n"
|
||||
},
|
||||
"item": {
|
||||
"block_prefix": "• "
|
||||
},
|
||||
"enumeration": {
|
||||
"block_prefix": ". "
|
||||
},
|
||||
"task": {
|
||||
"ticked": "[✓] ",
|
||||
"unticked": "[ ] "
|
||||
},
|
||||
"link": {
|
||||
"underline": true
|
||||
},
|
||||
"link_text": {
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"underline": true
|
||||
},
|
||||
"image_text": {
|
||||
"format": "Image: {{.text}}"
|
||||
},
|
||||
"code": {
|
||||
"prefix": " ",
|
||||
"suffix": " ",
|
||||
"bold": true
|
||||
},
|
||||
"code_block": {},
|
||||
"table": {},
|
||||
"definition_list": {},
|
||||
"definition_term": {},
|
||||
"definition_description": {
|
||||
"block_prefix": "\n🠶 "
|
||||
},
|
||||
"html_block": {},
|
||||
"html_span": {}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"document": {
|
||||
"margin": 2
|
||||
},
|
||||
"block_quote": {
|
||||
"indent": 1,
|
||||
"indent_token": "│ "
|
||||
},
|
||||
"paragraph": {},
|
||||
"list": {
|
||||
"level_indent": 2
|
||||
},
|
||||
"heading": {
|
||||
"block_suffix": "\n",
|
||||
"color": "165",
|
||||
"bold": true
|
||||
},
|
||||
"h1": {
|
||||
"block_prefix": "\n",
|
||||
"block_suffix": "\n"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "▌ "
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "┃ "
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "│ "
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "┆ "
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "┊ ",
|
||||
"bold": false
|
||||
},
|
||||
"text": {},
|
||||
"strikethrough": {
|
||||
"crossed_out": true
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"color": "165",
|
||||
"bold": true
|
||||
},
|
||||
"hr": {
|
||||
"format": "\n──────\n"
|
||||
},
|
||||
"item": {
|
||||
"block_prefix": "• "
|
||||
},
|
||||
"enumeration": {
|
||||
"block_prefix": ". "
|
||||
},
|
||||
"task": {
|
||||
"ticked": "[✓] ",
|
||||
"unticked": "[ ] "
|
||||
},
|
||||
"link": {
|
||||
"underline": true
|
||||
},
|
||||
"link_text": {
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"underline": true
|
||||
},
|
||||
"image_text": {
|
||||
"format": "Image: {{.text}}"
|
||||
},
|
||||
"code": {
|
||||
"prefix": " ",
|
||||
"suffix": " ",
|
||||
"bold": true
|
||||
},
|
||||
"code_block": {},
|
||||
"table": {},
|
||||
"definition_list": {},
|
||||
"definition_term": {},
|
||||
"definition_description": {
|
||||
"block_prefix": "\n🠶 "
|
||||
},
|
||||
"html_block": {},
|
||||
"html_span": {}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"document": {
|
||||
"margin": 2
|
||||
},
|
||||
"block_quote": {
|
||||
"indent": 1,
|
||||
"indent_token": "│ "
|
||||
},
|
||||
"paragraph": {},
|
||||
"list": {
|
||||
"level_indent": 2
|
||||
},
|
||||
"heading": {
|
||||
"block_suffix": "\n",
|
||||
"color": "203",
|
||||
"bold": true
|
||||
},
|
||||
"h1": {
|
||||
"block_prefix": "\n",
|
||||
"block_suffix": "\n"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "▌ "
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "┃ "
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "│ "
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "┆ "
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "┊ ",
|
||||
"bold": false
|
||||
},
|
||||
"text": {},
|
||||
"strikethrough": {
|
||||
"crossed_out": true
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"color": "203",
|
||||
"bold": true
|
||||
},
|
||||
"hr": {
|
||||
"format": "\n──────\n"
|
||||
},
|
||||
"item": {
|
||||
"block_prefix": "• "
|
||||
},
|
||||
"enumeration": {
|
||||
"block_prefix": ". "
|
||||
},
|
||||
"task": {
|
||||
"ticked": "[✓] ",
|
||||
"unticked": "[ ] "
|
||||
},
|
||||
"link": {
|
||||
"underline": true
|
||||
},
|
||||
"link_text": {
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"underline": true
|
||||
},
|
||||
"image_text": {
|
||||
"format": "Image: {{.text}}"
|
||||
},
|
||||
"code": {
|
||||
"prefix": " ",
|
||||
"suffix": " ",
|
||||
"bold": true
|
||||
},
|
||||
"code_block": {},
|
||||
"table": {},
|
||||
"definition_list": {},
|
||||
"definition_term": {},
|
||||
"definition_description": {
|
||||
"block_prefix": "\n🠶 "
|
||||
},
|
||||
"html_block": {},
|
||||
"html_span": {}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"document": {
|
||||
"margin": 2
|
||||
},
|
||||
"block_quote": {
|
||||
"indent": 1,
|
||||
"indent_token": "│ "
|
||||
},
|
||||
"paragraph": {},
|
||||
"list": {
|
||||
"level_indent": 2
|
||||
},
|
||||
"heading": {
|
||||
"block_suffix": "\n",
|
||||
"color": "104",
|
||||
"bold": true
|
||||
},
|
||||
"h1": {
|
||||
"block_prefix": "\n",
|
||||
"block_suffix": "\n"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "▌ "
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "┃ "
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "│ "
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "┆ "
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "┊ ",
|
||||
"bold": false
|
||||
},
|
||||
"text": {},
|
||||
"strikethrough": {
|
||||
"crossed_out": true
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"color": "104",
|
||||
"bold": true
|
||||
},
|
||||
"hr": {
|
||||
"format": "\n──────\n"
|
||||
},
|
||||
"item": {
|
||||
"block_prefix": "• "
|
||||
},
|
||||
"enumeration": {
|
||||
"block_prefix": ". "
|
||||
},
|
||||
"task": {
|
||||
"ticked": "[✓] ",
|
||||
"unticked": "[ ] "
|
||||
},
|
||||
"link": {
|
||||
"underline": true
|
||||
},
|
||||
"link_text": {
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"underline": true
|
||||
},
|
||||
"image_text": {
|
||||
"format": "Image: {{.text}}"
|
||||
},
|
||||
"code": {
|
||||
"prefix": " ",
|
||||
"suffix": " ",
|
||||
"bold": true
|
||||
},
|
||||
"code_block": {},
|
||||
"table": {},
|
||||
"definition_list": {},
|
||||
"definition_term": {},
|
||||
"definition_description": {
|
||||
"block_prefix": "\n🠶 "
|
||||
},
|
||||
"html_block": {},
|
||||
"html_span": {}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"document": {
|
||||
"margin": 2
|
||||
},
|
||||
"block_quote": {
|
||||
"indent": 1,
|
||||
"indent_token": "│ "
|
||||
},
|
||||
"paragraph": {},
|
||||
"list": {
|
||||
"level_indent": 2
|
||||
},
|
||||
"heading": {
|
||||
"block_suffix": "\n",
|
||||
"color": "44",
|
||||
"bold": true
|
||||
},
|
||||
"h1": {
|
||||
"block_prefix": "\n",
|
||||
"block_suffix": "\n"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "▌ "
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "┃ "
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "│ "
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "┆ "
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "┊ ",
|
||||
"bold": false
|
||||
},
|
||||
"text": {},
|
||||
"strikethrough": {
|
||||
"crossed_out": true
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"color": "44",
|
||||
"bold": true
|
||||
},
|
||||
"hr": {
|
||||
"format": "\n──────\n"
|
||||
},
|
||||
"item": {
|
||||
"block_prefix": "• "
|
||||
},
|
||||
"enumeration": {
|
||||
"block_prefix": ". "
|
||||
},
|
||||
"task": {
|
||||
"ticked": "[✓] ",
|
||||
"unticked": "[ ] "
|
||||
},
|
||||
"link": {
|
||||
"underline": true
|
||||
},
|
||||
"link_text": {
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"underline": true
|
||||
},
|
||||
"image_text": {
|
||||
"format": "Image: {{.text}}"
|
||||
},
|
||||
"code": {
|
||||
"prefix": " ",
|
||||
"suffix": " ",
|
||||
"bold": true
|
||||
},
|
||||
"code_block": {},
|
||||
"table": {},
|
||||
"definition_list": {},
|
||||
"definition_term": {},
|
||||
"definition_description": {
|
||||
"block_prefix": "\n🠶 "
|
||||
},
|
||||
"html_block": {},
|
||||
"html_span": {}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"document": {
|
||||
"margin": 2
|
||||
},
|
||||
"block_quote": {
|
||||
"indent": 1,
|
||||
"indent_token": "│ "
|
||||
},
|
||||
"paragraph": {},
|
||||
"list": {
|
||||
"level_indent": 2
|
||||
},
|
||||
"heading": {
|
||||
"block_suffix": "\n",
|
||||
"color": "220",
|
||||
"bold": true
|
||||
},
|
||||
"h1": {
|
||||
"block_prefix": "\n",
|
||||
"block_suffix": "\n"
|
||||
},
|
||||
"h2": {
|
||||
"prefix": "▌ "
|
||||
},
|
||||
"h3": {
|
||||
"prefix": "┃ "
|
||||
},
|
||||
"h4": {
|
||||
"prefix": "│ "
|
||||
},
|
||||
"h5": {
|
||||
"prefix": "┆ "
|
||||
},
|
||||
"h6": {
|
||||
"prefix": "┊ ",
|
||||
"bold": false
|
||||
},
|
||||
"text": {},
|
||||
"strikethrough": {
|
||||
"crossed_out": true
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"color": "220",
|
||||
"bold": true
|
||||
},
|
||||
"hr": {
|
||||
"format": "\n──────\n"
|
||||
},
|
||||
"item": {
|
||||
"block_prefix": "• "
|
||||
},
|
||||
"enumeration": {
|
||||
"block_prefix": ". "
|
||||
},
|
||||
"task": {
|
||||
"ticked": "[✓] ",
|
||||
"unticked": "[ ] "
|
||||
},
|
||||
"link": {
|
||||
"underline": true
|
||||
},
|
||||
"link_text": {
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"underline": true
|
||||
},
|
||||
"image_text": {
|
||||
"format": "Image: {{.text}}"
|
||||
},
|
||||
"code": {
|
||||
"prefix": " ",
|
||||
"suffix": " ",
|
||||
"bold": true
|
||||
},
|
||||
"code_block": {},
|
||||
"table": {},
|
||||
"definition_list": {},
|
||||
"definition_term": {},
|
||||
"definition_description": {
|
||||
"block_prefix": "\n🠶 "
|
||||
},
|
||||
"html_block": {},
|
||||
"html_span": {}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
get_config() {
|
||||
CHANGELOG_CONFIG_FILE="${changelog_CONFIG_FILE:-/etc/ublue-os/changelog.json}"
|
||||
QUERY="$1"
|
||||
FALLBACK="$2"
|
||||
shift
|
||||
shift
|
||||
OUTPUT="$(jq -r "$QUERY" "$CHANGELOG_CONFIG_FILE" 2>/dev/null || echo "$FALLBACK")"
|
||||
if [ "$OUTPUT" == "null" ] ; then
|
||||
echo "$FALLBACK"
|
||||
return
|
||||
fi
|
||||
echo "$OUTPUT"
|
||||
}
|
||||
|
||||
DEFAULT_THEME="$(get_config '."default-theme"' "slate")"
|
||||
TARGET_URL="$(get_config '."target-url"' "invalid")"
|
||||
JQ_EXPRESSION="$(get_config '."jq-expression"' ".body")"
|
||||
THEMES_DIRECTORY="$(get_config '."themes-directory"' "/usr/share/ublue-os/motd/themes")"
|
||||
|
||||
THEME=$(dconf read /org/gnome/desktop/interface/accent-color 2>/dev/null || echo -e "$DEFAULT_THEME")
|
||||
# Dconf will fail if the accent-color has not been changed yet
|
||||
if [ "$THEME" == "" ] ; then
|
||||
# Gsettings will not update if the system's schemas have not been configured properly
|
||||
THEME=$(gsettings get org.gnome.desktop.interface accent-color 2>/dev/null || echo -e "$DEFAULT_THEME")
|
||||
fi
|
||||
THEME=${THEME//\'/}
|
||||
THEME=${CHANGELOG_FORCE_THEME:-$THEME}
|
||||
|
||||
curl -s "$TARGET_URL" | \
|
||||
jq -r "$JQ_EXPRESSION" | \
|
||||
glow -s "${THEMES_DIRECTORY}/${THEME}.json" -w 78 - $@
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# set -x
|
||||
|
||||
escape() {
|
||||
sed 's/[&/\]/\\&/g' <<< "$1"
|
||||
}
|
||||
die() {
|
||||
echo "$@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
get_config() {
|
||||
MOTD_CONFIG_FILE="${MOTD_CONFIG_FILE:-/etc/ublue-os/motd.json}"
|
||||
QUERY="$1"
|
||||
FALLBACK="$2"
|
||||
shift
|
||||
shift
|
||||
OUTPUT="$(jq -r "$QUERY" "$MOTD_CONFIG_FILE" 2>/dev/null || echo "$FALLBACK")"
|
||||
if [ "$OUTPUT" == "null" ] ; then
|
||||
echo "$FALLBACK"
|
||||
return
|
||||
fi
|
||||
echo "$OUTPUT"
|
||||
}
|
||||
|
||||
# Put all the configuration-specific variables here so that we can define exactly what is going to be on the config easier by just reading this section
|
||||
TIP_DIRECTORY="$(get_config '."tips-directory"' "/usr/share/ublue-os/motd/tips")"
|
||||
CHECK_OUTDATED="$(get_config '."check-outdated"' "true")"
|
||||
IMAGE_INFO="$(get_config '."image-info-file"' "/usr/share/ublue-os/image-info.json")"
|
||||
DEFAULT_THEME="$(get_config '."default-theme"' "slate")"
|
||||
TEMPLATE_FILE="$(get_config '."template-file"' "/usr/share/ublue-os/motd/template.md")"
|
||||
THEMES_DIRECTORY="$(get_config '."themes-directory"' "/usr/share/ublue-os/motd/themes")"
|
||||
# HOOKS_DIRECTORY="$(get_config '."hooks-directory"' "/usr/share/ublue-os/motd/hooks.d")"
|
||||
[ ! -f "$TEMPLATE_FILE" ] && die "Failed reading template file"
|
||||
|
||||
if [ "$CHECK_OUTDATED" == "true" ] ; then
|
||||
IMAGE_DATE_SECONDS=$(rpm-ostree status --booted --json | jq -r '.deployments[].timestamp')
|
||||
CURRENT_SECONDS=$(date +%s)
|
||||
DIFFERENCE=$((CURRENT_SECONDS - IMAGE_DATE_SECONDS))
|
||||
ONE_MONTH=$((30 * 24 * 60 * 60))
|
||||
if [ "$DIFFERENCE" -ge "$ONE_MONTH" ]; then
|
||||
#shellcheck disable=2016
|
||||
TIP='# Your current image is over 1 month old, run `ujust update`'
|
||||
fi
|
||||
fi
|
||||
|
||||
TIP="${TIP:-"$(/usr/bin/cat "$TIP_DIRECTORY"/*.md 2>/dev/null | shuf -n 1)"}"
|
||||
TIP_ESCAPED=" $(escape "$TIP")"
|
||||
|
||||
KEY_WARN_FILE="/run/user-motd-sbkey-warn.md"
|
||||
[ -e $KEY_WARN_FILE ] && KEY_WARN="**WARNING**: $(cat $KEY_WARN_FILE)"
|
||||
KEY_WARN_ESCAPED=$(escape "$KEY_WARN")
|
||||
|
||||
THEME=$(dconf read /org/gnome/desktop/interface/accent-color 2>/dev/null || echo -e "$DEFAULT_THEME")
|
||||
# Dconf will fail if the accent-color has not been changed yet
|
||||
if [ "$THEME" == "" ] ; then
|
||||
# Gsettings will not update if the system's schemas have not been configured properly
|
||||
THEME=$(gsettings get org.gnome.desktop.interface accent-color 2>/dev/null || echo -e "$DEFAULT_THEME")
|
||||
fi
|
||||
THEME=${THEME//\'/}
|
||||
THEME=${MOTD_FORCE_THEME:-$THEME}
|
||||
|
||||
IMAGE_NAME_ESCAPED="$(escape "$(jq -r '."image-name"' "$IMAGE_INFO")")"
|
||||
IMAGE_TAG_ESCAPED="$(escape "$(jq -r '."image-tag"' "$IMAGE_INFO")")"
|
||||
|
||||
sed -e "s/%IMAGE_NAME%/$IMAGE_NAME_ESCAPED/g" \
|
||||
-e "s/%IMAGE_TAG%/$IMAGE_TAG_ESCAPED/g" \
|
||||
-e "s/%TIP%/$TIP_ESCAPED/g" \
|
||||
-e "s/%KEY_WARN%/$KEY_WARN_ESCAPED/g" \
|
||||
"$TEMPLATE_FILE" | tr '~' '\n' | /usr/bin/glow -s "${THEMES_DIRECTORY}/${THEME}.json" -w $(tput cols) -
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/fish
|
||||
#shellcheck disable=all
|
||||
|
||||
function fish_greeting
|
||||
if test -d "$HOME"
|
||||
if test ! -e "$HOME"/.config/no-show-user-motd
|
||||
if test -x "/usr/libexec/ublue-motd"
|
||||
/usr/libexec/ublue-motd
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if set -q fish_private_mode
|
||||
echo "fish is running in private mode, history will not be persisted."
|
||||
end
|
||||
end
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Prevent doublesourcing
|
||||
if [ -z "$USERMOTDSOURCED" ]; then
|
||||
USERMOTDSOURCED="Y"
|
||||
if test -d "$HOME"; then
|
||||
if test ! -e "$HOME"/.config/no-show-user-motd; then
|
||||
if test -x "/usr/libexec/ublue-motd"; then
|
||||
/usr/libexec/ublue-motd
|
||||
elif test -s "/etc/user-motd"; then
|
||||
cat /etc/user-motd
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
%global debug_package %{nil}
|
||||
|
||||
Name: ublue-motd
|
||||
Version: 0.2.6
|
||||
Release: 1%{?dist}
|
||||
Summary: MOTD scripts for Universal Blue images
|
||||
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ublue-os/packages
|
||||
VCS: {{{ git_dir_vcs }}}
|
||||
Source: {{{ git_dir_pack }}}
|
||||
|
||||
Requires: glow
|
||||
Requires: jq
|
||||
Requires: curl
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
MOTD and changelogs script for Universal Blue
|
||||
|
||||
%prep
|
||||
{{{ git_dir_setup_macro }}}
|
||||
|
||||
%install
|
||||
install -Dm0644 -t %{buildroot}%{_datadir}/ublue-os/motd/themes/ ./src/themes/*.json
|
||||
install -Dm0755 -t %{buildroot}%{_libexecdir}/ ./src/%{name}
|
||||
install -Dm0755 -t %{buildroot}%{_libexecdir}/ ./src/ublue-changelog
|
||||
install -Dm0755 ./src/vendor.sh %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
|
||||
install -Dm0755 ./src/vendor.fish %{buildroot}%{_datadir}/fish/vendor_conf.d/%{name}.fish
|
||||
|
||||
%files
|
||||
%{_libexecdir}/%{name}
|
||||
%{_libexecdir}/ublue-changelog
|
||||
%{_datadir}/ublue-os/motd/themes/*
|
||||
%{_sysconfdir}/profile.d/%{name}.sh
|
||||
%{_datadir}/fish/vendor_conf.d/%{name}.fish
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
// allow members of the wheel group to access gpg cards via pcscd service
|
||||
// this is needed for access to yubikey devices
|
||||
// installation details from https://github.com/drduh/YubiKey-Guide/issues/376
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.debian.pcsc-lite.access_card" &&
|
||||
subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.debian.pcsc-lite.access_pcsc" &&
|
||||
subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
|
|
@ -1 +0,0 @@
|
|||
%wheel ALL=(ALL) NOPASSWD: /usr/bin/bootc update, /usr/bin/bootc status, /usr/bin/bootc upgrade
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
Name: ublue-polkit-rules
|
||||
Version: 0.1.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Polkit rules for Universal Blue projects
|
||||
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ublue-os/packages
|
||||
VCS: {{{ git_dir_vcs }}}
|
||||
Source0: {{{ git_dir_pack }}}
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Polkit Rules for Universal Blue
|
||||
|
||||
%prep
|
||||
{{{ git_dir_setup_macro }}}
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
install -Dm0644 -t %{buildroot}%{_sysconfdir}/polkit-1/rules.d/ src/%{_sysconfdir}/polkit-1/rules.d/*.rules
|
||||
install -Dm0644 -t %{buildroot}%{_sysconfdir}/sudoers.d/ src/%{_sysconfdir}/sudoers.d/*
|
||||
|
||||
%check
|
||||
|
||||
%files
|
||||
%{_sysconfdir}/polkit-1/rules.d/*.rules
|
||||
%{_sysconfdir}/sudoers.d/001-bootc
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
get_config() {
|
||||
REBASE_HELPER_CONFIG_FILE="${REBASE_HELPER_CONFIG_FILE:-/etc/ublue-os/rebase_helper.json}"
|
||||
QUERY="$1"
|
||||
FALLBACK="$2"
|
||||
shift
|
||||
shift
|
||||
OUTPUT="$(jq -r "$QUERY" "$REBASE_HELPER_CONFIG_FILE" 2>/dev/null || echo "$FALLBACK")"
|
||||
if [ "$OUTPUT" == "null" ] ; then
|
||||
echo "$FALLBACK"
|
||||
return
|
||||
fi
|
||||
echo "$OUTPUT"
|
||||
}
|
||||
|
||||
DX_HELPER_ENABLED="$(get_config '."dx-helper-enabled"' "true")"
|
||||
IMAGE_BASE_NAME="$(get_config '."image-base-name"' "invalid-image-name")"
|
||||
|
||||
if [[ "$DX_HELPER_ENABLED" == 'false' || "$IMAGE_BASE_NAME" == "invalid-image-name" ]] ; then
|
||||
# FIXME: write this better
|
||||
cat <<EOF
|
||||
The DX helper is not enabled here, the image most likely has some reason why it is disabled, check their documentation.
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# FIXME: have a way to depend on ujust on the spec
|
||||
#shellcheck disable=1091
|
||||
source /usr/lib/ujust/ujust.sh
|
||||
|
||||
CURRENT_IMAGE=$(rpm-ostree status -b --json | jq -r '.deployments[0]."container-image-reference"')
|
||||
|
||||
if /bin/grep -q "\-dx\|\-gdx" <<< $CURRENT_IMAGE ; then
|
||||
CURRENT_STATE="enabled"
|
||||
else
|
||||
CURRENT_STATE="disabled"
|
||||
fi
|
||||
echo "Developer mode is currently ${CURRENT_STATE}"
|
||||
echo "Enable or Disable developer mode"
|
||||
OPTION=$(Choose Enable Disable)
|
||||
if [[ "${OPTION,,}" =~ ^enable ]]; then
|
||||
if [ "$CURRENT_STATE" = "enabled" ] ; then
|
||||
echo "You are already on a developer image"
|
||||
exit 0
|
||||
fi
|
||||
echo "Rebasing to a developer image"
|
||||
NEW_IMAGE=$(sed "s/$IMAGE_BASE_NAME/$IMAGE_BASE_NAME-dx/" <<< $CURRENT_IMAGE)
|
||||
if [ "$(jq -r '."image-tag"' /usr/share/ublue-os/image-info.json)" = "lts" ]; then
|
||||
rpm-ostree rebase $NEW_IMAGE && echo -e "\nReboot your computer to complete the installation"
|
||||
else
|
||||
rpm-ostree rebase $NEW_IMAGE && echo -e "\nUse \`ujust dx-group\` to add your user to the correct groups and complete the installation"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${OPTION,,}" =~ ^disable ]]; then
|
||||
if [ "$CURRENT_STATE" != "enabled" ]; then
|
||||
echo "You are not currently on a developer image"
|
||||
exit 0
|
||||
fi
|
||||
# Check if user is on a -gdx image
|
||||
if /bin/grep -q "\-gdx" <<< $CURRENT_IMAGE ; then
|
||||
echo "You are on a GDX image. Developer mode cannot be disabled for GDX images."
|
||||
exit 0
|
||||
fi
|
||||
echo "Rebasing to a non developer image"
|
||||
# Remove -dx suffix from image, specifies ":" to mark the end of the image name
|
||||
NEW_IMAGE=$(sed "s/\-dx//" <<< $CURRENT_IMAGE)
|
||||
rpm-ostree rebase $NEW_IMAGE
|
||||
fi
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Ublue Rebase Helper 2.0
|
||||
|
||||
get_config() {
|
||||
REBASE_HELPER_CONFIG_FILE="${REBASE_HELPER_CONFIG_FILE:-/etc/ublue-os/rebase_helper.json}"
|
||||
QUERY="$1"
|
||||
FALLBACK="$2"
|
||||
shift
|
||||
shift
|
||||
OUTPUT="$(jq -r -c "$QUERY" "$REBASE_HELPER_CONFIG_FILE" 2>/dev/null || echo "$FALLBACK")"
|
||||
if [ "$OUTPUT" == "null" ] ; then
|
||||
echo "$FALLBACK"
|
||||
return
|
||||
fi
|
||||
echo "$OUTPUT"
|
||||
}
|
||||
|
||||
#shellcheck disable=1091
|
||||
source /usr/lib/ujust/ujust.sh
|
||||
|
||||
IMAGE_INFO="${REBASE_HELPER_INFO_FILE:-/usr/share/ublue-os/image-info.json}"
|
||||
IMAGE_NAME=$(jq -r '."image-name"' < "$IMAGE_INFO")
|
||||
IMAGE_VENDOR=$(jq -r '."image-vendor"' < "$IMAGE_INFO")
|
||||
IMAGE_REGISTRY="ghcr.io/${IMAGE_VENDOR}"
|
||||
|
||||
IMAGE_DATE_SEPARATOR="$(get_config '."image-date-separator"' "-")"
|
||||
|
||||
# Image variant selection
|
||||
echo "Select your Bluefin image:"
|
||||
IMAGE_OPTIONS=(bluefin bluefin-dx cancel)
|
||||
CHOSEN_IMAGE="$(Choose "${IMAGE_OPTIONS[@]}")"
|
||||
[[ "$CHOSEN_IMAGE" == "cancel" ]] && exit 0
|
||||
|
||||
IMAGE_NAME="$CHOSEN_IMAGE"
|
||||
|
||||
# Define base channels
|
||||
AVAILABLE_TAGS=(lts stream10)
|
||||
|
||||
# Channel selection
|
||||
echo "Which base stream would you like to rebase to?"
|
||||
CHOSEN_BASE="$(Choose "${AVAILABLE_TAGS[@]}" cancel)"
|
||||
[[ "$CHOSEN_BASE" == "cancel" ]] && exit 0
|
||||
|
||||
# If lts, ask for lts-hwe option
|
||||
declare -a CHANNELS
|
||||
if [[ "$CHOSEN_BASE" == "lts" ]]; then
|
||||
CHANNELS=(lts lts-hwe)
|
||||
else
|
||||
CHANNELS=(stream10 stream10-hwe)
|
||||
fi
|
||||
|
||||
CHOSEN_TAG="$(Choose "${CHANNELS[@]}" cancel)"
|
||||
[[ "$CHOSEN_TAG" == "cancel" ]] && exit 0
|
||||
|
||||
# Tag selection flow
|
||||
if [[ "$CHOSEN_TAG" == lts || "$CHOSEN_TAG" == stream10 ]]; then
|
||||
echo "Do you want to select a specific tag for channel: $CHOSEN_TAG?"
|
||||
fetch_choice=$(Choose "no" "yes" cancel)
|
||||
[[ "$fetch_choice" == "cancel" ]] && exit 0
|
||||
|
||||
if [[ "$fetch_choice" == "yes" ]]; then
|
||||
echo "Fetching available tags for channel: $CHOSEN_TAG"
|
||||
|
||||
# Fetch all tags
|
||||
ALL_TAGS=$(skopeo list-tags "docker://${IMAGE_REGISTRY}/${IMAGE_NAME}" | jq -r '.Tags[]')
|
||||
|
||||
# Build available tag list for selection
|
||||
if [[ "$CHOSEN_TAG" == "lts" ]]; then
|
||||
mapfile -t valid_tags < <(echo "$ALL_TAGS" | grep -E "^lts$|^lts-amd64$|^lts-arm64$|^lts${IMAGE_DATE_SEPARATOR}[0-9]{8}$")
|
||||
elif [[ "$CHOSEN_TAG" == "stream10" ]]; then
|
||||
mapfile -t valid_tags < <(echo "$ALL_TAGS" | grep -E "^stream10$|^stream10\\.${IMAGE_DATE_SEPARATOR}?[0-9]{8}$")
|
||||
fi
|
||||
|
||||
# Prompt for tag selection
|
||||
echo "Select a tag to rebase to:"
|
||||
CHOSEN_TAG="$(Choose cancel "${valid_tags[@]}")"
|
||||
[[ "$CHOSEN_TAG" == "cancel" ]] && exit 0
|
||||
fi
|
||||
elif [[ "$CHOSEN_TAG" == stream10-hwe ]]; then
|
||||
echo "Fetching available tags for channel: $CHOSEN_TAG"
|
||||
|
||||
# Fetch all tags
|
||||
ALL_TAGS=$(skopeo list-tags "docker://${IMAGE_REGISTRY}/${IMAGE_NAME}" | jq -r '.Tags[]')
|
||||
|
||||
# Build available tag list for stream10-hwe selection
|
||||
mapfile -t valid_tags < <(echo "$ALL_TAGS" | grep -E "^stream10\\.[0-9]{8}-hwe$")
|
||||
|
||||
echo "Select a tag to rebase to:"
|
||||
CHOSEN_TAG="$(Choose cancel "${valid_tags[@]}")"
|
||||
[[ "$CHOSEN_TAG" == "cancel" ]] && exit 0
|
||||
fi
|
||||
|
||||
REBASE_TARGET="$IMAGE_REGISTRY/$IMAGE_NAME:$CHOSEN_TAG"
|
||||
|
||||
echo -e "\nRebase target is: $REBASE_TARGET"
|
||||
if [[ $(Confirm "Do you really wish to rebase?") -ne "0" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rpm-ostree rebase "ostree-image-signed:docker://${REBASE_TARGET}"
|
||||
exit 0
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
Name: ublue-rebase-helper
|
||||
Version: 0.1.1
|
||||
Release: 2%{?dist}
|
||||
Summary: Rebase helper for Universal Blue images
|
||||
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ublue-os/packages
|
||||
VCS: {{{ git_dir_vcs }}}
|
||||
Source0: {{{ git_dir_pack }}}
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Rebase helper script and develoepr edition script for Universal Blue images
|
||||
|
||||
%prep
|
||||
{{{ git_dir_setup_macro }}}
|
||||
|
||||
%install
|
||||
install -Dm0755 -t %{buildroot}%{_libexecdir} ./src/ublue-*-helper
|
||||
|
||||
%files
|
||||
%{_libexecdir}/ublue-*-helper
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
# DO NOT INCLUDE THIS ONE
|
||||
|
||||
# Check Just Syntax
|
||||
[group('Just')]
|
||||
check:
|
||||
#!/usr/bin/bash
|
||||
find . -type f -name "*.just" | while read -r file; do
|
||||
echo "Checking syntax: $file"
|
||||
just --unstable --fmt --check -f $file
|
||||
done
|
||||
echo "Checking syntax: Justfile"
|
||||
just --unstable --fmt --check -f Justfile
|
||||
|
||||
# Fix Just Syntax
|
||||
[group('Just')]
|
||||
fix:
|
||||
#!/usr/bin/bash
|
||||
find . -type f -name "*.just" | while read -r file; do
|
||||
echo "Checking syntax: $file"
|
||||
just --unstable --fmt -f $file
|
||||
done
|
||||
echo "Checking syntax: Justfile"
|
||||
just --unstable --fmt -f Justfile || { exit 1; }
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# vim: set ft=make :
|
||||
## Standardized verbs
|
||||
# configure- = configure something that is pre-installed on the image
|
||||
# install- = install something, no uninstall or configuration provided
|
||||
# setup- = install something and also provide configuration and/or uninstallation options
|
||||
# toggle- = turn something on/off, logic can be automatic or manual selection
|
||||
# fix- = apply fix/patch/workaround for something
|
||||
# foo = no verb is used for shortcuts or something deemed important enough to use a super memorable name
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# Install JetBrains Toolbox | https://www.jetbrains.com/toolbox-app/
|
||||
[group('Apps')]
|
||||
install-jetbrains-toolbox:
|
||||
#!/usr/bin/env bash
|
||||
pushd "$(mktemp -d)"
|
||||
echo "Get latest JetBrains Toolbox version"
|
||||
# Get the json with latest releases
|
||||
curl -sSfL -o releases.json "https://data.services.jetbrains.com/products/releases?code=TBA&latest=true&type=release"
|
||||
# Extract information
|
||||
BUILD_VERSION=$(jq -r '.TBA[0].build' ./releases.json)
|
||||
DOWNLOAD_LINK=$(jq -r '.TBA[0].downloads.linux.link' ./releases.json)
|
||||
CHECKSUM_LINK=$(jq -r '.TBA[0].downloads.linux.checksumLink' ./releases.json)
|
||||
echo "Installing JetBrains Toolbox ${BUILD_VERSION}"
|
||||
curl -sSfL -O "${DOWNLOAD_LINK}"
|
||||
curl -sSfL "${CHECKSUM_LINK}" | sha256sum -c
|
||||
tar zxf jetbrains-toolbox-"${BUILD_VERSION}".tar.gz
|
||||
echo "Launching JetBrains Toolbox"
|
||||
./jetbrains-toolbox-"${BUILD_VERSION}"/jetbrains-toolbox
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# Run a one minute system benchmark
|
||||
[group('System')]
|
||||
benchmark:
|
||||
#!/usr/bin/env bash
|
||||
echo 'Running a 1 minute benchmark ...'
|
||||
trap popd EXIT
|
||||
pushd $(mktemp -d)
|
||||
stress-ng --matrix 0 -t 1m --times
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
# alias for configure-vfio
|
||||
[group('System')]
|
||||
setup-vfio:
|
||||
@ujust configure-vfio
|
||||
|
||||
# Configure system to use vfio and kvmfr
|
||||
[group('System')]
|
||||
configure-vfio ACTION="":
|
||||
#!/usr/bin/bash
|
||||
source /usr/lib/ujust/ujust.sh
|
||||
CURRENT_IMAGE=$(rpm-ostree status -b --json | jq -r '.deployments[0]."container-image-reference"')
|
||||
if grep -q "dx" <<< $CURRENT_IMAGE ; then
|
||||
DEVMODE="enabled"
|
||||
else
|
||||
DEVMODE="disabled"
|
||||
fi
|
||||
if [ "$DEVMODE" == "disabled" ]; then
|
||||
echo "Please run "ujust devmode" first"
|
||||
exit 0
|
||||
fi
|
||||
OPTION={{ ACTION }}
|
||||
if [ "$OPTION" == "help" ]; then
|
||||
cat <<EOF
|
||||
Usage: ujust configure-vfio <option>
|
||||
<option>: Specify the quick option to skip the prompt
|
||||
Use 'vfio-on' to select Enable VFIO drivers
|
||||
Use 'vfio-off' to select Disable VFIO drivers
|
||||
Use 'kvmfr' to select Autocreate Looking-Glass shm
|
||||
EOF
|
||||
exit 0
|
||||
elif [ "$OPTION" == "" ]; then
|
||||
cat <<EOF
|
||||
${bold}VFIO and kvmfr Configuration${normal}
|
||||
This is only used for GPU passthrough of a secondary dGPU.
|
||||
It will enable vfio and configure kvmfr for use with $(Urllink "https://looking-glass.io" "Looking Glass")
|
||||
If you do not plan to use any of this then press ESC.
|
||||
${bold}NOTE:${normal} Since this is a niche use case, support will be ${b}very limited${n}
|
||||
EOF
|
||||
OPTION=$(Choose \
|
||||
"Enable VFIO drivers" \
|
||||
"Disable VFIO drivers" \
|
||||
"Enable kvmfr module" \
|
||||
)
|
||||
fi
|
||||
if [[ "${OPTION,,}" =~ (^enable[[:space:]]vfio|vfio-on) ]]; then
|
||||
echo "Enabling VFIO..."
|
||||
CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }')
|
||||
VENDOR_KARG="unset"
|
||||
echo 'add_drivers+=" vfio vfio_iommu_type1 vfio-pci "' | sudo tee /etc/dracut.conf.d/vfio.conf
|
||||
rpm-ostree initramfs --enable
|
||||
if [[ ${CPU_VENDOR} == "AuthenticAMD" ]]; then
|
||||
VENDOR_KARG="amd_iommu=on"
|
||||
elif [[ ${CPU_VENDOR} == "GenuineIntel" ]]; then
|
||||
VENDOR_KARG="intel_iommu=on"
|
||||
fi
|
||||
if [[ ${VENDOR_KARG} == "unset" ]]; then
|
||||
echo "Failed to get CPU vendor, exiting..."
|
||||
exit 1
|
||||
else
|
||||
rpm-ostree kargs \
|
||||
--append-if-missing="${VENDOR_KARG}" \
|
||||
--append-if-missing="iommu=pt" \
|
||||
--append-if-missing="rd.driver.pre=vfio_pci" \
|
||||
--append-if-missing="vfio_pci.disable_vga=1" \
|
||||
--append-if-missing="kvm.ignore_msrs=1" \
|
||||
--append-if-missing="kvm.report_ignored_msrs=0"
|
||||
echo "VFIO will be enabled on next boot, make sure you enable IOMMU, VT-d or AMD-v in your BIOS!"
|
||||
echo "Please understand that since this is such a niche use case, support will be very limited!"
|
||||
echo "To add your unused/second GPU device ids to the vfio driver by running"
|
||||
echo 'rpm-ostree kargs --append-if-missing="vfio-pci.ids=xxxx:yyyy,xxxx:yyzz"'
|
||||
echo "NOTE: Your second GPU will not be usable by the host after you do this!"
|
||||
fi
|
||||
elif [[ "${OPTION,,}" =~ (^disable[[:space:]]vfio|vfio-off) ]]; then
|
||||
echo ""
|
||||
echo "Make sure you have ${b}disabled autostart of all VMs using VFIO${n} before continuing!"
|
||||
CONFIRM=$(Choose Cancel Continue)
|
||||
if [ "$CONFIRM" == "Continue" ]; then
|
||||
echo "Disabling VFIO..."
|
||||
VFIO_IDS="$(rpm-ostree kargs | sed -E 's/.+(vfio_pci.ids=.+\s)/\1/' | awk '{ print $1 }' | grep vfio_pci.ids)"
|
||||
VFIO_IDS_KARG=""
|
||||
if [ -n "$VFIO_IDS" ]; then
|
||||
echo "Found VFIO ids in kargs, adding the below line to removal list"
|
||||
echo "$VFIO_IDS"
|
||||
VFIO_IDS_KARG="--delete-if-present=\"$VFIO_IDS\""
|
||||
fi
|
||||
echo "Removing dracut modules"
|
||||
sudo rm /etc/dracut.conf.d/vfio.conf
|
||||
rpm-ostree initramfs --enable
|
||||
rpm-ostree kargs \
|
||||
--delete-if-present="iommu=pt" \
|
||||
--delete-if-present="iommu=on" \
|
||||
--delete-if-present="amd_iommu=on" \
|
||||
--delete-if-present="intel_iommu=on" \
|
||||
--delete-if-present="rd.driver.pre=vfio_pci" \
|
||||
--delete-if-present="vfio_pci.disable_vga=1" \
|
||||
--delete-if-present="vfio_pci.disable_vga=0" \
|
||||
$VFIO_IDS_KARG
|
||||
fi
|
||||
elif [[ "${OPTION,,}" =~ kvmfr ]]; then
|
||||
sudo /usr/libexec/bluefin-dx-kvmfr-setup
|
||||
fi
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
%global debug_package %{nil}
|
||||
|
||||
Name: ublue-recipes
|
||||
Version: 0.1.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Shared Ujust recipes
|
||||
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ublue-os/packages
|
||||
VCS: {{{ git_dir_vcs }}}
|
||||
Source: {{{ git_dir_pack }}}
|
||||
|
||||
Recommends: glow
|
||||
Recommends: gum
|
||||
Requires: ublue-os-just
|
||||
|
||||
%description
|
||||
Shared ujust recipes for Universal Blue systems
|
||||
|
||||
%prep
|
||||
{{{ git_dir_setup_macro }}}
|
||||
|
||||
%build
|
||||
for file in src/recipes/*.just ; do
|
||||
cat <<EOF >> recipes.just
|
||||
|
||||
########################
|
||||
### $(basename $file)
|
||||
########################
|
||||
|
||||
EOF
|
||||
cat $file >> recipes.just
|
||||
done
|
||||
|
||||
%install
|
||||
install -Dm0644 -t %{buildroot}/%{_datadir}/ublue-os/recipes recipes.just
|
||||
|
||||
# Breaks the build on te CentOS default chroot on COPR, we need to enable EPEL
|
||||
# %check
|
||||
# just --unstable --fmt --check -f recipes.just
|
||||
|
||||
%files
|
||||
%{_datadir}/ublue-os/recipes/recipes.just
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
Loading…
Reference in a new issue