LinuxQuestions.org
Review your favorite Linux distribution.
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 09-15-2012, 04:32 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
slackpkg vs. third-party package repository


Hi,

In my office I have a build box for 32-bit as well as 64-bit packages, that I use when performing installations on client machines. What I normally do is burn these to a CD-Rom and also copy them to a USB stick, so once I've installed a vanilla Slackware system, I can easily add these (currently 170) packages.

Now I wonder if there is a way of doing the following:
  1. Put all my packages on my HTTP and/or FTP mirror
  2. Configure slackpkg to use this mirror
  3. Use slackpkg transparently from there on, e. g. 'slackpkg install xscreensaver' would fetch the package from an official Slackware mirror, but 'slackpkg install lame' would use mine.

My packages replace the odd vanilla Slackware package, things like vte or MPlayer. And they are all tagged "_microlinux" so there's no mistake.

Is there a chance for this to succeed, or is this doomed from the start?

Cheers.
 
Old 09-15-2012, 05:09 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Unfortunately that is not going to work. Slackpkg only works with official packages. The program reads the meta-data files in the Slackware tree (ChangeLog.TXT, PACKAGES.TXT, CHECKSUMS.MD5 etc) and from that, it determines the list of packages which make up a release. You can add to the tree what you want, but it won't be picked up by slackpkg.

Eric
 
5 members found this post helpful.
Old 09-15-2012, 05:28 AM   #3
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by Alien Bob View Post
Unfortunately that is not going to work. Slackpkg only works with official packages. The program reads the meta-data files in the Slackware tree (ChangeLog.TXT, PACKAGES.TXT, CHECKSUMS.MD5 etc) and from that, it determines the list of packages which make up a release. You can add to the tree what you want, but it won't be picked up by slackpkg.
Thanks for the advice, Eric. Well, KISS as usual (CD-Rom, USB disk, manual download) will do very well too.

On a side note: I *think* my Slackware-based Microlinux Enterprise Desktop must be quite a success. When I first installed our school's network back in 2010, using a beefed-up CentOS 5.3, the students (15 to 20 years old "difficult" kids) commented with words like "lame", "boring", etc. Last year I had a mix of Slackware 13.37 and a hand-built KDE 4.6.5 with many tweaks also. The average student worked on it OK, but described the desktop as "pretty lame", "not as good as Windows" (the latter probably because there were still no games). But this year, my personal mix of Slackware 13.37 plus beefed-up Xfce 4.8 with some nice artwork plus many apps seemed to have changed the critic's voice. Since the first week of september, I only get remarks like "Hey, I like this new system" and "This new system is soooo easy to work with" or "Geee it's really fast". I think I'm on the right track here. (Or maybe I'm just more popular at the school, and the system is still crap )

Niki
 
3 members found this post helpful.
Old 09-15-2012, 09:31 AM   #4
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
you can have a look at slapt-get , http://software.jaos.org/

with this you can have your own repository and give it a higher priority than the official ones so packages will be updated with your version
 
4 members found this post helpful.
Old 09-16-2012, 01:13 PM   #5
zerouno
Member
 
Registered: Oct 2009
Location: Italy
Distribution: Slackware
Posts: 983

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
About a year ago, I wrote a small plugin for slackpkg (called slackpkg+sl) that add the support for third-party repositories.

This plugin was studied for the slacky.eu repository. You can find here the discussion for this plugin (in italian language).

This plugin does NOT modify any files of the original slackpkg.

Note that the plugin automatically set CHECKGPG=off so you can find some warning.

Next I started a second version (called slackpkg+ only) that supports other non-slacky repositories, but I interrupted the develop.
 
6 members found this post helpful.
Old 09-16-2012, 02:11 PM   #6
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Could Eric's repository mirroring script not be modified to use your repo and also perform the upgradepkg portion as well?
 
Old 09-16-2012, 05:27 PM   #7
zerouno
Member
 
Registered: Oct 2009
Location: Italy
Distribution: Slackware
Posts: 983

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
Quote:
Originally Posted by zerouno View Post
Next I started a second version (called slackpkg+ only) that supports other non-slacky repositories, but I interrupted the develop.
The second version is out at http://files.z01.eu/pkgs/slackpkg+/
Note: it's a beta version.

It presents some problem with:
- repositories that does not contains a MANIFEST.bz2 (you can obtain a warning, non fatal, in slackpkg update)
- repositories that contains multiple packages with the same name (i.e. repository that contains both 32&64 bit packages or 13.1&13.37&current version of the same package); slackpkg use only the first package in list and skip all other.

