Build Service is building a pakage in /usr/local but checking in /usr

There is a problem building an RPM with the Build Service. Everything goes OK until the check stage. The service installs files for the prefix /usr/local but tries to find them within /usr. Look for the package at

Here is the .spec file:

# spec file for package backitdown (Version 1.0.93)
# Copyright 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright 2011 Alexander Belkov <>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
Summary: File Synchronization and Backup Utility
Name: backitdown
Release: 1
License: BSD
Group: System/Backup
Source: %name-%version.tar.bz2
Packager: Alexander Belkov <>
BuildRequires: bison bzip2 cpio db diffutils findutils glibc-devel glibc-locale groff gzip libstdc++ m4 make man popt procinfo timezone util-linux gcc-c++ libbz2-devel wxGTK wxGTK-devel bundle-lang-common-en bundle-lang-common-en sqlite3-devel update-desktop-files
AutoReqProv: on
Requires: sqlite3 wxGTK
BuildRoot: %{_tmppath}/%{name}-%{version}-build

This application will help you synchronize folders or
files between different computers or storage devices.
You can also backup or restore files onto / from external
drives such as USB flash drives or hard-disks.
All you have to do is create a project and with
a few mouse clicks the job is done.

%setup -q

/bin/bash configure

make check

%find_lang %{name}
%suse_update_desktop_file backit System Backup


%files -f %{name}.lang

%dir %{_datadir}/backit/
%dir %{_datadir}/backit/help/
%dir %{_datadir}/backit/help/common/
%dir %{_datadir}/backit/help/en/
%dir %{_datadir}/backit/help/ru/


* Mon Jun 27 2011
- update to
  * Fixed syncing only user-approved files
  * Added files filtering on synchronization approval dialog
* Sun Jun 26 2011
- update to
  * Some locale fixes for RPM to be built
  * Because of packaging conflicts wxsqlite3 sources have been
    included to the project and linked statically

And building log excerpts follow:

make[3]: Entering directory `/usr/src/packages/BUILD/backitdown-'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/src/packages/BUILDROOT/backitdown-"
  /bin/sh ../libtool   --mode=install /usr/bin/install -c backit '/usr/src/packages/BUILDROOT/backitdown-'
libtool: install: /usr/bin/install -c backit /usr/src/packages/BUILDROOT/backitdown-
Processing files: backitdown-
error: File not found: /usr/src/packages/BUILDROOT/backitdown-

Same projects is built for OpenSuSE 11.4 OK, but not in 11.3
Did I overlook something?

Misspelled the link - that one is built OK. The problem one is

I remember that somewhere in the tutorials it says that RPM packages should not install executables under /usr/local/
Maybe that is the problem.

You need to change your configure…

configure --prefix=%{_prefix}

In the files section the %{_bindir} resolves to /usr/bin etc hence your error.

You can check all the configure options locally if you unpack the source and use;

configure --help

I remember that somewhere in the tutorials it says that RPM packages should not install executables under /usr/local/

Agree, but how to tell OBS not to install into /usr/local?

You need to change your configure…

configure --prefix=%{_prefix}

Thanks, malcolmlewis, I’ll try this. But I thought %{_prefix} was set to --prefix, not vice versa.
My first idea was to use

%files -f %{name}.lang

instead of

%files -f %{name}.lang

Maybe that was the better option?

configure --prefix=%{_prefix}

That settled the matter.

By the way, analogical .spec for OpenSuSE 11.4 directs configuration differently:


I think that’s the reason it has been built without knocks-out.
Thanks anyone!

Correct, as OBS evolves (and openSUSE versions) things like
%configure, %make_install, %makeinstall etc take care of things. But if
your also wanting to build for SLE some won’t work as the macros used
have not been backported.

Using configure like you did would make it easier to use across
different releases and OS’s (eg Fedora). It all depends on your

It’s always good to stooge around on the OBS and look at other spec
files to see how things are done.

Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel
up 1 day 19:21, 4 users, load average: 0.08, 0.03, 0.08
GPU GeForce 8600 GTS Silent - Driver Version: 270.41.06

I have similar problem with package Openshot 1.4.0, see It fails and in the log you can see, that in BUILDROOT there’s path /usr/local for files, but it looks for them in /usr. Solution from previous posts can’t be applied here, because it’s Python app and there’s no configure script, only I can’t figure out where is the bug.

Patch the python via sed to replace the /usr/local/

Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (i586) Kernel
up 22:07, 1 user, load average: 0.06, 0.04, 0.00
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

That’s the funniest thing, there’s no such text in this file. It must take it from somewhere else.

It’s on packman;

Set the prefix option.

Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel
up 0:02, 3 users, load average: 0.55, 0.43, 0.18
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

Thank you, now the package builds OK :slight_smile: