Let SYS be the system you wish to build for (e.g., debian-amd64)
2. create /etc/cran2deb
- a. copy ROOT/etc/* into /etc/cran2deb/sys/SYS/
- b. /etc/cran2deb/archive should be a symlink pointing to /var/www/cran2deb/
+ a. copy ROOT/etc/* into /etc/cran2deb/
+ b. ensure ROOT/etc/sys/SYS is set up
+ c. /etc/cran2deb/archive should be a symlink pointing to /var/www/cran2deb/
$ ln -s /var/www/cran2deb/ /etc/cran2deb/archive
$ mkdir /var/www/cran2deb/SYS
- c. modify OTHERMIRROR of /etc/cran2deb/pbuilderrc.in to point to your webserver
+ d. modify OTHERMIRROR of /etc/cran2deb/sys/SYS/pbuilderrc.in to point to your webserver
+ e. run: cran2deb repopulate
3. cran2deb needs a persistent cache outside of R's control. therefore, create
/var/cache/cran2deb, writable by whichever user(s) will run cran2deb.
+++ /dev/null
-[local]
-method = local
-incoming = /etc/cran2deb/archive/mini-dinstall/incoming
-allow_non-us_software = 1
-run_dinstall = 0
-run_lintian = 1
-post_upload_command = /usr/bin/mini-dinstall --batch -c /etc/cran2deb/mini-dinstall.conf
-allow_unsigned_uploads = 1
+++ /dev/null
-if [ -n "$(which java)" ]
-then
- R CMD javareconf
-fi
+++ /dev/null
-#!/bin/bash
-# example file to be used with --hookdir
-#
-# run lintian on generated deb files
-apt-get install -y --force-yes lintian
-lintian /tmp/buildd/*.deb
+++ /dev/null
-#!/bin/bash
-# example file to be used with --hookdir
-#
-# try to install the resulting debs.
-
-echo "Trying to install resulting packages and test upgrades"
-set -ex
-
-
-PKGNAMES=$(cd /tmp/buildd && ls -1 *.deb | sed 's/_.*$//' )
-
-# install-remove check
-dpkg -i /tmp/buildd/*.deb
-dpkg --remove $PKGNAMES
-
-# install-purge check
-dpkg -i /tmp/buildd/*.deb
-dpkg --purge $PKGNAMES
-
-# upgrade-remove check
-apt-get install -y --force-yes $PKGNAMES || true
-dpkg -i /tmp/buildd/*.deb
-dpkg --remove $PKGNAMES
-
-# upgrade-purge check
-apt-get install -y --force-yes $PKGNAMES || true
-dpkg -i /tmp/buildd/*.deb
-dpkg --purge $PKGNAMES
+++ /dev/null
-#!/bin/bash
-# example file to be used with --hookdir
-#
-# run tests. Current directory is top of source-code.
-#
-# 2005, 2007 Junichi Uekawa
-#
-set -e
-
-echo "Installing the prerequisites"
-for PKG in $(ls /tmp/buildd/*.deb | sed -e's,.*/,,;s,_.*,,' ); do
- apt-get install -y --force-yes "$PKG" || true
- apt-get remove -y "$PKG" || true
-done
-# ignore the failures since they are not the prime interest
-
-dpkg -i /tmp/buildd/*.deb
-
-if chmod a+x /tmp/buildd/*/debian/pbuilder-test/*; then
- :
-else
- echo "W: no pbuilder-test script found, skipping"
- exit 0
-fi
-
-SUCCESS=0
-COUNT=0
-unset FAIL || true
-NOFAIL=1
-
-# The current directory is the top of the source-tree.
-cd /tmp/buildd/*/debian/..
-
-for SCRIPT in $(run-parts --test /tmp/buildd/*/debian/pbuilder-test) ; do
- echo "--- BEGIN test: ${SCRIPT##*/}"
- if "${SCRIPT}"; then
- echo SUCCESS
- ((SUCCESS=SUCCESS+1))
- else
- echo FAIL
- FAIL[${#FAIL[@]}]="${SCRIPT##*/}"
- NOFAIL=0
- fi
- echo "--- END test: ${SCRIPT##*/}"
- ((COUNT=COUNT+1))
-done
-
-echo "Summary:"
-echo "=== $SUCCESS out of $COUNT tests passed"
-echo "${FAIL[@]/#/ failed }"
-echo "-- end of testsuite."
-
+++ /dev/null
-/usr/bin/apt-get update
+++ /dev/null
-[DEFAULT]
-architectures = all, i386, amd64
-use_dnotify = 0
-verify_sigs = 0
-mail_on_success = 0
-archive_style = simple-subdir
-mail_log_level = NONE
-archivedir = /etc/cran2deb/archive
-logfile = @ROOT@/mini-dinstall.log
-
-[unstable]
-
--- /dev/null
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 00_use_local_shebang.dpatch by <cb@xmcorsairs.wu-wien.ac.at>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: remove /usr/local from #!
+
+@DPATCH@
+
+diff -Naur CGIwithR.orig/inst/examples/dangerous.R CGIwithR/inst/examples/dangerous.R
+--- CGIwithR.orig/inst/examples/dangerous.R 2005-11-23 16:07:08.000000000 +0000
++++ CGIwithR/inst/examples/dangerous.R 2008-09-13 15:11:14.000000000 +0000
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/R
++#! /usr/bin/R
+
+ ### An example CGI script in R
+ ###
+diff -Naur CGIwithR.orig/inst/examples/trivial.R CGIwithR/inst/examples/trivial.R
+--- CGIwithR.orig/inst/examples/trivial.R 2005-11-23 16:07:08.000000000 +0000
++++ CGIwithR/inst/examples/trivial.R 2008-09-13 15:11:24.000000000 +0000
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/R
++#! /usr/bin/R
+
+ tag(HTML)
+ tag(HEAD)
--- /dev/null
+00_usr_local_shebang.patch
+++ /dev/null
-BASETGZ=/var/cache/pbuilder/base-cran2deb.tgz
-HOOKDIR=/etc/cran2deb/hook
-BUILDRESULT=/var/cache/cran2deb/results
-EXTRAPACKAGES='debhelper r-base-dev cdbs r-base-core lintian xvfb xauth xfonts-base'
-REMOVEPACKAGES='lilo libldap-2.4-2 libopencdk10 libsasl2-2'
-# don't actually need aptitude, but pbuilder insists...
-#REMOVEPACKAGES+='aptitude libcwidget3 libept0 libncursesw5 libsigc++-2.0-0c2a libxapian15'
-DISTRIBUTION=unstable
-OTHERMIRROR='deb http://localhost/users/cb/cran2deb/ unstable/$(ARCH)/ | deb http://localhost/users/cb/cran2deb/ unstable/all/'
-MIRRORSITE='http://ftp.debian.org/debian/'
-APTCACHE=''
-PBUILDERSATISFYDEPENDSCMD='/usr/lib/pbuilder/pbuilder-satisfydepends-classic'
--- /dev/null
+[local]
+method = local
+incoming = /etc/cran2deb/archive/debian-amd64/mini-dinstall/incoming
+allow_non-us_software = 1
+run_dinstall = 0
+run_lintian = 1
+post_upload_command = /usr/bin/mini-dinstall --batch -c /etc/cran2deb/sys/debian-amd64/mini-dinstall.conf
+allow_unsigned_uploads = 1
--- /dev/null
+[DEFAULT]
+architectures = all, i386, amd64
+use_dnotify = 0
+verify_sigs = 0
+mail_on_success = 0
+archive_style = simple-subdir
+mail_log_level = NONE
+archivedir = /etc/cran2deb/archive/debian-amd64
+logfile = /dev/null
+
+[unstable]
+
--- /dev/null
+BASETGZ=/var/cache/pbuilder/base-cran2deb-debian-amd64.tgz
+HOOKDIR=/etc/cran2deb/hook
+BUILDRESULT=/var/cache/cran2deb/results/debian-amd64
+EXTRAPACKAGES='debhelper r-base-dev cdbs r-base-core lintian xvfb xauth xfonts-base'
+REMOVEPACKAGES='lilo libldap-2.4-2 libopencdk10 libsasl2-2'
+# don't actually need aptitude, but pbuilder insists...
+#REMOVEPACKAGES+='aptitude libcwidget3 libept0 libncursesw5 libsigc++-2.0-0c2a libxapian15'
+DISTRIBUTION=unstable
+OTHERMIRROR='deb http://localhost/cran2deb/debian-amd64 unstable/$(ARCH)/ | deb http://localhost/cran2deb/debian-amd64 unstable/all/'
+MIRRORSITE='http://ftp.at.debian.org/debian/'
+APTCACHE=''
+PBUILDERSATISFYDEPENDSCMD='/usr/lib/pbuilder/pbuilder-satisfydepends-classic'
--- /dev/null
+[local]
+method = local
+incoming = /etc/cran2deb/archive/debian-i386/mini-dinstall/incoming
+allow_non-us_software = 1
+run_dinstall = 0
+run_lintian = 1
+post_upload_command = /usr/bin/mini-dinstall --batch -c /etc/cran2deb/sys/debian-i386/mini-dinstall.conf
+allow_unsigned_uploads = 1
--- /dev/null
+[DEFAULT]
+architectures = all, i386
+use_dnotify = 0
+verify_sigs = 0
+mail_on_success = 0
+archive_style = simple-subdir
+mail_log_level = NONE
+archivedir = /etc/cran2deb/archive/debian-i386
+logfile = /dev/null
+
+[unstable]
+
--- /dev/null
+BASETGZ=/var/cache/pbuilder/base-cran2deb-debian-i386.tgz
+HOOKDIR=/etc/cran2deb/hook
+BUILDRESULT=/var/cache/cran2deb/results/debian-i386
+EXTRAPACKAGES='debhelper r-base-dev cdbs r-base-core lintian xvfb xauth xfonts-base'
+REMOVEPACKAGES='lilo libldap-2.4-2 libopencdk10 libsasl2-2'
+# don't actually need aptitude, but pbuilder insists...
+#REMOVEPACKAGES+='aptitude libcwidget3 libept0 libncursesw5 libsigc++-2.0-0c2a libxapian15'
+DISTRIBUTION=unstable
+OTHERMIRROR='deb http://localhost/cran2deb/debian-i386 unstable/$(ARCH)/ | deb http://localhost/cran2deb/debian-i386 unstable/all/'
+MIRRORSITE='http://ftp.at.debian.org/debian/'
+APTCACHE=''
+PBUILDERSATISFYDEPENDSCMD='/usr/lib/pbuilder/pbuilder-satisfydepends-classic'
+DEBOOTSTRAPOPTS='--arch=i386'