vierbergenlars / bareos_exporter

MIT License
12 stars 7 forks source link

Switch GitHub action to properly build amd64 binaries #6

Closed karlism closed 3 years ago

karlism commented 3 years ago

Currently amd64 pre-built binaries are not working properly as they are not staticly built, please see this issue: https://github.com/ngs/go-release.action/issues/6

$ tar xvzf bareos_exporter_v0.5.5_linux_amd64.tar.gz 
bareos_exporter
$ ./bareos_exporter 
bash: ./bareos_exporter: No such file or directory
$ ldd bareos_exporter
    linux-vdso.so.1 =>  (0x00007fffd0fe6000)
    libc.musl-x86_64.so.1 => not found
Error: 
 Problem: conflicting requests
  - nothing provides libc.musl-x86_64.so.1()(64bit) needed by bareos_exporter-0.5.5-1.el8.x86_64

I've switch action to fix this issue. wangyoucao577/go-release.action also appears to be better maintained than an existing one.

karlism commented 3 years ago

@vierbergenlars, you might need to adjust GO version as it appear that previously these were built by golang 1.14: https://github.com/ngs/go-release.action/blob/master/Dockerfile#L1 New action uses 1.16 by default, to adjust golang version, add goversion: 1.14 in job: https://github.com/marketplace/actions/go-release-binaries#parameters

vierbergenlars commented 3 years ago

Thanks for letting me know and sending a PR. I am not able to review your PR right now, but I will take a look at it next week.

vierbergenlars commented 3 years ago

@karlism I made a new pre-release: https://github.com/vierbergenlars/bareos_exporter/releases/tag/v0.5.6-rc.1

Can you check if it works properly for you now?

karlism commented 3 years ago

@vierbergenlars, thanks! Looks good now:

# ./bareos_exporter -h
Usage: bareos_exporter [ ... ]

Parameters:

  -dsn string
        Bareos database DSN (default "mysql://bareos@unix()/bareos?parseTime=true")
  -endpoint string
        Bareos exporter endpoint (default "/metrics")
  -job-discovery-days int
        Number of days in the past that will be searched for jobs (default 7)
  -port int
        Bareos exporter port (default 9625)