Re: [opensuse] building RPMs - was: uninstall source
Oops, I got caught out AGAIN, and sent this to Thomas and not the
list. Sorry, Thomas!
On 4/29/07, Thomas Hertweck
You should only use RPM packages - these packages can be installed and uninstalled without problems. Either get a ready-to-use RPM package from a repository, or build an RPM package on your system, or (at least) use checkinstall to build an RPM package (instead of using "make install"). Anything else will sooner or later screw up your system.
You know, I've always been uncomfortable with building from source for precisely the reasons you say, but it never occurred to me to build my own RPMs. I somehow had an idea that it would be a complicated process that only people who *distribute* software (and not all of them!) would find worth doing, and that for your home system you just had to go with "make install". I'm going to follow your advice. Johannes intimated above that checkinstall has a bad reputation, and you also don't seem to think too highly of it with your "(at least)". So what would be a good tool for this? I see that I have rpmbuild on my system so I'm tempted to use that, though the man page is not exactly a detailed instructions manual. Cheers. g -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
lists Guillot wrote:
Oops, I got caught out AGAIN, and sent this to Thomas and not the list. Sorry, Thomas!
On 4/29/07, Thomas Hertweck
wrote: You should only use RPM packages - these packages can be installed and uninstalled without problems. Either get a ready-to-use RPM package from a repository, or build an RPM package on your system, or (at least) use checkinstall to build an RPM package (instead of using "make install"). Anything else will sooner or later screw up your system.
You know, I've always been uncomfortable with building from source for precisely the reasons you say, but it never occurred to me to build my own RPMs. I somehow had an idea that it would be a complicated process that only people who *distribute* software (and not all of them!) would find worth doing, and that for your home system you just had to go with "make install".
I'm going to follow your advice. Johannes intimated above that checkinstall has a bad reputation, and you also don't seem to think too highly of it with your "(at least)". So what would be a good tool for this? I see that I have rpmbuild on my system so I'm tempted to use that, though the man page is not exactly a detailed instructions manual.
Cheers.
g Well, from my experinece, checkinstall may be "at least", but when it works, it works good. Unfortunately it does not work anytime. In my view it fails more often, when things get more complicated.
For anything else I would recommend to either go with "make install" or alternatively read and practise this: http://www.rpm.org/max-rpm/ have some fun Eberhard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2007-04-29 at 21:53 +0200, lists Guillot wrote:
I'm going to follow your advice. Johannes intimated above that checkinstall has a bad reputation,
Absolutely not!
and you also don't seem to think too highly of it with your "(at least)". So what would be a good tool for this? I see that I have rpmbuild on my system so I'm tempted to use that, though the man page is not exactly a detailed instructions manual.
You can use checkinstall with an absolutely clear conscience, there is nothing wrong with it. It is just that, if you intend to later distribute rpms outside, you'd better do them manually with full control of them. If you just want to install packages you compiled yourself, it is perfect. The only people talking bad about checkinstall are those people that invested the necessary time and effort to make rpms manually - ie, developers and packagers - and for the simple reason that checkinstall is automatic, instead of manual, fine grained, full control. Or would you stop using konqueror because the command line offers more control? Or stop using OpenOffice and write your documents in latex with vi? Fine tools, of course, but not for mere mortals :-P - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNPygtTMYHG2NR9URAg5LAJ9Zq9J2izFD+ipq5Y/gB5qwMeaq0wCdGoqy OGVAR47k+wG6woSP53d7Ql4= =AR2m -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 4/29/07, Carlos E. R.
You can use checkinstall with an absolutely clear conscience, there is nothing wrong with it. It is just that, if you intend to later distribute rpms outside, you'd better do them manually with full control of them. If you just want to install packages you compiled yourself, it is perfect.
The only people talking bad about checkinstall are those people that invested the necessary time and effort to make rpms manually - ie, developers and packagers - and for the simple reason that checkinstall is automatic, instead of manual, fine grained, full control.
Or would you stop using konqueror because the command line offers more control? Or stop using OpenOffice and write your documents in latex with vi? Fine tools, of course, but not for mere mortals :-P
Gotcha. Thanks. g -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
lists Guillot wrote:
[...] You know, I've always been uncomfortable with building from source for precisely the reasons you say, but it never occurred to me to build my own RPMs. I somehow had an idea that it would be a complicated process that only people who *distribute* software (and not all of them!) would find worth doing, and that for your home system you just had to go with "make install".
The "make install" procedure has some obvious drawbacks you might have just observed: uninstalling the software is a problem, the consistency of your system (RPM database) is a problem, etc. When you install software via "make install", then the RPM package manager does not know about it and cannot resolve dependencies or tell you about conflicts with already installed software. Therefore, you're better off installing all your software as RPM packages (if possible).
I'm going to follow your advice. Johannes intimated above that checkinstall has a bad reputation, and you also don't seem to think too highly of it with your "(at least)". So what would be a good tool for this? I see that I have rpmbuild on my system so I'm tempted to use that, though the man page is not exactly a detailed instructions manual.
checkinstall is a useful tool but has also some drawbacks. I think just give it a try. I would recommend the following order for installing new software (note that this is my personal opinion): 1) Think twice whether you need a new version or new software. New software will not only have new features, but most likely also new bugs. 2) Try and find a ready-to-use RPM with the version you like and built for your system (e.g. SuSE 10.0). You should be able to install this RPM without problems. If the RPM has lots of dependencies, it might be easier to add the corresponding repository as installation source (if a repository is available). 3) If a ready-to-use RPM does not exist, try to get a source-RPM (SRPM) and rebuild it on your system using "rpmbuild". This will create an RPM package on your local system which can then be installed. 4) If neither 2 nor 3 is possible, compile the source code on your local system and a) as an expert create your on .spec file and an RPM package or b) as a "normal" user use checkinstall to create an RPM package. This RPM package can then be installed as usual. You could also "borrow" a .spec file from an older SuSE SRPM and adjust it according to your needs (and for the new version). 5) As a last fallback solution, you can use "make install". However, think twice and note the obvious problems it might cause. If you want to learn more about RPM, have a look at the "Maximum RPM" book: http://www.rpm.org/max-rpm/ - however, it might be a bit tough since it is targeted rather at the developer than a normal user. The checkinstall homepage can be found here: http://asic-linux.com.mx/~izto/checkinstall/ - but I am sure you also find a SuSE repository that offers checkinstall RPMs. Hope this helps. Th. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Since it grew to a bigger discussion I'd like to give two more cents to it: My experience with checkinstall is a good one. I don't distribute the rpms. Most sources configured will install to /usr/local. I usually change this with --prefix to /usr. What I always wanted to know is if there's a global config to change it to /usr. Is anything wrong with /usr/local? SUSE don't use it as I could see. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Johannes Nohl wrote:
My experience with checkinstall is a good one. I don't distribute the rpms. Most sources configured will install to /usr/local. I usually change this with --prefix to /usr. What I always wanted to know is if there's a global config to change it to /usr.
No, there isn't. Note that if you're on a 64bit system, you should also always pass - --libdir=/usr/lib64 to configure
Is anything wrong with /usr/local? SUSE don't use it as I could see.
That's the idea. Packaged (RPM) stuff should go into /usr (or /opt/...),
stuff you install yourself, "manually" goes into /usr/local
/usr/local should never, ever be used as a target directory by RPM packages.
- --
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 00:17 +0200, Pascal Bleser wrote:
/usr/local should never, ever be used as a target directory by RPM packages.
Those distributed. Those we compile ourselves and make an rpm via checkinstall for our own personal use should go to /usr/local - exactly the same as a "make install" would do. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNR3FtTMYHG2NR9URApQqAJkBvTaaG5eJYLbrZXs38fnnbugfcACcDRng 9plUVNvWASlMl/gOX4/C3nU= =Zka9 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2007-04-29 at 23:04 +0200, Johannes Nohl wrote: ...
Most sources configured will install to /usr/local. I usually change this with --prefix to /usr. What I always wanted to know is if there's a global config to change it to /usr.
Is anything wrong with /usr/local? SUSE don't use it as I could see.
No, you should use "/usr/local", not "/usr", you got it wrong. The local tree is reserved precisely for those packages compiled /locally/, whereas the packager of the distro uses "/usr". This way it is easy to know which version is the "official" one and which is yours. Some people use a separate partition for /usr/local, so that we can format "/" while keeping our /usr/local intact. Ie, SuSE does not use "/usr/local" because it is reserved for *you*. ;-) One more detail: you will see that users may have the /usr/local/bin first in their path, but often root does not even have it included - on purpose so as to execute "official" programs only. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNR0utTMYHG2NR9URAhcIAKCTr6sFiReX1hhFbI0VeMQGdjhUpwCghqVt 70SMVKSSgD55v8+a7DxRcyk= =j51v -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
The Sunday 2007-04-29 at 23:04 +0200, Johannes Nohl wrote:
...
Most sources configured will install to /usr/local. I usually change this with --prefix to /usr. What I always wanted to know is if there's a global config to change it to /usr.
Is anything wrong with /usr/local? SUSE don't use it as I could see.
No, you should use "/usr/local", not "/usr", you got it wrong. The local tree is reserved precisely for those packages compiled /locally/, whereas the packager of the distro uses "/usr". This way it is easy to know which version is the "official" one and which is yours.
Some people use a separate partition for /usr/local, so that we can format "/" while keeping our /usr/local intact.
Ie, SuSE does not use "/usr/local" because it is reserved for *you*. ;-)
One more detail: you will see that users may have the /usr/local/bin first in their path, but often root does not even have it included - on purpose so as to execute "official" programs only.
What I do, is create a /home/local directory and then create /home/local/user etc., with symlinks from /usr/local. I have /home on it's own partition. -- Use OpenOffice.org http://www.openoffice.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2007-04-29 at 18:44 -0400, James Knott wrote:
What I do, is create a /home/local directory and then create /home/local/user etc., with symlinks from /usr/local.
Why? - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNSmptTMYHG2NR9URAnImAJ47H1QBd7abpzAravLNQu2uOXQABwCeP9aq zCFEyBKDFV1ktBlKC5nBDX0= =GeUB -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Carlos E. R. wrote:
The Sunday 2007-04-29 at 23:04 +0200, Johannes Nohl wrote: ...
Most sources configured will install to /usr/local. I usually change this with --prefix to /usr. What I always wanted to know is if there's a global config to change it to /usr.
Is anything wrong with /usr/local? SUSE don't use it as I could see.
No, you should use "/usr/local", not "/usr", you got it wrong. The local tree is reserved precisely for those packages compiled /locally/, whereas the packager of the distro uses "/usr". This way it is easy to know which version is the "official" one and which is yours.
Some people use a separate partition for /usr/local, so that we can format "/" while keeping our /usr/local intact.
No, I mean it: use /usr, not /usr/local So, you make a package "foo" yourself, e.g. with checkinstall. You prefix it to /usr/local because you don't redistribute it, because it's a "local package" (whatever that means: a package is either in the RPM database or not, there is no "local RPM database"). Now you install 10.3 on it, by using "new installation" instead of "system upgrade", because you've got /home and /usr/local on their own partitions. Guess what, the RPM database is in /var/lib/rpm, not in /usr/local. If you wipe / (but not /usr/local), it'll be broken anyway because the RPM database won't know anything about your "local package" in /usr/local Furthermore, maybe one day that package is provided by a SUSE repository (or packman, or build service, or suser-jengelh, or mine, ...), possibly with a different package name... You might install that package, but as your "local" and the "redistributed" packages use different prefixes, they will not conflict on files. Hence you'll end up with both versions installed. But if both packages are used as dependencies (read: shared libs or script interpreters), you might get into some rather funny behaviour. Quoting the FHS [1]: "/usr/local : Local hierarchy The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr. Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr." [1]http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY But what they're not accounting for is the RPM database. As I explained above: if you wipe /, you'll also wipe the RPM database and hence, the files of your package in /usr/local won't be in the RPM database (which is the same as having installed it with "make install" in the first place).
Ie, SuSE does not use "/usr/local" because it is reserved for *you*. ;-)
No, I stick with what I said: /usr/local is for what you install with "make install", not for RPMs (including RPMs built with checkinstall).
One more detail: you will see that users may have the /usr/local/bin first in their path, but often root does not even have it included - on purpose so as to execute "official" programs only.
Define "official". Packages redistributed in the openSUSE Build Service,
Packman, Guru, suser-*, etc... are all prefixed to /usr and not /usr/local.
cheers
- --
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 09:20 +0200, Pascal Bleser wrote:
Carlos E. R. wrote:
No, I mean it: use /usr, not /usr/local
So, you make a package "foo" yourself, e.g. with checkinstall. You prefix it to /usr/local because you don't redistribute it, because it's a "local package" (whatever that means: a package is either in the RPM database or not, there is no "local RPM database").
I know there is no local rpm database. So what? For one thing, I always update the system, so the database remains. I still keep packages I installed five years ago, listed in the rpm list. And even if I don't, I will still have my programs; orphaned from the database, but still there. If they sit in /usr, I loose them, which is worse.
and hence, the files of your package in /usr/local won't be in the RPM database (which is the same as having installed it with "make install" in the first place).
Ie, SuSE does not use "/usr/local" because it is reserved for *you*. ;-)
No, I stick with what I said: /usr/local is for what you install with "make install", not for RPMs (including RPMs built with checkinstall).
And I stick with my opinion of using /usr/local - we agree to disagree :-) If you worry about conflicts, then leave the local paths last. The non local version will be used.
One more detail: you will see that users may have the /usr/local/bin first in their path, but often root does not even have it included - on purpose so as to execute "official" programs only.
Define "official". Packages redistributed in the openSUSE Build Service, Packman, Guru, suser-*, etc... are all prefixed to /usr and not /usr/local.
Well, let's say packagers that provide official or semioficial packages. Whatever. Notice the "quotes", meaning the meaning of "official" is not strict. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNcAjtTMYHG2NR9URAswJAJ4nQyRFqPHB35sljxd9qYMAae8ImwCcCMZR lTHxA5x90KPONrBFc195Sxg= =NXK4 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (7)
-
Carlos E. R.
-
Eberhard Roloff
-
James Knott
-
Johannes Nohl
-
lists Guillot
-
Pascal Bleser
-
Thomas Hertweck