LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-07-2017, 12:08 AM   #16
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36

I think my idea will work. But I'm stuck on something. I need a script that will use rpm, to get the filenames of packages required by a package. It should be done using the most primitive tools possible available to sh. Tools that I can depend on being installed on a primitive system. Nothing like grep or anything. That may not be installed for some reason.

The script should be called:

Code:
softir
This should be it's usage statement, if the user does NOT give it a package file name:

Code:
softir {package}
(the space is significant and can be produced by echo without parameters)

With a package name, it should print to standard output, the filenames of the packages required by the package file name given. There should be no trailing lines before the output. There should be one blank line after the output.

Please help me come up with this script, and then I can tie it all together and see if this solution actually solves my problem or not.
 
Old 07-07-2017, 01:21 AM   #17
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by des_a View Post
I think my idea will work. But I'm stuck on something. I need a script that will use rpm, to get the filenames of packages required by a package. It should be done using the most primitive tools possible available to sh. Tools that I can depend on being installed on a primitive system. Nothing like grep or anything. That may not be installed for some reason.
Please, again, read the LQ posting guidelines. While members are usually willing to put forth much effort to help, asking for others to write a script to meet your requirements is frowned upon.

In this case, you should be able to get the information you seek directly from rpm, no need for further scripting.

Code:
rpm -qp package-name.rpm --requires
That will give you the required package names and versions, the exact filenames may vary by source, version and maintainer.

Mandriva urpmi would provide similar query commands, but I do not have a Mandriva system to test on at this time, so I refer you to the rpm and urpmi man pages for details.
 
1 members found this post helpful.
Old 07-07-2017, 01:15 PM   #18
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
Quote:
While members are usually willing to put forth much effort to help, asking for others to write a script to meet your requirements is frowned upon.
Sorry again. Sometimes it's hard to understand those guidelines in a certain situation.

Anyway, I'd gotten that far. Where I was stuck was making a file name out of it's output. Or at least being able to parse it in some meaningful way that would lead to a filename. The other choice is to be able to get a package name from a filename and use that to install it and for some internal stuff. But I don't know how to do that either right now.
 
Old 07-07-2017, 01:15 PM   #19
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I'll check out the man pages again though for the later, and come back if I'm still stuck and don't have a solution yet.
 
Old 07-20-2017, 07:27 PM   #20
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I got so far. But now it doesn't seem to have the dependencies figured out well enough. It told me on a particular package that it doesn't depend on anything. In reality it did, so when I tried to install the package, it failed. Should I make it so that packages have to have their dependencies managed manually? Or should I continue this route and fix it somehow? This route this is what is supposed to happen: All the dependencies and subdependencies are automatically calculated, and automatically installed, unless it's not available. If it's not available, print an error message of some sort. Please give me advice. If you think I should continue this route, I'll need to post all the current code for you.
 
Old 07-20-2017, 07:29 PM   #21
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
P.S. - I think that when I am done I will have a working solution, and will not have to start again. I took care of the downloading and everything myself. I think that it is in the detecting of what can be downloaded or something like that that it was going wrong. It is probably indeed a bug in urpmi, and probably continues to this day, I'd guess.
 
Old 07-20-2017, 07:29 PM   #22
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
...
 
Old 07-23-2017, 07:01 PM   #23
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I am thinking that this "bug" will only show up in virtual machines, so it could be the virtual machine's fault, possibly. However, my solution seems to work okay so far. I am on the "real" script to install the software now. I have to manually manage dependencies for now, so I need to run the script with each package, a line at a time, and find all the dependencies to include in them. I had bugs when installing from remote sources, for some reason, but I think I fixed all of those critical bugs now. But it wasn't the same bug or anything showing up that showed up origionally. The problem is definitely somewhere in the urpmi set of tools. Since "softi.p2f" doesn't completely work, I am using a number of ways to get the package name's file names. For now, that will work. When I get softi working, I will post a version here for you guys. I don't yet know of the legal ways to put things under the GPL or anything, or this would be a canidate. So consider it a development version for now, to be used anywhere to solve this same problem, but for no other uses. Modify it if necessary to solve this problem, but that's all. Use and/or modify it, but don't repost it or anything for this development version. But you can use it anywhere to solve this problem. Hopefully I've got the general idea right...

