Nonfree repo void linux

Void Linux. Управление пакетами. Система XBPS: работа с репозиториями

Как говорилось в предыдущем очерке, утилиты системы XBPS будут рассмотрены здесь не последовательно (это можно увидеть в их официальных man-страницах), а применительно к конкретным задачам. Из которых первейшая — это знакомство с доступными репозиториями и, при необходимости, их подключение. Для чего потребуются команды xbps-query и xbps-install .

Первое действие, которое следует выполнить — это синхронизация локальных сведений о репозитории с таковыми на сервере. Для чего используется опция -S команды xbps-install . Запомним эту опцию и доведём её использование до уровня рефлексов собаки Павлова. Дистрибутив Void разрабатывается по модели «скользящих релизов» (rolling release), обновления того или иного масштаба в нём происходят буквально каждый день (и это не преувеличение), и потому синхронизация необходима при любых реальных манипуляциях с пакетами. По той же причине её резонно совместить с обновлением системы, для чего предназначена опция -u . И в итоге команда приобретает такой вид:

Разумеется, для этого необходимы права администратора, полученные одной из двух предназначенных для этого команд — su или sudo , что и символизируется в примере видом приглашения командной строки — # . В дальнейшем это не будет оговариваться каждый раз, а примерах команд, для которых достаточно прав обычного пользователя, будет использоваться приглашение вида $ .

И ещё. В приведённую команду (и аналогичные) часто добавляют опцию y , означющую согласие на выполнение действий, без введения y в явном виде. Это — дело вкуса, осторожности и любопытства: мне, например, всегда интересно, чего это такое у меня в системе обновится. Поэтому я её использую редко, и обычно только при установке единичных пакетов, от которых не приходится ждать неожиданностей (пример чему приведён в интермедии).

Так или иначе, но теперь можно смотреть, откуда же у нас всё обновлялось. Для чего делается запрос с использованием опции -L :

Описание главной ветки официального репозитория содержится в файле /usr/share/xbps.d/00-repository-main.conf и представлено одной строкой:

Точно в таком формате будут описываться и любые дополнительные репозитории. Или — зеркала репозитория главного, о которых говорилось в прошлом очерке. Для выявления самого быстрого из которых можно пропинговать их все последовательно, начиная с умолчального:

Затем — его германский двойник:

И, наконец, «парижанин»:

Можно видеть, что в моих условиях (подчёркиваю — в моих, в другом месте результаты могут быть иными) лучше всего показывается себя repo3.voidlinux.eu , правда, выигрывая у умолчального репозитория лишь по результату фотофиниша, парижское зеркало немного, но заметно отстаёт от них обоих, а скорость доступа на «заокранный запад» медленней примерно в три раза (что и не удивительно: чай, до Америки путь не близкий).

Отредактировав файл /usr/share/xbps.d/00-repository-main.conf , можно проверить результат:

А затем нужно обязательно повторить процедуру синхронизации:

После чего можно (если нужно) заняться подключением дополнителных репозиториев. Это делается точно так же, как установка обычных пакетов, имена которых выявляются такой командой:

Здесь опция -R определяет, что запрос делается к удалённым репозиториям (а не к локальной машине), а опция указывает, что аргументом команды является шаблон имени пакета, а не точное его имя.

Далее следует команда установки, например, такая:

Результатом её будет появление в каталоге /usr/share/xbps.d/ файла 10-repository-nonfree.conf , содержимое которого также сводится к одной строке:

Аналогично можно поступить и с субрепозиторием void-repo-multilib-nonfree-5_1 — он жизненно необходим всем любителям Skype, о чём говорится в соответствующей интермедии.

Оставьте комментарий Отменить ответ

Для отправки комментария вам необходимо авторизоваться.

Источник

Introduction

Void Linux’ package manager is called xbps. Like all package managers, xbps uses repositories (repos) to obtain packages. Like most package managers, xpbs uses different repos for different classes of packages. These class repos are called subrepos. For instance, there’s a separate subrepo for nonfree software, and another special subrepo for debug packages. Like all major distro package managers, xbps has repo mirrors in different part of the world in order to get packages to the users with as little Internet usage and delay as possible.

Читайте также:  C windows system32 msdtcprx dll

The last decision you make is which mirror. You decide on your subrepos before that.

glibc vs musl

glibc and musl are two different C/POSIX standard library implementations for Linux. The remainder of this document calls them «standard C libraries». The traditional standard C library for Linux is glibc, which is an excellent choice. But in some situations, musl is what you want. If you want a more permissive license, musl uses the permissive MIT license rather than the LGPL2.1 with exceptions. Also, musl produces smaller static executables. A detailed comparison can be found at http://www.etalabs.net/compare_libcs.html. I don’t understand most of that document, which is why I personally default to glibc.

Most of the Linux world uses glibc, so most precompiled Linux binaries expect glibc.

Void Linux can be compiled with either glibc or musl. It has packages for each. If you don’t have an opinion, or you don’t fully understand why you’d choose one standard C library over the other, glibc is your best choice because it’s used by a significant majority of Linux installations. If you need musl you’ll know it, and Void Linux is one of the few that builds with musl.

