classic 3-step installation combined with rpm
Dear list, is it possible to turn a "make install" from filesystem to rpm? I want to have a individual rpm for my system so after "./configure & make & make installrpm" I just have to install the rpm. It would be easier to test something. Any suggestions?
On 2006-05-04 16:24:51 +0200, Johannes Nohl wrote:
is it possible to turn a "make install" from filesystem to rpm? I want to have a individual rpm for my system so after "./configure & make & make installrpm" I just have to install the rpm. It would be easier to test something.
checkinstall but writing spec files is not rocket sience. see http://en.opensuse.org/SUSE_Build_Tutorial and i attached a nice sample spec file. it isnt the minimal case but it shows subpackages aswell. hope this helps darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On Thu, May 04, 2006 at 04:38:31PM +0200, Marcus Rueckert wrote:
On 2006-05-04 16:24:51 +0200, Johannes Nohl wrote:
is it possible to turn a "make install" from filesystem to rpm? I want to have a individual rpm for my system so after "./configure & make & make installrpm" I just have to install the rpm. It would be easier to test something.
checkinstall
I have a script called ins that has the following: ##ins ./configure #obvious wait make $obvious wait sux -c 'checkinstall --rpmu --install=yes' # Make the RPM and install it wait createrepo /usr/src/packages/RPMS # Make it available for YaST in the future. Add that dir # as an installation source
but writing spec files is not rocket sience. see http://en.opensuse.org/SUSE_Build_Tutorial
It might be overkill if you just want to check out a program. I only use it for programs that I want to distribute to others. houghi -- Nutze die Zeit. Sie ist das Kostbarste, was wir haben, denn es ist unwiederbringliche Lebenszeit. Leben ist aber mehr als Werk und Arbeit, und das Sein wichtiger als das Tun - Johannes Müller-Elmau
On 2006-05-04 17:07:13 +0200, houghi wrote:
but writing spec files is not rocket sience. see http://en.opensuse.org/SUSE_Build_Tutorial
It might be overkill if you just want to check out a program. I only use it for programs that I want to distribute to others.
normally you will compile it 1-2 times. than it is nice to have a script to have reproducable results. furthermore it is nice to be able to uninstall cleanly. and hacking up a dirty minimal spec file doesnt take you much longer than without it. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On Thu, May 04, 2006 at 05:28:51PM +0200, Marcus Rueckert wrote:
On 2006-05-04 17:07:13 +0200, houghi wrote:
but writing spec files is not rocket sience. see http://en.opensuse.org/SUSE_Build_Tutorial
It might be overkill if you just want to check out a program. I only use it for programs that I want to distribute to others.
normally you will compile it 1-2 times. than it is nice to have a script to have reproducable results. furthermore it is nice to be able to uninstall cleanly.
That is the reason I wrote that 'script'. You could even put it in an alias. The checkinstall I just put there so that if I want to try out the program later again, I can use YaST to reinstall it.
and hacking up a dirty minimal spec file doesnt take you much longer than without it.
It does for me. houghi -- Nutze die Zeit. Sie ist das Kostbarste, was wir haben, denn es ist unwiederbringliche Lebenszeit. Leben ist aber mehr als Werk und Arbeit, und das Sein wichtiger als das Tun - Johannes Müller-Elmau
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Thursday 2006-05-04 at 17:07 +0200, houghi wrote:
I have a script called ins that has the following: ##ins ./configure #obvious wait make $obvious wait sux -c 'checkinstall --rpmu --install=yes' # Make the RPM and install it wait createrepo /usr/src/packages/RPMS # Make it available for YaST in the future. Add that dir # as an installation source
Very similar to what I do ;-) I have a script in ~/bin/checkinstall: #!/bin/sh case "$1" in geda) sudo /usr/sbin/checkinstall --arch=i686 --pkgname=geda --pkggroup=Compilaciones/Engineering/gEDA --pkgaltsource=www.geda.seul.org 'CFLAGS="-O2 -march=pentium4" make install' ;; *) echo "Wrapper para checkinstall. Dime cual proyecto" ;; esac So that next time I recompile that project I can use the same options I did last time. But 'createrepo' is new for me, didn't know it. Interesting ;-)
but writing spec files is not rocket sience. see http://en.opensuse.org/SUSE_Build_Tutorial
It might be overkill if you just want to check out a program. I only use it for programs that I want to distribute to others.
I never wrote a spec file, don't know how. Maybe I will one day if I intent to provide rpms for other people, but for my own use checkinstall is just perfect. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEWoottTMYHG2NR9URAnA0AJ0Z/IQksVOm7SsDdZicEwLsgqgxzgCaA8Cz tJtNC61/Fl7BoRcnXQaQQbY= =pEGP -----END PGP SIGNATURE-----
On Fri, May 05, 2006 at 01:11:40AM +0200, Carlos E. R. wrote:
It might be overkill if you just want to check out a program. I only use it for programs that I want to distribute to others.
I never wrote a spec file, don't know how. Maybe I will one day if I intent to provide rpms for other people, but for my own use checkinstall is just perfect.
I was 'forced' with making the makeSUSEdvd rpm. Took me a while to get it right. Most likely it still is full of mistakes, but sofar no complaints. :-) houghi -- Nutze die Zeit. Sie ist das Kostbarste, was wir haben, denn es ist unwiederbringliche Lebenszeit. Leben ist aber mehr als Werk und Arbeit, und das Sein wichtiger als das Tun - Johannes Müller-Elmau
houghi wrote:
On Fri, May 05, 2006 at 01:11:40AM +0200, Carlos E. R. wrote:
It might be overkill if you just want to check out a program. I only use it for programs that I want to distribute to others. I never wrote a spec file, don't know how. Maybe I will one day if I intent to provide rpms for other people, but for my own use checkinstall is just perfect.
Sure. checkinstall is nice for just building RPMs to keep track of files, for your very own use. But don't, never, ever build RPMs with checkinstall if you plan to distribute them to other people. It will just lack the needed quality to be rebuildable on other architectures or other distribution versions (no BuildRequires, amongst others). Note that it's not worth much when you package a daemon, because you have to write SUSE-specific .init scripts, possibly a /etc/sysconfig file, a logrotate configuration, an rc-symlink in /usr/sbin, %pre/%post macros for stopping the service before removal or upgrade, etc... Also, you quite often have to patch sources (autotools or Makefile files) to make them work properly on 64bit installations: - use lib64 instead of lib, - use intptr_t instead of int for pointer arithmetics, - use CFLAGS/CXXFLAGS appropriately to be able to pass target specific flags and optimizations (including security stuff like -D_FORTIFY_SOURCE=2 with GCC 4.x on SUSE 10.0 upwards) - explicitely include headers like string.h for explicit memcpy, strcpy, etc.. prototypes (for having -D_FORTIFY_SOURCE actually verify allocations and access) instead of implicit prototyping With GNOME applications, you quite often have to provide %post hooks to inject gconf configurations at package installation time. With KDE you should use unsermake instead of make. And of course, you should always install files into the correct directories, which is not always trivial on SUSE as it uses e.g. /opt/gnome and /opt/kde3 instead of /usr like almost every other distribution does. So there are quite some gotchas involved to write good .spec files and good RPM packages that work on 32bit and 64bit, that are consistently rebuildable, integrate properly into the distribution, play nice with other packages, etc... That being said, it's definitely better to have software built from source in an RPM with checkinstall than just doing "make install" as root without tracking it. Just don't distribute those RPMs to others ;)
I was 'forced' with making the makeSUSEdvd rpm. Took me a while to get it right. Most likely it still is full of mistakes, but sofar no complaints.
If you need help or advice or would like an experienced packager to
have a look at it, just submit the spec to opensuse-packaging@opensuse.org
cheers
--
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\
On Fri, May 05, 2006 at 12:42:07PM +0200, Pascal Bleser wrote:
I never wrote a spec file, don't know how. Maybe I will one day if I intent to provide rpms for other people, but for my own use checkinstall is just perfect.
Sure. checkinstall is nice for just building RPMs to keep track of files, for your very own use.
<snip>
That being said, it's definitely better to have software built from source in an RPM with checkinstall than just doing "make install" as root without tracking it. Just don't distribute those RPMs to others ;)
I have done that *and* told them it was build with checkinstall, so it might not be working for whatever reason. Till now it always worked. Cheer luck, I guess. :-)
I was 'forced' with making the makeSUSEdvd rpm. Took me a while to get it right. Most likely it still is full of mistakes, but sofar no complaints.
If you need help or advice or would like an experienced packager to have a look at it, just submit the spec to opensuse-packaging@opensuse.org
I might if I hear about a problem. What I am afraid of is that opensuse-packaging sees an error and corrects it, making it useless for e.g. Mandrake. So for now I say: If it ain't broke, don't fix it. ;-) houghi -- Nutze die Zeit. Sie ist das Kostbarste, was wir haben, denn es ist unwiederbringliche Lebenszeit. Leben ist aber mehr als Werk und Arbeit, und das Sein wichtiger als das Tun - Johannes Müller-Elmau
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2006-05-05 at 14:44 +0200, houghi wrote:
I have done that *and* told them it was build with checkinstall, so it might not be working for whatever reason. Till now it always worked. Cheer luck, I guess. :-)
Have you used checkinstall in 10.1? I find it "unstable", it fails often and randomly. Then I try to install the same package with "make install" and it works. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEW+dhtTMYHG2NR9URArCFAJ9wpN4LeE+pSMnuo+QbT+2Lnaea6wCffNeL E7HOynDYFQwLi7jjjIsKxko= =0lh2 -----END PGP SIGNATURE-----
On Sat, May 06, 2006 at 02:01:23AM +0200, Carlos E. R. wrote:
I have done that *and* told them it was build with checkinstall, so it might not be working for whatever reason. Till now it always worked. Cheer luck, I guess. :-)
Have you used checkinstall in 10.1? I find it "unstable", it fails often and randomly. Then I try to install the same package with "make install" and it works.
No, I have not. Just curious, what is the bugreport number? houghi -- Nutze die Zeit. Sie ist das Kostbarste, was wir haben, denn es ist unwiederbringliche Lebenszeit. Leben ist aber mehr als Werk und Arbeit, und das Sein wichtiger als das Tun - Johannes Müller-Elmau
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2006-05-06 at 02:58 +0200, houghi wrote:
Have you used checkinstall in 10.1? I find it "unstable", it fails often and randomly. Then I try to install the same package with "make install" and it works.
No, I have not. Just curious, what is the bugreport number?
I haven't reported anything officially, because I can't pinpoint it. I will try again when I have more time and can test it, then I'll report here for discussion, probably. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEXMZstTMYHG2NR9URAjlHAJ9qs62THe7swohQzF4FOonakCMu0gCgi3Jo S9HJ6fwsnrech9m/cZOPSuA= =ufnM -----END PGP SIGNATURE-----
On Sat, May 06, 2006 at 05:53:15PM +0200, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Saturday 2006-05-06 at 02:58 +0200, houghi wrote:
Have you used checkinstall in 10.1? I find it "unstable", it fails often and randomly. Then I try to install the same package with "make install" and it works.
No, I have not. Just curious, what is the bugreport number?
I haven't reported anything officially, because I can't pinpoint it. I will try again when I have more time and can test it, then I'll report here for discussion, probably.
Well, if it is not reported, it is not known. If it is not known, it will not be looked at. If nobody lookes at it, it won't be solved. As SUSE is now in GM, it won't be solved for 10.1. :-( houghi -- Nutze die Zeit. Sie ist das Kostbarste, was wir haben, denn es ist unwiederbringliche Lebenszeit. Leben ist aber mehr als Werk und Arbeit, und das Sein wichtiger als das Tun - Johannes Müller-Elmau
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2006-05-06 at 18:00 +0200, houghi wrote:
No, I have not. Just curious, what is the bugreport number?
I haven't reported anything officially, because I can't pinpoint it. I will try again when I have more time and can test it, then I'll report here for discussion, probably.
Well, if it is not reported, it is not known. If it is not known, it will not be looked at. If nobody lookes at it, it won't be solved. As SUSE is now in GM, it won't be solved for 10.1. :-(
By the time I noticed, I had no idea that they jumped to GM already; I thought we would be testing RC4 "in the comunity". Now, it doesn't matter, no hurry, several months to think about it... And as I said, I wanted to know if other people could confirm problems; as you use it, I thought perhaps you had noticed something. If you haven't, then it is not so easy to reproduce. When I update to GM or when I buy 10.1 or whatever I'll try again. No use testing anything else in RC3, IMO. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEXgVbtTMYHG2NR9URAvc0AJwOOXzhptoNKuUFrQtc7aDkmmZv/wCfZ7Z/ VvaraprPCaS19AwZR7Rjf5k= =lOYy -----END PGP SIGNATURE-----
On Sun, May 07, 2006 at 04:34:02PM +0200, Carlos E. R. wrote:
And as I said, I wanted to know if other people could confirm problems; as you use it, I thought perhaps you had noticed something. If you haven't, then it is not so easy to reproduce.
I have not yet installed 10.1. I first want to solve my makeSUSEdvd problem before I can go on to the next step. One problem at a time. houghi -- Nutze die Zeit. Sie ist das Kostbarste, was wir haben, denn es ist unwiederbringliche Lebenszeit. Leben ist aber mehr als Werk und Arbeit, und das Sein wichtiger als das Tun - Johannes Müller-Elmau
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2006-05-07 at 16:45 +0200, houghi wrote:
I have not yet installed 10.1. I first want to solve my makeSUSEdvd problem before I can go on to the next step. One problem at a time.
Right. I'll switch to my translation project, which I neglected these days. ;-) - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD4DBQFEX2FItTMYHG2NR9URAgPnAKCFTLyZwLlScNZxC6x/G9y9XnxAKQCYgo+w /q7gJetqgZoFPhxmbVxIuw== =442G -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Thursday 2006-05-04 at 16:24 +0200, Johannes Nohl wrote:
is it possible to turn a "make install" from filesystem to rpm? I want to have a individual rpm for my system so after "./configure & make & make installrpm" I just have to install the rpm. It would be easier to test something.
Replace "make install" with "checkinstall". You will have to su to root or use sudo. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEWhl0tTMYHG2NR9URAnYiAJ0QUdbL3E/QlXiC9LtVgnZZv0N6FgCfWNnp /FF6Arfskx6Ql3HZlwSV+GU= =vAYs -----END PGP SIGNATURE-----
participants (5)
-
Carlos E. R.
-
houghi
-
Johannes Nohl
-
Marcus Rueckert
-
Pascal Bleser