Tool and package to get Dependencies in Go for Debian packaging. 🌀 📃
Packaging a Golang package for Debian requires all the Golang dependencies to be already packaged for Debian, so we need to know all the dependencies and sub-dependencies for the Golang project, and then we need to know which out of them is not yet packaged for Debian.
GoCheckDeb is a tool to do the same, it will get all the Golang project dependencies and sub-dependencies and filter out the ones which are not packaged yet. You can also use this tool in your project, you just have to import the gocheckdeb library.
Using this tool you can print Graph, Tree or a List of dependencies, plus you have some other minor features to make it better.
You can either use it as a tool or as a package for your own project. Instructions to download and use it are given below.
In order to run this tool, you need to have Golang installted on your system, and $GOPATH must be set.
To make a workspace:
- Create a folder
goWorkspace
in your home folder. - Give this folder two sub-folders
bin
,src
. - Edit your
.bash_profile
to add the following line:
export GOPATH=$HOME/goWorkspace
- Download the Binary from here
- Make the Binary executable.
$ chmod +x ./GoCheckDeb
Once you have downloaded the tool, you can use following commands to use it.
- Default command
If you don't provide any flags, this tool will take in default values.
$ ./GoCheckDeb
- Package
To run it on a project, provide the name of the package.
$ ./GoCheckDeb -project=abc.xyz/pkg/package-name
- Output Type
To swithc between Graph, Map or List.
$ ./GoCheckDeb -return=graph
- Download the package.
$ go get github.com/ramantehlan/GoCheckDeb/pkg/gocheckdeb
- Import it into you go program.
import github.com/ramantehlan/GoCheckDeb/pkg/gocheckdeb
Once you have imported the package, you can use following document to use it.
// Global Variables inclure
GoDebBinaryStruct
To work on this project, you need to have the following pre-requisites.
- Little experience of Linux and Terminal.
- Familiarity with Golang and Golang packages.
- Familiarity with Debian packaging.
Also, you need to have Go Environment setup in your system.
To contribute to this project, or build it for other platforms use the following steps.
- Clone this project in your $GOPATH.
$ git clone https://github.com/ramantehlan/GoCheckDeb
- Get all the dependencies.
$ go get ./...
- Build the project.
$ go build
.
├── GoCheckDeb
├── LICENSE
├── main.go
├── README.md
├── .gitignore
├── assets
│ └── img
│ └── ss.png
└── pkg
└── gocheckdeb
└── gocheckdeb.go
Your contributions are always welcome and appreciated. Following are the things you can do to contribute to this project.
-
Report a bug
If you think you have encountered a bug, and I should know about it, feel free to report it here and I will take care of it. -
Request a feature
You can also request for a feature here, and if it will viable, it will be picked for development. -
Create a pull request
It can't get better then this, your pull request will be really appreciated by the community. You can get started by picking up any open issues from here and make a pull request.
If you are new to open-source, make sure to check read more about it here and learn more about creating a pull request here.
MIT License
Copyright (c) 2019 Raman Tehlan
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.