Freebsd make conf python

Freebsd make conf python

The FreeBSD Ports Framework supports multiple versions of the same software for those packages where such choice is desirable.

DEFAULT_VERSIONS is the mechanism that allows the user to set or override which version of software they want to be used as the dependency for other ports.

  • multiple versions are available, and
  • regularly required by users with different needs, and
  • where no single version may reasonably be set by a maintainer.
  • Don’t require a specific version, OR
  • Support a range of versions, OR
  • Only support a specific version

In summary, it provides users with extra choice and flexibility.

What software or ports supports it?

  • Apache
  • BDB (deprecates WITH_BDB_VER make.conf option)
  • GCC
  • LUA
  • MySQL
  • Perl
  • Python
  • PHP
  • PostgreSQL
  • Ruby
  • SSL library selection (deprecates WITH_OPENSSL_PORT and OPENSSL_PORT make.conf options)
  • TCL

How do I use it?

DEFAULT_VERSIONS is a make variable that takes one or more space-delimited name=version (key=value) pairs.

Supported software names are defined in Mk/bsd.default-versions.mk. They are the string before the underscore in variables matching *_DEFAULT. For example, PYTHON_DEFAULT, PYTHON2_DEFAULT and PYTHON3_DEFAULT create the supported names python, python2 and python3 respectively.

  • /etc/make.conf
  • Poudriere make.conf files (see poudriere(8))
  • In command-line make arguments or environment variables

Examples

Users might wish to specify 3.5 as default for the Python3 branch, by defining DEFAULT_VERSIONS=python3=3.5.

Читайте также:  Литература php mysql html

To set both PostgreSQL 9.4 and Python 3.5 (of the 3.x) branch, one would write:

DEFAULT_VERSIONS+= pgsql=9.4 python3=3.5

Note: The above specification sets 3.5 for the Python 3 branch, but does not override the overall Python default version. This can be done with:

Note the difference between the use of python= versus python3=.

Special Considerations

MySQL Fork Selection through Version

When it comes to MySQL forks like Percona and MariaDB, they can be chosen by using specific version of MySQL. In other words, MySQL fork selection is encoded in «mysql» version for DEFAULT_VERSIONS. If we take a look at Mk/Uses/mysql.mk, we can see that «m» in MySQL versions are for MariaDB and «p» are for Percona. As of July 2016 these versions are supported, visible in the bsd.default-versions.mk comment kept in sync with the code backing it in Uses/mysql.mk:

# Possible values: 5.1, 5.5, 5.6, 5.7, 5.5m, 10.0m, 10.1m, 5.5p, 5.6p

So, for example, to install and use MariaDB 10.1 for ports that need MySQL, we can use:

SSL Library Selection

As of revision 416965 selection of the SSL library to build against has moved to DEFAULT_VERSIONS instead of using dedicated WITH_ options. This enables the ssl= entry and a choice between base OpenSSL or ports’ OpenSSL, LibreSSL or their -devel versions.

More Information

Consult Mk/bsd.default-versions.mk for more info on the defaults, as well as the UPDATING file for information of instructions on changes to those default versions over time.

Please also note that arbitrarily overriding defaults might lead to additional steps being required, backwards incompatibility or dependency issues (eg. switching default Python version from 2.x to 3.x).

Ports/DEFAULT_VERSIONS (last edited 2022-06-08T01:45:50+0000 by KubilayKocak )

Источник

FreeBSD: Обновляем Python

В котором узнал, что Perl подняли до версии 5.30, Python теперь по умолчанию принят версии 3,7
Проверим установленную версию Python:

»Что

20191216:
AFFECTS: users of python
AUTHOR: antoine@FreeBSD.org

Default version of python3 and python was switched to 3.7.

For ports users wanting to keep version 3.6 as default,
add DEFAULT_VERSIONS+= python=3.6 python3=3.6 to make.conf

This may ease the upgrade for users of pre-build packages:
# sh
# for i in $(pkg query -g %n ‘py36-*’); do pkg set -yn $:py37-$; done
# pkg upgrade

