[debian-edu-commits] r83850 - trunk/src/archive
ccscanf-guest at alioth.debian.org
ccscanf-guest at alioth.debian.org
Sat Sep 20 10:43:04 UTC 2014
Author: ccscanf-guest
Date: 2014-09-20 10:43:04 +0000 (Sat, 20 Sep 2014)
New Revision: 83850
Added:
trunk/src/archive/README.migrated2git
Removed:
trunk/src/archive/archivestatus/
trunk/src/archive/ask.pl
trunk/src/archive/gather.pl
trunk/src/archive/katha
trunk/src/archive/katha.py
trunk/src/archive/katha.template
trunk/src/archive/katha.template2
trunk/src/archive/sabine
trunk/src/archive/stable-update.template
trunk/src/archive/stable-updates/
trunk/src/archive/trigger_builds
Log:
Migration to git.
Added: trunk/src/archive/README.migrated2git
===================================================================
--- trunk/src/archive/README.migrated2git (rev 0)
+++ trunk/src/archive/README.migrated2git 2014-09-20 10:43:04 UTC (rev 83850)
@@ -0,0 +1,2 @@
+The directory archive has been migrated to Git on Alioth:
+http://anonscm.debian.org/gitweb/?p=debian-edu/directories/archive.git
Deleted: trunk/src/archive/ask.pl
===================================================================
--- trunk/src/archive/ask.pl 2014-09-20 09:27:27 UTC (rev 83849)
+++ trunk/src/archive/ask.pl 2014-09-20 10:43:04 UTC (rev 83850)
@@ -1,54 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use Data::Dumper;
-use AptPkg::Version;
-use AptPkg::Config '$_config';
-use AptPkg::System '$_system';
-
-my $dump = "/tmp/changes.dump";
-my $debug=0;
-my $accepted;
-
-my $dir = "/org/ftp.skolelinux.org/queue/done/";
-
-# initialise the global config object with the default values
-$_config->init;
-
-# determine the appropriate system type
-$_system = $_config->system;
-
-my $vs = $_system->versioning;
-
-
-if ( -f $dump ) {
- open (FH, "$dump");
- my $data_string = join '', <FH>;
- close (FH);
- eval $data_string;
-} else {
- die "Could not open cache: $!";
-}
-
-opendir(DIR, $dir);
-my @package_list = readdir(DIR);
-close DIR;
-my @array;
-my @new_list;
-foreach my $list (@package_list) {
- next if ($list =~ m/^\./);
- @array = split(/_/, $list);
- push (@new_list, $array[0]);
-}
-
-foreach my $package (@new_list) {
- if (! exists $accepted->{ $package }) { print "$package does not exist\n"; next }
- my @versions;
- for my $version (keys %{$accepted->{$package}}) {
- push (@versions, "$version");
- }
- my @sorted = sort { $vs->compare($b, $a) } @versions;
- print "Package: " . $package . "\nLast version: $sorted[0] \n" .
- "Changed by: " . $accepted->{$package}{$sorted[0]}{'changed'} ."\n" .
- "Signed by: " . $accepted->{$package}{$sorted[0]}{'uploaded'} . "\n\n";
-}
Deleted: trunk/src/archive/gather.pl
===================================================================
--- trunk/src/archive/gather.pl 2014-09-20 09:27:27 UTC (rev 83849)
+++ trunk/src/archive/gather.pl 2014-09-20 10:43:04 UTC (rev 83850)
@@ -1,74 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use Data::Dumper;
-
-my $changes = "/org/ftp.skolelinux.org/queue/done/";
-my $dump = "/tmp/changes.dump";
-my $change_data = "";
-my $accepted;
-my $debug = 0;
-
-opendir(DIR, "$changes/") || die "can't opendir $changes: $!";
-
-while (my $file = readdir(DIR)) {
- next if ($file =~ m/^\./);
- next unless ($file =~ m/\.changes$/);
- #next unless ($file =~ m/zsh/);
- print "Processing $file\n" if $debug;
- open (FH, "$changes/$file");
- my ($changed, $date, $version, $source, $uploaded,$architecture) = "";
-
- while (my $line = <FH>) {
- chomp($line);
- if ($line =~ m/^Changed-By: (.*)/) {
- $changed = "$1";
- }
- if ($line =~ m/^Source: (.*)/) {
- $source = "$1";
- }
- if ($line =~ m/^Date: (.*)/) {
- $date = "$1";
- }
- if ($line =~ m/^Version: ([^ ]*)$/) {
- $version = "$1";
- }
- if ($line =~ m/^Architecture: (.*)/) {
- $architecture = "$1";
- }
- }
- next if exists $accepted->{ $source }{$version};
- next unless $architecture =~ /source/;
-
- $accepted->{ $source }{$version}{ 'changed' } = $changed;
- $accepted->{ $source }{$version}{ 'date' } = $date;
- close (FH);
- open (FH, '-|', "gpg --no-greeting --no-secmem-warning --no-options --no-verbose --keyring /home/builder/src/debian-edu/src/archive/keyring.gpg --verify $changes/$file 2>&1");
- while (my $line = <FH>) {
- if ($line =~ m/^gpg: Good signature from (.*)/) {
- $uploaded = "$1";
- $uploaded =~ s/^"(.*)"$/$1/;
- }
- }
- $accepted->{$source}{$version}{'uploaded'} = $uploaded;
-}
-close DIR;
-
-if ($debug) {
- for my $package ( keys %{$accepted} ) {
- for my $version ( keys %{$accepted->{$package}} ){
- print "$package ($version)\n";
- for my $key ( keys %{$accepted->{$package}{$version}} ){
- print "$key => " . $accepted->{$package}{$version}{$key} . "\n";
- }
- }
- }
-}
-
-$Data::Dumper::Indent = 1;
-$Data::Dumper::Purity = 1;
-$Data::Dumper::Sortkeys = 1;
-open (FH, ">", "$dump") or die "Could not open dump $dump for writing: $!";
-print FH Data::Dumper->Dump([$accepted],['accepted']);
-close (FH);
-
Deleted: trunk/src/archive/katha
===================================================================
--- trunk/src/archive/katha 2014-09-20 09:27:27 UTC (rev 83849)
+++ trunk/src/archive/katha 2014-09-20 10:43:04 UTC (rev 83850)
@@ -1,145 +0,0 @@
-#!/usr/bin/perl -w
-
-
-# Author: Steffen Joeris <steffen.joeris at skolelinux.de>
-# License: This tool is licensed under the GPL v.2 or higher
-
-# katha is the Debian-Edu/Skolelinux tool for moving the packages from
-# the -test into the stable pool. It is a small frontend for madison and
-# heidi. Please make sure that you check the packages before moving them
-# into the stable pool. Only do it if the developer requests it.
-
-
-use strict;
-
-use Getopt::Long; # command line arguments
-use Mail::Sendmail; # used for email sending
-use Template; # used for working on the template
-
-my $TESTING = "etch";
-my $arg_string = 's';
-my ($suite, $version);
-my $package;
-my @target_suite;
-my %mail;
-my $template = Template->new({INCLUDE_PATH => '/org/ftp.skolelinux.org/katie/templates/'});
-my @new_version;
-my @old_version;
-my $output;
-my $vars;
-
-GetOptions( "suite|s=s" => \$suite, "version|v=s" => \$version, "<>" => \&package ) or &error();
-if (not $suite || not $version || @ARGV) {
- # no arguments, so exit
- &error;
-}
-
-sub error {
- print "You have to specify an argument and use the right suite with -test\n";
- print "Use: katha [-s <FromSUITE> | -v <Version>] <Package>\n";
- exit 1;
-}
-
-sub package {
- $package = $_;
-}
-
-sub bind_args {
- if ( $suite ) {
- # get needed information, also check if the suites are correct
- @target_suite = split(/-/, $suite[0]);
- if ( "$target_suite[0]" eq "$suite" ) {
- &error;
- }elsif ( "$target_suite[1]" ne "test" ) {
- &error;
- # expand me when we start to use new suites
- }elsif ( "$target_suite[0]" ne "sarge" && "$target_suite[0]" ne "etch" ) {
- print "Suite $target_suite[0] is unknown\n";
- exit 1;
- }
- }
-}
-
-sub mailing {
- if (! $output) {
- print "Unable to create the mail, please check if the template is ready\n";
- exit 1;
- }
-
- # create mail
- %mail = ( From => 'ftpmaster at skolelinux.org',
- To => 'commits at skolelinux.org',
- Subject => 'Package version in a stable development pool changed',
- Message => "$output",
- );
-
- sendmail(%mail) or die $Mail::Sendmail::error;
- print "Sending mail about changes\n";
-}
-
-sub versioning {
- if ( ! $version ) {
- # getting new version
- open(VERSION, "madison -s $suite $package -S -f heidi |");
- @new_version = <VERSION>;
- close(VERSION);
- if (! @new_version ) {
- print "Unable to find a valid package version called $package in $suite\n";
- &error;
- }
- }
-
- # getting old version
- if ( @target_suite ) {
- open(VERSION, "madison -s $target_suite[0] $package -S -f heidi |");
- }else {
- open(VERSION, "madison -s $TESTING $package -S -f heidi|");
- }
- @old_version = <VERSION>;
- close(VERSION);
- if (! @old_version ) {
- print "There is no old version of $package in ";
- if ( @target_suite ) {
- print "$target_suite[0]";
- }else {
- print "$TESTING";
- }
- print " so trying to add ...\n";
- }
-
- #comparing versions
- if ( @new_version && "@old_version" eq "@new_version" ) {
- print "The package in $suite and $target_suite[0] are already the same\n";
- exit 1;
- }
-}
-
-sub templating {
- if (! @old_version ) {
- @old_version = "no old version";
- }
-
- $vars = {
- 'suite' => $target_suite[0],
- 'old_version' => $old_version[0],
- 'new_version' => $new_version[0],
- };
-
- $template->process('katha.template', $vars, \&get_output);
-}
-
-sub get_output {
- $output = shift;
-}
-
-&bind_args;
-&versioning;
-&templating;
-if ( $suite && @target_suite ) {
- system("madison -s $suite $package -S -f heidi | heidi -a $target_suite[0] && touch /org/ftp.skolelinux.org/RUN-DINSTALL");
- print "Moving package $package from $suite to $target_suite[0]\n";
-}else {
- system("madison -s $TESTING $package -S -f heidi | heidi -a $TESTING && touch /org/ftp.skolelinux.org/RUN-DINSTALL");
- print "Moving package $package version $version to $TESTING\n";
-}
-&mailing;
Deleted: trunk/src/archive/katha.py
===================================================================
--- trunk/src/archive/katha.py 2014-09-20 09:27:27 UTC (rev 83849)
+++ trunk/src/archive/katha.py 2014-09-20 10:43:04 UTC (rev 83850)
@@ -1,109 +0,0 @@
-#!/usr/bin/env python2.4
-"""
-katha is the Debian-Edu/Skolelinux tool for moving the packages from
-the -test into the stable pool. It is a small frontend for madison and
-heidi. Please make sure that you check the packages before moving them
-into the stable pool. Only do it if the developer requests it.
-
-Unfortunately, the DAK tools are only available as scripts and do not
-have a Python API for specific tasks. So we have to call them manually.
-
-This tool was originally written in the language Perl by Steffen Joeris
-<steffen.joeris at skolelinux.de>, then rewritten in Python by Alexander
-Schremmer <alex AT alexanderweb DOT de>.
-
-License: This tool is licensed under the GPL v.2 or higher
-"""
-
-template_path = "/org/ftp.skolelinux.org/katie/templates/katha.template.txt"
-
-import os, sys, pwd
-from optparse import OptionParser
-from smtplib import SMTP
-from email.MIMEText import MIMEText
-from subprocess import Popen, PIPE
-from string import Template
-
-class KathaException(Exception): pass
-
-def main():
- usage = "usage: %prog [options] args"
- parser = OptionParser(usage)
- parser.add_option("-s", "--suite", dest="suite",
- help="The suite where the package should be copied from. It needs to end with '-test'.")
- parser.add_option("-v", "--version", dest="version", help="If supplied, use the specified version instead of the most current package.")
-
- options, args = parser.parse_args()
- if len(args) > 0:
- packagename = args[0]
- else:
- packagename = None
-
- if not options.suite:
- parser.error("You have to specify an argument and use the right suite with -test")
-
- suite_tokens = options.suite.split("-")
- if len(suite_tokens) != 2 or suite_tokens[1] != "test":
- parser.error("The suite has to end with -test.")
- if suite_tokens[0] not in ("etch", "sarge"):
- parser.error("Unknown suite.")
-
- target_suite = suite_tokens[0]
- try:
- old_version, new_version = get_versions(options.suite, target_suite, packagename, options.version)
- except KathaException, e:
- parser.error(e.args[0])
-
- text = get_mail(target_suite, old_version, new_version)
-
- print "Moving package %r from %r to %r" % (packagename, options.suite, target_suite)
- os.system("madison -s %s %s -S -f heidi | heidi -a %s && touch /org/ftp.skolelinux.org/RUN-DINSTALL" % (options.suite, packagename, target_suite));
- sendmail(text, packagename)
-
-def sendmail(text, package):
- msg = MIMEText(text)
-
- from_addr = 'ftpmaster at skolelinux.org'
- to_addr = 'commits at skolelinux.org'
-
- msg['Subject'] = 'Package version of %s in a stable development pool changed' % package
- msg['From'] = from_addr
- msg['To'] = to_addr
- msg['X-Username'] = pwd.getpwuid(os.getuid())[0]
-
- s = SMTP()
- s.connect()
- print "Sending mail about changes"
- s.sendmail(from_addr, [to_addr], msg.as_string())
- s.close()
-
-def get_versions(suite, target_suite, package, override_version=None):
- new_version = Popen(("madison -s %s %s -S -f heidi" % (suite, package)).split(), stdout=PIPE).communicate()[0]
- if not new_version:
- raise KathaException("Unable to find a valid version for the package %r in %r." % (package, suite))
-
- old_version = Popen(("madison -s %s %s -S -f heidi" % (target_suite, package)).split(), stdout=PIPE).communicate()[0]
- if not old_version:
- print "There is no old version of %r in %r. Trying to add it ..." % (package, target_suite)
-
- if old_version == new_version:
- raise KathaException("The package in %r and %r are already the same" % (suite, target_suite))
-
- if override_version:
- print "Overriding the version to %r" % override_version
- new_version = override_version
-
- return old_version, new_version
-
-def get_mail(target_suite, old_version, new_version):
- if not old_version:
- old_version = "No old version"
- vars = {
- 'suite': target_suite,
- 'old_version': old_version,
- 'new_version': new_version,
- }
- return Template(template_path).substitute(vars)
-
-if __name__ == "__main__":
- main()
Deleted: trunk/src/archive/katha.template
===================================================================
--- trunk/src/archive/katha.template 2014-09-20 09:27:27 UTC (rev 83849)
+++ trunk/src/archive/katha.template 2014-09-20 10:43:04 UTC (rev 83850)
@@ -1,12 +0,0 @@
-Hi Developers,
-
-a new package version hits a stable development suite.
-
-The following change happened to [% suite %] :
-
-old version: [% old_version %]
-
-new version: [% new_version %]
-
-Greetings
-katha
Deleted: trunk/src/archive/katha.template2
===================================================================
--- trunk/src/archive/katha.template2 2014-09-20 09:27:27 UTC (rev 83849)
+++ trunk/src/archive/katha.template2 2014-09-20 10:43:04 UTC (rev 83850)
@@ -1,11 +0,0 @@
-Hi Developers,
-
-a new package version hits a stable development suite.
-
-The following change happened to $suite:
-old version: $old_version
-
-new version: $new_version
-
-Greetings
-katha
Deleted: trunk/src/archive/sabine
===================================================================
--- trunk/src/archive/sabine 2014-09-20 09:27:27 UTC (rev 83849)
+++ trunk/src/archive/sabine 2014-09-20 10:43:04 UTC (rev 83850)
@@ -1,108 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Author: Steffen Joeris <steffen.joeris at skolelinux.de>
-# License: This tool is licensed under the GPL v.2 or higher
-#
-# sabine is the account creation tool.
-# It is the Debian-Edu/Skolelinux version of uma.
-# Notice that this tool just adds the key to the keyring and writes
-# a mail to the new uploader. You do not need to have superuser rights,
-# neither in the database nor on the system, you use katie rights.
-#
-
-
-use strict;
-
-use Getopt::Std; # command line arguments
-use Mail::Sendmail; # used for email sending
-use Term::Prompt; # used for command line interaction
-
-my $arg_string = 'k';
-my $gpg = "/usr/bin/gpg";
-my $uploader;
-my $template = "/org/ftp.skolelinux.org/katie/templates/sabine.template";
-my @mailbody;
-my $list;
-my @key;
-my $first_address_try;
-my @uploader_address;
-my @half_finish_address;
-my @finish_address;
-my %mail;
-my @id;
-my $question;
-
-sub error {
- print "You have to specify an argument\n";
- print "Use: sabine -k keyid\n";
- exit 1;
-}
-
-sub get_address {
- open(ADDRESS, "$gpg --no-default-keyring --keyring /opt/dak/keyrings/keyring.gpg --list-key @ARGV |");
- @key = <ADDRESS>;
- close(ADDRESS);
- @uploader_address = split(/ /, $key[1]);
- foreach my $address ( @uploader_address ) {
- next if not ($address =~ "@");
- $address =~ s/<//;
- $address =~ s/>//;
- return $address;
- }
-}
-
-
-sub mailing {
- # get mailbody from template
- open(MAILBODY, $template);
- @mailbody = <MAILBODY>;
- close (MAILBODY);
- my $uploader = get_address;
- chomp $uploader;
- # create mail
- %mail = ( From => 'ftpmaster at skolelinux.org',
- To => "$uploader",
- Cc => 'Sysadmin group <drift at skolelinux.org>',
- Subject => 'Your account on ftp.skolelinux.org has been activated',
- Message => join("", @mailbody),
- );
-
- sendmail(%mail) or die $Mail::Sendmail::error;
-}
-
-getopts( "$arg_string", \my %opt);
-if (not scalar %opt or (scalar keys %opt == 1 and $opt{"x"})) {
- # no arguments, so exit
- &error;
-}
-
-# doing the action
-if ( $ARGV[0] && $opt{"k"} && ! $ARGV[1] ) {
- # download the key into katie's keyring first
- system("gpg --keyserver subkeys.pgp.net --no-default-keyring --keyring /var/lib/dak/.gnupg/keyring.gpg --recv-keys @ARGV");
- open(PRINT, "$gpg --no-default-keyring --keyring /var/lib/dak/.gnupg/keyring.gpg --fingerprint @ARGV |");
- @id = <PRINT>;
- close(PRINT);
- chomp @id;
- # do we really want to proceed?
- $question = prompt("y", "Do you really want to add the following key to the internal keyring: $id[1]", "Y|y / N|n", "n");
- if ( $question ) {
- print "Adding keyid @ARGV to the Debian-Edu/Skolelinux keyring\n";
- # do the magic
- system("$gpg --keyserver subkeys.pgp.net --no-default-keyring --keyring /opt/dak/keyrings/keyring.gpg --recv-keys @ARGV");
- my $uploader = get_address;
- chomp $uploader;
- if ( ! $uploader ) {
- print "Could not determine the uploaders address\n";
- &error;
- }
- &mailing;
- print "Mail sent to new Uploader: $uploader\n";
- print "Now please write down the mail address to the mail-whitelist and add the name to the uploaders-list found in the wiki\n";
- exit 0;
- }else{
- print "Aborting ...\n";
- }
-}else{
- &error;
-}
Deleted: trunk/src/archive/stable-update.template
===================================================================
--- trunk/src/archive/stable-update.template 2014-09-20 09:27:27 UTC (rev 83849)
+++ trunk/src/archive/stable-update.template 2014-09-20 10:43:04 UTC (rev 83850)
@@ -1,41 +0,0 @@
-Debian-Edu/Skolelinux Stable Package Update
-
-The Debian-Edu/Skolelinux developers have updated the following
-package(s) in the stable repository. We advise you to upgrade to
-the newest stable version.
-
-
-Package:
-New version:
-
-
-Upgrade Instructions
-----------------------
-
-Make sure the line
-
- deb http://ftp.skolelinux.org/skolelinux/ etch local
-
-is present in your /etc/apt/sources.list and run 'aptitude update' to
-update your package lists. Then run
-
- 'aptitude upgrade'
-
-to upgrade the package mentioned above. This might upgrade other
-packages too, and if you only want to upgrade the package above, you
-should run
-
- 'aptitude install <packagename>'
-
-where <packagename> is the package name in paranthesis from the package
-section above.
-
-
-
-The official CD(s)/DVD will not be updated immediately, but when we release a
-new point release. Then the new package version will be included onto the
-CD(s)/DVD.
-
-----------------------------------------------------------------------------
-Mailing lists: debian-edu-announce at lists.debian.org
-Package info: `apt-cache show <pkg>'
Deleted: trunk/src/archive/trigger_builds
===================================================================
--- trunk/src/archive/trigger_builds 2014-09-20 09:27:27 UTC (rev 83849)
+++ trunk/src/archive/trigger_builds 2014-09-20 10:43:04 UTC (rev 83850)
@@ -1,74 +0,0 @@
-#!/bin/bash
-
-# make sure that everyone can trigger a build on administrator
-# for every daily build
-# - white 03.03.2007
-
-TOUCH="/usr/bin/touch"
-CHMOD="/bin/chmod"
-path="/home/builder/src/debian-edu/src/build/CD-administrator/triggers/force"
-
-suites="\
- edu-testing-nolocal-netinst\
- squeeze-amd64-i386-netinst\
- squeeze-dvd\
- squeeze-source-dvd\
- squeeze-test-amd64-i386-netinst\
- squeeze-test-dvd\
- wheezy-amd64-i386-netinst\
- wheezy-i386-dvd\
- wheezy-source-dvd\
- wheezy-usbstick\
- wheezy-test-amd64-i386-netinst\
- wheezy-test-usbstick\
- "
-
-
-function error() {
- /bin/cat << EOF
- Please specify the daily build which you want to trigger a build for
- Use: trigger_build daily_build
- valid values for daily_build are:
-EOF
- for suite in $suites ; do
- echo " $suite"
- done
- echo " all"
-exit 0
-}
-
-if /usr/bin/test -z "$1" ; then
- error
-fi
-
-#exit if we are not running as builder
-#if [ `whoami` != "builder" ] ; then
-# echo "you are not builder, setuid bit missing?!?"
-# exit 50
-#fi
-
-
-for suite in $@ ; do
- found=false
- for valid in $suites ; do
- if [ "$suite" = "$valid" ] ; then
- $TOUCH $path-$suite
- $CHMOD g+w $path-$suite
- found=true
- fi
- done
- if $found ; then
- continue
- fi
- case "$suite" in
- all)
- for i in $suites ; do
- $TOUCH $path-$i
- $CHMOD g+w $path-$i
- done
- ;;
- *)
- error
- ;;
- esac
-done
More information about the debian-edu-commits
mailing list