diff options
Diffstat (limited to 'gkeys')
-rw-r--r-- | gkeys/MANIFEST.in | 2 | ||||
-rwxr-xr-x | gkeys/bin/gkeys | 53 | ||||
-rw-r--r-- | gkeys/etc/gkeys.conf.sample | 97 | ||||
-rw-r--r-- | gkeys/gkeys/__init__.py (renamed from gkeys/__init__.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/actions.py (renamed from gkeys/actions.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/base.py (renamed from gkeys/base.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/checks.py (renamed from gkeys/checks.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/cli.py (renamed from gkeys/cli.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/config.py (renamed from gkeys/config.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/fileops.py (renamed from gkeys/fileops.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/lib.py (renamed from gkeys/lib.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/log.py (renamed from gkeys/log.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/seed.py (renamed from gkeys/seed.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/seedhandler.py (renamed from gkeys/seedhandler.py) | 0 | ||||
-rw-r--r-- | gkeys/gkeys/utils.py (renamed from gkeys/utils.py) | 0 | ||||
-rwxr-xr-x | gkeys/setup.py | 48 |
16 files changed, 200 insertions, 0 deletions
diff --git a/gkeys/MANIFEST.in b/gkeys/MANIFEST.in new file mode 100644 index 0000000..c1a7121 --- /dev/null +++ b/gkeys/MANIFEST.in @@ -0,0 +1,2 @@ +include LICENSE +include README.md diff --git a/gkeys/bin/gkeys b/gkeys/bin/gkeys new file mode 100755 index 0000000..7f72255 --- /dev/null +++ b/gkeys/bin/gkeys @@ -0,0 +1,53 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +'''Gentoo-keys is a gpg key manager for managing + gentoo's gpg-signing keys. It is these keys that are + used to verify and validate release media, etc.. + + Distributed under the terms of the GNU General Public License v2 + + Copyright: + (c) 2011 Brian Dolbec + Distributed under the terms of the GNU General Public License v2 + + Author(s): + Brian Dolbec <dolsen@gentoo.org> + +''' + +from __future__ import print_function + +from gkeys.cli import Main + +import os +import sys + + +# This block ensures that ^C interrupts are handled quietly. +try: + import signal + + def exithandler(signum,frame): + signal.signal(signal.SIGINT, signal.SIG_IGN) + signal.signal(signal.SIGTERM, signal.SIG_IGN) + print() + sys.exit(1) + + signal.signal(signal.SIGINT, exithandler) + signal.signal(signal.SIGTERM, exithandler) + signal.signal(signal.SIGPIPE, signal.SIG_DFL) + +except KeyboardInterrupt: + print() + sys.exit(1) + +root = None +if 'ROOT' in os.environ: + root = os.environ['ROOT'] + +main = Main(root=root) +success = main() + +# exit is boolean opposite normal True/False +sys.exit(not success) diff --git a/gkeys/etc/gkeys.conf.sample b/gkeys/etc/gkeys.conf.sample new file mode 100644 index 0000000..4c6b2d0 --- /dev/null +++ b/gkeys/etc/gkeys.conf.sample @@ -0,0 +1,97 @@ +# Gentoo-keys configuration file +# + +[DEFAULT] + +# keyserver: server to use to obtain the keys from +keyserver: pool.sks-keyservers.net + + +# gkeysdir: Base directory to use as the path prefix to use +# for the gkey directories, keyring settings +# eg: '/' for root if absolute paths are used +# for sub-directories, keyrings +# eg: /var/lib/gentoo/gkeys if using relative paths +gkeysdir: /var/lib/gentoo/gkeys + + +# dev-category: The directory where the gentoo developer keys +# will be stored. +dev-category: %(gkeysdir)s/devs + + +# rel-category: The directory where the official release media keys +# will be stored. +rel-category: %(gkeysdir)s/release + + +# sign-category: The directory to use as the path prefix to use +# for the signing capable keyrings, keyring settings +sign-category: %(gkeysdir)s/sign + + +# keyring: The directory where the official keyring with the specified keys +# will be exported. +keyring: %(gkeysdir)s/keyring + + +# overlayskeydir: The directory where the overlay keys +# will be stored. +overlays-category: %(gkeysdir)s/overlays + + +# seedsdir: The directory for all seed files +# used when searching all seed files. +seedsdir: %(gkeysdir)s/seeds + + +# logfile directory +logdir: /var/log/gkeys + + +[permissions] + +# Permissions settings (octal) +# chmod setting (octal) +directories: 0o775 + +#umask setting (octal) +files: 0o007 + + +[seeds] + +# *-seedfile: json txt file of name, keyid, fingerprint +# entry per line +gentoo: %(seedsdir)s/gentoo.seeds +gentoodevs: %(seedsdir)s/gentoodevs.seeds + + +[seedurls] + +# Use the filenames as the keys. +# The will be paired to the seed file of the same name for fetching, updating +gentoo: https://api.gentoo.org/gentoo-keys/seeds/gentoo.seeds +gentoodevs: https://api.gentoo.org/gentoo-keys/seeds/gentoodevs.seeds + + +# GKEY nick used for verification of seeds and other gkey files +gkey = gkeys + + +[sign] + +# The home or key directory to use for signing files +#keydir: foo + + +# keyring to use if not the default +# keyring: bar + + +# The key fingerprint to use for signing +# key: 0x01234567891012345 + + +# the gpg signature option to use for signing +# type: detach-sign diff --git a/gkeys/__init__.py b/gkeys/gkeys/__init__.py index 7e8b64e..7e8b64e 100644 --- a/gkeys/__init__.py +++ b/gkeys/gkeys/__init__.py diff --git a/gkeys/actions.py b/gkeys/gkeys/actions.py index a224372..a224372 100644 --- a/gkeys/actions.py +++ b/gkeys/gkeys/actions.py diff --git a/gkeys/base.py b/gkeys/gkeys/base.py index 95142f9..95142f9 100644 --- a/gkeys/base.py +++ b/gkeys/gkeys/base.py diff --git a/gkeys/checks.py b/gkeys/gkeys/checks.py index db3d59f..db3d59f 100644 --- a/gkeys/checks.py +++ b/gkeys/gkeys/checks.py diff --git a/gkeys/cli.py b/gkeys/gkeys/cli.py index 32d2ec4..32d2ec4 100644 --- a/gkeys/cli.py +++ b/gkeys/gkeys/cli.py diff --git a/gkeys/config.py b/gkeys/gkeys/config.py index 775ea1f..775ea1f 100644 --- a/gkeys/config.py +++ b/gkeys/gkeys/config.py diff --git a/gkeys/fileops.py b/gkeys/gkeys/fileops.py index 7cb244f..7cb244f 100644 --- a/gkeys/fileops.py +++ b/gkeys/gkeys/fileops.py diff --git a/gkeys/lib.py b/gkeys/gkeys/lib.py index 50ed63e..50ed63e 100644 --- a/gkeys/lib.py +++ b/gkeys/gkeys/lib.py diff --git a/gkeys/log.py b/gkeys/gkeys/log.py index a16767e..a16767e 100644 --- a/gkeys/log.py +++ b/gkeys/gkeys/log.py diff --git a/gkeys/seed.py b/gkeys/gkeys/seed.py index f0cb019..f0cb019 100644 --- a/gkeys/seed.py +++ b/gkeys/gkeys/seed.py diff --git a/gkeys/seedhandler.py b/gkeys/gkeys/seedhandler.py index cc797b9..cc797b9 100644 --- a/gkeys/seedhandler.py +++ b/gkeys/gkeys/seedhandler.py diff --git a/gkeys/utils.py b/gkeys/gkeys/utils.py index 92abc50..92abc50 100644 --- a/gkeys/utils.py +++ b/gkeys/gkeys/utils.py diff --git a/gkeys/setup.py b/gkeys/setup.py new file mode 100755 index 0000000..20b346e --- /dev/null +++ b/gkeys/setup.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python + +import os +import sys + +from distutils.core import setup +from gkeys import __version__, __license__ + +# this affects the names of all the directories we do stuff with +sys.path.insert(0, './') + +#__version__ = os.getenv('VERSION', default='9999') + +# Load EPREFIX from Portage, fall back to the empty string if it fails +try: + from portage.const import EPREFIX +except ImportError: + EPREFIX='' + + +setup( + name='gkeys', + version=__version__, + description="Gentoo gpg key management and Python interface to gpg", + author='', + author_email='', + maintainer='Gentoo-Keys Team', + maintainer_email='gkeys@gentoo.org', + url="https://wiki.gentoo.org/wiki/Project:Gentoo-keys", + download_url='', + packages=['gkeys'], + scripts=['bin/gkeys'], + data_files=( + (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc'), ['etc/gkeys.conf']), + (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc'), ['etc/gkeys.conf.sample']), + ), + license=__license__, + long_description=open('README.md').read(), + keywords='gpg', + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers, Users', + 'License :: OSI Approved :: GPLv2 License', + 'Programming Language :: Python :: 2.7, 3.3, 3.4, +', + 'Operating System :: OS Independent', + 'Topic :: Security :: Cryptography', + ], +) |