{ "info": { "author": "Kirill Shestakov", "author_email": "freyr.sh@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3 :: Only" ], "description": "# __aptly-ctl__ -- Convenient aptly API client\n\n__aptly-ctl__ is a command line tool for managing [aplty](https://www.aptly.info/) repositories remotely via [API](https://www.aptly.info/doc/api/). This tool tries to group most common repository operations into composite ones, more convenient for humans, and maintain ability to perform any atomic API request at the same time. __aptly-ctl__ is built upon [aptly-api-client](https://github.com/gopythongo/aptly-api-client) library and MIT licensed.\n\n***\n\n## Features\n* `put` subcommand uploads deb package to aptly instance, adds it to specified local repo and updates all publishes that depend on that local repo;\n* `remove` subcommand removes deb packages from local repos and updates publishes that depend on those repos;\n* `search` subcommand is self-explanatory. Is searches using [aptly package query format](https://www.aptly.info/doc/feature/query/);\n* `copy` subcommand copies packages between local repos and updates dependent publishes;\n* `repo` and `publish` subcommand are intended to perform atomic API operations like creation, deletion etc.\n\n## Installation\n```bash\n$ pip3 install aptly-ctl\n```\nor from source code directory\n```bash\n$ python3 setup.py install\n```\n\n## Usage\n__aptly-ctl__ has the following config format:\n```yaml\nprofiles:\n - name: local\n url: http://localhost:8090/api\n signing:\n gpgkey: \"DC3CFE1DD8562BB86BF3845A4E15F887476CCCE0\"\n passphrase: \"secret\"\n - name: remote\n url: http://user:password@remote:8090/api\n signing:\n gpgkey: \"maintainer@somerepo.org\"\n passphrase_file: \"/etc/aptly/gpg_pass\"\n signing_overrides:\n \"./stretch\":\n skip: true\n```\nEach `profile` element describes configuration for one aptly instance. By default, __aptly-ctl__ uses the first one listed. To select profile, use `-p` or `--profile` argument to select by position (e.g. `-p 0`, `--profile 1`), by name (e.g. `--profile local`) or by partial name match (`-p l` or `-p r` would suffice for this case). `url` is an aplty API endpoint to connect to. `signing` is a default signing config. It may contain\n* `skip` -- skip signing at all. Default: `true`;\n* `batch` -- enable batch mode used when passing passphraze. Generally you want it always `true`. Default: `true`;\n* `gpgkey` -- gpg key name (key fingerprint or email). No default;\n* `keyring` -- gpg keyring file name local to server. Default: gpg defaults;\n* `secret_keyring` -- gpg secret keyring file name local to server. Default: gpg defaults;\n* `passphrase` -- gpg key passphrase. No default;\n* `passphrase_file` -- gpg passphrase file local to server. No default.\n\n`signing_overrides` dictionary is optional and used to override default signing config for some publishes. Specify publish in form `[:]/`. Root prefix is `.`. Configuration is the same as for `signing`.\n\nTo specify config location use `-c` argument, or save it in one of the following locations (using the first found, searching from the first to the last):\n1. $HOME/aptly-ctl.yml;\n2. $HOME/aptly-ctl.yaml;\n3. $HOME/aptly-ctl.conf;\n4. $HOME/.aptly-ctl.yml;\n5. $HOME/.aptly-ctl.yaml;\n6. $HOME/.aptly-ctl.conf;\n7. $HOME/.config/aptly-ctl.yml;\n8. $HOME/.config/aptly-ctl.yaml;\n9. $HOME/.config/aptly-ctl.conf;\n10. /etc/aptly-ctl.yml;\n11. /etc/aptly-ctl.yaml;\n12. /etc/aptly-ctl.conf.\n\nIf __aptly-ctl__ cannot find config in listed locations, you can specify configuration keys on command line and still have a valid config which allows to run __aptly-ctl__ without config at all. Specify them usging `-C =` argument, where `` components are separated by a dot e.g.\n```bash\n$ aptly-ctl -C \"url=http://localhost:8090/api\" -C \"signing.skip=true\" repo list\n```\n\nSome __aptly-ctl__ subcommands print to STDOUT output parsable by other subcommands. Check out subcommand's `--help` to get some hints on how to use it in conjunction with other ones.\n\n### Examples\nSearch for a package containing 'nginx':\n```bash\n$ aptly-ctl search 'Name (~ nginx)'\n\"jessie_main_stable/Pamd64 nginx-full-dbg 1.9.9-2~didww+8.2 c89ebe5a0ac7e146\"\n\"jessie_main_stable/Pamd64 nginx-full-dbg 1.10.0-0~didww+8.4 25d7ab9574e3de74\"\n\"jessie_main_stable/Pamd64 nginx-full-dbg 1.10.1-0~didww+8.4 1cc12f74c9a28368\"\n\"jessie_main_stable/Pamd64 nginx-light 1.9.9-2~didww+8.2 d34ac5a2789f3126\"\n\"jessie_main_stable/Pamd64 nginx-light 1.10.0-0~didww+8.4 c154f10a23232451\"\n\"jessie_main_stable/Pamd64 nginx-light 1.10.1-0~didww+8.4 3f9d1d3d63a569e6\"\n\"jessie_main_stable/Pamd64 nginx-light-dbg 1.9.9-2~didww+8.2 ba326e19379f7be\"\n\"jessie_main_stable/Pamd64 nginx-light-dbg 1.10.0-0~didww+8.4 a5069fb4d70aab16\"\n\"jessie_main_stable/Pamd64 nginx-light-dbg 1.10.1-0~didww+8.4 b57b8645f8d17e26\"\n\"jessie_main_stable/Pamd64 nginx-naxsi 1.9.9-2~didww+8.2 868e43c45e4f8493\"\n\"jessie_main_stable/Pamd64 nginx-naxsi 1.10.0-0~didww+8.4 7a51d45d80536ce5\"\n\"jessie_main_stable/Pamd64 nginx-naxsi 1.10.1-0~didww+8.4 907034c9442a2ca9\"\n\"jessie_main_stable/Pamd64 nginx-naxsi-dbg 1.9.9-2~didww+8.2 3b51a3c9d9031da5\"\n\"jessie_main_stable/Pamd64 nginx-naxsi-dbg 1.10.0-0~didww+8.4 9cb058b4ce84d690\"\n\"jessie_main_stable/Pamd64 nginx-naxsi-dbg 1.10.1-0~didww+8.4 ccc5f79434c67dec\"\n\"stretch_main_stable/Pamd64 libnginx-mod-http-auth-pam 1.12.0 78c35d6a10bead1\"\n\"stretch_main_stable/Pamd64 libnginx-mod-http-auth-pam-dbgsym 1.12.0 3aca8eef59f9216\"\n\"stretch_main_stable/Pamd64 libnginx-mod-http-cache-purge 1.12.0 ffe2d6f3c00a1dbe\"\n\"stretch_main_stable/Pamd64 libnginx-mod-http-cache-purge-dbgsym 1.12.0 658e2d13463bf4ac\"\n```\nor\n```bash\n$ aptly-ctl search --name nginx\n```\nRemove particular packages:\n```bash\n$ aptly-ctl remove \\\n\"stretch_main_stable/Pamd64 libnginx-mod-http-cache-purge-dbgsym 1.12.0 658e2d13463bf4ac\" \\\n\"jessie_main_stable/Pamd64 nginx-light-dbg 1.9.9-2~didww+8.2 ba326e19379f7be\"\n```\nVerbosely upload packages from local file system to aptly, add them to specified repo and update it's publish:\n```bash\n$ aptly-ctl -v put stretch_main packages/*\nINFO put(6860) Loadded config from \"/etc/aptly-ctl.yml\"\nINFO put(6860) Running put subcommand.\nINFO put(6860) Uploading the packages to directory \"stretch_main_1537258123\"\nINFO put(6860) Deleting directory 'stretch_main_1537258123'.\n\"stretch_main/Pamd64 libnginx-mod-http-auth-pam 1.12.0 78c35d6a10bead1\"\n\"stretch_main/Pamd64 libnginx-mod-http-cache-purge 1.12.0 ffe2d6f3c00a1dbe\"\n\"stretch_main/Pamd64 libnginx-mod-http-dav-ext 1.12.0 1d4bed1e2358a7ad\"\nINFO put(6860) Updating publish with prefix \".\", dist \"stretch\"\nINFO put(6860) Updated publish with prefix \".\", dist \"stretch\".\n```\nUpload packages without config file (e.g. from CI server):\n```bash\n$ aptly-ctl \\\n-C \"url=http://user:pass@repo.example.org:8090/api\" \\\n-C \"signing.gpgkey=me@example.org\" \\\n-C \"signing.passphrase_file=/etc/gpg_pass\" \\\nput my_repo *.deb\n```\nLeave only 2 most recent versions of a package `nginx-full` in repo `stretch_main` and do it verbosely:\n```bash\n$ aptly-ctl -v search -r stretch_main --rotate 2 nginx-full | aptly-ctl -v remove\nINFO remove(6946) Loadded config from \"/etc/aptly-ctl.yml\"\nINFO remove(6946) Running remove subcommand.\nINFO search(6945) Loadded config from \"/etc/aptly-ctl.yml\"\nINFO search(6945) Running search subcommand.\nINFO search(6945) Searching in repos stretch_main\nINFO search(6945) Query: nginx-full\nINFO remove(6946) Removed \"Pamd64 nginx-full 1.13.4-1 6173d29295cbacab\" from stretch_main\nINFO remove(6946) Removed \"Pamd64 nginx-full 1.13.5-1 3b1dc91fbe2a9254\" from stretch_main\nINFO remove(6946) Removed \"Pi386 nginx-full 1.13.4-1 39fbaa9e4fcd58e3\" from stretch_main\nINFO remove(6946) Removed \"Pi386 nginx-full 1.13.5-1 2b3998898bb9e56d\" from stretch_main\nINFO remove(6946) Updating publish with prefix \".\", dist \"stretch\"\nINFO remove(6946) Updated publish with prefix \".\", dist \"stretch\".\n```\nPublish local repo `stretch_extra`:\n```bash\n$ aptly-ctl publish create -s local --architectures amd64 extra/stretch stretch_extra=extra\nextra/stretch\n Source kind: local\n Prefix: extra\n Distribution: stretch\n Storage:\n Label:\n Origin:\n Architectures: amd64\n Sources:\n stretch_extra (extra)\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cyril-s/aptly-ctl", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aptly-ctl", "package_url": "https://pypi.org/project/aptly-ctl/", "platform": "", "project_url": "https://pypi.org/project/aptly-ctl/", "project_urls": { "Homepage": "https://github.com/cyril-s/aptly-ctl" }, "release_url": "https://pypi.org/project/aptly-ctl/0.8/", "requires_dist": [ "aptly-api-client", "PyYAML", "requests", "fnvhash" ], "requires_python": ">=3", "summary": "Convenient command line Aptly API client", "version": "0.8" }, "last_serial": 4527146, "releases": { "0.6": [ { "comment_text": "", "digests": { "md5": "6d742c5124a87a3484c0737a4d1bd8c7", "sha256": "31eef77edfe6633597c31d82185bafac66a769b360de0a2d1a841b460cacff36" }, "downloads": -1, "filename": "aptly_ctl-0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "6d742c5124a87a3484c0737a4d1bd8c7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 23577, "upload_time": "2018-09-18T16:11:05", "url": "https://files.pythonhosted.org/packages/a3/6a/df6e4cef3dbb713810803c563e100f3677061d7e8d906ae741dced52b534/aptly_ctl-0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1f2dcd355bef0ac6c181f6614dfc802f", "sha256": "d84f6883a6e92fe3ef67da9a607261d68319f98713e18989ff38db1cd05f2146" }, "downloads": -1, "filename": "aptly-ctl-0.6.tar.gz", "has_sig": false, "md5_digest": "1f2dcd355bef0ac6c181f6614dfc802f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 19386, "upload_time": "2018-09-18T16:11:07", "url": "https://files.pythonhosted.org/packages/87/a7/10c18d044a2ecc588442f7e80cc0a1cc208a25062dbc879aed74e76dd511/aptly-ctl-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "e7aa2e7d36e1fbb08498c233d68cd462", "sha256": "6bfd7e298ae1e66f9dfed63884b61038c8b5dfccf0e608b1e35ae560bb566c13" }, "downloads": -1, "filename": "aptly_ctl-0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "e7aa2e7d36e1fbb08498c233d68cd462", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 25751, "upload_time": "2018-11-15T17:37:35", "url": "https://files.pythonhosted.org/packages/af/5d/b60fd09c2e9a3a0d55ac9fac575ce965881e0631a7cb5c132f69e364428a/aptly_ctl-0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c54ee92b9847ed1068bf27ab3c6de7eb", "sha256": "4fbd4cb8adc5a4f80b2873a9e8ffbb6b5f848d24d762ece6fa84e27fc48ebeb2" }, "downloads": -1, "filename": "aptly-ctl-0.7.tar.gz", "has_sig": false, "md5_digest": "c54ee92b9847ed1068bf27ab3c6de7eb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 18432, "upload_time": "2018-11-15T17:37:36", "url": "https://files.pythonhosted.org/packages/2e/56/2b3545cf5e9ef99d133610987664bf94c6d924c340c9429540fcd722fd72/aptly-ctl-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "d6f677e64d9f8e1cf55304b7eee7dae7", "sha256": "9167ec5e9213d8322ed55533e7436555f3a660e9bbc048963fa018199052612e" }, "downloads": -1, "filename": "aptly_ctl-0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "d6f677e64d9f8e1cf55304b7eee7dae7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 25917, "upload_time": "2018-11-25T22:07:32", "url": "https://files.pythonhosted.org/packages/7e/97/ea8711053bc922545d1e87cdede58a003f7bb82dd23603fdba4143518dbb/aptly_ctl-0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44143f8658bb0263da092d3506dc94fb", "sha256": "3a50446d2e50fa1f5dba992132a62e11b4440d09820c2dcb1ca5067317ac1ae4" }, "downloads": -1, "filename": "aptly-ctl-0.8.tar.gz", "has_sig": false, "md5_digest": "44143f8658bb0263da092d3506dc94fb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 18504, "upload_time": "2018-11-25T22:07:34", "url": "https://files.pythonhosted.org/packages/12/47/53645f7e7514a8edaf72492c879426d201856e4e550563c9a4523698d42b/aptly-ctl-0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d6f677e64d9f8e1cf55304b7eee7dae7", "sha256": "9167ec5e9213d8322ed55533e7436555f3a660e9bbc048963fa018199052612e" }, "downloads": -1, "filename": "aptly_ctl-0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "d6f677e64d9f8e1cf55304b7eee7dae7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 25917, "upload_time": "2018-11-25T22:07:32", "url": "https://files.pythonhosted.org/packages/7e/97/ea8711053bc922545d1e87cdede58a003f7bb82dd23603fdba4143518dbb/aptly_ctl-0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44143f8658bb0263da092d3506dc94fb", "sha256": "3a50446d2e50fa1f5dba992132a62e11b4440d09820c2dcb1ca5067317ac1ae4" }, "downloads": -1, "filename": "aptly-ctl-0.8.tar.gz", "has_sig": false, "md5_digest": "44143f8658bb0263da092d3506dc94fb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 18504, "upload_time": "2018-11-25T22:07:34", "url": "https://files.pythonhosted.org/packages/12/47/53645f7e7514a8edaf72492c879426d201856e4e550563c9a4523698d42b/aptly-ctl-0.8.tar.gz" } ] }