Anyway, I will post it for just such purposes. I will use it for it's "real" uses anywhere it helps in the scope of my network or expanding places, such as for friends and family who run into the same problem.

Just one more proper script to go and then if that works, and everything is installed, it works!
 
Old 07-26-2017, 02:39 PM   #24
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
There are way too many dependencies to manually install them all. And since p2f doesn't completely work, I have to use other methods that require a human in order to find which package belongs to which file. And the requires output doesn't seem to be computer readable. Please help or provide another solution to this underlying problem.

Here is the code for softi.
Attached Files
File Type: txt software_scripts.zip.txt (8.9 KB, 2 views)
 
Old 07-26-2017, 08:09 PM   #25
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
A new version of Mageia just came out. I probably don't want to start over on the vmain server right now, but I may want to start over on vweb and try to use this new version. I will download it, and see if it has the same problem as version 5.1 had with it's GUI. Although, I may or may not actually want a GUI on this server. If I do, I will want a "light" one. I'd prefer to stick with LXDE for this. If it works, I'll rethink my structure and maybe keep the vmain server, but create a vmain2 server with Mageia Linux. Then I'd continue to create vweb. But maybe I don't need vmain2 right now at this time...

Anyway, vweb, I need for sure, so if Mageia 6 fixes this problem, I could use it. But I'll have to see if it does or not. I'll have to see if it even installs properly or not. Mageia 5.1 had a BIG GUI error, which I now see documented as a bug. It meant that it was a NO GO for me, as far as time to switch or not. If 6 doesn't have the bug, I can re-evaluate whether or not to use it. If the technology is good, I can use it, otherwise I can't.

By "technology", I mean from a user's point of view, in the configuration and use of the servers, having the servers I'm looking for and want to enable. I heard that some protocols were discontinued. Unfortunately, unless there is simply a reason NOT to do it, I really needed those enabled on my server. For vweb it should work just fine of course.

It's come a long way since I first tried out Mageia, that's for sure! But keep trying to work on a solution here, it may be the solution I need. I'm not sure one way or the other for sure...
 
Old 07-26-2017, 08:12 PM   #26
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
By the way, the failure is in the download of the packages. As long as I download them myself, installing them should be a snap. I don't have the space to mirror the whole distribution locally, or I would. I need it to be done via ftp protocol. The problem I've been having, as I mentioned before, is the packages dependencies.

This is indeed a strange problem...
 
Old 07-28-2017, 08:00 PM   #27
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I tried the newest version of Mageia, and this is the first canidate that might work for me as a client. I'll hold off on working on it, until I get the servers finished and stuff, however.

I tried to simply "mount" the filesystem share onto /mnt/urpmi. Then I adjusted the /etc/fsab file to make it mount automatically. I then fixed the script to add media sources, to add local media sources.

I think I have had success, because it appears like I can now install sofware with urpmi. To be sure, I will have to reinstall the OS, and try to install from a fresh installation, by copying my solution. If that works, I solved the problem.

This is indeed a strange problem...
 
Old 07-28-2017, 08:01 PM   #28
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
P.S. - I can't believe I didn't think to go this route before...
 
Old 07-30-2017, 05:02 AM   #29
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
Indeed I had success. I ran into a RAM problem, that I fixed by kludging it... Anyway, the vweb server is now born and up and running!

See this link for the website on vweb (which is the main purpose of having vweb): http://smileynet001.ddns.net:81/. See here for a GUI (click and point) to get there: https://sites.google.com/site/smileynetmain/.

I now have it up and running! Yeah!

I am onto the web development portion now. The main work is done. No self-sign up at this point, but really at this point, that's OK. Appearently a site that is self sign up takes quite a bit of explaining to understand how to do. Perhaps there are premade packages you can aquire for this, but I don't want to go that route right now. The way I have done it is fine for now.

