--- dphys-swapfile-20061020.orig/dphys-swapfile +++ dphys-swapfile-20061020/dphys-swapfile @@ -25,9 +25,6 @@ # this is what we want, 2 times RAM size SWAPFACTOR=2 -# this is a (outdated?) kernel limit (in MBytes), do not overrun it -MAXSWAP=2048 - # what we are NAME=dphys-swapfile @@ -59,13 +56,6 @@ # announce end resulting config echo -n "want ${CONF_SWAPFILE}=${CONF_SWAPSIZE}MByte" - # check for legitimate swap size and restrict to it - if [ "${CONF_SWAPSIZE}" -gt "${MAXSWAP}" ] ; then - echo -n ", limiting to kernel limit: ${MAXSWAP}MBytes" - CONF_SWAPSIZE="${MAXSWAP}" - fi - - # we will be later starting, and in between possible deleting/rebuilding # so deactivate any allready running swapfile, to avoid errors "$0" swapoff --- dphys-swapfile-20061020.orig/debian/docs +++ dphys-swapfile-20061020/debian/docs @@ -0,0 +1,2 @@ +FAQ +README --- dphys-swapfile-20061020.orig/debian/copyright +++ dphys-swapfile-20061020/debian/copyright @@ -0,0 +1,61 @@ +This package was debianized by Gürkan Sengün on +Fri, 15 Sep 2006 19:02:47 +0200. + +It was downloaded from http://www.phys.ethz.ch/~franklin/Projects/dphys-config/ + +Upstream Author: Neil Franklin + +This software is dual-licensed under the GNU General Public License (GPL), +and the modified/non-advertising BSD License (BSD). + +License (GPL): + + Copyright (C) 2003-2006 Neil Franklin + + This package 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 2 of the License, or + (at your option) any later version. + + This package 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. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +License (BSD): + + Copyright (C) 2003-2006 Neil Franklin + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +The Debian packaging is (C) 2006, Gürkan Sengün and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- dphys-swapfile-20061020.orig/debian/dirs +++ dphys-swapfile-20061020/debian/dirs @@ -0,0 +1 @@ +usr/sbin --- dphys-swapfile-20061020.orig/debian/init.d +++ dphys-swapfile-20061020/debian/init.d @@ -0,0 +1,76 @@ +#!/bin/sh +# /etc/init.d/dphys-swapfile - automatically set up an swapfile +# author Neil Franklin, last modification 2006.09.15 +# This script is copyright ETH Zuerich Physics Departement, +# use under either modified/non-advertising BSD or GPL license + +# this init.d script is intended to be run from rcS.d +# must run after mount of /var which may only happen in S35mountall.sh +# for this reason we can not build swapfile until after S35mountall.sh +# so we also need to use init.d start|stop to swapon|off our file +# and sensibly before the lots of stuff which may happen in S40networking +# so we run it as rcS.d/S37dphys-config + +### BEGIN INIT INFO +# Provides: dphys-swapfile +# Required-Start: $syslog +# Required-Stop: $syslog +# Should-Start: $local_fs +# Should-Stop: $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: +# Short-Description: Autogenerate and use a swap file +# Description: This init.d script exists so one does not need to have a fixed size +# swap partition. Instead install without swap partition and then run +# this, with file size (re-)computed automatically to fit the current +# RAM size. +### END INIT INFO + +# get ready to work +PATH=/sbin:/bin:/usr/sbin:/usr/bin +export PATH + +# what we are +NAME=dphys-swapfile + +case "$1" in + + start) + /bin/echo "Starting ${NAME} swapfile setup ..." + + # (re-)size/-generate (and also first time install) + # this will produce output, so no -n in above echo + /sbin/dphys-swapfile setup + + # as S35mountall.sh has already run, do this from here + # as there can be no swapon in /etc/fstab + /sbin/dphys-swapfile swapon + + /bin/echo "done." + ;; + + + stop|default-stop) + /bin/echo -n "Stopping ${NAME} swapfile setup ..." + + # as no swapon or swapoff in /etc/fstab, do this from here + /sbin/dphys-swapfile swapoff + + /bin/echo ", done." + ;; + + + restart|reload|force-reload) + /bin/echo "No daemon to (force-)re[start|load] in ${NAME}" + ;; + + + *) + /bin/echo "Usage: $0 {start|stop}" + + exit 1 + ;; + +esac + +exit 0 --- dphys-swapfile-20061020.orig/debian/compat +++ dphys-swapfile-20061020/debian/compat @@ -0,0 +1 @@ +5 --- dphys-swapfile-20061020.orig/debian/control +++ dphys-swapfile-20061020/debian/control @@ -0,0 +1,16 @@ +Source: dphys-swapfile +Section: admin +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Gürkan Sengün +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: dphys-swapfile +Architecture: all +Description: Autogenerate and use a swap file + This init.d script exists so one does not need to have a fixed size + swap partition. Instead install without swap partition and then run this, + with file size (re-)computed automatically to fit the current RAM size. + . + Homepage: http://www.phys.ethz.ch/~franklin/Projects/dphys-swapfile/ --- dphys-swapfile-20061020.orig/debian/rules +++ dphys-swapfile-20061020/debian/rules @@ -0,0 +1,45 @@ +#!/usr/bin/make -f +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp + +build-stamp: + dh_testdir + $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + -$(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) install DESTDIR=$(CURDIR)/debian/dphys-swapfile + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installinit + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- dphys-swapfile-20061020.orig/debian/changelog +++ dphys-swapfile-20061020/debian/changelog @@ -0,0 +1,18 @@ +dphys-swapfile (20061020-1ubuntu1) intrepid; urgency=low + + * applied patch from jacob.elder@gmail.com to remove max swap file size + logic (LP: #270180) + + -- Jim Qode Tue, 16 Sep 2008 14:12:18 +0300 + +dphys-swapfile (20061020-1) unstable; urgency=low + + * New upstream version. + + -- Gürkan Sengün Thu, 26 Oct 2006 09:15:10 +0200 + +dphys-swapfile (20060915-1) unstable; urgency=low + + * Initial release. (Closes: #388631) + + -- Gürkan Sengün Fri, 15 Sep 2006 19:02:47 +0200