miroR / jigdo-automate-scripts

With jigdo-lite these scripts further automate the downloading of Debian Jigdo DVDs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A note before you tried anything at all with these scripts.
#########################################################
# They are meant/working/written for an AMD64 install.	#
# For other arch Testing Jigdo download, modify 	#
# the scripts as necessary (probably not much work).	#
#########################################################
After download of these in a single empty dir, where you have room enough to
download/for already (the previous week or earlier) downloaded jigdo ISO files,
of these:
run_CMD.sh
jigdo-dl_01-dLo-SUMS-t.sh
jigdo-dl_02-jigdo-templ-t-4sed.txt
jigdo-dl_03-mnt-t-4sed.txt
jigdo-dl_04-dLo-t-4sed.txt
iso_check-del.sh
prep4iso_check-del.sh
README

you can run:
$ chmod 755 *.sh

on them, to make those with the .sh extension executable.

The only one that is best be moved in the /usr/local/bin/ is:

run_CMD.sh

because you can use it for many sorts of repetitive tasks.

Let's say that empty dir we mentioned at the top is /home/me/Debian/ (pls.
replace me with your username, such as that if your user name is ukrainian, you
get /home/ukrainian/Debian/.

Now create just the directory:
/home/me/Debian/Old/

and if you have the last week's or last month's jigdo testing ISO files, put
them in:
/home/me/Debian/Old/

So that directory might look something like:

total 53015476
-rw-r--r-- 1 ukrainian ukrainian 3669200896 Jul 22 22:10 debian-testing-amd64-DVD-10.iso
-rw-r--r-- 1 ukrainian ukrainian 4691335168 Jul 22 23:23 debian-testing-amd64-DVD-11.iso
-rw-r--r-- 1 ukrainian ukrainian 4647268352 Jul 23 00:50 debian-testing-amd64-DVD-12.iso
-rw-r--r-- 1 ukrainian ukrainian   98805760 Jul 23 00:54 debian-testing-amd64-DVD-13.iso
-rw-r--r-- 1 ukrainian ukrainian 3897638912 Jul 22 10:41 debian-testing-amd64-DVD-1.iso
-rw-r--r-- 1 ukrainian ukrainian 4698748928 Jul 22 12:08 debian-testing-amd64-DVD-2.iso
-rw-r--r-- 1 ukrainian ukrainian 4656547840 Jul 22 13:17 debian-testing-amd64-DVD-3.iso
-rw-r--r-- 1 ukrainian ukrainian 4559497216 Jul 22 14:17 debian-testing-amd64-DVD-4.iso
-rw-r--r-- 1 ukrainian ukrainian 4612108288 Jul 22 15:23 debian-testing-amd64-DVD-5.iso
-rw-r--r-- 1 ukrainian ukrainian 4699660288 Jul 22 16:28 debian-testing-amd64-DVD-6.iso
-rw-r--r-- 1 ukrainian ukrainian 4699998208 Jul 22 17:44 debian-testing-amd64-DVD-7.iso
-rw-r--r-- 1 ukrainian ukrainian 4657014784 Jul 22 19:13 debian-testing-amd64-DVD-8.iso
-rw-r--r-- 1 ukrainian ukrainian 4699959296 Jul 22 20:43 debian-testing-amd64-DVD-9.iso

A note before I continue the explaining. Most of these scripts have a '-t' in
their name. It stands for 'testing', because it's about downloading the Testing
Jigdo DVDs. But the same procedures could as well apply to download 'sources'
DVDs, and that is planned for the future (most users don't need sources, so
it's less important to include those). Surely for them, the names will be same
but for the '-s' instead.

Best is you read the entire README first, and then just go back for [1], [2]
through to the last number and run them.

Connect to internet (we who try and apply basic anti-surveillance to keep our
lives private from secret services wholesale unwarranted surveillance only
connect when we need, and don't keep online unnecessarily) now, and run, first:

[1]
./jigdo-dl_01-dLo-SUMS-t.sh

It will download the checksums. We'll use the SHA256SUMS. The sums are now
digitally signed by Debian Engineering Team, so we can pretty reliably verify
them the GNU Privacy Guard way! Not even a "daemon", but probably only God
can falsify a SHA256 sum, but the Truth doesn't deal in any untruthfulness.

Now, the other scripts are not yet really ready as they are. Here's why. It's
because we want to learn from the SUMS how many of the DVDs there are; we just
don't necessarily know how many there are, upfront.

The ISO DVD 13, for instance, is only a recent addition to the Jigdo DVD
collection, so my previous jigdo-automate-scripts, which used, for wont of a
better word, static scripts here, couldn't automatically neither download nor
surely check the 13th DVD.

So the:

jigdo-dl_02-jigdo-templ-t-4sed.txt
jigdo-dl_03-mnt-t-4sed.txt
jigdo-dl_04-dLo-t-4sed.txt

are just templates to make as many lines equivalent scripts out of them as
there are DVDs to download. It'll be the business of:

[2] (this is the next you need to run:)
./prep4iso_check-del.sh

Now if you see these scripts produced in the cd'ed into directory:

jigdo-dl_02-jigdo-templ-t.sh
jigdo-dl_03-mnt-t.sh
jigdo-dl_04-dLo-t.sh

you can now run the ones with the quick job to do.

[3]
./jigdo-dl_02-jigdo-templ-t.sh

[4] As root, cd'ing from another terminal into the same directory, run:
./jigdo-dl_03-mnt-t.sh

It will mount the ISOs from the Old dir appropriately. You need to have a
kernel that can create sufficient number of loop devices.

And even then if, say, the loop module is not loaded, which you will know if
you get, upon running the script:

mount: Could not find any loop device. Maybe this kernel does not know
       about the loop device? (If so, recompile or `modprobe loop'.)

then, sure, just, still as root, first try:

# modprobe loop

And in case that wouldn't load anything, then you need to recompile.
The Grsecurity patched kernel that I occasionally post for download on
www.CroatiaFidelis.hr is adequately configured in that respect as well. Pls.,
again see my tip/tutorial:

Grsecurity/Pax installation on Debian GNU/Linux
http://forums.debian.net/viewtopic.php?f=16&t=108616

again, if I'm not kicked out for my strong criticism for
their inadequate/false protection of users wrt freedom/privacy which is only
achieved through genuine security... 

UPDATE: Arrgghh! I did soften my criticism a bit, but why is there still not
room there in official Debian kernel for Grsecurity?...

So that command ( ./jigdo-dl_03-mnt-t.sh ), should eventually run fine and your
a while ago empty directory should now look like:

# ls -ld */
dr-xr-xr-x 1 root      root      4096 Jul 21 08:48 d-1/
dr-xr-xr-x 1 root      root      2048 Jul 21 08:51 d-10/
dr-xr-xr-x 1 root      root      2048 Jul 21 08:54 d-11/
dr-xr-xr-x 1 root      root      2048 Jul 21 08:56 d-12/
dr-xr-xr-x 1 root      root      2048 Jul 21 08:59 d-13/
dr-xr-xr-x 1 root      root      2048 Jul 21 08:59 d-2/
dr-xr-xr-x 1 root      root      2048 Jul 21 09:01 d-3/
dr-xr-xr-x 1 root      root      2048 Jul 21 09:04 d-4/
dr-xr-xr-x 1 root      root      2048 Jul 21 09:06 d-5/
dr-xr-xr-x 1 root      root      2048 Jul 21 09:09 d-6/
dr-xr-xr-x 1 root      root      2048 Jul 21 09:10 d-7/
dr-xr-xr-x 1 root      root      2048 Jul 21 09:12 d-8/
dr-xr-xr-x 1 root      root      2048 Jul 21 09:14 d-9/
drwxr-xr-x 2 ukrainian ukrainian 4096 Jul 24 10:42 Old/
 
And those d-[1-9] and d-1[1-3] or more should be the DVDs from the Old/
mounted. To check that all the last weeks DVDs are mounted, you can issue:

$ mount

here, which needs to return to you all of them mounted. If not, go back, and
see what you did wrong, or report to the forums if something is wrong with the
scripts.

[5] (Back to the terminal where you are regular user)
./jigdo-dl_04-dLo-t.sh

Here instructions apply that come with Jigdo, the program that is much more
complex than this set of scripts, authored by Richard Atterer, there are docs
and faqs related on debian.net and atterer.net.

The jigdo-dl_04-dLo-t.sh, working primitively on top of jigdo-lite (plainly
starting jigdo-lite for every single DVD to download in consecutive order) will
now be downloading the DVD's that the SHA256SUMS told us the names of, and the
sums of.  

And now you can put to real use the simplest of the scripts that you moved into
/usr/local/bin (the run_CMD.sh; if you didn't, you can run it from the cd'ed
into directory, just add './' in front of its name).

Here's a possible command you can decide for:

[6] As root:
run_CMD.sh 10000 30 ./iso_check-del.sh

The 10000 is just a really big number that would suffice if someone has a
really really slow connection. This batch of scripts is anyway not as advanced
as allowing you to program it to, say, shut you computer on completion. It will
allow you to, however, to start jigdo downloads, go to sleep, look it up in the
morning, all done, and stop the scripts by issuing Ctrl-C where necessary. 

The command ./iso_check-del.sh should check the ISO file that you downloaded
and if the sha256 sum is correct, overwrite the old file in Old/ of which that
ISO is the updated edition, and it should do so for all the (in September 2014)
thirteen ISO files, or greater/smaller number of DVDs in the future, and it
will do so unattended. BUT READ THE WARNING BELOW.

I'm not responsible it it doesn't. It works most of the time for me, but there
I could have introduced errors that I couldn't found all out in your version of
jigdo-automate-scripts (the recommended version is usually the master branch
from github.com).

USE AT YOUR OWN RISK.

Pls. refer to my Tips page:

Scripts to Automate Jigdo Downloads
http://forums.debian.net/viewtopic.php?f=16&t=110503

##########################################################################
And pls. report either there or here if anyhing is wrong with the scripts!
( But, I work slowly, be patient for replies, please! )
##########################################################################

And I hope the Debian people keep patient with me, as they have mostly shown to
be so far, so I won't repeat the ifs again.

Only this one if begs repeating. I do live in a country gone to the worst
killers of WWII progenie, the Tito's partisans killers' children rule in my
country's Croatia, and are unbelievably strongly and fast allying themselves
to the worst haters and killers of Croats in the WWII that have risen to power
in Serbia, the Chetniks' progenie who even formally tout that name.

I am not safe in my country. If you don't hear/read from me (you could have
heard from me as I used to tape my voiceover in English in some of the over 500
--five hundred-- videos that I posted on Youtube through some five years
time)... but the lier bully Google terminated my account on their own
falsehood.

If you don't hear from me in time longer then a few weeks or one, hardly two
months, don't believe any simplistic explanation that might be proposed. They
kill investigative journalists in the U.S. (Michael Hastings), and you think
that Tito's worst killers' children are nice with rightwings like me?

Thank you for bearing up with me. Don't forget my story!

Miroslav Rovis
www.CroatiaFidelis.hr
www.youtube.com/user/miroR2 terminated since April 2014
www.exDeo.com
Vankina 4
10000 Zagreb
+385 (0)1 660 2633	but you could only reach me if UDBA allows your
+385 (0)91 266 0202 	 call through. They're getting really sick with control.
For brotherly Ukrainian nation: Слава України!

About

With jigdo-lite these scripts further automate the downloading of Debian Jigdo DVDs.


Languages

Language:Shell 100.0%