For portmaster users:
# portmaster -o lang/python37 python36
# REINSTALL=»$(pkg info -o py36-\* | awk ‘’)»
# pkg delete -f py36-\*
# portmaster $REINSTALL
# REBUILD=$(pkg query -g «%n:%dn» ‘*’ | grep py3 | grep -v py37 | cut -d : -f 1 | sort -u)
# portmaster $REBUILD


Проверяем нет ли у нас записи в make.conf указывающей на DEFAULT_VERSIONS Python

Если вы хотите оставить версию Python как 3.6 и не повышать версию, то внесите соответствующую запись в make.conf:

# vi /etc/make.conf DEFAULT_VERSIONS+= python=3.6 python3=3.6

Будем обновлять из портов с помощью программы Portmaster
если она не установлена, то установим
Из портов:

cd /usr/ports/ports-mgmt/portmaster/ && make install clean

Создадим скрипт обновления:

#!/bin/sh portmaster -o lang/python37 python36 REINSTALL="$(pkg info -o py36-\* | awk '')" pkg delete -f py36-\* portmaster -d $REINSTALL REBUILD=$(pkg query -g "%n:%dn" '*' | grep py3 | grep -v py37 | cut -d : -f 1 | sort -u) portmaster -d $REBUILD

Сохраняем и назначаем права на исполнение:

И запускаем скрипт обновления:

На этом все, в следующей заметки подними версию Perl с обновлением всех библиотек:)

Источник

Python 3.9 на FreeBSD вместо дефолтного.

Перебрался с дефолтного Python 3.7/3.8 на 3.9, согласно мануалу из /usr/ports/UPDATING касательно перелазанья с одной версии Python’а на другую. Всё получилось. Зависимые порты тоже пересобрал с новой версией.

% cd /usr/ports/ && portsnap fetch update && pkg version -vIL = Looking up portsnap.FreeBSD.org mirrors. 4 mirrors found. Fetching snapshot tag from ipv4.aws.portsnap.freebsd.org. done. Fetching snapshot metadata. done. Updating from Mon Aug 30 17:48:38 MSK 2021 to Mon Aug 30 20:37:50 MSK 2021. Fetching 5 metadata patches. done. Applying metadata patches. done. Fetching 0 metadata files. done. Fetching 12 patches. (12/12) 100.00% done. done. Applying patches. done. Fetching 1 new ports or files. done. Removing old files and directories. done. Extracting new files: /usr/ports/devel/rcs57/ /usr/ports/games/Makefile /usr/ports/games/augustus/ /usr/ports/mail/spamassassin-devel/ /usr/ports/multimedia/makemkv/ /usr/ports/net/wireshark/ /usr/ports/news/inn-current/ /usr/ports/ports-mgmt/poudriere/ /usr/ports/security/krb5-devel/ /usr/ports/sysutils/cfengine-devel/ /usr/ports/sysutils/cfengine-masterfiles-devel/ /usr/ports/sysutils/nut-devel/ /usr/ports/x11/foot/ Building new INDEX files. done. ataidle-2.7.2 ? orphaned: sysutils/ataidle py39-Babel-2.9.1 ? orphaned: devel/py-babel py39-Jinja2-2.11.2_1 ? orphaned: devel/py-Jinja2 py39-cairo-1.18.1_2,1 ? orphaned: graphics/py-cairo py39-evdev-1.4.0 ? orphaned: devel/py-evdev py39-gobject3-3.38.0 ? orphaned: devel/py-gobject3 py39-html5lib-1.0.1 ? orphaned: www/py-html5lib py39-markupsafe-1.1.1_1 ? orphaned: textproc/py-markupsafe py39-ply-3.11 ? orphaned: devel/py-ply py39-pytz-2021.1,1 ? orphaned: devel/py-pytz py39-pyudev-0.22.0 ? orphaned: devel/py-pyudev py39-six-1.16.0 ? orphaned: devel/py-six py39-webencodings-0.5.1 ? orphaned: converters/py-webencodings 

Как избавиться от «orphaned» у питоновских модулей?

Источник

python and port flavor

I am trying to understand the brief message in the UPDATING file
about port flavor and python.

Am I understanding this correctly?
I should follow these steps for some recent python updates:
pkg delete -f py27-setuptools-36.5.0
cd /usr/ports/devel/py-setuptools
make FLAVOR=py27 reinstall clean

then I notice
===>>> Update py27-Babel-2.3.4 to py27-Babel-2.5.1?
===>>> Update py27-Jinja2-2.9.5 to py27-Jinja2-2.10?
===>>> Update py27-docutils-0.14 to py27-docutils-0.14_1?

I should remove each pkg that needs updating.
Then go to each port directory and run: make FLAVOR=py27 reinstall clean

The message in UPDATING is not clear to me.

Thanks

Reactions: Oclair

rigoletto@

If you use packages from the official repository exclusively you need to do nothing but update regularly. If you build from ports, currently just ports-mgmt/poudriere and ports-mgmt/synth does have support for FLAVORS.

ports-mgmt/portmaster is broken but some people managed to build then using some manual trick/workaround. Just look for that in the forum.

If you use make you should set the python version you want python stuff to be built, like stated in the UPDATING file, but be aware FLAVORS will no be restricted just to Python stuff in a near future.

rdunkle

I have not seen any clear instructions other than what you refer to as «using some manual trick/workaround» in this forum. That is why I posted this thread.

Are there some definitive instructions for people that use portmaster?

BTW, my steps worked for me, but that just adds yet another workaround.

Thanks

Reactions: Oclair

rigoletto@

port-mgmt/portmaster already had some broken features ever before FLAVORS arrive. Basically it was more or less abandoned already.

I do not have any information but I guess it will not be fixed any time soon, and if it will be fixed.

ShelLuser

I don’t understand the confusion. Also Portmaster can easily handle all this, it’s not broken when it comes to these issues. See, the whole FLAVOR thing is merely a make specification. Nothing different from, say, BUILD_OPTIMIZED=yes or DISABLE_VULNERABILITIES=yes.

And if you need to use those permanently, then simply define them globally. So: using /etc/make.conf. Problem solved. ((edit): note that I don’t recommend setting DISABLE_VULNERABILITIES within /etc/make.conf).

Some people keep calling Portmaster «broken» or «obsolete» which I personally think is funny because all Portmaster basically does is use the standard tools to perform its job. Calling Portmaster broken is — in my opinion — close to calling the standard tools broken, yet. they still fully power the whole process.

The main issue is that you’ll need to understand how the vanilla build process works in order to fully appreciate Portmaster. While other tools hide such details for easier use, Portmaster requires that you’re at least decently familiar with this ‘vanilla’ build process, as shown here.

(edit) So the solution is simple: add the new specification to /etc/make.conf.

hotaronohanako

I don’t understand the confusion. Also Portmaster can easily handle all this, it’s not broken when it comes to these issues. See, the whole FLAVOR thing is merely a make specification. Nothing different from, say, BUILD_OPTIMIZED=yes or DISABLE_VULNERABILITIES=yes.

And if you need to use those permanently, then simply define them globally. So: using /etc/make.conf. Problem solved. ((edit): note that I don’t recommend setting DISABLE_VULNERABILITIES within /etc/make.conf).

Some people keep calling Portmaster «broken» or «obsolete» which I personally think is funny because all Portmaster basically does is use the standard tools to perform its job. Calling Portmaster broken is — in my opinion — close to calling the standard tools broken, yet. they still fully power the whole process.

The main issue is that you’ll need to understand how the vanilla build process works in order to fully appreciate Portmaster. While other tools hide such details for easier use, Portmaster requires that you’re at least decently familiar with this ‘vanilla’ build process, as shown here.

(edit) So the solution is simple: add the new specification to /etc/make.conf.

Thanks

Reactions: Oclair

Источник

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