'\" t .\" Title: GRIP-CRON.SH .\" Author: Neil Williams .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: Wed 23 Sep 2009 07:57:16 BST .\" Manual: EMDEBIAN-GRIP .\" Source: EMDEBIAN-GRIP Release: 2.2.0 .\" Language: English .\" .TH "GRIP\-CRON\&.SH" "1" "Wed 23 Sep 2009 07:57:16 BST" "EMDEBIAN\-GRIP Release: 2.2.0" "EMDEBIAN\-GRIP" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" grip-cron.sh \- cron job for Emdebian Grip with a logfile .SH "SYNOPSIS" .HP \w'\fB/usr/share/emdebian\-tools/grip\-cron\&.sh\fR\ 'u \fB/usr/share/emdebian\-tools/grip\-cron\&.sh\fR [\-b] [\-\-base\-path] [[\-\-t] | [\-\-tmpfs]] [[\-\-e] | [\-\-edos\-only]] .SH "DESCRIPTION" .PP \fBgrip\-cron\&.sh\fR is a wrapper for cron to automate updates using \fBem_autogrip\fR, using a logfile for all output\&. .PP The filter repository is updated against a Debian mirror, updated packages are downloaded and gripped, packages that have migrated into Debian testing are also migrated into Emdebian Grip testing and dependency checks are run\&. .PP Note that \fBgrip\-cron\&.sh\fR can take large amounts of time, temporary disc space, CPU and network bandwidth during each run, depending on the number of changes in the relevant Debian archives since the last run of \fBgrip\-cron\&.sh\fR\&. Unpacking and repacking Debian binary packages can use a \fItmpfs\fR if already mounted\&. Ensure that the directory for the \fItmpfs\fR is writeable by the process / user running \fBgrip\-cron\&.sh\fR\&. You may need to use \fBsudo mkdir\fR to create a suitable directory in your \fItmpfs\fR and then use \fBsudo chown\fR for the user running \fBgrip\-cron\&.sh\fR\&. \fItmpfs\fR will use swap space if appropriate but problems can occur if your \fItmpfs\fR does not provide enough space to unpack the larger Debian packages in Grip (generally build dependencies) which can be more than 11Mb compressed\&. .PP \fB\-b\fR|\fB\-\-base\-path\fR .RS 4 The top level directory of the Emdebian Grip repository\&. If your filter and grip repositories are in \fI/path/filter/\fR and \fI/path/grip/\fR, the \fBbase\-path\fR is \fI/path\fR\&. .sp The \fBbase\-path\fR must always be specified when using \fBgrip\-cron\&.sh\fR\&. .RE .PP \fB\-t\fR|\fB\-\-tmpfs\fR .RS 4 The path to a writeable directory within an \fItmpfs\fR which must be already mounted\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBTmpfs will not grow dynamically\fR .ps -1 .br Using a \fItmpfs\fR could mean that certain packages fail to be updated because \fBdpkg \-X\fR failed with an error of \fINo space left on device\fR\&. Check the \fBgrip\-cron\&.sh\fR logfiles and enlarge the \fItmpfs\fR before running \fBgrip\-cron\&.sh\fR again\&. .sp .5v .RE .RE .PP \fB\-e\fR|\fB\-\-edos\-only\fR .RS 4 Skips the updates and just runs the edos checks for each architecture, outputting to the logfile as usual\&. This is useful when just adding and updating packages to fix missing dependencies\&. .sp \fB\-\-tmpfs\fR has no effect in this mode\&. .RE .SH "EXAMPLES" .PP \fBExample\ \&1.1.\ \&Example crontab\fR .sp .if n \{\ .RS 4 .\} .nf 0 2 * * * /usr/share/emdebian\-tools/grip\-cron\&.sh \-b /opt/reprepro .fi .if n \{\ .RE .\} .PP \fBExample\ \&1.2.\ \&Example to setup the tmpfs\fR .PP The size of the \fItmpfs\fR is open to debate\&. A tmpfs can use swap space if not enough RAM is available for the contents of the tmpfs but the size of the tmpfs itself cannot be changed without unmounting and remounting it\&. i\&.e\&. not without restarting \fBgrip\-cron\&.sh\fR\&. Packages that attempt to unpack more files than the tmpfs can hold will fail to be updated\&. Check the logs carefully\&. .sp .if n \{\ .RS 4 .\} .nf $ cd /opt/reprepro/ $ mkdir tmpfs $ sudo chmod +t tmpfs $ sudo chmod 777 tmpfs $ sudo mount \-t tmpfs \-o size=1G,user tmpfs tmpfs/ .fi .if n \{\ .RE .\} .PP crontab for this setup: .sp .if n \{\ .RS 4 .\} .nf 0 2 * * * /usr/share/emdebian\-tools/grip\-cron\&.sh \-b /opt/reprepro \-t /opt/reprepro/tmpfs .fi .if n \{\ .RE .\} .SH "AUTHOR" .PP \fBEmdebian\fR .PP \fBNeil Williams\fR .RS 4 Debian and Emdebian developer. .RE .SH "COPYRIGHT" .br The GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007.PP This documentation is part of emdebian-grip. .PP emdebian-grip is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program. If not, see \m[blue]\fBhttp://www.gnu.org/licenses/\fR\m[]. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP In Debian you can find a copy of the GNU General Public Licence in /usr/share/common-licenses/GPL-3 .sp .5v .RE .sp