Git Product home page Git Product logo

Comments (14)

michaaa avatar michaaa commented on August 31, 2024 1

Yeah, got it building a package for me...

I had to install both dh-golang and golang-go from jessie-backports

sudo apt install dh-golang/jessie-backports golang-go/jessie-backports golang-src/jessie-backports

as it still meets the configured depency, it's not nessesary to add -d to dpkg-buildpackage

Of course, the Debian backport sources have to be configured in /etc/apt/sources.list, f.i. this way:

deb-src http://ftp.debian.org/debian/ jessie-updates main contrib non-free
deb http://ftp.debian.org/debian jessie-backports main contrib non-free

from gofaxip.

markuslindenberg avatar markuslindenberg commented on August 31, 2024

Hi,

yes, that's possible since commit b2b1d12, but it is not included in the released Package yet so you have to manually build gofaxip or the package yourself.

You can set Gateway: xyz in the DynamicConfigOutgoing script.

from gofaxip.

rbetancor avatar rbetancor commented on August 31, 2024

Thanks you, but I have tryed to build myself, but the Debian build instrucstions doesn't work:

rabs@juno:~/gofaxip$ git-buildpackage
gbp:error: upstream/1.0 is not a valid treeish

[...]

rabs@juno:~/gofaxip$ dpkg-buildpackage
dpkg-buildpackage: source package gofaxip
dpkg-buildpackage: source version 1.0-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Markus Lindenberg [email protected]
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build gofaxip
fakeroot debian/rules clean
dh clean --buildsystem=golang --with=golang --with=systemd
dh_testdir -O--buildsystem=golang
dh_auto_clean -O--buildsystem=golang
dh_clean -O--buildsystem=golang
dpkg-source -b gofaxip
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../gofaxip_1.0.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b gofaxip gave error exit status 255

from gofaxip.

markuslindenberg avatar markuslindenberg commented on August 31, 2024

Try doing a binary only build with dpkg-buildpackage -b

The command I use to build package is this:

dpkg-buildpackage -us -uc -rfakeroot -b -d

I need -d because I usually don't use a golang package from Debian's repository.

from gofaxip.

rbetancor avatar rbetancor commented on August 31, 2024

Also failed:

dh_auto_build -- -ldflags "-X main.version=1.0"
warning: "/..." matched no packages
can't load package: package .: no buildable Go source files in /home/rabs/gofaxip/obj-x86_64-linux-gnu
dh_auto_build: go install -v -ldflags -X main.version=1.0 returned exit code 1
debian/rules:8: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 1
make[1]: Leaving directory '/home/rabs/gofaxip'
debian/rules:5: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

I was following the instructions to build on a Debian 8 system, so the only installed Go version is the one from the golang packages from the repositoriy.

from gofaxip.

rbetancor avatar rbetancor commented on August 31, 2024

I get to the point of building the binaries myself ... but the Gateway option seems not to work ...

On a test DynamicConfigOutgoing I have:

`#!/bin/bash

echo $@ >> /tmp/params
echo "FAXNumber: 19495555555"
echo "Gateway: customer1"
echo "LocalLine: +1 949 5555555"
echo "TagLine: Test FAX Machine"`

So it's supposed that if I do a sendfax, it should be done using sofia/gateway/customer1/19495555555 ... but instead, on the freeswitch log ... what I have is it trying to use sofia/fax/19495555555 ... and failing.

On the syslog it show:

Jan 31 04:33:28 vm-test-faxserver gofaxsend[26675]: sendqfile.go:74: Calling DynamicConfig script etc/DynamicConfigOutgoing
Jan 31 04:33:28 vm-test-faxserver gofaxsend[26675]: sendqfile.go:121: Logging events for commid 00008225 to log/c00008225
Jan 31 04:33:28 vm-test-faxserver gofaxsend[26675]: sessionlog.go:69: Processing HylaFAX Job 9 as 1b9e5fd9-f2a3-4924-b672-0533d58273ff
Jan 31 04:33:28 vm-test-faxserver gofaxsend[26675]: sessionlog.go:69: Originating channel to 19495555555
Jan 31 04:33:28 vm-test-faxserver gofaxsend[26675]: sessionlog.go:69: Originate failed with hangup cause NORMAL_TEMPORARY_FAILURE
Jan 31 04:33:28 vm-test-faxserver gofaxsend[26675]: main.go:85: Error processing qfile sendq/q9: NORMAL_TEMPORARY_FAILURE
Jan 31 04:33:28 vm-test-faxserver gofaxsend[26675]: main.go:92: Exiting with status 0

