1

Topic: python-cryptography package has a backend problem

cryptography.exceptions.UnsupportedAlgorithm: Backend object does not implement ScryptBackend

This above error shows up in python-cryptography package. It needs an update. The available package is 2.3.1 and the latest released package is 2.9.1. The above error didn't throw up on my earlier Parrot OS nor does it appear in FreeBSD.

Also, can if someone can help with showing resources on how to build packages for hyperbola, I can build a few. Thanks.

2 (edited by throgh 2020-04-26 23:43:27)

Re: python-cryptography package has a backend problem

Building packages for Hyperbola is generally easy to start with - okay, if you have some experiences with handling dependencies and GNU/Linux in general. First of all you should make sure you have a single folder to build your package into. Afterwards you can choose: Either building directly from source or creating a package for installation. Second option would be my preferred one! smile

Hyperbola is using the basics from Arch Linux and therefore so-called PKGBUILD-scripting. Those files create a common ground with all commands to build and afterwards making an installable package. Here is the concurrent one for python-cryptography: https://git.archlinux.org/svntogit/pack … yptography

When looking into it you can see how this works, but you should also have back in mind that packages have more dependencies and when creating them you should have also others on a more reasonable level and of course installed local on your system. With the command makepkg you can start a build and yes you are noted if anything is missing or just too old. That's one point being really cool about Hyperbola: After preparing and building you can use your customized packages whenever and whereever you want. smile

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

3

Re: python-cryptography package has a backend problem

I have built tensorflow on my older Ubuntu. It's just downloading, linking, configuring and executing a script.

My concern is how will the package behave on other hardware, say should I choose to add it to hyperbola pacman community area. I use x86_64 system so, will the package built in my system work for all other systems (in case another person finds it in pacman and installs it)? Processor instruction sets on these systems are similar ofc. Will the package built on my computer be dependent on my motherboard and GPU too? Or will I have to change the config file to have only x86_64 so that the script makes a general package only dependent on x86_64?

P.S. What's up with IRC. It seems the channel is restricted to users. I can't send messages to channel!

4

Re: python-cryptography package has a backend problem

Therefore you can compare this to the package here at Hyperbola: https://git.hyperbola.info:50100/packag … y/PKGBUILD

The package should be usable on other comparable systems too. But what you have to look at is the support for LibreSSL. That's why Hyperbola has an own backported version while the version from Arch Linux is not based on that. So there is more adaption necessary!

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

5

Re: python-cryptography package has a backend problem

The packages of hyperbola are an absolute joke. They are extremely old. Plus there is no support (documentation) on OpenRC in hyperbola's context. I see patches in the above PKGBUILD file but I'm unaware where they might be available online?! I get some setuptools error when I try to do it on my own.

Well, Andre is focusing completely on HBSD and it seems the current OS is not maintained. With LibreSSL and openRC, things need to be configured.

6 (edited by throgh 2020-05-02 22:22:40)

Re: python-cryptography package has a backend problem

Okay, that could be my personal fault as I've linked only the PKGBUILD itself. Perhaps getting a better insight: https://git.hyperbola.info:50100/packag … yptography

Could this help? And regarding the criticism: Why do you think the packages are a joke? As far as I've seen there is maintenance. But perhaps we can figure out how to getting more into the context together and build a more actual package and give them back to the maintenance as proposal. smile

I'll tryout to combine a newer version for the PKGBUILD and will post it here later if this is okay for you.
Besides: Yes, Hyperbola has a very small team and not all packages are in the best situation at all. But therefore we can try to help each other!

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

7 (edited by throgh 2020-05-02 22:41:18)

Re: python-cryptography package has a backend problem

Okay, I was able to build a newer version of python-cryptography and modified the PKGBUILD:

# Maintainer (Arch): Felix Yan <felixonmars@archlinux.org>
# Maintainer: André Silva <emulatorman@hyperbola.info>

pkgbase=python-cryptography
pkgname=('python-cryptography' 'python2-cryptography')
pkgver=2.9.2
pkgrel=1.hyperbola1.backports1
pkgdesc="A package designed to expose cryptographic recipes and primitives to Python developers, with LibreSSL support"
arch=('i686' 'x86_64')
license=('Apache-2.0')
url="https://pypi.org/project/cryptography/"
makedepends=('python-setuptools' 'python2-setuptools' 'python-six' 'python2-six' 'python-cffi'
             'python2-cffi' 'python2-enum34' 'python-pyasn1' 'python2-pyasn1' 'python-idna'
             'python2-idna' 'python2-ipaddress' 'python-asn1crypto' 'python2-asn1crypto')
