LinuxQuestions.org
Visit Jeremy's Blog.
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 06-10-2018, 08:06 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,385

Rep: Reputation: 120Reputation: 120
How to install source package in Slackware


I'm a regular user of Slackpkg, but I've got something out of my experience. I want to install Samba 4.8.2 on my Slackware64 14.2 system. I was warned not to use the binary package as it is built against -current. Instead, I was advised to build from sources and directed to http://ftp.slackware.com/pub/slackwa...ource/n/samba/. This site contains the following:
Code:
doinst.sh.gz	2016-06-13 04:19 	703 	 
rc.samba	2016-06-04 17:50 	940 	 
samba-4.8.2.tar.asc	2018-05-16 10:15 	195 	 
samba-4.8.2.tar.lz	2018-05-16 10:15 	10M	 
samba.SlackBuild	2018-04-29 18:01 	6.8K	 
samba.url	2018-05-17 17:15 	127 	 
slack-desc	2018-02-27 06:13 	960 	 
smb.conf.default	2018-04-29 17:31 	7.7K	 
smb.conf.default.orig	2018-01-14 20:41 	7.7K	 
smb.conf.diff.gz	2017-03-23 19:18 	536
What's missing (for me) is a README file telling me what to do with these files. What do I do? Run samba.SlackBuild? Web searches lead me to believe that doinst.sh should be run last (to install?), is that correct?

I did look at https://slackbuilds.org/howto, which says to run <pkg>.SlackBuild. No mention of doinst.sh.

Help appreciated

Last edited by mfoley; 06-10-2018 at 08:12 PM.
 
Old 06-10-2018, 08:13 PM   #2
hitest
LQ Guru
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 5,381

Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
You could try out gnashley's src2pkg utility. The utility will take source and create a Slackware package that you can install using the installpkg command. This may be a good situation to try out the utility.

http://distro.ibiblio.org/amigolinux/download/src2pkg/
 
Old 06-10-2018, 08:21 PM   #3
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,141

Rep: Reputation: Disabled
Yes, just run the .SlackBuild and use upgradepkg on the resulting package in /tmp/.

Quote:
Originally Posted by hitest View Post
You could try out gnashley's src2pkg utility. The utility will take source and create a Slackware package that you can install using the installpkg command. This may be a good situation to try out the utility.

http://distro.ibiblio.org/amigolinux/download/src2pkg/
I'm sorry, but why would you ever suggest this when the op can just run's Pat's SlackBuild?
 
2 members found this post helpful.
Old 06-10-2018, 08:41 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 13,563
Blog Entries: 20

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
It looks like a Slackbuild, as it has a samba.SlackBuild file in it. There is a HOWTO at the Slackbuilds website: https://slackbuilds.org/howto/
 
Old 06-10-2018, 08:54 PM   #5
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 449

Rep: Reputation: 225Reputation: 225Reputation: 225
Quote:
Originally Posted by mfoley View Post
What's missing (for me) is a README file telling me what to do with these files. What do I do? Run samba.SlackBuild? Web searches lead me to believe that doinst.sh should be run last (to install?), is that correct?

I did look at https://slackbuilds.org/howto, which says to run <pkg>.SlackBuild. No mention of doinst.sh.

Help appreciated
Just create a folder, say: /kit/samba and download all the files that you found at http://ftp.slackware.com/pub/slackwa...ource/n/samba/ in it.
Make samba.SlackBuild executable
Code:
chmod +x samba.SlackBuild
and run it. You don't need any README and you don't need to care about doinst.sh, it'll get extracted (from doinst.sh.gz) and used from within the samba.SlackBuild script itself.

Then follow what orbea advised, take the the resulting (output of samba.SlackBuild) new samba package from /tmp/samba-$VERSION-$ARCH-$BUILD.txz ($VERSION-$ARCH-$BUILD will get some static values), save it somewhere for future use and run:
Code:
upgradepkg /the_path_you_saved_it/samba-$VERSION-$ARCH-$BUILD.txz
It's that simple.
 
2 members found this post helpful.
Old 06-10-2018, 08:57 PM   #6
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,385

Original Poster
Rep: Reputation: 120Reputation: 120
Quote:
Originally Posted by orbea View Post
Yes, just run the .SlackBuild and use upgradepkg on the resulting package in /tmp/.
OK, I did run the .SlackBuild (test platform), but I did 'installpkg' instead of 'upgradepkg'. Was that bad? I can redo from scratch if so. I did not run doinst.sh. What's that for?

After installpkg, it did not clobber my /etc/samba/smb.conf or /etc/rc.d/rc.samba. Nor did it do anything bad with any of the .ldb, .mdb files.

I'm going to try to fire it up after a backup, unless orbea thinks I screwed up by not doing 'upgradepkg'.

Frankbell: Yes, I saw those instructions.
 
Old 06-10-2018, 08:57 PM   #7
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,141

Rep: Reputation: Disabled
One thing I would add is that if there is anything that is built against samba (?) they may need to be rebuilt too.
 
Old 06-10-2018, 09:53 PM   #8
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,385

Original Poster
Rep: Reputation: 120Reputation: 120
Built and did upgradepkg on production system. Seems to be running ok, (but it's only been 10 minutes!). Am able to authenticate using active directory credentials from several workstations, Linux and Windows, and get email using GSSAPI. So far so good. Will mark Solved tomorrow if everything continues OK.

I guess I don't have to worry about doinst.sh

Quickie explanation on the difference between installpkg and upgradepkg: https://groups.google.com/forum/#!to...re/vIn26lkLiXk

abga: I created my own mini-readme:
Code:
mkdir samba-4.8.2
cd samba-4.8.2
wget --passive-ftp ftp://ftp.slackware.com/pub/slackware/slackware-current/source/n/samba/*
chmod +x samba.SlackBuild
./samba.SlackBuild
upgradepkg /tmp/samba-4.8.2-x86_64-1.txz

# ref: https://slackbuilds.org/howto/
I know I've done the above before, but infrequently enough that I need a reminder. https://slackbuilds.org/howto/ is probably good enough too, if I think to bookmark that link.

btw - I did also blacklist samba in /etc/slackpkg/blacklist

Last edited by mfoley; 06-10-2018 at 10:15 PM.
 
Old 06-10-2018, 10:08 PM   #9
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,141

Rep: Reputation: Disabled
installpkg installs new packages which are not already installed or where its useful and safe to have multiple different versions installed as can be the case with kernel modules. upgradepkg upgrades existing packages to "new" versions, new versions do not have to be a necessarily newer version and just has to be a different version. If you are re-installing an existing package you would want 'upgradepkg --reinstall'. Please see the man pages for more info.
 
1 members found this post helpful.
Old 06-10-2018, 11:59 PM   #10
hitest
LQ Guru
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 5,381

Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Quote:
Originally Posted by orbea View Post
I'm sorry, but why would you ever suggest this when the op can just run's Pat's SlackBuild?
My bad for not reading the OP's post closely enough. My apologies! Yes. if a slackbuild exists use that. The src2pkg utility can come in handy if no slackbuild exists for the source that you want to install.
 
1 members found this post helpful.
Old 06-11-2018, 02:25 AM   #11
solarfields
Member
 
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 833

Rep: Reputation: 321Reputation: 321Reputation: 321Reputation: 321
When I install two versions of the same package by mistake, I remove them first and then install the version I want. About doinst.sh -- it is executed automatically when you install the new package. You do not have to run it yourself.
 
2 members found this post helpful.
Old 06-11-2018, 11:06 PM   #12
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: Newport News, VA
Distribution: Slackware
Posts: 5,067

Rep: Reputation: 2864Reputation: 2864Reputation: 2864Reputation: 2864Reputation: 2864Reputation: 2864Reputation: 2864Reputation: 2864Reputation: 2864Reputation: 2864Reputation: 2864
If you do have two versions installed, you can simply remove the older one. removepkg is smart enough to only remove files from the older version that don't exist in the newer version. When you ran installpkg, it would've overwritten any files from the older package that were the same. So, you can simply just remove the older version (you can find the older version using ls -l /var/log/packages/samba* and then using the whole filename of the older version).
 
Old 06-12-2018, 09:54 AM   #13
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,385

Original Poster
Rep: Reputation: 120Reputation: 120
I ran installpkg on the test platform. I did run updatepkg on the production system, so I think I'm OK in that I don't have two packages installed. So far, everything seems to be running just fine. I've only noticed a slight change in the log messages, but nothing otherwise serious. No complaints from the users. I did have to re-set shared drive credentials on a non-domain member Virtual Machine, but otherwise, no incidents.
 
  


Reply

Tags
install, slackpkg, source


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Concern on how to update a package from source-code [Slackware 13.37] charging-ibis Linux - Newbie 1 11-30-2012 12:09 PM
What are the steps to build and install a Slackware package from a RPM package? sudeepkulkarni Slackware 6 04-25-2011 12:51 PM
Anybody have the partprobe source or slackware 13.0 package... trist007 Slackware 2 10-20-2010 08:35 AM
Install a source package chengjin Linux - Software 1 04-09-2008 12:40 PM
Slackware Package Management vs Compiling From Source luco.vico Slackware 8 03-09-2008 10:52 AM

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

All times are GMT -5. The time now is 12:18 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration