Auto-rolling for Newbees (like me)

Archived topics about LMDE 1 and LMDE 2
Locked
Eko_taas

Auto-rolling for Newbees (like me)

Post by Eko_taas »

Tried to look/understand http://forums.linuxmint.com/viewtopic.php?f=141&t=55493 to get answer to above question, but could not find :cry: / understand :oops:

I would like to get my LMDE to automatically update e.g. once a week (this is testing machine, if working well others (now still Mint 9) to have the same.

As I could understand, better to close aps (like X) first. Also need for recovery back-ups understood.

What would be most simple / reliable way to do it? My status/hopes:
- Machine always on with one non-admin user auto-logged in (no update rights).
- Ongoing aps can be killed (if needed / makes it more safe)
Could give e.g. 5min to cancel / delay (e.g. 1h) update
- Recovery point / back-up could be created at this point
- Restart allowed (might be a good idea even if not needed).
- After update (re-start machine) machine should look like normal re-started machine (aps with autostart on).

I am sure too simple for you guys... and definitely impossible for me :roll:
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
craigevil

Re: Auto-rolling for Newbees (like me)

Post by craigevil »

Auto-updating is not good idea on Debian Testing or unstable. Squeeze OK now but a week or two after Squeeze is released testing gets a flood of new packages. Things break in Testing including things like not being able to login. Or having your desktop to be removed.

What you can do is use cron-apt to download the updates. Then once a week or so you run smxi.

You could install unattended-upgrades - automatic installation of security upgrades

You could also use debsecan.
This is the apt-get command for upgrading through debsecan:
Code:
apt-get update && apt-get install $(debsecan --suite testing --format packages --only-fixed)

debsecan is a tool to generate a list of vulnerabilities which affect
a particular Debian installation. debsecan runs on the host which is
to be checked, and downloads vulnerability information over the
Internet. It can send mail to interested parties when new
vulnerabilities are discovered or when security updates become
available.
Eko_taas

Re: Auto-rolling for Newbees (like me)

Post by Eko_taas »

Finally I had some time to play with your advice - installed depsecan and started to play in terminal (not in my comfort zone yet :oops: )

I added cleaning-option (as proposed by terminal after 1st run):
apt-get update && apt-get install $(debsecan --suite testing --format packages --only-fixed) && apt-get remove --assume-yes
When running above in root-terminal , seems to work till at the end:

Code: Select all

...
Hit http://security.debian.org testing/updates/non-free amd64 Packages
Fetched 6,710 B in 5s (1,213 B/s)
Reading package lists... Done
Usage: debsecan OPTIONS...

debsecan: error: option --suite: invalid choice: 'testing' (choose from 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'sid')
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
Additionally: is it safe/better to use --assume-yes option (if run in crontab, nobody to answer) e.g.

Code: Select all

apt-get update --assume-yes && apt-get install --assume-yes
In short, what is the ultimate (but almost safe) :wink: command to run on root-crontab :?: If I get advice on debsecan, I can modify my testing (at root crontab now) :!:

Code: Select all

0 * * * * apt-get update && apt-get install --assume-yes && apt-get autoclean

Code: Select all

....
Hit http://packages.linuxmint.com debian/import amd64 Packages
Fetched 6,710 B in 5s (1,200 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Eko_taas

Re: Auto-rolling for Newbees (like me)

Post by Eko_taas »

Now few runs:

Code: Select all

apt-get update && apt-get install --assume-yes && apt-get autoclean
Get:1 http://packages.linuxmint.com debian Release.gpg [198 B]                 
....
Hit http://packages.linuxmint.com debian/import amd64 Packages                 
Fetched 6,710 B in 9s (675 B/s)                                                
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
=> looks like all updated to me (have not tried yet any of upgrade/dselect-upgrade/dist-upgrade). Still makes me wonder why at the same time (and after) LMDE-Update manager reports 15 items to be updated, all in level 3).

To get a same result, should I use one of the "stronger" apt-get parameters?

Now testing ongoing now with root crontab incl. :?

Code: Select all

0 * * * * date >>/var/log/automatic_apt-get_report1.log
0 * * * * date >>/var/log/automatic_apt-get_report2.log
0 * * * * date >>/var/log/automatic_apt-get_report3.log
1 * * * * apt-get update >>/var/log/automatic_apt-get_report1.log && apt-get install --assume-yes >>/var/log/automatic_apt-get_report2.log && apt-get autoclean >>/var/log/automatic_apt-get_report3.log
Any ideas :?:
Locked

Return to “LMDE Archive”