LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-21-2015, 10:10 PM   #1
s.verma
Member
 
Registered: Oct 2013
Distribution: Debian Sid, Gentoo, Arch, Debian
Posts: 177
Blog Entries: 4

Rep: Reputation: 24
How to automate update of security issue from debian announce list on Debian Sid?


Dear all,

I have been using Debian Sid for around 6 months.
I have subscribed to Debian Security Announce mailing list.
Now whenever I am notified of security issue in a source package, I first do
Code:
apt-cache showsrc sourcepkg
sourcepkg is name of source package in which security fix is to be applied.
Then look in "Packages List" section to find which binary package belong to this source package.
Then I use
Code:
dpkg -l|grep binpkg
binpkg refers to binary package belonging to source package.

Then I check if binpkg is installed with an infected version, then I upgrade it using

Code:
apt-get install --only-upgrade binpkg
I do want to know can I automate this whole task from taking data from Debian Announce list and automatically apply all fixes available.
 
Old 02-22-2015, 03:04 PM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,570

Rep: Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349
I hate to sound negative but I have to repeat what I typed in the original thread.
Quote:
Originally Posted by 273 View Post
... running Sid (or a Sid based system) and not installing all the new updates seems to me to almost to defeat the object.
Perhaps Sid isn't for you and you would be better placed with LMDE or an Ubuntu derivative?
I'm sure I'll be corrected if I am wrong but, as I understand it, Sid is produced for those wanting to try the cutting-edge of Debian and "get their hands dirty" and who are willing to update a lot to see what that brings.
 
Old 02-22-2015, 11:29 PM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,038

Rep: Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408
Quote:
Originally Posted by s.verma View Post
I do want to know can I automate this whole task from taking data from Debian Announce list and automatically apply all fixes available.
What you have described appears to be possible. Could probably do it with the help of procmail or similar.

Evo2.
 
Old 02-27-2015, 11:41 AM   #4
s.verma
Member
 
Registered: Oct 2013
Distribution: Debian Sid, Gentoo, Arch, Debian
Posts: 177

Original Poster
Blog Entries: 4

Rep: Reputation: 24
Can somebody tell me how to list all installed packages which belong to sourcepackge.
e.g.
Code:
apt-cache showsrc sourcepackage
list details about source package, but not how many of them (from Package List: section) are installed to my system.
 
Old 03-23-2015, 08:03 AM   #5
s.verma
Member
 
Registered: Oct 2013
Distribution: Debian Sid, Gentoo, Arch, Debian
Posts: 177

Original Poster
Blog Entries: 4

Rep: Reputation: 24
Quote:
Originally Posted by s.verma View Post
Can somebody tell me how to list all installed packages which belong to sourcepackge.
e.g.
Code:
apt-cache showsrc sourcepackage
list details about source package, but not how many of them (from Package List: section) are installed to my system.
Dear all,
Recently I am working on a script which would write above in format

Code:
PackageName    SourceName
package1            source1
...
command is
Code:
apt-cache show $(dpkg -l|tail -n +6|awk '{print $2}') |egrep '^Source:|^Package:'
but it gives output
Code:
....
Package: xyz
Source: abc
....
How to rearrange each xyz and consecutive abc in one line?

Can Somebody also tell me where Debian store control files for each package from which it gives output of
apt-cache show packagename

Last edited by s.verma; 03-23-2015 at 08:04 AM.
 
Old 03-30-2015, 08:34 AM   #6
s.verma
Member
 
Registered: Oct 2013
Distribution: Debian Sid, Gentoo, Arch, Debian
Posts: 177

Original Poster
Blog Entries: 4

Rep: Reputation: 24
Got it.

Successful in arranging source packagename and packagename as

Code:
rm ~/pack_source_list.verma
apt-cache show $(dpkg -l|tail -n +6|awk '{print $2}') |egrep '^Package:|^Version:|^Source:'|tr ' ' '_' > /tmp/pack.list.total.verma

for i in $(cat /tmp/pack.list.total.verma)
do
if [[ `echo $i|grep '^Package:'` ]]
then
pack=$(echo $i|awk -F '_' '{print $2}')
elif [[ `echo $i|grep '^Source:'` ]]
then
source=$(echo $i|awk -F '_' '{print $2}')
elif [[ `echo $i|grep '^Version:'` ]]
then
version=$(echo $i|awk -F '_' '{print $2}')
echo $pack $source $version >> ~/pack_source_list.verma
pack=
source=
version=
fi
done
Now ~/pack_source_list.verma has format

packagename sourcepackagename versionnumber

Last edited by s.verma; 03-30-2015 at 08:36 AM.
 
Old 12-19-2015, 11:34 PM   #7
s.verma
Member
 
Registered: Oct 2013
Distribution: Debian Sid, Gentoo, Arch, Debian
Posts: 177

Original Poster
Blog Entries: 4

Rep: Reputation: 24
Well, I have created a script which can do exactly the same.

It is hosted at https://github.com/s-verma/security-update.sh

Only thing is that it is not fully automated currently. I have not implemented anything to automatically grab security announce from email or rss feed and writing down all updates necessary for security.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Only install security updates for Debian Sid Blaumieser Debian 21 12-20-2015 12:07 AM
After update Debian Sid/unstable says Debian 8 at bootup EDDY1 Debian 3 12-14-2014 04:30 PM
Problem while apt-get update on debian etch, cannot reach security.debian.org sarajevo Debian 4 06-08-2008 11:59 AM
Debian sid sources.list for kde 3.1(and others) rmanocha Debian 2 01-30-2004 02:03 PM
Debian Sid sources.list (for kde 3.1 etc.) rmanocha Linux - Software 4 01-30-2004 09:10 AM

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

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