Is there any way to trace this and let it works.

from gofaxip.

rbetancor avatar rbetancor commented on August 31, 2024

Finally got it working, after cleaning all and rebuilding the binaries again, seems I misscopied the created binary.

from gofaxip.

michaaa avatar michaaa commented on August 31, 2024

@rbetancor What did you have changed to get rid of that

can't load package: package .: no buildable Go source files in /home/rabs/gofaxip/obj-x86_64-linux-gnu
dh_auto_build: go install -v -ldflags -X main.version=1.0 returned exit code 1

message?

I'm stuck at this point. Seems like it cannot find the go source tree in this dpkg-buildpackage environment. No difference if I use golang package from Debian repository or a go binary tree...

from gofaxip.

rbetancor avatar rbetancor commented on August 31, 2024

Still unable to build the package ... but was able to build the binaries

What I did:

git clone https://github.com/gonicus/gofaxip
cd gofaxip
apt install dh-golang dh-systemd git-buildpackage
mkdir ~/go
export GOPATH=$HOME/go
cd gofaxsed && go build
cd gofaxd && go build

To me, seems to be a writing perms problem on the Debian go path ... or simply the dh-build does not set correctly the GOPATH env var.

from gofaxip.

denzs avatar denzs commented on August 31, 2024

Sorry for the long delay...

I just uploaded a recent release, so there should be no need to build by yourself if you use amd64.

At the same time i updated the build instructions,
so if you still want/need to build by your own i hope that helps! :)

from gofaxip.

michaaa avatar michaaa commented on August 31, 2024

Thanks for the new release version, but I don't know what's wrong at my site. I'm still not able to build packages as described. I get the following error:

mscloud :: ~ » git clone https://github.com/gonicus/gofaxip
Cloning into 'gofaxip'...
remote: Counting objects: 544, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 544 (delta 1), reused 0 (delta 0), pack-reused 537
Receiving objects: 100% (544/544), 202.38 KiB | 0 bytes/s, done.
Resolving deltas: 100% (264/264), done.
Checking connectivity... done.
mscloud :: ~ » cd gofaxip
mscloud :: ~/gofaxip ‹master› » dpkg-buildpackage -us -uc -rfakeroot -b
dpkg-buildpackage: source package gofaxip
dpkg-buildpackage: source version 1.1-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Sebastian Denz <[email protected]>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build gofaxip
 fakeroot debian/rules clean
dh clean --buildsystem=golang --with=golang --with=systemd
   dh_testdir -O--buildsystem=golang
   dh_auto_clean -O--buildsystem=golang
   dh_clean -O--buildsystem=golang
 debian/rules build
dh build --buildsystem=golang --with=golang --with=systemd
   dh_testdir -O--buildsystem=golang
   dh_auto_configure -O--buildsystem=golang
   debian/rules override_dh_auto_build
make[1]: Entering directory '/home/ms/gofaxip'
dh_auto_build -- -ldflags "-X main.version=1.1"
warning: "/..." matched no packages
can't load package: package .: no buildable Go source files in /home/ms/gofaxip/obj-x86_64-linux-gnu
dh_auto_build: go install -v -ldflags -X main.version=1.1 returned exit code 1
debian/rules:8: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 1
make[1]: Leaving directory '/home/ms/gofaxip'
debian/rules:5: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

I guess there's something wrong with the created resouce directory obj-x86_64-linux-gnu while building.

from gofaxip.

denzs avatar denzs commented on August 31, 2024

Which version of dh-golang do you use?
I am using dh-golang - 1.19ubuntu1

And we are using the latest version of golang (not from the debian repos)
-> see https://github.com/niemeyer/godeb

When using golang from godeb instead of the debian version you may need to add the -d flag to dpkg-buildpackage...

I've just rebuild the release 1.1-1 with go 1.8 one minute ago on Ubuntu 14.04.5

from gofaxip.

michaaa avatar michaaa commented on August 31, 2024

Well, I tried to build on a standard Debian 8 system:

golang-go                         2:1.3.3-1             amd64
dh-golang                         1.6                   all

then, the old dh-golang on Debian can be the reason for the problem.

The golang version itself seems not to be a problem, because building "by hand" (by setting a GOPATH) works with the instellad go version from the Debian Distribution.

from gofaxip.

denzs avatar denzs commented on August 31, 2024

Finally i was able to build the gofax package in Debian Jessie...
I did:

  • use dh-golang from jessie-backports
  • use go 1.8 via godeb (not sure if necessary)
  • use -d for dpkg-buildpackage
  • make sure GOPATH is set

I hope that helps...

from gofaxip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.