Showing posts with label slackware-current. Show all posts
Showing posts with label slackware-current. Show all posts

Wednesday, March 30, 2011

Download Alien Bob's multilib support packages

I've created a Perl script to download all slackware-current multilib support packages from here. Perl really makes you a lazy programmer. You can do unbelievable many things in just a few lines.
#!/usr/bin/perl -w

use LWP::UserAgent;
use strict;

sub get_links
{
my $url = shift;
my $page = LWP::UserAgent->new->get($url)->content;

map { m@/$@ && get_links($_) || system("wget -xnH $_"); }
map { "$url$_" } $page =~ m@<a href="(.+)">\1</a>@g;
}

my $url = "http://connie.slackware.com/~alien/multilib/current/";

get_links($url);

Tuesday, March 09, 2010

nVidia and Slackware-Current

A week ago slackware-current got a huge update and one of the things that were updated was the kernel. Kernel 2.6.33 intr0duced a new nvidia driver: nouveau, which resulted by reverse-engineering the official driver I think. The problem is that out of the box, at least for now, neither nouveau, nor the official nvidia driver are runnable on the system.

For nouveau, the Xorg that is included with slackware-current does not contain the needed xf86-video-nouveau driver.
You can download and compile this, but you need to find the suitable for your nouveau kernel module and this is not the latest from the nouveau repository:

git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/

You could of course download the latest pair of kernel and xorg driver and this should work, but for now, I decided to stay with the official driver from nvidia. Two problems arise here. First the nouveau driver is loaded automatically in the boot process when the hardware is probed and it is conflicting with the official nvidia driver. Second, the latest nvidia driver 190.53 does not compile with kernel 2.6.33.

In order to overcome the first problem you'll probably need to blacklist the nouveau module, or unload it every time before starting X-Window. You cannon directly unload nouveau and it's dependencies using rmmod. You have to unbind the nouveau frame buffer first. See here for more info.

Anyway, blacklisting the modules is easier. Simply append this:
blacklist drm
blacklist ttm
blacklist nouveau
to /etc/modprobe.d/blacklist.conf and the old vga console driver will run the next time you boot the system.

For the latest nvidia driver (190.53) you need first to apply the patch found here:
nvidia-betasam-2.6.33.patch.txt

You can apply a patch like this:
sh ./NVIDIA-Linux-x86-190.53-pkg1.run --apply-patch nvidia-betasam-2.6.33.patch.txt

This will create a new file: NVIDIA-Linux-x86-190.53-pkg1-custom.run with the patched driver, which is compatiple with kernel 2.6.33.

Wednesday, January 28, 2009

Download kde4 from slackware-current

This is a script to mirror the kde4 packages from slackware-current. For now, those packages works for slackware 12.2 too.

The script may be executed multiple times from the same directory. It will detect the changes made in the repositoty, it will remove the obsolete local files and will only download the newer files that are not present in the local copy.

#!/bin/sh

# Copyright 2008-2009 Nikos Skalkotos, Athens, Greece
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


server=ftp://ftp.ntua.gr
url_path=pub/linux/slackware/slackware-current/testing/packages/kde4
url=$server/$url_path
dirs="deps extragear kde kde3-compat kde-l10n"
files="remove-kde3.sh remove-kde4.sh"

if [ "$1" = "--clean" ]; then
echo -n "Cleaning up..."
rm -fr $files $dirs
echo "done"
exit 0
fi

remove_obsolete() {
echo "Checking local directory \"$1\" for obsolete files..."
(cd $1
for i in `ls`; do
exists=`echo "$2" | grep $i`

if [ $i != "" -a "$exists" = "" ] ; then
echo "Removing file: $1/$i"
rm -f $i
fi
done
)
}


for filename in $files; do
#Those are small scripts, so I'll download them every time
rm -f $filename
wget -c $url/$filename
done

for dir in $dirs; do

#I need to create the dir the first time
mkdir -p "$dir"

echo
#Clean old files no longer listened in the repository
echo -n "Listing kde4/$dir content..."
dir_content=`curl -sl $url/$dir/`
echo "done"
remove_obsolete $dir "$dir_content"

#Now mirror the directory
(cd $dir; wget --mirror -nH -nd $url/$dir/)
done