When dealing with packages and repositories, the very first question is «glibc or musl?» Those are your two main repos, so once you’ve chosen one, you go on to select mirrors and subrepos from there.

This Document Doesn’t Cover musl, But.

This document doesn’t specifically cover musl, but musl users can simply extrapolate the info for glibc to accomplish the same tasks with musl.

Mirrors, Repos and Subrepos

A few definitions now prevent misunderstanding later. A package consists of one .xbps file and associated .sig file, which together are used to install a particular piece or group of software on a Void Linux computer.

A repo , short for repository , is the set of packages comprising a generic Void Linux installation on a particular compiler architecture (glibc or musl). The word can also refer to the standard directory on the Internet containing those packages. The standard Void repo for glibc is https://repo.voidlinux.eu/current/, and the standard Void repo for a musl compiled system is https://repo.voidlinux.eu/current/musl/

A mirror is a copy of the standard repo. As of 11/29/2017, https://repo.voidlinux.eu/current has working mirrors at:

  • https://repo.voidlinux.eu/current/ (Germany)
  • http://repo3.voidlinux.eu/current/ (Los Angeles)
  • http://repo4.voidlinux.eu/current/ (Paris)
  • https://mirror.clarkson.edu/voidlinux/current/ (Pottsdam, New York)
  • https://lug.utdallas.edu/mirror/void/current/ (Dallas, Texas, US)

The musl architecture has its own set of mirrors. A reasonably up to date list of mirrors is kept at https://wiki.voidlinux.eu/XBPS#Official_Repositories

A subrepo is a directory containing packages for special software: Typically either debug, nonfree, multiarch, and multiarch-nonfree. Subrepo mirrors can usually be found as a subdirectory inside the directory for the repo. For instance, the nonfree subrepo at the https://lug.utdallas.edu/mirror/void/current mirror has URL https://lug.utdallas.edu/mirror/void/current/nonfree/.

Occasionally the terms repo , subrepo and mirror are interchanged a little too freely in documentation, including this documentation, so you need to understand in the face of minor ambiguity. Don’t take these exact terms too literally.

Where to Find Mirrors

Void’s official list of mirrors is kept at:

The Two Mirror Directories On Your Void Computer

Your Void Linux machine has two directories in which XBPS repo mirrors and subrepo mirrors are specified:

  • /usr/share/xbps.d , the «do not touch» directory.
  • /etc/xbps.d , the «override» directory.

The contents of /usr/share/xbps.d should be determined solely by the package manager, so do not modify them with a text editor.

If you want to change the location of a repo or subrepo, simply copy that repo or subrepo’s file from /usr/share/xbps.d to /etc/xbps.d , and edit the copy in /etc/xbps.d .

Читайте также:  Canon canoscan lide 25 драйвер для windows 10 64 bit не устанавливается

Specifying your Main Repo

A properly installed Void Linux contains a /usr/share/xbps.d/00-repository-main.conf that points to https://repo.voidlinux.eu/current (or https://repo.voidlinux.eu/current/musl if you’re using musl).

If /usr/share/xbps.d/00-repository-main.conf doesn’t exist, create it containing the following line of content (assuming you’re using glibc):

https://repo.voidlinux.eu/current is great if you live in Europe, but bad news on other continents. So I copied my /usr/share/xbps.d/00-repository-main.conf to /etc/xbps.d/00-repository-main.conf , and changed its contents to the following:

