LinuxQuestions.org
Review your favorite Linux distribution.
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 05-06-2017, 11:31 AM   #1
bilbod
Member
 
Registered: Mar 2003
Posts: 134

Rep: Reputation: 33
How to use slackrepo with a VM


There is nothing new here, this is just a brief description of how I do it, mostly to help newbies.

I assume you have Slackware64 installed on your computer and you are going to install Vbox so you can create a VM with a fresh Slackware environment for slackrepo.

Almost everything is done from the command line as root.

Open a terminal on the host.
Code:
su -
I create a directory in /root where I store source files that I install manually.
Code:
mkdir tmp
mkdir tmp/src
cd tmp/src
Install the latest Vbox and extpack:

Code:
wget -q https://www.virtualbox.org/wiki/Linux_Downloads -O - |grep  -o '"http[^<>]*amd64\.run"' |xargs wget -c
wget -q https://www.virtualbox.org/wiki/Downloads -O - | grep -v "Old" |grep  -o '"http.*pack"' |xargs wget -c
chmod +x VirtualBox-5.1.20-114628-Linux_amd64.run
./VirtualBox-5.1.20-114628-Linux_amd64.run
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.1.20-114628.vbox-extpack
Run Vbox from a vbox user account.

Point the guest's CDrom to the iso image you used to install Slackware64 on the host and install Slackware on the guest.

Install Guest Additions on guest (Installing vbox on guest is optional, but it helps with stability)
Point the guest's cdrom to the Additions iso image on the host:

Code:
cd /run/media/bhr/VBOXADDITIONS_5.1.20_114628
./VBoxLinuxAdditions.run
From here on almost everything is done in the guest.

Setup networking on the guest.

Use mirror_test.sh (http://www.linuxquestions.org/questi...ml#post5473169) to find the fastest Slackware mirror.

Uncomment the fastest mirror in /etc/slackpkg/mirrors

First time only:
Code:
slackpkg update gpg
Full system update:
Code:
slackpkg update
slackpkg install-new
slackpkg upgrade-all
slackpkg clean-system
If the update includes a New kernel -> reboot.

Install the latest release of slackrepo from here -> https://github.com/idlemoor/slackrepo/releases

There is a tutorial here (http://www.linuxquestions.org/questi...ns-4175593406/) to help configure slackrepo, I found it useful, you should read the thread.

Generate gpg key for the guest, I used no passphrase, just press enter, otherwise I could not get gpg-agent to work.

gpg --gen-key

The tutorial points out this is very slow in the VM. His solution is complicated and unnecessary. Just open a tab in the terminal and run:

Code:
find /var/ /usr /lib /srv -type f -print0 | xargs -0 cat > /dev/null
That speeds up key generation dramatically. It only took 40 seconds on my computer.

Changes made to my /etc/slackrepo/slackrepo_SBo.conf:

Code:
PKGREPO="/media/sf_VboxShared/slackrepo/SBo/packages/"
USE_GENREPOS='1'
REPOSOWNER="uid you used for gpg key generation"
DL_URL="address of your http server:8000"
RSS_UUID="b6f5dd00-2c9c-11e7-b4a2-080027d788da"
USE_GPGAGENT="1"
The unique ID for RSS_UUID came from

uuidgen -t

Notice that I put the REPO on the HOST computer so it will be availble when the VM is not running.

########################################################
# Note until I defined REPO as SBo, it was using the ponce repo by default.

Code:
echo 'REPO="SBo"' >> /root/.slackreporc
#######################################################

You should be good to go. Start building packages for the repo.

Example:

Code:
slackrepo build icewm icewm-themes slackware-xdg-menu
To update the repository:
Code:
slackrepo update
To make the repository available -> on the host, as root, navigate to the shared Vbox directory. On my computer it is /home/bhr/VboxShared/slackrepo/SBo/packages/

Code:
cd /home/bhr/VboxShared/slackrepo/SBo/packages/
python -m SimpleHTTPServer 8000
That uses port 8000 on the host computer for the http server.

If you point any browser to the <IP address of the host>:8000 it will see the packages directory.

To install your repo packages on another Slackware computer, install slackpkg+ on that computer. It is a plugin for slackpkg.

Code:
cd /root/tmp/src
wget -c "https://iweb.dl.sourceforge.net/project/slackpkgplus/slackpkg%2B-1.7.0-noarch-4mt.txz"
installpkg slackpkg+-1.7.0-noarch-4mt.txz
Changes to /etc/slackpkg/slackpkgplus.conf

Code:
PKGS_PRIORITY=(mySlackRepo:.*)
REPOPLUS=( slackpkgplus mySlackRepo)
MIRRORPLUS['mySlackRepo']=<repo http server address>:8000
You can now use slackpkg to install any package in your repo (only run this the 1st time unless you change the gpg key)

Code:
slackpkg update gpg
Check for updates.
Code:
slackpkg update
Example:

Code:
slackpkg install icewm icewm-themes slackware-xdg-menu
 
Old 05-06-2017, 12:53 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 6,013

Rep: Reputation: 3684Reputation: 3684Reputation: 3684Reputation: 3684Reputation: 3684Reputation: 3684Reputation: 3684Reputation: 3684Reputation: 3684Reputation: 3684Reputation: 3684
Quote:
Originally Posted by bilbod View Post
Use mirror_test.sh (http://www.linuxquestions.org/questi...ml#post5473169) to find the fastest Slackware mirror.
I actually have this on my github with some minor changes from the one in that post (LQ won't let you edit posts after a certain period of time... otherwise I would've updated that with the link to my github).

https://github.com/bassmadrigal/scri...r-speedtest.sh

Quote:
Originally Posted by bilbod View Post
The tutorial points out this is very slow in the VM. His solution is complicated and unnecessary. Just open a tab in the terminal and run:

Code:
find /var/ /usr /lib /srv -type f -print0 | xargs -0 cat > /dev/null
That speeds up key generation dramatically. It only took 40 seconds on my computer.
That is a much better solution! I'll try and remember it if I need to use it in the future
 
  


Reply


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
[SOLVED] Problem with slackrepo and slackpkg+? bilbod Slackware 6 05-05-2017 11:24 PM
[SOLVED] Can't Build qt5 with slackrepo in VM bilbod Slackware 15 05-03-2017 02:30 AM
[SOLVED] How To Install Slackrepo? bilbod Slackware 16 04-26-2017 09:56 PM
slackrepo and custom SlackBuild atelszewski Slackware 4 11-01-2016 06:42 PM

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

All times are GMT -5. The time now is 03:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration