[HOWTO] Installing Packages Using pkgs.org (manual install)

Post tutorials, HOWTO's and other useful resources here.
326bd935
White ninja
White ninja
Posts: 17
Joined: 02 Dec 2011, 14:55
Location: Australia

[HOWTO] Installing Packages Using pkgs.org (manual install)

Post#1 by 326bd935 » 14 Jan 2012, 05:16

If you want to install a program, chances are that it is already in one of the slackware repositories such as slackware or slacky.
pkgs.org is an excellent tool for searching these repositories for packages by name or contents.

This guide shows how to manually select and install packages in porteus.
For this howto i will show how you would install the program conky.

1. Go to pkgs.org
2. Search 'conky' using the search box at top right (this will show many results).
3. Go to the left panel and there are shortcuts to packages for your distribution and version. Porteus 1.x series is based on slackware 13.37 and so click on 'slackware 13.37' (slackware is colored black on the list).
4. You will see that under slackware 13.37 the package that most closely represents what you want is 'conky' which is what you searched for so click on it.
5. You will see various information like package size and installed size, also there are dependencies but we will ignore them now as there are allot and it would be more time consuming to check them all and see if they are installed already.
6. Click on the link for download mirrors named 'select mirror'.
7. Select the link for the binary package and you can save the .txz package somewhere for now. (in the rare case that the link doesn't work eg. libnotify from gnome-slack-build didn't work for me, try playing with the url, like going up a few directories and going from there because version numbers on mirrors could have changed or the directories change. Otherwise try using google to find the full package name such as conky-1.8.1-i486-1sl.txz).
8. It is easiest if you play with packages while not in changes mode (always fresh) because then you don't have to worry about increasing your changes directory size because of modified files or having to uninstall temporarily installed packages. If you managed to make a mess and lost track of the packages you're testing, you just reboot.
9. Navigate to the directory with the package as root and issue command 'installpkg <pkgname>' or just double click the file from pcmanfm file manager/possibly kde/konqueror too and enter root password if you are not root.
10. Checking missing dependencies using slackyd: Run the command 'slackyd -d <binaryname>' eg. 'slackyd -d conky'. It might tell you that 3 dependencies are missing such as libImlib2.so.1.
11. We can use pkgs.org download function to search for files so we go to url: pkgs.org/download/libImlib2.so.1 however this almost always only lists rpm packages but look at what these rpm packages are called because the name may be completely different to the library it contains. In this case it is mainly libImlib2 and Imlib2. Notice that in some distributions the lib at the start is omitted so we just search for imlib2.
12. download and install this package for slackware 13.37. You can then check you have the correct package by installing it and checking the output of 'slackyd -d conky' again. There may still be different dependencies missing now so repeat the steps until you have no more dependencies missing. Then you can run conky. (conky requires imlib2, lua and tolua++ on top of the standard porteus packages).
13. Once you have all the packages you need put the .txz files in one directory, log in as root in terminal by 'su', change directory to the directory using 'cd' (eg cd /mnt/sdb1/download) and execute the following to batch convert txz to xzm:

Code: Select all

for i in *.txz; do txz2xzm $i "`basename $i .txz`.xzm"; if [ -e "`basename $i .txz`.xzm" ]; then rm -f $i; fi; done
14. (optional) Make them all into a single xzm module:

Code: Select all

mkdir conky; for i in *.xzm; do xzm2dir $i conky; done; dir2xzm conky conky.xzm
then you can remove the original xzm's if you dont want to keep them anymore because you have a single conky.xzm with all dependencies. (remember that if you then remove the combined conky.xzm that other applications that require the dependencies such as tint2 requires imlib2 as well, then these applications won't work anymore and you would have to add imlib2 again).
15. Copy the xzm(s) to the modules directory in the porteus directory.
16. If you have are in changes (not 'always fresh' mode) then make sure to use removepkg to remove the packages from the changes directory or double click the txz again to uninstall the package.
17. Reboot
18. When you turn on porteus from now on, you will have the applications (conky) installed.


Other Notes:

Programs such as vlc might not actually be missing dependencies when they are missing codecs. For example if you have qt and vlc is running but you don't seem to have any codecs, then you can start vlc with the -vvv verbose option and all the yellow writing is missing codecs dependencies.

Some applications won't work when loaded from an xzm module (this is really rare). Such as evince (gnome document viewer). This is because the installation script from the original txz package isn't run on boot (in fact they're not even copied). In such case you should extract the txz ('tar -xvvf <txzpkg>'), go into the install directory and look at the install script "doinst.sh"? (going from memory). Run lines of code as root from the script on the xzm loaded system (after rebooting in 'always fresh' mode), find the line which is actually required and add it to a module with the /etc/rc.d/rc.local file in it (making sure it is executable). Reboot the system and check that that was the only line required.
evince: (I had the latest 2.x version) requires:

Code: Select all

glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/null
to be run first to start.
chromium: requires /usr/lib/chromium/chromium_sandbox to be mode 4755:

Code: Select all

chmod 4755 /usr/lib/chromium/chromium_sandbox
Last edited by 326bd935 on 15 Jan 2012, 07:48, edited 2 times in total.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: [HOWTO] Installing Packages Using pkgs.org (manual insta

Post#2 by fanthom » 14 Jan 2012, 09:19

rely nice HOWTO :)

i would change one thing only:
10. checking program output for dependancies missing: run the program as normal user from terminal: type conky and hit enter, missing dependencies are almost always told to you, conky might say libImlib2.so.1 is missing.
more reliable way is to run:

Code: Select all

slackyd -d conky
as slackyd is searching for deps through all binaries/libs included in conky package and not only /usr/bin/conky.
(same command should be run against all libs downloaded as conky's deps)
Please add [Solved] to your thread title if the solution was found.

326bd935
White ninja
White ninja
Posts: 17
Joined: 02 Dec 2011, 14:55
Location: Australia

Re: [HOWTO] Installing Packages Using pkgs.org (manual insta

Post#3 by 326bd935 » 15 Jan 2012, 06:31

O wow thanks, I wasn't aware of slackyd command. I will add it straight away, and maybe try to fix it up a little as I was in a bit of a hurry when I wrote it.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: [HOWTO] Installing Packages Using pkgs.org (manual insta

Post#4 by Ahau » 17 Jan 2012, 17:39

Thanks for the howto!

I love pkgs.org because it has packages for so many distros and (most importantly for me) it lists all files in a package. This comes in very handy when I'm working from windows and trying to figure out what package contains a certain binary or library. My google foo goes like this:

' libsomelib.so.6 slackware site:pkgs.org'

and suddenly, I know where to find that pesky lib :)
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
XmnemoniC
Contributor
Contributor
Posts: 45
Joined: 28 Jul 2011, 05:44
Location: Sosnowiec, POLAND

Re: [HOWTO] Installing Packages Using pkgs.org (manual insta

Post#5 by XmnemoniC » 20 Jan 2012, 16:31

@Ahau
It's very important information for me. Great Howto. I waiting for the next.
Impossible does not exist!!

User avatar
lystor
Ronin
Ronin
Posts: 1
Joined: 28 Jan 2012, 18:58
Location: Ukraine

Re: [HOWTO] Installing Packages Using pkgs.org (manual insta

Post#6 by lystor » 28 Jan 2012, 19:39

Hi
I am a pkgs.org author.
Thank you for your howto.
326bd935 wrote:7. Select the link for the binary package and you can save the .txz package somewhere for now. (in the rare case that the link doesn't work eg. libnotify from gnome-slack-build didn't work for me, try playing with the url, like going up a few directories and going from there because version numbers on mirrors could have changed or the directories change.
It seems to be a synchronization bug or repository has outdated metadata. I have fixed it for GNOME SlackBuild repos.
Please let me know if it happens again.
326bd935 wrote: 11. We can use pkgs.org download function to search for files so we go to url: pkgs.org/download/libImlib2.so.1 however this almost always only lists rpm packages
This method search for packages by name and provides but Slackware packages don't provide dependencies ("provides") so it will not work for Slackware :(

Post Reply