Mailinglist Archive: opensuse-buildservice (256 mails)

< Previous Next >
Re: [opensuse-buildservice] How to add extra package rpm into OBS project repo but not deleted when project rebuild (a solution)
  • From: "Dominig ar Foll (Intel OTC)" <dominig.arfoll@xxxxxxxxx>
  • Date: Thu, 11 Aug 2011 15:37:59 +0200
  • Message-id: <4E43DB37.10003@fridu.net>
Yan,

here is one model that you can use as a template to solve your problem.
A package created under that mode will create a noarch RPM which when
installed will copy the binary blobs at the right place.

You can then define dependency with other packages or include it in
groups as you would do with any other rpm and OBS will manage the task
for you transparently.

Enjoy.

Dominig


1) Spec file
==========

1. Name: my-binary-blobs
2. Summary: Firmware for my device
3. License: My license (note that to sit on MeeGo.com it must
be at least redistributable)
4.
5. Version: xx.yy.zz
6. Release: nn.mm
7.
8. Group: System/Kernel
9. Source0: %{name}-%{version}.tar.bz2
10. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
11. BuildArch: noarch
12.
13. %description
14. Low level firmware for my device
15. License: Your licence
16. provide features for X, Y, Z
17.
18. %prep
19. %setup
20.
21. %build
22.
23. %install
24. rm -rf $RPM_BUILD_ROOT
25. mkdir -p -m 755 $RPM_BUILD_ROOT/lib/firmware
26. cp images/* $RPM_BUILD_ROOT/lib/firmware -a
27.
28. %clean
29. rm -rf $RPM_BUILD_ROOT
30.
31.
32. %files
33. %defattr(-,root,root)
34. /lib/firmware/mydevice/fileX
35. /lib/firmware/mydevice/fileY
36. /lib/firmware/mydevice/fileZ
37. %changelog
38. * date: dd/mm/yyyy myemail@xxxxxxxxxx - Version
39. - initial import

2) Tar file
===========
Your tar file will need to have the name corresponding to your spec
file. If you follow my template it should be :
my-binary-blobs-xx-yy-zz.tar.bz2
it should contain a directory named my-binary-blobs
and the filesX, Y Z should be in a subdirectory called mydevice.

3) Side effect
==============
It works very much like a normal rpm but REMEMBER, OBS does not have the
source code an so will not recompile anything. It's your duty to update
the binary blobs to remain compatible with the rest of your code.


Dominig ar Foll
MeeGo TV
Open Source Technology Centre
Intel SSG


Le 11/08/2011 11:18, Dominig ar Foll (Intel OTC) a écrit :
Hello,

if I understand well your need is to add an RPM which is not built by
OBS in an OBS managed repository.
With your method you will need to recreate your repo metadata every time
that your OBS trigger a rebuild.

I add a similar need in the past ad this is how I proceeded.

I had to add packages in an OBS Repos which could not be to be compiled
by the OBS (DSP code), my trick has been to add a package in the OBS
which has an empty %build macro in the package spec file. In my case.
My goal was to provide binary blobs for DSP firmware and the trick was
only to have a %install macro which copied the blob in the right place.

If you need only a source rpm as said in your mail, you can also have an
empty %build macro.

Dominig ar Foll
MeeGo TV
Open Source Technology Centre
Intel SSG


Le 11/08/2011 09:57, Wu, Yanping a écrit :

I tried to add extra package(rpms) into my OBS project repo(E.g
/srv/obs/repos/project/i586), When I run createrepo in OBS server, the
repodata will change correctly, and I can use the repo to install this
extra package.

But when there is check-in to the project, and it begins to rebuild.
The repo will republished. I found OBS automatically delete my extra
package in i586 directory. And the repodata doesn’t include it any
more. How can I solve this issue?

Hope for your help.

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >