From: Alexey Tourbin <at@altlinux.ru>
To: ALT Linux Devel Mailing List <devel@lists.altlinux.org>
Subject: Re: [devel] Q: at@ robots
Date: Fri, 12 May 2006 22:52:26 +0400
Message-ID: <20060512185226.GK9655@localhost> (raw)
In-Reply-To: <20060510091438.GC28000@lks.home>
[-- Attachment #1.1: Type: text/plain, Size: 578 bytes --]
On Wed, May 10, 2006 at 01:14:38PM +0400, Konstantin A. Lepikhov wrote:
> Не так давно на какой-то из машин в офисе обитал робот, который
> периодически лазил по CPAN и спамил мантейнеров соотвествующих перловых
> модулей о выходе новых версий. Потом что-то этот робот затих. Он умер, или
> на него/про него забили/забыли? :)
Он работает, шлёт письма мне. Могу перестроить его на cybertalk.
В принципе можно его запустить и посмотреть. Что не нравится что если
какой-либо перловый пакет с анметом тогда весь робот вываливается. Не
знаю что с этим можно придумать.
[-- Attachment #1.2: cpan_modules --]
[-- Type: text/plain, Size: 1625 bytes --]
#!/bin/sh -ef
hshdir="${1:-$TMPDIR/build}"
mkdir -p "$hshdir"
cd "${workdir:?}"
. trap.sh
hsh -q --no-stuff --initroot-only "$hshdir"
add_trap hsh -q --cleanup-only "$hshdir"
conflicts='perl-Geo-IPfree
perl-Module-Signature
perl-SOAP-Lite-examples
perl-SOAP-Lite
perl-Spreadsheet-WriteExcel'
# install all perl packages
"$hshdir"/aptbox/apt-cache -q --no-all-names pkgnames perl |
grep -Fx -v "$conflicts" |
xargs hsh-install -q -- "$hshdir" >/dev/null
# query CPAN database
hsh-run -q -- "$hshdir" perl -MCPAN -e 'CPAN::Shell->r' >cpan.out <<EOF
no, not ready for manual configuration
EOF
# fix CPAN output
sed '1,/^Package namespace/d;/installed modules have/,$d' cpan.out >modules
# list packages that need updating
while read -r mod v0 v1 dist; do
dep="${mod//:://}"; dep="perl($dep.pm)"
pkg="$(hsh-run -q -- "$hshdir" rpm -q --whatprovides --qf '%{NAME}\n' "$dep")"
pkg="$(echo "$pkg" |head -1)"
who="$(hsh-run -q -- "$hshdir" rpm -q --whatprovides --qf '%{PACKAGER}\n' "$dep")"
who="$(echo "$who" |head -1)"
who="${who// at /@}"; who="${who// dot /.}"
dist="${dist##*/}"
printf "%s\t%s\t%s\t%s\t%s\t%s\n" "$pkg" "$mod" "$v0" "$v1" "$dist" "$who"
done <modules
cd - >/dev/null
# group by packager
xfmt1()
{
sort -t$'\t' +5 |awk -F'\t' 'who != $6 { who = $6; printf "\n%s:\n", who; }
{ printf "%-16s\t%s\t%s\t%s\t%s\n", $1, $2, $3, $4, $5; }'
}
fmt_plus()
{
subj="$subj +$1"
echo " $1 NEW $2 added to the list"
xfmt1; echo
}
fmt_minus()
{
subj="$subj -$1"
echo " $1 $2 REMOVED from the list"
xfmt1; echo
}
fmt_total()
{
subj="$subj ($1)"
echo " Total $1 $2 need updating"
xfmt1; echo
}
[-- Attachment #1.3: trap.sh --]
[-- Type: application/x-sh, Size: 981 bytes --]
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-05-12 18:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-10 9:14 Konstantin A. Lepikhov
2006-05-12 18:52 ` Alexey Tourbin [this message]
2006-05-12 20:12 ` [devel] cpan_modules Alexey Tourbin
2006-05-13 11:00 ` [devel] [JT] perl-MIDI for sale (was: cpan_modules) Michael Shigorin
2006-05-13 10:58 ` [devel] Q: at@ robots Michael Shigorin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060512185226.GK9655@localhost \
--to=at@altlinux.ru \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git