Nethence Documentation Lab Webmail Your IP BBDock  


Those documents are obsolete, please use the Nethence Documentation instead.

HomeUnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigsPrivate

pkgsrc on Slackware Linux
 
 
http://pbraun.nethence.com/doc/sysutils_linux/slackware.html
http://pbraun.nethence.com/doc/sysutils_linux/slackware_pkgsrc.html
http://pbraun.nethence.com/doc/sysutils_linux/slackware_slackinst.html
(FR) http://pbraun.nethence.com/doc/sysutils_linux/slackware_dedibox.html
 
http://pbraun.nethence.com/doc/sysutils_bsd/pkgsrc.html
http://pbraun.nethence.com/doc/sysutils_linux/slackware_pkgsrc.html
 
 
Preparation
We used to have a list the required minimum packages to run pkgsrc, but we gave up on it. Simply make sure you've got the,
A
AP
D
L
N
sets mandatory (ADD) and recommended (REC) packages installed.
 
Note. to install mandatory and recommended packages from a whole set or several sets you can use the installset.ksh script,
mkdir -p ~/bin
cd ~/bin
wget http://pbraun.nethence.com/code/sysutils/slack/searchpkg.ksh
wget http://pbraun.nethence.com/code/sysutils/slack/installpkg.ksh
wget http://pbraun.nethence.com/code/sysutils/slack/installset.ksh
chmod +x checkpkg.ksh
chmod +x installpkg.ksh
chmod +x installset.ksh
 
 
Bootstrapping pkgsrc
Get pkgsrc-current (http://www.netbsd.org/docs/software/packages.html ==> bottom right link) and extract it,
cd /usr
wget ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc.tar.gz
#rm -rf /usr/pkgsrc
tar xzf pkgsrc.tar.gz
 
We need to fix bmake compilation settings so it uses uname -m, not uname -p,
cd /usr/pkgsrc/devel/bmake
files=`grep -r 'uname -p' * | grep -v ChangeLog | cut -f1 -d: | uniq`
for file in $files; do
[[ -f $file.dist ]] || cp $file $file.dist
sed 's/uname -p/uname -m/g' $file.dist > $file
done
grep -r 'uname -p' * | grep -v ChangeLog
 
Boostrap pkgsrc,
cd /usr/pkgsrc/bootstrap
#rm -rf work
# note. this may take a while,
./bootstrap
 
Adapt your environment,
cd ~/
vi .bashrc
add,
PATH=$PATH:/usr/pkg/sbin:/usr/pkg/bin
MANPATH=$MANPATH:/usr/pkg/man
apply,
source .bashrc
 
 
Pkgsrc configuration
Eventually update the vulnerability list and audit the packages regulary,
cd /etc/cron.daily
cat > auditpkg <<EOF9
#!/bin/ksh
/usr/pkg/sbin/pkg_admin fetch-pkg-vulnerabilities >/dev/null 2>&1
/usr/pkg/sbin/pkg_admin audit
EOF9
chmod +x auditpkg
do it once for testing,
ls -l /var/db/pkg/pkg-vulnerabilities
./auditpkg
ls -l /var/db/pkg/pkg-vulnerabilities
 
Configure pkgsrc,
cd /etc
ln -s /usr/pkg/etc/mk.conf
ln -s /usr/pkg/etc/pkg_install.conf
  ln -s /usr/pkg/etc/audit-packages.conf
vi mk.conf
add/adapt those variables accordinly,
MASTER_SITE_SOURCEFORGE=freefr.dl.sourceforge.net \
ovh.dl.sourceforge.net/sourceforge \
heanet.dl.sourceforge.net/sourceforge/ \
belnet.dl.sourceforge.net/sourceforge/
USA_RESIDENT=NO
PASSIVE_FETCH=YES
#not on slackware PKG_RCD_SCRIPTS=YES
#ALLOW_VULNERABLE_PACKAGES=YES
#ACCEPTABLE_LICENSES+=pine-license
#ACCEPTABLE_LICENSES+=lame-license
#ACCEPTABLE_LICENSES+=majordomo-license
#X11BASE=/usr/pkg/X11R6
also define your prefered mirror for daily vulnerability list download,
# note. new file,
vi audit-packages.conf
like e.g.,
VUL_SOURCE="ftp: //ftp.fr.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities"
 
 
Ready to go
You can now use pkgsrc on Slackware Linux e.g.,
export PATH=/usr/pkg/bin:/usr/pkg/sbin:$PATH
cd /usr/pkgsrc/sysutils/pwgen
bmake package
pkg_info
ls -l /usr/pkgsrc/packages/All
cd ~/
source ~/.bashrc
note the 'b' for NetBSD make.
note. putting /usr/pkg/{bin,sbin} at the beginning of the path before starting
note. putting /usr/pkg/{bin,sbin} back at the end of the path once finished
 
 
References
http://www.netbsd.org/docs/software/packages.html
ftp://ftp.netbsd.org/pub/pkgsrc/
 

Last update: Nov 06, 2011