Skip to content

Commit

Permalink
xbps/<various>,config/{locales,external-applications}: Multiple changes.
Browse files Browse the repository at this point in the history
* Move `packages/*` up a level, remove `packages` subdir.
* Consolidate information.
* Remove `building.md` ,`management.md`, `packages/index.md`.
* Add links to man.voidlinux.org.
* Remove unnecessary `xbps-install` code block.
* Shorten `xlocate` example.
* Add example of how to list installed packages.
* Fix links in config/{locales,external-applications}.md.
* Improve prose.
  • Loading branch information
flexibeast authored and ericonr committed Jun 25, 2020
1 parent cabaa05 commit 717f6e9
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 107 deletions.
7 changes: 2 additions & 5 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@
- [Microcode](./config/microcode.md)
- [XBPS Package Manager](./xbps/index.md)
- [Updating](./xbps/updating.md)
- [Packages](./xbps/packages/index.md)
- [General](./xbps/packages/management.md)
- [Downgrading](./xbps/packages/downgrading.md)
- [Building](./xbps/packages/building.md)
- [Finding Files](./xbps/packages/files.md)
- [Downgrading](./xbps/downgrading.md)
- [Finding Files and Packages](./xbps/files-and-packages.md)
- [Repositories](./xbps/repositories/index.md)
- [Official Repositories](./xbps/repositories/official/index.md)
- [Installing Repositories](./xbps/repositories/official/installing.md)
Expand Down
4 changes: 2 additions & 2 deletions src/config/external-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ The Void build system runs on x86_64 servers, both for compiling and cross
compiling packages. However, some packages (e.g. `libreoffice`) do not support
cross-compilation. These packages have to be built locally on a computer running
the same architecture and libc as the system on which the package is to be used.
For building packages, see the [building
instructions](../xbps/packages/building.md).
To learn how to build packages, refer to [the README for the void-packages
repository](https://github.com/void-linux/void-packages/blob/master/README.md).

## Flatpak

Expand Down
6 changes: 3 additions & 3 deletions src/config/locales.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ $ locale -a
## Enabling locales

To enable a certain locale, un-comment or add the relevant lines in
`/etc/default/libc-locales` and [reconfigure](../xbps/packages/management.md)
the `glibc-locales` package.
`/etc/default/libc-locales` and [reconfigure](../xbps/index.md) the
`glibc-locales` package.

## Setting the system locale

Expand All @@ -19,6 +19,6 @@ Set `LANG=xxxx` in `/etc/locale.conf`.
## Application locale

Some programs have their translations in a separate package that must be
installed in order to use them. You can [search](../xbps/packages/management.md)
installed in order to use them. You can [search](../xbps/files-and-packages.md)
for the desired language (e.g. "german" or "portuguese") in the package
repositories and install the packages relevant to the applications you use.
6 changes: 4 additions & 2 deletions src/xbps/packages/downgrading.md → src/xbps/downgrading.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Downgrading to a specific package version
# Downgrading

XBPS allows you to downgrade a package to a specific package version.

## Via xdowngrade

The easiest way to downgrade is to use `xdowngrade` from the `xtools` package,
specifying the package version you wish to downgrade to:
specifying the package version to which you wish to downgrade:

```
# xdowngrade /var/cache/xbps/pkg-1.0_1.xbps
Expand Down
35 changes: 35 additions & 0 deletions src/xbps/files-and-packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Finding Files and Packages

The `xtools` package contains the
[xlocate(1)](https://man.voidlinux.org/xlocate.1) utility. `xlocate` works like
[locate(1)](https://man.voidlinux.org/locate.1), but for files in the Void
package repositories:

```
$ xlocate -S
Fetching objects: 11688, done.
From https://alpha.de.repo.voidlinux.org/xlocate/xlocate
+ e122c3634...a2659176f master -> master (forced update)
$ xlocate xlocate
xtools-0.59_1 /usr/bin/xlocate
xtools-0.59_1 /usr/share/man/man1/xlocate.1 -> /usr/share/man/man1/xtools.1
```

It is also possible to use
[xbps-query(1)](https://man.voidlinux.org/xbps-query.1) to find files, though
this is strongly discouraged:

```
$ xbps-query -Ro /usr/bin/xlocate
xtools-0.46_1: /usr/bin/xlocate (regular file)
```

This requires `xbps-query` to download parts of every package to find the file.
`xlocate`, however, queries a locally cached index of all files, so no network
access is required.

To get a list of all installed packages, without their version:

```
$ xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname | fmt
```
34 changes: 31 additions & 3 deletions src/xbps/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# XBPS Package Manager

The X Binary Package System (XBPS) is a package manager designed that was
designed implemented from scratch and is extremely fast. XBPS is managed by the
void-linux team and developed at <https://github.com/void-linux/xbps>.
The X Binary Package System (XBPS) is a fast package manager that has been
designed and implemented from scratch. XBPS is managed by the Void Linux team
and developed at <https://github.com/void-linux/xbps>.

Most general package management is done with the following commands:

- [xbps-query(1)](https://man.voidlinux.org/xbps-query.1) searches for and
displays information about packages installed locally, or, if used with the
`-R` flag, packages contained in repositories.
- [xbps-install(1)](https://man.voidlinux.org/xbps-install.1) installs and
updates packages, and syncs repository indexes.
- [xbps-remove(1)](https://man.voidlinux.org/xbps-remove.1) removes installed
packages, and can also remove orphaned packages and cached package files.
- [xbps-reconfigure(1)](https://man.voidlinux.org/xbps-reconfigure.1) runs the
configuration steps for installed packages, and can be used to reconfigure
certain packages after changes in their configuration files. The latter
usually requires the `--force` flag.
- [xbps-alternatives(1)](https://man.voidlinux.org/xbps-alternatives.1) lists or
sets the alternatives provided by installed packages. Alternatives is a
system which allows multiple packages to provide common functionality through
otherwise conflicting files, by creating symlinks from the common paths to
package-specific versions that are selected by the user.
- [xbps-pkgdb(1)](https://man.voidlinux.org/xbps-pkgdb.1) can report and fix
issues in the package database, as well as modify it.

Most questions can be answered by consulting the man pages for these tools,
together with the [xbps.d(5)](https://man.voidlinux.org/xbps.d.5) man page.

To learn how to build packages from source, refer to [the README for the
void-packages
repository](https://github.com/void-linux/void-packages/blob/master/README.md).
6 changes: 0 additions & 6 deletions src/xbps/packages/building.md

This file was deleted.

30 changes: 0 additions & 30 deletions src/xbps/packages/files.md

This file was deleted.

6 changes: 0 additions & 6 deletions src/xbps/packages/index.md

This file was deleted.

27 changes: 0 additions & 27 deletions src/xbps/packages/management.md

This file was deleted.

36 changes: 13 additions & 23 deletions src/xbps/updating.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,37 @@
# Updating

Like any other system it is important to keep Void Linux up to date.

In general Void should be updated with an XBPS invocation:
Like any other system, it is important to keep Void up-to-date. Use
[xbps-install(1)](https://man.voidlinux.org/xbps-install.1) to update:

```
# xbps-install -Su
```

> Note: XBPS must use a separate transaction to update itself. If your first
> update includes the package `xbps`, you will need to run an additional update
> for the rest of the system.
XBPS must use a separate transaction to update itself. If your update includes
the `xbps` package, you will need to run the above command a second time to
apply the rest of the updates.

## Restarting services
## Restarting Services

If you are installing Void in production or otherwise have long lived services,
its important to note that XBPS does not restart services when they are updated.
This task is left to the administrator so they can orchestrate maintenance
windows, ensure reasonable backup capacity, and generally be present for service
upgrades.
XBPS does not restart services when they are updated. This task is left to the
administrator, so they can orchestrate maintenance windows, ensure reasonable
backup capacity, and generally be present for service upgrades.

To find processes running different versions than are present on disk, use the
`xcheckrestart` tool provided by the `xtools` package:

```
# xbps-install -S xtools
```

```
$ xcheckrestart
11339 /opt/google/chrome/chrome (deleted) (google-chrome)
```

`xcheckrestart` will print out the PID, path to the executable, status of the
path that was launched (almost always deleted) and the process name.
path that was launched (almost always `deleted`) and the process name.

`xcheckrestart` can and should be run as an unprivileged user.

## Kernel Panic After Update

Your system likely ran out of space in `/boot`. XBPS installs kernels and
requests that hooks such as DKMS and Dracut be run, but it doesn't remove
kernels that are obsolete. This is left as a task for the administrator to
permit the retention of obsolete but still booted or known working kernels.

Remove kernels with [vkpurge(8)](https://man.voidlinux.org/vkpurge.8).
If you get a kernel panic after an update, it is likely your system ran out of
space in `/boot`. Refer to "[Removing old
kernels](../config/kernel.md#removing-old-kernels)" for further information.

0 comments on commit 717f6e9

Please sign in to comment.