Trouble installing src.rpm
I'm have trouble installing this package: # rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm warning: /home/myhome/bin/MySQL-5.0.16-0.src.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 warning: user mysqldev does not exist - using root warning: user mysqldev does not exist - using root # I installed '/home/myhome/bin' as the first installation source in Yast. When I install using Yast I get the message 'MySQL not found on medium'. I'm using a clean install of Suse 10.0 How do I use rpm and/or Yast to install this package? Thanks, Jerome
Susemail wrote:
I'm have trouble installing this package:
# rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm warning: /home/myhome/bin/MySQL-5.0.16-0.src.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 warning: user mysqldev does not exist - using root warning: user mysqldev does not exist - using root #
This just shows you are installing a non SuSE package, and a src.rpm at that? Is that what you wanted? It shows it installed, but since it is a src.rpm, it just installs the spec file and sources, in your situation, under /usr/src/packages in the SPEC and SOURCES directories. It is ready to build a binary rpm, assuming you have all the dependencies needed to build the package.
I installed '/home/myhome/bin' as the first installation source in Yast. When I install using Yast I get the message 'MySQL not found on medium'. I'm using a clean install of Suse 10.0
How do I use rpm and/or Yast to install this package?
You need to install a binary rpm, i.e something like MYSQL-5.0.16-0.i586.rpm, which are architecture dependent. -- Joe Morris Registered Linux user 231871
On Tuesday 06 December 2005 02:45, Joe Morris (NTM) wrote:
Susemail wrote:
I'm have trouble installing this package:
# rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm warning: /home/myhome/bin/MySQL-5.0.16-0.src.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 warning: user mysqldev does not exist - using root warning: user mysqldev does not exist - using root #
This just shows you are installing a non SuSE package, and a src.rpm at that? Is that what you wanted?
Yes. I have an example in an article from Dec. Linux Magazine that uses MySQL 5 that I would like to explore. I want to make sure it gets into the rpm database and dependencies are resolved automatically. If I can't use the source rpm I'll try to use checkinstall, which works fine as long as it doesn't ask me any questions that I can't answer- and I'm afraid on this one it will.
It shows it installed, but since it is a src.rpm, it just installs the spec file and sources, in your situation, under /usr/src/packages in the SPEC and SOURCES directories. It is ready to build a binary rpm, assuming you have all the dependencies needed to build the package.
In this case it didn't install in these directories or anywhere else according to locate and manual inspection. In any case should'nt ' rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm' have built and installed the rpm with dependencies? Jerome
I installed '/home/myhome/bin' as the first installation source in Yast. When I install using Yast I get the message 'MySQL not found on medium'. I'm using a clean install of Suse 10.0
How do I use rpm and/or Yast to install this package?
You need to install a binary rpm, i.e something like MYSQL-5.0.16-0.i586.rpm, which are architecture dependent.
-- Joe Morris Registered Linux user 231871
On Wednesday 07 December 2005 00:45, Susemail wrote:
In this case it didn't install in these directories or anywhere else according to locate and manual inspection. In any case should'nt ' rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm' have built and installed the rpm with dependencies?
No. That's not the way src.rpm works. You have the source files in /usr/src/packages/SOURCES and the spec file in /usr/src/packages/SPECS. If manual inspection didn't show this, then you didn't do it right, because that is where they will be after you install a src.rpm And how could it possibly build dependencies? It is sort of against the idea of dependencies. If they were included, they wouldn't be dependencies To rebuild the source rpm, you would use "rpmbuild --rebuild" on the src.rpm But why not use the binary rpm available for download from mysql.com?
On Tuesday 06 December 2005 07:07 pm, Anders Johansson wrote:
On Wednesday 07 December 2005 00:45, Susemail wrote:
In this case it didn't install in these directories or anywhere else according to locate and manual inspection. In any case should'nt ' rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm' have built and installed the rpm with dependencies?
No. That's not the way src.rpm works. You have the source files in /usr/src/packages/SOURCES and the spec file in /usr/src/packages/SPECS. If manual inspection didn't show this, then you didn't do it right, because that is where they will be after you install a src.rpm
As a slight aside to this question; I recently tried to do an install of an .src and it failed for dependencies. Yet the SOURCES and SPECS for that rpm were found in those respective files. I guess they are useless to me and I could just go in and delete them, no? I also have a ton of files in SOURCES from previous builds. I guess they could be deleted also, right? And, if I do a rebuild of an .src file and it is successful I would find it in the SRPMS directory, right? Have more questions but I am old and confused and it is very late. Bob S.
On Wednesday 07 December 2005 06:51, B. Stia wrote:
As a slight aside to this question; I recently tried to do an install of an .src and it failed for dependencies. Yet the SOURCES and SPECS for that rpm were found in those respective files. I guess they are useless to me and I could just go in and delete them, no? I also have a ton of files in SOURCES from previous builds. I guess they could be deleted also, right?
Sure. If you don't need them anymore, you can delete them. They are not entered in any database, so you don't have to go through any special procedure to uninstall, rm will do nicely
And, if I do a rebuild of an .src file and it is successful I would find it in the SRPMS directory, right?
No, if you use the -ba (build all) switch with rpmbuild, it will also create a new src.rpm, and if it does, that will be placed in the SRPMS directory. The new binary rpm will be placed somewhere under RPMS (exactly where depends on your architecture)
Have more questions but I am old and confused and it is very late.
:)
Anders Johansson wrote:
On Wednesday 07 December 2005 06:51, B. Stia wrote:
As a slight aside to this question; I recently tried to do an install of an .src and it failed for dependencies. Yet the SOURCES and SPECS for that rpm were found in those respective files. I guess they are useless to me and I could just go in and delete them, no? I also have a ton of files in SOURCES from previous builds. I guess they could be deleted also, right?
Sure. If you don't need them anymore, you can delete them. They are not entered in any database, so you don't have to go through any special procedure to uninstall, rm will do nicely
And, if I do a rebuild of an .src file and it is successful I would find it in the SRPMS directory, right?
No, if you use the -ba (build all) switch with rpmbuild, it will also create a new src.rpm, and if it does, that will be placed in the SRPMS directory. The new binary rpm will be placed somewhere under RPMS (exactly where depends on your architecture)
"rpmbuild -ba" use a spec to control its processing, and uses source files from your SOURCES directory. "rpmbuild --rebuild" operates directly on a src.rpm. Which to use depends on your circumstances: if yoo need to make changes (eg to adapt a Red Hat package to SUSE), then use rpm -i to install it, and rpm -ba to create new binary and src.rpm.s And I have seen dependancy problems when installing a src.rpm. In my case, I found applying a little force was in order.
Have more questions but I am old and confused and it is very late.
:)
Before asking, try some of these things our, and read the rpm documentation. I find I learn better by doing and by trying to do than by asking.
On Wednesday 07 December 2005 10:22, John Summerfield wrote:
And I have seen dependancy problems when installing a src.rpm. In my case, I found applying a little force was in order.
There will never be dependency problems when installing a src.rpm. There may be when you try to build/rebuild it, because of the BuildRequires lines. force is never in order, it's better to change the spec file to be correct (or to actually install the required packages)
On Tuesday 06 December 2005 14:07, Anders Johansson wrote:
On Wednesday 07 December 2005 00:45, Susemail wrote:
In this case it didn't install in these directories or anywhere else according to locate and manual inspection. In any case should'nt ' rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm' have built and installed the rpm with dependencies?
No. That's not the way src.rpm works. You have the source files in /usr/src/packages/SOURCES and the spec file in /usr/src/packages/SPECS. If manual inspection didn't show this, then you didn't do it right, because that is where they will be after you install a src.rpm
And how could it possibly build dependencies? It is sort of against the idea of dependencies. If they were included, they wouldn't be dependencies
This is a point of confusion for me. If I use apt,for example, it gets and builds dependencies. To you, a Code Master, 'It is sort of against the idea of dependencies.' To me,until now, it seemed a reasonable assumption.
To rebuild the source rpm, you would use "rpmbuild --rebuild" on the src.rpm
Just curious; in this case, is the source rpm being 'rebuilt'? Is it being rebuilt into a binary rpm?
But why not use the binary rpm available for download from mysql.com?
Which group is best to select from: SuSE Linux Enterprise Server RPM downloads or Linux x86 generic RPM downloads? Thanks, Jerome
On Thursday 08 December 2005 20:05, Susemail wrote:
This is a point of confusion for me. If I use apt,for example, it gets and builds dependencies.
No it doesn't. It gets and installs binary rpms, it doesn't build anything.
To you, a Code Master, 'It is sort of against the idea of dependencies.' To me,until now, it seemed a reasonable assumption.
Well, if there were no dependencies, there would be no need for tools like apt, since they exist to solve dependency problems that rpm itself can't
To rebuild the source rpm, you would use "rpmbuild --rebuild" on the src.rpm
Just curious; in this case, is the source rpm being 'rebuilt'? Is it being rebuilt into a binary rpm?
yes
But why not use the binary rpm available for download from mysql.com?
Which group is best to select from: SuSE Linux Enterprise Server RPM downloads or Linux x86 generic RPM downloads?
Difficult to say without testing them, I would try the SLES rpms, and if they fail go for the generic
On Thu, 8 Dec 2005 09:05:56 -1000, Susemail wrote:
If I use apt,for example, it gets and builds dependencies.
Apt does not build anything! It just downloads binary RPMs. Some of these RPMs might be to satisfy the dependencies of RPMS explicitly stated.
Just curious; in this case, is the source rpm being 'rebuilt'? Is it being rebuilt into a binary rpm?
The latter of cause, i.e. one or more binary rpms are being rebuilt from the sources. Philipp
Susemail wrote:
In this case it didn't install in these directories or anywhere else according to locate and manual inspection.
Did you run rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm as root? Only root can install in those directories.
In any case should'nt ' rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm' have built and installed the rpm with dependencies?
No. Try rpmbuild --rebuild MySQL-5.0.16-0.src.rpm from /home/yourhome/bin directory as root. If it worked (which I doubt as what you are trying to do seems to be a stretch of your experience level), you would find your binary rpms in /usr/src/packages/RPMS/<arch> (meaning whatever architecture your machine is, i.e.i686, i586, etc.). Resolving the dependencies will probably be a trial and error process (depending on the src.rpm). You should look for already built SuSE rpms for your version if available. Try http://rpm.pbone.net for starters. OR, try one of the SuSE Enterprise packages from the mysql website. -- Joe Morris Registered Linux user 231871
On Wednesday 07 December 2005 01:19, Joe Morris (NTM) wrote:
Only root can install in those directories.
What gave you that idea? It's certainly not true on a default system. Those directories are rwxrwxrwt Besides which, if there was a permissions problem, rpm would have said so
Anders Johansson wrote:
On Wednesday 07 December 2005 01:19, Joe Morris (NTM) wrote:
Only root can install in those directories.
What gave you that idea? It's certainly not true on a default system. Those directories are rwxrwxrwt
Not on my 9.3. That is the default as long as I can remember. joe@jmorris:~> ls -l /usr/src/packages/ total 20 drwxr-xr-x 2 root root 4096 2005-03-20 01:44 BUILD drwxr-xr-x 4 root root 4096 2005-05-16 05:21 RPMS drwxr-xr-x 2 root root 4096 2005-03-20 01:44 SOURCES drwxr-xr-x 2 root root 4096 2005-03-20 01:44 SPECS drwxr-xr-x 2 root root 4096 2005-03-20 01:44 SRPMS joe@jmorris:~> rpm -qf /usr/src/packages/SPECS rpm-4.1.1-208.2 Only root has write privilege. -- Joe Morris Registered Linux user 231871
On Wednesday 07 December 2005 11:48, Joe Morris (NTM) wrote:
Anders Johansson wrote:
On Wednesday 07 December 2005 01:19, Joe Morris (NTM) wrote:
Only root can install in those directories.
What gave you that idea? It's certainly not true on a default system. Those directories are rwxrwxrwt
Not on my 9.3. That is the default as long as I can remember. joe@jmorris:~> ls -l /usr/src/packages/ total 20 drwxr-xr-x 2 root root 4096 2005-03-20 01:44 BUILD drwxr-xr-x 4 root root 4096 2005-05-16 05:21 RPMS drwxr-xr-x 2 root root 4096 2005-03-20 01:44 SOURCES drwxr-xr-x 2 root root 4096 2005-03-20 01:44 SPECS drwxr-xr-x 2 root root 4096 2005-03-20 01:44 SRPMS joe@jmorris:~> rpm -qf /usr/src/packages/SPECS rpm-4.1.1-208.2 Only root has write privilege.
Nope. That is what you get if you select permissions "secure". The default is, and has always been since they started the permissions thing, "easy", and that gets you rwxrwxrwt
On Tuesday 06 December 2005 14:19, Joe Morris (NTM) wrote:
Susemail wrote:
In this case it didn't install in these directories or anywhere else according to locate and manual inspection.
Did you run rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm as root?
Yes. I always run rpm as root to install.
Only root can install in those directories.
Anders says this is not true on a default system and he's almost always right.
In any case should'nt ' rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm' have built and installed the rpm with dependencies?
No. Try rpmbuild --rebuild MySQL-5.0.16-0.src.rpm from /home/yourhome/bin directory as root.
Thanks, I will.
If it worked (which I doubt as what you are trying to do seems to be a stretch of your experience level), you would find your binary rpms in /usr/src/packages/RPMS/<arch> (meaning whatever architecture your machine is, i.e.i686, i586, etc.). Resolving the dependencies will probably be a trial and error process (depending on the src.rpm). You should look for already built SuSE rpms for your version if available. Try http://rpm.pbone.net for starters. OR, try one of the SuSE Enterprise packages from the mysql website.
-- Joe Morris Registered Linux user 231871
Susemail wrote:
On Tuesday 06 December 2005 14:19, Joe Morris (NTM) wrote:
Only root can install in those directories.
Anders says this is not true on a default system and he's almost always right.
True. And he explained later why they were different to the way mine always were. I always set my machines to secure.local permission (tried paranoid exactly once and decided it caused the paranoia). So, I have never seen those directories writable by a user. Since security is one reason I don't like nor use Windows, it would never enter my brain to make my linux less secure intentionally. -- Joe Morris Registered Linux user 231871
Susemail wrote:
On Tuesday 06 December 2005 14:19, Joe Morris (NTM) wrote:
Susemail wrote:
In this case it didn't install in these directories or anywhere else according to locate and manual inspection. Did you run rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm as root?
Yes. I always run rpm as root to install.
installing a source rpm as not an administrator action, and so should _never_ be done as root. Instead, do something like this. Creat this file: [summer@bilby ~]$ cat .rpmmacros #%buildroot /tmp/BuildRPM/B%{name} %_topdir /home/summer/redhat #%_rpmdir /home/summer/RedHat/RPMS #%_builddir /tmp/BuildRPM and create a tree like this: [summer@bilby ~]$ \ls -d1 redhat/* redhat/BUILD redhat/RPMS redhat/SOURCES redhat/SPECS redhat/SRPMS [summer@bilby ~]$ _topdir tells rpm where to find the tree, and others (commented here) can be set to move elements of the tree to other locations. You can also set these (and other) variables on the commandline using "--define." I heard once that some package, whe built, attempted to run this command: rm -rf / doubtless because one of the variables wasn't set. I would find that bad enough doing it as me, let enough as root. Dones as me, there's some chance I would see lots of error messages and stop it before it got to my files.
On Friday 09 December 2005 01:49, John Summerfield wrote:
installing a source rpm as not an administrator action, and so should _never_ be done as root. Instead, do something like this. Creat this file:
[summer@bilby ~]$ cat .rpmmacros #%buildroot /tmp/BuildRPM/B%{name} %_topdir /home/summer/suse #%_rpmdir /home/summer/suse/RPMS #%_builddir /tmp/BuildRPM
and create a tree like this: [summer@bilby ~]$ \ls -d1 suse/* suse/BUILD suse/RPMS suse/SOURCES suse/SPECS suse/SRPMS [summer@bilby ~]$
_topdir tells rpm where to find the tree, and others (commented here) can be set to move elements of the tree to other locations.
You can do this, but on a default system you don't have to. Regular users can build in /usr/src/packages, and no Joe, I don't agree that that is a security risk any more than writing to /tmp is
I heard once that some package, whe built, attempted to run this command: rm -rf /
doubtless because one of the variables wasn't set. I would find that bad enough doing it as me, let enough as root. Dones as me, there's some chance I would see lots of error messages and stop it before it got to my files.
administrator access should indeed be kept to a minimum y2pmsh might also be of interest here. It will install a complete system in a chroot environment and build the rpm in that. It's a very neat way of making sure that your own customisations don't affect the way your rpms are build, and allows you some amount of control over which packages your rpms are built against without having to change your main system (think building 9.2 rpms on a 10.0 system for example). Of course, it does use up a lot of disk space :)
Anders Johansson wrote:
Regular users can build in /usr/src/packages, and no Joe, I don't agree that that is a security risk any more than writing to /tmp is
I believe you misunderstood what I said. I just said I always set the permissions scheme in yast to secure, which I would assume sets the permissions on the directories under /usr/src/packages. If you are saying the easy permissions scheme is not less secure than secure, then I obviously do not understand why there is such a thing. If the secure permissions only affect building rpms, then I would say they are grossly mis-labeled. -- Joe Morris Registered Linux user 231871
Joe Morris (NTM) wrote:
Susemail wrote:
I'm have trouble installing this package:
# rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm warning: /home/myhome/bin/MySQL-5.0.16-0.src.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 warning: user mysqldev does not exist - using root warning: user mysqldev does not exist - using root #
This just shows you are installing a non SuSE package, and a src.rpm at that? Is that what you wanted? It shows it installed, but since it is
It does not mean that it's not a SUSE (source) rpm, it merely means the rpm contains files owned by mysqldev, and that user mysqldev doesn't exist on Jerome's computer. Since mysqldev doesn't exist, rpm substitutes "root." In the end, it makes no difference unless you're installing as root, and you should _never_ install source rpms as root. Regarding permissions reported by Anders re /usr/src/packages, that's a nice convenience maybe, but I think way better to configure rpm to build in an area of the users' own, usually in ~. While the standard arrangement works with one users, if you have multiple users, more than one building packages, they you really don't want them all writing into the same area and potentially medling (maybe accidentally) with each others' packages.
On Tuesday 06 December 2005 14:51, John Summerfield wrote:
Joe Morris (NTM) wrote:
Susemail wrote:
I'm have trouble installing this package:
# rpm -i /home/myhome/bin/MySQL-5.0.16-0.src.rpm warning: /home/myhome/bin/MySQL-5.0.16-0.src.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 warning: user mysqldev does not exist - using root warning: user mysqldev does not exist - using root #
This just shows you are installing a non SuSE package, and a src.rpm at that? Is that what you wanted? It shows it installed, but since it is
It does not mean that it's not a SUSE (source) rpm, it merely means the rpm contains files owned by mysqldev, and that user mysqldev doesn't exist on Jerome's computer.
Since mysqldev doesn't exist, rpm substitutes "root." In the end, it makes no difference unless you're installing as root, and you should _never_ install source rpms as root.
I didn't know that! Why not?
Regarding permissions reported by Anders re /usr/src/packages, that's a nice convenience maybe, but I think way better to configure rpm to build in an area of the users' own, usually in ~.
While the standard arrangement works with one users, if you have multiple users, more than one building packages, they you really don't want them all writing into the same area and potentially medling (maybe accidentally) with each others' packages.
participants (6)
-
Anders Johansson
-
B. Stia
-
Joe Morris (NTM)
-
John Summerfield
-
Philipp Thomas
-
Susemail