I've configured only slacky.eu (64bit) and alienbob repository, but you can change and add repositories from slackpkgplus.conf
You can obtains a large repositories list from http://slakfinder.org
 
1 members found this post helpful.
Old 09-16-2012, 05:59 PM   #8
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
I'll certainly have a look zerouno!

Eric
 
Old 09-17-2012, 12:20 AM   #9
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Looks like the most viable solution here is the usual combination of vanilla slackpkg and `whoami`.
 
Old 03-09-2013, 02:54 PM   #10
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
I finally had time to look at this. I think there is potential here, but some things can be improved if slackpkg itself gets some updates.

In any case, I changed one line in /usr/libexec/slackpkg/functions.d/slackpkgplus.sh and that is the priority of the repositories. In the original file, the non-Slackware repositories have lowest priority, which is not what I want. If I have a package in a non-Slackware repository (say, glibc's multilib version) I want that to have higher priority than the Slackware package so that the Slackware package can never overwrite the multilib/custom package...

Code:
--- /tmp/slackpkgplus.sh        2013-03-09 21:39:19.327016140 +0100
+++ /usr/libexec/slackpkg/functions.d/slackpkgplus.sh   2013-03-09 21:36:25.851581696 +0100
@@ -8,7 +8,8 @@
   CHECKGPG=off
 
   REPOPLUS=${!MIRRORPLUS[*]}
-  PRIORITY=( ${PRIORITY[*]} slackpkgplus_$(echo $REPOPLUS|sed 's/ / slackpkgplus_/g') )
+  #PRIORITY=( ${PRIORITY[*]} slackpkgplus_$(echo $REPOPLUS|sed 's/ / slackpkgplus_/g') )
+  PRIORITY=( slackpkgplus_$(echo $REPOPLUS|sed 's/ / slackpkgplus_/g') ${PRIORITY[*]} )
 
   function getfile(){
     local URLFILE
With this little change, and this content in /etc/slackpkg/slackpkgplus.conf
Code:
SLACKPKGPLUS=on

#MIRRORPLUS['slacky']=http://darkstar.ist.utl.pt/slackware/addon/slacky/slackware64-13.37/
MIRRORPLUS['alienbob']=http://taper.alienbase.nl/mirrors/people/alien/sbrepos/14.0/x86_64/
MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/current/
I am now able to manage updates for Slackware packages, my own repository packages and the multilib packages.
The /etc/slackpkg/blacklist file no longer blacklists my packages:
Code:
# You can blacklist using regular expressions.
#
# Don't use *full* regex here, because all of the following 
# will be checked for the regex: series, name, version, arch, 
# build and fullname.
#
# This one will blacklist all SBo packages:
[0-9]+_SBo
#[0-9]+compat32
#[0-9]+alien
Of course, the slackpkg functionality that still only works with Slackware repositories is slackpkg's "install-new" but I am able to use "upgrade-all", "search", "file-search" and "info" functions with my own repositories. Cool!

Of course I needed to adapt my repository layout for this to work. That is why for my SlackBuilds repository you see a new URL location with "sbrepos/<slackversion>/<architecture>" instead of the old generic "slackbuilds" because I wanted to leave my original repository directory structure intact. Basically I created a "shadow-repository" using hard-links so that it almost does not use any disk space. The multilib repository now has some additional files which will ebable you to add the URL for a specific Slackware version. See the above example.

Eric
 
5 members found this post helpful.
Old 03-09-2013, 06:17 PM   #11
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Not sure whether this is of interest to anyone but it's a simple tool I call 'slacklist' that I use to keep my system in step with slackware-current. It's not as sophisticated as slackpkg and is designed only to work with local sources of packages, but it does handle combining multiple sources of packages together before comparing them to what is on the existing system.

As an example, if you keep your local copy of slackware64-current in /local/slackware64-current and your locally built packages in /local/packages then to keep things in sync you could use something along the lines of
Code:
PKGPATH="/local/packages:/local/slackware64-current/slackware64"
export PKGPATH

while read package
do
    gpg --verify ${package}.asc $package && upgradepkg --install-new $package
done < <( slacklist install upgrade )

slacklist remove | xargs -r removepkg
I'd always recommend running the slacklist commands separately first though to see what it is going to do before you run something like the above.


Anyway, it was something I wrote to make my life easier, and as it seems somewhat related to the discussion here I thought I'd throw it out there.

Last edited by GazL; 03-21-2013 at 12:35 PM.
 
1 members found this post helpful.
Old 03-11-2013, 11:05 AM   #12
zerouno
Member
 
Registered: Oct 2009
Location: Italy
Distribution: Slackware
Posts: 983

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
Hi Eric.

The starting idea for slackpkg+ was to add the only slacky repository (where I'm a contributor), and one-only; in effect the original name was slackypkg next renamed slackpkg+sl, so I wrote a VERY DRAFT plugin.

Only after posting in this thread I modified (aka complete rewrite) the plugin to add multiple repositories but I wrote it in a very short time , so it is NOT a mature plugin.

In effect a large problem was with your repository becouse it contains multiple version of the same packages. I was looking for a solution. The same problem was for the slakfinder, for your repository and all other listed in 'mixed' section. The problem was solved in slakfinder 2.0 (never released ) with a method "try to guess", not applicable in slackpkg+. So thanks for reorganize your repository (that, in effect, is the only definable 'ufficial'); I will modify the slakfinder in some days.

I paused to devel slackpkg+ for two reasons. The first is the time that I can spent. The second is becouse to improve really the tool and to add very good feature I need to patch some slackpkg file and I don't want to do that.


Returning to the starting idea, the main assumption was that slackpkg+ was to be used to add packages not presents in slackware main repository, so slackpkg+ 0.2 does not allow to overwrite slackware packages with thirdy part packages.
Who use the multilib repository want implicitly override ALL original packages with packages presents in that repository.
But the problem begins with repositories containing both packages already presents in slackware and packages new.
For example, your restricted_repository contains mplayer and vlc. If I add that repository only for vlc, and put that repository as first priority, slackpkg upgrade-all will substitute the mplayer slackware packages with your mplayer, but I want only to add (and update) vlc.
That problem may be partially solved allowing to configure the order in slackpkgplus.conf so the user can choice
( multilib patches %PKGMAIN extra pasture testing restricted sbrepos )
But the problem continue (with no solution without modify the core&structure of slackpkg) when you have two thirdy party repository containing the same package. For example, both restricted_repository and slacky repository contains the openjdk and apache-ant packages. If I want to install your openjdk I must put your repository in priority; next if I want to install slacky apache-ant, I change the order putting slacky repository in priority. Well; now I type slackpkg upgrade-all and slackpkg ask me to substitute your openjdk with slacky openjdk.
IHMO there are only two solution; both require a structural slackpkg change.
1) at moment the only way to know which repository contains the packages that I installed is the suffix (sl,alien,sbo...); if I'd installed openjdk-....-1alien packages, slackpkg upgrade-all should search only for openjdk-*-*-*alien unless the user specify a parameter '--all' or similar. This open many other problems
2) slackpkg should allow to show multiple packages with the same name in list. This, also, open many other problems
but this means to "write a new (another??) remote repository manager"

Other package manager have similar problem.

slackyd (ufficial tool for slacky repository) have in the configurarion file: "upgrade_replacing_official = yes"
slapt-get allow the suffix ":OFFICIAL" ":PREFERRED" ":CUSTOM"

Regarding the link instead download packages for local repositories, the slackpkg+ is native for remote repositories. I don't known how many people download the entire alien/sbo/slacky/... repository on its pc.

For the .asc support, I remove it for semplicity and also becouse not all thirdy party repository support it.


If you know solutions or have some idea... you are welcome .
 
Old 03-11-2013, 11:09 AM   #13
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by Alien Bob View Post
Of course, the slackpkg functionality that still only works with Slackware repositories is slackpkg's "install-new" but I am able to use "upgrade-all", "search", "file-search" and "info" functions with my own repositories. Cool!
search and file-search are buggy. I sent a patch to fix it at slackpkg's website.

Quote:
Originally Posted by Alien Bob View Post
Of course I needed to adapt my repository layout for this to work. That is why for my SlackBuilds repository you see a new URL location with "sbrepos/<slackversion>/<architecture>" instead of the old generic "slackbuilds" because I wanted to leave my original repository directory structure intact. Basically I created a "shadow-repository" using hard-links so that it almost does not use any disk space. The multilib repository now has some additional files which will ebable you to add the URL for a specific Slackware version. See the above example.
Excuse me but I don't understand why you try to add support for the multilib in a tool which was not designed to manage this. If you think that slackpkg is a better tool to manage the multilib than compat32pkg/multilibpkg (is there something wrong with these tools I should know ?), then I guess it would be better to directly integrate the multilib in Slackware64.


Greetings.

--
SeB
 
Old 03-11-2013, 04:10 PM   #14
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by phenixia2003 View Post
Excuse me but I don't understand why you try to add support for the multilib in a tool which was not designed to manage this. If you think that slackpkg is a better tool to manage the multilib than compat32pkg/multilibpkg (is there something wrong with these tools I should know ?), then I guess it would be better to directly integrate the multilib in Slackware64.
I am not attacking your ompat32pkg/multilibpkg tool. I am showing how slackpkg can be expanded with custom functionality. It was designed to be able to do this.

In the end, people are free to use whatever tool they feel most comfortable with.

Eric
 
Old 03-15-2013, 10:23 AM   #15
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by zerouno View Post
But the problem continue (with no solution without modify the core&structure of slackpkg) when you have two thirdy party repository containing the same package. For example, both restricted_repository and slacky repository contains the openjdk and apache-ant packages. If I want to install your openjdk I must put your repository in priority; next if I want to install slacky apache-ant, I change the order putting slacky repository in priority. Well; now I type slackpkg upgrade-all and slackpkg ask me to substitute your openjdk with slacky openjdk.

Just an idea, which does not solve the problem related to "upgrade-all", but allows the user to install (or upgrade) a package from a given repository without to have to manually change the variable PRIORITY :

Code:
slackpkg install [repository-name:]package-name

slackpkg upgrade [repository-name:]package-name
With this extension, to install vlc from alien repository, user would have to issue the command :

Code:
$ slackpkg install alienbob:vlc
And, to install openjdk from slacky repository, he will issue that :

Code:
$ slackpkg install slacky:openjdk
To upgrade the installed apache-ant (from slacky) to the latest version, user will issue the command :

Code:
$ slackpkg upgrade slacky:apache-ant
To provide these features, you only need to add the code below after yours in slackpkgplus.sh :

Code:
if [ "$CMD" == "install" ] || [ "$CMD" == "upgrade" ] ; then

	NEWINPUTLIST=""

	for pref in $INPUTLIST ; do
		if echo "$pref" | grep -q "[a-zA-Z0-9]\+[:][a-zA-Z0-9]\+" ; then
			repository=$(echo "$pref" | cut -f1 -d":")
			package=$(echo "$pref" | cut -f2- -d":")

		        PRIORITY=( slackpkgplus_${repository} ${PRIORITY[*]} )
		else
			package=$pref
		fi
		
		NEWINPUTLIST="$NEWINPUTLIST $package"
	done

	INPUTLIST=$NEWINPUTLIST
fi
IMPORTANT NOTES:

1. because the granularity of PRIORITY is too low, this can lead to some trouble when trying to install different packages from different repository at the same time. For instance :

Code:
      (1) $ slackpkg install alienbob:vlc slacky:openjdk


      (2) $ slackpkg install slacky:openjdk alienbob:vlc
When (1) is executed, vlc from alienbob and openjdk from slacky could be installed. But, in the case of (2), vlc and openjdk will be taken from alienbob repository.

As said above, this is because the granularity of PRIORITY is too low, it only allow to give priority to directory, not package. Note that compat32pkg comes with something like "PRIORITY" (called PKGS_PRECEDENCE_ORDER) which allows higher granularity. I guess the function FilterByPrecedenceOrder() from compat32pkg could be adapted to slackpkg+, but I don't really have the time to look at this.

2. The code above accepts only repositories with letters and/or digit (ie line echo "$pref" | grep -q ...). Don't hesitate to improve this.


Hope this help.

--
SeB

Last edited by phenixia2003; 03-18-2013 at 05:39 AM.
 
2 members found this post helpful.
  


Reply

Tags
slackpkg



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
Holding a package update from slackpkg gazj Slackware 2 01-25-2011 04:58 PM
Where can I find a 3rd Party Repository for RHEL 5? tightlikethat Linux - Newbie 3 02-27-2010 08:46 PM
Best 3rd Party RPM Repository for FC9 kromberg Fedora 11 11-13-2008 08:04 PM
Package Kit Error-- "Cannot retrieve repository metadata (repomd.xml) for repository" mbvpixies78 Linux - Newbie 11 08-22-2008 07:20 PM
3rd party package managers? crontab Slackware 3 10-06-2007 10:34 AM

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

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