Open kibal opened 6 years ago
Hi @kibal by following the instructions in the README and doing the following:
git clone https://github.com/subgraph/subgraph-debian-packages
cd subgraph-design-packages
./setup.sh
./fetch-src.sh
./build-package.sh oz
I was able to successfully build /tmp/build-area/oz-daemon_0.2.4-1_amd64.deb
However, I was unable to install the oz-dameon
package but will open a more specific issue for that.
This useful information should go somewhere more easily findable than in our issues repo.
SubgraphOS uses
git-buildpackage
in subgraph/subgraph-debian-packages to build all Debian packages. All SubgraphOS software is developed withgit
using themaster
branch for upstream development and with git-buildpackage overlay style packages in thedebian
branch. Thedebian
branch contains at least two files in the root:.travis.yml
for Continuous Integration by the Travis CI service and a directory nameddebian
that is automatically merged intomaster
bygit-buildpackage
.To build an already existing SubgraphOS package we encourage you to use the documented methods in the subgraph/subgraph-debian-packages repository. To build even a single package - we recommend the use of subgraph/subgraph-debian-packages to prepare a
cowbuilder
chroot for use withgit-buildpackage
. We encourage the use of a dedicated user for initiation of the build on a freshly installed Debian stable (stretch
) system or by using a SubgraphOS install. When using SubgraphOS, take note that some packages such as subgraph/onioncfg may require PaX exceptions set by subgraph/paxrat for their dependencies, to build, or to run the resulting binary.To build a fresh checkout of a package by hand after the
cowbuilder
chroot has been initialized by the subgraph-debian-packagessetup.sh
script:The same process is also automated with subgraph/subgraph-debian-packages by using the
build-package.sh
script:The build artifacts will be located in
/tmp/build_area/
after build completion.It is possible to use
dh-make-golang
to package golang software, however we do not currently package SubgraphOS software with a similar git branch naming style. It may still be useful to usedh-make-golang
to generate adebian
directory for a project. We also provide a sample golangdebian
directory as an example in subgraph/subgraph-debian-packages.Create a new package for an already existing SubgraphOS repository for a golang project with the following example:
Important note for golang packages: the build may break if there are GOBIN/GOROOT or other golang environment variables set when
gbp
is invoked. The build artifacts will be located in/tmp/build_area/
after build completion.