Entering nethserver-makerpms

nethbot

(Davide Principi) #1

I’m working on a new RPM builder based on Linux containers. It aims to be an alternative to mock builds (make-rpms command & co, provided by our nethserver-mock official package).

Furthermore, as it can run in a Docker container it could be useful to run automated builds, on Travis-CI for instance: I know @edoardo_spadoni is working on it :wink:

The buildah flavor runs only on Fedora 26. The Docker version works also on NethServer 7. Please give it a try, I would be happy to share impressions suggestions and merge PR, too! /cc @dev_team


(Alessio Fattorini) #2

I’d like to know what @stephdl @dnutan @areguera and others think about that. Is @davidep’s post clear enough? Do you need more info?


(Stéphane de Labrusse) #3

just for the sake of developers, why the use of a container environment would be better than mock ?


(Davide Principi) #4

When the YUM cache is filled, it builds an RPM in a fraction of the time at least on my workstation :blush:


(Marc) #5

Installed docker but cannot install the fedora package on Nethserver 7 due to buildah dependency.
Installed the thingy on Fedora but don’t know how to build an image (no experience with containers).

A real-world step by step example would help.


(Markus Neuberger) #6

On NethServer I tried:

yum install git
git clone https://github.com/NethServer/nethserver-makerpms.git
cd nethserver-makerpms
yum install docker
systemctl start docker
docker build -t nethserver/makerpms buildimage
docker run --name builder --privileged=true -v $PWD:/srv/makerpms/src:ro  nethserver/makerpms
docker cp -a builder:/srv/makerpms/rpmbuild/SRPMS .
docker cp -a builder:/srv/makerpms/rpmbuild/RPMS .

I assume the fresh built RPM should be in working dir, but nothing there. I also tried on Fedora with buildah without success.


(Davide Principi) #7

Thank you checking it out! @edoardo_spadoni and I are configuring Travis-CI builds. We’ll hopefully say goodbye to locally-built packages :smiley:

I want to make local builds work in the next turn though.


(Stéphane de Labrusse) #8

Indeed I feel make-rpms a bit much longer to proceed than my script…I will try to figure why.


(Stéphane de Labrusse) #9
cd ~/rpmbuild/SOURCES/
tar -xvf ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz 2>&1 > /dev/null
rpmbuild -bs --nodeps ~/rpmbuild/SPECS/$PACKAGE.spec

In fact I use mock just one time, the source are built by rpmbuild, whereas you call it two times (one to build the srpm, another to build the rpm)


(Davide Principi) #10

2 posts were split to a new topic: Welcome nethbot!