You are not logged in.

#1 2008-10-12 07:07:07

lardon
Member
Registered: 2008-05-31
Posts: 247
Website

Getting "Announcements, Package and Security Advisories" by email?

This stuff is often quite useful, and it would be nice to automatically receive an email when a new one is published. Is there a way to do so?


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#2 2008-10-12 07:10:35

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: Getting "Announcements, Package and Security Advisories" by email?

Subscribe to arch-announe mailing list. You will get notificaions on news, new releases etc.
Theres no such thing as an Archlinux security mailing list


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#3 2008-10-12 08:27:22

lardon
Member
Registered: 2008-05-31
Posts: 247
Website

Re: Getting "Announcements, Package and Security Advisories" by email?

thanks!


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#4 2008-10-12 13:34:57

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Getting "Announcements, Package and Security Advisories" by email?

However, not all things posted to the Announcements, Package and Security Advisory forum are posted to the arch-announce list. But it will cover most of the important stuff. smile

Dusty

Offline

#5 2008-10-12 13:45:43

Zariel
Member
Registered: 2008-10-07
Posts: 446

Re: Getting "Announcements, Package and Security Advisories" by email?

theres allways the RSS feed also

Offline

#6 2008-10-13 19:38:21

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Getting "Announcements, Package and Security Advisories" by email?

Dusty wrote:

However, not all things posted to the Announcements, Package and Security Advisory forum are posted to the arch-announce list. But it will cover most of the important stuff. smile

Dusty

Actually, the front page news is auto-posted to the arch-announce list and people usually post to both sections at the same time.

Offline

#7 2008-10-14 01:02:52

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Getting "Announcements, Package and Security Advisories" by email?

why not making an announcement package which simply echoes important announcements (like the klibc one) when it's updated?
People who don't care can always uninstall it and it would be quite automatic to add to the script which already synchronizes the ml and the home page

Offline

#8 2008-10-14 17:26:07

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Getting "Announcements, Package and Security Advisories" by email?

carlocci wrote:

why not making an announcement package which simply echoes important announcements (like the klibc one) when it's updated?
People who don't care can always uninstall it and it would be quite automatic to add to the script which already synchronizes the ml and the home page

That's kind of a novel idea. Maybe a package that has /usr/share/archnews/<datetime stamp>.txt and dumps the most recent to the terminal on upgrade.

I kinda like it.

Offline

#9 2008-10-14 17:34:10

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: Getting "Announcements, Package and Security Advisories" by email?

phrakture wrote:
carlocci wrote:

why not making an announcement package which simply echoes important announcements (like the klibc one) when it's updated?
People who don't care can always uninstall it and it would be quite automatic to add to the script which already synchronizes the ml and the home page

That's kind of a novel idea. Maybe a package that has /usr/share/archnews/<datetime stamp>.txt and dumps the most recent to the terminal on upgrade.

I kinda like it.

idea++, this seems pretty cool.

If we ever did global pacman hooks, this would be a super-cool one that people could enable or disable. For now we might have to go the install/cat new messages route, but yeah.

/usr/share/archnews/<datetime>-subject.txt
/usr/share/archnews/<datetime2>-subject2.txt
...
/usr/share/archnews/.lastshown

and then some sort of install script that is smart enough to look at .lastshown and cat all messages since. This way people that wait longer between updates (and thus miss a few upgrades of the announcements package) still get all the ones they missed, and it keeps us from having to add conditionals every time we update the package. The only thing developers will have to do is chuck their announcement in there and go (or better yet, let our lovely django install actually create a package).

Offline

#10 2008-10-14 17:41:38

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Getting "Announcements, Package and Security Advisories" by email?

toofishes wrote:

The only thing developers will have to do is chuck their announcement in there and go (or better yet, let our lovely django install actually create a package).

Or we can use the RSS feed from the front page. I bet one of us could hack a script together to auto-create a package when new RSS entries are found

Offline

