LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Automating slackpkg (http://www.linuxquestions.org/questions/slackware-14/automating-slackpkg-4175440700/)

Woodsman 12-09-2012 02:30 PM

Automating slackpkg
 
What clever methods are any of you using to automate the process of updating patches through slackpkg? I've gotten to the point with my LAN and collection of virtual machines, some systems of which I might not run for weeks, that I need to consider some form of automation when I run any particular system.

This is a mixed environment of 12.2, 13.1, 13.37, 14.0, and current, both 32 and 64-bit.

Thanks. :)

TobiSGD 12-09-2012 03:03 PM

Mirror the patches directories for the versions you have installed on one of the machines and use upgradepkg to do the job.

lpallard 12-09-2012 03:27 PM

Found this thread while searching for something else, and I happened to wonder as well how to patch slackware (more or less replicate the behavior of windows update in windows)...

I understand what you said TobiSGD but I have a question regarding project philosophy (if I can call it like that).

So on slack's mirrors, there are:
-slackware specific folders (...12.1, 12.2, 13.0...) for each release that are updated with their specific patches
-"-current" for the latest bleeding edge release
-and there's the last release (as of now, 14.0).

So are the slack team updating every releases with patches as well as having the last (14.0) and working on the -current in parallel?

If I update my 13.37 with the patches that are in 13.37, will I end up more or less with a hybrid between the original 13.37 & 14.0?

Woodsman 12-09-2012 03:35 PM

Quote:

Mirror the patches directories for the versions you have installed on one of the machines and use upgradepkg to do the job.
Ah, yes. Simple. I was so focused on slackpkg I never thought about the simpler approach. :) Just run:

cd $LOCAL_PATCHES_DIR
upgradepkg *.txz

Thanks.

TobiSGD 12-09-2012 03:47 PM

Quote:

Originally Posted by lpallard (Post 4845850)
So are the slack team updating every releases with patches as well as having the last (14.0) and working on the -current in parallel?

If I update my 13.37 with the patches that are in 13.37, will I end up more or less with a hybrid between the original 13.37 & 14.0?

Slackware usually only get's security fixes, unless there are real show-stopper bugs. Those are usually already fixed during the testing phase for the new release, so that is rather rare.

Since newer versions of software are only installed when they are security releases (which is for example the case with Firefox) you will not end up with a mixed release, 13.37 will stay 13.37.

Marcelo_Belfalas 12-09-2012 07:59 PM

Well, I use slackroll to manage slackware updates...

I did a script to check for updates and put it on a cronjob to check hourly, it can easily adapted to when there's new updates, just update everything.

I'm not the best at bash script but here it is:

Code:

#!/bin/sh

STR=`slackroll update`;

if [[ $STR != *"no new entries"* ]]
then
        echo "Found Updates";
        echo $STR;
            `DISPLAY=:0.0 su <user> -c "notify-send Slackroll \"There is new updates\""`;
else
        STR2=`slackroll list-transient`
        if [[ $STR2 != *"No transient packages found"* ]]
        then
                echo "Found Updates";
                echo $STR2;
                `DISPLAY=:0.0 su <user> -c "notify-send Slackroll \"There is new updates\""`;
        else
                echo "No updates found";
        fi
fi


fogpipe 12-13-2012 10:43 PM

You might want to exclude some packages from automatic upgrade. The kernel for instance, maybe X and drivers.
Having your kernel over written might result in some suprises :)

jtsn 12-13-2012 11:34 PM

Just a simple rc.local approach for single user desktop machines, which are used interactively:
Code:

if slackpkg check-updates | grep "ChangeLog"
then
    slackpkg update
    slackpkg upgrade-all
fi

In case of available updates, it displays a list with packages to be upgraded on the console and waits for confirmation, otherwise it just boots to login as usual.

lpallard 12-30-2012 12:12 PM

Quote:

Originally Posted by jtsn (Post 4849032)
Just a simple rc.local approach for single user desktop machines, which are used interactively:
Code:

if slackpkg check-updates | grep "ChangeLog"
then
    slackpkg update
    slackpkg upgrade-all
fi

In case of available updates, it displays a list with packages to be upgraded on the console and waits for confirmation, otherwise it just boots to login as usual.

Has anyone tested this method on a dummy machine or a VM?? I dont want to cook my desktop running fine now. Basically if I understand well, adding this to rc.local would look for updates at boot time and offer to upgrade or not. If chosen to upgrade, it would, if not it would continue to boot info the user env (KDE, console, etc..) as normal.

Where does it gets the upgraded packages? Do you need to specify a folder where all new packages are stored?

dr.s 12-30-2012 12:33 PM

Found this in Slackware docs but haven't tried it yet
http://docs.slackware.com/slackware:...dated_packages


All times are GMT -5. The time now is 09:19 PM.