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 07-24-2019, 10:39 AM   #1
jheengut
Member
 
Registered: Sep 2006
Location: Providence, Moka Mauritius
Distribution: Slackware, Lubuntu
Posts: 352
Blog Entries: 16

Rep: Reputation: 51
update slackware -current with script using rsync


Hi,


I prefer to keep an updated /var/cache/packages in case some package has to be reinstalled and the internet is not available. This script helps in removing old packages in -current since slackpkg does not remove them automagically.

I would like some suggestions regarding this script

https://github.com/slackware-jheengu...re_packages.sh

I have tested for over a year and it seems to be okay.

Last edited by jheengut; 07-24-2019 at 02:06 PM.
 
Old 07-24-2019, 05:14 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by jheengut View Post
This script helps in removing old packages in -current since slackpkg does not remove them automagically.
Not to dismiss what your script does, but have you tried the DELALL option in your /etc/slackpkg/slackpkg.conf? I don't have any files remaining in /var/cache/packages/ (I do have folders, just no files in them).

Code:
# If DELALL is "on", all downloaded files will be removed after install.
DELALL=on
 
1 members found this post helpful.
Old 07-24-2019, 06:53 PM   #3
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,372

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
My approach to keeping a local archive is detailed here with a further update here.
 
2 members found this post helpful.
Old 07-26-2019, 02:26 PM   #4
baumei
Member
 
Registered: Feb 2019
Location: USA; North Carolina
Distribution: Slackware 15.0 (replacing 14.2)
Posts: 365

Rep: Reputation: 124Reputation: 124
I also like having a local copy of the set of packages and files comprising Slackware 14.2, primarily so I can download them once and then use the local copy to update the several computers which I maintain. I intend to minimize the network traffic I cause to the mirrors.

I have a script for the downloading, but the script has only one important command:
Code:
#! /bin/bash
# filename: update_slackware.sh

echo ""
echo "-- Get the: 64 bit version of Slackware 14.2. --"
# This command gets all but: kdei, and testing.
rsync -ahv --stats --progress --partial --fuzzy --delete-after \
    --exclude='kdei' --exclude='testing' \
    mirror.slackbuilds.org::slackware/slackware64-14.2/ \
    /home/software/slackware64-14.2
The above rsync command deletes of all the files which do not exist on the mirror, after downloading the new files.
 
Old 07-28-2019, 01:06 PM   #5
jheengut
Member
 
Registered: Sep 2006
Location: Providence, Moka Mauritius
Distribution: Slackware, Lubuntu
Posts: 352

Original Poster
Blog Entries: 16

Rep: Reputation: 51
Quote:
Originally Posted by bassmadrigal View Post
Not to dismiss what your script does, but have you tried the DELALL option in your /etc/slackpkg/slackpkg.conf? I don't have any files remaining in /var/cache/packages/ (I do have folders, just no files in them).

Code:
# If DELALL is "on", all downloaded files will be removed after install.
 DELALL=on

I want to keep the latest packages while removing the old packages.



The DELALL removes the downloaded files which I don't want to do.
 
1 members found this post helpful.
Old 07-28-2019, 01:14 PM   #6
jheengut
Member
 
Registered: Sep 2006
Location: Providence, Moka Mauritius
Distribution: Slackware, Lubuntu
Posts: 352

Original Poster
Blog Entries: 16

Rep: Reputation: 51
Quote:
Originally Posted by baumei View Post
I also like having a local copy of the set of packages and files comprising Slackware 14.2, primarily so I can download them once and then use the local copy to update the several computers which I maintain. I intend to minimize the network traffic I cause to the mirrors.

The above rsync command deletes of all the files which do not exist on the mirror, after downloading the new files.
My script is for -current only.

=================================================

Any stable version of Slackware has its own frozen package set.

All updates are downloaded into /var/cache/packages/patches/

Code:
ls  -lhRs /var/cache/packages/patches/
/var/cache/packages/patches/:
total 20K
4.0K -rw-r--r-- 1 521 521 552 Sep 20  2012 CHECKSUMS.md5
4.0K -rw-r--r-- 1 521 521 198 Sep 20  2012 CHECKSUMS.md5.asc
4.0K -rw-r--r-- 1 521 521 575 Sep 20  2012 FILE_LIST
4.0K -rw-r--r-- 1 521 521  14 Sep 20  2012 MANIFEST.bz2
4.0K -rw-r--r-- 1 521 521 224 Sep 20  2012 PACKAGES.TXT
In Slackware -current this is empty. All packages are downloaded into /var/cache/packages/slackware64/ or /var/cache/packages/slackware.

This script ensures my machines are keeping latest updates. Though if the slackpkg mirror has still not updated, some packages will be missing.
 
Old 07-29-2019, 12:36 AM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by jheengut View Post
I want to keep the latest packages while removing the old packages.



The DELALL removes the downloaded files which I don't want to do.
Ah, that makes more sense. I just keep a local mirror, which I point slackpkg to, but I guess that requires slackpkg to "download" (in reality, copy) the packages to its directory and then remove them afterwards.
 
Old 07-29-2019, 07:16 PM   #8
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
I include "--preallocate" in the rsync command. Filesystems that support defragmentation operations automatically allocate minimally-fragmented file space in the destination.
 
1 members found this post helpful.
  


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
[SOLVED] mirror-slackware-current.sh - rsync - picking up where I left off how to? BW-userx Slackware 2 03-05-2017 02:44 PM
[SOLVED] Mirror Debian partition to another harddisk using rsync cccc Debian 6 06-06-2013 03:09 PM
Building a Debian Wheezy/Ubuntu Precise Mirror using apt-mirror bennetfox Linux - Server 16 02-23-2013 03:56 PM
DISCUSSION: Using rsync to mirror data between servers david_ross LinuxAnswers Discussion 8 03-29-2012 01:37 AM
Using rsync to make your own Slackware mirror Laodiceans Slackware 4 12-19-2009 04:03 AM

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

All times are GMT -5. The time now is 06:36 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