diff --git a/.vscode/settings.json b/.vscode/settings.json index 56b9931..0a4a5e1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -308,6 +308,7 @@ "wodle", "xattr", "xkcd", + "yellowdog", "yubikey", "zstd" ] diff --git a/README.md b/README.md index 13b5cef..15788b4 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ This commonly applies to telecommunication, computer networks, and computer hard In short, my private collection of notes and scripts. I use them to ease my tech life. -## Table of contents - 1. [License](#license) 1. [Status](#status) 1. [Support](#support) @@ -37,7 +35,8 @@ I might accept suggestions, though. Use the repository's hosting platform's tool - [myshittycode.com] diff --git a/knowledge base/dnf.md b/knowledge base/dnf.md index cf42115..5ff8b60 100644 --- a/knowledge base/dnf.md +++ b/knowledge base/dnf.md @@ -1,5 +1,9 @@ # DNF +A.K.A. _Dandified YUM_. + +Rewrite of [YUM] using [`libsolv`][libsolv]. + 1. [TL;DR](#tldr) 1. [Lock packages versions](#lock-packages-versions) 1. [Further readings](#further-readings) @@ -166,10 +170,13 @@ Not to mention, - [How to lock kernel (or another package) on Fedora] - + +[yum]: yum.md + [dnf command reference]: https://dnf.readthedocs.io/en/latest/command_ref.html [dnf configuration reference]: https://dnf.readthedocs.io/en/latest/conf_ref.html @@ -180,4 +187,5 @@ Not to mention, [how to install only security and bugfixes updates with dnf]: https://fedoramagazine.org/how-to-install-only-security-and-bugfixes-updates-with-dnf/ [how to lock kernel (or another package) on fedora]: https://robbinespu.gitlab.io/posts/locking-package-fedora/ [how to use yum/dnf to downgrade or rollback some package updates?]: https://access.redhat.com/solutions/29617 +[libsolv]: https://github.com/openSUSE/libsolv [man page]: https://man7.org/linux/man-pages/man8/dnf.8.html diff --git a/knowledge base/yum.md b/knowledge base/yum.md new file mode 100644 index 0000000..0d78edf --- /dev/null +++ b/knowledge base/yum.md @@ -0,0 +1,64 @@ +# Yellowdog Updater Modified + +Command-line utility for RPM used by Red Hat Linux and derivates.
+Replaced by [DNF] in Fedora. + +1. [TL;DR](#tldr) +1. [Further readings](#further-readings) + 1. [Sources](#sources) + +## TL;DR + +Global configuration file at `/etc/yum/yum.conf`.
+Repositories `.repo` files reside under `/etc/yum.repos.d/`.
+Configuration files use the INI format. **Some** options in the repository definition override the global settings for +YUM. + +
+ Usage + +```sh +# Check for updates. +sudo yum check-update + +# List available packages. +sudo yum --showduplicates list available 'gitlab-ee' + +# Display information about packages. +sudo yum info 'gitlab-ee' + +# Install packages. +sudo yum install 'buildah' 'jq-0.5.6-1.fc24' +sudo yum -y install 'Downloads/tito-0.6.2-1.fc22.noarch.rpm' --setopt='install_weak_deps=False' +sudo yum install 'https://kojipkgs.fedoraproject.org/packages/tito/0.6.0/1.fc22/noarch/tito-0.6.0-1.fc22.noarch.rpm' + +# Upgrade packages. +sudo yum update 'gitlab-ee-16.11.3' + +# Clear the cache. +sudo yum clean packages +sudo yum clean all +``` + +
+ +## Further readings + +- [DNF] + +### Sources + +- [What is yum and how do I use it?] +- [Yum Command Cheat Sheet for Red Hat Enterprise Linux] + + + + +[dnf]: dnf.md + + +[what is yum and how do i use it?]: https://access.redhat.com/solutions/9934 +[yum command cheat sheet for red hat enterprise linux]: https://access.redhat.com/articles/yum-cheat-sheet diff --git a/snippets/gitlab.package.sh b/snippets/gitlab.package.sh index db1d6f7..f1eccbf 100644 --- a/snippets/gitlab.package.sh +++ b/snippets/gitlab.package.sh @@ -86,13 +86,15 @@ gitlab-rails runner ' sudo yum check-update sudo yum info 'gitlab-ee' # informational sudo rpm -qa | grep 'gitlab-ee' # informational +sudo yum --showduplicates list available 'gitlab-ee' sudo gitlab-backup create # not strictly necessary: the upgrade will create a partial one tmux new-session -A -s 'gitlab-upgrade' "sudo yum update 'gitlab-ee'" +tmux new-session -A -s 'gitlab-upgrade' "sudo yum update 'gitlab-ee-16.11.3'" sudo gitlab-rake 'gitlab:check' # Password reset sudo gitlab-rake 'gitlab:password:reset[root]' -sudo gitlab-rails console \ +sudo gitlab-rails console # --> user = User.find_by_username 'root' # --> user.password = 'QwerTy184' # --> user.password_confirmation = 'QwerTy184'