carlopmart wrote:
Hi all,
I have do it this question one year ago
(https://lists.ubuntu.com/archives/ubuntu-server/2007-July/000535.html), but
I
need to know if it is resolved under ubuntu hardy lts server release. Can I
pass
some type of exclude/include list packages to apt to stay sure that this
package
has 5 years support??
many thanks.
Here is a script that I have been working on to solve this. It is not
yet completely tested, but I guess you could help me find if there is
something wrong with it.
usage: maintenance-check [-f] [release [release...]]
release Specifies the release to parse from.
Defaults to the system release
-f, --filter value possible values are:
n - not officially maintained
u - ubuntu desktop
k - kubuntu desktop
s - ubuntu server
Known issues:
* For releases prior to Hardy, I have yet to modify the seed structure
so that I can distinguish between what's not shipped on cd but supported
and what's not supported at all, so some packages may show as
unsupported while they should.
* Due to the way kernels are updated, the updated kernel packages are
shown as unsupported while they of course are.
Let me know if it helps and if you find issues with it.
Cheers,
Nick
#!/bin/bash
MYCOLUMNS=50,60,70
usage () {
cat EOT
This commands checks for each installed package on your system what is
the maintenance group it fits in regarding the Canonical maintenance policy.
usage: maintenance-check [-f] [release [release...]]
release Specifies the release to parse from.
Defaults to the system release
-f, --filter value possible values are:
n - not officially maintained
u - ubuntu desktop
k - kubuntu desktop
s - ubuntu server
maintenance-check is Copyright (C) 2007 Canonical Ltd. and
written by Nick Barcet [EMAIL PROTECTED]
EOT
}
filter=
TEMP=`getopt -o hf: --long help,filter:, -- $@`
eval set -- $TEMP
while true
do
case $1 in
-h|--help)
usage
exit 0
;;
-f|--filter)
case $2 in
n|u|k|s|N|U|K|S)
filter=$2
;;
*)
echo Error: filter value must be one of n,u,k,s
exit 1
;;
esac
shift 2
;;
--)
shift
break
;;
esac
done
getseeds () {
for j; do
wget -q -O - ${XSOURCE}.${XRELEASE}/$j$XSUFFIX | sed
'1,2d;N;$!P;$!D;$d' | sed 's/|.*$//;s/[ \t]*$//' | sort -u
done
}
add_inheritance () {
case $inherit in
* $1 *)
;;
*)
inherit=${inherit:+$inherit }$1
;;
esac
}
expand_inheritance () {
for seed in $(grep ^$1: $STRUCTURE | cut -d: -f2); do
expand_inheritance $seed
done
add_inheritance $1
}
inheritance () {
inherit=
expand_inheritance $1
#echo $inherit
}
#before feisty, no structure file generated
getlistsold() {
XSOURCE=$2
XRELEASE=$1
XSUFFIX=.seed
getseeds $5 $1.$4.pkgs
XSUFFIX=
getseeds -r $1 -s $2 $5 $1.$4.pkgs
XSUFFIX=.build-depends
getseeds $5 $1.$4.pkgs
sort -u -o $1.$4.pkgs $1.$4.pkgs
}
getlists() {
STRUCTURE=$4.struct
list=
wget -q -O - $2.$1/structure $STRUCTURE
for seed in $3 ; do
list=$list $(cat $STRUCTURE | sed -n '/^'$seed': /s/'$seed': //p')
done
newlist=$list
for item in $list ; do
inheritance $item
for new in $inherit; do
case $newlist in
* $new *)
;;
*)
newlist=$newlist $new
esac
done
done
getlistsold $@ $newlist
}
parseinstalled() {
dpkg -l | sed '/ii/! d;/ii / {s/ii //;s/ .*$//};'
}
summarize() {
FILE=$release.installed
exec 10$FILE
while read line10
do
theout=${line%\n}\t
case $filter in
n|N)
if !((grep -q $line $1.desktop.pkgs) \
|| (grep -q $line $1.server.pkgs) \
|| (grep -q $line $1.kubuntu.pkgs) ); then
echo -e ${theout}
fi
;;
u|U)
if grep -q $line $1.desktop.pkgs ; then
echo -e ${theout}${umaint} | expand -t $MYCOLUMNS
fi
;;
k|K)
if grep -q $line $1.kubuntu.pkgs ; then
echo -e ${theout}\t\t${kmaint} | expand -t $MYCOLUMNS
fi
;;
s|S)
if grep -q $line $1.server.pkgs ; then
echo -e ${theout}\t${smaint} | expand -t $MYCOLUMNS
fi
;;
*)