LinuxQuestions.org
Visit Jeremy's Blog.
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 06-01-2015, 01:47 AM   #1
travis82
Member
 
Registered: Feb 2014
Distribution: Bedrock
Posts: 437

Rep: Reputation: 231Reputation: 231Reputation: 231
creating local repository of slackbuilds with dependency resolution


hi
I have many slackbuilds and package sources organized in one huge directory on my system. each package has it's own folder containing extracted slackbuild archive and source archive in this directory. there is no relation between package dependencies and all package folders have been sorted alphabetically in this directory. I am curios to know is it possible to use this directory as a local repository so that by using sbopkg (or sbotools) I can automatically build and install my desired packages and their dependencies?

Last edited by travis82; 06-01-2015 at 02:52 AM.
 
Old 06-01-2015, 03:04 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
As long as all slackbuilds come from http://slackbuikds.org you could use Chess Griffin's script sqg for that, available in /usr/doc/sbopkg-0.37.0/contrib.

Juts set the options as you like in top of that script as well as the parameters like SRCDIR in /etc/sbopkg/sbopkg.conf.

Then to build and install all your desired packages just write a list of their names (ether one base name the package by line or separated by spaces), without the dependencies, called my_packages then run:
Code:
for i in `cat my_packages`; do
  sqg -p $i
  sbopkg -k -i ${i}.sqf
done
I am not saying that this can run unattended, as sbopkg can detect issues that need you to make a decision.

PS Re reading your post I realize that my proposal is not exactly what you want as it can use the sources already downloaded (but you have to put them all in the same directory) but won't use the extracted slackbuild archives. But you get the idea.

[Off topic]I hope that Kerry's bicycle accident in my country won't hinder the negotiations[/Off topic]

Last edited by Didier Spaier; 06-01-2015 at 03:27 AM. Reason: Off topic sentence added.
 
1 members found this post helpful.
Old 06-01-2015, 03:50 AM   #3
travis82
Member
 
Registered: Feb 2014
Distribution: Bedrock
Posts: 437

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
it can use the sources already downloaded (but you have to put them all in the same directory) but won't use the extracted slackbuild archives. But you get the idea.
so I have to archive all of skackbuilds in tar.gz format and put hem along all of package sources in same directory without any further organization?

Quote:
I hope that Kerry's bicycle accident in my country won't hinder the negotiations
I hope so. I guess cripple Kerry is more dangerous

oops, I can't download sbopkg package from googlecode because of the sanctions. do you know alternative trustful mirror?

Last edited by travis82; 06-01-2015 at 04:03 AM.
 
Old 06-01-2015, 05:58 AM   #4
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
There's sbopkg and sbotools. Sbotools might be what you're looking for. It downloads the entire SBo set into a directory similar to how BSD and CRUX Linux use ports and Gentoo/Funtoo use portage. It also has some dependency resolution using the REQUIRES="" entry in the info files, but most for required only. Anything else must be added prior for additional build flags for the script or automatic detection running the configuration. The only thing it doesn't include are the source tarballs, those you still have to get over the network.
 
1 members found this post helpful.
Old 06-01-2015, 07:52 AM   #5
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 915

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Quote:
Originally Posted by travis82 View Post
hi
I have many slackbuilds and package sources organized in one huge directory on my system. each package has it's own folder containing extracted slackbuild archive and source archive in this directory. there is no relation between package dependencies and all package folders have been sorted alphabetically in this directory. I am curios to know is it possible to use this directory as a local repository so that by using sbopkg (or sbotools) I can automatically build and install my desired packages and their dependencies?
Do you mean that you have a repository something like SBo but without the categories (academic, accessibility, audio, ...)? Then provided you have the .info file for each package directory (you mention each "containing extracted slackbuild archive"), then you can use hoorex to calculate the dependency relationships between all of them and write an appropriate build order to a file. Then use the contents of that file in a loop to do the building, something like (as root):
Code:
# Setup dependency cache
hoorex -s /path/to/huge/directory/
# Write out build order for the "all" group i.e. everything in the repo
hoorex -r -1 -g all 2>&1 |tee buildorder.txt
# Loop through entries in buildorder.txt to build & install the packages
cd /path/to/huge/directory
for appname in $(cat /path/to/buildorder.txt) ; do
  cd $appname
  sh $appname.SlackBuild
  upgradepkg --install-new --reinstall /tmp/$appname-*SBo.tgz
  cd -
done
chris
 
1 members found this post helpful.
Old 06-01-2015, 08:12 PM   #6
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Didier Spaier View Post
[Off topic]I hope that Kerry's bicycle accident in my country won't hinder the negotiations[/Off topic]
Please do not refer to anything political in the forum.

It will annoy someone. In this instance, me. I then feel the need to comment further, which would eventually make our systemd screamfests appear tame.
 
1 members found this post helpful.
Old 06-02-2015, 12:49 AM   #7
travis82
Member
 
Registered: Feb 2014
Distribution: Bedrock
Posts: 437

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by chris.willing View Post
Do you mean that you have a repository something like SBo but without the categories (academic, accessibility, audio, ...)? Then provided you have the .info file for each package directory (you mention each "containing extracted slackbuild archive"), then you can use hoorex to calculate the dependency relationships between all of them and write an appropriate build order to a file. Then use the contents of that file in a loop to do the building, something like (as root):
Code:
# Setup dependency cache
hoorex -s /path/to/huge/directory/
# Write out build order for the "all" group i.e. everything in the repo
hoorex -r -1 -g all 2>&1 |tee buildorder.txt
# Loop through entries in buildorder.txt to build & install the packages
cd /path/to/huge/directory
for appname in $(cat /path/to/buildorder.txt) ; do
  cd $appname
  sh $appname.SlackBuild
  upgradepkg --install-new --reinstall /tmp/$appname-*SBo.tgz
  cd -
done
chris
sounds good. I will give it a try.

Quote:
Please do not refer to anything political in the forum
It will annoy someone. In this instance, me. I then feel the need to comment further, which would eventually make our systemd screamfests appear tame.
I do apologize
 
Old 06-02-2015, 12:57 AM   #8
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Quote:
Originally Posted by travis82 View Post

oops, I can't download sbopkg package from googlecode because of the sanctions. do you know alternative trustful mirror?

maybe, and hopefully, Niki's page works in your country
http://www.microlinux.fr/microlinux/...source/sbopkg/
 
1 members found this post helpful.
Old 06-02-2015, 01:14 AM   #9
travis82
Member
 
Registered: Feb 2014
Distribution: Bedrock
Posts: 437

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by a4z View Post
maybe, and hopefully, Niki's page works in your country
http://www.microlinux.fr/microlinux/...source/sbopkg/
worked, thanks a lot
 
Old 06-02-2015, 01:33 AM   #10
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 915

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Quote:
Originally Posted by travis82 View Post
sounds good. I will give it a try.
If it breaks part way through e.g. missing source tarball etc. then, rather than starting all over again, edit your buildorder.txt file to remove those package names which have already succeeded and then run the build/install loop again (after sorting out whatever caused the stoppage of course).

chris
 
Old 06-02-2015, 03:40 AM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
Please do not refer to anything political in the forum.

It will annoy someone. In this instance, me. I then feel the need to comment further, which would eventually make our systemd screamfests appear tame.
If someone should apologize for a comment I made that's me, not travis82 who just answered the quoted post. Actually I hesitated before posting it and I now realize that a PM would have been more appropriate as this is a Slackware forum, not the General one.
 
  


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
(another) Tool to manage packages in slackbuilds local repository aaditya Slackware 6 12-20-2014 12:14 AM
Creating Local Repository srinivasmmdl Linux - Newbie 2 04-23-2012 08:25 PM
Creating a local repository from 5 DVD set anupammr89 Debian 1 01-06-2011 02:20 AM
Creating Ubuntu Local Repository? your_shadow03 Linux - Server 1 03-18-2009 03:59 PM
Creating A Local Debian Repository ashmita04 Debian 1 01-23-2008 03:28 PM

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

All times are GMT -5. The time now is 07:59 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
Open Source Consulting | Domain Registration