LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Package Management Best Practices (https://www.linuxquestions.org/questions/slackware-14/package-management-best-practices-945762/)

thund3rstruck 05-18-2012 12:23 PM

Package Management Best Practices
 
Hoping some experts here can clarify a few things for me because I don't want to get too far down the road only to have an epiphany that I made some critical mistakes early on.

Patches
1. What is the recommended place to store downloaded patches?

I'm using Alienbob's patch sync script (http://connie.slackware.com/~alien/t...are_patches.sh) to download the patches and I downloaded them to /home/ftp/pub/Linux/Slackware/<arch>/patches/packages/ because that's where the script defaulted them to.

2. Are the patches in <mirror>/patches/packages only security updates or are they general software updates?

In other words, is there any chance that a patch might conflict with (or break) a replacement package from the AlienBob's repo? I understand I can make an exclusion, I just don't know if that's necessary for patches.

Slackbuilds
I'm using sbopkg (http://www.slackpkg.org) for interacting with slackbuilds.org. I think that program is downloading into /tmp but I'm not 100% sure about that yet.

3. Are binaries built with sbopkg supposed to stored in a specific directory (I imaging they would need to be in order to be able uninstall them later). How about the source? Is that supposed to be stored in a specific directory?

slackpkg
4. Is slackpkg just the software on the DVD or does it include newer versions of the software on the DVD?

5. If it includes newer software then where should the packages (and source) be downloaded?

Un-installing software
I did a full install since I've never used Slack and I didn't know how well the packaging tools would work. Now I realized that slackware installed a trillion programs, most of which are duplicates (why are there like 7 text editors?). Now I want to start removing pretty much everything other than my core set of 10 or so programs I use on a regular basis.

6. If I use removepkg and that only removes the program, isn't it going to leave behind all its dependant libraries?

Sorry to make this so long but I've been reading the manual (RTFM) for a few days now and I'm still trying to work out the right way to do these things (freedom is great; but just because you can download anywhere doesn't mean you should --i'm sure over the years some best practices have bubbled up about the right way to deal with packages in slack

Cheers!

slakmagik 05-18-2012 12:37 PM

Quote:

Originally Posted by thund3rstruck (Post 4682010)
1. What is the recommended place to store downloaded patches?

Wherever you want. Once installed, you can even delete them if you choose. I just sync a Slackware tree in /home/slackware.

Quote:

2. Are the patches in <mirror>/patches/packages only security updates or are they general software updates?
Generally security only. Feature upgrades happen in -current.

Quote:

3. Are binaries built with sbopkg supposed to stored in a specific directory (I imaging they would need to be in order to be able uninstall them later). How about the source? Is that supposed to be stored in a specific directory?
Storing them has nothing to do with uninstalling them. Uninstalling them uses the standard slackware tool, removepkg, and relies on package data in /var/log/packages. As with patches, you can do whatever you want with the package after you've installed it. Sbopkg defaults to saving them for easy reinstallation if needed.

Quote:

4. Is slackpkg just the software on the DVD or does it include newer versions of the software on the DVD?
You can set up the source slackpkg uses. If the DVD, it's just the DVD. If you use a local or remote mirror, the latest patches (or, if using -current, the latest everything) will be available.

Quote:

5. If it includes newer software then where should the packages (and source) be downloaded?
I'm getting a feeling you haven't read at least the slackpkg manual. But, again, it doesn't really matter.

Quote:

6. If I use removepkg and that only removes the program, isn't it going to leave behind all its dependant libraries?
Yes.

Quote:

I've been reading the manual (RTFM) for a few days now
Which "manual"?

Quote:

just because you can download anywhere doesn't mean you should
Very true. Use official Slackware mirrors, SBo, and go directly to the source and build it yourself if necessary.

thund3rstruck 05-18-2012 01:11 PM

Thanks for your feedback. The point of my question was Best Practices though. I understand I can do whatever the hell I want to do but all IT is more or less that way. I can hook new System.Data.SqlClient.SqlCommand("DELETE FROM myTable"); but that doesn't mean I should. Through years of solution development we have established Best Practices that articulate the best ways of accomplishing and managing things. In the case above, we implement NHibernate OR/M mapping abstractions to deal with scalability and cross platform solutions.

I apologize for the Microsoft reference there but I'm a Windows developer.

I really want to know what the best practice is. Should an administrator download packages from the mirror into a specific location on the workstation. Are there any standards in place to guide administrators on these types of practices?

Thanks again!

PS: I can't seem to find anything even remotely comparable to the UbuntuGuide.org wiki out there for slackware. Has anyone considered creating a Slackware wiki to put all this information in a single central place? The Slackbook is a decent starting point and there's a tiny wiki here but again, nothing like the wikis you see for other distributions.

dugan 05-18-2012 02:14 PM

Quote:

Originally Posted by thund3rstruck (Post 4682010)
3. Are binaries built with sbopkg supposed to stored in a specific directory (I imaging they would need to be in order to be able uninstall them later). How about the source? Is that supposed to be stored in a specific directory?

You don't need to keep either of them.

Uninstalling (as I'm sure you know), is done with "removepkg packagename", as in "removepkg emacs". Slackware has a single file listing its installed packages (/var/log/packages). So if you forget what the last letter in "emacs" is (and I know this is a bad example) then you can still uninstall it with "grep emac /var/log/packages | xargs removepkg".

thund3rstruck 05-18-2012 02:34 PM

Quote:

Originally Posted by dugan (Post 4682099)
You don't need to keep either of them.

Uninstalling (as I'm sure you know), is done with "removepkg packagename", as in "removepkg emacs". Slackware has a single file listing its installed packages (/var/log/packages). So if you forget what the last letter in "emacs" is (and I know this is a bad example) then you an still uninstall it with "grep /var/log/packages emac | xargs removepkg".

Great! So then I don't ever need the binary or source again. That's quite different than I was expecting. We use (MSI) installer packages for our windows products, and the MSI (or some form of it) must remain on the machine essentially forever in order to repair or uninstall it (cleanly) later.

Awesome Thanks!

allend 05-18-2012 09:36 PM

Quote:

6. If I use removepkg and that only removes the program, isn't it going to leave behind all its dependant libraries?
If you use 'removepkg' then all the files installed by that package are removed, unless they are also used by some other package. This allows common libraries to be preserved.

Quote:

Has anyone considered creating a Slackware wiki to put all this information in a single central place?
http://slackwiki.com

slakmagik 05-19-2012 01:58 PM

Quote:

Originally Posted by thund3rstruck (Post 4682061)
Thanks for your feedback. The point of my question was Best Practices though. I understand I can do whatever the hell I want to do but all IT is more or less that way.

Welcome. Questions 2, 4, and 6 were about matters of fact, though, rather than best practices and questions 1, 3, and 5 have you asking what best practices are on subjects where the sync script, slackpkg, and sbopkg have default behaviors. We wouldn't have established those as defaults if they weren't at least not-bad-practices. ;) If you have some specific reason to want to change the default behaviors of the programs, you can, but you should be safe letting the programs operate how they do. (I don't actually use alien's sync script but I'm sure its defaults are wisely set.) And all these things can be changed with a simple 'mv' command to a new location and a 'vi' of the config file(s) - none of this is set in stone or locked into an interdependent registry.

Quote:

PS: I can't seem to find anything even remotely comparable to the UbuntuGuide.org wiki out there for slackware. Has anyone considered creating a Slackware wiki to put all this information in a single central place? The Slackbook is a decent starting point and there's a tiny wiki here but again, nothing like the wikis you see for other distributions.
If you look at the top line of links in my sig, you'll find the slack book, faq, and wiki.

Quote:

Originally Posted by dugan (Post 4682099)
Uninstalling (as I'm sure you know), is done with "removepkg packagename", as in "removepkg emacs". Slackware has a single file listing its installed packages (/var/log/packages). So if you forget what the last letter in "emacs" is (and I know this is a bad example) then you can still uninstall it with "grep emac /var/log/packages | xargs removepkg".

Even if that was the right command, it's probably not a best practice. I think you mean something like "find /var/log/packages/ -regex '.*emac.*' | xargs removepkg" (otherwise, without '-R' or a trailing '/*', your command will return nothing and, even then, you'll be trying to remove anything that contains the string 'emac' in its file (rather than filename) and generally failing because the output isn't in the correct form for removepkg). All that aside, I'd definitely run the first half of any such pipe by itself first, as you may not always realize what going to be matched. I'd hate to try to remove (another bad example) glib with (as an alternate to find) 'ls /var/log/packages/glib* | xargs removepkg' :)

TobiSGD 05-19-2012 02:26 PM

Quote:

Originally Posted by dugan (Post 4682099)
So if you forget what the last letter in "emacs" is (and I know this is a bad example) then you can still uninstall it with "grep emac /var/log/packages | xargs removepkg".

I would recommend to rather use
Code:

slackpkg remove emac
in such a case, since slackpkg will show you a list of matches that you can choose from which packages to remove.

thund3rstruck 05-19-2012 04:22 PM

Thanks again everyone! I'm extremely grateful for it. Its been a week or so in and I'm really, really enjoying Slackware. Other than not being able to print from my HP network printer, everything has gone rather smoothly. My only regret to this point is that I did a 'full installation' because I was worried about the bad reputation for slackware's package management so I ended up with a zillion programs on my machine that I'll never use. If I had known about slackpkg, slackbuilds.org, and alienBob then I would have just installed a base system and only installed the packages I actually wanted.

In any event, so far so good.

Thanks again everyone for being so helpful!

TobiSGD 05-19-2012 05:08 PM

It is totally recommended to make a full installation when you are new to Slackware. Learn your basics first, then you can try to run slimmed down systems, if you need (or want). On modern desktop systems with harddisks in sizes of TBs a Slackware installation of about 6GB isn't that much, so I wouldn't consider saving space a high priority. Since Slackware does not run many services by default you are also not wasting other resources with that approach.

sycamorex 05-19-2012 05:18 PM

Quote:

Originally Posted by TobiSGD (Post 4682807)
I would recommend to rather use
Code:

slackpkg remove emac
in such a case, since slackpkg will show you a list of matches that you can choose from which packages to remove.

I usually uninstall packages using pkgtool.

slack_them_all 05-19-2012 06:16 PM

Quote:

Originally Posted by thund3rstruck (Post 4682855)
My only regret to this point is that I did a 'full installation' because I was worried about the bad reputation for slackware's package management so I ended up with a zillion programs on my machine that I'll never use.

Hi,
Here is what I do when I install Slackware. I choose all the packages from the following series A, AP, D, K, L, N, X and select the one I want from XAP. I think this is a good "minimum" for a X workstation. With these, you are sure to have all needed libraries, essentials programs and the possibility to compile software. I don't install any from E, F, T, TCL, KDE, KDEI. Of course, you should adjust this list to your needs.
For being able to do that, you need to choose 'menu' or 'expert' as prompting mode during installation.
As you've been said, you cannot install only what you use, as Slackware packages manager doesn't provide dependencies resolution. If you want to use KDE, then you need the KDE serie and then it will not save you much space to try not to install all other packages. KDEI is definitely not needed unless you enjoy a different language every day!
In your case, if you look at the content of each serie, you can still easily remove unwanted software and find peace of mind :-)
When upgrade time comes, (next Slackware version) you'll have to adapt slightly the upgrade procedure (UPGRADE.TXT) otherwise you'll end up to install everything again.

rinias 05-21-2012 07:23 AM

Quote:

Originally Posted by thund3rstruck (Post 4682855)
Other than not being able to print from my HP network printer, everything has gone rather smoothly.

Have you tried hplip? You'd need to add your user to the lp and sys groups, as root :

Code:

usermod -G lp,sys -a youruser
Then you can run hp-setup or hp-tray as you'd like and add the printer. I have my router set up to always give the printer the same IP, and I find it's easiest to enter that address in the Manual Discovery option, but it's not necessary.

Good luck.

PS - It's installed because you did a full install.

thund3rstruck 05-21-2012 08:06 AM

Quote:

Originally Posted by rinias (Post 4683881)
Have you tried hplip? You'd need to add your user to the lp and sys groups, as root :

Code:

usermod -G lp,sys -a youruser
Then you can run hp-setup or hp-tray as you'd like and add the printer. I have my router set up to always give the printer the same IP, and I find it's easiest to enter that address in the Manual Discovery option, but it's not necessary.

Good luck.

PS - It's installed because you did a full install.

I love you guys :)

I added myself to lp but not sys. I'm really busy at work today but I'm going to try this as soon as possible

onebuck 05-21-2012 08:33 AM

Member response
 
Hi,

Quote:

Originally Posted by thund3rstruck (Post 4682061)
<snip>

PS: I can't seem to find anything even remotely comparable to the UbuntuGuide.org wiki out there for slackware. Has anyone considered creating a Slackware wiki to put all this information in a single central place? The Slackbook is a decent starting point and there's a tiny wiki here but again, nothing like the wikis you see for other distributions.

Anything related to Slackware is a work in progress! :)

Since LQ Slackware forum is the official forum you will find helpful and resourceful members willing to help.

Look at the the links in my sig and you will find several good points of reference.

SlackwareŽ-Links is very resourceful and more than just SlackwareŽ-Links; Look at SlackwareŽ Basics to enhance your Slackware experience.

Alien Pastures is Alien_Bob's (Eric Hameleers) blog. Alien_Bob is a Slackware team member that provides excellent package resource and development. Alien_Bob provides this mirror & rsync:/taper.alienbase.nl/mirrors/.

Be sure to look at the stickies;
So you want to be a Slacker! What do I do next? & Slackware.com solutions for users.

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

BCarey 05-21-2012 03:22 PM

Quote:

Originally Posted by thund3rstruck (Post 4682010)
I'm using sbopkg (http://www.slackpkg.org) for interacting with slackbuilds.org. I think that program is downloading into /tmp but I'm not 100% sure about that yet.

You should know that most programs store their configuration files in the /etc directory, usually in obvious places like /etc/slackpkg/slackpkg.conf and /etc/sbopkg/sbopkg.conf. These are flat text files and are usually well commented. So whenever you have questions like this you can usually just look in the appropriate .conf file for the answer.

Brian

thund3rstruck 05-21-2012 06:47 PM

Quote:

Originally Posted by onebuck (Post 4683934)
Hi,

Anything related to Slackware is a work in progress! :)

Since LQ Slackware forum is the official forum you will find helpful and resourceful members willing to help.

Look at the the links in my sig and you will find several good points of reference.

SlackwareŽ-Links is very resourceful and more than just SlackwareŽ-Links; Look at SlackwareŽ Basics to enhance your Slackware experience.

Alien Pastures is Alien_Bob's (Eric Hameleers) blog. Alien_Bob is a Slackware team member that provides excellent package resource and development. Alien_Bob provides this mirror & rsync:/taper.alienbase.nl/mirrors/.

Be sure to look at the stickies;
So you want to be a Slacker! What do I do next? & Slackware.com solutions for users.

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

Again, I've got nothing but gratitude for all the help from everyone! I spent 2 or 3 weeks doing nothing but reading all the slackware guides (from here and elsewhere) because I was trying to decide between Slackware and Arch for a few new laptops. In all fairness, none of the slackware material comes close to the UbuntuGuide.org wiki but hey its a slacker distro so that's cool.

I'm a Linux hobbyist (and sometime consultant) and I've been using Linux at home since 1998 and even I have had most of my old skills atrophy with the advent of automated package management and the over automated nature of the tools now included in the mainstream distros.

I'm really having an absolute blast using Slackware and re-learning all this stuff again!


All times are GMT -5. The time now is 01:57 AM.