Skip to content

Commit

Permalink
Merge #20: Use Tor's binutils/gcc (not Wheezy's) for Go projects that…
Browse files Browse the repository at this point in the history
… use cgo

ce2790a Use Tor's binutils/gcc (not Wheezy's) for Go projects that use cgo (JeremyRand)

Pull request description:

  This should improve reproducibility, and it might also fix whatever bugs might be caused by the ancient Wheezy binutils/gcc.
  • Loading branch information
JeremyRand committed Jun 8, 2019
2 parents a7d88a5 + ce2790a commit bf517ab
Show file tree
Hide file tree
Showing 11 changed files with 123 additions and 4 deletions.
1 change: 1 addition & 0 deletions keyring/binutils.gpg
1 change: 1 addition & 0 deletions projects/binutils
1 change: 1 addition & 0 deletions projects/gcc
15 changes: 15 additions & 0 deletions projects/github.com,coreos,go-systemd/config
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,23 @@ var:
go_lib_install:
- github.com/coreos/go-systemd/journal
go_lib_deps: []
build_go_lib_pre: |
[% IF c("var/linux") %]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]

tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"

export CGO_ENABLED=1
[% END -%]

input_files:
- project: container-image
- name: go
project: go
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/linux") %]'
- name: binutils
project: binutils
enable: '[% c("var/linux") %]'
15 changes: 15 additions & 0 deletions projects/github.com,hlandau,buildinfo/config
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@ var:
go_lib: github.com/hlandau/buildinfo
go_lib_deps:
- gopkg.in,hlandau,easyconfig.v1
build_go_lib_pre: |
[% IF c("var/linux") %]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]

tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"

export CGO_ENABLED=1
[% END -%]

input_files:
- project: container-image
- name: go
project: go
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/linux") %]'
- name: binutils
project: binutils
enable: '[% c("var/linux") %]'
- name: gopkg.in,hlandau,easyconfig.v1
project: gopkg.in,hlandau,easyconfig.v1
15 changes: 15 additions & 0 deletions projects/github.com,hlandau,dexlogconfig/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,26 @@ var:
- gopkg.in,hlandau,easyconfig.v1
- github.com,coreos,go-systemd
- github.com,hlandau,buildinfo
build_go_lib_pre: |
[% IF c("var/linux") %]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]

tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"

export CGO_ENABLED=1
[% END -%]

input_files:
- project: container-image
- name: go
project: go
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/linux") %]'
- name: binutils
project: binutils
enable: '[% c("var/linux") %]'
- name: github.com,hlandau,xlog
project: github.com,hlandau,xlog
- name: gopkg.in,hlandau,easyconfig.v1
Expand Down
15 changes: 15 additions & 0 deletions projects/gopkg.in,hlandau,madns.v1/config
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,26 @@ var:
go_lib_install:
- gopkg.in/hlandau/madns.v1
- gopkg.in/hlandau/madns.v1/merr
build_go_lib_pre: |
[% IF c("var/linux") %]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]

tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"

export CGO_ENABLED=1
[% END -%]

input_files:
- project: container-image
- name: go
project: go
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/linux") %]'
- name: binutils
project: binutils
enable: '[% c("var/linux") %]'
- name: github.com,miekg,dns
project: github.com,miekg,dns
- name: github.com,hlandau,buildinfo
Expand Down
21 changes: 20 additions & 1 deletion projects/gopkg.in,hlandau,service.v2/config
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,22 @@ var:
go_lib_deps:
- gopkg.in,hlandau,svcutils.v1
- gopkg.in,hlandau,easyconfig.v1
build_go_lib_pre: |
[% IF c("var/linux") %]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]

tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"

export CGO_ENABLED=1
[% END -%]

targets:
linux:
linux-i686:
var:
arch_deps:
- libcap-dev:i386
linux-x86_64:
var:
arch_deps:
- libcap-dev
Expand All @@ -23,6 +36,12 @@ input_files:
- project: container-image
- name: go
project: go
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/linux") %]'
- name: binutils
project: binutils
enable: '[% c("var/linux") %]'
- name: gopkg.in,hlandau,svcutils.v1
project: gopkg.in,hlandau,svcutils.v1
- name: gopkg.in,hlandau,easyconfig.v1
Expand Down
21 changes: 20 additions & 1 deletion projects/gopkg.in,hlandau,svcutils.v1/config
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,22 @@ var:
container:
use_container: 1
go_lib: gopkg.in/hlandau/svcutils.v1
build_go_lib_pre: |
[% IF c("var/linux") %]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]

tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"

export CGO_ENABLED=1
[% END -%]

targets:
linux:
linux-i686:
var:
arch_deps:
- libcap-dev:i386
linux-x86_64:
var:
arch_deps:
- libcap-dev
Expand All @@ -20,3 +33,9 @@ input_files:
- project: container-image
- name: go
project: go
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/linux") %]'
- name: binutils
project: binutils
enable: '[% c("var/linux") %]'
10 changes: 9 additions & 1 deletion projects/ncdns/build
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/sh
#!/bin/bash
[% c("var/set_default_env") -%]
[% pc('go', 'var/setup', { go_tarfile => c('input_files_by_name/go') }) %]
[% IF c("var/linux") %]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]

tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"

export CGO_ENABLED=1
[% END -%]
distdir=/var/tmp/dist/[% project %]
mkdir -p $distdir

Expand Down
12 changes: 11 additions & 1 deletion projects/ncdns/config
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ var:
- golang.org,x,net

targets:
linux:
linux-i686:
var:
arch_deps:
- libcap-dev:i386
linux-x86_64:
var:
arch_deps:
- libcap-dev
Expand All @@ -29,6 +33,12 @@ input_files:
- project: container-image
- name: go
project: go
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/linux") %]'
- name: binutils
project: binutils
enable: '[% c("var/linux") %]'
- name: github.com,hlandau,xlog
project: github.com,hlandau,xlog
- name: github.com,hlandau,dexlogconfig
Expand Down

0 comments on commit bf517ab

Please sign in to comment.