#11 2008-10-14 18:05:26

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Getting "Announcements, Package and Security Advisories" by email?

Tada! Now who wants to do the rest of the work?

* Clean HTML from items
* Dump each entry to a new file
* Put this in a PKGBUILD
* Output latest link ID for use as a version number

#!/usr/bin/env python

import urllib2
from datetime import datetime
from BeautifulSoup import BeautifulSoup

RSSFEED = "http://archlinux.org/feeds/news/"
DTFORMAT = "%a, %d %b %Y %H:%M:%S -0000"

rss = urllib2.urlopen(RSSFEED).read()
soup = BeautifulSoup(rss)

items = soup.findAll("item")
for i in items:
    txt = ' '.join(i.description.contents)
    link = ' '.join(i.link.contents)
    guid = ' '.join(i.guid.contents)
    dt = datetime.strptime(
            ' '.join(i.pubdate.contents),
            DTFORMAT)

    print "Item: %s" % guid
    print "Published: %s" % dt
    print "-" * 40
    print txt
    print "\n"

Offline

#12 2008-10-21 18:56:37

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Getting "Announcements, Package and Security Advisories" by email?

finally I managed to fiddle with this for a while:
TA-DAH
the python script:

#!/usr/bin/env python

import urllib2
from datetime import datetime
from BeautifulSoup import BeautifulSoup
import re

RSSFEED = "http://archlinux.org/feeds/news/"
DTFORMAT = "%a, %d %b %Y %H:%M:%S -0000"

def linkify(matchobj):
    html_link = matchobj.group(0)
    link=re.split('<a href="|">|&[gl]t;', html_link, maxsplit=3)
    return link[2] + ' (' + link[1] + ')'

rss = urllib2.urlopen(RSSFEED).read()
soup = BeautifulSoup(rss)

items = soup.findAll("item")
for i in items:
    txt = ' '.join(i.description.contents)
    link = ' '.join(i.link.contents)
    guid = ' '.join(i.guid.contents)
    dt = datetime.strptime(
            ' '.join(i.pubdate.contents),
            DTFORMAT)

    txt = re.sub('<a .*?</a>', linkify, txt)
    txt = re.sub('<.*?>', '', txt)
    index = re.sub('[^0-9]', '', guid)

    data = """Item: %s
Published: %s
----------------------------------------
%s

""" % (guid, dt, txt)

    f = open(index, 'w')
    f.write(data.encode('utf-8'))
    f.close()

the PKGBUILD

# Arch-announce
# Maintainer: noone <itsperfect@thewayit.is>
pkgname=announcements
pkgver=0
pkgrel=1
pkgdesc="A utility to display Arch announcements when upgrading"
arch=('i686' 'x86_64')
url="http://www.archlinux.org/news/"
license=('CC')
groups=()
depends=()
makedepends=('python' 'beautiful-soup')
source=(feedpkg.py)
md5sums=('b619d8ed2706068ba426d49aa5efba04')
install=arch-announce.install

build() {
  cd $srcdir/
  echo "Downloading the messages..."
  /usr/bin/env python feedpkg.py || return 1
  pkgver="$(ls -1 | sort -n | tail -n1)"
  install -d $pkgdir/usr/share/arch-announce
  install --mode=644 $srcdir/[0-9]* $pkgdir/usr/share/arch-announce
}

the arch-announce.install (currently displays only the first line of content)

post_upgrade() {
    for i in $(seq ${2%-*} ${1%-*}); do
        head -n4 /usr/share/arch-announce/"$i"
    done
    echo ${2%-*} > /usr/share/arch-announce/.last
}

post_install() {
    head -n4 /usr/share/arch-announce/*
    echo ${2%-*} > /usr/share/arch-announce/.last
}

pre_remove() {
    /bin/true
}

post_remove() {
    rm /usr/share/arch-announce/.last
    rmdir /usr/share/arch-announce
}

Offline

Board footer

Powered by FluxBB