Building packages in COPR with own settings

Let’s start from some story behind. Let’s look at createrepo_c, it supports building with/without DRPM library. In RPM spec file we have:

%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with drpm
%bcond_without drpm

%if %{with drpm}
BuildRequires:  drpm-devel

Which means on RHEL8+ and other distros it will require at the build-time drpm-devel which is correct, and will not require it on RHEL7-. We don’t have drpm package in RHEL7- so it’s correct.

Now I want to build createrepo_c with drpm support for RHEL7 on COPR. I already built drpm there, but createrepo_c will not use drpm because %bcond_with disables option by default and allows you to enable it. Unfortunately (or fortunately) there is no way to pass parameters like --with drpm to COPR like to rpmbuild.. So we need to create package with RPM macros which will enable this option for us. Let’s create it!

Name:           drpm-rpm-macros
Version:        1
Release:        1%{?dist}
Summary:        RPM macros to enable DRPM

License:        Public Domain

BuildArch:      noarch
Provides:       drpm-macros = %{version}-%{release}


We have on EL7 and below %bcond_with drpm, but we want to enable DRPM.

%autosetup -c -D -T

# Nothing to build

mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d/
echo '%_with_drpm 1' > %{buildroot}/%{_rpmconfigdir}/macros.d/macros.drpm


* Tue Apr 12 2016 Igor Gnatenko <> - 1-1
- Initial package

Now we need to create src.rpm for this package and submit for building to the COPR. Once it’s done we need to modify buildroot options to always install this package. Just open settings of the project, click edit button on interesting chroot (in my case it’s epel-7-x86_64), add drpm-rpm-macros to the packages line and save. In all next builds in this chroot you will have drpm-rpm-macros installed automatically.

Now we can submit building of createrepo_c without any changes and it will be built with enabled drpm feature.

How-to set up network audio server based on PulseAudio and auto-discovered via Avahi

Today i played with my cubietruck and wanted to make network audio server. I just open laptop, connect to WiFi, choose remote sound device in gnome-control-center and listen music.

First of all I’d want to say many thanks to Jonas Wielicki for help with debugging problems and providing his ansible playbook with the same task, Stefan Majewsky who inspired Jonas about configuration management and to Felipe Sateler for tip with permissions.

Server configuration

I have installed minimal Fedora so it means that I don’t have avahi, pulseaudio and other tools in system. Let’s install them:

# dnf install pulseaudio pulseaudio-module-zeroconf avahi

Continue reading →

Fedora, tracker RSS miner and sqlite FTS support

Hi readers, as you might know Allan Day gave us initial mockups for new GNOME project – News. This post is not about first preview working application, this post is about how we started writing application and how we helping other GNOME and Fedora projects 🙂

GNOME News mockup

With Vadim Rutkovsky we started working on this app yesterday’s night. We did choose to use tracker as storage backend and libgrss as our fetcher engine.

But we found some issues with them:

  • libgrss ships its .gir and .typelib in wrong directory – FIX. I spotted this when packaged libgrss, not when we started coding
  • libgrss introspection a bit wrong because it’s provides us gpointer instead of GrssFeedItem – FIX
  • tracker wants older name of libgrss (libgrss-0.6), but API/ABI have not broken and 0.5 version doesn’t work for us – FIX

Okay, we fixed this in upstream, cherry-picked changes to Fedora, but after enabling FTS support in Fedora’s sqlite – tracker doesn’t work on my laptop. I’ve spent a lot of time with trying to decide what happens there.

I gave SSH to my laptop for Carlos Garnacho and he realized that FTS support at compile-time was not enabled and tracker tries to load its own FTS, but actually FTS module from sqlite already loaded, so we got trying to load 2 the same modules (from sqlite and from tracker) twice.

Then I started rebuilding tracker in Fedora and got the same FTS not enabled at compile-time. The problem was with broken CFLAGS/LDFLAGS in m4 macro. In parallel I also found that /usr/bin/tracker-control has no executable flag and there are no tracker-compat binary. All those fixed in 1.5.0. Finally I updated tracker in Fedora to 1.5.0 with enabled FTS and RSS support – Koji build.

Feel free to join our channel in IRC: #gnome-news at GimpNet

Continue reading →

SuperTuxKart 0.9 landed in Fedora

As you probably noticed that SuperTuxKart 0.9 released ~ 1 month ago. I tried to build it in the same day, but build failed on ARM architecture. I looked at build logs and found that they again added another bundled library – angelscript. I didn’t have time to fix it, but I got some free days in this week. I added new package with angelscript in Fedora and built new version of supertuxkart today for rawhide and will do the same for F22 at next week.
SuperTuxKart 0.9

If you are interested – please read more long story..
Continue reading →

Building GNOME Calendar on Fedora

If you tried to build GNOME Calendar on Fedora you’ve got error like this:

  CCLD     gnome-calendar
gcal-event-widget.o: In function `gcal_event_widget_is_multiday':
/home/brain/git/GNOME/gnome-calendar/src/gcal-event-widget.c:1033: undefined reference to `icaltime_days_in_year'

This is because bug in libical and fixed in 1.0.1 release (Fedora 20+ provides 1.0). What do you want? Update libical and libical-devel to new release. You can just enable my COPR repository (ignatenkobrain/gnome-calendar) and update/install that packages. Also you can install latest release version of gnome-calendar for repo, but it’s under heavy development and I’d recommend to try it using jhbuild.

P.S. We are going to have GNOME Calendar in Fedora 22+. You can track review request in RHBZ.

CI for mesa in Fedora Project

Today I played with jenkins for my primary work. I wanted to check sources periodically and if it has been changed – build new RPM package from new git version. I have started playing with mesa, because I maintain it in Fedora and has git version in Rawhide which I’m building from time to time from git.

Q: What it’s doing right now?
A: Checking if there new upstream commits, updating .spec file, commiting to fedorapeople git repository, copying .src.rpm to fedorapeople http site and submitting to build in COPR repo.

Q: How I can use this CI and what version of Fedora I need?
A: You can use this CI only on Fedora Rawhide. You can enable repo via # dnf copr enable ignatenkobrain/mesa and update packages.

How I built this in jenkins?
Continue reading →