]> git.donarmstrong.com Git - cran2deb.git/blob - papers/useR2009/cran2deb.tex
first cut
[cran2deb.git] / papers / useR2009 / cran2deb.tex
1
2 %% add 'handout' option for handouts, and pgfpages for 2-on-1
3 \documentclass[smaller,compress]{beamer}   
4 %\usepackage{pgfpages}
5 %\pgfpagesuselayout{2 on 1}[letterpaper,border shrink=5mm]
6 %\pgfpagesuselayout{4 on 1}[letterpaper,border shrink=5mm]
7 %\pgfpagesuselayout{2 on 1}[a4,border shrink=5mm]
8
9 \include{setup}  %% has all definitions etc
10
11 %\title[cran2deb: Automated CRAN to Debian packages generation]{cran2deb: A
12 %  system to automatically provide 1700+ CRAN packages as Debian binaries} 
13 \title[cran2deb: CRAN to Debian packages]{cran2deb: Automating CRAN to Debian packages generation} 
14
15 %\subtitle{\textsl{Tutorial at R/Finance 2009}}
16 \subject{UseR! 2009 Presentation}
17 \author[Charles Blundell \and Dirk Eddelbuettel]{Charles Blundell\inst{1} \and Dirk Eddelbuettel\inst{2}}
18 \institute[Gatsby \and Debian]{\inst{1}Gatsby Computational Neuroscience Unit
19   \\ University College London \and \inst{2}Debian / R Projects}
20 \date[UseR! 2009]{Presentation at UseR! 2009 \\ Rennnes, France \\ July 2009}
21
22
23 \begin{document}
24
25 \begin{frame}
26   \titlepage
27 \end{frame}
28
29 \begin{frame}
30   \frametitle{Overview}
31   \tableofcontents
32 \end{frame}
33
34 \section[Why]{Why: Background and Motivation}
35 \begin{frame}
36   \frametitle{About R -- and its repos}
37   \framesubtitle{An open statistical language / environment -- with lots of
38     excellent code contributions}
39
40   A few key facts that are non-controversial at a \textsl{useR!} conference:
41   \begin{itemize} 
42   \item \R\ is now a standard for statistical applications and research
43   \item \textit{``Success has many fathers''}: several key drivers can
44     be identified as to why \R\ has done so well 
45   \item We would like to stress \textsl{repos} and available packages here:
46     CRAN, as well as BioConductor and Omegahat.
47   \item CRAN has been one of the drivers: an open yet rigourously QA'ed
48     repostory which has experienced tremendous growth
49   \end{itemize}
50 \end{frame}
51
52 \begin{frame}
53   \frametitle{CRAN Packages} %% NB Or shall we merge this with the preceding slide?
54   \framesubtitle{Exponential Growth}
55
56   \begin{columns}
57     \begin{column}{3in}
58       \begin{figure}
59         \includegraphics[height=6cm,transparent]{figures/Packages}
60
61         \begin{scriptsize}
62           Source: Fox (2008, 2009), our calculations
63         \end{scriptsize}
64       \end{figure}
65     \end{column}
66     \begin{column}{2in}
67       \begin{itemize} 
68         \item CRAN archive network growing by 40\% p.a., now at around 1750 packages
69
70         \item John Fox provided this chart in an invited lecture at the last
71         \emph{useR!} meetings.
72       \end{itemize}
73     \end{column}
74     \begin{column}{0.25in}
75       \phantom{XX}
76     \end{column}
77   \end{columns}  
78 \end{frame}
79
80 \begin{frame}
81   \frametitle{Debian and Ubuntu} % NB Maybe skip this slide?
82   \framesubtitle{Open Linux distributions}
83
84   A few key points:
85   \begin{itemize} 
86   \item Debian is \textsl{the} community-driven Linux distribution where
87     numerous volunteers provide over twenty-thousand packages for around
88     a dozen architectures.
89   \item Packages and package management ``just work'': with arguably the most
90     advanced and robust package management system, and a tremendous
91     build and test infrastructure.
92   \item Ubuntu has taken Debian, added a fair amount of spit and polish, as
93     well as regular bi-annual releases, and has rapidly gained mind- and
94     well as market-share as the Linux distribution to beat.
95   \item Lastly, we note that the CRAN backend is also implemented on Debian.
96   \end{itemize}
97 \end{frame}
98
99 \begin{frame}
100   \frametitle{Why build Debian R packages?}
101   \framesubtitle{Combining R and Debian}
102   Bates, Eddelbuettel and Gebhard (UseR! 2004) listed a number of reason
103   that still hold:
104   \begin{itemize} 
105   \item \textbf{Dependencies} are resolved automatically: \textsl{it just
106       works}
107   \item \textbf{Convenience} of installing binary packages via
108     \texttt{apt-get} %is
109     %easier than building from source
110   \item \textbf{Quality control} as build daemons, automated rebuilds,
111     porting, ... all ensure that everything is pretty much buildable all the
112     time
113   \item \textbf{Scalability} as building one binary package and scripting
114     installation on a cluster beats doing lots of manual installations
115   \item \textbf{Common platform} as Debian forms the base for Ubuntu and
116     several other derivative or single-focus distributions
117   \item \textbf{Different architectures} ranging from small arm or mips based
118     systems to amd64, sparc64, hppa or even s390 mainframes
119   \item \textbf{Audience} given the reach of Debian and Ubuntu, large number
120     of users can be reached with little effort
121   \end{itemize}
122
123 \end{frame}
124
125 %\section{What is behind it?}
126 \begin{frame}
127   \frametitle{So what is a Debian package?} % NB Maybe skip this?
128   \framesubtitle{And how do I build it?}
129
130   Building a Debian package is similar to using \texttt{R
131     CMD binary} etc:
132   \begin{itemize} 
133   \item Reads meta-information is read from the files in the debian/ directory
134     \begin{itemize} 
135     \item debian/control (similar to R's DESCRIPTION) lists names,
136       maintainers, build- and run-time dependencies
137     \item debian/copyright lists all author, license holders and copyright
138       statements 
139     \item debian/changelog provides current and past version numbers with a
140       list of  all changes in chronological fashion
141     \item debian/rules is a Makefile containing all steps to configure,
142       build, install, package-create and clean
143     \end{itemize}
144   \item Employs a number of external scripts and tools tie into this,
145   similar to what R has below \texttt{\$RHOME/share}
146   \end{itemize}
147 \end{frame}
148
149
150 \section[How]{How: Key aspects of the approach and implementation}
151 \begin{frame}
152   \frametitle{Comparing two approaches}
153   \framesubtitle{What have we learned?}
154
155   Eddelbuettel, Vernazobres, Gebhard and M\"{o}ller (UseR 2007) presented a first
156   approach.
157
158   \MedSkip
159
160   \begin{columns}
161     \begin{column}{2in}
162       \textsl{Then}
163       \begin{itemize}
164       \item Top-down approach 
165       \item Monolithic and large Perl program 
166       \item Re-implementing chunks of what \R does in parsing archives
167       \item Not very robust
168       \end{itemize}
169     \end{column}      
170
171     \begin{column}{2in}
172       \textsl{Now}
173       \begin{itemize}
174       \item Bottom-up approach
175       \item Collection of \R and shell scripts, also lots of SQL
176       \item Re-using \R internal infrastructure as much as possible
177       \item Influenced by %Eddelbuettel's
178         \href{http://dirk.eddelbuettel.com/cranberries/}{CRANberries} and its
179         200 lines of \R code to monitor and summarize CRAN changes
180       \end{itemize}
181     \end{column}      
182   \end{columns}
183 \end{frame}
184
185 \begin{frame}
186   \frametitle{Technology Overview}
187   \framesubtitle{Charles: Can you fill something in here, if I haven't stolen
188     all nuggets on the previous slide?}
189
190 \end{frame}
191
192 \section[Status]{Status: Where are we now?}
193 \begin{frame}
194   \frametitle{Current Status}
195   \framesubtitle{Ready for wider deployment and testing}
196
197   \begin{itemize}
198   \item Ground-work provided during Google Summer of Code 2008 under the
199     umbrella of the \R Foundation
200   \item Currently using a (small) Xen-instance on a server at WU Wien to host
201     two Debian pbuilder chroots and an archive
202   \item 1700+ packages for i386 and amd64 on Debian testing
203   \item In daily use for the last few weeks!
204   \end{itemize}
205
206   \MedSkip
207   Just add the following URL (with -amd64 for 64-bit) \newline 
208   { \SmallSkip \scriptsize
209     \texttt{deb http://xmcorsairs.wu.ac.at/cran2deb/debian-i386 testing/}
210   }
211
212 \end{frame}
213
214 \section{Open Issues}
215 \begin{frame}
216   \frametitle{Question to be addressed}
217   \framesubtitle{These may not be showstoppers}
218
219   \begin{itemize}
220   \item What can or cannot be (re-)distributed by CRAN and its mirrors?
221   \item What can or cannot be used by all users?
222   \item Remaining external dependencies: 
223     \begin{itemize}
224       \item BioConductor is the single largest source: BioBase, RGraphviz, etc
225       \item Other external libraries or tools not in Debian 
226       \item Commercial external dependencies: SGE, LSF, Oracle, Vhayu
227     \end{itemize}
228   \item Builds for other architectures ?
229   \item Builds for other Debian flavours such as Ubuntu ?
230   \end{itemize}
231 \end{frame}
232
233 \end{document}
234
235 %%% Local Variables: 
236 %%% mode: latex
237 %%% TeX-master: t
238 %%% End: