diff --git a/anvil/packaging/base.py b/anvil/packaging/base.py index 7aa6778e..4a2c6a3f 100644 --- a/anvil/packaging/base.py +++ b/anvil/packaging/base.py @@ -91,7 +91,7 @@ OPENSTACK_PACKAGES = set([ class DependencyHandler(object): """Basic class for handler of OpenStack dependencies. """ - multipip_executable = sh.which("multipip", ["multipip"]) + multipip_executable = sh.which("multipip", ["tools/"]) # Update requirements to make them allow already installed packages force_frozen = True diff --git a/anvil/packaging/yum.py b/anvil/packaging/yum.py index ab781252..3a278485 100644 --- a/anvil/packaging/yum.py +++ b/anvil/packaging/yum.py @@ -108,7 +108,7 @@ class YumPackager(base.Packager): class YumDependencyHandler(base.DependencyHandler): OPENSTACK_DEPS_PACKAGE_NAME = "openstack-deps" OPENSTACK_EPOCH = 2 - py2rpm_executable = sh.which("py2rpm", ["multipip"]) + py2rpm_executable = sh.which("py2rpm", ["tools/"]) def __init__(self, distro, root_dir, instances): super(YumDependencyHandler, self).__init__(distro, root_dir, instances) diff --git a/smithy b/smithy index 254d234f..e20547f2 100755 --- a/smithy +++ b/smithy @@ -7,7 +7,7 @@ cd "$(dirname "$0")" YUM_OPTS="--assumeyes --nogpgcheck" PIP_CMD="" -PY2RPM_CMD="$PWD/multipip/py2rpm" +PY2RPM_CMD="$PWD/tools/py2rpm" # Source in our variables (or overrides) source ".anvilrc" diff --git a/multipip/README.rst b/tools/README.rst similarity index 67% rename from multipip/README.rst rename to tools/README.rst index 5979cfb8..d1a7106c 100644 --- a/multipip/README.rst +++ b/tools/README.rst @@ -1,5 +1,8 @@ +**Anvil utility toolbelt** +========================== + multipip -======== +-------- `pip` utility refuses to handle multiple requirements for one package:: @@ -54,22 +57,23 @@ freeze`):: pip==1.2 py2rpm -====== +------ Distutils provides an interface for building RPMs:: $ python ./setup.py bdist_rpm This tool has several problems: + * Red Hat based distros use different package names, e.g., `python-setuptools` instead of `distribute`, `python-nose` instead - of `nose` and so on; -* `Requires` and `Conflicts` sections for generated RPM are incorrect; -* sometimes not all required files are packaged; -* miscellaneous problems with man files; -* package directory in `/usr/lib*/python*/site-packages/` is not + of `nose` and so on... +* `Requires` and `Conflicts` sections for generated RPM are incorrect. +* Sometimes not all required files are packaged. +* Miscellaneous problems with man files; +* Package directory in `/usr/lib*/python*/site-packages/` is not owned by any RPM; -* some packages (like selenium) are architecture dependent but +* Some packages (like selenium) are architecture dependent but `bdist_rpm` generates `BuildArch: noarch` for them. `py2rpm` is aimed to solve all these problems. @@ -82,3 +86,43 @@ builds RPMs (current directory is used by default):: Wrote: /home/guest/rpmbuild/SRPMS/python-multipip-0.1-1.src.rpm Wrote: /home/guest/rpmbuild/RPMS/noarch/python-multipip-0.1-1.noarch.rpm ... + +build-install-node-from-source.sh +--------------------------------- + +Helps build latest `node.js` from source into rpms. + +clean-pip +--------- + +This utility removes package installed by pip but not by rpm. + +clear-dns.sh +------------ + +Removes leftover nova dnsmasq processes frequently left behind. + +img-uploader +------------ + +Helper tool to upload images to glance using your anvil settings. + +validate-yaml +------------- + +Validates yaml is formatted correctly. + +yaml-pretty +----------- + +Pretty prints yaml into a standard format. + +resize.sh +--------- + +Resizes a images filesystem using guestfish. + +euca.sh +------- + +Creates ec2 keys for usage with nova. diff --git a/clean-pip b/tools/clean-pip similarity index 100% rename from clean-pip rename to tools/clean-pip diff --git a/tools/clear-net-ubuntu.sh b/tools/clear-net-ubuntu.sh deleted file mode 100755 index b08461d4..00000000 --- a/tools/clear-net-ubuntu.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -x - -ETH_SRC="eth0" - -echo "Clearing your network up." - -if [[ -n `brctl show | grep -i br100` ]] -then - echo "Clearing br100 and making $ETH_SRC be the real interface." - sudo ifconfig $ETH_SRC down - sudo ifconfig br100 down - sudo brctl delif br100 $ETH_SRC - sudo brctl delbr br100 -fi - -if [[ -n `brctl show | grep -i virbr0` ]] -then - echo "Removing virbr0" - sudo ifconfig virbr0 down - sudo brctl delbr virbr0 -fi - - -for pid in `ps -elf | grep -i dnsmasq | grep nova | perl -le 'while (<>) { my $pid = (split /\s+/)[3]; print $pid; }'` -do - echo "Killing leftover nova dnsmasq process with process id $pid" - kill -9 $pid -done - - -if [[ -z `grep "iface $ETH_SRC" /etc/network/interfaces` ]] -then - - echo "Readjusting /etc/network/interfaces to have DHCP on for $ETH_SRC" - sudo cat > /etc/network/interfaces <