Skip to content

Created Fedora OSTree related entries #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 7z
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
syntax: bash
tags: [ compression ]
---
7z [Args] [archive.7z] [files / folders to archive]
Expand Down
6 changes: 6 additions & 0 deletions alias
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ alias ll='ls -l'

# To remove alias:
unalias ll

# Add permanent aliasses
# bash: ~/.bashrc
# fish: ~/.config/fish/config.fish


17 changes: 17 additions & 0 deletions balooctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
tags: [ system ]
---

# Control the Baloo file indexer

# Help:
balooctl -h

# Deactivate it:
balooctl disable

# Clean the database
balooctl purge

# See status
balooctl status
20 changes: 20 additions & 0 deletions copr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
syntax: bash
tags: [ packaging ]
---
# https://copr.fedorainfracloud.org

# - - - Workstation - - -

sudo dnf copr enable <CREATOR>/<NAME>


# - - - Immutable variants - - -
# (Silverblue, Kinoite,...)

# manually:
# go to the site and copy the link to the .repo file fitting your version
wget https://copr.fedorainfracloud.org/coprs/<CREATOR>/<NAME>/repo/fedora-<VERSION>/reponame.repo -p /etc/yum.repos.d/

# automatically:
https://github.com/trytomakeyouprivate/COPR-command
10 changes: 10 additions & 0 deletions gocryptfs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
tags: [ security ]
syntax: bash
---

# Help
gocryptfs -h

# Long Help
gocryptfs -hh
15 changes: 15 additions & 0 deletions ostree
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
syntax: bash
tags: [ packaging ]
---
# Fix current system image to not get deleted
sudo ostree admin pin 0

# Remove unpinned deployments (versions)
sudo ostree admin cleanup

# Short info about deployments
sudo ostree admin status

# Upgrade your system
sudo ostree admin upgrade
34 changes: 34 additions & 0 deletions polkit
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
tags: [ security ]
---

# Authorization API for unprivileged programs ("Subjects") to access privileged Programs ("Mechanisms")
# polkitd is the system daemon

# see "man polkit" for details

# user created rules go to /etc/polkit-1/rules.d/
# after changing any of the directories all rules are reloaded

# example rule, allowing users in group "admin" to change users

polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.accounts.user-administration" &&
subject.isInGroup("admin")) {
return polkit.Result.YES;
}
});

# naming and preferences:
1. Rules in /etc/polkit-1/rules.d/ are favored over /usr/share/polkit-1/rules.d/
2. Lower numbers in the rule name are favored over higher numbers or no numbers

# example name: 50-libvirt.rules

# Polkit rule types:

addRule()
# whenever a program wants authorization, custom rules can skip that

addAdminRule()
# Whenever administrator authentification is required
62 changes: 62 additions & 0 deletions rpm-ostree
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
syntax: bash
tags: [ packaging ]
---
# - - - - Infos - - - - -

# View the current status
rpm-ostree status

# Short version
ostree admin status

# - - - - Updating - - - -

# Upgrade your system
rpm-ostree update

# Upgrade your system without reboot (not as stable)
rpm-ostree update apply-live

# Rebase your system image (new version, completely different System)
rpm-ostree rebase <URL-to-system>:<VERSION-NUMBER>

# - - - Install and remove apps - - -

# Update your system and install an app
rpm-ostree update install <APPNAME>

# Install an app without reboot
rpm-ostree install --apply-live <APPNAME>

# Remove a layered app
rpm-ostree update remove <APPNAME>

# Uninstall an app included in the system
rpm-ostree update override --remove <APPNAME>

# Reinstall an app (restore its original state)
rpm-ostree install --allow-inactive <APPNAME>

# - - - - Stop and reverse - - - -

# Cancel a running process
rpm-ostree cancel

# Delete currently waiting deployment(s)
rpm-ostree cleanup

# - - - - Advanced modifications - - - -

# Add a COPR repo
sudo wget <https://site-to-repofile.repo> -p /etc/yum.repos.d/

# Replace a local package example (HTTP or local file paths, COPR not yet supported)
rpm-ostree update override --replace https://objstore.int.example.com/hotfixes/kernel.rpm

# Edit Kernel arguments in an Editor
rpm-ostree update kargs --editor

# Edit kargs if missing
rpm-ostree update kargs --append-if-missing

21 changes: 21 additions & 0 deletions sddm2rpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
syntax: bash
tags: [ packaging ]
---
# Converting a SDDM theme into a layerable RPM for Image-based systems
# like Fedora Silverblue/Kinoite or OpenSUSE microOS

#Usage:
sddm2rpm [OPTIONS] <source> [dest]

#Arguments:
<source> path to sddm archive
[dest] directory to unpack too

#Options:
--pkg-version <VERSION> version of package, defaults to 1.0.0
--license <LICENSE> license of package, defaults to GPLv3
-s, --output-spec output spec file
--url <URL> upstream url for rpm
-h, --help Print help
-V, --version Print version
7 changes: 5 additions & 2 deletions selinux
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
tags: [ security ]
---

## selinux standard
## SELinux standard

# On manual install: activate it (Debian-based)
selinux-activate

# To get the status of selinux
getenforce
Expand All @@ -11,7 +14,7 @@ sestatus
# or from the file
cat /etc/selinux/config

# To set the status to permissive
# To set the status to permissive (best way to deactivate)
setenforce 0

# To get the context of files/processes/ports/users
Expand Down
8 changes: 8 additions & 0 deletions sudo
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
---
syntax: bash
tags: [ system ]
---

# Preserve user environment when running command
sudo -E <cmd>

# Enter root shell (better method than su)
sudo -i