From a384e31e542e2520ebc1e2402a86fad5507b7da2 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 16 Aug 2010 23:03:19 +0200 Subject: [PATCH 01/80] Initial checkin of personal version. Signed-off-by: Thomas Hochstein --- UVrules.pm | 36 +++------ messages.cfg | 1 - templates/result-multi | 5 +- templates/result-single | 4 +- tmp/ergebnis-1191790177 | 0 tmp/stimmen-1191790177 | 0 usevote.global.cfg | 165 ++++++++++++++++++++++++++++++++++++++++ usevote.rul | 2 - usevote.tpl.cfg | 76 ++++++++++++++++++ uvballot.pl | 6 +- uvbounce.pl | 6 +- uvcfv.pl | 6 +- uvvote.pl | 10 +-- 13 files changed, 271 insertions(+), 46 deletions(-) delete mode 100644 tmp/ergebnis-1191790177 delete mode 100644 tmp/stimmen-1191790177 create mode 100644 usevote.global.cfg create mode 100644 usevote.tpl.cfg diff --git a/UVrules.pm b/UVrules.pm index 76e260f..4325867 100644 --- a/UVrules.pm +++ b/UVrules.pm @@ -149,10 +149,10 @@ sub read_rulefile { die $errortext . ": $_\n\n" if ($errortext); # check for correct characters in conditions - if ($if !~ /^[JjNnEeSsHhIi\.]+$/) { + if ($if !~ /^[JjNnEeSsIi\.]+$/) { die UVmessage::get ("RULES_INVCHARS", (NUM=>$num+1, TYPE=>"if")) . ": $if\n\n"; - } elsif ($then !~ /^[JjNnEeSsHhIi\.]+$/) { + } elsif ($then !~ /^[JjNnEeSsIi\.]+$/) { die UVmessage::get ("RULES_INVCHARS", (NUM=>$num+1, TYPE=>"if")) . ": $then\n\n"; } @@ -194,9 +194,8 @@ sub read_rulefile { sub make_regex_pos { my $pat = $_[0]; - $pat =~ s/[hijens]/./g; + $pat =~ s/[jens]/./g; $pat =~ s/S/[JN]/g; - $pat =~ s/H/[EJ]/g; $pat =~ s/I/[EN]/g; return $pat; @@ -217,19 +216,22 @@ sub make_regex_neg { # upper case characters are replaced with dots # (are covered by make_regex_pos) - $pat =~ s/[HIJENS]/./g; + $pat =~ s/[JENS]/./g; # reverse lower case characters $pat =~ s/j/[NE]/g; $pat =~ s/n/[JE]/g; $pat =~ s/e/[JN]/g; $pat =~ s/s/E/g; - $pat =~ s/h/N/g; $pat =~ s/i/J/g; - # If the string contained only upper case characters they are now all - # replaced with dots and the RegEx would match everything, i.e. declare - # every vote as invalid. In this case an empty pattern is returned. + # to be translated: + # Falls keine Kleinbuchstaben vorkamen (es sind nur Punkte uebrig): + # Wenn keine optionalen Forderungen vorhanden sind, wuerde der Regex + # immer matchen und somit die Stimme immer als nicht passend erkannt + # werden. Deswegen wird versucht auf den leeren String zu ueberpruefen, + # was durch die Negation dazu fuehrt, dass die Stimme als passend + # gewertet wird. $pat =~ s/^\.+$//; return $pat; @@ -303,10 +305,6 @@ sub rule_print { $fill = " $and "; $text1 = UVmessage::get ("RULES_IFCLAUSE", (VOTE=>"$yes $or $no", GROUP=>$groups[$i])); - } elsif ($rule[$i] eq 'H') { - $fill = " $and "; - $text1 = UVmessage::get ("RULES_IFCLAUSE", - (VOTE=>"$abst $or $yes", GROUP=>$groups[$i])); } elsif ($rule[$i] eq 'I') { $fill = " $and "; $text1 = UVmessage::get ("RULES_IFCLAUSE", @@ -324,10 +322,6 @@ sub rule_print { $fill = " $or "; $text1 = UVmessage::get ("RULES_IFCLAUSE", (VOTE=>"$yes $or $no", GROUP=>$groups[$i])); - } elsif ($rule[$i] eq 'h') { - $fill = " $or "; - $text1 = UVmessage::get ("RULES_IFCLAUSE", - (VOTE=>"$abst $or $yes", GROUP=>$groups[$i])); } elsif ($rule[$i] eq 'i') { $fill = " $or "; $text1 = UVmessage::get ("RULES_IFCLAUSE", @@ -363,10 +357,6 @@ sub rule_print { $fill = " $and "; $text1 = UVmessage::get ("RULES_THENCLAUSE", (VOTE=>"$yes $or $no", GROUP=>$groups[$i])); - } elsif ($rule[$i] eq 'H') { - $fill = " $and "; - $text1 = UVmessage::get ("RULES_THENCLAUSE", - (VOTE=>"$abst $or $yes", GROUP=>$groups[$i])); } elsif ($rule[$i] eq 'I') { $fill = " $and "; $text1 = UVmessage::get ("RULES_THENCLAUSE", @@ -384,10 +374,6 @@ sub rule_print { $fill = " $or "; $text1 = UVmessage::get ("RULES_THENCLAUSE", (VOTE=>"$yes $or $no", GROUP=>$groups[$i])); - } elsif ($rule[$i] eq 'h') { - $fill = " $or "; - $text1 = UVmessage::get ("RULES_THENCLAUSE", - (VOTE=>"$abst $or $yes", GROUP=>$groups[$i])); } elsif ($rule[$i] eq 'i') { $fill = " $or "; $text1 = UVmessage::get ("RULES_THENCLAUSE", diff --git a/messages.cfg b/messages.cfg index 6b1dd5d..1ea665e 100644 --- a/messages.cfg +++ b/messages.cfg @@ -154,7 +154,6 @@ CFV_SUBJECT = Wahlschein # COUNT_ERR_OPEN = Kann Ergebnisdatei ${FILE} nicht oeffnen! COUNT_ERR_RESULT = Fehler in ${FILE} Zeile ${LINE} -COUNT_ERR_GROUPCOUNT = Bei Stimme von <${ADDR}>: ${NUM1} statt ${NUM2} Stimmen gefunden (${RESULTFILE} kontrollieren!) COUNT_DELETED = ${NUM} Stimme(n) geloescht. # # uvvote.pl diff --git a/templates/result-multi b/templates/result-multi index cc3659b..9a065ac 100644 --- a/templates/result-multi +++ b/templates/result-multi @@ -11,12 +11,13 @@ group-more := value group | drop-words 40 | create-lines 40 Ergebnisse [$votename-first] [@votename-more| [$line]\n] -([$numvalid] gueltige Stimmen) + +Es wurden [$numvalid] gueltige Stimmen abgegeben. Ja Nein : 2/3? >=60? : ang.? : Gruppe ---- ---- : ---- ----- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [?cond2| Ja |Nein] : [?result| Ja |Nein] : [$group-first] -[@group-more| : : : [$line]\n]\n] +[@group-more| : : : [$line]|\n]\n] [?numabstain|[$numabstain-formatted] Enthaltungen] [?numinvalid|[$numinvalid] ungueltige Stimme(n)] diff --git a/templates/result-single b/templates/result-single index 1be10d2..355aa4a 100644 --- a/templates/result-single +++ b/templates/result-single @@ -14,8 +14,8 @@ Es gab [$yes] Ja-Stimmen und [$no] Nein-Stimmen[?numabstain| bei [$numabstain] E [?numinvalid|[$numinvalid] Stimme(n) wurden als ungueltig gewertet.] Es wurde [?cond1|die|keine] 2/3-Mehrheit erreicht und es gingen [?cond2|mehr|weniger] als -60 Ja-Stimmen ein. Damit ist die [$votename-text-first] -[@votename-text-more|[$line] |\n][?cond1|[?cond2|angenommen|abgelehnt]|abgelehnt]. +60 Ja-Stimmen ein. Damit ist die [$votename-first] +[@votename-more|[$line]|\n] [?cond1|[?cond2|angenommen|abgelehnt]|abgelehnt]. Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner Veroeffentlichung Einspruch erhoben werden. Der Einspruch ist per diff --git a/tmp/ergebnis-1191790177 b/tmp/ergebnis-1191790177 deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/stimmen-1191790177 b/tmp/stimmen-1191790177 deleted file mode 100644 index e69de29..0000000 diff --git a/usevote.global.cfg b/usevote.global.cfg new file mode 100644 index 0000000..210d21b --- /dev/null +++ b/usevote.global.cfg @@ -0,0 +1,165 @@ +######################################################################## +# Alles ab hier braucht i.d.R. nur einmal festgelegt werden. +# Es ist moeglich, diese Einstellungen in eine globale Konfigurations- +# datei auszulagern. Das Einbinden erfolgt mit der Zeile +# +# include /pfad/zur/globalen_datei +# +# Falls Einstellungen aus der globalen Konfigurationsdatei hier +# fuer einzelne Abstimmungen ueberschrieben werden sollen, muessen +# diese *hinter* dem Include-Befehl stehen! +# (der letzte Wert ueberschreibt vorhergehende Definitionen) +######################################################################## + +# SMTP benutzen? (falls nicht, wird der weiter unten einstellbare +# MTA direkt aufgerufen; unter Windows kann nur SMTP benutzt werden!) +smtp = 0 + +# SMTP-Server (falls smtp = 1) +smtpserver = localhost +smtpport = 25 + +# SMTP-Authentifizierung benutzen? (RFC 2554) +# Das entsprechende Perlmodul (Net::SMTP) kann derzeit nur AUTH PLAIN, +# funktioniert also moeglicherweise nicht mit jedem Server +#smtpauth = 0 +#smtpuser = +#smtppass = + +# Falls als HELO etwas anderes als der Hostname verwendet werden soll: +#smtphelo = greenmeadow.szaf.org + +# Falls ein anderer Fully Qualified Domain Name als der Hostname fuer +# die Message-ID verwendet werden soll: +fqdn = gvv.th-h.de + +# Verzeichnis fuer fertig verarbeitete Mails und Ergebnisse +archivedir = done + +# Temporaeres Verzeichnis +tmpdir = tmp + +# Pfad zu den Templates (kommaseparierte Liste mit Verzeichnissen) +templatedir = /home/gvv/usevote/templates + +# Konvertierungsfunktionen für die Templates +# (kommaseparierte Liste mit Funktions-Modulen) +formats = /home/gvv/usevote/UVformats.pm + +# Dateiname der Steuerungsdatei fuer den Mailversandt +controlfile = tmp/ack.control + +# Dateiname des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0) +domailfile = tmp/domail + +# MTA-Aufruf zum Verschicken der Bestaetigungsmails +# nuetzlich ist die Sendmail-Option -f zum Setzen des Absenders +#mailcmd = sendmail -oi -oem -femail@adresse +mailcmd = /usr/sbin/sendmail -oi -oem -fvote-bounces@gvv.th-h.de + +# Weiteres Kommando, welches nach jeder Mail aufgerufen werden soll (falls smtp=0). +# Sinnvoll ist ein "sleep x", wobei x bei langsamen Systemen hoeher +# gewaehlt werden sollte, um die Belastung gering zu halten. +sleepcmd = sleep 1 + +# Shellbefehl zum Loeschen des Bildschirms +# Unix: i.d.R. "clear" +# Windows: "cls" +# Falls das Betriebssystem bzw. die Shell keinen solchen Befehl zur Verfuegung +# stellt, sollte ein Kommando verwendet werden, welches eine Trennlinie +# oder aehnliches auf dem Bildschirm ausgibt, z.B. mit "echo" +clearcmd = clear + +# Shellbefehl zum seitenweisen Darstellen von Mails auf dem Bildschirm +# Empfohlene Einstellung: "less", da more Probleme mit der Umleitung von +# STDERR in eine Datei Probleme hat. Unter Windows ist "less" nicht +# vorinstallirt, kann man sich aber herunterladen und einfach in das +# Windows-Verzeichnis kopieren (URL siehe README-Datei) +pager = less + +# Datei mit diversen Meldungen und Textfragmenten (Resourcendatei) +messagefile = /home/gvv/usevote/messages.cfg + +# Datei mit Wahlregeln +rulefile = /home/gvv/usevote/usevote.rul + +# Datei mit verdaechtigen Mailadressen +badaddrfile = /home/gvv/usevote/mailpatterns.cfg + +# Datei fuer Fehlermeldungen beim Programmlauf +errorfile = errors.log + +# Lockdatei (Verhinderung von mehrfachen Programmstarts) +lockfile = usevote.lock + +# Einleitungszeile fuer naechste Mail (RegExp) +mailstart = "^From " + +# Trennlinien vor und nach dem Wahlschein +begin_divider = Alles vor dieser Zeile bitte loeschen +end_divider = Alles nach dieser Zeile bitte loeschen + +# Text fuer die Namens-Angabe im Wahlschein. Achtung, muss im +# Wahlschein genauso stehen! +nametext = Dein Realname, falls nicht im FROM-Header: + +# Text fuer Namens-Angabe in Bestaetigungsmails +nametext2 = Waehlername: + +# Text fuer die Adress-Angabe im Wahlschein +addresstext = Waehleradresse: + +# Text für die Angabe der Wahlscheinkennung (siehe Option "personal") +ballotidtext = Wahlscheinkennung: + +# Text fuer Datenschutzklausel (siehe Option "bdsg"), erscheint als Abstimmungspunkt +bdsgtext = Datenschutzklausel - Zustimmung: Ich bin mit der Verarbeitung meiner Daten wie oben beschrieben einverstanden + +# Datei mit Erklaerungstext fuer BDSG-Klausel +bdsgfile = /home/gvv/usevote/bdsgtext.cfg + +# Rechter Rand fuer einige Bildschirmausgaben (Terminalbreite) +rightmargin = 72 + +# Regular Expression fuer Erkennung eines gueltigen Realnamens +name_re = [-a-zA-ZäöüáàâéèêíìîóòôúùûÄÖÜÁÁÂÉÈÊÍÌÎÓÒÔÚÙÛß]{2,} +.*[a-zA-ZäöüáàâéèêíìîóòôúùûÄÖÜÁÁÂÉÈÊÍÌÎÓÒÔÚÙÛß]{2,} + +# RegExp fuer JA-Stimmen (case-insensitive) +# Standardmaessig wird J, JA, FUER und DAFUER erkannt +ja_stimme = (J\s*A|J|(D\s*A\s*)?F\s*U\s*E\s*R) + +# RegExp fuer NEIN-Stimmen (case-insensitive) +# Standardmaessig wird N, NEIN, GEGEN und DAGEGEN erkannt +nein_stimme = (N\s*E\s*I\s*N|N|(D\s*A\s*)?G\s*E\s*G\s*E\s*N) + +# RegExp fuer ENTHALTUNG (case-insensitive) +enth_stimme = (E|E\s*N\s*T\s*H\s*A\s*L\s*T\s*U\s*N\s*G) + +# RegExp fuer ANNULLIERUNG (case-insensitive) +# Achtung, sollte auch in den Templates im Bestaetigungstext angepasst werden +ann_stimme = A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G + +# Template files (these files are in the template directory defined above) +tpl_mailheader = "mailheader" # generally used mail header +tpl_bouncelist = "bouncelist" # used by uvbounce.pl +tpl_result_multi = "result-multi" # used by uvcount.pl -r -m +tpl_result_single = "result-single" # used by uvcount.pl -r -o +tpl_result_prop = "result-proportional" # used by uvcount.pl -r (proportional = 1) +tpl_votes_multi = "votes-multi" # used by uvcount.pl -v (multiple groups) +tpl_votes_single = "votes-single" # used by uvcount.pl -v (single group only) +tpl_voterlist = "voterlist" # used by uvcount.pl -l (2nd CfV) +tpl_ballot = "ballot" # used by uvballot.pl (personal = 0) +tpl_ballot_request = "ballot-request" # used by uvballot.pl (personal = 1) +tpl_ballot_personal = "ballot-personal" # used by uvcfv.pl (personal = 1) +tpl_addr_reg = "address-not-registered" # used by uvvote.pl (personal = 1) +tpl_no_ballotid = "no-ballotid" # used by uvvote.pl (personal = 1) +tpl_wrong_ballotid = "wrong-ballotid" # used by uvvote.pl (personal = 1) +tpl_bdsg_error = "bdsg-error" # used by uvvote.pl (bdsg = 1) +tpl_ack_mail = "ack-mail" # used by uvvote.pl (voteack = 1) +tpl_cancelled = "cancelled" # used by uvvote.pl +tpl_invalid_account = "invalid-account" # used by uvvote.pl +tpl_invalid_name = "invalid-name" # used by uvvote.pl +tpl_multiple_votes = "multiple-votes" # used by uvvote.pl +tpl_no_ballot = "no-ballot" # used by uvvote.pl +tpl_no_votes = "no-votes" # used by uvvote.pl +tpl_rule_violated = "rule-violated" # used by uvvote.pl (c.f. usevote.rul) diff --git a/usevote.rul b/usevote.rul index 4d9a6c6..e8f4501 100644 --- a/usevote.rul +++ b/usevote.rul @@ -30,14 +30,12 @@ # N eine NEIN-Stimme # E eine Enthaltung # S eine JA- oder NEIN-Stimme -# H eine Enthaltung oder JA-Stimme # I eine Enthaltung oder NEIN-Stimme # . egal (Ja, nein oder Enthaltung) # j eine oder mehrere der markierten Gruppen hat JA-Stimme # n "" "" "" "" "" "" "" NEIN-Stimme # e "" "" "" "" "" "" "" Enthaltung # s "" "" "" "" "" "" "" Ja- oder Nein-Stimme -# h "" "" "" "" "" "" "" Enthaltung oder Ja-Stimme # i "" "" "" "" "" "" "" Enthaltung oder Nein-Stimme # # Alles klar? Jede Stimme wird mit den Symbolen verglichen, und wenn alle diff --git a/usevote.tpl.cfg b/usevote.tpl.cfg new file mode 100644 index 0000000..40dcbbe --- /dev/null +++ b/usevote.tpl.cfg @@ -0,0 +1,76 @@ +include /home/gvv/usevote/usevote.global.cfg + +######################################################################## +# Diese Einstellungen muessen fuer jede Abstimmung angepasst werden +######################################################################## + +# Name der Abstimmung +votename = [INSERT_HERE] + +# Abstimmungsgegenstaende (beliebig viele groupX moeglich, +# von 1 an durchzunummerieren) +group1 = [INSERT_HERE] + +# Mailbox, in der die zu verarbeitenden Mails liegen (falls smtp=0) +votefile = votes + +# Bei den folgenden Fragen bedeutet jeweils: +# 0: nein +# 1: ja + +# Persoenliche Wahlscheine generieren und Scheinkennung erzwingen? +personal = 0 + +# Verhaeltniswahl durchfuehren? (z.B. fuer Moderationsnachwahlen) +proportional = 0 + +# Formel fuer die Berechnung des Verhaeltnisses. Kann z.B. +# $yes/$no oder $yes-$no sein, letzteres wird bei Moderationsnachwahlen +# verwendet. Als Variablen sind $yes und $no zulaessig, es kann +# beliebiger Perlcode angegeben werden, dessen Rueckgabewert im +# Result erscheinen soll. Ausserdem wird bei der Auswertung die +# Bedingung aus "condition1" weiter unten in dieser Datei ausgewertet. +prop_formula = $yes/$no + +# Vote-Account (diese Adresse muss unbedingt korrekt sein, wird +# in das Reply-To uebernommen) +voteaccount = [INSERT_HERE]@gvv.th-h.de + +# Absender fuer den From-Header der Bestaetigungsmails +mailfrom = Thomas Hochstein + +# Absender fuer den Envelope (Return-Path) der Bestaetigungsmails +# (bitte einfach nur die Adresse eintragen, ohne Klammern und Zusaetze) +envelopefrom = [INSERT_HERE]@gvv.th-h.de + +# Nur bei persoenlichen Wahlscheinen: Datei mit Anforderungsmails +# requestfile = anforderung + +# Datenschutzklausel generieren und auf deren Existenz pruefen? +# Konfiguration siehe unten (bdsgtext) +bdsg = 1 + +# Reply-To beachten? +# Nicht empfohlen, da jemand fuer andere Personen abstimmen und +# die Bestaetigungen zu sich umlenken koennte. +replyto = 0 + +# Stimmen einzeln bestaetigen? Empfohlen! +voteack = 1 + +# Bcc-Adresse fuer alle Mails (Backup fuer alle Faelle) +# +mailcc = gvv@greenmeadow.szaf.org + +# Bedingungen fuer einen Erfolg der Abstimmung (genau zwei erforderlich). +# Es muss sich jeweils um gueltigen Perl-Code handeln, Rueckgabewert +# wird boolesch ausgewertet (true/false). Als Variablen sind $yes +# und $no zugelassen. Falls oben "proportional = 1" gesetzt wurde, +# wird nur Bedingung 1 ausgewertet und kann z.B. auf "$yes>$no" gesetzt +# werden. +# condition1 = $yes>=2*$no +# condition2 = $yes>=60 +condition1 = $yes>=2*$no +condition2 = $yes>=60 + +mailcmd = /usr/sbin/sendmail -oi -oem -f[INSERT_HERE]@gvv.th-h.de diff --git a/uvballot.pl b/uvballot.pl index 4085a7f..b57bd02 100644 --- a/uvballot.pl +++ b/uvballot.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Wahlscheingenerierung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.07 Wahlscheingenerierung +# (c) 2001-2004 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -31,7 +31,7 @@ use UVtemplate; my %opt_ctl = (); -print STDERR "\n$usevote_version Wahlscheingenerierung - (c) 2001-2005 Marc Langer\n\n"; +print STDERR "\n$usevote_version Wahlscheingenerierung - (c) 2001-2004 Marc Langer\n\n"; # unknown parameters remain in @ARGV (for "help") Getopt::Long::Configure(qw(pass_through bundling)); diff --git a/uvbounce.pl b/uvbounce.pl index 1bf5139..b144c74 100644 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Bounce-Verarbeitung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.07 Bounce-Verarbeitung +# (c) 2001-2004 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -33,7 +33,7 @@ my %opt_ctl = (); my %bounces = (); my $pop3 = 0; -print STDERR "\n$usevote_version Bounce-Verarbeitung - (c) 2001-2005 Marc Langer\n\n"; +print STDERR "\n$usevote_version Bounce-Verarbeitung - (c) 2001-2004 Marc Langer\n\n"; # unknown parameters remain in @ARGV (for "help") Getopt::Long::Configure(qw(pass_through bundling)); diff --git a/uvcfv.pl b/uvcfv.pl index 74174c6..e5a9691 100644 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Personalisierte Wahlscheine -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.07 Personalisierte Wahlscheine +# (c) 2001-2004 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -35,7 +35,7 @@ use UVtemplate; my %opt_ctl = (); -print "\n$usevote_version Personalisierte Wahlscheine - (c) 2001-2005 Marc Langer\n\n"; +print "\n$usevote_version Personalisierte Wahlscheine - (c) 2001-2004 Marc Langer\n\n"; # unknown parameters remain in @ARGV (for "help") Getopt::Long::Configure(qw(pass_through bundling)); diff --git a/uvvote.pl b/uvvote.pl index a86ef43..5dd26ff 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Wahldurchfuehrung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.07 Wahldurchfuehrung +# (c) 2001-2004 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -37,7 +37,7 @@ use UVtemplate; my $clean = 0; my %opt_ctl = (); -print "\n$usevote_version Wahldurchfuehrung - (c) 2001-2005 Marc Langer\n\n"; +print "\n$usevote_version Wahldurchfuehrung - (c) 2001-2004 Marc Langer\n\n"; # unknown parameters remain in @ARGV (for "help") Getopt::Long::Configure(qw(pass_through bundling)); @@ -123,7 +123,7 @@ if ($clean) { my $ext = time; opendir (TMP, $config{tmpdir}); - my @tmpfiles = readdir (DIR); + my @tmpfiles = readdir (TMP); closedir (TMP); opendir (FERTIG, $config{archivedir}); my @fertigfiles = readdir (FERTIG); @@ -216,7 +216,7 @@ sub process_vote { my @header = split(/\n/, $entity->stringify_header); my $head = $entity->head; my $msgid = $head->get('Message-ID'); - chomp($msgid) if ($msgid); + chomp($msgid) if defined($msgid); my @votes = (); # the votes my @set; # interactively changed fields From ef295458755c4633db651b8b34683f01786345dc Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 16 Aug 2010 23:12:25 +0200 Subject: [PATCH 02/80] From upstream: Update copyright. Signed-off-by: Thomas Hochstein --- uvballot.pl | 6 +++--- uvbounce.pl | 6 +++--- uvcfv.pl | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/uvballot.pl b/uvballot.pl index b57bd02..4085a7f 100644 --- a/uvballot.pl +++ b/uvballot.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.07 Wahlscheingenerierung -# (c) 2001-2004 Marc Langer +# UseVoteGer 4.09 Wahlscheingenerierung +# (c) 2001-2005 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -31,7 +31,7 @@ use UVtemplate; my %opt_ctl = (); -print STDERR "\n$usevote_version Wahlscheingenerierung - (c) 2001-2004 Marc Langer\n\n"; +print STDERR "\n$usevote_version Wahlscheingenerierung - (c) 2001-2005 Marc Langer\n\n"; # unknown parameters remain in @ARGV (for "help") Getopt::Long::Configure(qw(pass_through bundling)); diff --git a/uvbounce.pl b/uvbounce.pl index b144c74..1bf5139 100644 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.07 Bounce-Verarbeitung -# (c) 2001-2004 Marc Langer +# UseVoteGer 4.09 Bounce-Verarbeitung +# (c) 2001-2005 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -33,7 +33,7 @@ my %opt_ctl = (); my %bounces = (); my $pop3 = 0; -print STDERR "\n$usevote_version Bounce-Verarbeitung - (c) 2001-2004 Marc Langer\n\n"; +print STDERR "\n$usevote_version Bounce-Verarbeitung - (c) 2001-2005 Marc Langer\n\n"; # unknown parameters remain in @ARGV (for "help") Getopt::Long::Configure(qw(pass_through bundling)); diff --git a/uvcfv.pl b/uvcfv.pl index e5a9691..74174c6 100644 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.07 Personalisierte Wahlscheine -# (c) 2001-2004 Marc Langer +# UseVoteGer 4.09 Personalisierte Wahlscheine +# (c) 2001-2005 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -35,7 +35,7 @@ use UVtemplate; my %opt_ctl = (); -print "\n$usevote_version Personalisierte Wahlscheine - (c) 2001-2004 Marc Langer\n\n"; +print "\n$usevote_version Personalisierte Wahlscheine - (c) 2001-2005 Marc Langer\n\n"; # unknown parameters remain in @ARGV (for "help") Getopt::Long::Configure(qw(pass_through bundling)); From b00b7d6de5f3597d5a6644485ee33c410cb24b3a Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 16 Aug 2010 23:14:40 +0200 Subject: [PATCH 03/80] From upstream: missing fixes. * UVrules.pm, usevote.rul: add H, h. * messages.cfg: add COUNT_ERR_GROUPCOUNT. * uvvote.pl: TMP/DIR, $msgid. Signed-off-by: Thomas Hochstein --- UVrules.pm | 36 +++++++++++++++++++++++++----------- messages.cfg | 1 + usevote.rul | 2 ++ uvvote.pl | 10 +++++----- 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/UVrules.pm b/UVrules.pm index 4325867..76e260f 100644 --- a/UVrules.pm +++ b/UVrules.pm @@ -149,10 +149,10 @@ sub read_rulefile { die $errortext . ": $_\n\n" if ($errortext); # check for correct characters in conditions - if ($if !~ /^[JjNnEeSsIi\.]+$/) { + if ($if !~ /^[JjNnEeSsHhIi\.]+$/) { die UVmessage::get ("RULES_INVCHARS", (NUM=>$num+1, TYPE=>"if")) . ": $if\n\n"; - } elsif ($then !~ /^[JjNnEeSsIi\.]+$/) { + } elsif ($then !~ /^[JjNnEeSsHhIi\.]+$/) { die UVmessage::get ("RULES_INVCHARS", (NUM=>$num+1, TYPE=>"if")) . ": $then\n\n"; } @@ -194,8 +194,9 @@ sub read_rulefile { sub make_regex_pos { my $pat = $_[0]; - $pat =~ s/[jens]/./g; + $pat =~ s/[hijens]/./g; $pat =~ s/S/[JN]/g; + $pat =~ s/H/[EJ]/g; $pat =~ s/I/[EN]/g; return $pat; @@ -216,22 +217,19 @@ sub make_regex_neg { # upper case characters are replaced with dots # (are covered by make_regex_pos) - $pat =~ s/[JENS]/./g; + $pat =~ s/[HIJENS]/./g; # reverse lower case characters $pat =~ s/j/[NE]/g; $pat =~ s/n/[JE]/g; $pat =~ s/e/[JN]/g; $pat =~ s/s/E/g; + $pat =~ s/h/N/g; $pat =~ s/i/J/g; - # to be translated: - # Falls keine Kleinbuchstaben vorkamen (es sind nur Punkte uebrig): - # Wenn keine optionalen Forderungen vorhanden sind, wuerde der Regex - # immer matchen und somit die Stimme immer als nicht passend erkannt - # werden. Deswegen wird versucht auf den leeren String zu ueberpruefen, - # was durch die Negation dazu fuehrt, dass die Stimme als passend - # gewertet wird. + # If the string contained only upper case characters they are now all + # replaced with dots and the RegEx would match everything, i.e. declare + # every vote as invalid. In this case an empty pattern is returned. $pat =~ s/^\.+$//; return $pat; @@ -305,6 +303,10 @@ sub rule_print { $fill = " $and "; $text1 = UVmessage::get ("RULES_IFCLAUSE", (VOTE=>"$yes $or $no", GROUP=>$groups[$i])); + } elsif ($rule[$i] eq 'H') { + $fill = " $and "; + $text1 = UVmessage::get ("RULES_IFCLAUSE", + (VOTE=>"$abst $or $yes", GROUP=>$groups[$i])); } elsif ($rule[$i] eq 'I') { $fill = " $and "; $text1 = UVmessage::get ("RULES_IFCLAUSE", @@ -322,6 +324,10 @@ sub rule_print { $fill = " $or "; $text1 = UVmessage::get ("RULES_IFCLAUSE", (VOTE=>"$yes $or $no", GROUP=>$groups[$i])); + } elsif ($rule[$i] eq 'h') { + $fill = " $or "; + $text1 = UVmessage::get ("RULES_IFCLAUSE", + (VOTE=>"$abst $or $yes", GROUP=>$groups[$i])); } elsif ($rule[$i] eq 'i') { $fill = " $or "; $text1 = UVmessage::get ("RULES_IFCLAUSE", @@ -357,6 +363,10 @@ sub rule_print { $fill = " $and "; $text1 = UVmessage::get ("RULES_THENCLAUSE", (VOTE=>"$yes $or $no", GROUP=>$groups[$i])); + } elsif ($rule[$i] eq 'H') { + $fill = " $and "; + $text1 = UVmessage::get ("RULES_THENCLAUSE", + (VOTE=>"$abst $or $yes", GROUP=>$groups[$i])); } elsif ($rule[$i] eq 'I') { $fill = " $and "; $text1 = UVmessage::get ("RULES_THENCLAUSE", @@ -374,6 +384,10 @@ sub rule_print { $fill = " $or "; $text1 = UVmessage::get ("RULES_THENCLAUSE", (VOTE=>"$yes $or $no", GROUP=>$groups[$i])); + } elsif ($rule[$i] eq 'h') { + $fill = " $or "; + $text1 = UVmessage::get ("RULES_THENCLAUSE", + (VOTE=>"$abst $or $yes", GROUP=>$groups[$i])); } elsif ($rule[$i] eq 'i') { $fill = " $or "; $text1 = UVmessage::get ("RULES_THENCLAUSE", diff --git a/messages.cfg b/messages.cfg index 1ea665e..6b1dd5d 100644 --- a/messages.cfg +++ b/messages.cfg @@ -154,6 +154,7 @@ CFV_SUBJECT = Wahlschein # COUNT_ERR_OPEN = Kann Ergebnisdatei ${FILE} nicht oeffnen! COUNT_ERR_RESULT = Fehler in ${FILE} Zeile ${LINE} +COUNT_ERR_GROUPCOUNT = Bei Stimme von <${ADDR}>: ${NUM1} statt ${NUM2} Stimmen gefunden (${RESULTFILE} kontrollieren!) COUNT_DELETED = ${NUM} Stimme(n) geloescht. # # uvvote.pl diff --git a/usevote.rul b/usevote.rul index e8f4501..4d9a6c6 100644 --- a/usevote.rul +++ b/usevote.rul @@ -30,12 +30,14 @@ # N eine NEIN-Stimme # E eine Enthaltung # S eine JA- oder NEIN-Stimme +# H eine Enthaltung oder JA-Stimme # I eine Enthaltung oder NEIN-Stimme # . egal (Ja, nein oder Enthaltung) # j eine oder mehrere der markierten Gruppen hat JA-Stimme # n "" "" "" "" "" "" "" NEIN-Stimme # e "" "" "" "" "" "" "" Enthaltung # s "" "" "" "" "" "" "" Ja- oder Nein-Stimme +# h "" "" "" "" "" "" "" Enthaltung oder Ja-Stimme # i "" "" "" "" "" "" "" Enthaltung oder Nein-Stimme # # Alles klar? Jede Stimme wird mit den Symbolen verglichen, und wenn alle diff --git a/uvvote.pl b/uvvote.pl index 5dd26ff..a86ef43 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.07 Wahldurchfuehrung -# (c) 2001-2004 Marc Langer +# UseVoteGer 4.09 Wahldurchfuehrung +# (c) 2001-2005 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -37,7 +37,7 @@ use UVtemplate; my $clean = 0; my %opt_ctl = (); -print "\n$usevote_version Wahldurchfuehrung - (c) 2001-2004 Marc Langer\n\n"; +print "\n$usevote_version Wahldurchfuehrung - (c) 2001-2005 Marc Langer\n\n"; # unknown parameters remain in @ARGV (for "help") Getopt::Long::Configure(qw(pass_through bundling)); @@ -123,7 +123,7 @@ if ($clean) { my $ext = time; opendir (TMP, $config{tmpdir}); - my @tmpfiles = readdir (TMP); + my @tmpfiles = readdir (DIR); closedir (TMP); opendir (FERTIG, $config{archivedir}); my @fertigfiles = readdir (FERTIG); @@ -216,7 +216,7 @@ sub process_vote { my @header = split(/\n/, $entity->stringify_header); my $head = $entity->head; my $msgid = $head->get('Message-ID'); - chomp($msgid) if defined($msgid); + chomp($msgid) if ($msgid); my @votes = (); # the votes my @set; # interactively changed fields From 9854ee664c0734b5362f6bda515b4ed368b20ee5 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 16 Aug 2010 23:18:35 +0200 Subject: [PATCH 04/80] bdsgtext.cfg: Fix typo. Signed-off-by: Thomas Hochstein --- bdsgtext.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdsgtext.cfg b/bdsgtext.cfg index 28bc3b5..fa1c1e6 100644 --- a/bdsgtext.cfg +++ b/bdsgtext.cfg @@ -3,7 +3,7 @@ # wieder abgeprueft wird. Alle Zeilen, die mit dem Kommentarzeichen # # anfangen, werden ignoriert. # -Zur Verarbeitung des Wahlscheines und inbesondere der Veroeffentlichung +Zur Verarbeitung des Wahlscheines und insbesondere der Veroeffentlichung des Ergebnisses ist deine Zustimmung zur Speicherung, Auswertung und Veroeffentlichung deiner Stimmdaten (Name und E-Mail-Adresse in Verbindung mit dem Stimmverhalten) im Rahmen dieses Verfahrens From 0684acb79be3f707577e90debead4f00f2d2c904 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 16 Aug 2010 23:21:04 +0200 Subject: [PATCH 05/80] tpl/ack-mail: Left align votetaker. Signed-off-by: Thomas Hochstein --- templates/ack-mail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ack-mail b/templates/ack-mail index 150df0b..33f650c 100644 --- a/templates/ack-mail +++ b/templates/ack-mail @@ -5,7 +5,7 @@ pos := value pos | fill-right 2 group-first := value group | first-words 50 group-more := value group | drop-words 50 | create-lines 50 vote := value vote | fill-both 10 -votetaker := value mailfrom | fill-left 65 +votetaker := value mailfrom == TEMPLATE ================================================================= Diese automatische Nachricht wurde dir nach Zaehlung deiner Stimme From f3ce003de7f9b00c22ec87978a07e673aadf080c Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 16 Aug 2010 23:23:01 +0200 Subject: [PATCH 06/80] tpl/ack-mail: Note that ANNULLIERUNG must be used at first vote. Signed-off-by: Thomas Hochstein --- templates/ack-mail | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/ack-mail b/templates/ack-mail index 33f650c..946854b 100644 --- a/templates/ack-mail +++ b/templates/ack-mail @@ -19,6 +19,9 @@ Diese Wahl ist oeffentlich, und die Adressen aller Waehlerinnen und Waehler werden am Ende bekanntgegeben. Wenn du deine Adresse & Stimme loeschen willst, kannst du erneut abstimmen und dabei 'ANNULLIERUNG' anstelle von 'JA' oder 'NEIN' angeben. \[Doppel-N, Doppel-L :-)\] +Bei mehreren Abstimmungspunkten muss 'ANNULLIERUNG' bereits beim +Abstimmungspunkt #1 angegeben werden, damit der erhoffte Erfolg +eintritt. ;) [?personal|Da diese Abstimmung mit personalisierten Wahlscheinen durchgefuehrt wird, sind auch saemtliche Aenderungen nur mit Angabe der folgenden From c1d1eea6c22b7b6c58e1e7e882a4989d04999ae5 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 16 Aug 2010 23:24:17 +0200 Subject: [PATCH 07/80] tpl/ack-mail: Drop information about copy of CfV to be sent. Signed-off-by: Thomas Hochstein --- templates/ack-mail | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/ack-mail b/templates/ack-mail index 946854b..65f83a1 100644 --- a/templates/ack-mail +++ b/templates/ack-mail @@ -42,8 +42,7 @@ Deine Stimmabgabe wurde wie folgt erkannt: [@group-more| [$line]\n]|\n] -Danke fuer deine Stimmabgabe. Eine Kopie des CfV kannst du von mir er- -halten (bitte Namen der Abstimmung angeben, falls mehrere laufen). +Danke fuer deine Stimmabgabe. [$votetaker] \[mit [$usevote_version]\] From 45110d89e2d53af7dcfa3479960652d91ceace28 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 16 Aug 2010 23:31:09 +0200 Subject: [PATCH 08/80] tpl/ack-mail: Add directions for replying to vote address. Signed-off-by: Thomas Hochstein --- templates/ack-mail | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/templates/ack-mail b/templates/ack-mail index 65f83a1..9b76f7f 100644 --- a/templates/ack-mail +++ b/templates/ack-mail @@ -6,14 +6,21 @@ group-first := value group | first-words 50 group-more := value group | drop-words 50 | create-lines 50 vote := value vote | fill-both 10 votetaker := value mailfrom +voteaccount-line := value voteaccount | fill-both 70 == TEMPLATE ================================================================= Diese automatische Nachricht wurde dir nach Zaehlung deiner Stimme zugesandt. Wenn alles stimmt, gibt es keinen Anlass fuer eine Reaktion. + Wenn deine Stimme falsch registriert wurde, stimme bitte erneut ab, indem du diese Mail komplett zitierst und die falschen Wertungen korrigierst (zwischen die eckigen Klammern schreiben). Dabei darf keinesfalls die laufende Nummer am Zeilenanfang entfernt werden. +Beachte bitte, dass Du Deine Stimme an die Abstimmadresse senden +musst! Es genuegt daher nicht, einfach auf diese E-Mail zu antworten, +vielmehr muss die Antwort an die Adresse +[$voteaccount-line] +gerichtet sein. Diese Wahl ist oeffentlich, und die Adressen aller Waehlerinnen und Waehler werden am Ende bekanntgegeben. Wenn du deine Adresse & Stimme @@ -32,8 +39,8 @@ Wahlscheinkennung gueltig! [$name-line] (Real-Namen sind fuer diese Abstimmung vorgeschrieben. Wenn hier nicht Dein wirklicher Name steht, dann korrigiere die Zeile - bitte und sende die Nachricht zurueck; sonst kann die Stimme - spaeter als ungueltig gewertet werden.) + bitte und sende die Nachricht erneut an die Abstimmadresse; + sonst kann die Stimme spaeter als ungueltig gewertet werden.) Deine Stimmabgabe wurde wie folgt erkannt: From ccfa1226518d95ed308974f6739b0f7233557327 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Tue, 17 Aug 2010 07:37:21 +0200 Subject: [PATCH 09/80] Fix: Harmonize DIR/TMP in uvvote.pl. There was a bug introduced in 4.0.9 by changing TMP to DIR just in one place. Signed-off-by: Thomas Hochstein --- uvvote.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uvvote.pl b/uvvote.pl index a86ef43..72a366e 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -122,9 +122,9 @@ if ($clean) { # normally unixtime is sufficient, if it is not unique append our PID my $ext = time; - opendir (TMP, $config{tmpdir}); + opendir (DIR, $config{tmpdir}); my @tmpfiles = readdir (DIR); - closedir (TMP); + closedir (DIR); opendir (FERTIG, $config{archivedir}); my @fertigfiles = readdir (FERTIG); closedir (FERTIG); From 6d43059e4a398dade12fd2e5d74482b24b2a485a Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Tue, 17 Aug 2010 07:42:52 +0200 Subject: [PATCH 10/80] From upstream: Change tpl/result-single. Signed-off-by: Thomas Hochstein --- templates/result-single | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/result-single b/templates/result-single index 355aa4a..1be10d2 100644 --- a/templates/result-single +++ b/templates/result-single @@ -14,8 +14,8 @@ Es gab [$yes] Ja-Stimmen und [$no] Nein-Stimmen[?numabstain| bei [$numabstain] E [?numinvalid|[$numinvalid] Stimme(n) wurden als ungueltig gewertet.] Es wurde [?cond1|die|keine] 2/3-Mehrheit erreicht und es gingen [?cond2|mehr|weniger] als -60 Ja-Stimmen ein. Damit ist die [$votename-first] -[@votename-more|[$line]|\n] [?cond1|[?cond2|angenommen|abgelehnt]|abgelehnt]. +60 Ja-Stimmen ein. Damit ist die [$votename-text-first] +[@votename-text-more|[$line] |\n][?cond1|[?cond2|angenommen|abgelehnt]|abgelehnt]. Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner Veroeffentlichung Einspruch erhoben werden. Der Einspruch ist per From a0d69f7532cb2141f84a0ffeccc896fe999f5622 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 21 Aug 2010 22:54:44 +0200 Subject: [PATCH 11/80] From upstream: Change tpl/result-multi. Add newline after multi-line topic. Signed-off-by: Thomas Hochstein --- templates/result-multi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/result-multi b/templates/result-multi index 9a065ac..2ece04e 100644 --- a/templates/result-multi +++ b/templates/result-multi @@ -17,7 +17,7 @@ Es wurden [$numvalid] gueltige Stimmen abgegeben. Ja Nein : 2/3? >=60? : ang.? : Gruppe ---- ---- : ---- ----- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [?cond2| Ja |Nein] : [?result| Ja |Nein] : [$group-first] -[@group-more| : : : [$line]|\n]\n] +[@group-more| : : : [$line]\n]\n] [?numabstain|[$numabstain-formatted] Enthaltungen] [?numinvalid|[$numinvalid] ungueltige Stimme(n)] From b0edfe72ddcbf74c952bb04b494524e1c9820bd7 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 21 Nov 2010 23:06:22 +0100 Subject: [PATCH 12/80] Pre-release of upstream version 4.10. Signed-off-by: Thomas Hochstein --- CHANGES | 14 +++++++++++++- bdsgtext.cfg | 2 +- uvvote.pl | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 2d0d6d2..306cd4e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,9 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.09, released 07.10.2007) +UseVoteGer Versionshistorie (aktuelle Version: 4.10, released ) ========================================================================= TODO: +- Fehler in Annullierungsbearbeitung (wird nur bei erstem oder letztem + Abstimmungspunkt ausgewertet) - aussortieren von Bounces aus Stimmenliste - Unterstuetzung von Maildir - [Zugschlus] ich fänd es klasse, wenn man eine Kopie des Wahlscheines ins @@ -10,6 +12,16 @@ oder wdiff zwischen Sollwahlschein und wirklich eingreichtem Wahlschein macht. Auf diese Weise erwischt man auch kleine Änderungen am Datenschutzhinweis (da bin ich eben in eine Falle von th-h getappt). +Version 4.10: +- Fehler in uvvote.pl, Zeile 126 behoben (Verarbeitung von temporaeren + Dateien - es wurde nicht korrekt auf vorhandene Temp-Dateien + geprueft) +- Typo in bdsgtext.cfg behoben +- templates/ack-mail: Votetaker (Unterschrift) linksbuendig statt + wie vorher rechtsbuendig einfuegen; Anleitung fuer Annullierungen + verbessert; Hinweis darauf, dass Stimmaenderungen an den + Voteaccount geschickt werden muessen und nicht einfach als Antwort + auf die Ack-Mail geschickt werden koennen) Version 4.09 (14.09.2007): - "votefile"-Option in usevote.cfg an passendere Stelle verschoben und diff --git a/bdsgtext.cfg b/bdsgtext.cfg index 28bc3b5..fa1c1e6 100644 --- a/bdsgtext.cfg +++ b/bdsgtext.cfg @@ -3,7 +3,7 @@ # wieder abgeprueft wird. Alle Zeilen, die mit dem Kommentarzeichen # # anfangen, werden ignoriert. # -Zur Verarbeitung des Wahlscheines und inbesondere der Veroeffentlichung +Zur Verarbeitung des Wahlscheines und insbesondere der Veroeffentlichung des Ergebnisses ist deine Zustimmung zur Speicherung, Auswertung und Veroeffentlichung deiner Stimmdaten (Name und E-Mail-Adresse in Verbindung mit dem Stimmverhalten) im Rahmen dieses Verfahrens diff --git a/uvvote.pl b/uvvote.pl index a86ef43..ff8f1b9 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -123,7 +123,7 @@ if ($clean) { my $ext = time; opendir (TMP, $config{tmpdir}); - my @tmpfiles = readdir (DIR); + my @tmpfiles = readdir (TMP); closedir (TMP); opendir (FERTIG, $config{archivedir}); my @fertigfiles = readdir (FERTIG); From b1f71b6a18e677515cefb718db6499f9e7ace44f Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Fri, 16 Sep 2011 22:31:31 +0200 Subject: [PATCH 13/80] Change placeholders in usevote.tpl.cfg Signed-off-by: Thomas Hochstein --- usevote.tpl.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usevote.tpl.cfg b/usevote.tpl.cfg index 40dcbbe..509b22b 100644 --- a/usevote.tpl.cfg +++ b/usevote.tpl.cfg @@ -5,11 +5,11 @@ include /home/gvv/usevote/usevote.global.cfg ######################################################################## # Name der Abstimmung -votename = [INSERT_HERE] +votename = INSERT_HERE # Abstimmungsgegenstaende (beliebig viele groupX moeglich, # von 1 an durchzunummerieren) -group1 = [INSERT_HERE] +group1 = INSERT_HERE # Mailbox, in der die zu verarbeitenden Mails liegen (falls smtp=0) votefile = votes @@ -34,14 +34,14 @@ prop_formula = $yes/$no # Vote-Account (diese Adresse muss unbedingt korrekt sein, wird # in das Reply-To uebernommen) -voteaccount = [INSERT_HERE]@gvv.th-h.de +voteaccount = LOCALPART@gvv.th-h.de # Absender fuer den From-Header der Bestaetigungsmails mailfrom = Thomas Hochstein # Absender fuer den Envelope (Return-Path) der Bestaetigungsmails # (bitte einfach nur die Adresse eintragen, ohne Klammern und Zusaetze) -envelopefrom = [INSERT_HERE]@gvv.th-h.de +envelopefrom = LOCALPART@gvv.th-h.de # Nur bei persoenlichen Wahlscheinen: Datei mit Anforderungsmails # requestfile = anforderung @@ -73,4 +73,4 @@ mailcc = gvv@greenmeadow.szaf.org condition1 = $yes>=2*$no condition2 = $yes>=60 -mailcmd = /usr/sbin/sendmail -oi -oem -f[INSERT_HERE]@gvv.th-h.de +mailcmd = /usr/sbin/sendmail -oi -oem -fLOCALPART@gvv.th-h.de From a908bf98dcea8e943f52a023b11e0ae555b1545f Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Fri, 16 Sep 2011 22:34:06 +0200 Subject: [PATCH 14/80] Add missing options to usevote.tpl.cfg Signed-off-by: Thomas Hochstein --- usevote.tpl.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/usevote.tpl.cfg b/usevote.tpl.cfg index 509b22b..bcba8f7 100644 --- a/usevote.tpl.cfg +++ b/usevote.tpl.cfg @@ -62,6 +62,15 @@ voteack = 1 # mailcc = gvv@greenmeadow.szaf.org +# Alles in einem Schritt durchfuehren (gesonderter Aufruf von +# "uvvote.pl clean" entfaellt)? Fuehrt zu geringeren +# Eingreifmoeglichkeiten! (Mails werden automatisch verschickt) +onestep = 0 + +# Fuer das Ergebnis (xx Ja-Stimmen, xx Nein-Stimmen, xx Enthaltungen) +# auch bei Eingruppenabstimmung des Mehrgruppenformat waehlen? +multigroup = 1 + # Bedingungen fuer einen Erfolg der Abstimmung (genau zwei erforderlich). # Es muss sich jeweils um gueltigen Perl-Code handeln, Rueckgabewert # wird boolesch ausgewertet (true/false). Als Variablen sind $yes From a0c008eed7b203f4945d11d99469dcb8a6dbc4cf Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 12 Nov 2011 16:48:26 +0100 Subject: [PATCH 15/80] Fix envelope adresses in config template. Signed-off-by: Thomas Hochstein --- usevote.tpl.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usevote.tpl.cfg b/usevote.tpl.cfg index bcba8f7..ff94c3f 100644 --- a/usevote.tpl.cfg +++ b/usevote.tpl.cfg @@ -41,7 +41,7 @@ mailfrom = Thomas Hochstein # Absender fuer den Envelope (Return-Path) der Bestaetigungsmails # (bitte einfach nur die Adresse eintragen, ohne Klammern und Zusaetze) -envelopefrom = LOCALPART@gvv.th-h.de +envelopefrom = bounce-LOCALPART@gvv.th-h.de # Nur bei persoenlichen Wahlscheinen: Datei mit Anforderungsmails # requestfile = anforderung @@ -82,4 +82,4 @@ multigroup = 1 condition1 = $yes>=2*$no condition2 = $yes>=60 -mailcmd = /usr/sbin/sendmail -oi -oem -fLOCALPART@gvv.th-h.de +mailcmd = /usr/sbin/sendmail -oi -oem -fbounce-LOCALPART@gvv.th-h.de From 69291ddcaae6fe05baeabb7806495dbc241ae409 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 12 Nov 2011 16:49:11 +0100 Subject: [PATCH 16/80] Add executive bits to scripts. Signed-off-by: Thomas Hochstein --- uvballot.pl | 0 uvbounce.pl | 0 uvcfv.pl | 0 uvcount.pl | 0 uvvote.pl | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 uvballot.pl mode change 100644 => 100755 uvbounce.pl mode change 100644 => 100755 uvcfv.pl mode change 100644 => 100755 uvcount.pl mode change 100644 => 100755 uvvote.pl diff --git a/uvballot.pl b/uvballot.pl old mode 100644 new mode 100755 diff --git a/uvbounce.pl b/uvbounce.pl old mode 100644 new mode 100755 diff --git a/uvcfv.pl b/uvcfv.pl old mode 100644 new mode 100755 diff --git a/uvcount.pl b/uvcount.pl old mode 100644 new mode 100755 diff --git a/uvvote.pl b/uvvote.pl old mode 100644 new mode 100755 From 101511c2558683515de68ca970a3ecf271ad05a2 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 12 Nov 2011 16:51:13 +0100 Subject: [PATCH 17/80] Move from gvv.th-h.de to thh.votetaker.de Signed-off-by: Thomas Hochstein --- usevote.global.cfg | 4 ++-- usevote.tpl.cfg | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/usevote.global.cfg b/usevote.global.cfg index 210d21b..beb859f 100644 --- a/usevote.global.cfg +++ b/usevote.global.cfg @@ -31,7 +31,7 @@ smtpport = 25 # Falls ein anderer Fully Qualified Domain Name als der Hostname fuer # die Message-ID verwendet werden soll: -fqdn = gvv.th-h.de +fqdn = mid.thh.votetaker.de # Verzeichnis fuer fertig verarbeitete Mails und Ergebnisse archivedir = done @@ -55,7 +55,7 @@ domailfile = tmp/domail # MTA-Aufruf zum Verschicken der Bestaetigungsmails # nuetzlich ist die Sendmail-Option -f zum Setzen des Absenders #mailcmd = sendmail -oi -oem -femail@adresse -mailcmd = /usr/sbin/sendmail -oi -oem -fvote-bounces@gvv.th-h.de +mailcmd = /usr/sbin/sendmail -oi -oem -fvote-bounces@thh.votetaker.de # Weiteres Kommando, welches nach jeder Mail aufgerufen werden soll (falls smtp=0). # Sinnvoll ist ein "sleep x", wobei x bei langsamen Systemen hoeher diff --git a/usevote.tpl.cfg b/usevote.tpl.cfg index ff94c3f..28b1137 100644 --- a/usevote.tpl.cfg +++ b/usevote.tpl.cfg @@ -34,14 +34,14 @@ prop_formula = $yes/$no # Vote-Account (diese Adresse muss unbedingt korrekt sein, wird # in das Reply-To uebernommen) -voteaccount = LOCALPART@gvv.th-h.de +voteaccount = LOCALPART@thh.votetaker.de # Absender fuer den From-Header der Bestaetigungsmails -mailfrom = Thomas Hochstein +mailfrom = Thomas Hochstein # Absender fuer den Envelope (Return-Path) der Bestaetigungsmails # (bitte einfach nur die Adresse eintragen, ohne Klammern und Zusaetze) -envelopefrom = bounce-LOCALPART@gvv.th-h.de +envelopefrom = bounce-LOCALPART@thh.votetaker.de # Nur bei persoenlichen Wahlscheinen: Datei mit Anforderungsmails # requestfile = anforderung @@ -82,4 +82,4 @@ multigroup = 1 condition1 = $yes>=2*$no condition2 = $yes>=60 -mailcmd = /usr/sbin/sendmail -oi -oem -fbounce-LOCALPART@gvv.th-h.de +mailcmd = /usr/sbin/sendmail -oi -oem -fbounce-LOCALPART@thh.votetaker.de From b4bfab9c0d2926a7a3102b9143742d4af29c92c2 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 14 Nov 2011 00:18:37 +0100 Subject: [PATCH 18/80] Add whitespace to result templates. Paragraphs should be separated by an empty line. Signed-off-by: Thomas Hochstein --- templates/result-multi | 1 + templates/result-proportional | 1 + templates/result-single | 1 + 3 files changed, 3 insertions(+) diff --git a/templates/result-multi b/templates/result-multi index 2ece04e..c6f182f 100644 --- a/templates/result-multi +++ b/templates/result-multi @@ -25,6 +25,7 @@ Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner Veroeffentlichung Einspruch erhoben werden. Der Einspruch ist per E-Mail bei der Moderation von de.admin.news.announce (Adressen siehe Signatur) einzulegen. + Wenn es keine ernsthaften Einsprueche gibt oder diese abgelehnt werden, wird die Moderation von de.admin.news.announce das Ergebnis danach umsetzen. diff --git a/templates/result-proportional b/templates/result-proportional index 53685d1..371cfd2 100644 --- a/templates/result-proportional +++ b/templates/result-proportional @@ -24,6 +24,7 @@ Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner Veroeffentlichung Einspruch erhoben werden. Der Einspruch ist per E-Mail bei der Moderation von de.admin.news.announce (Adressen siehe Signatur) einzulegen. + Wenn es keine ernsthaften Einsprueche gibt oder diese abgelehnt werden, wird die Moderation von de.admin.news.announce das Ergebnis danach umsetzen. diff --git a/templates/result-single b/templates/result-single index 1be10d2..09a7ed3 100644 --- a/templates/result-single +++ b/templates/result-single @@ -21,6 +21,7 @@ Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner Veroeffentlichung Einspruch erhoben werden. Der Einspruch ist per E-Mail bei der Moderation von de.admin.news.announce (Adressen siehe Signatur) einzulegen. + Wenn es keine ernsthaften Einsprueche gibt oder diese abgelehnt werden, wird die Moderation von de.admin.news.announce das Ergebnis danach umsetzen. From 691f83483293c2e115b6f16790482fd2323f0968 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 9 Jan 2012 02:52:50 +0100 Subject: [PATCH 19/80] Fix duplicate use of VOTE_NO_VOTES. VOTE_NO_VOTES is defined (and used) twice in messages.cfg and uvvote.pl - once for "no mails to process" ("Keine Stimmen zu verarbeiten") and once for "you didn't vote in your ballot" ("Keine Stimmen abgegeben"). Change the first use to VOTE_NO_VOTEMAILS. Signed-off-by: Thomas Hochstein --- messages.cfg | 2 +- uvvote.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/messages.cfg b/messages.cfg index 6b1dd5d..8dca33c 100644 --- a/messages.cfg +++ b/messages.cfg @@ -162,7 +162,7 @@ COUNT_DELETED = ${NUM} Stimme(n) geloescht. VOTE_RENAMING_MAILBOX = Benenne Stimmdatei um... VOTE_WRITE_RESULTS = Ergebnisdatei ${FILE} nicht schreibbar! VOTE_CLOSE_RESULTS = Ergebnisdatei ${FILE} konnte nicht erfolgreich geschlossen werden! -VOTE_NO_VOTES = Keine Stimmen zu verarbeiten. +VOTE_NO_VOTEMAILS = Keine Stimmen zu verarbeiten. VOTE_NUM_VOTES = ${COUNT} Stimmen bearbeitet. VOTE_NOT_SAVED = ${COUNT} Stimmen bearbeitet, aber nicht gespeichert. VOTE_FIRSTRUN = 'uvvote clean' aufrufen, um Ergebnisse zu speichern und Bestaetigungen zu verschicken. diff --git a/uvvote.pl b/uvvote.pl index 72a366e..c859504 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -158,7 +158,7 @@ if ($clean) { # no mails: exit here unless ($count) { - print UVmessage::get("VOTE_NO_VOTES") . "\n\n"; + print UVmessage::get("VOTE_NO_VOTEMAILS") . "\n\n"; exit 0; } From fb9d3eb07180d6038cf132bac5e1f19f46b7f938 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 21 Jan 2012 09:21:33 +0100 Subject: [PATCH 20/80] Complete move to thh.votetaker.de Fix mailcc in usevote.tpl.cfg Signed-off-by: Thomas Hochstein --- usevote.tpl.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usevote.tpl.cfg b/usevote.tpl.cfg index 28b1137..ae5fac8 100644 --- a/usevote.tpl.cfg +++ b/usevote.tpl.cfg @@ -60,7 +60,7 @@ voteack = 1 # Bcc-Adresse fuer alle Mails (Backup fuer alle Faelle) # -mailcc = gvv@greenmeadow.szaf.org +mailcc = gvv@localhost # Alles in einem Schritt durchfuehren (gesonderter Aufruf von # "uvvote.pl clean" entfaellt)? Fuehrt zu geringeren From 8ab6f4b0dfeb0eeb4be5a37904a5e5f7cec2cade Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 21 Jan 2012 09:41:30 +0100 Subject: [PATCH 21/80] Change quorum: 50 "JA" votes are now enough. See . Signed-off-by: Thomas Hochstein --- usevote.cfg | 2 +- usevote.tpl.cfg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usevote.cfg b/usevote.cfg index cf801f5..73ca4fb 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -75,7 +75,7 @@ multigroup = 1 # wird nur Bedingung 1 ausgewertet und kann z.B. auf "$yes>$no" gesetzt # werden. condition1 = $yes>=2*$no -condition2 = $yes>=60 +condition2 = $yes>=50 # Ergebnisdatei, in der alle Einzelergebniss zusammengeschrieben werden # (wird bei jedem Programmlauf neu erstellt!) diff --git a/usevote.tpl.cfg b/usevote.tpl.cfg index ae5fac8..0805776 100644 --- a/usevote.tpl.cfg +++ b/usevote.tpl.cfg @@ -78,8 +78,8 @@ multigroup = 1 # wird nur Bedingung 1 ausgewertet und kann z.B. auf "$yes>$no" gesetzt # werden. # condition1 = $yes>=2*$no -# condition2 = $yes>=60 +# condition2 = $yes>=50 condition1 = $yes>=2*$no -condition2 = $yes>=60 +condition2 = $yes>=50 mailcmd = /usr/sbin/sendmail -oi -oem -fbounce-LOCALPART@thh.votetaker.de From b9f5201405ce5145f258c7e909397f4cf1f3bd23 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 9 Jan 2012 02:39:57 +0100 Subject: [PATCH 22/80] Check correct voting in ballot. It's possible that ballots get mixed up when a voter is participating in more than one voting and sending the ballots manually (by copying and pasting them into his mail client). UseVote could - and should! - check that the ballot belongs to the current voting by comparing the ballot introduction ("WAHLSCHEIN fuer ...") with the votename and throw an error if they don't match. * Add ballotintro (default: WAHLSCHEIN fuer) and tpl_wrong_voting (default: wrong-voting) to usevote.cfg * Add messages to messages.cfg * Modify ballot and ballot-personal templates accordingly * Add check to uvvote.pl * Add error handling to UVmenu.pm * Change UVmenu::menu call in uvcfv.pl due to new parameter ($voting) Signed-off-by: Thomas Hochstein --- UVmenu.pm | 22 ++++++++++++++++++++-- messages.cfg | 6 ++++++ templates/ballot | 2 +- templates/ballot-personal | 2 +- usevote.cfg | 5 +++++ usevote.global.cfg | 5 +++++ uvcfv.pl | 4 ++-- uvvote.pl | 17 ++++++++++++++++- 8 files changed, 56 insertions(+), 7 deletions(-) diff --git a/UVmenu.pm b/UVmenu.pm index d90da9c..cd523e8 100644 --- a/UVmenu.pm +++ b/UVmenu.pm @@ -17,7 +17,8 @@ $VERSION = "0.4"; ############################################################################## # Menu for interaction with the votetaker # # Parameters: votes list and header (references to arrays) # -# Body, Mailadress, Name, Ballot ID (references to strings) # +# Body, Mailadress, Name, Ballot ID, # +# Voting (references to strings) # # List of newly set fields (reference to array) # # List of errors to correct (Array-Ref) # # Return Values: 'w': proceed # @@ -25,7 +26,7 @@ $VERSION = "0.4"; ############################################################################## sub menu { - my ($votes, $header, $body, $addr, $name, $ballot_id, $set, $errors) = @_; + my ($votes, $header, $body, $addr, $name, $ballot_id, $voting, $set, $errors) = @_; my $input = ""; my $voter_addr = $$addr || ''; my $voter_name = $$name || ''; @@ -79,6 +80,7 @@ sub menu { print "(5) ", UVmessage::get("MENU_BALLOT_ID"), " [$$ballot_id]\n" if ($config{personal}); print "(6) ", UVmessage::get("MENU_BDSG"), "\n" if ($config{bdsg}); + print "(7) ", UVmessage::get("MENU_VOTING"), " [", $$voting, "]\n"; } print "\n", @@ -269,6 +271,22 @@ sub menu { $errors{InvalidBDSG} = UVmessage::get("MENU_INVALIDBDSG"); } + } elsif ($input eq '7') { + my $sel; + do { + print "[a] ", UVmessage::get("MENU_VOTING_CORRECT"), "\n", + "[b] ", UVmessage::get("MENU_VOTING_WRONG"), "\n\n", + UVmessage::get("MENU_PROMPT"); + $sel = ; + } until ($sel =~ /^[ab]$/i); + + if ($sel =~ /^a$/i) { + delete $errors{NoVoting}; + delete $errors{WrongVoting}; + } else { + $errors{WrongVoting} = UVmessage::get("MENU_WRONGVOTING"); + } + } elsif ($input =~ /^i$/i) { my $ignore = UVmessage::get("MENU_IGNORE_STRING"); # Set columns for Text::Wrap diff --git a/messages.cfg b/messages.cfg index 8dca33c..6c9b339 100644 --- a/messages.cfg +++ b/messages.cfg @@ -29,6 +29,8 @@ MENU_INVALIDBDSG = Datenschutzhinweis fehlerhaft oder nicht bestaetigt. MENU_DUPLICATEVOTE = Doppelte Stimmabgabe gefunden. MENU_NOVOTE = Keine Stimmabgabe gefunden. MENU_INVALIDVOTE = Ungueltige Stimmabgabe. +MENU_NOVOTING = Bezeichnung der Abstimmung nicht gefunden. +MENU_WRONGVOTING = Wahlschein fuer andere Abstimmung. MENU_NOBALLOTID = Keine Scheinkennung gefunden. MENU_WRONGBALLOTID = Scheinkennung falsch. MENU_ADDRESSNOTREGISTERED = Adresse nicht registriert. @@ -67,6 +69,9 @@ MENU_BALLOT_ID = Scheinkennung MENU_BDSG = Datenschutzklausel MENU_BDSG_ACCEPTED = Datenschutzklausel wurde akzeptiert MENU_BDSG_DECLINED = Datenschutzklausel nicht akzeptiert bzw. Text veraendert +MENU_VOTING = Abstimmung +MENU_VOTING_CORRECT = Korrekter Wahlschein fuer diese Abstimmung +MENU_VOTING_WRONG = Wahlschein fuer andere Abstimmung MENU_IGNORE = Diese Stimme ignorieren (ohne Benachrichtigung verwerfen) MENU_IGNORE_WARNING = Die Stimme wird nicht aufgezeichnet, und es wird keine Bestaetigung verschickt. ${MENU_IGNORE_STRING} eingeben, wenn Du sicher bist: MENU_IGNORE_STRING = JA @@ -173,6 +178,7 @@ VOTE_UNREGISTERED_ADDRESS = Adresse nicht registriert VOTE_INVALID_VOTE = Ungueltige Stimmabgabe VOTE_VIOLATED_RULE = Regel ${RULE} verletzt VOTE_NO_VOTES = Keine Stimmen abgegeben +VOTE_WRONG_VOTING = Wahlschein gehoert nicht zu dieser Abstimmung VOTE_INVALID_ACCOUNT = Ungueltiger Account VOTE_INVALID_ADDRESS = Ungueltige Adresse VOTE_INVALID_REALNAME = Ungueltiger Realname diff --git a/templates/ballot b/templates/ballot index 5e3242a..30add33 100644 --- a/templates/ballot +++ b/templates/ballot @@ -14,7 +14,7 @@ bdsgtext-more := value bdsgtext | drop-words 50 | create-lines 50 =-=-=-=-=-=-=-=- Alles vor dieser Zeile bitte loeschen =-=-=-=-=-=-=-=- -WAHLSCHEIN fuer [$votename-first] +[$ballotintro] [$votename-first] [@votename-more| [$line]\n] diff --git a/templates/ballot-personal b/templates/ballot-personal index 13aef2a..495baec 100644 --- a/templates/ballot-personal +++ b/templates/ballot-personal @@ -29,7 +29,7 @@ votetaker := value mailfrom | fill-left 65 =-=-=-=-=-=-=-=- Alles vor dieser Zeile bitte loeschen =-=-=-=-=-=-=-=- -WAHLSCHEIN fuer [$votename-first] +[$ballotintro] [$votename-first] [@votename-more| [$line]\n] diff --git a/usevote.cfg b/usevote.cfg index cf801f5..ed464fa 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -227,6 +227,10 @@ mailstart = "^From " begin_divider = Alles vor dieser Zeile bitte loeschen end_divider = Alles nach dieser Zeile bitte loeschen +# Ueberschrift fuer den Wahlschein +# Achtung, muss im Wahlschein genauso stehen! +ballotintro = WAHLSCHEIN fuer + # Text fuer die Namens-Angabe im Wahlschein. Achtung, muss im # Wahlschein genauso stehen! nametext = Dein Realname, falls nicht im FROM-Header: @@ -290,4 +294,5 @@ tpl_invalid_name = "invalid-name" # used by uvvote.pl tpl_multiple_votes = "multiple-votes" # used by uvvote.pl tpl_no_ballot = "no-ballot" # used by uvvote.pl tpl_no_votes = "no-votes" # used by uvvote.pl +tpl_wrong_voting = "wrong-voting" # used by uvvote.pl tpl_rule_violated = "rule-violated" # used by uvvote.pl (c.f. usevote.rul) diff --git a/usevote.global.cfg b/usevote.global.cfg index beb859f..2ba69b4 100644 --- a/usevote.global.cfg +++ b/usevote.global.cfg @@ -99,6 +99,10 @@ mailstart = "^From " begin_divider = Alles vor dieser Zeile bitte loeschen end_divider = Alles nach dieser Zeile bitte loeschen +# Ueberschrift fuer den Wahlschein +# Achtung, muss im Wahlschein genauso stehen! +ballotintro = WAHLSCHEIN fuer + # Text fuer die Namens-Angabe im Wahlschein. Achtung, muss im # Wahlschein genauso stehen! nametext = Dein Realname, falls nicht im FROM-Header: @@ -162,4 +166,5 @@ tpl_invalid_name = "invalid-name" # used by uvvote.pl tpl_multiple_votes = "multiple-votes" # used by uvvote.pl tpl_no_ballot = "no-ballot" # used by uvvote.pl tpl_no_votes = "no-votes" # used by uvvote.pl +tpl_wrong_voting = "wrong-voting" # used by uvvote.pl tpl_rule_violated = "rule-violated" # used by uvvote.pl (c.f. usevote.rul) diff --git a/uvcfv.pl b/uvcfv.pl index 74174c6..6179915 100755 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -152,9 +152,9 @@ sub process_request { # check for suspicious addresses foreach my $element (@bad_addr) { if ($voter_addr =~ /^$element/) { - my (@votes, @set, $ballot_id); # irrelevant, but necessary for UVmenu::menu() + my (@votes, @set, $ballot_id, $voting); # irrelevant, but necessary for UVmenu::menu() my @errors = ('SuspiciousAccountBallot'); - my $res = UVmenu::menu(\@votes, \@header, $body, \$voter_addr, \$voter_name, \$ballot_id, \@set, \@errors); + my $res = UVmenu::menu(\@votes, \@header, $body, \$voter_addr, \$voter_name, \$ballot_id, \$voting, \@set, \@errors); # "Ignore": don't deliver a ballot return 0 if ($res eq 'i'); diff --git a/uvvote.pl b/uvvote.pl index c859504..836903a 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -224,6 +224,7 @@ sub process_vote { my $onevote = 0; # 0=no votes, 1=everything OK, 2=vote cancelled my $voteerror = ""; # error message in case of invalid vote my $ballot_id = ""; # ballot id (German: Wahlscheinkennung) + my $voting = ""; # voting (should be votename) # found address? if ($voter_addr) { @@ -239,6 +240,14 @@ sub process_vote { push (@errors, 'InvalidAddress'); } + # correct voting? + if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*$/m) { + $voting = $1; + push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/); + } else { + push (@errors, 'NoVoting'); + } + # personalized ballots? if ($config{personal}) { if ($$body =~ /$config{ballotidtext}\s+([a-z0-9]+)/) { @@ -343,7 +352,7 @@ sub process_vote { # Errors encountered? if (@errors) { my $res = UVmenu::menu(\@votes, \@header, $body, \$voter_addr, \$voter_name, - \$ballot_id, \@set, \@errors); + \$ballot_id, \$voting, \@set, \@errors); return 0 if ($res eq 'i'); # "Ignore": Ignore vote, don't save my $tpl; @@ -402,6 +411,12 @@ sub process_vote { my $msg = $template->processTemplate($config{tpl_bdsg_error}); UVsendmail::mail($voter_addr, "Fehler", $msg, $msgid) if ($config{voteack}); return 0; + } elsif ($error{NoVoting} or $error{WrongVoting}) { + $voteerror = UVmessage::get("VOTE_WRONG_VOTING"); + my $template = UVtemplate->new(); + $template->setKey('body' => $$body); + my $msg = $template->processTemplate($config{tpl_wrong_voting}); + UVsendmail::mail($voter_addr, "Fehler", $msg, $msgid) if ($config{voteack}); } elsif ($error{NoVote}) { $voteerror = UVmessage::get("VOTE_NO_VOTES"); my $template = UVtemplate->new(); From f908d8a11a6556f28409e60863215c8daf444e60 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 11 Jan 2012 11:03:20 +0100 Subject: [PATCH 23/80] Fix regular expression. Support votenames longer than one line (in fact, support votenames up to two lines long). Signed-off-by: Thomas Hochstein --- uvvote.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uvvote.pl b/uvvote.pl index 836903a..67754d2 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -241,8 +241,9 @@ sub process_vote { } # correct voting? - if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*$/m) { + if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n(.*?[\t ]+(\S+.+)\s*$)?/m) { $voting = $1; + $voting .= " $3" if defined($3); push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/); } else { push (@errors, 'NoVoting'); From 1ca99f7368300731796307f6e4d971ee6dbb2da7 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 21 Jan 2012 09:49:14 +0100 Subject: [PATCH 24/80] Add forgotten template. Signed-off-by: Thomas Hochstein --- templates/wrong-voting | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 templates/wrong-voting diff --git a/templates/wrong-voting b/templates/wrong-voting new file mode 100644 index 0000000..1d12e31 --- /dev/null +++ b/templates/wrong-voting @@ -0,0 +1,21 @@ +votetaker := value mailfrom | fill-left 65 +body := value body | quote "> " + +== TEMPLATE ================================================================= +Offenbar hast du einen Wahlschein fuer eine andere Abstimmung eingesandt +oder der Name der Abstimmung geht aus dem Wahlschein nicht hervor. Wenn +das ein Irrtum war, pruefe bitte noch einmal die im CfV angegebene +Abstimmungsadresse und wiederhole Deine Stimmabgabe. + +Dieser Fehler kann auftreten, wenn Du an mehreren Abstimmungen teilnimmst +und den Wahlschein von Hand einsendest (und dabei mehrere Abstimmungen +verwechselst), oder wenn Du die Bezeichnung der Abstimmung im Wahlschein +veraendert oder geloescht hast. + +Hier die Mail, die ich erhalten habe: + +[$body] + + +[$votetaker] +\[mit [$usevote_version]\] \ No newline at end of file From a374bef4c7e8de63bc43471d5a3d2795173a1070 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 22 Jan 2012 13:46:33 +0100 Subject: [PATCH 25/80] Correctly find $votename. If the ballot is not quoted, the current regular expression will match $nametext (minus its first word) as second line of $votename. Change regular expression to match only certain common quote characters at beginning of second line. (Perhaps it would be even better to stop matching on empty lines ...) Check for erroneus match on $nametext as a safety measure. Signed-off-by: Thomas Hochstein --- uvvote.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uvvote.pl b/uvvote.pl index 67754d2..9505edc 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -241,9 +241,9 @@ sub process_vote { } # correct voting? - if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n(.*?[\t ]+(\S+.+)\s*$)?/m) { + if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n([>:|]*?[\t ]+(\S+.+)\s*$)?/m) { $voting = $1; - $voting .= " $3" if defined($3); + $voting .= " $3" if (defined($3) and $3 !~ /\Q$config{nametext}\E/); push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/); } else { push (@errors, 'NoVoting'); From c6943e68ec027aa5a820bfcf4941d8ad24176887 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 21 Jan 2012 15:41:02 +0100 Subject: [PATCH 26/80] Adapt other result templates to result-multi. Change display of valid votes to whole sentence. Signed-off-by: Thomas Hochstein --- templates/result-proportional | 3 ++- templates/result-single | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/result-proportional b/templates/result-proportional index 371cfd2..fa9db75 100644 --- a/templates/result-proportional +++ b/templates/result-proportional @@ -12,7 +12,8 @@ group-more := value group | drop-words 40 | create-lines 40 Ergebnisse [$votename-first] [@votename-more| [$line]\n] -([$numvalid] gueltige Stimmen) + +Es wurden [$numvalid] gueltige Stimmen abgegeben. Ja Nein : J>=N? Ja/Nein : ang.? : Gruppe ---- ---- : ----- ------- : ----- : --------------------------------------- diff --git a/templates/result-single b/templates/result-single index 09a7ed3..adc05d6 100644 --- a/templates/result-single +++ b/templates/result-single @@ -8,7 +8,8 @@ votename-text-more := value votename | drop-words 30 | create-lines 72 Ergebnisse [$votename-first] [@votename-more| [$line]\n] -([$numvalid] gueltige Stimmen) + +Es wurden [$numvalid] gueltige Stimmen abgegeben. Es gab [$yes] Ja-Stimmen und [$no] Nein-Stimmen[?numabstain| bei [$numabstain] Enthaltungen]. [?numinvalid|[$numinvalid] Stimme(n) wurden als ungueltig gewertet.] From 5b8997543c7ee116bfa95dd58834749e28d3a475 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 21 Jan 2012 15:44:01 +0100 Subject: [PATCH 27/80] Change quorum (60 -> 50 votes) in templates. Templates result-multi and result-single have to be updated, too. Signed-off-by: Thomas Hochstein --- templates/result-multi | 2 +- templates/result-single | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/result-multi b/templates/result-multi index c6f182f..01abd88 100644 --- a/templates/result-multi +++ b/templates/result-multi @@ -14,7 +14,7 @@ Ergebnisse [$votename-first] Es wurden [$numvalid] gueltige Stimmen abgegeben. - Ja Nein : 2/3? >=60? : ang.? : Gruppe + Ja Nein : 2/3? >=50? : ang.? : Gruppe ---- ---- : ---- ----- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [?cond2| Ja |Nein] : [?result| Ja |Nein] : [$group-first] [@group-more| : : : [$line]\n]\n] diff --git a/templates/result-single b/templates/result-single index adc05d6..8345efa 100644 --- a/templates/result-single +++ b/templates/result-single @@ -15,7 +15,7 @@ Es gab [$yes] Ja-Stimmen und [$no] Nein-Stimmen[?numabstain| bei [$numabstain] E [?numinvalid|[$numinvalid] Stimme(n) wurden als ungueltig gewertet.] Es wurde [?cond1|die|keine] 2/3-Mehrheit erreicht und es gingen [?cond2|mehr|weniger] als -60 Ja-Stimmen ein. Damit ist die [$votename-text-first] +50 Ja-Stimmen ein. Damit ist die [$votename-text-first] [@votename-text-more|[$line] |\n][?cond1|[?cond2|angenommen|abgelehnt]|abgelehnt]. Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner From bb61da374349f7d48c2f5e1976afd94fd489f122 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Sep 2012 17:37:34 +0200 Subject: [PATCH 28/80] Release of upstream version 4.10. Signed-off-by: Thomas Hochstein --- CHANGES | 17 ++++++++++++---- README | 7 ++----- UVconfig.pm | 2 +- UVmenu.pm | 38 +++++++++++++++++++++++++++++++++-- mailpatterns.cfg | 2 -- messages.cfg | 8 +++++++- templates/ack-mail | 16 ++++++++++----- templates/ballot | 2 +- templates/ballot-personal | 2 +- templates/result-multi | 6 ++++-- templates/result-proportional | 4 +++- templates/result-single | 6 ++++-- templates/wrong-voting | 21 +++++++++++++++++++ usevote.cfg | 7 ++++++- uvballot.pl | 4 ++-- uvbounce.pl | 4 ++-- uvcfv.pl | 8 ++++---- uvcount.pl | 4 ++-- uvvote.pl | 26 +++++++++++++++++++----- 19 files changed, 141 insertions(+), 43 deletions(-) create mode 100644 templates/wrong-voting diff --git a/CHANGES b/CHANGES index 306cd4e..281a395 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,7 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.10, released ) +UseVoteGer Versionshistorie (aktuelle Version: 4.10, released 17.09.2012) ========================================================================= TODO: -- Fehler in Annullierungsbearbeitung (wird nur bei erstem oder letztem - Abstimmungspunkt ausgewertet) - aussortieren von Bounces aus Stimmenliste - Unterstuetzung von Maildir - [Zugschlus] ich fänd es klasse, wenn man eine Kopie des Wahlscheines ins @@ -12,16 +10,27 @@ oder wdiff zwischen Sollwahlschein und wirklich eingreichtem Wahlschein macht. Auf diese Weise erwischt man auch kleine Änderungen am Datenschutzhinweis (da bin ich eben in eine Falle von th-h getappt). -Version 4.10: +Version 4.10 (17.09.2012): - Fehler in uvvote.pl, Zeile 126 behoben (Verarbeitung von temporaeren Dateien - es wurde nicht korrekt auf vorhandene Temp-Dateien geprueft) - Typo in bdsgtext.cfg behoben +- doppelten Identifier "VOTE_NO_VOTES" in messages.cfg/uvvote.pl umbenannt - templates/ack-mail: Votetaker (Unterschrift) linksbuendig statt wie vorher rechtsbuendig einfuegen; Anleitung fuer Annullierungen verbessert; Hinweis darauf, dass Stimmaenderungen an den Voteaccount geschickt werden muessen und nicht einfach als Antwort auf die Ack-Mail geschickt werden koennen) +- Fehler in Annullierungsbearbeitung behoben (wurde nur bei erstem + oder letztem Abstimmungspunkt ausgewertet) +- Abstimmungsname wird nun auf Korrektheit geprüft (Wahlschein gehört + zur richtigen Abstimmung) +- neue Konfigurations-Option "ballotintro" und neues Template + tpl_wrong_voting +- usenet@ und news@ werden nicht mehr als ungueltige Mailadressen + angesehen. Vor allem usenet@ wird von vielen Waehlern verwendet. +- Aenderung der Wahlregeln: statt 60 nur noch 50 JA-Stimmen benoetigt +- kleinere Template-Aenderungen (verbesserte Texte/Formatierungen) Version 4.09 (14.09.2007): - "votefile"-Option in usevote.cfg an passendere Stelle verschoben und diff --git a/README b/README index e2a7e66..158e3b6 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -UseVoteGer 4.09 (c) 2001-2007 Marc Langer +UseVoteGer 4.10 (c) 2001-2012 Marc Langer UseVoteGer is a voting software for usenet votes. @@ -18,7 +18,7 @@ written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ------------------------------------------------------------------------------- -UseVoteGer 4.09 - Usenet-Abstimmungssoftware +UseVoteGer 4.10 - Usenet-Abstimmungssoftware =========================================== von Marc Langer @@ -89,9 +89,6 @@ I. Einmalig bei der Usevote-Erstinstallation sehr einfach mit "perl -MCPAN -e shell", ActivePerl fuer Windows hat einen eigenen Paketmanager) - Achtung: Bei meinem ActivePerl 5.6.1 war eine alte Libnet-Version - enthalten, die noch keine SMTP-Authentication unterstuetzte. - Bei Benutzung dieses Features muss evtl. erst upgedated werden. II. Fuer jedes Voting (1) usevote.cfg auf das durchzufuehrende Voting anpassen diff --git a/UVconfig.pm b/UVconfig.pm index c93f135..ee7f21e 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -18,7 +18,7 @@ require Exporter; $VERSION = "0.18"; # Usevote version -$usevote_version = "UseVoteGer 4.09"; +$usevote_version = "UseVoteGer 4.10"; sub read_config { diff --git a/UVmenu.pm b/UVmenu.pm index d90da9c..46eb779 100644 --- a/UVmenu.pm +++ b/UVmenu.pm @@ -17,7 +17,8 @@ $VERSION = "0.4"; ############################################################################## # Menu for interaction with the votetaker # # Parameters: votes list and header (references to arrays) # -# Body, Mailadress, Name, Ballot ID (references to strings) # +# Body, Mailadress, Name, Ballot ID, # +# Voting (references to strings) # # List of newly set fields (reference to array) # # List of errors to correct (Array-Ref) # # Return Values: 'w': proceed # @@ -25,7 +26,7 @@ $VERSION = "0.4"; ############################################################################## sub menu { - my ($votes, $header, $body, $addr, $name, $ballot_id, $set, $errors) = @_; + my ($votes, $header, $body, $addr, $name, $ballot_id, $voting, $set, $errors) = @_; my $input = ""; my $voter_addr = $$addr || ''; my $voter_name = $$name || ''; @@ -79,6 +80,7 @@ sub menu { print "(5) ", UVmessage::get("MENU_BALLOT_ID"), " [$$ballot_id]\n" if ($config{personal}); print "(6) ", UVmessage::get("MENU_BDSG"), "\n" if ($config{bdsg}); + print "(7) ", UVmessage::get("MENU_VOTING"), " [", $$voting, "]\n"; } print "\n", @@ -269,6 +271,38 @@ sub menu { $errors{InvalidBDSG} = UVmessage::get("MENU_INVALIDBDSG"); } + } elsif ($input eq '7') { + my $sel; + do { + print "[a] ", UVmessage::get("MENU_VOTING_CORRECT"), "\n", + "[b] ", UVmessage::get("MENU_VOTING_WRONG"), "\n\n", + UVmessage::get("MENU_PROMPT"); + $sel = ; + } until ($sel =~ /^[ab]$/i); + + if ($sel =~ /^a$/i) { + delete $errors{NoVoting}; + delete $errors{WrongVoting}; + } else { + $errors{WrongVoting} = UVmessage::get("MENU_WRONGVOTING"); + } + + } elsif ($input eq '7') { + my $sel; + do { + print "[a] ", UVmessage::get("MENU_VOTING_CORRECT"), "\n", + "[b] ", UVmessage::get("MENU_VOTING_WRONG"), "\n\n", + UVmessage::get("MENU_PROMPT"); + $sel = ; + } until ($sel =~ /^[ab]$/i); + + if ($sel =~ /^a$/i) { + delete $errors{NoVoting}; + delete $errors{WrongVoting}; + } else { + $errors{WrongVoting} = UVmessage::get("MENU_WRONGVOTING"); + } + } elsif ($input =~ /^i$/i) { my $ignore = UVmessage::get("MENU_IGNORE_STRING"); # Set columns for Text::Wrap diff --git a/mailpatterns.cfg b/mailpatterns.cfg index 0fbbd31..3add0f8 100644 --- a/mailpatterns.cfg +++ b/mailpatterns.cfg @@ -25,7 +25,6 @@ hostmaster@ install@ mailer.*@ maint.*@ -news@ newsmaster@ nobody@ operator@ @@ -38,5 +37,4 @@ sysop@ system@ test@ tutor@ -usenet@ uucp@ diff --git a/messages.cfg b/messages.cfg index 6b1dd5d..6c9b339 100644 --- a/messages.cfg +++ b/messages.cfg @@ -29,6 +29,8 @@ MENU_INVALIDBDSG = Datenschutzhinweis fehlerhaft oder nicht bestaetigt. MENU_DUPLICATEVOTE = Doppelte Stimmabgabe gefunden. MENU_NOVOTE = Keine Stimmabgabe gefunden. MENU_INVALIDVOTE = Ungueltige Stimmabgabe. +MENU_NOVOTING = Bezeichnung der Abstimmung nicht gefunden. +MENU_WRONGVOTING = Wahlschein fuer andere Abstimmung. MENU_NOBALLOTID = Keine Scheinkennung gefunden. MENU_WRONGBALLOTID = Scheinkennung falsch. MENU_ADDRESSNOTREGISTERED = Adresse nicht registriert. @@ -67,6 +69,9 @@ MENU_BALLOT_ID = Scheinkennung MENU_BDSG = Datenschutzklausel MENU_BDSG_ACCEPTED = Datenschutzklausel wurde akzeptiert MENU_BDSG_DECLINED = Datenschutzklausel nicht akzeptiert bzw. Text veraendert +MENU_VOTING = Abstimmung +MENU_VOTING_CORRECT = Korrekter Wahlschein fuer diese Abstimmung +MENU_VOTING_WRONG = Wahlschein fuer andere Abstimmung MENU_IGNORE = Diese Stimme ignorieren (ohne Benachrichtigung verwerfen) MENU_IGNORE_WARNING = Die Stimme wird nicht aufgezeichnet, und es wird keine Bestaetigung verschickt. ${MENU_IGNORE_STRING} eingeben, wenn Du sicher bist: MENU_IGNORE_STRING = JA @@ -162,7 +167,7 @@ COUNT_DELETED = ${NUM} Stimme(n) geloescht. VOTE_RENAMING_MAILBOX = Benenne Stimmdatei um... VOTE_WRITE_RESULTS = Ergebnisdatei ${FILE} nicht schreibbar! VOTE_CLOSE_RESULTS = Ergebnisdatei ${FILE} konnte nicht erfolgreich geschlossen werden! -VOTE_NO_VOTES = Keine Stimmen zu verarbeiten. +VOTE_NO_VOTEMAILS = Keine Stimmen zu verarbeiten. VOTE_NUM_VOTES = ${COUNT} Stimmen bearbeitet. VOTE_NOT_SAVED = ${COUNT} Stimmen bearbeitet, aber nicht gespeichert. VOTE_FIRSTRUN = 'uvvote clean' aufrufen, um Ergebnisse zu speichern und Bestaetigungen zu verschicken. @@ -173,6 +178,7 @@ VOTE_UNREGISTERED_ADDRESS = Adresse nicht registriert VOTE_INVALID_VOTE = Ungueltige Stimmabgabe VOTE_VIOLATED_RULE = Regel ${RULE} verletzt VOTE_NO_VOTES = Keine Stimmen abgegeben +VOTE_WRONG_VOTING = Wahlschein gehoert nicht zu dieser Abstimmung VOTE_INVALID_ACCOUNT = Ungueltiger Account VOTE_INVALID_ADDRESS = Ungueltige Adresse VOTE_INVALID_REALNAME = Ungueltiger Realname diff --git a/templates/ack-mail b/templates/ack-mail index 150df0b..4d69cef 100644 --- a/templates/ack-mail +++ b/templates/ack-mail @@ -5,15 +5,22 @@ pos := value pos | fill-right 2 group-first := value group | first-words 50 group-more := value group | drop-words 50 | create-lines 50 vote := value vote | fill-both 10 -votetaker := value mailfrom | fill-left 65 +votetaker := value mailfrom +voteaccount-line := value voteaccount | fill-both 70 == TEMPLATE ================================================================= Diese automatische Nachricht wurde dir nach Zaehlung deiner Stimme zugesandt. Wenn alles stimmt, gibt es keinen Anlass fuer eine Reaktion. + Wenn deine Stimme falsch registriert wurde, stimme bitte erneut ab, indem du diese Mail komplett zitierst und die falschen Wertungen korrigierst (zwischen die eckigen Klammern schreiben). Dabei darf keinesfalls die laufende Nummer am Zeilenanfang entfernt werden. +Beachte bitte, dass Du Deine Stimme an die Abstimmadresse senden +musst! Es genuegt daher nicht, einfach auf diese E-Mail zu antworten, +vielmehr muss die Antwort an die Adresse +[$voteaccount-line] +gerichtet sein. Diese Wahl ist oeffentlich, und die Adressen aller Waehlerinnen und Waehler werden am Ende bekanntgegeben. Wenn du deine Adresse & Stimme @@ -29,8 +36,8 @@ Wahlscheinkennung gueltig! [$name-line] (Real-Namen sind fuer diese Abstimmung vorgeschrieben. Wenn hier nicht Dein wirklicher Name steht, dann korrigiere die Zeile - bitte und sende die Nachricht zurueck; sonst kann die Stimme - spaeter als ungueltig gewertet werden.) + bitte und sende die Nachricht erneut an die Abstimmadresse, + sonst kann die Stimme spaeter als ungueltig gewertet werden.) Deine Stimmabgabe wurde wie folgt erkannt: @@ -39,8 +46,7 @@ Deine Stimmabgabe wurde wie folgt erkannt: [@group-more| [$line]\n]|\n] -Danke fuer deine Stimmabgabe. Eine Kopie des CfV kannst du von mir er- -halten (bitte Namen der Abstimmung angeben, falls mehrere laufen). +Danke fuer deine Stimmabgabe. [$votetaker] \[mit [$usevote_version]\] diff --git a/templates/ballot b/templates/ballot index 5e3242a..30add33 100644 --- a/templates/ballot +++ b/templates/ballot @@ -14,7 +14,7 @@ bdsgtext-more := value bdsgtext | drop-words 50 | create-lines 50 =-=-=-=-=-=-=-=- Alles vor dieser Zeile bitte loeschen =-=-=-=-=-=-=-=- -WAHLSCHEIN fuer [$votename-first] +[$ballotintro] [$votename-first] [@votename-more| [$line]\n] diff --git a/templates/ballot-personal b/templates/ballot-personal index 13aef2a..495baec 100644 --- a/templates/ballot-personal +++ b/templates/ballot-personal @@ -29,7 +29,7 @@ votetaker := value mailfrom | fill-left 65 =-=-=-=-=-=-=-=- Alles vor dieser Zeile bitte loeschen =-=-=-=-=-=-=-=- -WAHLSCHEIN fuer [$votename-first] +[$ballotintro] [$votename-first] [@votename-more| [$line]\n] diff --git a/templates/result-multi b/templates/result-multi index cc3659b..01abd88 100644 --- a/templates/result-multi +++ b/templates/result-multi @@ -11,9 +11,10 @@ group-more := value group | drop-words 40 | create-lines 40 Ergebnisse [$votename-first] [@votename-more| [$line]\n] -([$numvalid] gueltige Stimmen) - Ja Nein : 2/3? >=60? : ang.? : Gruppe +Es wurden [$numvalid] gueltige Stimmen abgegeben. + + Ja Nein : 2/3? >=50? : ang.? : Gruppe ---- ---- : ---- ----- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [?cond2| Ja |Nein] : [?result| Ja |Nein] : [$group-first] [@group-more| : : : [$line]\n]\n] @@ -24,6 +25,7 @@ Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner Veroeffentlichung Einspruch erhoben werden. Der Einspruch ist per E-Mail bei der Moderation von de.admin.news.announce (Adressen siehe Signatur) einzulegen. + Wenn es keine ernsthaften Einsprueche gibt oder diese abgelehnt werden, wird die Moderation von de.admin.news.announce das Ergebnis danach umsetzen. diff --git a/templates/result-proportional b/templates/result-proportional index 53685d1..fa9db75 100644 --- a/templates/result-proportional +++ b/templates/result-proportional @@ -12,7 +12,8 @@ group-more := value group | drop-words 40 | create-lines 40 Ergebnisse [$votename-first] [@votename-more| [$line]\n] -([$numvalid] gueltige Stimmen) + +Es wurden [$numvalid] gueltige Stimmen abgegeben. Ja Nein : J>=N? Ja/Nein : ang.? : Gruppe ---- ---- : ----- ------- : ----- : --------------------------------------- @@ -24,6 +25,7 @@ Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner Veroeffentlichung Einspruch erhoben werden. Der Einspruch ist per E-Mail bei der Moderation von de.admin.news.announce (Adressen siehe Signatur) einzulegen. + Wenn es keine ernsthaften Einsprueche gibt oder diese abgelehnt werden, wird die Moderation von de.admin.news.announce das Ergebnis danach umsetzen. diff --git a/templates/result-single b/templates/result-single index 1be10d2..8345efa 100644 --- a/templates/result-single +++ b/templates/result-single @@ -8,19 +8,21 @@ votename-text-more := value votename | drop-words 30 | create-lines 72 Ergebnisse [$votename-first] [@votename-more| [$line]\n] -([$numvalid] gueltige Stimmen) + +Es wurden [$numvalid] gueltige Stimmen abgegeben. Es gab [$yes] Ja-Stimmen und [$no] Nein-Stimmen[?numabstain| bei [$numabstain] Enthaltungen]. [?numinvalid|[$numinvalid] Stimme(n) wurden als ungueltig gewertet.] Es wurde [?cond1|die|keine] 2/3-Mehrheit erreicht und es gingen [?cond2|mehr|weniger] als -60 Ja-Stimmen ein. Damit ist die [$votename-text-first] +50 Ja-Stimmen ein. Damit ist die [$votename-text-first] [@votename-text-more|[$line] |\n][?cond1|[?cond2|angenommen|abgelehnt]|abgelehnt]. Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner Veroeffentlichung Einspruch erhoben werden. Der Einspruch ist per E-Mail bei der Moderation von de.admin.news.announce (Adressen siehe Signatur) einzulegen. + Wenn es keine ernsthaften Einsprueche gibt oder diese abgelehnt werden, wird die Moderation von de.admin.news.announce das Ergebnis danach umsetzen. diff --git a/templates/wrong-voting b/templates/wrong-voting new file mode 100644 index 0000000..f233b7d --- /dev/null +++ b/templates/wrong-voting @@ -0,0 +1,21 @@ +votetaker := value mailfrom | fill-left 65 +body := value body | quote "> " + +== TEMPLATE ================================================================= +Offenbar hast du einen Wahlschein fuer eine andere Abstimmung eingesandt +oder der Name der Abstimmung geht aus dem Wahlschein nicht hervor. Wenn +das ein Irrtum war, pruefe bitte noch einmal die im CfV angegebene +Abstimmungsadresse und wiederhole Deine Stimmabgabe. + +Dieser Fehler kann auftreten, wenn Du an mehreren Abstimmungen teilnimmst +und den Wahlschein von Hand einsendest (und dabei mehrere Abstimmungen +verwechselst), oder wenn Du die Bezeichnung der Abstimmung im Wahlschein +veraendert oder geloescht hast. + +Hier die Mail, die ich erhalten habe: + +[$body] + + +[$votetaker] +\[mit [$usevote_version]\] diff --git a/usevote.cfg b/usevote.cfg index cf801f5..d6a6b33 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -75,7 +75,7 @@ multigroup = 1 # wird nur Bedingung 1 ausgewertet und kann z.B. auf "$yes>$no" gesetzt # werden. condition1 = $yes>=2*$no -condition2 = $yes>=60 +condition2 = $yes>=50 # Ergebnisdatei, in der alle Einzelergebniss zusammengeschrieben werden # (wird bei jedem Programmlauf neu erstellt!) @@ -227,6 +227,10 @@ mailstart = "^From " begin_divider = Alles vor dieser Zeile bitte loeschen end_divider = Alles nach dieser Zeile bitte loeschen +# Ueberschrift fuer den Wahlschein +# Achtung, muss im Wahlschein genauso stehen! +ballotintro = WAHLSCHEIN fuer + # Text fuer die Namens-Angabe im Wahlschein. Achtung, muss im # Wahlschein genauso stehen! nametext = Dein Realname, falls nicht im FROM-Header: @@ -290,4 +294,5 @@ tpl_invalid_name = "invalid-name" # used by uvvote.pl tpl_multiple_votes = "multiple-votes" # used by uvvote.pl tpl_no_ballot = "no-ballot" # used by uvvote.pl tpl_no_votes = "no-votes" # used by uvvote.pl +tpl_wrong_voting = "wrong-voting" # used by uvvote.pl tpl_rule_violated = "rule-violated" # used by uvvote.pl (c.f. usevote.rul) diff --git a/uvballot.pl b/uvballot.pl index 4085a7f..7081744 100644 --- a/uvballot.pl +++ b/uvballot.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Wahlscheingenerierung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.10 Wahlscheingenerierung +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvbounce.pl b/uvbounce.pl index 1bf5139..eb95143 100644 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Bounce-Verarbeitung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.10 Bounce-Verarbeitung +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcfv.pl b/uvcfv.pl index 74174c6..f2a81b0 100644 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Personalisierte Wahlscheine -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.10 Personalisierte Wahlscheine +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -152,9 +152,9 @@ sub process_request { # check for suspicious addresses foreach my $element (@bad_addr) { if ($voter_addr =~ /^$element/) { - my (@votes, @set, $ballot_id); # irrelevant, but necessary for UVmenu::menu() + my (@votes, @set, $ballot_id, $voting); # irrelevant, but necessary for UVmenu::menu() my @errors = ('SuspiciousAccountBallot'); - my $res = UVmenu::menu(\@votes, \@header, $body, \$voter_addr, \$voter_name, \$ballot_id, \@set, \@errors); + my $res = UVmenu::menu(\@votes, \@header, $body, \$voter_addr, \$voter_name, \$ballot_id, \$voting, \@set, \@errors); # "Ignore": don't deliver a ballot return 0 if ($res eq 'i'); diff --git a/uvcount.pl b/uvcount.pl index 014494e..5c4ba2f 100644 --- a/uvcount.pl +++ b/uvcount.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Stimmauswertung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.10 Stimmauswertung +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvvote.pl b/uvvote.pl index ff8f1b9..4affb4c 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Wahldurchfuehrung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.10 Wahldurchfuehrung +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the @@ -158,7 +158,7 @@ if ($clean) { # no mails: exit here unless ($count) { - print UVmessage::get("VOTE_NO_VOTES") . "\n\n"; + print UVmessage::get("VOTE_NO_VOTEMAILS") . "\n\n"; exit 0; } @@ -224,6 +224,7 @@ sub process_vote { my $onevote = 0; # 0=no votes, 1=everything OK, 2=vote cancelled my $voteerror = ""; # error message in case of invalid vote my $ballot_id = ""; # ballot id (German: Wahlscheinkennung) + my $voting = ""; # voting (should be votename) # found address? if ($voter_addr) { @@ -239,6 +240,15 @@ sub process_vote { push (@errors, 'InvalidAddress'); } + # correct voting? + if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n(.*?[\t ]+(\S+.+)\s*$)?/m) { + $voting = $1; + $voting .= " $3" if defined($3); + push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/); + } else { + push (@errors, 'NoVoting'); + } + # personalized ballots? if ($config{personal}) { if ($$body =~ /$config{ballotidtext}\s+([a-z0-9]+)/) { @@ -273,7 +283,7 @@ sub process_vote { # this matches on a single appearance: if ($$body =~ /#$votenum\W*?\[(.+)\]/) { # one or more vote strings were found - $onevote = 1; + $onevote ||= 1; # set $onevote to 1 if it was 0 my $votestring = $1; if ($votestring =~ /^\W*$config{ja_stimme}\W*$/i) { $vote = "J"; @@ -343,7 +353,7 @@ sub process_vote { # Errors encountered? if (@errors) { my $res = UVmenu::menu(\@votes, \@header, $body, \$voter_addr, \$voter_name, - \$ballot_id, \@set, \@errors); + \$ballot_id, \$voting, \@set, \@errors); return 0 if ($res eq 'i'); # "Ignore": Ignore vote, don't save my $tpl; @@ -402,6 +412,12 @@ sub process_vote { my $msg = $template->processTemplate($config{tpl_bdsg_error}); UVsendmail::mail($voter_addr, "Fehler", $msg, $msgid) if ($config{voteack}); return 0; + } elsif ($error{NoVoting} or $error{WrongVoting}) { + $voteerror = UVmessage::get("VOTE_WRONG_VOTING"); + my $template = UVtemplate->new(); + $template->setKey('body' => $$body); + my $msg = $template->processTemplate($config{tpl_wrong_voting}); + UVsendmail::mail($voter_addr, "Fehler", $msg, $msgid) if ($config{voteack}); } elsif ($error{NoVote}) { $voteerror = UVmessage::get("VOTE_NO_VOTES"); my $template = UVtemplate->new(); From c9497882fb70672ae59fd5c5b955dc4fb4dab614 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 26 Sep 2012 21:26:54 +0200 Subject: [PATCH 29/80] Release of upstream version 4.11. Signed-off-by: Thomas Hochstein --- CHANGES | 14 +++++++---- README | 5 ++-- UVconfig.pm | 3 ++- UVreadmail.pm | 64 ++++++++++++++++++++++++++++++++------------------- usevote.cfg | 3 +++ uvballot.pl | 2 +- uvbounce.pl | 2 +- uvcfv.pl | 2 +- uvcount.pl | 2 +- uvvote.pl | 14 ++--------- 10 files changed, 64 insertions(+), 47 deletions(-) diff --git a/CHANGES b/CHANGES index 281a395..e26eb94 100644 --- a/CHANGES +++ b/CHANGES @@ -1,15 +1,21 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.10, released 17.09.2012) +UseVoteGer Versionshistorie (aktuelle Version: 4.11, released 25.09.2012) ========================================================================= TODO: - aussortieren von Bounces aus Stimmenliste -- Unterstuetzung von Maildir - [Zugschlus] ich fänd es klasse, wenn man eine Kopie des Wahlscheines ins Abstimmungsverzeichnis legt und Usevote einem dann auf Abruf ein diff oder wdiff zwischen Sollwahlschein und wirklich eingreichtem Wahlschein macht. Auf diese Weise erwischt man auch kleine Änderungen am Datenschutzhinweis (da bin ich eben in eine Falle von th-h getappt). +Version 4.11 (25.09.2012): +- Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. + Es kam zu vielen False Positives +- Einlesen der Mailbox auf Perlmodule Mail::Box umgestellt, damit + auch Maildir moeglich (neue Option "mailboxtype" in usevote.cfg). + Archivierung erfolgt aber vorerst weiterhin immer als mbox + Version 4.10 (17.09.2012): - Fehler in uvvote.pl, Zeile 126 behoben (Verarbeitung von temporaeren Dateien - es wurde nicht korrekt auf vorhandene Temp-Dateien @@ -23,7 +29,7 @@ Version 4.10 (17.09.2012): auf die Ack-Mail geschickt werden koennen) - Fehler in Annullierungsbearbeitung behoben (wurde nur bei erstem oder letztem Abstimmungspunkt ausgewertet) -- Abstimmungsname wird nun auf Korrektheit geprüft (Wahlschein gehört +- Abstimmungsname wird nun auf Korrektheit geprueft (Wahlschein gehört zur richtigen Abstimmung) - neue Konfigurations-Option "ballotintro" und neues Template tpl_wrong_voting @@ -36,7 +42,7 @@ Version 4.09 (14.09.2007): - "votefile"-Option in usevote.cfg an passendere Stelle verschoben und den Kommentar korrigiert (natuerlich gilt pop3=0 als Bedingung, nicht etwa wie vorher angegeben smtp=0) -- Fehler in Template für Ergebnisausgabe korrigiert (fehlendes Newline +- Fehler in Template fuer Ergebnisausgabe korrigiert (fehlendes Newline nach umgebrochenen Abstimmungspunkten) - Fehler in Doku der Kommandozeilenoptionen von uvcount.pl behoben (--voters statt --votes) diff --git a/README b/README index 158e3b6..3746e04 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -UseVoteGer 4.10 (c) 2001-2012 Marc Langer +UseVoteGer 4.11 (c) 2001-2012 Marc Langer UseVoteGer is a voting software for usenet votes. @@ -18,7 +18,7 @@ written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ------------------------------------------------------------------------------- -UseVoteGer 4.10 - Usenet-Abstimmungssoftware +UseVoteGer 4.11 - Usenet-Abstimmungssoftware =========================================== von Marc Langer @@ -958,6 +958,7 @@ votename Name der Abstimmung group1 Erster Abstimmungsgegenstand group2 Zweiter (und so weiter durchnummerieren) votefile Mailbox mit eingehenden Stimmen (falls POP3 ausgeschaltet) +mailboxtype Typ der Mailbox (mbox, maildir) personal Personalisierte Wahlscheine verwenden? [BOOL] (siehe gesonderten Abschnitt weiter oben) voteaccount Mailadresse, unter der abgestimmt werden kann diff --git a/UVconfig.pm b/UVconfig.pm index ee7f21e..a12aa56 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -18,7 +18,7 @@ require Exporter; $VERSION = "0.18"; # Usevote version -$usevote_version = "UseVoteGer 4.10"; +$usevote_version = "UseVoteGer 4.11"; sub read_config { @@ -45,6 +45,7 @@ sub read_config { voteaccount => "<> (unkonfiguriertes Usevote)", mailfrom => "<> (unkonfiguriertes Usevote)", envelopefrom => "<>", + mailboxtype => "mbox", mailstart => "^From ", archivedir => "fertig", tmpdir => "tmp", diff --git a/UVreadmail.pm b/UVreadmail.pm index e1e599c..01d062f 100644 --- a/UVreadmail.pm +++ b/UVreadmail.pm @@ -9,6 +9,7 @@ use UVmessage; use MIME::QuotedPrint; use MIME::Base64; use MIME::Parser; +use Mail::Box::Manager; use POSIX qw(strftime); use vars qw($VERSION); @@ -118,37 +119,52 @@ sub process { close (UIDLCACHE) or print STDERR UVmessage::get("READMAIL_UIDL_CLOSE") . "\n"; } - # make archive of all mails - my $fileproblem = 0; - open (VOTES, ">$filename") or $fileproblem = 1; - if ($fileproblem) { - print STDERR UVmessage::get("READMAIL_ARCHIVE_PROBLEM", - (FILE => $filename)) . "\n"; - } else { - print VOTES join ("\n", @mails); - close (VOTES) - or print STDERR UVmessage::get("READMAIL_ARCHIVE_CLOSE", - (FILE => $filename)) . "\n"; - } - $pop->quit(); + # Mailbox / Maildir } else { - # open mail file - open(VOTES, "<$filename") - or die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $filename)) . "\n\n"; - # read all mails - my $i = 0; - while () { - if (/$config{mailstart}/) { - $i++; + my $mgr = Mail::Box::Manager->new; + my $folder; + + eval{ + $folder = $mgr->open( folder => $config{votefile}, + create => 0, + access => 'rw', + type => $config{mailboxtype}, + expand => 'LAZY', + ); + }; + die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $config{votefile})) . "\n\n" if $@; + + # Iterate over the messages. + foreach (@$folder) { + my $mail = $_->string; + $_->delete(); + my $fromline = 'From '; + if ($mail =~ /From: .*?<(.+?)>/) { + $fromline .= $1; + } elsif ($mail =~ /From:\s+?(\S+?\@\S+?)\s/) { + $fromline .= $1; + } else { + $fromline .= 'foo@bar.invalid'; } - $mails[$i] = ($mails[$i] || "") . $_; + $fromline .= ' ' . localtime() . "\n"; #strftime ('%a %b %d %H:%M:%S %Y', localtime) . "\n"; + push (@mails, $fromline . $mail); } + } - # close mail file - close(VOTES); + # make archive of all mails + my $fileproblem = 0; + open (VOTES, ">$filename") or $fileproblem = 1; + if ($fileproblem) { + print STDERR UVmessage::get("READMAIL_ARCHIVE_PROBLEM", + (FILE => $filename)) . "\n"; + } else { + print VOTES join ("\n", @mails); + close (VOTES) + or print STDERR UVmessage::get("READMAIL_ARCHIVE_CLOSE", + (FILE => $filename)) . "\n"; } foreach my $mail (@mails) { diff --git a/usevote.cfg b/usevote.cfg index d6a6b33..20f4bc9 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -90,6 +90,9 @@ pop3 = 1 # Mailbox, in der die zu verarbeitenden Mails liegen (falls pop3=0) votefile = votes +# Typ der Mailbox (mbox, maildir) +mailboxtype = mbox + # POP3-Einstellungen fuer Abruf der eingehenden Wahlscheine: # Server, Port, Benutzername, Passwort pop3server = 127.0.0.1 diff --git a/uvballot.pl b/uvballot.pl index 7081744..6933233 100644 --- a/uvballot.pl +++ b/uvballot.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.10 Wahlscheingenerierung +# UseVoteGer 4.11 Wahlscheingenerierung # (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or diff --git a/uvbounce.pl b/uvbounce.pl index eb95143..03f1e1d 100644 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.10 Bounce-Verarbeitung +# UseVoteGer 4.11 Bounce-Verarbeitung # (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or diff --git a/uvcfv.pl b/uvcfv.pl index f2a81b0..a053e77 100644 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.10 Personalisierte Wahlscheine +# UseVoteGer 4.11 Personalisierte Wahlscheine # (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or diff --git a/uvcount.pl b/uvcount.pl index 5c4ba2f..11af9c1 100644 --- a/uvcount.pl +++ b/uvcount.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.10 Stimmauswertung +# UseVoteGer 4.11 Stimmauswertung # (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or diff --git a/uvvote.pl b/uvvote.pl index 4affb4c..4b3b2b1 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.10 Wahldurchfuehrung +# UseVoteGer 4.11 Wahldurchfuehrung # (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or @@ -135,16 +135,6 @@ if ($clean) { my $thisresult = "ergebnis-" . $ext; my $thisvotes = "stimmen-" . $ext; - # POP3 not activated: rename votes file - unless ($config{pop3}) { - print UVmessage::get("VOTE_RENAMING_MAILBOX"), "\n"; - rename ($config{votefile}, "$config{tmpdir}/$thisvotes") - or die UVmessage::get("ERR_RENAME_MAILFILE") . "$!\n\n"; - - # wait, so that current mail deliveries can finalize - sleep 2; - } - # open results file open (RESULT, ">>$config{tmpdir}/$thisresult") or die UVmessage::get("VOTE_WRITE_RESULTS", (FILE=>$thisresult)) . "\n\n"; @@ -241,7 +231,7 @@ sub process_vote { } # correct voting? - if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n(.*?[\t ]+(\S+.+)\s*$)?/m) { + if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)[^\S\n]*\n([>:|]*?[\t ]+(\S+.+)\s*$)?/m) { $voting = $1; $voting .= " $3" if defined($3); push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/); From 95135a11026182b0e8ce31f91703d66c3c444f23 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:07:48 +0100 Subject: [PATCH 30/80] Display current voting identifier in menu. Add a header line with the identifier (name) of the currently processed voting to the menu display by UVmenu so one can check whether the ballot really belongs to the current voting even when checking more than one voting in a batch. Signed-off-by: Thomas Hochstein --- UVmenu.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/UVmenu.pm b/UVmenu.pm index cd523e8..5d96c8e 100644 --- a/UVmenu.pm +++ b/UVmenu.pm @@ -60,6 +60,7 @@ sub menu { while (1) { system($config{clearcmd}); + print "-> $config{votename} <-\n"; print UVmessage::get("MENU_PROBLEMS") . "\n"; foreach my $error (keys %errors) { From e651da8b3f205a07e7a4247d11dfcbe6e39986f2 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:14:52 +0100 Subject: [PATCH 31/80] Enforce strict response for data protection clause. The - legally binding - data protection clause demands an answer of "JA" to show voter agreement for vote processing. Hence UseVote should only accept "JA" (in upper or lower case), but not "DAFUER" or some other synonyms. * Add bdsg_confirm (regexp) to usevote.cfg * Change check in uvvote.pl accordingly Signed-off-by: Thomas Hochstein --- usevote.cfg | 4 ++++ usevote.global.cfg | 4 ++++ uvvote.pl | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/usevote.cfg b/usevote.cfg index cf801f5..360ef4c 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -267,6 +267,10 @@ enth_stimme = (E|E\s*N\s*T\s*H\s*A\s*L\s*T\s*U\s*N\s*G) # Achtung, sollte auch in den Templates im Bestaetigungstext angepasst werden ann_stimme = A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G +# RegExp fuer Bestaetigung der Datenschutzklause (case-insensitive) +# Standardmaessig wird nur JA erkannt +bdsg_confirm = JA + # Template files (these files are in the template directory defined above) tpl_mailheader = "mailheader" # generally used mail header tpl_bouncelist = "bouncelist" # used by uvbounce.pl diff --git a/usevote.global.cfg b/usevote.global.cfg index beb859f..1118642 100644 --- a/usevote.global.cfg +++ b/usevote.global.cfg @@ -139,6 +139,10 @@ enth_stimme = (E|E\s*N\s*T\s*H\s*A\s*L\s*T\s*U\s*N\s*G) # Achtung, sollte auch in den Templates im Bestaetigungstext angepasst werden ann_stimme = A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G +# RegExp fuer Bestaetigung der Datenschutzklause (case-insensitive) +# Standardmaessig wird nur JA erkannt +bdsg_confirm = JA + # Template files (these files are in the template directory defined above) tpl_mailheader = "mailheader" # generally used mail header tpl_bouncelist = "bouncelist" # used by uvbounce.pl diff --git a/uvvote.pl b/uvvote.pl index c859504..0c12a06 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -319,7 +319,7 @@ sub process_vote { # Should read like this: #a [ STIMME ] Text # (Text is configurable in usevote.cfg) unless ($$body =~ /$bdsg_regexp/s && - $$body =~ /#a\W*?\[\W*?$config{ja_stimme}\W*?\]\W*?$bdsg2_regexp/is) { + $$body =~ /#a\W*?\[\W*?$config{bdsg_confirm}\W*?\]\W*?$bdsg2_regexp/is) { push (@errors, 'InvalidBDSG'); } From 305f8f61e9243a4ef2bc4d92be54a49c395b5bc4 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:35:43 +0100 Subject: [PATCH 32/80] Update documentation from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 33 ++++++++++++++++++++++++++++++--- README | 8 +++----- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 2d0d6d2..e26eb94 100644 --- a/CHANGES +++ b/CHANGES @@ -1,21 +1,48 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.09, released 07.10.2007) +UseVoteGer Versionshistorie (aktuelle Version: 4.11, released 25.09.2012) ========================================================================= TODO: - aussortieren von Bounces aus Stimmenliste -- Unterstuetzung von Maildir - [Zugschlus] ich fänd es klasse, wenn man eine Kopie des Wahlscheines ins Abstimmungsverzeichnis legt und Usevote einem dann auf Abruf ein diff oder wdiff zwischen Sollwahlschein und wirklich eingreichtem Wahlschein macht. Auf diese Weise erwischt man auch kleine Änderungen am Datenschutzhinweis (da bin ich eben in eine Falle von th-h getappt). +Version 4.11 (25.09.2012): +- Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. + Es kam zu vielen False Positives +- Einlesen der Mailbox auf Perlmodule Mail::Box umgestellt, damit + auch Maildir moeglich (neue Option "mailboxtype" in usevote.cfg). + Archivierung erfolgt aber vorerst weiterhin immer als mbox + +Version 4.10 (17.09.2012): +- Fehler in uvvote.pl, Zeile 126 behoben (Verarbeitung von temporaeren + Dateien - es wurde nicht korrekt auf vorhandene Temp-Dateien + geprueft) +- Typo in bdsgtext.cfg behoben +- doppelten Identifier "VOTE_NO_VOTES" in messages.cfg/uvvote.pl umbenannt +- templates/ack-mail: Votetaker (Unterschrift) linksbuendig statt + wie vorher rechtsbuendig einfuegen; Anleitung fuer Annullierungen + verbessert; Hinweis darauf, dass Stimmaenderungen an den + Voteaccount geschickt werden muessen und nicht einfach als Antwort + auf die Ack-Mail geschickt werden koennen) +- Fehler in Annullierungsbearbeitung behoben (wurde nur bei erstem + oder letztem Abstimmungspunkt ausgewertet) +- Abstimmungsname wird nun auf Korrektheit geprueft (Wahlschein gehört + zur richtigen Abstimmung) +- neue Konfigurations-Option "ballotintro" und neues Template + tpl_wrong_voting +- usenet@ und news@ werden nicht mehr als ungueltige Mailadressen + angesehen. Vor allem usenet@ wird von vielen Waehlern verwendet. +- Aenderung der Wahlregeln: statt 60 nur noch 50 JA-Stimmen benoetigt +- kleinere Template-Aenderungen (verbesserte Texte/Formatierungen) Version 4.09 (14.09.2007): - "votefile"-Option in usevote.cfg an passendere Stelle verschoben und den Kommentar korrigiert (natuerlich gilt pop3=0 als Bedingung, nicht etwa wie vorher angegeben smtp=0) -- Fehler in Template für Ergebnisausgabe korrigiert (fehlendes Newline +- Fehler in Template fuer Ergebnisausgabe korrigiert (fehlendes Newline nach umgebrochenen Abstimmungspunkten) - Fehler in Doku der Kommandozeilenoptionen von uvcount.pl behoben (--voters statt --votes) diff --git a/README b/README index e2a7e66..3746e04 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -UseVoteGer 4.09 (c) 2001-2007 Marc Langer +UseVoteGer 4.11 (c) 2001-2012 Marc Langer UseVoteGer is a voting software for usenet votes. @@ -18,7 +18,7 @@ written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ------------------------------------------------------------------------------- -UseVoteGer 4.09 - Usenet-Abstimmungssoftware +UseVoteGer 4.11 - Usenet-Abstimmungssoftware =========================================== von Marc Langer @@ -89,9 +89,6 @@ I. Einmalig bei der Usevote-Erstinstallation sehr einfach mit "perl -MCPAN -e shell", ActivePerl fuer Windows hat einen eigenen Paketmanager) - Achtung: Bei meinem ActivePerl 5.6.1 war eine alte Libnet-Version - enthalten, die noch keine SMTP-Authentication unterstuetzte. - Bei Benutzung dieses Features muss evtl. erst upgedated werden. II. Fuer jedes Voting (1) usevote.cfg auf das durchzufuehrende Voting anpassen @@ -961,6 +958,7 @@ votename Name der Abstimmung group1 Erster Abstimmungsgegenstand group2 Zweiter (und so weiter durchnummerieren) votefile Mailbox mit eingehenden Stimmen (falls POP3 ausgeschaltet) +mailboxtype Typ der Mailbox (mbox, maildir) personal Personalisierte Wahlscheine verwenden? [BOOL] (siehe gesonderten Abschnitt weiter oben) voteaccount Mailadresse, unter der abgestimmt werden kann From 638b24050f3dfdfc4f8093eff9ae46623b660993 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:37:08 +0100 Subject: [PATCH 33/80] Drop commonly used accounts from mailpatterns. "news" as well as "usenet" are not only used as role accounts, but also for normal use. Picked from upstream. Signed-off-by: Thomas Hochstein --- mailpatterns.cfg | 2 -- 1 file changed, 2 deletions(-) diff --git a/mailpatterns.cfg b/mailpatterns.cfg index 0fbbd31..3add0f8 100644 --- a/mailpatterns.cfg +++ b/mailpatterns.cfg @@ -25,7 +25,6 @@ hostmaster@ install@ mailer.*@ maint.*@ -news@ newsmaster@ nobody@ operator@ @@ -38,5 +37,4 @@ sysop@ system@ test@ tutor@ -usenet@ uucp@ From 0618b624e9c3e761ea41a0856d1476713942f2f0 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:38:54 +0100 Subject: [PATCH 34/80] Update version number and copyright. Picked from upstream. Signed-off-by: Thomas Hochstein --- UVconfig.pm | 3 ++- uvballot.pl | 4 ++-- uvbounce.pl | 4 ++-- uvcfv.pl | 4 ++-- uvcount.pl | 4 ++-- uvvote.pl | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/UVconfig.pm b/UVconfig.pm index c93f135..a12aa56 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -18,7 +18,7 @@ require Exporter; $VERSION = "0.18"; # Usevote version -$usevote_version = "UseVoteGer 4.09"; +$usevote_version = "UseVoteGer 4.11"; sub read_config { @@ -45,6 +45,7 @@ sub read_config { voteaccount => "<> (unkonfiguriertes Usevote)", mailfrom => "<> (unkonfiguriertes Usevote)", envelopefrom => "<>", + mailboxtype => "mbox", mailstart => "^From ", archivedir => "fertig", tmpdir => "tmp", diff --git a/uvballot.pl b/uvballot.pl index 4085a7f..6933233 100755 --- a/uvballot.pl +++ b/uvballot.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Wahlscheingenerierung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.11 Wahlscheingenerierung +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvbounce.pl b/uvbounce.pl index 1bf5139..03f1e1d 100755 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Bounce-Verarbeitung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.11 Bounce-Verarbeitung +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcfv.pl b/uvcfv.pl index 6179915..a053e77 100755 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Personalisierte Wahlscheine -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.11 Personalisierte Wahlscheine +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcount.pl b/uvcount.pl index 014494e..11af9c1 100755 --- a/uvcount.pl +++ b/uvcount.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Stimmauswertung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.11 Stimmauswertung +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvvote.pl b/uvvote.pl index 2af270e..99988c0 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.09 Wahldurchfuehrung -# (c) 2001-2005 Marc Langer +# UseVoteGer 4.11 Wahldurchfuehrung +# (c) 2001-2012 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the From 34809a2a81332b011af9f6055a8e3b846053d491 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:41:54 +0100 Subject: [PATCH 35/80] Add option to read from Maildir. Parse a mailbox by virtue of Mail::Box and add "mailboxtype" to usevote.cfg. Picked from upstream. Signed-off-by: Thomas Hochstein --- UVreadmail.pm | 64 ++++++++++++++++++++++++++++++++------------------- usevote.cfg | 2 ++ uvvote.pl | 10 -------- 3 files changed, 42 insertions(+), 34 deletions(-) diff --git a/UVreadmail.pm b/UVreadmail.pm index e1e599c..01d062f 100644 --- a/UVreadmail.pm +++ b/UVreadmail.pm @@ -9,6 +9,7 @@ use UVmessage; use MIME::QuotedPrint; use MIME::Base64; use MIME::Parser; +use Mail::Box::Manager; use POSIX qw(strftime); use vars qw($VERSION); @@ -118,37 +119,52 @@ sub process { close (UIDLCACHE) or print STDERR UVmessage::get("READMAIL_UIDL_CLOSE") . "\n"; } - # make archive of all mails - my $fileproblem = 0; - open (VOTES, ">$filename") or $fileproblem = 1; - if ($fileproblem) { - print STDERR UVmessage::get("READMAIL_ARCHIVE_PROBLEM", - (FILE => $filename)) . "\n"; - } else { - print VOTES join ("\n", @mails); - close (VOTES) - or print STDERR UVmessage::get("READMAIL_ARCHIVE_CLOSE", - (FILE => $filename)) . "\n"; - } - $pop->quit(); + # Mailbox / Maildir } else { - # open mail file - open(VOTES, "<$filename") - or die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $filename)) . "\n\n"; - # read all mails - my $i = 0; - while () { - if (/$config{mailstart}/) { - $i++; + my $mgr = Mail::Box::Manager->new; + my $folder; + + eval{ + $folder = $mgr->open( folder => $config{votefile}, + create => 0, + access => 'rw', + type => $config{mailboxtype}, + expand => 'LAZY', + ); + }; + die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $config{votefile})) . "\n\n" if $@; + + # Iterate over the messages. + foreach (@$folder) { + my $mail = $_->string; + $_->delete(); + my $fromline = 'From '; + if ($mail =~ /From: .*?<(.+?)>/) { + $fromline .= $1; + } elsif ($mail =~ /From:\s+?(\S+?\@\S+?)\s/) { + $fromline .= $1; + } else { + $fromline .= 'foo@bar.invalid'; } - $mails[$i] = ($mails[$i] || "") . $_; + $fromline .= ' ' . localtime() . "\n"; #strftime ('%a %b %d %H:%M:%S %Y', localtime) . "\n"; + push (@mails, $fromline . $mail); } + } - # close mail file - close(VOTES); + # make archive of all mails + my $fileproblem = 0; + open (VOTES, ">$filename") or $fileproblem = 1; + if ($fileproblem) { + print STDERR UVmessage::get("READMAIL_ARCHIVE_PROBLEM", + (FILE => $filename)) . "\n"; + } else { + print VOTES join ("\n", @mails); + close (VOTES) + or print STDERR UVmessage::get("READMAIL_ARCHIVE_CLOSE", + (FILE => $filename)) . "\n"; } foreach my $mail (@mails) { diff --git a/usevote.cfg b/usevote.cfg index aee1fc1..c472b45 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -90,6 +90,8 @@ pop3 = 1 # Mailbox, in der die zu verarbeitenden Mails liegen (falls pop3=0) votefile = votes +# Typ der Mailbox (mbox, maildir) +mailboxtype = mbox # POP3-Einstellungen fuer Abruf der eingehenden Wahlscheine: # Server, Port, Benutzername, Passwort pop3server = 127.0.0.1 diff --git a/uvvote.pl b/uvvote.pl index 99988c0..5cff375 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -135,16 +135,6 @@ if ($clean) { my $thisresult = "ergebnis-" . $ext; my $thisvotes = "stimmen-" . $ext; - # POP3 not activated: rename votes file - unless ($config{pop3}) { - print UVmessage::get("VOTE_RENAMING_MAILBOX"), "\n"; - rename ($config{votefile}, "$config{tmpdir}/$thisvotes") - or die UVmessage::get("ERR_RENAME_MAILFILE") . "$!\n\n"; - - # wait, so that current mail deliveries can finalize - sleep 2; - } - # open results file open (RESULT, ">>$config{tmpdir}/$thisresult") or die UVmessage::get("VOTE_WRITE_RESULTS", (FILE=>$thisresult)) . "\n\n"; From e670e40bb0f2864e7ac72b348a44e66e9fcab095 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:44:29 +0100 Subject: [PATCH 36/80] Fix problem with recognition of ANNULLIERUNG. Vote nullification is now recognized for every topic. Change template accordingly. Picked from upstream. Signed-off-by: Thomas Hochstein --- templates/ack-mail | 3 --- uvvote.pl | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/templates/ack-mail b/templates/ack-mail index 9b76f7f..26703b1 100644 --- a/templates/ack-mail +++ b/templates/ack-mail @@ -26,9 +26,6 @@ Diese Wahl ist oeffentlich, und die Adressen aller Waehlerinnen und Waehler werden am Ende bekanntgegeben. Wenn du deine Adresse & Stimme loeschen willst, kannst du erneut abstimmen und dabei 'ANNULLIERUNG' anstelle von 'JA' oder 'NEIN' angeben. \[Doppel-N, Doppel-L :-)\] -Bei mehreren Abstimmungspunkten muss 'ANNULLIERUNG' bereits beim -Abstimmungspunkt #1 angegeben werden, damit der erhoffte Erfolg -eintritt. ;) [?personal|Da diese Abstimmung mit personalisierten Wahlscheinen durchgefuehrt wird, sind auch saemtliche Aenderungen nur mit Angabe der folgenden diff --git a/uvvote.pl b/uvvote.pl index 5cff375..c0c3712 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -273,7 +273,7 @@ sub process_vote { # this matches on a single appearance: if ($$body =~ /#$votenum\W*?\[(.+)\]/) { # one or more vote strings were found - $onevote = 1; + $onevote ||= 1; # set $onevote to 1 if it was 0 my $votestring = $1; if ($votestring =~ /^\W*$config{ja_stimme}\W*$/i) { $vote = "J"; From 7a54626ef82c0d0e456160930b22303f63322651 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:47:01 +0100 Subject: [PATCH 37/80] Fix handling of template files like upstream. In ccfa1226518d95ed308974f6739b0f7233557327 we replaced TMP by DIR to harmonize its usage. Upstream went the other way round and changed DIR to TMP. We switch now to be compatible to upstream. Picked from upstream. Signed-off-by: Thomas Hochstein --- uvvote.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uvvote.pl b/uvvote.pl index c0c3712..8e8fb68 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -122,9 +122,9 @@ if ($clean) { # normally unixtime is sufficient, if it is not unique append our PID my $ext = time; - opendir (DIR, $config{tmpdir}); - my @tmpfiles = readdir (DIR); - closedir (DIR); + opendir (TMP, $config{tmpdir}); + my @tmpfiles = readdir (TMP); + closedir (TMP); opendir (FERTIG, $config{archivedir}); my @fertigfiles = readdir (FERTIG); closedir (FERTIG); From 075e6efe35c3b77e0d4d2d6a868a12f99f075270 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:47:44 +0100 Subject: [PATCH 38/80] Adapt some templates to upstream version. Signed-off-by: Thomas Hochstein --- templates/ack-mail | 2 +- templates/wrong-voting | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/ack-mail b/templates/ack-mail index 26703b1..4d69cef 100644 --- a/templates/ack-mail +++ b/templates/ack-mail @@ -36,7 +36,7 @@ Wahlscheinkennung gueltig! [$name-line] (Real-Namen sind fuer diese Abstimmung vorgeschrieben. Wenn hier nicht Dein wirklicher Name steht, dann korrigiere die Zeile - bitte und sende die Nachricht erneut an die Abstimmadresse; + bitte und sende die Nachricht erneut an die Abstimmadresse, sonst kann die Stimme spaeter als ungueltig gewertet werden.) diff --git a/templates/wrong-voting b/templates/wrong-voting index 1d12e31..f233b7d 100644 --- a/templates/wrong-voting +++ b/templates/wrong-voting @@ -18,4 +18,4 @@ Hier die Mail, die ich erhalten habe: [$votetaker] -\[mit [$usevote_version]\] \ No newline at end of file +\[mit [$usevote_version]\] From 0d6bf22b47a0ff1e2296552c776013043441dbeb Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 18:53:19 +0100 Subject: [PATCH 39/80] Add .gitattributes --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto From 8f4c5219c4fa9bc91ae0bde3589046bec916b9d4 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 19:00:57 +0100 Subject: [PATCH 40/80] Add script to create votings. Signed-off-by: Thomas Hochstein --- createvote.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 createvote.sh diff --git a/createvote.sh b/createvote.sh new file mode 100644 index 0000000..d0f626c --- /dev/null +++ b/createvote.sh @@ -0,0 +1,9 @@ +#!/bin/bash +cd ~/usevote +mkdir $1 +cd $1 +sed s/LOCALPART/$1/g ../usevote.tpl.cfg > usevote.cfg +mkdir tmp +mkdir done + +echo "Voting $1 created!" From 6f31c0dc7a1739d305ae46715c316365f8002e95 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:24:02 +0100 Subject: [PATCH 41/80] Add "bdsg_confirm" to UVconf.pm Set default for "bdsg_confirm". Picked from upstream. Signed-off-by: Thomas Hochstein --- UVconfig.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/UVconfig.pm b/UVconfig.pm index a12aa56..aa3b883 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -90,6 +90,7 @@ sub read_config { nein_stimme => '(N\s*E\s*I\s*N|N|(D\s*A\s*)?G\s*E\s*G\s*E\s*N)', enth_stimme => '(E|E\s*N\s*T\s*H\s*A\s*L\s*T\s*U\s*N\s*G)', ann_stimme => 'A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G', + bdsg_confirm => 'JA', condition1 => '$yes>=2*$no', # twice as many yes as no condition2 => '$yes>=60', # min 60 yes votes prop_formula => '$yes/$no', From 10e21c1f971a4f207dd284508891c0d8127461ed Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:24:02 +0100 Subject: [PATCH 42/80] Add "bdsg_confirm" to UVconf.pm Set default for "bdsg_confirm". Picked from upstream. Signed-off-by: Thomas Hochstein --- UVconfig.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/UVconfig.pm b/UVconfig.pm index a12aa56..aa3b883 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -90,6 +90,7 @@ sub read_config { nein_stimme => '(N\s*E\s*I\s*N|N|(D\s*A\s*)?G\s*E\s*G\s*E\s*N)', enth_stimme => '(E|E\s*N\s*T\s*H\s*A\s*L\s*T\s*U\s*N\s*G)', ann_stimme => 'A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G', + bdsg_confirm => 'JA', condition1 => '$yes>=2*$no', # twice as many yes as no condition2 => '$yes>=60', # min 60 yes votes prop_formula => '$yes/$no', From e54a12d6183340adcd96e6e4afd25656321de3fc Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:26:55 +0100 Subject: [PATCH 43/80] Update UVconf.pm Change default for "condition2" to a minimum of 50 votes and add "ballotintro". Signed-off-by: Thomas Hochstein --- UVconfig.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UVconfig.pm b/UVconfig.pm index aa3b883..4cad06f 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -92,7 +92,7 @@ sub read_config { ann_stimme => 'A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G', bdsg_confirm => 'JA', condition1 => '$yes>=2*$no', # twice as many yes as no - condition2 => '$yes>=60', # min 60 yes votes + condition2 => '$yes>=50', # min 50 yes votes prop_formula => '$yes/$no', tpl_ack_mail => 'ack-mail', tpl_bouncelist => 'bouncelist', @@ -119,6 +119,7 @@ sub read_config { tpl_rule_violated => 'rule-violated', begin_divider => 'Alles vor dieser Zeile bitte loeschen', end_divider => 'Alles nach dieser Zeile bitte loeschen', + ballotintro => 'WAHLSCHEIN fuer', nametext => 'Dein Realname, falls nicht im FROM-Header:', nametext2 => 'Waehlername:', addresstext => 'Waehleradresse:', From 300f47d6164562e776a6a6b4efcd6125a629e710 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:37:53 +0100 Subject: [PATCH 44/80] Documentation: Add votename to UVmenu. Those new options to check the votename had not been added to the README file. Also fix a typo. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 2 +- README | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index e26eb94..cde0093 100644 --- a/CHANGES +++ b/CHANGES @@ -12,7 +12,7 @@ am Datenschutzhinweis (da bin ich eben in eine Falle von th-h getappt). Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. Es kam zu vielen False Positives -- Einlesen der Mailbox auf Perlmodule Mail::Box umgestellt, damit +- Einlesen der Mailbox auf Perlmodul Mail::Box umgestellt, damit auch Maildir moeglich (neue Option "mailboxtype" in usevote.cfg). Archivierung erfolgt aber vorerst weiterhin immer als mbox diff --git a/README b/README index 3746e04..c586961 100644 --- a/README +++ b/README @@ -412,6 +412,7 @@ Bestaetigen oder Aendern von Wahlschein-Eigenschaften: (4) Stimmen (5) Scheinkennung (6) Datenschutzklausel +(7) Abstimmung (i) Diese Stimme ignorieren (ohne Benachrichtigung verwerfen) (w) Weiter @@ -427,7 +428,7 @@ Nun solltest Du zunaechst mit (1) die Mail ansehen und anhand der bemaengelten Punkte entscheiden, ob der Wahlschein gueltig oder ungueltig ist bzw. welche Maengel tatsaechlich zutreffen. -Mit den Optionen (2) bis (6) kannst Du einzelne Eigenschaften +Mit den Optionen (2) bis (7) kannst Du einzelne Eigenschaften des Wahlscheins nachbessern (wenn Usevote z.B. einen Namen oder eine Stimme nicht korrekt erkannt hat) oder auch einfach die Korrektheit bestaetigen. From e91a2b7fa54667982a8c4822f892cda181e77356 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:33:47 +0100 Subject: [PATCH 45/80] Add option to compare ballot to sample ballot. It may be desriable to compare a ballot to a sample ballot when checking votes. * Add options "diff" and "sampleballotfile" to usevote.cfg an UVconfig.pm * Add menu option to UVmenu.pm Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 13 ++++++++----- README | 10 ++++++++++ UVconfig.pm | 2 ++ UVmenu.pm | 15 ++++++++++++++- messages.cfg | 1 + usevote.cfg | 7 +++++++ 6 files changed, 42 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index cde0093..064e2aa 100644 --- a/CHANGES +++ b/CHANGES @@ -3,11 +3,14 @@ UseVoteGer Versionshistorie (aktuelle Version: 4.11, released 25.09.2012) TODO: - aussortieren von Bounces aus Stimmenliste -- [Zugschlus] ich fänd es klasse, wenn man eine Kopie des Wahlscheines ins -Abstimmungsverzeichnis legt und Usevote einem dann auf Abruf ein diff -oder wdiff zwischen Sollwahlschein und wirklich eingreichtem -Wahlschein macht. Auf diese Weise erwischt man auch kleine Änderungen -am Datenschutzhinweis (da bin ich eben in eine Falle von th-h getappt). + +Version 4.12 (19.01.2014): +- neue Config-Optionen "diff" und "sampleballotfile" +- im Fehlermenue bei der Wahlscheinverarbeitung ist es nun moeglich, + mit der Option "0" einen Dateivergleich (diff) zwischen dem gemailten + Wahlschein und einem Musterwahlschein (wie im CfV geposted) zu starten. + Dazu muss die Config-Option "sampleballotfile" gesetzt und die Datei + vorhanden sein (Standard-Dateiname: ballot.sample) Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. diff --git a/README b/README index c586961..aa26972 100644 --- a/README +++ b/README @@ -324,6 +324,7 @@ ohne die .pl und .pm Dateien jedesmal mitzukopieren. Folgende Dateien sollten im Abstimmungsverzeichnis vorhanden sein (notwendig ist nur usevote.cfg, darin können alle anderen Pfade angepasst werden): +ballot.sample bdsgtext.cfg mailpatterns.cfg messages.cfg @@ -404,6 +405,7 @@ mit einzelnen Stimmen wirst Du interaktiv durch Menues gefuehrt. Meistens gibt es folgende Moeglichkeiten, die durch die eingeklammerten Buchstaben und Zahlen aufgerufen werden koennen: +(0) Wahlschein mit Original vergleichen (diff) (1) Anzeigen der Wahlmail Bestaetigen oder Aendern von Wahlschein-Eigenschaften: @@ -427,6 +429,9 @@ Teilweise gibt es Unteroptionen: Nun solltest Du zunaechst mit (1) die Mail ansehen und anhand der bemaengelten Punkte entscheiden, ob der Wahlschein gueltig oder ungueltig ist bzw. welche Maengel tatsaechlich zutreffen. +Mit (0) kannst Du einen Dateivergleich zu einem vorher hinterlegten +Musterwahlschein ausführen ("diff"), um Aenderungen/Fehler schneller +zu sehen. Mit den Optionen (2) bis (7) kannst Du einzelne Eigenschaften des Wahlscheins nachbessern (wenn Usevote z.B. einen Namen oder @@ -958,6 +963,7 @@ Hier eine Auflistung der immer anzupassenden Optionen votename Name der Abstimmung group1 Erster Abstimmungsgegenstand group2 Zweiter (und so weiter durchnummerieren) +sampleballotfile Datei mit Musterwahlschein aus dem CfV fuer Dateivergleich (diff) votefile Mailbox mit eingehenden Stimmen (falls POP3 ausgeschaltet) mailboxtype Typ der Mailbox (mbox, maildir) personal Personalisierte Wahlscheine verwenden? [BOOL] @@ -1026,6 +1032,10 @@ clearcmd Shellbefehl zum Loeschen des Bildschirms (Standard: clear), oder Betriebssystem keinen solchen Befehl bereitstellen, sollte ein Kommando verwendet werden, welches eine Trennlinie oder aehnliches auf dem Bildschirm ausgibt, z.B. mit "echo" +diff Shellbefehl zum Dateivergleich (diff); es koennen auch + Parameter angegeben werden, z.B. "diff -u". Das verwendete + Programm muss das Lesen einer Datei von STDIN erlauben + ("-" statt Dateinamen fuer Einlesen von Standardeingabekanal) pager Shellbefehl zum seitenweisen Darstellen von Mails auf dem Bildschirm (normalerweise "less"). Unter Windows muss "more" benutzt werden, unter Unix hingegen gibt es moeglicherweise diff --git a/UVconfig.pm b/UVconfig.pm index aa3b883..2df748f 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -27,6 +27,7 @@ sub read_config { # Default configuration options (overwritten in usevote.cfg) %config = (votefile => "votes", votename => "unkonfiguriertes Usevote", + sampleballotfile => "ballot.sample", resultfile => "ergebnis.alle", rulefile => "usevote.rul", badaddrfile => "mailpatterns.cfg", @@ -57,6 +58,7 @@ sub read_config { mailcc => "", sleepcmd => "sleep 1", clearcmd => "clear", + diff => "diff", pager => "less", pop3 => 0, pop3server => "localhost", diff --git a/UVmenu.pm b/UVmenu.pm index 46eb779..486bb2c 100644 --- a/UVmenu.pm +++ b/UVmenu.pm @@ -69,6 +69,12 @@ sub menu { my $menucaption = UVmessage::get("MENU_CAPTION"); print "\n\n$menucaption\n"; print "=" x length($menucaption), "\n\n"; + + # don't print this option if called from uvcfv.pl + unless ($mailonly) { + print "(0) ", UVmessage::get("MENU_DIFF_BALLOT"), "\n"; + } + print "(1) ", UVmessage::get("MENU_SHOW_MAIL"), "\n\n", UVmessage::get("MENU_CHANGE_PROPERTIES"), "\n", "(2) ", UVmessage::get("MENU_ADDRESS"), " [$voter_addr]\n"; @@ -95,7 +101,14 @@ sub menu { # only accept 1, 2, i and w if called from uvcfv.pl next if ($mailonly && $input !~ /^[12iw]$/i); - if ($input eq '1') { + if ($input eq '0') { + # ignore SIGPIPE (Bug in more and less) + $SIG{PIPE} = 'IGNORE'; + open (DIFF, "|$config{diff} - $config{sampleballotfile} | $config{pager}"); + print DIFF $$body, "\n"; + close (DIFF); + + } elsif ($input eq '1') { system($config{clearcmd}); # ignore SIGPIPE (Bug in more and less) $SIG{PIPE} = 'IGNORE'; diff --git a/messages.cfg b/messages.cfg index 6c9b339..e1f1b13 100644 --- a/messages.cfg +++ b/messages.cfg @@ -42,6 +42,7 @@ MENU_UNRECOGNIZED_LIST = Stimme MENU_VIOLATEDRULE = Regel ${RULE} verletzt. MENU_PROBLEMS = Die folgenden Probleme muessen beseitigt werden: MENU_CAPTION = Auswahlmenue: +MENU_DIFF_BALLOT = Wahlschein mit Original vergleichen (diff) MENU_SHOW_MAIL = Anzeigen der Wahlmail MENU_CHANGE_PROPERTIES = Bestaetigen oder Aendern von Wahlschein-Eigenschaften: MENU_ADDRESS = Mailadresse diff --git a/usevote.cfg b/usevote.cfg index 20f4bc9..8e0ada3 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -77,6 +77,10 @@ multigroup = 1 condition1 = $yes>=2*$no condition2 = $yes>=50 +# Datei mit Musterwahlschein, wie er im CfV geposted wurde. Wird fuer +# Vergleich mit ankommenden Wahlscheinen per "diff" genutzt. +sampleballotfile = ballot.sample + # Ergebnisdatei, in der alle Einzelergebniss zusammengeschrieben werden # (wird bei jedem Programmlauf neu erstellt!) resultfile = ergebnis.alle @@ -208,6 +212,9 @@ clearcmd = clear # Windows-Verzeichnis kopieren (URL siehe README-Datei) pager = less +# Shellbefehl fuer Dateivergleich +diff = diff + # Datei mit diversen Meldungen und Textfragmenten (Resourcendatei) messagefile = messages.cfg From 7450382ef39c57c7092fcb5a75015aff17ab15b2 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:35:34 +0100 Subject: [PATCH 46/80] Fix UVreadmail.pm Use filename from function call. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 3 +++ README | 4 ++++ UVreadmail.pm | 16 ++++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 064e2aa..e1c4529 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ TODO: - aussortieren von Bounces aus Stimmenliste Version 4.12 (19.01.2014): +- uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen + Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg + (Bugfix in UVreadmail.pm) - neue Config-Optionen "diff" und "sampleballotfile" - im Fehlermenue bei der Wahlscheinverarbeitung ist es nun moeglich, mit der Option "0" einen Dateivergleich (diff) zwischen dem gemailten diff --git a/README b/README index aa26972..9f2be7e 100644 --- a/README +++ b/README @@ -691,6 +691,10 @@ uvbounce.pl eingeschaltet und die Option -f (siehe unten) nicht benutzt wurde, werden die uebergebenen Dateinamen ignoriert. + Die Mails werden aus den uebergebenen Mailboxdateien geloescht + und statt dessen in einer neuen Datei mit der Erweiterung ".processed" + gespeichert. + Die Vorlage fuer die ausgegebene Liste ist im templates- Unterverzeichnis konfigurierbar (Datei "bouncelist"). diff --git a/UVreadmail.pm b/UVreadmail.pm index 01d062f..ac1b843 100644 --- a/UVreadmail.pm +++ b/UVreadmail.pm @@ -124,18 +124,30 @@ sub process { # Mailbox / Maildir } else { + my $readfilename; + + if ($caller==0) { + # called from uvvote.pl: use configured mailbox file + $readfilename = $config{votefile}; + } else { + # else use filename provided in function call + $readfilename = $filename; + # and create backup archive filename + $filename .= '.processed'; + } + my $mgr = Mail::Box::Manager->new; my $folder; eval{ - $folder = $mgr->open( folder => $config{votefile}, + $folder = $mgr->open( folder => $readfilename, create => 0, access => 'rw', type => $config{mailboxtype}, expand => 'LAZY', ); }; - die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $config{votefile})) . "\n\n" if $@; + die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $readfilename)) . "\n\n" if $@; # Iterate over the messages. foreach (@$folder) { From c50a97a62ca4a74c142a4a23ccb1f84d88083741 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:36:07 +0100 Subject: [PATCH 47/80] Don't remove empty mailbox files/maildirs. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 3 +++ UVreadmail.pm | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index e1c4529..6ccc966 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,9 @@ Version 4.12 (19.01.2014): - uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg (Bugfix in UVreadmail.pm) +- UVreadmail.pm laesst nun Mailboxdateien bzw. -ordner bestehen, + auch wenn sie leer sind, um Kompatibiliaetsprobleme mit anderen + Programmen zu vermeiden - neue Config-Optionen "diff" und "sampleballotfile" - im Fehlermenue bei der Wahlscheinverarbeitung ist es nun moeglich, mit der Option "0" einen Dateivergleich (diff) zwischen dem gemailten diff --git a/UVreadmail.pm b/UVreadmail.pm index ac1b843..35dda15 100644 --- a/UVreadmail.pm +++ b/UVreadmail.pm @@ -145,6 +145,7 @@ sub process { access => 'rw', type => $config{mailboxtype}, expand => 'LAZY', + remove_when_empty => 0, ); }; die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $readfilename)) . "\n\n" if $@; From 7ae85f86e37d9040cc0925d7375d54492011ab53 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:36:28 +0100 Subject: [PATCH 48/80] Add correct timestamp to mbox when processing. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 3 +++ UVreadmail.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6ccc966..f73d3d8 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,9 @@ Version 4.12 (19.01.2014): - uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg (Bugfix in UVreadmail.pm) +- UVreadmail.pm setzt beim Schreiben eines Mailarchivs nun einen + Timestamp in der mbox-Fromline, der aus der Mail stammt + (timestamp()-Funktion von Mail::Box) statt dem aktuellen Datum - UVreadmail.pm laesst nun Mailboxdateien bzw. -ordner bestehen, auch wenn sie leer sind, um Kompatibiliaetsprobleme mit anderen Programmen zu vermeiden diff --git a/UVreadmail.pm b/UVreadmail.pm index 35dda15..0a1f98f 100644 --- a/UVreadmail.pm +++ b/UVreadmail.pm @@ -162,7 +162,7 @@ sub process { } else { $fromline .= 'foo@bar.invalid'; } - $fromline .= ' ' . localtime() . "\n"; #strftime ('%a %b %d %H:%M:%S %Y', localtime) . "\n"; + $fromline .= ' ' . localtime($_->timestamp()) . "\n"; push (@mails, $fromline . $mail); } } From 62d56462b42ca2a59066c22bf7839eecec3e206b Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:37:39 +0100 Subject: [PATCH 49/80] Update documentation to 4.12. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 2 +- README | 4 ++-- UVconfig.pm | 2 +- uvballot.pl | 4 ++-- uvbounce.pl | 4 ++-- uvcfv.pl | 4 ++-- uvcount.pl | 4 ++-- uvvote.pl | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CHANGES b/CHANGES index f73d3d8..4afa606 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.11, released 25.09.2012) +UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 19.01.2014) ========================================================================= TODO: diff --git a/README b/README index 9f2be7e..286e1ad 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -UseVoteGer 4.11 (c) 2001-2012 Marc Langer +UseVoteGer 4.12 (c) 2001-2014 Marc Langer UseVoteGer is a voting software for usenet votes. @@ -18,7 +18,7 @@ written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ------------------------------------------------------------------------------- -UseVoteGer 4.11 - Usenet-Abstimmungssoftware +UseVoteGer 4.12 - Usenet-Abstimmungssoftware =========================================== von Marc Langer diff --git a/UVconfig.pm b/UVconfig.pm index 2df748f..571ab69 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -18,7 +18,7 @@ require Exporter; $VERSION = "0.18"; # Usevote version -$usevote_version = "UseVoteGer 4.11"; +$usevote_version = "UseVoteGer 4.12"; sub read_config { diff --git a/uvballot.pl b/uvballot.pl index 6933233..7d7ff27 100644 --- a/uvballot.pl +++ b/uvballot.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Wahlscheingenerierung -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Wahlscheingenerierung +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvbounce.pl b/uvbounce.pl index 03f1e1d..4375bf3 100644 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Bounce-Verarbeitung -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Bounce-Verarbeitung +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcfv.pl b/uvcfv.pl index a053e77..275da9b 100644 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Personalisierte Wahlscheine -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Personalisierte Wahlscheine +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcount.pl b/uvcount.pl index 11af9c1..4e1ea57 100644 --- a/uvcount.pl +++ b/uvcount.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Stimmauswertung -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Stimmauswertung +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvvote.pl b/uvvote.pl index 4b3b2b1..0e7e2bd 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Wahldurchfuehrung -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Wahldurchfuehrung +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the From dc651b428363dfeea82fd030905711b8d96ea9b4 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:37:53 +0100 Subject: [PATCH 50/80] Documentation: Add votename to UVmenu. Those new options to check the votename had not been added to the README file. Also fix a typo. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 2 +- README | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index e26eb94..cde0093 100644 --- a/CHANGES +++ b/CHANGES @@ -12,7 +12,7 @@ am Datenschutzhinweis (da bin ich eben in eine Falle von th-h getappt). Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. Es kam zu vielen False Positives -- Einlesen der Mailbox auf Perlmodule Mail::Box umgestellt, damit +- Einlesen der Mailbox auf Perlmodul Mail::Box umgestellt, damit auch Maildir moeglich (neue Option "mailboxtype" in usevote.cfg). Archivierung erfolgt aber vorerst weiterhin immer als mbox diff --git a/README b/README index 3746e04..c586961 100644 --- a/README +++ b/README @@ -412,6 +412,7 @@ Bestaetigen oder Aendern von Wahlschein-Eigenschaften: (4) Stimmen (5) Scheinkennung (6) Datenschutzklausel +(7) Abstimmung (i) Diese Stimme ignorieren (ohne Benachrichtigung verwerfen) (w) Weiter @@ -427,7 +428,7 @@ Nun solltest Du zunaechst mit (1) die Mail ansehen und anhand der bemaengelten Punkte entscheiden, ob der Wahlschein gueltig oder ungueltig ist bzw. welche Maengel tatsaechlich zutreffen. -Mit den Optionen (2) bis (6) kannst Du einzelne Eigenschaften +Mit den Optionen (2) bis (7) kannst Du einzelne Eigenschaften des Wahlscheins nachbessern (wenn Usevote z.B. einen Namen oder eine Stimme nicht korrekt erkannt hat) oder auch einfach die Korrektheit bestaetigen. From 7a0133efe6aee88665360c5d6ae57f1d2d543884 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:33:47 +0100 Subject: [PATCH 51/80] Add option to compare ballot to sample ballot. It may be desriable to compare a ballot to a sample ballot when checking votes. * Add options "diff" and "sampleballotfile" to usevote.cfg an UVconfig.pm * Add menu option to UVmenu.pm Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 13 ++++++++----- README | 10 ++++++++++ UVconfig.pm | 2 ++ UVmenu.pm | 15 ++++++++++++++- messages.cfg | 1 + usevote.cfg | 7 +++++++ 6 files changed, 42 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index cde0093..064e2aa 100644 --- a/CHANGES +++ b/CHANGES @@ -3,11 +3,14 @@ UseVoteGer Versionshistorie (aktuelle Version: 4.11, released 25.09.2012) TODO: - aussortieren von Bounces aus Stimmenliste -- [Zugschlus] ich fänd es klasse, wenn man eine Kopie des Wahlscheines ins -Abstimmungsverzeichnis legt und Usevote einem dann auf Abruf ein diff -oder wdiff zwischen Sollwahlschein und wirklich eingreichtem -Wahlschein macht. Auf diese Weise erwischt man auch kleine Änderungen -am Datenschutzhinweis (da bin ich eben in eine Falle von th-h getappt). + +Version 4.12 (19.01.2014): +- neue Config-Optionen "diff" und "sampleballotfile" +- im Fehlermenue bei der Wahlscheinverarbeitung ist es nun moeglich, + mit der Option "0" einen Dateivergleich (diff) zwischen dem gemailten + Wahlschein und einem Musterwahlschein (wie im CfV geposted) zu starten. + Dazu muss die Config-Option "sampleballotfile" gesetzt und die Datei + vorhanden sein (Standard-Dateiname: ballot.sample) Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. diff --git a/README b/README index c586961..aa26972 100644 --- a/README +++ b/README @@ -324,6 +324,7 @@ ohne die .pl und .pm Dateien jedesmal mitzukopieren. Folgende Dateien sollten im Abstimmungsverzeichnis vorhanden sein (notwendig ist nur usevote.cfg, darin können alle anderen Pfade angepasst werden): +ballot.sample bdsgtext.cfg mailpatterns.cfg messages.cfg @@ -404,6 +405,7 @@ mit einzelnen Stimmen wirst Du interaktiv durch Menues gefuehrt. Meistens gibt es folgende Moeglichkeiten, die durch die eingeklammerten Buchstaben und Zahlen aufgerufen werden koennen: +(0) Wahlschein mit Original vergleichen (diff) (1) Anzeigen der Wahlmail Bestaetigen oder Aendern von Wahlschein-Eigenschaften: @@ -427,6 +429,9 @@ Teilweise gibt es Unteroptionen: Nun solltest Du zunaechst mit (1) die Mail ansehen und anhand der bemaengelten Punkte entscheiden, ob der Wahlschein gueltig oder ungueltig ist bzw. welche Maengel tatsaechlich zutreffen. +Mit (0) kannst Du einen Dateivergleich zu einem vorher hinterlegten +Musterwahlschein ausführen ("diff"), um Aenderungen/Fehler schneller +zu sehen. Mit den Optionen (2) bis (7) kannst Du einzelne Eigenschaften des Wahlscheins nachbessern (wenn Usevote z.B. einen Namen oder @@ -958,6 +963,7 @@ Hier eine Auflistung der immer anzupassenden Optionen votename Name der Abstimmung group1 Erster Abstimmungsgegenstand group2 Zweiter (und so weiter durchnummerieren) +sampleballotfile Datei mit Musterwahlschein aus dem CfV fuer Dateivergleich (diff) votefile Mailbox mit eingehenden Stimmen (falls POP3 ausgeschaltet) mailboxtype Typ der Mailbox (mbox, maildir) personal Personalisierte Wahlscheine verwenden? [BOOL] @@ -1026,6 +1032,10 @@ clearcmd Shellbefehl zum Loeschen des Bildschirms (Standard: clear), oder Betriebssystem keinen solchen Befehl bereitstellen, sollte ein Kommando verwendet werden, welches eine Trennlinie oder aehnliches auf dem Bildschirm ausgibt, z.B. mit "echo" +diff Shellbefehl zum Dateivergleich (diff); es koennen auch + Parameter angegeben werden, z.B. "diff -u". Das verwendete + Programm muss das Lesen einer Datei von STDIN erlauben + ("-" statt Dateinamen fuer Einlesen von Standardeingabekanal) pager Shellbefehl zum seitenweisen Darstellen von Mails auf dem Bildschirm (normalerweise "less"). Unter Windows muss "more" benutzt werden, unter Unix hingegen gibt es moeglicherweise diff --git a/UVconfig.pm b/UVconfig.pm index a12aa56..fddc363 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -27,6 +27,7 @@ sub read_config { # Default configuration options (overwritten in usevote.cfg) %config = (votefile => "votes", votename => "unkonfiguriertes Usevote", + sampleballotfile => "ballot.sample", resultfile => "ergebnis.alle", rulefile => "usevote.rul", badaddrfile => "mailpatterns.cfg", @@ -57,6 +58,7 @@ sub read_config { mailcc => "", sleepcmd => "sleep 1", clearcmd => "clear", + diff => "diff", pager => "less", pop3 => 0, pop3server => "localhost", diff --git a/UVmenu.pm b/UVmenu.pm index 5d96c8e..15cc5d4 100644 --- a/UVmenu.pm +++ b/UVmenu.pm @@ -70,6 +70,12 @@ sub menu { my $menucaption = UVmessage::get("MENU_CAPTION"); print "\n\n$menucaption\n"; print "=" x length($menucaption), "\n\n"; + + # don't print this option if called from uvcfv.pl + unless ($mailonly) { + print "(0) ", UVmessage::get("MENU_DIFF_BALLOT"), "\n"; + } + print "(1) ", UVmessage::get("MENU_SHOW_MAIL"), "\n\n", UVmessage::get("MENU_CHANGE_PROPERTIES"), "\n", "(2) ", UVmessage::get("MENU_ADDRESS"), " [$voter_addr]\n"; @@ -96,7 +102,14 @@ sub menu { # only accept 1, 2, i and w if called from uvcfv.pl next if ($mailonly && $input !~ /^[12iw]$/i); - if ($input eq '1') { + if ($input eq '0') { + # ignore SIGPIPE (Bug in more and less) + $SIG{PIPE} = 'IGNORE'; + open (DIFF, "|$config{diff} - $config{sampleballotfile} | $config{pager}"); + print DIFF $$body, "\n"; + close (DIFF); + + } elsif ($input eq '1') { system($config{clearcmd}); # ignore SIGPIPE (Bug in more and less) $SIG{PIPE} = 'IGNORE'; diff --git a/messages.cfg b/messages.cfg index 6c9b339..e1f1b13 100644 --- a/messages.cfg +++ b/messages.cfg @@ -42,6 +42,7 @@ MENU_UNRECOGNIZED_LIST = Stimme MENU_VIOLATEDRULE = Regel ${RULE} verletzt. MENU_PROBLEMS = Die folgenden Probleme muessen beseitigt werden: MENU_CAPTION = Auswahlmenue: +MENU_DIFF_BALLOT = Wahlschein mit Original vergleichen (diff) MENU_SHOW_MAIL = Anzeigen der Wahlmail MENU_CHANGE_PROPERTIES = Bestaetigen oder Aendern von Wahlschein-Eigenschaften: MENU_ADDRESS = Mailadresse diff --git a/usevote.cfg b/usevote.cfg index c472b45..333f574 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -77,6 +77,10 @@ multigroup = 1 condition1 = $yes>=2*$no condition2 = $yes>=50 +# Datei mit Musterwahlschein, wie er im CfV geposted wurde. Wird fuer +# Vergleich mit ankommenden Wahlscheinen per "diff" genutzt. +sampleballotfile = ballot.sample + # Ergebnisdatei, in der alle Einzelergebniss zusammengeschrieben werden # (wird bei jedem Programmlauf neu erstellt!) resultfile = ergebnis.alle @@ -207,6 +211,9 @@ clearcmd = clear # Windows-Verzeichnis kopieren (URL siehe README-Datei) pager = less +# Shellbefehl fuer Dateivergleich +diff = diff + # Datei mit diversen Meldungen und Textfragmenten (Resourcendatei) messagefile = messages.cfg From 98343f2272a7c8ad7bdd2054b6028eb3b5a9252d Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:35:34 +0100 Subject: [PATCH 52/80] Fix UVreadmail.pm Use filename from function call. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 3 +++ README | 4 ++++ UVreadmail.pm | 16 ++++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 064e2aa..e1c4529 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ TODO: - aussortieren von Bounces aus Stimmenliste Version 4.12 (19.01.2014): +- uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen + Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg + (Bugfix in UVreadmail.pm) - neue Config-Optionen "diff" und "sampleballotfile" - im Fehlermenue bei der Wahlscheinverarbeitung ist es nun moeglich, mit der Option "0" einen Dateivergleich (diff) zwischen dem gemailten diff --git a/README b/README index aa26972..9f2be7e 100644 --- a/README +++ b/README @@ -691,6 +691,10 @@ uvbounce.pl eingeschaltet und die Option -f (siehe unten) nicht benutzt wurde, werden die uebergebenen Dateinamen ignoriert. + Die Mails werden aus den uebergebenen Mailboxdateien geloescht + und statt dessen in einer neuen Datei mit der Erweiterung ".processed" + gespeichert. + Die Vorlage fuer die ausgegebene Liste ist im templates- Unterverzeichnis konfigurierbar (Datei "bouncelist"). diff --git a/UVreadmail.pm b/UVreadmail.pm index 01d062f..ac1b843 100644 --- a/UVreadmail.pm +++ b/UVreadmail.pm @@ -124,18 +124,30 @@ sub process { # Mailbox / Maildir } else { + my $readfilename; + + if ($caller==0) { + # called from uvvote.pl: use configured mailbox file + $readfilename = $config{votefile}; + } else { + # else use filename provided in function call + $readfilename = $filename; + # and create backup archive filename + $filename .= '.processed'; + } + my $mgr = Mail::Box::Manager->new; my $folder; eval{ - $folder = $mgr->open( folder => $config{votefile}, + $folder = $mgr->open( folder => $readfilename, create => 0, access => 'rw', type => $config{mailboxtype}, expand => 'LAZY', ); }; - die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $config{votefile})) . "\n\n" if $@; + die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $readfilename)) . "\n\n" if $@; # Iterate over the messages. foreach (@$folder) { From 52a699fdc7ca85459f1796d686e458f91e0fe396 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:36:07 +0100 Subject: [PATCH 53/80] Don't remove empty mailbox files/maildirs. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 3 +++ UVreadmail.pm | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index e1c4529..6ccc966 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,9 @@ Version 4.12 (19.01.2014): - uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg (Bugfix in UVreadmail.pm) +- UVreadmail.pm laesst nun Mailboxdateien bzw. -ordner bestehen, + auch wenn sie leer sind, um Kompatibiliaetsprobleme mit anderen + Programmen zu vermeiden - neue Config-Optionen "diff" und "sampleballotfile" - im Fehlermenue bei der Wahlscheinverarbeitung ist es nun moeglich, mit der Option "0" einen Dateivergleich (diff) zwischen dem gemailten diff --git a/UVreadmail.pm b/UVreadmail.pm index ac1b843..35dda15 100644 --- a/UVreadmail.pm +++ b/UVreadmail.pm @@ -145,6 +145,7 @@ sub process { access => 'rw', type => $config{mailboxtype}, expand => 'LAZY', + remove_when_empty => 0, ); }; die UVmessage::get("READMAIL_NOMAILFILE", (FILE => $readfilename)) . "\n\n" if $@; From 3cb13d5a31d66e59c437148a0d96d2ae1c3046ae Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:36:28 +0100 Subject: [PATCH 54/80] Add correct timestamp to mbox when processing. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 3 +++ UVreadmail.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6ccc966..f73d3d8 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,9 @@ Version 4.12 (19.01.2014): - uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg (Bugfix in UVreadmail.pm) +- UVreadmail.pm setzt beim Schreiben eines Mailarchivs nun einen + Timestamp in der mbox-Fromline, der aus der Mail stammt + (timestamp()-Funktion von Mail::Box) statt dem aktuellen Datum - UVreadmail.pm laesst nun Mailboxdateien bzw. -ordner bestehen, auch wenn sie leer sind, um Kompatibiliaetsprobleme mit anderen Programmen zu vermeiden diff --git a/UVreadmail.pm b/UVreadmail.pm index 35dda15..0a1f98f 100644 --- a/UVreadmail.pm +++ b/UVreadmail.pm @@ -162,7 +162,7 @@ sub process { } else { $fromline .= 'foo@bar.invalid'; } - $fromline .= ' ' . localtime() . "\n"; #strftime ('%a %b %d %H:%M:%S %Y', localtime) . "\n"; + $fromline .= ' ' . localtime($_->timestamp()) . "\n"; push (@mails, $fromline . $mail); } } From 1135267f4466b150afd2737109ec5eb0d33d3055 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:37:39 +0100 Subject: [PATCH 55/80] Update documentation to 4.12. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 2 +- README | 4 ++-- UVconfig.pm | 2 +- uvballot.pl | 4 ++-- uvbounce.pl | 4 ++-- uvcfv.pl | 4 ++-- uvcount.pl | 4 ++-- uvvote.pl | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CHANGES b/CHANGES index f73d3d8..4afa606 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.11, released 25.09.2012) +UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 19.01.2014) ========================================================================= TODO: diff --git a/README b/README index 9f2be7e..286e1ad 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -UseVoteGer 4.11 (c) 2001-2012 Marc Langer +UseVoteGer 4.12 (c) 2001-2014 Marc Langer UseVoteGer is a voting software for usenet votes. @@ -18,7 +18,7 @@ written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ------------------------------------------------------------------------------- -UseVoteGer 4.11 - Usenet-Abstimmungssoftware +UseVoteGer 4.12 - Usenet-Abstimmungssoftware =========================================== von Marc Langer diff --git a/UVconfig.pm b/UVconfig.pm index fddc363..4cd5d85 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -18,7 +18,7 @@ require Exporter; $VERSION = "0.18"; # Usevote version -$usevote_version = "UseVoteGer 4.11"; +$usevote_version = "UseVoteGer 4.12"; sub read_config { diff --git a/uvballot.pl b/uvballot.pl index 6933233..7d7ff27 100755 --- a/uvballot.pl +++ b/uvballot.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Wahlscheingenerierung -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Wahlscheingenerierung +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvbounce.pl b/uvbounce.pl index 03f1e1d..4375bf3 100755 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Bounce-Verarbeitung -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Bounce-Verarbeitung +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcfv.pl b/uvcfv.pl index a053e77..275da9b 100755 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Personalisierte Wahlscheine -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Personalisierte Wahlscheine +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcount.pl b/uvcount.pl index 11af9c1..4e1ea57 100755 --- a/uvcount.pl +++ b/uvcount.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Stimmauswertung -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Stimmauswertung +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvvote.pl b/uvvote.pl index 8e8fb68..c101f1f 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.11 Wahldurchfuehrung -# (c) 2001-2012 Marc Langer +# UseVoteGer 4.12 Wahldurchfuehrung +# (c) 2001-2014 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the From ef9dd9e761e4b44349f2eec75287917d7b652742 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 16 Feb 2014 13:51:18 +0100 Subject: [PATCH 56/80] Fix whitespace and typo. Remove umlaut in README and fix a whitespace issue in UVmenu.pm Signed-off-by: Thomas Hochstein --- README | 2 +- UVmenu.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 286e1ad..fec87c8 100644 --- a/README +++ b/README @@ -430,7 +430,7 @@ Nun solltest Du zunaechst mit (1) die Mail ansehen und anhand der bemaengelten Punkte entscheiden, ob der Wahlschein gueltig oder ungueltig ist bzw. welche Maengel tatsaechlich zutreffen. Mit (0) kannst Du einen Dateivergleich zu einem vorher hinterlegten -Musterwahlschein ausführen ("diff"), um Aenderungen/Fehler schneller +Musterwahlschein ausfuehren ("diff"), um Aenderungen/Fehler schneller zu sehen. Mit den Optionen (2) bis (7) kannst Du einzelne Eigenschaften diff --git a/UVmenu.pm b/UVmenu.pm index 15cc5d4..07e32c8 100644 --- a/UVmenu.pm +++ b/UVmenu.pm @@ -108,7 +108,7 @@ sub menu { open (DIFF, "|$config{diff} - $config{sampleballotfile} | $config{pager}"); print DIFF $$body, "\n"; close (DIFF); - + } elsif ($input eq '1') { system($config{clearcmd}); # ignore SIGPIPE (Bug in more and less) From 3aca529725c836e6aa7968f462cff67cb63e0e60 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 19 Mar 2014 21:43:48 +0100 Subject: [PATCH 57/80] Add votename to Menu. Display the current voting's description. Also purge some dead code. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 3 +++ UVmenu.pm | 19 ++----------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/CHANGES b/CHANGES index 4afa606..f911feb 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,9 @@ Version 4.12 (19.01.2014): Wahlschein und einem Musterwahlschein (wie im CfV geposted) zu starten. Dazu muss die Config-Option "sampleballotfile" gesetzt und die Datei vorhanden sein (Standard-Dateiname: ballot.sample) +- im Fehlermenue wird nun der Name der Abstimmung als Ueberschrift + angezeigt. Ausserdem wurde in UVmenu.pm ein redundanter Code-Abschnitt + entfernt Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. diff --git a/UVmenu.pm b/UVmenu.pm index 486bb2c..07e32c8 100644 --- a/UVmenu.pm +++ b/UVmenu.pm @@ -60,6 +60,7 @@ sub menu { while (1) { system($config{clearcmd}); + print "-> $config{votename} <-\n"; print UVmessage::get("MENU_PROBLEMS") . "\n"; foreach my $error (keys %errors) { @@ -107,7 +108,7 @@ sub menu { open (DIFF, "|$config{diff} - $config{sampleballotfile} | $config{pager}"); print DIFF $$body, "\n"; close (DIFF); - + } elsif ($input eq '1') { system($config{clearcmd}); # ignore SIGPIPE (Bug in more and less) @@ -300,22 +301,6 @@ sub menu { $errors{WrongVoting} = UVmessage::get("MENU_WRONGVOTING"); } - } elsif ($input eq '7') { - my $sel; - do { - print "[a] ", UVmessage::get("MENU_VOTING_CORRECT"), "\n", - "[b] ", UVmessage::get("MENU_VOTING_WRONG"), "\n\n", - UVmessage::get("MENU_PROMPT"); - $sel = ; - } until ($sel =~ /^[ab]$/i); - - if ($sel =~ /^a$/i) { - delete $errors{NoVoting}; - delete $errors{WrongVoting}; - } else { - $errors{WrongVoting} = UVmessage::get("MENU_WRONGVOTING"); - } - } elsif ($input =~ /^i$/i) { my $ignore = UVmessage::get("MENU_IGNORE_STRING"); # Set columns for Text::Wrap From f5828d9fad01f6e4ec78b5a6c00db848b0ba2018 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 19 Mar 2014 21:45:08 +0100 Subject: [PATCH 58/80] Enforce strict response for data protection clause. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 3 +++ usevote.cfg | 4 ++++ uvvote.pl | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index f911feb..ba7460a 100644 --- a/CHANGES +++ b/CHANGES @@ -23,6 +23,9 @@ Version 4.12 (19.01.2014): - im Fehlermenue wird nun der Name der Abstimmung als Ueberschrift angezeigt. Ausserdem wurde in UVmenu.pm ein redundanter Code-Abschnitt entfernt +- BDSG-Klausel muss nun standardmaessig zwingend mit JA beantwortet + werden, DAFUER wird nicht mehr akzeptiert. Dies kann in usevote.cfg + konfiguriert werden Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. diff --git a/usevote.cfg b/usevote.cfg index 8e0ada3..eb99d33 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -281,6 +281,10 @@ enth_stimme = (E|E\s*N\s*T\s*H\s*A\s*L\s*T\s*U\s*N\s*G) # Achtung, sollte auch in den Templates im Bestaetigungstext angepasst werden ann_stimme = A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G +# RegExp fuer Bestaetigung der Datenschutzklause (case-insensitive) +# Standardmaessig wird nur JA erkannt +bdsg_confirm = JA + # Template files (these files are in the template directory defined above) tpl_mailheader = "mailheader" # generally used mail header tpl_bouncelist = "bouncelist" # used by uvbounce.pl diff --git a/uvvote.pl b/uvvote.pl index 0e7e2bd..a82874a 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -319,7 +319,7 @@ sub process_vote { # Should read like this: #a [ STIMME ] Text # (Text is configurable in usevote.cfg) unless ($$body =~ /$bdsg_regexp/s && - $$body =~ /#a\W*?\[\W*?$config{ja_stimme}\W*?\]\W*?$bdsg2_regexp/is) { + $$body =~ /#a\W*?\[\W*?$config{bdsg_confirm}\W*?\]\W*?$bdsg2_regexp/is) { push (@errors, 'InvalidBDSG'); } From 3ab56bde53da7d77b3119e6793059aa9689e0d11 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 19 Mar 2014 21:46:32 +0100 Subject: [PATCH 59/80] Correctly find $votename. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 2 ++ UVconfig.pm | 1 + uvvote.pl | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ba7460a..5067501 100644 --- a/CHANGES +++ b/CHANGES @@ -26,6 +26,8 @@ Version 4.12 (19.01.2014): - BDSG-Klausel muss nun standardmaessig zwingend mit JA beantwortet werden, DAFUER wird nicht mehr akzeptiert. Dies kann in usevote.cfg konfiguriert werden +- Regular Expression fuer Pruefung des Abstimmungsnamens weiter + verbessert Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. diff --git a/UVconfig.pm b/UVconfig.pm index 571ab69..1c64b14 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -121,6 +121,7 @@ sub read_config { tpl_rule_violated => 'rule-violated', begin_divider => 'Alles vor dieser Zeile bitte loeschen', end_divider => 'Alles nach dieser Zeile bitte loeschen', + ballotintro => 'WAHLSCHEIN fuer', nametext => 'Dein Realname, falls nicht im FROM-Header:', nametext2 => 'Waehlername:', addresstext => 'Waehleradresse:', diff --git a/uvvote.pl b/uvvote.pl index a82874a..c101f1f 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -231,9 +231,9 @@ sub process_vote { } # correct voting? - if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)[^\S\n]*\n([>:|]*?[\t ]+(\S+.+)\s*$)?/m) { + if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n([>:|]*?[\t ]+(\S+.+)\s*$)?/m) { $voting = $1; - $voting .= " $3" if defined($3); + $voting .= " $3" if (defined($3) and $3 !~ /\Q$config{nametext}\E/); push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/); } else { push (@errors, 'NoVoting'); From 923dc1773ec7aac5b3600730945ba2e0d12e76df Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 19 Mar 2014 21:48:02 +0100 Subject: [PATCH 60/80] Change quorum default value to 50 "JA" votes. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 1 + UVconfig.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5067501..162d6c6 100644 --- a/CHANGES +++ b/CHANGES @@ -28,6 +28,7 @@ Version 4.12 (19.01.2014): konfiguriert werden - Regular Expression fuer Pruefung des Abstimmungsnamens weiter verbessert +- Standardwert fuer Mindest-JA-Stimmenzahl von 60 auf 50 verringert Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. diff --git a/UVconfig.pm b/UVconfig.pm index 1c64b14..f78e3b9 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -94,7 +94,7 @@ sub read_config { ann_stimme => 'A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G', bdsg_confirm => 'JA', condition1 => '$yes>=2*$no', # twice as many yes as no - condition2 => '$yes>=60', # min 60 yes votes + condition2 => '$yes>=50', # min 60 yes votes prop_formula => '$yes/$no', tpl_ack_mail => 'ack-mail', tpl_bouncelist => 'bouncelist', From 6f88a29957653b1a7719f1ad11c8d48ee98cfc48 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 19 Mar 2014 21:48:25 +0100 Subject: [PATCH 61/80] Fix typo in README. Picked from upstream. Signed-off-by: Thomas Hochstein --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 286e1ad..fec87c8 100644 --- a/README +++ b/README @@ -430,7 +430,7 @@ Nun solltest Du zunaechst mit (1) die Mail ansehen und anhand der bemaengelten Punkte entscheiden, ob der Wahlschein gueltig oder ungueltig ist bzw. welche Maengel tatsaechlich zutreffen. Mit (0) kannst Du einen Dateivergleich zu einem vorher hinterlegten -Musterwahlschein ausführen ("diff"), um Aenderungen/Fehler schneller +Musterwahlschein ausfuehren ("diff"), um Aenderungen/Fehler schneller zu sehen. Mit den Optionen (2) bis (7) kannst Du einzelne Eigenschaften From f9a99fd83a49d5e8ea785af3e91fa2679482da44 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 19 Mar 2014 21:48:48 +0100 Subject: [PATCH 62/80] Update CHANGES for release. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 162d6c6..f434572 100644 --- a/CHANGES +++ b/CHANGES @@ -1,10 +1,10 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 19.01.2014) +UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 28.02.2014) ========================================================================= TODO: - aussortieren von Bounces aus Stimmenliste -Version 4.12 (19.01.2014): +Version 4.12 (28.02.2014): - uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg (Bugfix in UVreadmail.pm) From b4bfb234881080210ca8d019b8aa317b3a709d56 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 19 Mar 2014 22:17:36 +0100 Subject: [PATCH 63/80] Update documentation from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 4afa606..f434572 100644 --- a/CHANGES +++ b/CHANGES @@ -1,10 +1,10 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 19.01.2014) +UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 28.02.2014) ========================================================================= TODO: - aussortieren von Bounces aus Stimmenliste -Version 4.12 (19.01.2014): +Version 4.12 (28.02.2014): - uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg (Bugfix in UVreadmail.pm) @@ -20,6 +20,15 @@ Version 4.12 (19.01.2014): Wahlschein und einem Musterwahlschein (wie im CfV geposted) zu starten. Dazu muss die Config-Option "sampleballotfile" gesetzt und die Datei vorhanden sein (Standard-Dateiname: ballot.sample) +- im Fehlermenue wird nun der Name der Abstimmung als Ueberschrift + angezeigt. Ausserdem wurde in UVmenu.pm ein redundanter Code-Abschnitt + entfernt +- BDSG-Klausel muss nun standardmaessig zwingend mit JA beantwortet + werden, DAFUER wird nicht mehr akzeptiert. Dies kann in usevote.cfg + konfiguriert werden +- Regular Expression fuer Pruefung des Abstimmungsnamens weiter + verbessert +- Standardwert fuer Mindest-JA-Stimmenzahl von 60 auf 50 verringert Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. From b7f97daa67a3855215a1caaf218eac44f6ea167c Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 20 Sep 2021 21:11:33 +0200 Subject: [PATCH 64/80] Adapt bdsgtext.cfg to DSGVO. Signed-off-by: Thomas Hochstein --- bdsgtext.cfg | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bdsgtext.cfg b/bdsgtext.cfg index fa1c1e6..45b90f1 100644 --- a/bdsgtext.cfg +++ b/bdsgtext.cfg @@ -4,10 +4,15 @@ # anfangen, werden ignoriert. # Zur Verarbeitung des Wahlscheines und insbesondere der Veroeffentlichung -des Ergebnisses ist deine Zustimmung zur Speicherung, Auswertung und +des Ergebnisses ist Deine Einwilligung zur Speicherung, Auswertung und Veroeffentlichung deiner Stimmdaten (Name und E-Mail-Adresse in Verbindung mit dem Stimmverhalten) im Rahmen dieses Verfahrens erforderlich. Wenn du im Feld unterhalb dieses Absatzes "JA" eintraegst, erklaerst du dich damit einverstanden. In allen anderen -Faellen wird der Wahlschein mit Ruecksicht auf das deutsche -Bundesdatenschutzgesetz verworfen und nicht gewertet. +Faellen wird der Wahlschein mit Ruecksicht auf die DSGVO verworfen +und nicht gewertet. Die Einwilligung kann jederzeit mit Wirkung +fuer die Zukunft widerrufen werden. Dafuer genuegt eine E-Mail an +den Votetaker. Die Wertung und Veroeffentlichung der Stimmdaten +kann auch durch die erneute Einreichung eines Wahlscheins mit +"ANNULLIERUNG" (statt "JA" oder "NEIN") als Stimmabgabe beim +ersten Abstimmungspunkt verhindert werden. From fe022f745d715af8e046e9e7020a9b897220b0c0 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 20 Sep 2021 21:15:23 +0200 Subject: [PATCH 65/80] Global config: add " --" to mail command. Otherwise mail addresses beginning with a dash ("-mymail-@provider.example") will lead to Exim erroring out. Signed-off-by: Thomas Hochstein --- usevote.cfg | 2 +- usevote.global.cfg | 2 +- usevote.tpl.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usevote.cfg b/usevote.cfg index 333f574..9b96460 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -189,7 +189,7 @@ domailfile = tmp/domail # MTA-Aufruf zum Verschicken der Bestaetigungsmails # nuetzlich ist die Sendmail-Option -f zum Setzen des Absenders -#mailcmd = sendmail -oi -oem -femail@adresse +#mailcmd = sendmail -oi -oem -femail@adresse -- # Weiteres Kommando, welches nach jeder Mail aufgerufen werden soll (falls smtp=0). # Sinnvoll ist ein "sleep x", wobei x bei langsamen Systemen hoeher diff --git a/usevote.global.cfg b/usevote.global.cfg index 94e83cc..f1b636a 100644 --- a/usevote.global.cfg +++ b/usevote.global.cfg @@ -55,7 +55,7 @@ domailfile = tmp/domail # MTA-Aufruf zum Verschicken der Bestaetigungsmails # nuetzlich ist die Sendmail-Option -f zum Setzen des Absenders #mailcmd = sendmail -oi -oem -femail@adresse -mailcmd = /usr/sbin/sendmail -oi -oem -fvote-bounces@thh.votetaker.de +mailcmd = /usr/sbin/sendmail -oi -oem -fvote-bounces@thh.votetaker.de -- # Weiteres Kommando, welches nach jeder Mail aufgerufen werden soll (falls smtp=0). # Sinnvoll ist ein "sleep x", wobei x bei langsamen Systemen hoeher diff --git a/usevote.tpl.cfg b/usevote.tpl.cfg index 0805776..19f4c2a 100644 --- a/usevote.tpl.cfg +++ b/usevote.tpl.cfg @@ -82,4 +82,4 @@ multigroup = 1 condition1 = $yes>=2*$no condition2 = $yes>=50 -mailcmd = /usr/sbin/sendmail -oi -oem -fbounce-LOCALPART@thh.votetaker.de +mailcmd = /usr/sbin/sendmail -oi -oem -fbounce-LOCALPART@thh.votetaker.de -- From 1696d12d62ca2c4084632872520155da1a658d66 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 19 Dec 2021 14:20:30 +0100 Subject: [PATCH 66/80] Global config: change diff command to "diff -u". Signed-off-by: Thomas Hochstein --- usevote.cfg | 2 +- usevote.global.cfg | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/usevote.cfg b/usevote.cfg index 9b96460..4a8c8eb 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -212,7 +212,7 @@ clearcmd = clear pager = less # Shellbefehl fuer Dateivergleich -diff = diff +diff = diff -u # Datei mit diversen Meldungen und Textfragmenten (Resourcendatei) messagefile = messages.cfg diff --git a/usevote.global.cfg b/usevote.global.cfg index f1b636a..ce1beb0 100644 --- a/usevote.global.cfg +++ b/usevote.global.cfg @@ -77,6 +77,9 @@ clearcmd = clear # Windows-Verzeichnis kopieren (URL siehe README-Datei) pager = less +# Shellbefehl fuer Dateivergleich +diff = diff -u + # Datei mit diversen Meldungen und Textfragmenten (Resourcendatei) messagefile = /home/gvv/usevote/messages.cfg From a94e81c653c147c7d7d78210a0f43d92edbe0ebf Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 12 Nov 2011 16:49:11 +0100 Subject: [PATCH 67/80] Add executive bits to scripts. Signed-off-by: Thomas Hochstein --- uvballot.pl | 0 uvbounce.pl | 0 uvcfv.pl | 0 uvcount.pl | 0 uvvote.pl | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 uvballot.pl mode change 100644 => 100755 uvbounce.pl mode change 100644 => 100755 uvcfv.pl mode change 100644 => 100755 uvcount.pl mode change 100644 => 100755 uvvote.pl diff --git a/uvballot.pl b/uvballot.pl old mode 100644 new mode 100755 diff --git a/uvbounce.pl b/uvbounce.pl old mode 100644 new mode 100755 diff --git a/uvcfv.pl b/uvcfv.pl old mode 100644 new mode 100755 diff --git a/uvcount.pl b/uvcount.pl old mode 100644 new mode 100755 diff --git a/uvvote.pl b/uvvote.pl old mode 100644 new mode 100755 From 1765b2e8d63e0c79f24295f6a4403e22235d92df Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 19 Dec 2021 14:23:51 +0100 Subject: [PATCH 68/80] Change quorum (50 -> 15 votes) Change in config and templates: - result-single - result-multi Signed-off-by: Thomas Hochstein --- UVconfig.pm | 2 +- templates/result-multi | 2 +- templates/result-single | 2 +- usevote.cfg | 2 +- usevote.tpl.cfg | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/UVconfig.pm b/UVconfig.pm index c2a1629..67b0eee 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -94,7 +94,7 @@ sub read_config { ann_stimme => 'A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G', bdsg_confirm => 'JA', condition1 => '$yes>=2*$no', # twice as many yes as no - condition2 => '$yes>=50', # min 50 yes votes + condition2 => '$yes>=15', # min 15 yes votes prop_formula => '$yes/$no', tpl_ack_mail => 'ack-mail', tpl_bouncelist => 'bouncelist', diff --git a/templates/result-multi b/templates/result-multi index 01abd88..8c6cfba 100644 --- a/templates/result-multi +++ b/templates/result-multi @@ -14,7 +14,7 @@ Ergebnisse [$votename-first] Es wurden [$numvalid] gueltige Stimmen abgegeben. - Ja Nein : 2/3? >=50? : ang.? : Gruppe + Ja Nein : 2/3? >=15? : ang.? : Gruppe ---- ---- : ---- ----- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [?cond2| Ja |Nein] : [?result| Ja |Nein] : [$group-first] [@group-more| : : : [$line]\n]\n] diff --git a/templates/result-single b/templates/result-single index 8345efa..fdb3912 100644 --- a/templates/result-single +++ b/templates/result-single @@ -15,7 +15,7 @@ Es gab [$yes] Ja-Stimmen und [$no] Nein-Stimmen[?numabstain| bei [$numabstain] E [?numinvalid|[$numinvalid] Stimme(n) wurden als ungueltig gewertet.] Es wurde [?cond1|die|keine] 2/3-Mehrheit erreicht und es gingen [?cond2|mehr|weniger] als -50 Ja-Stimmen ein. Damit ist die [$votename-text-first] +15 Ja-Stimmen ein. Damit ist die [$votename-text-first] [@votename-text-more|[$line] |\n][?cond1|[?cond2|angenommen|abgelehnt]|abgelehnt]. Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner diff --git a/usevote.cfg b/usevote.cfg index 4a8c8eb..9cd7642 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -75,7 +75,7 @@ multigroup = 1 # wird nur Bedingung 1 ausgewertet und kann z.B. auf "$yes>$no" gesetzt # werden. condition1 = $yes>=2*$no -condition2 = $yes>=50 +condition2 = $yes>=15 # Datei mit Musterwahlschein, wie er im CfV geposted wurde. Wird fuer # Vergleich mit ankommenden Wahlscheinen per "diff" genutzt. diff --git a/usevote.tpl.cfg b/usevote.tpl.cfg index 19f4c2a..fc91bee 100644 --- a/usevote.tpl.cfg +++ b/usevote.tpl.cfg @@ -80,6 +80,6 @@ multigroup = 1 # condition1 = $yes>=2*$no # condition2 = $yes>=50 condition1 = $yes>=2*$no -condition2 = $yes>=50 +condition2 = $yes>=15 mailcmd = /usr/sbin/sendmail -oi -oem -fbounce-LOCALPART@thh.votetaker.de -- From b7e3bdd9511f8df527dbf194f70c323fcb525c41 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 20 Sep 2021 21:11:33 +0200 Subject: [PATCH 69/80] Adapt bdsgtext.cfg to DSGVO. Signed-off-by: Thomas Hochstein --- bdsgtext.cfg | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bdsgtext.cfg b/bdsgtext.cfg index fa1c1e6..45b90f1 100644 --- a/bdsgtext.cfg +++ b/bdsgtext.cfg @@ -4,10 +4,15 @@ # anfangen, werden ignoriert. # Zur Verarbeitung des Wahlscheines und insbesondere der Veroeffentlichung -des Ergebnisses ist deine Zustimmung zur Speicherung, Auswertung und +des Ergebnisses ist Deine Einwilligung zur Speicherung, Auswertung und Veroeffentlichung deiner Stimmdaten (Name und E-Mail-Adresse in Verbindung mit dem Stimmverhalten) im Rahmen dieses Verfahrens erforderlich. Wenn du im Feld unterhalb dieses Absatzes "JA" eintraegst, erklaerst du dich damit einverstanden. In allen anderen -Faellen wird der Wahlschein mit Ruecksicht auf das deutsche -Bundesdatenschutzgesetz verworfen und nicht gewertet. +Faellen wird der Wahlschein mit Ruecksicht auf die DSGVO verworfen +und nicht gewertet. Die Einwilligung kann jederzeit mit Wirkung +fuer die Zukunft widerrufen werden. Dafuer genuegt eine E-Mail an +den Votetaker. Die Wertung und Veroeffentlichung der Stimmdaten +kann auch durch die erneute Einreichung eines Wahlscheins mit +"ANNULLIERUNG" (statt "JA" oder "NEIN") als Stimmabgabe beim +ersten Abstimmungspunkt verhindert werden. From 3c2b60126fd2385ef3345ac45506e2bcd56651f6 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Mon, 20 Sep 2021 21:15:23 +0200 Subject: [PATCH 70/80] Global config: add " --" to mail command. Otherwise mail addresses beginning with a dash ("-mymail-@provider.example") will lead to Exim erroring out. Signed-off-by: Thomas Hochstein --- usevote.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usevote.cfg b/usevote.cfg index eb99d33..3e5f0bd 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -190,7 +190,7 @@ domailfile = tmp/domail # MTA-Aufruf zum Verschicken der Bestaetigungsmails # nuetzlich ist die Sendmail-Option -f zum Setzen des Absenders -#mailcmd = sendmail -oi -oem -femail@adresse +#mailcmd = sendmail -oi -oem -femail@adresse -- # Weiteres Kommando, welches nach jeder Mail aufgerufen werden soll (falls smtp=0). # Sinnvoll ist ein "sleep x", wobei x bei langsamen Systemen hoeher From a5ab9d262009660142260d50e8d00ca6a0858dfd Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 19 Dec 2021 14:20:30 +0100 Subject: [PATCH 71/80] Global config: change diff command to "diff -u". Signed-off-by: Thomas Hochstein --- usevote.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usevote.cfg b/usevote.cfg index 3e5f0bd..5c7aeda 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -213,7 +213,7 @@ clearcmd = clear pager = less # Shellbefehl fuer Dateivergleich -diff = diff +diff = diff -u # Datei mit diversen Meldungen und Textfragmenten (Resourcendatei) messagefile = messages.cfg From f90cfdb57f9a32d316de8c5da51d16aaa2dd58c1 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 19 Dec 2021 15:09:08 +0100 Subject: [PATCH 72/80] Update documentation. Signed-off-by: Thomas Hochstein --- CHANGES | 7 +++++++ README | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index f434572..dfcda25 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,13 @@ UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 28.02.2014) TODO: - aussortieren von Bounces aus Stimmenliste +Version 4.13 (unreleased): +- BDSG-Klausel an die DSGVO angepasst +- "mailcmd" muss mit "--" enden, damit Mailadressen, die mit "-" + beginnen, richtig erkannt werden. +- "diff -u" ist ein besserer Default für das Diff-Programm +- Standardwert fuer Mindest-JA-Stimmenzahl von 50 auf 15 verringert + Version 4.12 (28.02.2014): - uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg diff --git a/README b/README index fec87c8..d45d71a 100644 --- a/README +++ b/README @@ -187,7 +187,7 @@ UVrules.pm Routinen zur Regelverarbeitung (usevote.rul) UVsendmail.pm Routinen zum Erzeugen von Mails UVtemplate.pm Routinen zur Verarbeitung von Vorlagen (Templates) bdsgtext.cfg Spezieller Text fuer den Wahlschein (Hinweis auf - Datenschutzgesetz), muss ausserhalb Deutschlands ggfls. + DSGVO), muss ausserhalb Deutschlands ggfls. angepasst oder kann ignoriert werden (bdsg=0 in usevote.cfg) mailpatterns.cfg Wildcards fuer verdaechtige Mailadressen messages.cfg Programm-Meldungen (Ressourcen-Datei) @@ -524,7 +524,7 @@ Das Endergebnis kannst Du mit "uvcount.pl -r" ausgeben lassen. Bei Verfahren mit mehreren Abstimmungspunkten wird automatusch das folgende tabellarische Format verwendet: - Ja Nein : 2/3? >=60? : ang.? : Gruppe + Ja Nein : 2/3? >=15? : ang.? : Gruppe ==== ==== : ==== ===== : ===== : ======================================= 100 70 : Nein Ja : Nein : Einrichtung von xyz @@ -989,7 +989,7 @@ onestep Mails direkt verschicken und Ergebnisse speichern? [BOOL] multigroup Fuer das Ergebnis auch bei Eingruppenabstimmung des Mehrgruppenformat waehlen? [BOOL] condition1 Bedingungen fuer einen Erfolg der Abstimmung in Perl-Syntax -condition2 (normalerweise "$yes>=2*$no" und "$yes>=60" +condition2 (normalerweise "$yes>=2*$no" und "$yes>=15" resultfile Datei fuer Gesamtergebnis (normalerweise ergebnis.alle) idfile Datei mit Scheinkennungen (bei "personal=1") pop3 POP3 benutzen? [BOOL] (andernfalls Stimmen aus Datei lesen) @@ -1027,7 +1027,7 @@ domailfile Name des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0, normalerweise tmp/domail) mailcmd Aufruf des Mail Transfer Agents (MTA) zum Verschicken der Bestaetigungsmails (falls smtp=0), z.B. - "sendmail -oi -oem -femail@adresse" + "sendmail -oi -oem -femail@adresse -- " sleepcmd Weiteres Kommando, welches nach jeder Mail aufgerufen werden soll (falls smtp=0). Sinnvoll ist ein "sleep x", wobei x bei langsamen Systemen hoeher gewaehlt werden sollte. From 68d2e7d047309a51c360aa3abab681a6b16e3faf Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 19 Dec 2021 14:23:51 +0100 Subject: [PATCH 73/80] Change quorum (50 -> 15 votes) Change in config and templates: - result-single - result-multi Signed-off-by: Thomas Hochstein --- UVconfig.pm | 2 +- templates/result-multi | 2 +- templates/result-single | 2 +- usevote.cfg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UVconfig.pm b/UVconfig.pm index f78e3b9..67b0eee 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -94,7 +94,7 @@ sub read_config { ann_stimme => 'A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G', bdsg_confirm => 'JA', condition1 => '$yes>=2*$no', # twice as many yes as no - condition2 => '$yes>=50', # min 60 yes votes + condition2 => '$yes>=15', # min 15 yes votes prop_formula => '$yes/$no', tpl_ack_mail => 'ack-mail', tpl_bouncelist => 'bouncelist', diff --git a/templates/result-multi b/templates/result-multi index 01abd88..8c6cfba 100644 --- a/templates/result-multi +++ b/templates/result-multi @@ -14,7 +14,7 @@ Ergebnisse [$votename-first] Es wurden [$numvalid] gueltige Stimmen abgegeben. - Ja Nein : 2/3? >=50? : ang.? : Gruppe + Ja Nein : 2/3? >=15? : ang.? : Gruppe ---- ---- : ---- ----- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [?cond2| Ja |Nein] : [?result| Ja |Nein] : [$group-first] [@group-more| : : : [$line]\n]\n] diff --git a/templates/result-single b/templates/result-single index 8345efa..fdb3912 100644 --- a/templates/result-single +++ b/templates/result-single @@ -15,7 +15,7 @@ Es gab [$yes] Ja-Stimmen und [$no] Nein-Stimmen[?numabstain| bei [$numabstain] E [?numinvalid|[$numinvalid] Stimme(n) wurden als ungueltig gewertet.] Es wurde [?cond1|die|keine] 2/3-Mehrheit erreicht und es gingen [?cond2|mehr|weniger] als -50 Ja-Stimmen ein. Damit ist die [$votename-text-first] +15 Ja-Stimmen ein. Damit ist die [$votename-text-first] [@votename-text-more|[$line] |\n][?cond1|[?cond2|angenommen|abgelehnt]|abgelehnt]. Gegen dieses Ergebnis kann innerhalb einer Woche nach seiner diff --git a/usevote.cfg b/usevote.cfg index 5c7aeda..81de4c2 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -75,7 +75,7 @@ multigroup = 1 # wird nur Bedingung 1 ausgewertet und kann z.B. auf "$yes>$no" gesetzt # werden. condition1 = $yes>=2*$no -condition2 = $yes>=50 +condition2 = $yes>=15 # Datei mit Musterwahlschein, wie er im CfV geposted wurde. Wird fuer # Vergleich mit ankommenden Wahlscheinen per "diff" genutzt. From 150c91add62708f4b86ec550d72fcc8b365002a4 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 19 Dec 2021 15:09:08 +0100 Subject: [PATCH 74/80] Update documentation. Signed-off-by: Thomas Hochstein --- CHANGES | 7 +++++++ README | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index f434572..dfcda25 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,13 @@ UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 28.02.2014) TODO: - aussortieren von Bounces aus Stimmenliste +Version 4.13 (unreleased): +- BDSG-Klausel an die DSGVO angepasst +- "mailcmd" muss mit "--" enden, damit Mailadressen, die mit "-" + beginnen, richtig erkannt werden. +- "diff -u" ist ein besserer Default für das Diff-Programm +- Standardwert fuer Mindest-JA-Stimmenzahl von 50 auf 15 verringert + Version 4.12 (28.02.2014): - uvbounce.pl und uvballot.pl benutzen jetzt wieder den uebergebenen Dateinamen statt irrtuemlich das Mailboxfile aus usevote.cfg diff --git a/README b/README index fec87c8..d45d71a 100644 --- a/README +++ b/README @@ -187,7 +187,7 @@ UVrules.pm Routinen zur Regelverarbeitung (usevote.rul) UVsendmail.pm Routinen zum Erzeugen von Mails UVtemplate.pm Routinen zur Verarbeitung von Vorlagen (Templates) bdsgtext.cfg Spezieller Text fuer den Wahlschein (Hinweis auf - Datenschutzgesetz), muss ausserhalb Deutschlands ggfls. + DSGVO), muss ausserhalb Deutschlands ggfls. angepasst oder kann ignoriert werden (bdsg=0 in usevote.cfg) mailpatterns.cfg Wildcards fuer verdaechtige Mailadressen messages.cfg Programm-Meldungen (Ressourcen-Datei) @@ -524,7 +524,7 @@ Das Endergebnis kannst Du mit "uvcount.pl -r" ausgeben lassen. Bei Verfahren mit mehreren Abstimmungspunkten wird automatusch das folgende tabellarische Format verwendet: - Ja Nein : 2/3? >=60? : ang.? : Gruppe + Ja Nein : 2/3? >=15? : ang.? : Gruppe ==== ==== : ==== ===== : ===== : ======================================= 100 70 : Nein Ja : Nein : Einrichtung von xyz @@ -989,7 +989,7 @@ onestep Mails direkt verschicken und Ergebnisse speichern? [BOOL] multigroup Fuer das Ergebnis auch bei Eingruppenabstimmung des Mehrgruppenformat waehlen? [BOOL] condition1 Bedingungen fuer einen Erfolg der Abstimmung in Perl-Syntax -condition2 (normalerweise "$yes>=2*$no" und "$yes>=60" +condition2 (normalerweise "$yes>=2*$no" und "$yes>=15" resultfile Datei fuer Gesamtergebnis (normalerweise ergebnis.alle) idfile Datei mit Scheinkennungen (bei "personal=1") pop3 POP3 benutzen? [BOOL] (andernfalls Stimmen aus Datei lesen) @@ -1027,7 +1027,7 @@ domailfile Name des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0, normalerweise tmp/domail) mailcmd Aufruf des Mail Transfer Agents (MTA) zum Verschicken der Bestaetigungsmails (falls smtp=0), z.B. - "sendmail -oi -oem -femail@adresse" + "sendmail -oi -oem -femail@adresse -- " sleepcmd Weiteres Kommando, welches nach jeder Mail aufgerufen werden soll (falls smtp=0). Sinnvoll ist ein "sleep x", wobei x bei langsamen Systemen hoeher gewaehlt werden sollte. From 290f1a1631907941892d78cc41b37beb6859770f Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Thu, 27 Jan 2022 18:07:13 +0100 Subject: [PATCH 75/80] Usevote 4.0.13 Signed-off-by: Thomas Hochstein --- CHANGES | 6 +++--- README | 11 ++++++----- UVconfig.pm | 4 ++-- uvballot.pl | 4 ++-- uvbounce.pl | 4 ++-- uvcfv.pl | 4 ++-- uvcount.pl | 4 ++-- uvvote.pl | 4 ++-- 8 files changed, 21 insertions(+), 20 deletions(-) diff --git a/CHANGES b/CHANGES index dfcda25..72e69cc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,14 +1,14 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 28.02.2014) +UseVoteGer Versionshistorie (aktuelle Version: 4.13, released 27.01.2022) ========================================================================= TODO: - aussortieren von Bounces aus Stimmenliste -Version 4.13 (unreleased): +Version 4.13 (27.01.2022): - BDSG-Klausel an die DSGVO angepasst - "mailcmd" muss mit "--" enden, damit Mailadressen, die mit "-" beginnen, richtig erkannt werden. -- "diff -u" ist ein besserer Default für das Diff-Programm +- "diff -u" ist ein besserer Default fuer das Diff-Programm - Standardwert fuer Mindest-JA-Stimmenzahl von 50 auf 15 verringert Version 4.12 (28.02.2014): diff --git a/README b/README index d45d71a..3c42498 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -UseVoteGer 4.12 (c) 2001-2014 Marc Langer +UseVoteGer 4.13 (c) 2001-2022 Marc Langer UseVoteGer is a voting software for usenet votes. @@ -12,13 +12,14 @@ Many thanks to: - Wolfgang Behrens (UseVoteGer 3.1, based on Frederik's translation, 1998/99) - Cornell Binder for some good advice and code fragments (e.g. UVtemplate.pm, UVformats.pm) +- Thomas Hochstein for some patches This is a complete rewrite of UseVoteGer 3.1 in Perl (former versions were written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ------------------------------------------------------------------------------- -UseVoteGer 4.12 - Usenet-Abstimmungssoftware +UseVoteGer 4.13 - Usenet-Abstimmungssoftware =========================================== von Marc Langer @@ -187,8 +188,8 @@ UVrules.pm Routinen zur Regelverarbeitung (usevote.rul) UVsendmail.pm Routinen zum Erzeugen von Mails UVtemplate.pm Routinen zur Verarbeitung von Vorlagen (Templates) bdsgtext.cfg Spezieller Text fuer den Wahlschein (Hinweis auf - DSGVO), muss ausserhalb Deutschlands ggfls. - angepasst oder kann ignoriert werden (bdsg=0 in usevote.cfg) + DSGVO), muss ausserhalb der EU ggfls. angepasst werden + oder kann dort ignoriert werden (bdsg=0 in usevote.cfg) mailpatterns.cfg Wildcards fuer verdaechtige Mailadressen messages.cfg Programm-Meldungen (Ressourcen-Datei) scheinkennungen Speicherung der Scheinkennungen bei personalisierten @@ -1027,7 +1028,7 @@ domailfile Name des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0, normalerweise tmp/domail) mailcmd Aufruf des Mail Transfer Agents (MTA) zum Verschicken der Bestaetigungsmails (falls smtp=0), z.B. - "sendmail -oi -oem -femail@adresse -- " + "sendmail -oi -oem -femail@adresse --" sleepcmd Weiteres Kommando, welches nach jeder Mail aufgerufen werden soll (falls smtp=0). Sinnvoll ist ein "sleep x", wobei x bei langsamen Systemen hoeher gewaehlt werden sollte. diff --git a/UVconfig.pm b/UVconfig.pm index 67b0eee..fd262c9 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -18,7 +18,7 @@ require Exporter; $VERSION = "0.18"; # Usevote version -$usevote_version = "UseVoteGer 4.12"; +$usevote_version = "UseVoteGer 4.13"; sub read_config { @@ -94,7 +94,7 @@ sub read_config { ann_stimme => 'A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G', bdsg_confirm => 'JA', condition1 => '$yes>=2*$no', # twice as many yes as no - condition2 => '$yes>=15', # min 15 yes votes + condition2 => '$yes>=15', # min 60 yes votes prop_formula => '$yes/$no', tpl_ack_mail => 'ack-mail', tpl_bouncelist => 'bouncelist', diff --git a/uvballot.pl b/uvballot.pl index 7d7ff27..428a097 100755 --- a/uvballot.pl +++ b/uvballot.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Wahlscheingenerierung -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Wahlscheingenerierung +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvbounce.pl b/uvbounce.pl index 4375bf3..0a7352f 100755 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Bounce-Verarbeitung -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Bounce-Verarbeitung +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcfv.pl b/uvcfv.pl index 275da9b..5f09080 100755 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Personalisierte Wahlscheine -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Personalisierte Wahlscheine +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcount.pl b/uvcount.pl index 4e1ea57..4af9a8f 100755 --- a/uvcount.pl +++ b/uvcount.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Stimmauswertung -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Stimmauswertung +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvvote.pl b/uvvote.pl index c101f1f..181aca2 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Wahldurchfuehrung -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Wahldurchfuehrung +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the From 49ec973ac6f4cca94b917ac48149d47a4759e9d3 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 25 Jan 2026 09:33:04 +0100 Subject: [PATCH 76/80] Update from upstream (4.13.). Signed-off-by: Thomas Hochstein --- CHANGES | 6 +- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README | 11 +- UVconfig.pm | 2 +- uvballot.pl | 4 +- uvbounce.pl | 4 +- uvcfv.pl | 4 +- uvcount.pl | 4 +- uvvote.pl | 4 +- 9 files changed, 694 insertions(+), 19 deletions(-) create mode 100644 LICENSE diff --git a/CHANGES b/CHANGES index dfcda25..72e69cc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,14 +1,14 @@ -UseVoteGer Versionshistorie (aktuelle Version: 4.12, released 28.02.2014) +UseVoteGer Versionshistorie (aktuelle Version: 4.13, released 27.01.2022) ========================================================================= TODO: - aussortieren von Bounces aus Stimmenliste -Version 4.13 (unreleased): +Version 4.13 (27.01.2022): - BDSG-Klausel an die DSGVO angepasst - "mailcmd" muss mit "--" enden, damit Mailadressen, die mit "-" beginnen, richtig erkannt werden. -- "diff -u" ist ein besserer Default für das Diff-Programm +- "diff -u" ist ein besserer Default fuer das Diff-Programm - Standardwert fuer Mindest-JA-Stimmenzahl von 50 auf 15 verringert Version 4.12 (28.02.2014): diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README b/README index d45d71a..3c42498 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -UseVoteGer 4.12 (c) 2001-2014 Marc Langer +UseVoteGer 4.13 (c) 2001-2022 Marc Langer UseVoteGer is a voting software for usenet votes. @@ -12,13 +12,14 @@ Many thanks to: - Wolfgang Behrens (UseVoteGer 3.1, based on Frederik's translation, 1998/99) - Cornell Binder for some good advice and code fragments (e.g. UVtemplate.pm, UVformats.pm) +- Thomas Hochstein for some patches This is a complete rewrite of UseVoteGer 3.1 in Perl (former versions were written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ------------------------------------------------------------------------------- -UseVoteGer 4.12 - Usenet-Abstimmungssoftware +UseVoteGer 4.13 - Usenet-Abstimmungssoftware =========================================== von Marc Langer @@ -187,8 +188,8 @@ UVrules.pm Routinen zur Regelverarbeitung (usevote.rul) UVsendmail.pm Routinen zum Erzeugen von Mails UVtemplate.pm Routinen zur Verarbeitung von Vorlagen (Templates) bdsgtext.cfg Spezieller Text fuer den Wahlschein (Hinweis auf - DSGVO), muss ausserhalb Deutschlands ggfls. - angepasst oder kann ignoriert werden (bdsg=0 in usevote.cfg) + DSGVO), muss ausserhalb der EU ggfls. angepasst werden + oder kann dort ignoriert werden (bdsg=0 in usevote.cfg) mailpatterns.cfg Wildcards fuer verdaechtige Mailadressen messages.cfg Programm-Meldungen (Ressourcen-Datei) scheinkennungen Speicherung der Scheinkennungen bei personalisierten @@ -1027,7 +1028,7 @@ domailfile Name des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0, normalerweise tmp/domail) mailcmd Aufruf des Mail Transfer Agents (MTA) zum Verschicken der Bestaetigungsmails (falls smtp=0), z.B. - "sendmail -oi -oem -femail@adresse -- " + "sendmail -oi -oem -femail@adresse --" sleepcmd Weiteres Kommando, welches nach jeder Mail aufgerufen werden soll (falls smtp=0). Sinnvoll ist ein "sleep x", wobei x bei langsamen Systemen hoeher gewaehlt werden sollte. diff --git a/UVconfig.pm b/UVconfig.pm index 67b0eee..86e93eb 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -18,7 +18,7 @@ require Exporter; $VERSION = "0.18"; # Usevote version -$usevote_version = "UseVoteGer 4.12"; +$usevote_version = "UseVoteGer 4.13"; sub read_config { diff --git a/uvballot.pl b/uvballot.pl index 7d7ff27..428a097 100755 --- a/uvballot.pl +++ b/uvballot.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Wahlscheingenerierung -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Wahlscheingenerierung +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvbounce.pl b/uvbounce.pl index 4375bf3..0a7352f 100755 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Bounce-Verarbeitung -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Bounce-Verarbeitung +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcfv.pl b/uvcfv.pl index 275da9b..5f09080 100755 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Personalisierte Wahlscheine -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Personalisierte Wahlscheine +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvcount.pl b/uvcount.pl index 4e1ea57..4af9a8f 100755 --- a/uvcount.pl +++ b/uvcount.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Stimmauswertung -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Stimmauswertung +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the diff --git a/uvvote.pl b/uvvote.pl index c101f1f..181aca2 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -w ############################################################################### -# UseVoteGer 4.12 Wahldurchfuehrung -# (c) 2001-2014 Marc Langer +# UseVoteGer 4.13 Wahldurchfuehrung +# (c) 2001-2022 Marc Langer # # This script package is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by the From 70f829a120e7b0d2b61cf5bdd4787313ddfdc390 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 25 Jan 2026 09:36:17 +0100 Subject: [PATCH 77/80] Update global config. Signed-off-by: Thomas Hochstein --- usevote.global.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usevote.global.cfg b/usevote.global.cfg index ce1beb0..177b2d9 100644 --- a/usevote.global.cfg +++ b/usevote.global.cfg @@ -27,7 +27,7 @@ smtpport = 25 #smtppass = # Falls als HELO etwas anderes als der Hostname verwendet werden soll: -#smtphelo = greenmeadow.szaf.org +#smtphelo = khazad.thangorodrim.org # Falls ein anderer Fully Qualified Domain Name als der Hostname fuer # die Message-ID verwendet werden soll: From fdf327cd17ce1af4b8f39c08a14f5c91b0ea257c Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Tue, 29 Mar 2022 22:56:47 +0200 Subject: [PATCH 78/80] Non-greedy matching for votestrings. A single choice on a ballot has this format: #1 [ ] This or that The regexp in uvvote.pl's process_vote() will match and extract what's beetwen "[" and "]". But if "This or that" contains a "]", the match will be too greedy: #1 [ ] This [or that] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <- match Fix that by using a non-greedy operator. Signed-off-by: Thomas Hochstein --- uvvote.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uvvote.pl b/uvvote.pl index 181aca2..7f23a42 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -271,7 +271,7 @@ sub process_vote { } # this matches on a single appearance: - if ($$body =~ /#$votenum\W*?\[(.+)\]/) { + if ($$body =~ /#$votenum\W*?\[(.+?)\]/) { # one or more vote strings were found $onevote ||= 1; # set $onevote to 1 if it was 0 my $votestring = $1; From ece94fc3f6ee38a638c31650df6e5838e70c9a16 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Thu, 6 Jul 2023 23:03:56 +0200 Subject: [PATCH 79/80] Fix typo, remove German umlaut. Fix from Peter Heirich. Signed-off-by: Thomas Hochstein --- messages.cfg | 2 +- usevote.cfg | 2 +- usevote.global.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/messages.cfg b/messages.cfg index e1f1b13..46eb986 100644 --- a/messages.cfg +++ b/messages.cfg @@ -82,7 +82,7 @@ MENU_GETKEY = *** Return druecken, um fortzufahren *** MENU_PROCESSING = Verarbeite Mails... MENU_ERROR_WARNING = WARNUNG MENU_ERROR_TEXT = Es wurden nicht alle Fehler behoben. Der Waehler wird eine Fehlermail erhalten und die Stimme wird ungueltig gewertet. -MENU_ERROR_GETKEY = Bitte mit 'y' bestätigen oder mit jeder anderen Eingabe zurück: +MENU_ERROR_GETKEY = Bitte mit 'y' bestaetigen oder mit jeder anderen Eingabe zurueck: MENU_DUP_VOTE = Moeglicherweise doppelte Stimmabgabe! MENU_DUP_FIRST = Erste Stimme: MENU_DUP_SECOND = Zweite Stimme: diff --git a/usevote.cfg b/usevote.cfg index 9cd7642..70b0632 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -181,7 +181,7 @@ templatedir = templates # (kommaseparierte Liste mit Funktions-Modulen) formats = UVformats.pm -# Dateiname der Steuerungsdatei fuer den Mailversandt +# Dateiname der Steuerungsdatei fuer den Mailversand controlfile = tmp/ack.control # Dateiname des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0) diff --git a/usevote.global.cfg b/usevote.global.cfg index 177b2d9..d205879 100644 --- a/usevote.global.cfg +++ b/usevote.global.cfg @@ -46,7 +46,7 @@ templatedir = /home/gvv/usevote/templates # (kommaseparierte Liste mit Funktions-Modulen) formats = /home/gvv/usevote/UVformats.pm -# Dateiname der Steuerungsdatei fuer den Mailversandt +# Dateiname der Steuerungsdatei fuer den Mailversand controlfile = tmp/ack.control # Dateiname des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0) From 417922acf7e5d95ae97a9472f2864427e21a2a33 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 25 Jan 2026 09:46:01 +0100 Subject: [PATCH 80/80] Replace 'Gruppe' in (result) templates. Signed-off-by: Thomas Hochstein --- templates/multiple-votes | 2 +- templates/result-multi | 2 +- templates/result-proportional | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/multiple-votes b/templates/multiple-votes index 7da6433..d56b3ec 100644 --- a/templates/multiple-votes +++ b/templates/multiple-votes @@ -3,7 +3,7 @@ body := value body | quote "> " == TEMPLATE ================================================================= Dein Wahlschein enthielt widerspruechliche Stimmen (z.B. sowohl JA- als -auch NEIN-Stimme fuer dieselbe Gruppe). +auch NEIN-Stimme fuer denselben Abstimmungsgegenstand). Das passiert meistens, wenn du mehrere Zeilen schickst, die als Stimme interpretiert werden, z. B. wenn du vergisst, eine Beispielzeile im CfV diff --git a/templates/result-multi b/templates/result-multi index 8c6cfba..74c6196 100644 --- a/templates/result-multi +++ b/templates/result-multi @@ -14,7 +14,7 @@ Ergebnisse [$votename-first] Es wurden [$numvalid] gueltige Stimmen abgegeben. - Ja Nein : 2/3? >=15? : ang.? : Gruppe + Ja Nein : 2/3? >=15? : ang.? : Abstimmungsgegenstand ---- ---- : ---- ----- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [?cond2| Ja |Nein] : [?result| Ja |Nein] : [$group-first] [@group-more| : : : [$line]\n]\n] diff --git a/templates/result-proportional b/templates/result-proportional index fa9db75..db6608b 100644 --- a/templates/result-proportional +++ b/templates/result-proportional @@ -15,7 +15,7 @@ Ergebnisse [$votename-first] Es wurden [$numvalid] gueltige Stimmen abgegeben. - Ja Nein : J>=N? Ja/Nein : ang.? : Gruppe + Ja Nein : J>=N? Ja/Nein : ang.? : Abstimmungsgegenstand ---- ---- : ----- ------- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [$proportion] : : [$group-first] [@group-more| : : : [$line]\n]\n]