Contents of /trunk/community/website/docs/policy.tex

Adding group policy, please review it :)

 1 \documentclass[a4paper,12pt]{article} 2 \usepackage[utf8]{inputenc} 3 %\usepackage[T1]{fontenc} 4 \usepackage[english]{babel} 5 \usepackage[dvips,pdftex]{graphicx} 6 \usepackage{dirtree} 7 \usepackage[top=2cm, bottom=2cm, left=1cm, right=1cm]{geometry} 8 \usepackage{url} 9 \urlstyle{rm} 10 \usepackage[dvips, 11 pdftex, 12 colorlinks=true, 13 urlcolor=blue, 14 bookmarks=true]{hyperref} 15 16 \hypersetup{ 17 pdfauthor=Debian-Med Group, 18 pdftitle=Debian-Med Policy 19 } 20 21 \graphicspath{{../img/}} 22 23 \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} 24 25 % Title Page 26 \title{Debian-Med Policy} 27 \author{Debian-Med Group} 28 29 \begin{document} 30 \begin{center} 31 \includegraphics[scale=0.5]{debian-med} 32 \HRule \\[0.4cm] 33 {\huge \bfseries Group Policy} 34 \HRule \\[1.5cm] 35 \begin{minipage}[t]{0.4\textwidth} 36 \begin{flushleft} 37 \large \emph{Author:}\\ 38 David \textsc{Paleino} 39 \end{flushleft} 40 \end{minipage} 41 \begin{minipage}[t]{0.4\textwidth} 42 \begin{flushright} 43 \large \emph{Supervisors:}\\ 44 Nelson A. \textsc{de Oliveira} \\ 45 Charles \textsc{Plessy} \\ 46 Andreas \textsc{Tille} \\ 47 Foo \textsc{Bar} \\ 48 \end{flushright} 49 \end{minipage} 50 \rule[-5mm]{\linewidth}{0.5mm} 51 \end{center} 52 53 \section{Introduction} 54 Debian-Med is a Custom Debian Distribution'' with the aim to develop Debian into an operating system that is particularly well fit for the requirements for medical practice and research. \\ \\ 55 The Debian-Med project presents packages that are associated with medicine, pre-clinical research, and life science. Its developments are mostly focused on three areas for the moment: medical practice, imaging and bioinformatics. \\ \\ 56 Over the previous years, several initiatives have spawned that address the scientific disciplines like chemistry or bioinformatics. Debian-Med is not a competition to these efforts but a platform to present the packages to the community as a Custom Debian Distribution. 57 \section{How to Contribute} 58 From the developer to the user, there is a long chain of tasks in which we always welcome participation. First we must keep ourselves informed about the software landscape in biology and medicine. Software to be packaged is chosen according to criteria such as users' need and the consistency of the distribution. Once in Debian, the software is monitored for its quality and bugs are fixed, if possible in collaboration with the upstream maintainer(s). All this work would not be very useful if it remains confidential. We also dedicate some time to advertise it to the world wia \url{http://www.debian.org} and to ease the integration of new members through this wiki. \\ \\ 59 Please contact us on \href{mailto:debian-med@lists.debian.org}{debian-med@lists.debian.org} if you want to help to make medical and biological software available to Debian users. Read the \textbf{Membership} section if you're interested in joining us. \\ \\ 60 If you speak a language other than English, you can contribute rightaway with translations of package descriptions at \url{http://ddtp.debian.org}. When working on these, you will find immediate targets for improvements of the original English versions, too. For these, though, you need access to Debian-Med's source code repository. Very welcome are tutorials that guide Debian users towards the use of packages to their immediate benefit. You may also consider to write respective articles for Magazines, be they online or in print. 61 \subsection{Membership} 62 To request membership to this group, please go on our \href{http://alioth.debian.org/projects/debian-med}{\emph{Alioth page}}, or directly follow this \href{http://alioth.debian.org/project/request.php?group_id=30063}{link}. Remember that you \textbf{must} have an Alioth account before requesting membership. 63 \section{Subversion} 64 Our Subversion (SVN) reposiory is currently hosted on \href{http://alioth.debian.org}{\emph{Alioth}}, the hosting facility provided by Debian to free software developers. You can have a look at the repository through Alioth's \href{http://svn.debian.org/wsvn/debian-med}{web interface}. 65 \subsection{Give me the source!} 66 To check sources out from SVN, please do: 67 \begin{itemize} 68 \item if you are a member of Debian-Med: 69 \begin{verbatim} 70 svn co svn+ssh://user@alioth.debian.org/svn/debian-med/trunk/... 71 \end{verbatim} 72 \item are \textbf{NOT} a member of Debian-Med: 73 \begin{verbatim} 74 svn co svn://svn.debian.org/svn/debian-med/trunk/... 75 \end{verbatim} 76 \end{itemize} 77 \subsection{Repository structure} 78 The SVN repository is structured as follows: \\ 79 \dirtree{% 80 .1 debian-med/. 81 .2 trunk/. 82 .3 community/. 83 .4 debtags/. 84 .4 infrastructure/. 85 .4 website/. 86 .3 packages/. 87 .4 /. 88 .5 branches/. 89 .5 tags/. 90 .5 trunk/. 91 .6 debian/. 92 } 93 \section{Packaging} 94 \subsection{Uploading a new package} 95 To upload a new package to the SVN repository, you must have write access to it; i.e. you must be a member of this group. \\ 96 You can upload a new package only \emph{after} successfully building it with \textbf{dpkg-buildpackage} (or any wrapper around it). Then you can: 97 \begin{verbatim} 98 $svn-inject package.dsc svn+ssh://user@alioth.debian.org/svn/debian-med/trunk/packages/ 99 \end{verbatim} 100 The \texttt{svn-inject} command is found in the \texttt{svn-buildpackage} package (just \texttt{apt-get} it). 101 \subsection{Building the packages} 102 To build the package, just use the tools that \texttt{svn-buildpackage} carries. First of all, we suggest you to define some aliases for the most common commands: 103 \begin{verbatim} 104 alias svn-b='svn-buildpackage -us -uc -rfakeroot --svn-ignore' 105 alias svn-br='svn-b --svn-dont-purge --svn-reuse' 106 alias svn-bt='svn-buildpackage --svn-tag -rfakeroot' 107 \end{verbatim} 108 You're ready now to checkout the sources (see the proper section). \\ \\ 109 Once done, you're ready to do the work. First, cd to the \texttt{trunk} directory, and download the upstream sources (if there is a debian/watch file): 110 \begin{verbatim} 111 echo "origDir=.." >> .svn/deb-layout && uscan --force-download 112 \end{verbatim} 113 Alternatively, you can try this, it depends on how the package was built (again, from the \texttt{trunk} directory: 114 \begin{verbatim} 115 debian/rules get-orig-source 116 \end{verbatim} 117 Once done, edit the files you need, and then build the package with \texttt{svn-b} or \texttt{svn-br}. \\ \\ 118 If you're a Debian-Med member, you can commit your changes: 119 \begin{verbatim} 120 svn commit 121 \end{verbatim} 122 (also \texttt{svn ci}). \\ 123 Otherwise, you can ask to be added to the group (see the Membership section), or send the result of \texttt{svn diff} to the \href{mailto:debian-med@lists.debian.org}{mailing list} (gzip it, if it's too large). 124 \subsection{Tagging packages} 125 It may happen that a package version has been uploaded to Debian repositories, and you forgot to tag the last build with 126 \begin{verbatim} 127 svn-buildpackage --svn-tag 128 \end{verbatim} 129 You can tag this package also retroactively. A first step, creating the \texttt{tags/} directory, can be achieved in two ways: 130 \begin{itemize} 131 \item create it locally (it is a sibling of \texttt{trunk/}), and commit: 132 \begin{verbatim} 133 svn mkdir tags 134 svn commit 135 \end{verbatim} 136 \item create it remotely: 137 \begin{verbatim} 138 svn mkdir svn+ssh://user@svn.debian.org/svn/debian-med/trunk/packages//tags 139 \end{verbatim} 140 \end{itemize} 141 After the \texttt{tags/} directory has been created, you're ready to tag the package: 142 \begin{verbatim} 143 svn-buildpackage --svn-tag-only --svn-no-autodch 144 \end{verbatim} 145 (\texttt{--svn-autodch} avoids \texttt{debian/changelog} to be marked as \texttt{UNRELEASED}). 146 \subsection{Handling patches} 147 Often happens that the upstream code doesn't fit well into the Debian distribution: be this wrong paths, missing features, anything that implies editing the source files. When you directly edit upstream's source files, your changes will be put into a \texttt{.diff.gz} file, which should instead contain only \texttt{debian/}. Because of this, it's best using a \emph{patch handling system}. The most known are \texttt{dpatch} and \texttt{quilt}. 148 \subsubsection{Using \texttt{dpatch}} 149 \paragraph{Creating a patch} 150 \texttt{dpatch-edit-patch}\\ 151 \paragraph{Applying and unapplying patches} 152 \texttt{apply(-all)}, \texttt{unapply(-all)}, \texttt{status}\\ 153 \paragraph{Editing a patch} 154 \texttt{dpatch-edit-patch}\\ 155 156 \subsubsection{Using \texttt{quilt}} 157 Using \texttt{quilt} is rather easy (easier than \texttt{dpatch}, I'd say). \\ 158 First, make sure you have correctly setup quilt: open \texttt{.quiltrc} in your home directory (create it if you don't have one), and make sure it looks like this: 159 \begin{verbatim} 160 QUILT_DIFF_ARGS="--no-timestamps --no-index" 161 QUILT_REFRESH_ARGS="--no-timestamps --no-index" 162 QUILT_PATCH_OPTS="--unified-reject-files" 163 QUILT_PATCHES="debian/patches" 164 \end{verbatim} 165 After this, you're ready to start working with quilt. 166 \paragraph{Creating a patch} 167 \texttt{new}, \texttt{edit}, \texttt{refresh}\\ 168 To create a patch, use the \texttt{new} command. Run: 169 \begin{verbatim} 170 quilt new .patch 171 \end{verbatim} 172 This will create (if it doesn't exist yet) a \texttt{debian/patches/series} file, which contains all the patches to be applied by quilt. Moreover, the new patch is also the \emph{topmost} (the currently applied). \\ \\ 173 Now start editing files, with: 174 \begin{verbatim} 175 quilt edit 176 \end{verbatim} 177 and repeat the process for each file the patch is involved with. At the end, run 178 \begin{verbatim} 179 quilt refresh 180 \end{verbatim} 181 This will compare the noted state of the edited files with the current state, and will produce a patch in \texttt{debian/patches}. Remember: the patch is currently \textbf{applied} (you can check this with \texttt{quilt applied}). 182 \paragraph{Applying and unapplying patches} 183 \texttt{push}, \texttt{pop}, \texttt{applied}, \texttt{unapplied}\\ 184 Just two easy commands to do the job: \\ \\ 185 \texttt{quilt pop} will unapply the topmost patch. \\ 186 \texttt{quilt push} will apply the next patch in \texttt{debian/patches/series}. \\ 187 You can just add a -a'' flag to the commands above, to respectively apply/unapply \textbf{all} patches in the series. \\ \\ 188 You can check which patches are applied / unapplied with, respectively, \texttt{quilt applied} and \texttt{quilt unapplied}. 189 \paragraph{Editing patches} 190 \texttt{push}, \texttt{pop}, \texttt{edit}, \texttt{refresh}\\ 191 To edit a patch, first make it the topmost: 192 \begin{verbatim} 193 quilt push 194 \end{verbatim} 195 If the patch is already applied, but is not the topmost, run \texttt{quilt pop} until it becomes the currently applied one. \\ \\ 196 You can now run \texttt{quilt edit} on the files you want to change, and, when you're done, \texttt{quilt refresh}. 197 \paragraph{Renaming patches} 198 \texttt{rename}\\ 199 Sometimes it's useful to rename a patch. Without any hassle, do: 200 \begin{verbatim} 201 quilt rename -P .patch .patch 202 \end{verbatim} 203 \paragraph{Other commands} 204 .\\ 205 Please see \texttt{man 1 quilt} to have a comprehensive list of commands. 206 \subsubsection{Integration in the build process} 207 TODO: 208 \begin{verbatim} 209 include /usr/share/{quilt,dpatch}/{quilt,dpatch}.make 210 \end{verbatim} 211 \texttt{\$(QUILT\_STAMPFN)} 212 ... 213 \end{document}