All these repo files like /etc/xbps.d/00-repository-main.conf recognize a poundsign ( # ) as a comment, so it’s often easier to comment out the current content, copy it to another line, uncomment that line, and change it as appropriate. This also gives you a history of the various repos you’ve used: A handy troubleshooting advantage when trying to figure out an XBPS problem.

When you need a list of repos, you can get a fairly up to date one at the following URL:

Special Subrepo List Command

Nothing in this section pertains to mirrors. A subrepo is a conceptual collection of package files. A mirror is an actual host/path containing those package files. One subrepo can be represented by many mirrors worldwide.

Someone not a daily Void administrator doesn’t, and shouldn’t be expected to, know the names of all the subrepos. Luckily, those names are discoverable using the following easy command:

The following is an example of the output of the preceding command:

In the preceding output, the four current Void Project sponsored subrepos are listed. None is installed: If it were, there would be an asterisk between the square brackets instead of a dash.

The Special Repo Mirror Content Listing Command:

The following command produces a listing of all packages in the Void debug repository at Clarkson University:

xbps-query [OPTIONS] MODE [ARGUMENTS] , in that order, is specified by the xbps-query man page. The -i and -M and —repository=* are options. The -s is the MODE, and the » is an argument. A breakdown of this command follows:

  • xbps-query is the program being run.
  • -i is an option telling the program to ignore repositories defined in configuration files.
  • -M is an option telling the program to fetch and store in memory info from a specific repository.
  • —repository=https://mirror.clarkson.edu/voidlinux/current/debug is an option identifying the URL of the repository; specifically, the Void current debug mirror at Clarkson University in Pottsdam New York.
  • -s is the mode designation; specifically, search mode.
  • » is the argument; specifically, and empty string that in this context means «match anything». Indeed, using ‘*’ yields identical results.

If this special command gives no output, chances are you’ve pointed to a URL that doesn’t exist. Paste the URL into a browser. If it errors out, the URL doesn’t exist. If it lists a bunch of files, re-check your command.

This special repo mirror content listing command is important because the usual reason you enable a new subrepo is to get software that’s in that subrepo. The special repo mirror content listing, possibly combined with the grep command, can provide that information. Also, if you intend to keep on using Void Linux, this command can help you learn what kinds of packages are in which subrepos.

Finding Appropriate Mirrors

Prominent Void Linux Project member maldridge said «Every byte shipped across the atlantic is a non trivial cost.» That’s one reason why you should pick a mirror near you.

Another reason is your time. Big updates can take 15 minutes in the best of circumstances. If your update needs to cross the ocean, it could take more than an hour.

Distance isn’t the only factor. A close mirror could be slow if it’s underpowered or overused. So you’ll need to start with close mirrors, but perhaps switch to farther ones (but on your continent) if the closest don’t work well.

Читайте также:  Конфликт драйверов видеокарты windows 10

To find a reasonably up to date list of mirrors, see https://wiki.voidlinux.eu/XBPS#Official_Repositories. Pick a close repo, and make sure it has files in it.

The Debug Problem

The Void project has decided that most people don’t need a debug subrepository, so if you need a debug repository, so many mirros lack one. You need to make sure its URL contains files. Browse to the debug directory of your main mirror’s to make sure it has files. If not, its not a sin to use the debug subrepo from a different mirror.

Specifying Subrepos

Subrepos are for special repositories such as nonfree, debug, multiarch, and multiarch-nonfree. If you need to install something not in the main repo, such as nonfree software or a debug package, you need to enable the necessary subrepo.

If any of the subrepos had already been installed on host «ricardo», an asterisk would have been displayed between the square brackets instead of a hyphen. If you need to install a subrepo, use the xbps-install command. For instance, the following installs the nonfree subrepo:

The preceding command says nothing about which mirror you use: It only installs file 10-repository-nonfree.conf , containing a pointer to the primary nonfree repo, https://repo.voidlinux.eu/current/nonfree in the /usr/share/xbps.d directory. The next section tells you how to override that default.

Specifying Mirrors

If the primary repo or subrepo in /usr/share/xbps.d doesn’t suit your needs, because of geography, performance, or other reasons, you can override it in the /etc/xbps.d directory. The procedure is simple:

  1. Copy the file for the (sub)repo from /usr/share/xbps.d to /etc/xbps.d .
  2. Edit the file in /etc/xbps.d , replacing the URL of the mirror you don’t want with the URL of the mirror you do want.

Источник

Repositories

Repositories are the heart of the XBPS package system. Repositories can be local or remote. A repository contains binary package files, which may have signatures, and a data file named $ARCH-repodata (e.g. x86_64-repodata ), which may also be signed.

Note that, while local repositories do not require signatures, remote repositories must be signed.

The main repository

The locations of the main repository in relation to a base mirror URL are:

  • glibc: /current
  • musl: /current/musl
  • aarch64 and aarch64-musl: /current/aarch64

Subrepositories

In addition to the main repository, which is enabled upon installation, Void provides other official repositories maintained by the Void project, but not enabled by default:

  • nonfree: contains software packages with non-free licenses
  • multilib: contains 32-bit libraries for 64-bit systems (glibc only)
  • multilib/nonfree: contains non-free multilib packages
  • debug: contains debugging symbols for packages

These repositories can be enabled via the installation of the relevant package. These packages only install a repository configuration file in /usr/share/xbps.d .

nonfree

Void has a nonfree repository for packages that don’t have free licenses. It can enabled by installing the void-repo-nonfree package.

Packages can end up in the nonfree repository for a number of reasons:

  • Non-free licensed software with released source-code.
  • Software released only as redistributable binary packages.
  • Patented technology, which may or may not have an (otherwise) open implementation.

multilib

The multilib repository provides 32-bit packages as a compatibility layer inside a 64-bit system. It can be enabled by installing the void-repo-multilib package.

These repositories are only available for x86_64 systems running the glibc C library.

multilib/nonfree

The multilib/nonfree repository provides additional 32-bit packages which have non-free licenses. It can be enabled by installing the void-repo-multilib-nonfree package.

debug

Void Linux packages come without debugging symbols. If you want to debug software or look at a core dump you will need the debugging symbols. These packages are contained in the debug repository. It can be enabled by installing the void-repo-debug package.

Once enabled, symbols may be obtained for

Finding debug dependencies

The xtools package contains the xdbg(1) utility to retrieve a list of debug packages, including dependencies, for a package:

Источник

Оцените статью