- Void Linux. Интермедия про musl
- Оставьте комментарий Отменить ответ
- Introduction
- glibc vs musl
- This Document Doesn’t Cover musl, But.
- Mirrors, Repos and Subrepos
- Where to Find Mirrors
- The Two Mirror Directories On Your Void Computer
- Specifying your Main Repo
- Special Subrepo List Command
- The Special Repo Mirror Content Listing Command:
- Finding Appropriate Mirrors
- The Debug Problem
- Specifying Subrepos
- Specifying Mirrors
- systemd-free linux community
- we follow the development of linux away from systemd
- Void musl – how does it compare with glibc
- Share this:
- Like this:
- Related
- If your comment is considered off-topic a new topic will be created with your comment to continue a different discussion. This community is based on open and free communication, meaning we must all respect all in minimizing the exercise of freedom to disrupt such communication. Feel free to post what you think but keep in mind the subject matter discussed. It is just as easy to start a new topic as it is to dilute the content of an existing discussion. Cancel reply
- Not just about Antix, and Obarun
Void Linux. Интермедия про musl
В очерке про инсталляцию Void Linux было обещано описание впечатлений от свежеустановленной системы. Оно будет выполнено, но несколько позже. Ибо в запланированный процесс вклинились впечатления от знакомства с более иным вариантом дистрибутива, основанном на библиотеке musl.
Как говорилось в первом очерке на заданную тему, дистрибутив Void Linux распространяется в редакциях с рабочими средами Cinnamon, Enlightenment, LXDE, MATE и Xfce, а также «голо-консольный» вариант, все — и для 32-битных, и для 64-битных архитектур. Среди последних в репозитории можно видеть, кроме обычных сборок, ещё и образы вида void-live-x86_64-musl-*.iso . Это — сборки, выполненные не на основе привычной и всем известной главной системной библиотеки GNU Libc (именуемой просто glibc ), а на библиотеке musl — новой библиотеке для нового поколения Linux’ов. На на главной странице проекта сказано, что она является
лёгкой, быстрой, простой, бесплатно и стремится к соответствию стандартам и безопасности.
В подтверждение чего приводится таблица сравнения её с аналогами, такими, как uClibc , dietlibc и glibc . Хотя она и предназначена в первую очередь для встраиваемых систем, сборки дистрибутива Void с вполне десктопными рабочими средами свидетельствуют, что она может выступать и в этой роли. А потому, прельщённый всякими хорошими словами в её адрес (правда, сказанными на её же сайте, а сам себя не похвалишь… известно чего будет), я решил поглядеть на это чудо воочию. Для чего скачал редакцию со средой Cinnamon и попытался её запустить в Live-режиме.
Увы, эта попытка потерпела фетяску: система стартовала, загрузила среду Cinnamon — и тут же сообщила о её крахе, сопроводив её предложением перезапуска. Но, сколько бы я ни жал соответствующую кнопку — из состояния перманентного краха она так и не вышла.
Почувствовав спортивную злость, я не остановился на достигнутом, и скачал образ с Xfce, тем более что давно хотел посмотреть на последнюю её версию, за номером 4.12 — уж больно он ассоциировался с незабвенной советской водкой брежневской эпохи, запечатлённой в цене первого официального издания книги Венечки Ерофеева…
Эта редакция загрузилась благополучно, и столь же беспроблемно установилась. Правда, в ходе инсталляции прозвенел первый звоночек — отказ зайти в пункт Locale меню установочной программы. Чему я значения не придал, подумав, что локаль — это компонент библиотеки glibc , и в musl может называться каким-то другим словом.
Однако всё оказалось гораздо хуже — она не называлась никак, потому что в musl просто не существовало такого понятия. И в ближайшее время поддержка локалей не предвиделась. Соответственно, и в установленной системе, и в репозитории напрочь отсутствовали языково-зависимые пакеты и вообще средства локализации. А поскольку для меня главная функция любой системы — обеспечить сочинение всяческой нетленки на русском языке, система эта оказалась для меня неприемлемой.
Однако эта маленькая интермедия имела неожиданное следствие. Среда Xfce, в которой я пытался знакомиться с musl-сборкой Void’а, мне понравилась. И я установил этот дистрибутив в уже нормальной Xfce-редакции. Так что весь цикл очерков не будет сводиться к Cinnamon, и потому переименовывается. В дополнение к чему представляется и предварительное оглавление цикла, которое будет наращиваться по мере сочинения новых очерков.
Оставьте комментарий Отменить ответ
Для отправки комментария вам необходимо авторизоваться.
Источник
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.
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 .
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.
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:
- Copy the file for the (sub)repo from /usr/share/xbps.d to /etc/xbps.d .
- 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.
Источник
systemd-free linux community
we follow the development of linux away from systemd
Void musl – how does it compare with glibc
After our previous week’s test of Alpine linux and the impression of its simplicity and high speed, we decided to give a group test on the Void linux with musl. We used the LXDE edition of the installation image and did a trial run on VirtualBox. It was a first shot try and success. We then started modifying and installing various packages to see if “any” would have any problems running on musl instead of glibc. Note that the musl repositories are specific to musl and separate, as far as we can tell, from the glibc repositories. With the exception of trying to run the palemoon installer which does not run on musl, everything worked flawlessly. We then took the display manager (LXDM in the case of LXDE) and tried to run openbox with a DM, straight from console using xinit and Void’s consolekit2 capability. This also worked just by modifying xinitrc. Not a problem. RAM use is the same with Void-glibc, but speed of booting up and running seemed as an empirical improvement, while Void is pretty fast and light with either musl or glibc. The size of the installed and configured system seemed much smaller than Void-glibc. We managed to make an .img out of it, transferred the image to disk, and made a hard-metal installation just so we can check on whether real hardware might throw it off. Then one of our coleagues used it on a an older pc with Intel hw, and it worked perfectly as well. We recreated the boot images for the two kernels we are trying, and right after this success we were asking for trouble. We made a clone of the same image and transferred it to an AMD machine, of at least 10yr age. Same boring fully working system, slightly less RAM on the AMD machine.
So all we can say is that you should’t listen to warnings against musl, as it seem to be working fine. Only very specific rare modern hw have reported any problematic behavior.
Good job Void gang. A thank you note is necessary.
If you have been reading about musl and hesitate to give it a try, we predict that unless you have really strange rare hw, this Void works as well and as reliably as the other VOID,
Positively 2 thumbs up!
Share this:
Like this:
Related
If your comment is considered off-topic a new topic will be created with your comment to continue a different discussion. This community is based on open and free communication, meaning we must all respect all in minimizing the exercise of freedom to disrupt such communication. Feel free to post what you think but keep in mind the subject matter discussed. It is just as easy to start a new topic as it is to dilute the content of an existing discussion. Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Not just about Antix, and Obarun
Antix, (as systemd free Debian)
&
Obarun, Hyperbola, Parabola (as systemd free Arch)
&
Void, Alpine, Adélie (as systemd free Linux)
We are open to other systems that community members want to write about and keep the rest of us up to date, as long as they are intentionally developed to be without systemd.
Feel free to promote and talk about any other systemd-free linux or xxBSD you know about. If you care to write a small review of that system it will go up here as your own article.
If you really can tell us how “easy” it is to convert Debian to a different init system and erase systemd, we are open to the possibility. We dare anyone to explain it to us. Because there are many that advertise this as possible but nobody has provided detailed instructions.
Источник