summaryrefslogtreecommitdiffstats
path: root/rpmbuild-remote.py
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-02-07 23:39:47 -0500
committerBen Boeckel <MathStuf@gmail.com>2009-02-07 23:39:47 -0500
commit5a5b8a85aa5d073023e71e28bdc5b0b224eae359 (patch)
treed0df6fb98a9cde97c0445e481d7d6ec18972d191 /rpmbuild-remote.py
parent0476cdf8e938e42a6fc8868d19e0878301de5412 (diff)
downloadrpmbuild-remote-5a5b8a85aa5d073023e71e28bdc5b0b224eae359.tar.gz
rpmbuild-remote-5a5b8a85aa5d073023e71e28bdc5b0b224eae359.tar.xz
rpmbuild-remote-5a5b8a85aa5d073023e71e28bdc5b0b224eae359.zip
Added config boilerplate
Diffstat (limited to 'rpmbuild-remote.py')
-rw-r--r--rpmbuild-remote.py42
1 files changed, 41 insertions, 1 deletions
diff --git a/rpmbuild-remote.py b/rpmbuild-remote.py
index 4f01af5..1b7b762 100644
--- a/rpmbuild-remote.py
+++ b/rpmbuild-remote.py
@@ -2,11 +2,51 @@
# -*- coding: utf-8 -*-
from iniparse import INIConfig
+import paramiko
import getopt
import sys
+import os
+
+def usage():
+ print """
+rpmbuild-remote : Build an RPM on a remote system
+
+ rpmbuild-remote [options]... <files>...
+
+ --help Print this message
+ -c, --config <config> Configuration file to use for the build.
+ Default: ~/.rpmbuild-remote
+ -s, --system <system> The remote machine to use (defined in config
+ file)
+ -u, --user <username> The username on the remote system
+ Default: current user
+ -h, --host <host> The hostname/IP of the remote system
+ -p, --port <port> The port to use on the remote system
+ Default: 21
+ -d, --dest <dest> Directory to place resulting files
+ Default: ~/rpmbuild-remote/
+ -m, --mock <target> Use mock (only applies to SRPM files)
+ Default: None
+ files The list of files can contain either SRPM
+ files or a list starting with a spec file and
+ followed by sources for the package.
+"""
def main(argv):
- config = INIConfig()
+ try:
+ opts, args = getopts.getopts(argv, "c:s:u:h:p:d:m:", ['config=', 'system=', 'user=', 'host=', 'port=', 'dest=', 'mock='])
+ except getopt.GetoptError, err:
+ print str(err)
+ usage()
+ sys.exit(1)
+ home = os.path.expanduser('~')
+ config = os.path.join(home, '.rpmbuild-remote')
+ system = ''
+ user = os.getlogin()
+ host = ''
+ port = 21
+ dest = os.path.join(home, 'rpmbuild-remote')
+ mock = ''
if __name__ == '__main__':
main(sys.argv[1:])