(GVM) 10 on Alpine issue - alpine-linux

While installing GVM10 on Alpine (Linux alp 5.4.12-1-virt) I get the following error after the command:
apk add gvmd gnutls-utils openvas-scanner greenbone-security-assistant python3 redis
ERROR: unsatisfiable constraints:
openvas-scanner (missing):
required by: world[openvas-scanner]
I'm actually sticking to this guide:
https://wiki.alpinelinux.org/wiki/Setting_up_GVM10
What should I do in order to solve the problem?
Thanks a lot

The openvas-scanner package is no longer available in Alpine version 3.11:
openvas-scanner on Alpine 3.11
openvas-scanner on Alpine 3.10 (6.0.0-r3)
The simplest solution is downgrading the Alpine base image to 3.10 (if you're running a Docker image and free to pick a different base). However, using an older Alpine base is not an ideal solution.
Alternatively, you can work around this limitation by installing openvas-scanner of the Alpine 3.10 repo:
apk add gvmd gnutls-utils greenbone-security-assistant python3 redis
apk add openvas-scanner --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/community
This seems to be working currently on Alpine 3.11.
It has the side of downgrading several gvm packages (below), but otherwise there are no installation issues.
(1/24) Downgrading gvm-libs (11.0.0-r1 -> 10.0.0-r1)
(2/24) Downgrading greenbone-security-assistant (9.0.0-r0 -> 8.0.0-r4)
(4/24) Downgrading gvmd (9.0.0-r1 -> 8.0.0-r3)

Related

How snapcraft nodejs plugin handle the Node.js environment when you create an app snap for different OS?

I'm try to understand how the nodejs plugin i'm using to create snap node.js app handle the Node.js environment ? Example in this application :
parts:
webserver:
source: .
plugin: nodejs
nodejs-version: "12.13.1"
nodejs-package-manager: "yarn"
nodejs-yarn-version: "v1.21.1"
I'm defining to use Node.js v12.13.1 and Yarn v1.21.1 lunching the snapcraft commands:
snapcraft clean
snapcraft --debug
snap install my-snap-file.snap --dangerous
Now i'm able to run the command/service on my machine (amd64 Ubuntu 16.04 LTS) with Node.js v12.2.0 installed but i cant find the node.js env not in multipass instance not in another machine with installed Ubuntu Core 18, i mean i can't run command as node --version and so on and even the snap app doesn't work neither command neither service.
Other problem i've discovered digging in the Ubuntu Core 18 env installed on RaspBerry Pi3 is : When i've installed my snap with nodejs app in the folder /snap//bin i cannot run the ./node exec ! i get the error :
./node: 1: ./node: Syntax error: "(" unexpected
My questions are :
Why i get the ./node error ?
my-snap-file.snap bundle the Node.js v12.3.1 inside the mysnap ?
how i can test the node.js is working with the right version in multipass and other machine where i've installed only the snap bundling node.js ?
THks
Thanks to forum.snapcraft.io i've solved the issue ... i'm posting here to help people to solve these kind of issues too. This error is due to the snap that is NOT build on the actual target architecture you want to run it on. Make sure you build eg. armhf (raspberry pi3) actually on an armhf architecture device.
architectures:
- build-on: amd64
run-on: [amd64, armhf]
here you tell snapcraft that building on amd64 produces binary snaps that can run on amd64 and armhf … which is indeed not true (since building on amd64 will pull in only amd64 binaries). i’d drop that statement completely and make sure to build the armhf version on an armhf device (or on build.snapcraft.io). (Credits Ogra)
Read the Link about architectures in snapcraft.yaml
https://forum.snapcraft.io/t/architectures/4972

Cannot install php7-mongodb in alpine linux

I am trying to install php7-mongodb with my dockerfile. The same worked until yesterday but today dockerbuild is throwing the following error
Step 4/12 : RUN apk add php7-mongodb
---> Running in b6713ea15c9d
php7-mongodb (missing):
ERROR: unsatisfiable constraints:
required by: world[php7-mongodb]
The command '/bin/sh -c apk add php7-mongodb' returned a non-zero code: 1
I tried with apk update and apk upgrade in the dockerfile but still not working. any idea what the issue is?
I am using alpine edge as base version.
We can recreate the issue by using the following dockerfile
FROM alpine:edge
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk update && apk upgrade
RUN apk add php7-mongodb
tldr: The package renamed to php7-pecl-mongodb in 3.9 and no longer exists in later releases
The package was renamed to php7-pecl-mongodb with this commit: https://git.alpinelinux.org/aports/commit/?id=b3d534d73c690baf458d9cda5dca5ee52ca9cafc
But the package was removed shortly after that due to a nonfree licence change by the package: https://git.alpinelinux.org/aports/commit/community/php7-pecl-mongodb/APKBUILD?id=8a901de31fa055ed591d487e12f8bb9ffcc0df21
According to https://pkgs.alpinelinux.org/packages?name=php7-mongodb&branch=edge there is no such package in alpine edge version.
The latest alpine version that has the php7-mongodb package in its repos seems to be 3.8: https://pkgs.alpinelinux.org/packages?name=php7-mongodb&branch=v3.8
I can't tell you what's the reason that this package is not contained in 3.9 and edge. But if this is an option for you use alpine:3.8 as the base image instead of alpine:edge
Using Alpine 3.8 will fix the issue for you. Change
FROM alpine:edge
To
FROM alpine:3.8
You will also need to change the repository URL so it's point at v3.8. I've been using main so the second line would look like below for me.
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.8/main" >> /etc/apk/repositories
I don't think /testing exists for older releases so you'll need to experiment to find out what works for you. Or perhaps someone else can clarify this for us.
It means you're not using the latest Alpine but you will be able to build the container.

Error creating ubuntu 16 container under arch

I am trying to install a Ubuntu container on Archlinux using LXC. I am following this guide:https://gist.github.com/manoj23/8a35849697945896cdaef77927c695a7
After I run this command:
lxc-create --name=ubuntu-16 --template=ubuntu -- --release xenial --arch amd64
I get the following error:
Bad template: ubuntu
Error creating container ubuntu-16
Why is this happening?
It says in the error. Bad template.
You can see that in the current version of lxc there is no ubuntu template. The gist is probably for the previous version.
The LXC documentation does not really have any clear examples of using their updated method. The Ubunu LXC documentation does though. https://help.ubuntu.com/lts/serverguide/lxc.html

Why is there no php-gd packages available on alpine 3.4/3.5/3.6?

It seems it was only available in alpine 3.3?
What is the reason it would not be available in later versions?
It seems the package name changed: https://pkgs.alpinelinux.org/package/edge/community/x86/php7-gd

Why alpine-base 3.5.1 downgrade to 3.5.0 when I change to edge repository?

I'm following https://wiki.alpinelinux.org/wiki/Edge to upgrade alpine 3.5.1 to edge. The /etc/apk/repository is
http://dl-2.alpinelinux.org/alpine/edge/main
http://dl-2.alpinelinux.org/alpine/edge/community
#testing http://dl-2.alpinelinux.org/alpine/edge/testing
And I do the following command:
apk upgrade --update-cache --available
Then my alpine is back to 3.5.0
cat /etc/alpine-release
3.5.0
If I change the /etc/apk/repository to
http://dl-2.alpinelinux.org/alpine/v3.5/main
http://dl-2.alpinelinux.org/alpine/edge/main
http://dl-2.alpinelinux.org/alpine/edge/community
#testing http://dl-2.alpinelinux.org/alpine/edge/testing
It back to 3.5.1, but gdk-pixbuf downgrading from 2.36.5-r0 -> 2.36.2-r0
It seems that Edge always reports 3.5.0. So that version number may not be reliable. I would say that this is standard for development versions.
$ docker run alpine:3.4 cat /etc/alpine-release
3.4.6
$ docker run alpine:edge cat /etc/alpine-release
3.5.0