From: Michael Hanke Date: Tue, 22 Mar 2011 13:03:53 +0000 (-0400) Subject: New repository setup instruction. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8409b537f2a6a8dd347e3fdb39915ac5d4e981f9;p=neurodebian.git New repository setup instruction. Javascript-based selection menu and setup code generation. Advantages: users can now simply copy/paste two lines and get the full setup, instead of having to figure out what to copy where, after downloading into a temporary directory and post-hoc enabling the gpg key. --- diff --git a/Makefile b/Makefile index 4f37cf7..880f0d2 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ html: pics source cd artwork; cp button_w200.png logo_tuned/fmri_w200.png ../build/src/_static; cd .. cd build/src && $(MAKE) html BUILDDIR=$(CURDIR)/build 2>&1 mv $(WWW_DIR)/_static/robots.txt $(WWW_DIR)/ + cp -r build/src/lists $(WWW_DIR)/ clean: diff --git a/neurodebian/dde.py b/neurodebian/dde.py index aac6a64..c80ab18 100755 --- a/neurodebian/dde.py +++ b/neurodebian/dde.py @@ -639,7 +639,7 @@ def read_db(filename): def write_sourceslist(jinja_env, cfg, outdir): create_dir(outdir) - create_dir(os.path.join(outdir, '_static')) + create_dir(os.path.join(outdir, 'lists')) repos = {} for release in cfg.options('release codenames'): @@ -649,9 +649,9 @@ def write_sourceslist(jinja_env, cfg, outdir): transrel = trans_codename(release, cfg) repos[transrel] = [] for mirror in cfg.options('mirrors'): - listname = 'neurodebian.%s.%s.sources.list' % (release, mirror) + listname = '%s.%s' % (release, mirror) repos[transrel].append((mirror, listname)) - lf = open(os.path.join(outdir, '_static', listname), 'w') + lf = open(os.path.join(outdir, 'lists', listname), 'w') for rel in ('data', release): aptcfg = '%s %s main contrib non-free\n' % (cfg.get('mirrors', mirror), rel) @@ -659,9 +659,20 @@ def write_sourceslist(jinja_env, cfg, outdir): lf.write('#deb-src %s' % aptcfg) lf.close() + id2codename = dict([(cfg.get('release backport ids', r), r) + for r in cfg.options('release codenames')]) + id2relname = dict([(cfg.get('release backport ids', r), trans_codename(r, cfg)) + for r in cfg.options('release codenames')]) + mirror2name = dict([(m, cfg.get('mirror names', m)) + for m in cfg.options('mirrors')]) + mirror2url = dict([(m, cfg.get('mirrors', m)) + for m in cfg.options('mirrors')]) srclist_template = jinja_env.get_template('sources_lists.rst') sl = open(os.path.join(outdir, 'sources_lists'), 'w') - sl.write(srclist_template.render(repos=repos)) + sl.write(srclist_template.render(id2codename=id2codename, + id2relname=id2relname, + mirror2name=mirror2name, + mirror2url=mirror2url)) sl.close() diff --git a/neurodebian/templates/sources_lists.rst b/neurodebian/templates/sources_lists.rst index 58dd044..e48025e 100644 --- a/neurodebian/templates/sources_lists.rst +++ b/neurodebian/templates/sources_lists.rst @@ -1,4 +1,65 @@ -{% for dist, mirrors in repos|dictsort %} -* {{ dist }}: {% for mirror, list in mirrors|sort %}[`{{ mirror }} <_static/{{ list }}>`__] {% endfor %} -{% endfor %} +.. raw:: html + + + + +
+
+ After selecting a release the setup code will be shown here.
+ 
+
+ diff --git a/sphinx/index.rst b/sphinx/index.rst index 951e6e1..85c9341 100644 --- a/sphinx/index.rst +++ b/sphinx/index.rst @@ -87,61 +87,30 @@ Follow us on identi.ca_ or twitter_ to subscribe to the NeuroDebian news. How to use this repository ========================== -The easiest way to use this repository is to download an APT-configuration file -(`sources.list`). Simply choose your target distribution/release and download -the configuration for a mirror close to you (depending on your browser, you -might have to right-click and choose 'save as'). Once downloaded, put the file -in the `/etc/apt/sources.list.d/` directory on your system. Moving files in -this directory will require superuser privileges, therefore you should probably -download the file into a temporary directory and subsequently move it into -`/etc/apt/sources.list.d/`. APT-configurations are available for the following -releases and repository mirrors: +To enable the NeuroDebian repository on your system, select your Debian or +Ubuntu release and a repository mirror from the lists below. Upon selection +a short command snippet will be displayed that can be copied and pasted into +a terminal session. These commands will configure the system package manager +with the NeuroDebian repository key and package source information. .. include:: sources_lists -.. note:: - Thanks to the following institutions and individuals for hosting a mirror: - - * `Department of Psychological and Brain Sciences at Dartmouth College`_ - *[us-nh]* (primary mirror) - * `Department of Experimental Psychology at the University of Magdeburg`_ - *[de]* - * `Neurobot at Aristotle University of Thessaloniki, Greece`_ *[gr]* - * `Paul Ivanov`_ *[us-ca]* - * `Medical-image Analysis and Statistical Interpretation lab at Vanderbilt`_ - *[us-tn]* - - If your are interested in mirroring the repository, please see the :ref:`faq`. - -.. _Department of Psychological and Brain Sciences at Dartmouth College: http://www.dartmouth.edu/~psych -.. _Department of Experimental Psychology at the University of Magdeburg: http://apsy.gse.uni-magdeburg.de -.. _Neurobot at Aristotle University of Thessaloniki, Greece: http://neurobot.bio.auth.gr -.. _Paul Ivanov: http://www.pirsquared.org -.. _Medical-image Analysis and Statistical Interpretation lab at Vanderbilt: https://masi.vuse.vanderbilt.edu - Once this is done, you have to update the package index. Use your favorite -package manager, e.g. synaptic, adept, or whatever you like. In the terminal -you can use :command:`aptitude` to achieve the same:: +package manager, e.g. synaptic, adept. In the terminal you can use +:command:`apt-get` to achieve this:: - sudo aptitude update + sudo apt-get update -Now, you can proceed to install packages, e.g.:: +Now, you can install packages, e.g.:: - sudo aptitude install lipsia + sudo apt-get install mricron .. note:: + Not every package is available for all distributions/releases. For information about which package version is available for which release and architecture, please have a look at the corresponding package pages. -After this initial setup you probably also want to configure your package -manager to recognize the NeuroDebian archive key. With this key the package -manager can verify that packages haven't been modified and are identical with -the ones in the main NeuroDebian archive, regardless of which mirror you -downloaded them from. The NeuroDebian key id is **2649A5A9**. If you need further -help setting up package authentication, please take a look at -:ref:`corresponding FAQ `. - .. _chap_installation: @@ -223,6 +192,26 @@ Italian espresso `. .. _Jim Haxby: http://haxbylab.dartmouth.edu/ppl/jim.html +Thanks to the following institutions and individuals for hosting a mirror: + +* `Department of Psychological and Brain Sciences at Dartmouth College`_ + *[us-nh]* (primary mirror) +* `Department of Experimental Psychology at the University of Magdeburg`_ + *[de]* +* `Neurobot at Aristotle University of Thessaloniki, Greece`_ *[gr]* +* `Paul Ivanov`_ *[us-ca]* +* `Medical-image Analysis and Statistical Interpretation lab at Vanderbilt`_ + *[us-tn]* + +If your are interested in mirroring the repository, please see the :ref:`faq`. + +.. _Department of Psychological and Brain Sciences at Dartmouth College: http://www.dartmouth.edu/~psych +.. _Department of Experimental Psychology at the University of Magdeburg: http://apsy.gse.uni-magdeburg.de +.. _Neurobot at Aristotle University of Thessaloniki, Greece: http://neurobot.bio.auth.gr +.. _Paul Ivanov: http://www.pirsquared.org +.. _Medical-image Analysis and Statistical Interpretation lab at Vanderbilt: https://masi.vuse.vanderbilt.edu + + Publications ============