checkdepends=('python-pytest-runner' 'python2-pytest-runner' "python-cryptography-vectors=$pkgver"
              "python2-cryptography-vectors=$pkgver" 'python-iso8601' 'python2-iso8601'
              'python-pretend' 'python2-pretend' 'python-hypothesis' 'python2-hypothesis'
              'python-pytz' 'python2-pytz')
source=("https://pypi.io/packages/source/c/cryptography/cryptography-$pkgver.tar.gz")
sha512sums=('a8cb7ba229cddfa15bf4ed00d40e76e2ece57958203b9c50c3f782c7977e1c725fa147a1eebc31d50684a622d53e73f97864e1a935753472ea4b2d89eb6ffb6a')

prepare() {
  cp -a "$srcdir"/cryptography-${pkgver}{,-python2}
}

build() {
  cd "$srcdir"/cryptography-$pkgver
  python setup.py build

  cd "$srcdir"/cryptography-$pkgver-python2
  python2 setup.py build
}

#check() {
#  cd "$srcdir"/cryptography-$pkgver
#  python setup.py pytest
#
#  cd "$srcdir"/cryptography-$pkgver-python2
#  python2 setup.py pytest
#}

package_python-cryptography() {
  depends=('python-six' 'python-cffi' 'python-idna' 'python-setuptools' 'python-asn1crypto')

  cd cryptography-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 LICENSE.APACHE $pkgdir/usr/share/licenses/$pkgname/LICENSE.APACHE
}

package_python2-cryptography() {
  depends=('python2-six' 'python2-cffi' 'python2-enum34' 'python2-idna' 'python2-ipaddress'
           'python2-setuptools' 'python2-asn1crypto')

  cd cryptography-$pkgver-python2
  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 LICENSE.APACHE $pkgdir/usr/share/licenses/$pkgname/LICENSE.APACHE
}

So far there are now two packages available, but I had no possibility or better no further usecase to test them for now. Perhaps this can help you out? And yes: We do need more documentation about how to build own packages. A good idea as it could be therefore added into the Wiki. As user we can add proposals here. Do you have interest helping here also?

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

8

Re: python-cryptography package has a backend problem

I had interest. Now I've migrated to parabola. I mailed Andre for contributing and received no reply + I strongly think the packages are super old. I tried building packages but again. LibreSSL, openRC, and patches throw me off. I need to develop a site and I need reasonably latest packages if not the latest. Also, I think updating packages improves security. There's no point keeping old packages.

Parabola was quite some pain to install compared to hyperbola but there are so many packages.

I'll check out HyperbolaBSD and I'm definitely definitely interested in the complete GNU libre version of OpenBSD.

9 (edited by throgh 2020-05-08 19:28:14)

Re: python-cryptography package has a backend problem

Hmm, I think you mean even more packages than python-cryptography itself. So if those packages are too old for your usecase Hyperbola GNU/Linux-libre may not offer the fitting solution. Nevertheless: You can also contact people quite easy through the IRC.

The problem itself is also some more missing principles way ahead into Parabola. Quite a good distribution and with the possibility using OpenRC. But the major issue are packages with freedom-issues like Deepin. You can have listed your packages here, so there maybe more work ahead to do or ask at the IRC-channel.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

10

Re: python-cryptography package has a backend problem

sagaracharya wrote:

P.S. What's up with IRC. It seems the channel is restricted to users. I can't send messages to channel!

I tried just now too, I'm getting "Cannot send to nick/channel". I don't get that for "#parabola" channel.

Yes, I use the OpenRC version of Parabola. Deepin looks fine to me, but anyways you must know it in detail. I use KDE and I absolutely love the design of Plasma. Never gonna switch.

It's this thing for perfection, that deepin has problems attracts me, such strict nature to disallow problems. Few OSs have that, Qubes being one of them. But it's gotta be usable. Qubes doesn't work on my hardware. And packages here.

11

Re: python-cryptography package has a backend problem

Well the problem of Deepin uses its own "store"-frontend and therefore proprietary services. You can also check more of those problems by trying to insert elements from your clipboard as "Google" is bound directly into some menus. It is also very hard to run the desktop-environment with OpenRC itself - tried that back the days with Parabola. In the end: Looks nice, but to be honest ... better having cwm and be independent from any kind of service instead having some "nice looking cage" with more and more complexity - personal perspective. smile It's just about the point "standardization" as there will never be such a thing to call. It should be always up to the users and the developers to decide, while already alternatives should be kept working for freedom.

Regarding the IRC: Yes, you need a registred user-account for sending messages.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!