diff options
-rw-r--r-- | decisions/.gitignore | 1 | ||||
-rw-r--r-- | decisions/Makefile | 5 | ||||
-rw-r--r-- | decisions/decisions.gld | 108 | ||||
-rw-r--r-- | decisions/decisions.tex | 2 | ||||
-rwxr-xr-x | decisions/makegleps | 136 |
5 files changed, 250 insertions, 2 deletions
diff --git a/decisions/.gitignore b/decisions/.gitignore index cad646c..5e93a7a 100644 --- a/decisions/.gitignore +++ b/decisions/.gitignore @@ -11,6 +11,7 @@ decisions.bur decisions.mld decisions.mlr decisions.glr +decisions.glg decisions.html summary-*.aux notes-*.aux diff --git a/decisions/Makefile b/decisions/Makefile index ec2d88e..2c7aefc 100644 --- a/decisions/Makefile +++ b/decisions/Makefile @@ -19,7 +19,7 @@ decisions.pdf: *.aux decisions.idx *.tex decisions.ind decisions.html: decisions.pdf pdf2htmlEX --optimize-text 1 --decompose-ligature 1 decisions.pdf -onlineupdate: decisions.bug decisions.mld +onlineupdate: decisions.bug decisions.mld decisions.glg decisions.bug: decisions.bur ./makebugs @@ -27,6 +27,9 @@ decisions.bug: decisions.bur decisions.mld: decisions.mlr ./makemails +decisions.glg: decisions.glr + ./makegleps + upload: onlineupdate decisions.pdf decisions.html scp decisions.pdf dev.gentoo.org:~/public_html/ scp decisions.html dev.gentoo.org:~/public_html/ diff --git a/decisions/decisions.gld b/decisions/decisions.gld new file mode 100644 index 0000000..a7290ea --- /dev/null +++ b/decisions/decisions.gld @@ -0,0 +1,108 @@ +1 +GLEP Purpose and Guidelines +Active +GLEPs!workflow +2 +Sample Wiki Markup GLEP Template +Active + +23 +Handling of ACCEPT_LICENSE +Final +ACCEPT_LICENSE +27 +Portage Management of UIDs/GIDs +Accepted +UIDs +31 +Character Sets for Portage Tree Items +Final +unicode +39 +An "old-school" metastructure proposal with "boot for being a slacker" +Final +metastructure +40 +Standardizing "arch" keywording across all archs. +Final + +41 +Making Arch Testers official Gentoo Staff +Rejected +arch testers;staff +42 +Critical News Reporting +Final +news items +44 +Manifest2 format +Final +Manifest!format 2 +46 +Allow upstream tags in metadata.xml +Final +metadata.xml!upstream tags +48 +QA Team's Role and Purpose +Final +project!qa +49 +Alternative Package Manager requirements +Rejected + +50 +Supporting alternative package managers +Rejected + +54 +scm package version suffix +Deferred +scm version suffix +55 +Use EAPI-suffixed ebuilds (.ebuild-EAPI) +Rejected + +57 +Security of distribution of Gentoo software - Overview +Final + +58 +Security of distribution of Gentoo software - Infrastructure to User distribution - MetaManifest +Draft +MetaManifest +59 +Manifest2 hash policies and security implications +Draft +Manifest!format 2 +60 +Manifest2 filetypes +Draft +Manifest!format 2 +61 +Manifest2 compression +Draft + +62 +Optional runtime dependencies via runtime-switchable USE flags +Draft + +63 +Gentoo GPG key policies +Final +openpgp keys +64 +Export Package Manager cached information +Final + +65 +Post-install QA checks +Draft + +67 +Package maintenance structure +Final + +68 +Package and category metadata +Final + diff --git a/decisions/decisions.tex b/decisions/decisions.tex index 65164b5..b46342a 100644 --- a/decisions/decisions.tex +++ b/decisions/decisions.tex @@ -80,7 +80,7 @@ subject ``{\em\gentoomailsubject{#2}}'', \gentoomaildate{#2})}} \immediate\openout\glrfile=\jobname.glr \newcommand{\glepadd}[1]{\write\glrfile{#1}% } -\InputIfFileExists{\jobname.gld}{} +\InputIfFileExists{\jobname.glg}{} \newcommand{\glep}[1]{\href{https://wiki.gentoo.org/wiki/GLEP:#1}{GLEP {#1}}\index{GLEP!#1}\glepadd{#1}% diff --git a/decisions/makegleps b/decisions/makegleps new file mode 100755 index 0000000..208ff70 --- /dev/null +++ b/decisions/makegleps @@ -0,0 +1,136 @@ +#!/usr/bin/perl + +use List::MoreUtils qw(uniq nsort_by); +use LaTeX::Encode qw(latex_encode); + +# four files: +# - glr: input file, unsorted list of glep numbers, may contain duplicates, +# generated by LaTeX +# - gld: database of gleps, format +# * glep number +# * glep title +# * glep status +# * index keywords separated by ";" +# - glg: output file, LaTeX fragment that can be sourced + + + +# Fetch the title of a bug from Bugzilla +# URL example: https://wiki.gentoo.org/index.php?title=GLEP:31&action=raw +# Result contains +# {{GLEP +# |Number=31 +# |Title=Character Sets for Portage Tree Items +# |Type=Standards Track +# |Status=Final +# |Author=Ciaran McCreesh <ciaranm@gentoo.org> +# }} + + +sub getglepdata { + my $number=shift; + + open (my $web, '-|:encoding(UTF-8)', + 'wget -O - https://wiki.gentoo.org/index.php?title=GLEP:'.$number.'\&action=raw'); + + my @glep=<$web>; + close $web; + + my $title, $status; + + foreach (@glep) { + $line=$_; chomp $line; print "line is $line\n"; + if ($_=~ /^\|Title=/) { + $title=$_; + $title=~s/^\|Title=//; + chomp $title; + }; + if ($_=~ /^\|Status=/) { + $status=$_; + $status=~s/^\|Status=//; + chomp $status; + }; + }; + + return ($title, $status); +} + + +# Main code start + +# Read the list of gleps referenced in the LaTeX file. +open my $glr, '<', "decisions.glr"; +my @glrlist = <$glr>; +close $glr; +chomp @glrlist; + +my @glepnumbers=uniq nsort_by { $_ } @glrlist; + +# Read the database +open my $gld, '<', "decisions.gld"; + +my $gleptitle={}; +my $glepstatus={}; +my $glepkeywords={}; + +while (1) { + defined ( my $number=<$gld> ) or last; + defined ( my $title=<$gld> ) or last; + defined ( my $status=<$gld> ) or last; + defined ( my $keywords=<$gld> ) or last; + chomp $number; + chomp $title; + chomp $status; + chomp $keywords; + $gleptitle{$number}=$title; + $glepstatus{$number}=$status; + $glepkeywords{$number}=$keywords; +}; + +close $gld; + + +# Loop through the referenced glep numbers, check if we already have the title, +# and if not fetch and add it. +foreach(@glepnumbers) { + my $cur=$_; + print "GLEP number $cur\n"; + if ($gleptitle{$cur}) { + print " Title is \"$gleptitle{$cur}\"\n"; + } else { + print " Title not yet available, fetching all the data\n"; + ($gleptitle{$cur},$glepstatus{$cur})=getglepdata($cur); + $glepkeywords{$cur}=""; + }; +}; + +# Write out the bug title cache again. +my @gleptitlenew= map { $_ => $gleptitle{$_} } sort keys %gleptitle; + +open my $gld, '>', "decisions.gld"; +foreach(@glepnumbers) { + my $cur=$_; + print $gld "$cur\n"; + print $gld "$gleptitle{$cur}\n"; + print $gld "$glepstatus{$cur}\n"; + print $gld "$glepkeywords{$cur}\n"; +}; +close $gld; + +# Write out the TeX input file +open my $glg, '>', "decisions.glg"; +print $glg '\renewcommand{\gleptitle}[1]{%'."\n"; + +foreach(@glepnumbers) { + my $cur=$_; + my $title=latex_encode($gleptitle{$cur}); + + my @keywords=split /;/, $glepkeywords{$cur}; + foreach(@keywords) { + $title=$title.'\index{'.$_.'}'; + } + print $glg '\ifthenelse{\equal{#1}{'.$cur.'}}{'.$title.'}{}%'."\n"; +}; + +print $glg '}'."\n"; +close $glg; |