There is a note that running this OS in today's world CAN BE a security risk, but that's OK with me for now. My Google accounts had been hacked before and I fixed the problem. Google is a big target, and it was probably some random attack on Google. However, my network has not had such attacks before. Not that it couldn't happen, it's just probably too small a target. I expect it to get to be a bigger target over time, which is why I'll continue to learn about security.

But by the time I am such a target, I will probably know what I need to know about security. I just CAN'T completely secure older OSs, and I NEED older OSs to make it work, but I just have to have a good back up plan and security detection plan to cope with these type of attacks. Now if it happened every day at some point, I'd have to rethink my whole plan for being more independent. But it shouldn't happen until there are ways to cope with it, if you know what I mean. Perhaps the older technology will also become obsolete on my network as well by that time...

Certainly, I can "almost" upgrade to Mageia and redo all my Mandriva servers (the latest version of Mageia). However, the keyword is "almost". It's only "almost" ready for that. It has to do with it's changing technology and the fact that I need older technology to do what I want as far as servers are concerned, because less is possible with newer technology in this type of field. As far as I am capable of doing it, anyway.

For example: It appears that talk has been depreciated, and swat as well. I need those two for now to make it work. If I could "easily" get and configure these two and there would be no stability problems in the system, it "almost" might be worth a try. Why still almost? Because I really need to get to version "a" of my network. I haven't had such a complete version happen yet. But I've got a good roadmap to it at this point.

The issue is solved by using smb as the remote protocol and mounting it within the filesystem using fstab. Then you add local media sources for urpmi. softi was not needed after all, but wasn't a waste of time either. If someone could work on it with me, that'd be great, but we'll have to find somewhere else appropriate to work on it and it's low priority for me now. Not worth opening what would "now" be an appropriate programming thread for it.

I thought that it was appropriate before, but I guess I was wrong. However, please point me if you can to where I could appropriately ask questions about the LQ guidelines. A new thread or something like that would be a good way to go, unless there's some general thread already out there... But I don't want to purposely or accidently violate the guidelines by posting a new thread where "I" think is appropriate.

This "bug" appears to only be in virtual machines and only be in more than one machine running on the physical machine whether both are virtual or only one is. I don't think it's by design on Mandriva's part. I don't think I have violated the license by running the same copy more than once that I would need to try to fix. I would never intentionally violate it. I don't think I managed to violate virtual boxes license either. But perhaps virtual box was over zealous with it's protection against violating licenses? Beware for Mageia users, because I bet whatever issue it was, was NOT fixed yet. But unless I tried to test it, I couldn't be sure. But since there is no other documentation out there yet about this... So hopefully it helps others too. I do not think I'm violating any package's licenses, even if here and there I'm using a few non-free packages. They all give free re-distribution rights, which I believe is basically what I am doing by running multiple copies. No windows software was used via wine or anything... At least they present their licenses right out in front of you though. Something Linux is not very good at at this point. No wonder so many Linux users just try to stick to GPL or related licenses!

Thanks for all your help here, marking as solved. So if you want to reply more, do it now so it doesn't close on you. I can always re-open it if there are lots of replies, at least temporarily, but if it's closed, the best I can do is link to it, short of asking for administrative help. Anyway, thanks again!

This is a standard part of what to do when I get "stuck" on something, before I go to other things. Thanks again!
 
Old 07-30-2017, 05:06 AM   #30
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416

Original Poster
Blog Entries: 43

Rep: Reputation: 36
By the way, I'll say it one last time. The problem occurs when you download the files, and has to do with the way that's done. Download them yourself, and it works. Avoid downloading them with Internet protocols (FTP anyway), and it works just fine too.

This was indeed a strange problem, that almost appears like an unnecessary anti-piracy stunt...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Mandriva on Mandriva: Cannot Install Software des_a Linux - Software 9 10-28-2015 02:19 AM
Boot loader won't install in Mandriva 2008 after Windows install eikeland Mandriva 12 05-29-2008 09:30 PM
tightvnc won't install in mandriva barneygumble742 Linux - Networking 2 06-29-2007 06:48 AM
Mandriva 2006 won't install Kwestion Mandriva 4 04-05-2006 01:52 PM
Mandriva won't startup after install Happeren Mandriva 7 06-19-2005 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration