go2rpm


Namego2rpm JSON
Version 1.15.0 PyPI version JSON
download
home_pageNone
SummaryConvert Go packages to RPM
upload_time2024-12-12 04:22:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords go golang rpm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # go2rpm

go2rpm is a Python application designed to assist in the creation of RPM
specfiles for Go (Golang) projects.
It automates the process of
fetching project details, determining dependencies, and generating a specfile.

## Features

- **Automatic Specfile Generation**: go2rpm automatically generates RPM
  specfiles based on the Go project's details and structure.
- **Support for Various Forges**: go2rpm works with different code hosting
  platforms such as GitHub, GitLab, Bitbucket, Pagure, and Gitea.
- **Up to commit level spec generation**: go2rpm can create a spec file based
  on a project's latest release or tag (default) or a custom version, tag, or commit.

## Usage

To use go2rpm, execute the application with the necessary parameters:

``` shell
go2rpm [OPTIONS] GO_IMPORT_PATH
```

### Options

- **-r, --rpmautospec**: Use autorelease and autochangelog features (default)
- **-n, --no-rpmautospec**: Use static release and changelog instead of rpmautospec
- **-L, --use-new-versioning**: Enable new naming scheme for
   versioned compat packages (default)
- **--no-use-new-versioning**: Use older naming scheme for versioned compat packages
- **--no-auto-changelog-entry**: Do not generate a changelog entry
- **--dynamic-buildrequires**: Use dynamic BuildRequires feature (default)
- **-R, --no-dynamic-buildrequires**: Do not use dynamic BuildRequires feature
- **-C, --clean**: Clean cache for chosen Go import path (default)
- **--no-clean**: Do not clean the cache
- **--clean-all**: Clean all cached Go imports
- **-d, --create-directory**: Save the final specfile output to NAME/NAME.spec
- **--name**: Use a specific name for the spec file
- **--print-name**: Print the generated package name and exit
- **-q, --no-spec-warnings**: Exclude warning comments from generated specfile
- **-t, --tag**: Use especified package tag
- **-a, --altipaths**: Include alternate import paths
- **-c, --commit**: Use especified package commit
- **-f, --forge**: Forge URLs
- **-p, --profile**: Use specified profile. Options are:
  1. **1**: Use legacy macros
  1. **2**: Default. Use current macros
  1. **vendor**: Use bundled vendored dependencies
- **-v, --version**: Use especified package versions
- **--stdout**: Print spec into stdout

### Examples

``` shell
# Generate specfile a project hosted on GitHub
go2rpm github.com/rhysd/actionlint

# Generate specfile for a project where import path doesn't match the repository
go2rpm --forge https://github.com/kubernetes/api k8s.io/api

# Generate specfile for a project using a specific commit
go2rpm --commit c2c7a15d6c994356c68dc7a14868c3519836286b --forge 'https://git.sr.ht/~emersion/go-scfg' 'git.sr.ht/~emersion/go-scfg'

# Generate specfile for a project using a specific version
go2rpm -v 2.1.0 github.com/hashicorp/hcl/v2

# Generate specfile with a custom name. This is useful for application packages.
go2rpm --name gh -f https://github.com/cli/cli github.com/cli/cli/v2

# Generate specfile with support for bundled vendoring.
go2rpm --profile vendor -d github.com/cri-o/cri-o --name cri-o
```

### Bundled vendored dependencies

> **NOTE:**
>
> go-vendor-tools, with which go2rpm interfaces to implement this
> functionality, is under active development and may be subject to breaking
> changes.
> Please see go-vendor-tools' [Stability][g-v-t-stability] note for more
> information and join the Fedora Go SIG Matrix room and mailing list
> to be notified of any major changes.

Current [Fedora Golang packaging guidelines][bundled-or-unbundled]
recommend unbundling packages by default.
Bundled dependencies are allowed with justification.
For instance, a complex application with multiple unpackaged dependencies may
justify vendoring.

`go2rpm` can generate a specfile with support for bundled dependencies using
the `--profile vendor` option.
Packagers must also install `go-vendor-tools` alongside `go2rpm` to support the
additional requirements for building and maintaining Golang packages with
bundled vendored dependencies.
`dnf install go2rpm+vendor` will ensure that the necessary dependencies are installed.

For more information, see the [Go Vendor Tools documentation][g-v-t].
Specific package workflow examples for bundled dependencies are in the
[Scenarios][g-v-t-scenarios] section.

[g-v-t-stability]: https://fedora.gitlab.io/sigs/go/go-vendor-tools/#stability
[bundled-or-unbundled]: https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/#_bundled_or_unbundled
[g-v-t-scenarios]: https://fedora.gitlab.io/sigs/go/go-vendor-tools/scenarios/
[g-v-t]: https://fedora.gitlab.io/sigs/go/go-vendor-tools/

## Requirements

- Python 3
- Git
- Askalono (a license detection tool)
- Aiohttp (for asynchronous HTTP requests)
- Go Vendor Tools (when `--profile vendor` is used)

## License

This application is licensed under the [MIT License](LICENSE).
Feel free to modify and distribute it in accordance with the license terms.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "go2rpm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "go, golang, rpm",
    "author": null,
    "author_email": "Robert-Andr\u00e9 Mauchin <zebob.m@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/41/0b/ef85d18ebaf63ee7ebd3050dbab0dae86aca749267eab38f6925db0011df/go2rpm-1.15.0.tar.gz",
    "platform": null,
    "description": "# go2rpm\n\ngo2rpm is a Python application designed to assist in the creation of RPM\nspecfiles for Go (Golang) projects.\nIt automates the process of\nfetching project details, determining dependencies, and generating a specfile.\n\n## Features\n\n- **Automatic Specfile Generation**: go2rpm automatically generates RPM\n  specfiles based on the Go project's details and structure.\n- **Support for Various Forges**: go2rpm works with different code hosting\n  platforms such as GitHub, GitLab, Bitbucket, Pagure, and Gitea.\n- **Up to commit level spec generation**: go2rpm can create a spec file based\n  on a project's latest release or tag (default) or a custom version, tag, or commit.\n\n## Usage\n\nTo use go2rpm, execute the application with the necessary parameters:\n\n``` shell\ngo2rpm [OPTIONS] GO_IMPORT_PATH\n```\n\n### Options\n\n- **-r, --rpmautospec**: Use autorelease and autochangelog features (default)\n- **-n, --no-rpmautospec**: Use static release and changelog instead of rpmautospec\n- **-L, --use-new-versioning**: Enable new naming scheme for\n   versioned compat packages (default)\n- **--no-use-new-versioning**: Use older naming scheme for versioned compat packages\n- **--no-auto-changelog-entry**: Do not generate a changelog entry\n- **--dynamic-buildrequires**: Use dynamic BuildRequires feature (default)\n- **-R, --no-dynamic-buildrequires**: Do not use dynamic BuildRequires feature\n- **-C, --clean**: Clean cache for chosen Go import path (default)\n- **--no-clean**: Do not clean the cache\n- **--clean-all**: Clean all cached Go imports\n- **-d, --create-directory**: Save the final specfile output to NAME/NAME.spec\n- **--name**: Use a specific name for the spec file\n- **--print-name**: Print the generated package name and exit\n- **-q, --no-spec-warnings**: Exclude warning comments from generated specfile\n- **-t, --tag**: Use especified package tag\n- **-a, --altipaths**: Include alternate import paths\n- **-c, --commit**: Use especified package commit\n- **-f, --forge**: Forge URLs\n- **-p, --profile**: Use specified profile. Options are:\n  1. **1**: Use legacy macros\n  1. **2**: Default. Use current macros\n  1. **vendor**: Use bundled vendored dependencies\n- **-v, --version**: Use especified package versions\n- **--stdout**: Print spec into stdout\n\n### Examples\n\n``` shell\n# Generate specfile a project hosted on GitHub\ngo2rpm github.com/rhysd/actionlint\n\n# Generate specfile for a project where import path doesn't match the repository\ngo2rpm --forge https://github.com/kubernetes/api k8s.io/api\n\n# Generate specfile for a project using a specific commit\ngo2rpm --commit c2c7a15d6c994356c68dc7a14868c3519836286b --forge 'https://git.sr.ht/~emersion/go-scfg' 'git.sr.ht/~emersion/go-scfg'\n\n# Generate specfile for a project using a specific version\ngo2rpm -v 2.1.0 github.com/hashicorp/hcl/v2\n\n# Generate specfile with a custom name. This is useful for application packages.\ngo2rpm --name gh -f https://github.com/cli/cli github.com/cli/cli/v2\n\n# Generate specfile with support for bundled vendoring.\ngo2rpm --profile vendor -d github.com/cri-o/cri-o --name cri-o\n```\n\n### Bundled vendored dependencies\n\n> **NOTE:**\n>\n> go-vendor-tools, with which go2rpm interfaces to implement this\n> functionality, is under active development and may be subject to breaking\n> changes.\n> Please see go-vendor-tools' [Stability][g-v-t-stability] note for more\n> information and join the Fedora Go SIG Matrix room and mailing list\n> to be notified of any major changes.\n\nCurrent [Fedora Golang packaging guidelines][bundled-or-unbundled]\nrecommend unbundling packages by default.\nBundled dependencies are allowed with justification.\nFor instance, a complex application with multiple unpackaged dependencies may\njustify vendoring.\n\n`go2rpm` can generate a specfile with support for bundled dependencies using\nthe `--profile vendor` option.\nPackagers must also install `go-vendor-tools` alongside `go2rpm` to support the\nadditional requirements for building and maintaining Golang packages with\nbundled vendored dependencies.\n`dnf install go2rpm+vendor` will ensure that the necessary dependencies are installed.\n\nFor more information, see the [Go Vendor Tools documentation][g-v-t].\nSpecific package workflow examples for bundled dependencies are in the\n[Scenarios][g-v-t-scenarios] section.\n\n[g-v-t-stability]: https://fedora.gitlab.io/sigs/go/go-vendor-tools/#stability\n[bundled-or-unbundled]: https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/#_bundled_or_unbundled\n[g-v-t-scenarios]: https://fedora.gitlab.io/sigs/go/go-vendor-tools/scenarios/\n[g-v-t]: https://fedora.gitlab.io/sigs/go/go-vendor-tools/\n\n## Requirements\n\n- Python 3\n- Git\n- Askalono (a license detection tool)\n- Aiohttp (for asynchronous HTTP requests)\n- Go Vendor Tools (when `--profile vendor` is used)\n\n## License\n\nThis application is licensed under the [MIT License](LICENSE).\nFeel free to modify and distribute it in accordance with the license terms.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Convert Go packages to RPM",
    "version": "1.15.0",
    "project_urls": {
        "Homepage": "https://gitlab.com/fedora/sigs/go/go2rpm"
    },
    "split_keywords": [
        "go",
        " golang",
        " rpm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c62dbdecd76e1493d02117557a09888d3871416c4e7bf6e216251c807e30c06",
                "md5": "18a117240f3453ae416c08511c0ff762",
                "sha256": "22d74df59e7e560195909d333176fe36f19b00a89cea63a65912d597e2fb1e36"
            },
            "downloads": -1,
            "filename": "go2rpm-1.15.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "18a117240f3453ae416c08511c0ff762",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 17115,
            "upload_time": "2024-12-12T04:22:23",
            "upload_time_iso_8601": "2024-12-12T04:22:23.351614Z",
            "url": "https://files.pythonhosted.org/packages/2c/62/dbdecd76e1493d02117557a09888d3871416c4e7bf6e216251c807e30c06/go2rpm-1.15.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "410bef85d18ebaf63ee7ebd3050dbab0dae86aca749267eab38f6925db0011df",
                "md5": "2a9e44f572ab78bb2cde6ce8639fb4e5",
                "sha256": "1bfbff822862d3b6ae90fb9cf915b2f1742cec1b2a7c17b800f7f7b34f18ba1c"
            },
            "downloads": -1,
            "filename": "go2rpm-1.15.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2a9e44f572ab78bb2cde6ce8639fb4e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 15797,
            "upload_time": "2024-12-12T04:22:24",
            "upload_time_iso_8601": "2024-12-12T04:22:24.400068Z",
            "url": "https://files.pythonhosted.org/packages/41/0b/ef85d18ebaf63ee7ebd3050dbab0dae86aca749267eab38f6925db0011df/go2rpm-1.15.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-12 04:22:24",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "fedora",
    "gitlab_project": "sigs",
    "lcname": "go2rpm"
}
        
Elapsed time: 0.37451s