Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Releasing U++ » A new set of scripts to create rpm file from Subversion
A new set of scripts to create rpm file from Subversion [message #18543] Tue, 07 October 2008 16:20 Go to next message
chickenk is currently offline  chickenk
Messages: 169
Registered: May 2007
Location: Grenoble, France
Experienced Member
Hi all,

I customized a bit the scripts given for rpm construction and added a small script to adapt the construction to the svn version.

What it does:

--- A --- upp-prepare-archive
1. Moves ~/upp directory to ~/upp___orig for backup
2. Does a 'svn export' of needed directories in ~/tmp-upp and create a symbolic link from tmp-upp to upp ('upp' directory name is needed for step 3)
3. Uses theide commandline to generate an up-to-date Makefile for 'ide' package
4. Modifies the Makefile to make it more generic and correct the optimization flags
5. Adds a top-level Makefile to be called by rpmbuild
6. Adds the whole ~/upp content in the file ~/rpm/SOURCES/upp-src-svn.tar.gz
7. Removes the upp symbolic link and rename upp___orig to upp

--- B --- rpmbuild
When your rpmbuild configuration is ready (see .rpmrc and .rpmmacros), you can then execute
rpmbuild -bb ~/rpm/SPECS/upp-svn.spec
and wait...

RPM file(s) will be created in ~/rpm/RPMS/...

What is included:

the archive can be safely extracted in your home directory. You will get:
- Some files created under "rpm" (they won't overwrite other ones, don't worry), specifically some patches and the upp-svn.spec file
- dot_rpmrc and dot_rpmmacros: to be used as a basis for .rpmrc and .rpmmacros files if you don't already have them
- upp-prepare-archive in your home directory.

I want a rpm file built from scratch using the current svn revision! What should I do ?

simply type:
cd ~ && ./upp-prepare-archive && rpmbuild -bb ~/rpm/SPECS/upp-svn.spec

To install it, you must add the --nogpgcheck option (or equivalent).

It has been tested under Fedora 9 only.

I AM AN EXTREME BEGINNER IN RPM CONSTRUCTION! USE THIS AT YOUR OWN RISK! YOU HAVE BEEN WARNED.

As you will see, upp-prepare-archive is an ugly hack. Really. So please be careful, backup your upp directory in case, and don't blame me if you loose some data. Rule of thumb: never do this as root..

If someone (amrein?) wants to gather and maintain these scripts with the existing ones, I'll be happy since I really don't have time to maintain it. Sorry for that. Maybe later... Furthermore, people who already master rpm construction will be much more efficient than me.

Enjoy.

Lionel

[Updated on: Fri, 10 October 2008 13:54]

Report message to a moderator

Re: A new set of scripts to create rpm file from Subversion [message #18544 is a reply to message #18543] Tue, 07 October 2008 16:26 Go to previous messageGo to next message
chickenk is currently offline  chickenk
Messages: 169
Registered: May 2007
Location: Grenoble, France
Experienced Member
As a bonus, here is the RPM file built for Fedora 9, against revision r512.

http://www.2shared.com/file/4053096/3d5325d6/upp-svn-svn-1i5 86.html

Again, use it at your own risk. It worked for me, That's all I can say.

Lionel
Re: A new set of scripts to create rpm file from Subversion [message #18714 is a reply to message #18544] Sat, 18 October 2008 09:53 Go to previous messageGo to next message
chickenk is currently offline  chickenk
Messages: 169
Registered: May 2007
Location: Grenoble, France
Experienced Member
Did anybody try these scripts ? Some feedback would be welcome.

I use them regularly now to update Upp to the head revision on my Fedora, and it suits my needs.

Lionel
Re: A new set of scripts to create rpm file from Subversion [message #18722 is a reply to message #18714] Sat, 18 October 2008 19:33 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13985
Registered: November 2005
Ultimate Member
Now if you want to try something really hard, but extremely useful... Smile

I believe that the future of releases is in nightly builds. Those are to be performed on Ubuntu 64, using chroot environment where required.

Maybe you can try if this could work?

Mirek
Re: A new set of scripts to create rpm file from Subversion [message #18737 is a reply to message #18722] Sun, 19 October 2008 09:08 Go to previous messageGo to next message
chickenk is currently offline  chickenk
Messages: 169
Registered: May 2007
Location: Grenoble, France
Experienced Member
luzr wrote on Sat, 18 October 2008 19:33

Now if you want to try something really hard, but extremely useful... Smile

I believe that the future of releases is in nightly builds. Those are to be performed on Ubuntu 64, using chroot environment where required.

Maybe you can try if this could work?

Mirek


Unfortunately I don't have any Ubuntu distro available. I prefer Ubuntu to Fedora, but I was not given the choice... So during my spare time I used the tool made for Fedora, i.e. RPM-based distribution.

1. I've never been into deb-based package building (using buildpkg, right? I'm not even sure of the tool Rolling Eyes )

2. But you're right about the chroot. It's a really clean and safe way to do the job. I will think about it in a generic way, that would prepare the environment (i.e. svn export, build environment configuration, patch sources if wanted, dynamic Makefile generation). When the chroot environment would be ready, it may be suitable for RPM and DEB package construction. That may be the first stone to the nightly build system. If I have more time (really too much work right now), I'll try to think about that.

Lionel
Re: A new set of scripts to create rpm file from Subversion [message #18738 is a reply to message #18737] Sun, 19 October 2008 09:19 Go to previous message
chickenk is currently offline  chickenk
Messages: 169
Registered: May 2007
Location: Grenoble, France
Experienced Member
Does anybody know about fakeroot (http://fakeroot.alioth.debian.org/) ? It is used by buildroot to create embedded distributions, and seems to be quite useful in building packages. If anybody tried it, I would be happy to get some advices.

Thanks
Lionel
Previous Topic: Next Win32 release note
Next Topic: src release
Goto Forum:
  


Current Time: Sun Jun 16 16:40:50 CEST 2024

Total time taken to generate the page: 0.01355 seconds