Можно ли установить конкретную версию пакетов, от которой зависит основной пакет?

Переименование звукового файла затвора - это нормально, но, вероятно, не сработает, если у вас нет root-доступа к системе. Вот альтернативный подход:

#!/bin/bash
volume=$(amixer sget Master | awk -F '[],[,%]'  '/%/{print $2 }')
amixer sset Master 0
gnome-screenshot
amixer sset Master "$volume"%

Этот сценарий запоминает процент громкости, временно устанавливает громкость на 0, делает снимок экрана, и после завершения процесса gnome-screenshot объем восстанавливается до исходного процента.

Преимущество этого подхода в том, что он является гибким и может быть настроен в соответствии с вашими потребностями. Этот сценарий может быть привязан к кнопке PrntScr или к настраиваемому ярлыку.

Протестировано на Ubuntu 16.04 LTS

10
06.10.2017, 17:41
1 ответ

Как FreeBSD собирает пакеты

Проект FreeBSD использовался для сборки пакетов только для выпусков и иногда для веток STABLE. Старые сборщики пакетов использовали распределенную систему Portbuild. Он будет использовать большой кластер из меньших машин объемом 2 ГБ -4 ГБ для создания пакетов. Это было подвержено ошибке -и работало медленно, в основном из-за старых машин. Полная сборка может занять неделю. Сегодня пакеты создаются с использованием отдельных больших машин с использованием Poudriere. (Взято с веб-страницы Брайана Древери).

См. также:Как обновить несколько пакетов и портов во FreeBSD

FreeBSD имеет развивающийся ABI (и API ), как и Solaris и Windows, в то время как Linux имеет стабильную (стагнацию? )ABI (и API ), поэтому старые бинарные файлы Linux будут по-прежнему работать на более новой версии ОС, в то время как с не -операционными системами Linux это не всегда так (иногда ).

Использование pkg lockможет по-прежнему приводить к головным болям ,в то время как он будет блокировать(предлагать предупреждение )при попытке обновления с помощью pkg upgradeон по-прежнему предполагает, что версии с более высокими номерами лучше(желательны )и что это то, что вы хотел бы сделать -, поэтому он запрашивает разрешение, и вы можете разрешить, но это не гарантирует, что что-то еще не будет нарушено. См. приведенный выше URL-адрес или это обсуждение :" Вы бы предпочли, чтобы FreeBSD блокировала версии двоичных пакетов, распространяемых через pkg, для версии ОС? ".

Если один пакет заблокирован иногда вам нужно будет дать разрешение на его разблокировку и обновление, при этом это будет работать для одного пакета (и всех его зависимостей )нет никаких гарантий, что что-то еще не будет несовместимо с новыми библиотеками (и, следовательно, также не потребует обновления,еслионо доступно в настоящее время ).

Блог Брайана Древери :" Журнал FreeBSD :Poudriere " мнения:

"Stop using portmaster, portupgrade and ports on your servers and switch to packages.

Setting up your own package builds with Poudriere takes only a few minutes and will save you a lot of time in the future.

...

If you are maintaining more than one FreeBSD system and are not using packages already, you should. I maintain only 20 servers, but building ports on each system took a lot of my time and wasted resources on production machines. When building ports on multiple servers, it is very easy to get their options or versions out of sync. By building packages once on one system, I lessened the load on my systems, lessened the amount of work I had to do and made all my systems consistent. Instead of dealing with the same failure on each system, I only need to handle it on the build system.

Но, заминка...

Why would you need to deviate from the official packages? The ports framework provides options support for ports to change build-time configuration. Not all applications support run-time configuration. Some applications must be compiled differently depending on which features are enabled. Others have options simply to lessen the amount of features and dependencies in the default port. For server administrators, this can quickly lead to finding that some of the default packages do not meet their requirements.

Итак...

There are a few ways to get custom packages. Pkg supports using multiple repositories. It can be set up to use the official FreeBSD repository as a primary and a custom one as a secondary. Pkg is not limited by the number of repositories it can track and they can be reordered for priority. The problem with multiple repositories is that it can currently be difficult to maintain. When Pkg detects that an installed package has different options or dependencies from a repository it is tracking, the package will be reinstalled from potentially any remote version. You can either lock the package during upgrades with pkg lock PKGNAME and pkg unlock PKGNAME or bind it to a specific repository with pkg annotate -A PKGNAME repository REPONAME. There is also the subtle problem of keeping the ports tree for your custom repository in sync with the FreeBSD packages. Since packages are built from a ports tree snapshot taken once a week, if your custom repository does not match it may lead to conflicts. It is much simpler to just build an entire package set of just what you need with the options that you want.

Решение:

Poudriere (roughly pronounced poo-dree-year, French for “powder keg”) was written as a faster and simpler replacement for Tinderbox. It was written by the Pkg author Baptiste Daroussin and is now mostly maintained by me along with Baptiste and some other contributors. It has quickly become the de-facto FreeBSD port testing and package building tool. It is the official build cluster tool and is also used by the FreeBSD Ports project for testing sweeping patches in what are called “exp-runs”. It is written in POSIX shell and is slowly being moved to C components. Unlike Tinderbox, it has no dependencies and does not require a database. It has been greatly optimized to be highly parallel in all operations. It uses jails to build ports in sandboxed environments in very strict conditions. Jail creation is done once with a simple command. During builds, the jail is cloned automatically for each CPU being used to give ports a clean place to build.".

Настройка собственного репозитория с помощью poudriere обеспечивает гибкость портов и простоту управления пакетами.

1
27.01.2020, 20:03

Теги

Похожие вопросы