LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-05-2014, 06:01 PM   #61
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled

Quote:
Originally Posted by turboscrew View Post
Yes, but the point is how to use it when the package does not contain the sources. Like in case of jdk, when you have to get the sources from oracle yourself.
There is no package in slackbuilds.org, you build one yourself running the shell script (the SlackBuild). Also, this isstated in the README:
Quote:
Next, download the source of the application from the address listed in the chemtool.info file and place it in the chemtool directory listed above. There is also a direct link to the source tarball on each application's page within our repository.
 
Old 07-05-2014, 06:03 PM   #62
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
One can use SBOpkg to build external sources?

BWAHAHahahahaha! Welcome to the maze that is Slackware package management for noobs! The fun begins!
 
Old 07-05-2014, 06:37 PM   #63
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
I guess I got jdk installed, but how should I use the 'profile.d'-stuff?
source it from .bashrc or .profile? Now I copied the lines from jdk.sh into .bashrc into my home directory, but what's the right way so that eclipse can find java (when I get it installed)?

Last edited by turboscrew; 07-05-2014 at 06:38 PM.
 
Old 07-05-2014, 06:53 PM   #64
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 turboscrew View Post
Sensei astrogeek:
Unfortunately the links seem to describe different problems than mine.
Thanks anyway.

About the slackbuilds: You gave some advice about how to get jdk installed.
What I was wondering, if there is a slackbuild for some SW in the SBo, how do I use that?
(I'll use the slackbuild for jdk from the link you gave me.)
I guess You don't install the SBo slackbuild (I mean ONLY slack build when the sources need to be downloaded somewhere else)? You just download it, download the sources into that same directory, edit the slackbuild script (if needed), run the slackbuild script and then install with installpkg? Is that how?
kōhai turboscrew:

You are welcome. And your summary is correct.

I will return to the wifi in another post, but let me try to get you started on the slackbuilds.

Let us walk all the way through the jdk install to learn from a simple example, then we will move on to more advanced moves...

We will work with the most up to date jdk and build script, so let's get them first. First, the slackbuild - you can use the one from your install media, /extras/java/... or simply download from here (they are the same). This is the Slackbuild used by Pat before Oracle made java not redistributable, so it is as official as you can get!

You will need all the files in this directory structure, let's put them into a directory named java (in your home directory) on your local machine:

Code:
README
java.SlackBuild
slack-desc.jdk
slack-desc.jre
profile.d/jdk.csh
profile.d/jdk.sh
profile.d/jre.csh
profile.d/jre.sh
The java.SlackBuild is the main script that builds the package from the jdk or jre distribution tarball.

The slack-desc file contains a formatted text header that is written to the screen when the package is installed or queried.

The profile.d/ directory is specific to this package and contains initialization scripts that set the environment on the system the package is installed to and are included here so that they can be added to the package as a convenience. These will be installed to /etc/profile.d when the package is installed.

SBo scripts will also include a [pkgname].info file not included here. It contains source URLs, checksums, maintainer, dependency and other info.

OK, next we need the source file(s), or in this case the distribution tarball. For an SBo script you would get the URL from the pkgname.info file, but here we will just look online for the latest. I assume that you want the JDK, and probably the latest. Either of these will build, but the second is the most current - recommended:

jdk-7u60-linux-i586.tar.gz
jdk-8u5-linux-i586.tar.gz

Just in case Oracle throws any stumblingblocks in your way, you can find both from the main java download page.

Put the downloaded distribution tarball into the same directory as the java.Slackbuild then cd into that directory if not there already. It is also a good idea to verify the MD5SUM on the download, but I did not see those posted at Oracle so I'll include it from my own. SBo *.info files will contain an MD5 for the sources they use.

Code:
cd java/ (or where ever you put things on your machine...)

md5sum jdk-8u5-linux-i586.tar.gz (fb0e8b5c0be11521bccec5d667559e76 from mine)

chmod +x java.SlackBuild

sudo ./java.SlackBuild (or change to root user first if not sudoer)
The script will then create a working directory /tmp/package-java and unpack the distribution file there. It will then do what it does to build the package file structure, docs, profile, etc...

When done the package will be found in the /tmp directory...

Code:
/tmp/jdk-8u5-i586-1.txz
If you want to archive the package for reuse you should move it to a safe archive location, or you can simply install from /tmp if you prefer.

Code:
installpkg /...path-to/jdk-8u5-i586-1.txz

To uninstall...

removepkg jdk

To upgrade to a later version after building...

upgradepkg /...path-to/jdk-XXX-i586-1.txz
Done!

For your shell to pick up the java environment you will need to log out then login again (those profile.d/ scripts).

This is the essence of Slackware package management. What the Slackbuild scripts do for you is to build a well defined package from sources, either source code or pre-packaged binaries as in the jdk case.

Please note that this did NOT use sbopkg or any other tools, but uses only the native pkgtools tools, makepkg, installpkg, upgradepkg or removepkg. sbopkg is a great tool, but is an accessory, not an essential part of the process.

So learn the essentials first, then if/when you use sbopkg or other tool you will understand clearly what it is doing for you!

After you have jdk installed, we will do another example from SBo - do you have a program you need, or should I pick one of my own?

NOTE: If your /tmp directory is on disk you will want to remove the accumulated build trees/packages as they can use up a lot of space if you build many packages!

Code:
sudo rm /tmp/package-*
sudo rm /tmp/*t[xg]z

Last edited by astrogeek; 07-05-2014 at 09:51 PM. Reason: tpos... typs... typos...
 
2 members found this post helpful.
Old 07-05-2014, 06:58 PM   #65
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by turboscrew View Post
Yes, but the point is how to use it when the package does not contain the sources. Like in case of jdk, when you have to get the sources from oracle yourself.
For jdk you can place the source in a directory with the other files found in /extra/java from the slackware dvd. Then you run the slackbuild in the directory. You may need to edit it if the version number has changed or something like that.

You could consider if openjdk address your needs. If so it is available through alien's repositories.

Brian
 
Old 07-05-2014, 06:59 PM   #66
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 turboscrew View Post
I guess I got jdk installed, but how should I use the 'profile.d'-stuff?
source it from .bashrc or .profile? Now I copied the lines from jdk.sh into .bashrc into my home directory, but what's the right way so that eclipse can find java (when I get it installed)?
I see you were installing while I was typing! See above post #64...

Last edited by astrogeek; 07-05-2014 at 07:06 PM.
 
Old 07-05-2014, 07:09 PM   #67
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by Sumguy View Post
One can use SBOpkg to build external sources?
sbopkg only downloads and builds packages available on slackbuilds.org.
Quote:

BWAHAHahahahaha! Welcome to the maze that is Slackware package management for noobs! The fun begins!
Maybe this can help.

1. For installing and keeping updated packages which are part of the standard distribution, use slackpkg (comes with the distribution).
2. For installing and keeping updated packages which are contained in a variety of high quality repositories not part of slackware itself (such as alien's repositories, slacky.eu, etc.) install the slackpkg+ add-on and continue to use slackpkg.
3. For building, installing and keeping updated packages for which slackbuilds.org maintains a slackbuild use sbopkg.
4. For all other software which you need to build yourself because it is not available from any of these sources, try src2pkg.

Brian
 
1 members found this post helpful.
Old 07-05-2014, 07:56 PM   #68
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
Here is a simple activity diagram (i.e. flowchart) of the steps necessary to build and install packages using slackbuild scripts.
Attached Thumbnails
Click image for larger version

Name:	slackbuilds.png
Views:	17
Size:	38.9 KB
ID:	15847  
 
1 members found this post helpful.
Old 07-05-2014, 09:24 PM   #69
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by BCarey View Post
sbopkg only downloads and builds packages available on slackbuilds.org.

That's what I thought. (You mean, I was actually right? I may be catching-on to this stuff, finally! )

Quote:
Originally Posted by BCarey View Post
Maybe this can help.

1. For installing and keeping updated packages which are part of the standard distribution, use slackpkg (comes with the distribution).
2. For installing and keeping updated packages which are contained in a variety of high quality repositories not part of slackware itself (such as alien's repositories, slacky.eu, etc.) install the slackpkg+ add-on and continue to use slackpkg.
3. For building, installing and keeping updated packages for which slackbuilds.org maintains a slackbuild use sbopkg.
4. For all other software which you need to build yourself because it is not available from any of these sources, try src2pkg.

Brian
Ah, another vote for src2pkg! Seems to be a consensus (....or is it "consensi"?)

No.s 1-4 above should be included in the official Slackware documentation. Others have made me aware of those facts, also, but at this point, the repetition helps! Those few simple lines would eliminate a lot of confusion for us noobs coming to Slackware, if we had access to that info from the beginning. (But then again, then there'd be no mystique about Slackware, and us Slackers might lose our geek-like status among the unwashed masses using lesser OS's! )

I mean, part of the fun in using Slackware is:

*:"What version of Windurs do you use?"
"Windows? Pffft! I use Linux"
*:"Oh...Ubuntu? Mint?..."
"Pffft! No, the real thing- Slackware."
*: [Stares in slack-jawed admiration]
 
Old 07-05-2014, 09:32 PM   #70
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
Quote:
Originally Posted by Sumguy View Post
Ah, another vote for src2pkg! Seems to be a consensus
You can of course compile from source on Slackware using make, but, I prefer installing packages that I can easily upgrade or remove. So I will install 3rd party packages from slackbuilds.org, from trusted sources like rworkman or alienBob, or build my own packages using src2pkg.
However, I find that Pat includes such a wide variety of software in a full install of Slackware that I don't need to get too many other applications from other sources.
 
Old 07-06-2014, 02:42 AM   #71
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
SlackBuilds: Advanced Class

kōhai turboscrew - welcome back!

Slackbuilds: Advanced Class - SBo Scripts with Dependencies and Other Surprises

This example will cover most of the scenarios that you will encounter when building from SBo scripts - and leave you with a terrific new program installed.

I have chosen one of my own favorite applications as an example, TaskWarrior. It is a full featured task manager for the shell.

So, having decided to build TaskWarrior we begin by finding it on SBo (click, click, search for "task"), and we arrive here.

Note what is visible in the page view on SBo - everything you need to know, become familiar with it:

Quote:
* Description of the program plus a list of any other SBo applications that it requires, if any. Note that the requires list does NOT include any official Slackware packages that it my depend on, it assumes that you have a full Slackware install.

* A set of links to the project homepage, source downloads (with MD5), SlackBuild script download and sig. The only file that you must download immediately is the SlackBuild archive, task.tar.gz. You may also download the source via the link provided, but let's wait and get it from the download URL provided in the task.info file in the SlackBuild archive.

* Linked list of all files included in the SlackBuild archive. Please click each one for a quick review at this time, and so that you will recognize them after we open the archive. Normally these allow you to quickly see all information on a particular SlackBuild, an online reference.
For now, download the task.tar.gz file to a convenient working location or your home directory. (You may wish to verify its gpg sig, but I will skip that here).

Code:
tar -xvzf task.tar.gz

cd task

ls
README  slack-desc  task.SlackBuild*  task.info

cat README
...
cat task.info
PRGNAM="task"
VERSION="2.2.0"
HOMEPAGE="http://www.taskwarrior.org"
DOWNLOAD="http://www.taskwarrior.org/download/task-2.2.0.tar.gz"
MD5SUM="eb5af01b51b90e01b574464a5d11d4e9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="lua"
...
Here we get two very important bits of info: The download URL and MD5 (same as on SBo page), and the list of required dependencies, just one - lua. So learn that you can always be confident that downloading only the SBo SlackBuild archive (***tar.gz) provides everything you will need to fetch sources and build the package.

Now lets download the source using the URL from the task.info file (or the SBo page, just wanted to show you both are available), and always verify the MD5.

Code:
wget http://www.taskwarrior.org/download/task-2.2.0.tar.gz
....
HTTP request sent, awaiting response... 404 Not Found
2014-07-06 00:50:29 ERROR 404: Not Found.

YIKES!!
Our first surprise - the source is not there! Following the link to the project home page we find that there is a newer version and they do not make previous versions easily available! Bad practice, but it happens... So lets get the latest stable version which is 2.3.0 according to their website and see if it will build...

Code:
wget http://www.taskwarrior.org/download/task-2.3.0.tar.gz
md5sum task-2.3.0.tar.gz
2c1d2c64311855f3519ad038ebd372ac (what mine said... they list SHA too)
... and we need to update the SlackBuild script to recognize this version...

Code:
vi task.SlackBuild
VERSION=${VERSION:-2.3.0} (change version)

NOTE: We should probably also look for other potential differences between versions,
but will ignore that for now if it builds ;)
OK, we are ready with the task build, but we already know it also needs lua, so lets get it - just follow the link from the task page on SBo, download the lua.tar.gz file and untar it, then start to finish...:

Code:
ls /var/log/packages/lua* (test if lua is already installed)

If not... continue,

cd lua
cat README
...
cat lua.info (see dependencies, none, get URL)

wget http://www.lua.org/ftp/lua-5.1.5.tar.gz
md5sum lua-5.1.5.tar.gz
2e115fe26e435e33b0d5c022e4490567

chmod +x lua.SlackBuild (if necessary)

sudo ./lua.SlackBuild (builds in about 15 sec on your machine I think)

installpkg /tmp/lua-5.1.5-i486-1_SBo.tgz
That wasn't so hard - you have built and installed lua! This is a typical SlackBuild session, you will be doing it in your sleep!

Now that we have lua installed, back into the task directory...

Code:
cd path-to-task/...

chmod +x task.SlackBuild (if necessary)

sudo ./task.SlackBuild (about 3 minutes on your machine...)

installpkg /tmp/task-2.3.0-i486-1_SBo.tgz
Done!

A great place to learn your new program is to look at the man pages:

Code:
man task-tutorial (The only way to learn it!)
man task
But I leave that to you, and be sure to visit the project website for more info.

Now this all looks like a lot to do, but let's recap the essentials, this will be true of any SBo script, and most other slackbuilds you will encounter:

Code:
1. Locate program on SBo, download SlackBuild archive, i.e. *tar.gz file
2. Untar archive, cd into working directory, cat README and *.info for more information...
3. For each uninstalled "REQUIRES" - goto 1., rinse and repeat...
... when all REQUIRES are installed
4. Fetch source code from *.info::DOWNLOAD or SBo page links, follow homepage link if problem...
5. Verify MD5 or SHA or gpg sig if possible...
6. Make *.SlackBuild script executable if not already, and run it as root
7. Use installpkg /tmp/pkg-name.txz to install your new package!
8. When done you will want to clean up the /tmp dir if it is on disk, remove packages and /tmp/SBo/...
You can (and I do!) completely manage your Slackware systems using nothing but these methods and tools! I actually prefer this to any automation - I never end up in an unknown state!

But if you decide you like sbopkg, just realize that what it does is automates these same steps for you, no other magic!

Thanks for attending today's class!

Last edited by astrogeek; 07-06-2014 at 03:07 AM.
 
Old 07-06-2014, 03:59 AM   #72
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
Sensei astrogeek:
Quote:
For your shell to pick up the java environment you will need to log out then login again (those profile.d/ scripts).
That's what happens when you do these things after midnight: You don't notice the name of the directory. It's PROFILE.d. How can I be that stupid...

Yes I installed jdk using the Oracle sources and the stuff from slackware.osuosl.org.
I didn't use SBo at all.

From the advanced class:
Quote:
Note that the requires list does NOT include any official Slackware packages that it my depend on, it assumes that you have a full Slackware install.
That's good to know - even if I have full install.

Quote:
You can (and I do!) completely manage your Slackware systems using nothing but these methods and tools! I actually prefer this to any automation - I never end up in an unknown state!
Very good point. I've been there in an unknown state with some installs (on Ubuntu) quite too many times. (I think that sooner or later I'll get rid of Ubuntu.)

Quote:
But if you decide you like sbopkg, just realize that what it does is automates these same steps for you, no other magic!
That's why I was wondering if you could download, say, jdk in some directory and then
use sbopkg to install it. Probably I could, but at this stage of my learning process it might be a bit complicated.

BCarey:
I don't think OpenJDK can be used, because in eclipse SBo says: "This requires: jdk".
I also agree with Sumguy that your list of which tools to use in which situation should go into the documentation.

hitest:
Installed qemu 1.5 into my Ubuntu-machine using "make install". BIG mistake.
It didn't work, and I had quite a job removing it manually.
 
Old 07-06-2014, 04:35 AM   #73
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
BTW, does anyone know how to force XFCE to use given keyboard map.
I rebooted my machine, and now console uses FI, but XFCE uses US.
It s hard to find the keys for special characters.
menu settings keyboard Layout doesn t seem to have any effect.
Tried to check use system defaults too but no effect.

And now all of a sudden, I keep getting popups about wicd even if I use network manager
rc.wicd has no execution rights.

Quote:
Could not connect to wicd's D-Bus interface. Check the wicd log for error messages

Last edited by turboscrew; 07-06-2014 at 04:50 AM.
 
Old 07-06-2014, 04:51 AM   #74
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Code:
su # to get root privileges
cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d
sed -i 's/Option "XkbLayout" "us"/Option "XkbLayout" "fi"/' /etc/X11/xorg.conf.d/90-keyboard-layout.conf
Or use a text editor like nano to make that change in /etc/X11/xorg.conf.d/90-keyboard-layout.conf

For Finnish the option XkbVariant can be set to following values if need be (assuming that you use the evdev driver):
Code:
  classic         fi: Finnish (classic)
  nodeadkeys      fi: Finnish (classic, eliminate dead keys)
  smi             fi: Northern Saami (Finland)
  mac             fi: Finnish (Macintosh)
Of course you'll have to restart he X server for these changes to take effect.
 
1 members found this post helpful.
Old 07-06-2014, 05:01 AM   #75
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Try this, as root (of course):
Code:
cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d/90-keyboard-layout.conf
And edit this line in /etc/X11/xorg.conf.d/90-keyboard-layout.conf to what you want :
Code:
	Option "XkbLayout" "us"
Curses!!! Beaten by a faster typer again!!!

Last edited by brianL; 07-06-2014 at 05:07 AM.
 
1 members found this post helpful.
  


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
ARM Slack -> Beagleboard newbie questions germanopratin Slackware 4 08-14-2011 07:26 AM
Newbie's questions about Slack -Pb- Slackware 8 12-22-2007 07:44 AM
Newbie just installed slack - quick questions ksl Slackware - Installation 3 07-04-2005 09:01 AM
slack newbie questions, vi, xorg 3button mouse, tripleboot with lilo darkleaf Slackware 7 02-24-2005 04:59 AM
Slack Newbie Questions tubatodd Slackware 7 07-01-2004 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:05 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