Entering nethserver-makerpms

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

6 Likes

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?

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

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

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.

4 Likes

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.

1 Like

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.

1 Like

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

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)

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

There’s a nethserver-makerpms update on nethserver-testing!

This is a simple RPM build environment based on the CentOS 7 official Docker image.
It can build RPMs in the travis-ci.org environment, or on your local Fedora 29+ machine. CentOS rootless builds seem to not (still) work: as such you must be root to make it work on CentOS 7.

Still not official, but really nice! Updated README.rst

PR:

3 Likes

I think we’re ready for a release!

Just added an enhancement to reuse YUM cache across multiple makerpms runs. It speeds it up at lightning speed :cloud_with_lightning:

https://github.com/NethServer/nethserver-makerpms/pull/4#issuecomment-484127485

3 Likes

nethserver-makerpms first release!

Version 1.0.0 has just been released in nethserver/updates 7.6.1810 repository: http://packages.nethserver.org/nethserver/7.6.1810/updates/x86_64/Packages/nethserver-makerpms-1.0.0-1.ns7.noarch.rpm

Now nethserver-makerpms is listed between the other RPMs build methods in the Dev manual: https://docs.nethserver.org/projects/nethserver-devel/en/v7/building_rpms.html

Known issue

@giacomo hit a bug with a Fedora 29 runc package, which is a Podman component. Only SELinux-disabled machines should be affected. The fix should be released soon, as it’s already available from https://koji.fedoraproject.org/koji/buildinfo?buildID=1254913

1 Like

This:

seems like a pretty big problem, since it’s the exact opposite of what is (1) required for nethserver-mock (where you must not be root), and (2) sound RPM building practice in any event. Moreover, having makerpms and make-rpms use completely different mechanisms sounds like it’s bound to create confusion.

As a side note, the “Edit on GitHub” links at the top of the documentation pages are broken.

1 Like

You’re right, root builds are not a good practice. I’d wait to see if Podman receives a better support in CentOS 7.7 before stating it is not supported at all in NS7.

I just wanted to make them live together on the same system, avoiding conflictes. However only one of them is required, as they make the same thing.

All modules docs have a broken link because the source is not what ReadTheDocs expects, as its outside of the source tree and is downloaded at build time. I think we can’t fix that, unless we find a rtd/Sphinx feature that allows to point an individual page to its own specific source URL.

nethserver-mock is broken with fedora30, hopefully nethserver-makerpms works for me :slight_smile:

I’m using nethserver-mock on fedora 30 without problems.

I don’t know why I needed to do this

maybe you did the trick before

Question @davidep how to modify the mock configuration, do the one of /etc/mock/ are used?