|
|
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 |
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 #18737 is a reply to message #18722] |
Sun, 19 October 2008 09:08 |
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...
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 )
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
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 14:25:08 CEST 2024
Total time taken to generate the page: 0.03379 seconds
|
|
|