SUSE root Logo

 Home -> Blog
 Main Menu
 Recent Blog Posts

NetIQ Video

Treo 700p Tether with Linux

SUSE 10.2 on Dell Optiplex 320

SUSE 10.2

...the blog

 SUSE root News & Blog

September 22, 2006

Creating a Local Repository in Vector Linux

I recently upgraded my aging, but much-loved laptop the other day from Vector Linux 5.0 SOHO to Vector 5.1.1 SOHO. I'll try to post a review later, but the short version is: "slick, fast, better, more features".

I often like to compile my own software even when binaries are available (sometimes you can't find binaries). Sometimes options are missing, sometimes they just don't work, sometimes...well you know the reasons. The problem was that with Vector Linux I could not figure out how to use slapt-get (or gslapt, if you prefer) to install local software packages. I spent a lot of time searching and ran into several dead-ends, instructions that assumed the reader was a power-user, and some flat-out bad advice. So I'm going to lay out the steps as plainly as possible on how to use slapt-get to install binaries you've downloaded or compiled yourself.

This is pretty easy to do, it's just long because I'm sympathetic to newer users so I go into detail where it may seem redundant to some.


I'm going to assume you know how to do the configure, make, make install dance. This builds the software and throws the binaries into your system, bypassing your package manager. I'll also assume you know how to use checkinstall which turns the compiled software into a package. If you don't know how to do these things, do some Googling and come back when you can go from source to ready-to-install package.

Create Local Repository Directory

OK, we're going to make a directory where you will store the packages you create for use with slapt-get. You can put it pretty much wherever you want and call it whatever you want. When I was going through this process I found some instructions that almost-worked that suggested putting the directory in /usr/src/ , so that's what I did. As tempting as it may be, do not place your new directory in /home/ftp/pub/veclinux/packages/; whenever you do a slapt-get --clean you'll delete your packages in that directory. It also makes since to make the directory owned by root since only root should be installing packages and using checkinstall anyway. So my new directory was /usr/src/local_repo/ .

Minor Script

Vector comes with software that can automatically build the checksums and package information required by slapt-get. You just need to run the command makeinfo-slapt with a switch that tells it whether it should build the info for all the packages in the directory or just the new ones. Now, if you don't mind cd'ing to your local repository and running this command every time you add a new package, then you can skip to the part below that talks about adding your local repo to the slapt-getrc; I'd just suggest playing with the makeinfo-slapt command to get comfortable with it and see what it does. However, with a couple easy steps, you can save a a little work each time and make it easier to remember.

As root, create a new file in /root/ called "build_repo". In this file add:

cd /usr/src/local_repo/
makeinfo-slapt new

The middle line should be the new directory you created in the previous step to hold your downloaded/created packages. Save your addition, close the file, and make it executable. As you can see, when this script is run, it changes to the local repository directory and runs the makeinfo-slapt command with the "new" option. If you want it to build the info for all your packages every time you run it, then use "all" instead of "new"; in most cases, you won't need to do this.

Add an Alias

As root, open root's .bashrc. We're going to create an alias that automates executing the script we just created above. Near the bottom of root's .bashrc, add:

##My alias
alias buildrepo='/root/build_repo'

That means that as root, we can just type buildrepo and it will execute the script we created. If you're using the command line, end your shell session or open a new terminal (then su to root) so that it incorporates the changes you made to root's .bashrc.

Modify your slapt-getrc

We now need to make sure slapt-get knows about our new local repository. As root, open your /etc/slapt-get/slapt-getrc file. We need to add the line

SOURCE=file:///usr/src/local_repo/ the file. Obviously, if the directory you created is elsewhere, you should use that path instead. There are a couple different places you can add this line. I like to put it in the "FAVORITE" group so slapt-get tries to use my packages first, but you can also put it in the "VECTOR" group.

Once you've made the changes, save the file and close it.

Running the script

Now we just need to populate the new directory of ours. If you've downloaded or compiled a package recently, just move it to the new directory as root. If you don't have any .tgz packages on hand, you'll need to download or compile at least one and put it in your new repo directory.

Now as root (from any directory) run our buildrepo command. You'll see some output that indicates it's building the necessary files (and deleting old ones). When it's done, it will give you a prompt.

Now do a slapt-get --clean (this probably isn't required, but since we modified your slapt-getrc, it will give you a clean slate). If you like to manage your packages from the command line, just do a slapt-get --update and it should add your new local packages; if you're using gslapt, just open it and click update. Now using the command line or gslapt, do a search for the package(s) you put in your local repository. You should see them and be able to use them.

Now every time you download or compile a new package, just move it (them) to your new local repo, as root run "buildrepo", then update your slapt-get using the command line or gslapt...good to go.


First, make sure you're root and have made the changes above as root.

If you get errors running buildrepo, try cd'ing to your local repo and running makeinfo-slapt all. If you get errors at this point make sure the package(s) you put in the directory were compiled correctly. If the errors go away follow the rest of the steps and then go back and make sure you built build_repo script correctly.

If you just can't make it work and want everyting back the way it was, just delete the directory you created, delete the "build_repo" script in /root/, remove the changes made to slapt-getrc, remove the additions to root's .bashrc, clean slapt-get, and then update slapt-get; you're back to the way things were.

This is pretty much exactly what I did (excluding the trial and error) and it worked like a champ. If I've made a mistake somewhere or skipped a step, please let me know. It's also possible that there's an easier way to do this and I'm just hard-headed, if this is the case, please let me know.

Posted 14 years, 1 month ago on September 22, 2006
The trackback url for this post is
הצעות מחיר לביטוח מקיף לרכב
... ביטוח רכב חובה - פוליסת ביטוח בסיסית בהתאם לתקנות דוגמת חובת הגילוי בעניין מהותי, נדרש מהאדם שכל הפרטים שהוא מציג אכן יהיו נכונים ומדויקים. במידה ויש, רצוי גם לשוחח עם נציג חברות הביטוח השונות. ... SUSE root News & Blog ... Trackback from הצעות מחיר לביטוח מקיף לרכב Posted 5 years, 9 months ago • Reply
Comment Trackback URL :
Is There A Generic Equivalent For Cialis
... get cialis - Awareness of sexual performance and to keep an erection! sufficient for sexual health. Research indicates 38 percent of the most risky affair about it so if you walk faster. One... SUSE root News & Blog ... Trackback from Is There A Generic Equivalent For Cialis Posted 5 years, 8 months ago • Reply
Comment Trackback URL :
ביטוח מקיף לרכב סיאט איביזה
... ביטוח רכב מקיף - במקרים שונים אנחנו נאלצים לעתים לבטל פוליסת ביטוח רכב, אך ביטוח מקיף לרכב מציע את ביטוח מקיף לרכב סיאט איביזה. iii  עלות הביטוח מקיף חובה ביטוח רכב באינטרנט ומבלי לצאת מהבית. ב... SUSE root News & Blog ... Trackback from ביטוח מקיף לרכב סיאט איביזה Posted 5 years, 7 months ago • Reply
Comment Trackback URL :
Buy Levitra Cialis Online
... order generic cialis - The penis boosts sexual strength and treat erectile dysfunction helps. This herb this grows in the relationship may further sour and dour. When your kidneys are vibrant you are ... SUSE root News & Blog ... Trackback from Buy Levitra Cialis Online Posted 5 years, 6 months ago • Reply
Comment Trackback URL :
אישור עבודה זמני בקנדה
... עבודה בחו"ל - הטיפ יכול לנוע מכמה דולרים בודדים למובר מוביל ועד למאה דולר ויותר במקרה ש 'בעל הבית השתגע'. משרות מזדמנות ניתן למצוא עבודה באחת מהמדינות בחו"ל, שלא דורשות מהעובד ... SUSE root News & Blog ... Trackback from אישור עבודה זמני בקנדה Posted 5 years, 1 month ago • Reply
Comment Trackback URL :
ביטוח מקיף סוזוקי אלטו
... ביטוח רכב - השמאי ביטוח מקיף סוזוקי אלטו של אבירם קבע בחוות דעתו כי ניתן לתבוע את חברת הביטוח את הפוליסה עבורם. חשוב לציין, כי בשונה מעלות מרכיב ביטוח צד ג' וביטוח מקיף לרכב אינה דבר פ... SUSE root News & Blog ... Trackback from ביטוח מקיף סוזוקי אלטו Posted 4 years, 10 months ago • Reply
Comment Trackback URL :
How To Attract A Married Woman In India
... - You see, how many women at bars or nightclubs, initiate conversations with women you want. Perhaps this commenter really liked the pheromones pheros are unscented and expressed ... SUSE root News & Blog ... Trackback from How To Attract A Married Woman In India Posted 4 years, 6 months ago • Reply
Comment Trackback URL :
What Is The Difference Between A Healthy Diet And Dieting To Lose Weight
... health - There are many different experiments ranging form body exercise to burn calories and fat. That is require in order to understand what an effective reputation efficiently coupled... SUSE root News & Blog ... Trackback from What Is The Difference Between A Healthy Diet And Dieting To Lose Weight Posted 4 years, 1 month ago • Reply
Comment Trackback URL :
Brain Gym Exercises Uk
... memory brain power - See how a session might work on one side of the brain. The function of our self as invulnerable to physical physical exercise?cardiovascular. They contain antioxidants, omega-3 ... SUSE root News & Blog ... Trackback from Brain Gym Exercises Uk Posted 3 years, 9 months ago • Reply
Comment Trackback URL :

Comments have now been turned off for this post

Powered by bBlog the free PHP Blogging script.
SiteMap © 2004 by Damian Smith. Trademark and copyleft information is covered on the About SUSEroot page. Contact me at