debian/0000775000000000000000000000000011772271435007201 5ustar debian/changelog0000664000000000000000000000063511772271432011054 0ustar ebsmount (0.94-0ubuntu1) quantal; urgency=low * New upstream release. * Change build structure to satisfy Lintian. * Bump Standards-Version to 3.9.3. -- Logan Rosen Sun, 24 Jun 2012 23:30:38 -0400 ebsmount (0.92-0ubuntu1) maverick; urgency=low * Initial release. * functionality is disabled by default. -- Scott Moser Wed, 16 Jun 2010 09:38:30 -0400 debian/ebsmount.conf0000664000000000000000000000027211772271432011702 0ustar # ebsmount config file ENABLED=False MOUNTDIR=/media/ebs MOUNTOPTIONS=noatime FILESYSTEMS=ext2 ext3 LOGFILE=/var/log/ebsmount.log DEVPATHS=/devices/xen/vbd- /devices/virtio-pci/virtio debian/source/0000775000000000000000000000000011772271435010501 5ustar debian/source/format0000664000000000000000000000001411772271432011704 0ustar 3.0 (quilt) debian/rules0000775000000000000000000000144711772271432010264 0ustar #! /usr/bin/make -f progname=$(shell awk '/^Source/ {print $$2}' debian/control) buildroot=debian/$(progname) prefix=$(buildroot)/usr clean: dh_clean rm -f 85-ebsmount.rules build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: mkdir -p $(prefix) install: dh_testroot dh_clean -k dh_testdir dh_installdirs dh_install $(MAKE) install prefix=$(prefix) destdir=$(buildroot) dh_link dh_install debian/ebsmount.conf $(destdir)/etc binary-indep: install dh_testdir dh_testroot dh_installdocs docs/ dh_installman man/ebsmount-manual.1 man/ebsmount-udev.8 dh_installchangelogs dh_compress dh_installdeb dh_gencontrol dh_md5sums dh_builddeb binary-arch: install binary: binary-indep binary-arch .PHONY: clean binary-indep binary-arch binary install debian/copyright0000664000000000000000000000213011772271432011125 0ustar Author: Alon Swartz Contributors: Liraz Siri Scott Moser Shahar Evron License: Copyright (C) 2010 Alon Swartz This program 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 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. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian and Ubuntu systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. debian/compat0000664000000000000000000000000211772271432010374 0ustar 5 debian/watch0000664000000000000000000000016611772271432010232 0ustar version=3 http://github.com/turnkeylinux/ebsmount/downloads /downloads/turnkeylinux/ebsmount/ebsmount-([\d.]+).tar.gz debian/control0000664000000000000000000000117411772271432010604 0ustar Source: ebsmount Section: misc Priority: optional Maintainer: Ubuntu MOTU Developers Build-Depends: debhelper (>= 5) Uploaders: Scott Moser XSBC-Original-Maintainer: Alon Swartz Standards-Version: 3.9.3 Package: ebsmount Architecture: all Depends: python (>= 2.4), udev, ${misc:Depends} Description: Automatically mount EC2/Eucalyptus EBS devices Automatically mounts EBS (Elastic Block Storage) devices when they are attached, supports formatted devices as well as partitions, uniquely identifiable mount points, and hooking scripts execution upon mount. debian/patches/0000775000000000000000000000000011772271435010630 5ustar debian/patches/series0000664000000000000000000000011011772271432012032 0ustar remove-85-ebsmount-rules.patch remove-dependency-on-turnkey-pylib.patch debian/patches/remove-dependency-on-turnkey-pylib.patch0000664000000000000000000001343411772271432020512 0ustar Description: remove dependency on turnkey-pylib This copied conffile and executil from turnkey-pylib. It removes the dependency on turnkey-pylib. This will reduce our packaging work from 2 packages and MIR to 1. . Specifically, these files were pulled from http://github.com/turnkeylinux/turnkey-pylib.git . git commit d9b93227b2502eaa751e9dc7f1e21cd12df801c9 --- /dev/null +++ b/conffile.py @@ -0,0 +1,97 @@ +# Copyright (c) 2010 Alon Swartz +# +# This program 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 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os + +class ConfFileError(Exception): + pass + +class ConfFile(dict): + """Configuration file class (targeted at simple shell type configs) + + Usage: + + class foo(ConfFile): + CONF_FILE = /path/to/conf + REQUIRED = ['arg1' ,'arg2'] + + conf = foo() + print conf.arg1 # display ARG1 value from /path/to/conf + conf.arg2 = value # set ARG2 value + conf.write() # write new/update config to /path/to/conf + """ + CONF_FILE = None + REQUIRED = [] + SET_ENVIRON = False + + def __init__(self): + self.read() + self.validate_required() + if self.SET_ENVIRON: + self.set_environ() + + def validate_required(self, required=[]): + """raise exception if required arguments are not set + REQUIRED validated by default, but can be optionally extended + """ + self.REQUIRED.extend(required) + for attr in self.REQUIRED: + if not self.has_key(attr): + error = "%s not specified in %s" % (attr.upper(), self.CONF_FILE) + raise ConfFileError(error) + + def set_environ(self): + """set environment (run on initialization if SET_ENVIRON)""" + for key, val in self.items(): + os.environ[key.upper()] = val + + def read(self): + if not self.CONF_FILE or not os.path.exists(self.CONF_FILE): + return + + for line in file(self.CONF_FILE).readlines(): + line = line.rstrip() + + if not line or line.startswith("#"): + continue + + key, val = line.split("=") + self[key.strip().lower()] = val.strip() + + def write(self): + fh = file(self.CONF_FILE, "w") + items = self.items() + items.sort() + for key, val in items: + print >> fh, "%s=%s" % (key.upper(), val) + + fh.close() + + def items(self): + items = [] + for key in self: + items.append((key, self[key])) + + return items + + def __getattr__(self, key): + try: + return self[key] + except KeyError, e: + raise AttributeError(e) + + def __setattr__(self, key, val): + self[key] = val + --- /dev/null +++ b/executil.py @@ -0,0 +1,71 @@ +# Copyright (c) 2008 Liraz Siri +# +# This program 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 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +"""This module contains high-level convenience functions for safe +command execution that properly escape arguments and raise an +ExecError exception on error""" +import os +import sys +import commands + +mkarg = commands.mkarg + +class ExecError(Exception): + """Accessible attributes: + command executed command + exitcode non-zero exitcode returned by command + output error output returned by command + """ + def __init__(self, command, exitcode, output=None): + Exception.__init__(self, command, exitcode, output) + + self.command = command + self.exitcode = exitcode + self.output = output + + def __str__(self): + str = "non-zero exitcode (%d) for command: %s" % (self.exitcode, + self.command) + if self.output: + str += "\n" + self.output + return str + +def fmt_command(command, *args): + return command + " ".join([mkarg(arg) for arg in args]) + +def system(command, *args): + """Executes with <*args> -> None + If command returns non-zero exitcode raises ExecError""" + + sys.stdout.flush() + sys.stderr.flush() + + command = fmt_command(command, *args) + error = os.system(command) + if error: + exitcode = os.WEXITSTATUS(error) + raise ExecError(command, exitcode) + +def getoutput(command, *args): + """Executes with <*args> -> output + If command returns non-zero exitcode raises ExecError""" + + command = fmt_command(command, *args) + error, output = commands.getstatusoutput(command) + if error: + exitcode = os.WEXITSTATUS(error) + raise ExecError(command, exitcode, output) + + return output debian/patches/remove-85-ebsmount-rules.patch0000664000000000000000000000055711772271432016366 0ustar Description: remove the generated 85-ebsmount-rules file 85-ebsmount-rules is generated from the 85-ebsmount-rules.in file remove it so it is not collected as a part of ubuntu changes --- ebsmount-0.91.orig/Makefile +++ ebsmount-0.91/Makefile @@ -77,3 +77,4 @@ uninstall: # target: clean clean: rm -f *.pyc *.pyo *.rules _$(progname) + rm -f 85-ebsmount.rules