debgo-v0.2

module
v0.0.0-...-b076d91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2014 License: Apache-2.0

README

debgo

dpkg-like functionality for building debs & source packages in Go.

Warning: debgo is being renamed to 'debber', Please note that the this version should still be used until debber-v0.3 becomes stable. It will not receive updates after that point. Ta

Introduction

debgo can be used to produce 3 types of artifact:

  • The 'Binary debs' - per-architecture .deb packages, usually containing compiled artifacts..
  • The 'source packages' - a .dsc file plus 2 archives. Contains sources and build information.
  • The '-dev' package - a .deb file, usually containing sources only. These are commonly used as build dependencies. For go dependencies, I recommend using the -dev.deb.

debgo has extra features for packaging 'go' applications, but in theory it could be used for various other tools.

Note that Binary debs should normally be built from source debs. But, for Go programs in particular it's really convenient to skip this step - especially when cross-compiling. The reason for this is because the Go cross-compiler is very straightforward, whereas the standard dpkg toolchain is not portable AFAIK.

Libary usage

Once the API firms up, the preferred way to use debgo will be as a library. It should become most useful as part of a build system.

Please see godoc for API docs.

The deb package

deb is the core tooling for generating debian packages (source or binary). This offers all the flexibility (e.g. in theory it can parse more packages than those generated by debgen), but it's pretty basic.

The debgen package

debgen offers a more involved (but opinionated) package generation system. It employs a templating system to help with generating metadata files and so-on.

Commandline usage

You can use debgo from the commandline, but there is no configuration - just flags.

Basic commands

debgo comes with a few basic commands for building Debian packages. For the most part, each takes the same arguments.

go get github.com/laher/debgo-v0.2/cmd/...

  • debgo-deb produces .deb files for each architecture
  • debgo-source produces 3 'source package' files.
  • debgo-dev produces one '-dev.deb' file

goxc

goxc is a build tool with packaging (and cross-compiling) features. This code was derived from the goxc project, which itself will shortly use debgo instead of its own code. As soon as the switch is made, it will also gain more options for .deb creation (additional files, scripts, etc).

Scope and warnings

  • debgo should be able to generate reasonably complex packages, including patches and so-on.
  • BUT it doesn't provide specific support for various features. It doesn't parse scripts such as postinst or 'rules' files.
  • debgo currently only supports .tar.gz archives. It will soon support .tar & .bzip files, and hopefully lzma2 (depending on library availability)
  • Validation is primitive for the time-being
  • The default files generated for READMEs and changelogs are just placeholders. You should really generate these files yourself.

Directories

Path Synopsis
cmd
Package deb provides the building blocks for reading and writing deb files.
Package deb provides the building blocks for reading and writing deb files.
Package debgen offers a simpler means of generating .deb artifacts.
Package debgen offers a simpler means of generating .deb artifacts.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL