Skip to content

Commit

Permalink
Remove notary from packaging (#1602)
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Feb 14, 2024
1 parent 20d4673 commit b298692
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 811 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,13 @@ package-builder-windows: .pre-build deps
go run cmd/make/make.go -targets=package-builder -linkstamp --os windows

deps-go:
go run cmd/make/make.go -targets=deps-go,install-tools
go run cmd/make/make.go -targets=deps-go

deps: deps-go generate

.PHONY: generate
generate: deps-go
go generate ./pkg/packagekit/... ./pkg/packaging/... ./ee/tables/... ./pkg/augeas/...
go run cmd/make/make.go -targets=generate-tuf

.PHONY: proto
proto:
Expand Down
2 changes: 0 additions & 2 deletions cmd/make/make.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ func main() {

targetSet := map[string]func(context.Context) error{
"deps-go": make.New(opts...).DepsGo,
"install-tools": make.New(opts...).InstallTools,
"generate-tuf": make.New(opts...).GenerateTUF,
"launcher": make.New(optsMaybeCgo...).BuildCmd("./cmd/launcher", fakeName("launcher", *flFakeData)),
"tables.ext": make.New(optsMaybeCgo...).BuildCmd("./cmd/launcher.ext", "tables.ext"),
"grpc.ext": make.New(optsMaybeCgo...).BuildCmd("./cmd/grpc.ext", "grpc.ext"),
Expand Down
16 changes: 5 additions & 11 deletions cmd/package-builder/package-builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,21 +149,16 @@ func runMake(args []string) error {
env.String("TARGETS", defaultTargets()),
"Target platforms to build. Specified in the form platform-init-package",
)
flNotaryURL = flagset.String(
"notary_url",
env.String("NOTARY_URL", ""),
"The Notary update server",
flTufURL = flagset.String(
"tuf_url",
env.String("TUF_URL", ""),
"The TUF update server",
)
flMirrorURL = flagset.String(
"mirror_url",
env.String("MIRROR_URL", ""),
"The mirror server for autoupdates",
)
flNotaryPrefix = flagset.String(
"notary_prefix",
env.String("NOTARY_PREFIX", ""),
"The prefix for Notary path that contains the collections",
)
flWixPath = flagset.String(
"wix_path",
defaultWixPath,
Expand Down Expand Up @@ -248,9 +243,8 @@ func runMake(args []string) error {
CertPins: *flCertPins,
RootPEM: *flRootPEM,
CacheDir: cacheDir,
NotaryURL: *flNotaryURL,
TufServerURL: *flTufURL,
MirrorURL: *flMirrorURL,
NotaryPrefix: *flNotaryPrefix,
WixPath: *flWixPath,
WixSkipCleanup: *flWixSkipCleanup,
DisableService: *flDisableService,
Expand Down
8 changes: 4 additions & 4 deletions docs/package-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ ls build/windows/package-builder.exe
## General Usage

`package-builder` will fetch binaries from either local disk, or
Kolide's Notary server. These are specified with version command line
Kolide's TUF server. These are specified with version command line
options. Arguments that look like a path (denoted by starting with `/`
or `./`) will be pulled from local disk, otherwise the argument is
parsed as a notary channel.
parsed as a TUF channel.

The only required parameter is `--hostname`.

Expand All @@ -73,7 +73,7 @@ it via another mechanism), you can use the `--omit_secret` flag.

### Simplest Package Creation

The simplest usage, is to use the binaries on the Kolide Notary
The simplest usage, is to use the binaries on the Kolide TUF
server:

``` shell
Expand Down Expand Up @@ -152,7 +152,7 @@ use the `--identifier` flag to specify this value.
#### Cross Platform Binaries and Targets

`package-builder` can package cross platform. If you're obtaining
binaries from notary, this should be straight forward, and you can
binaries from TUF, this should be straight forward, and you can
specify multiple targets in a single invocation. However, if you're
using locally build binaries you will need to run `package-builder`
for each target platform.
Expand Down
22 changes: 0 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ require (
github.com/Masterminds/semver v1.4.2
github.com/Microsoft/go-winio v0.6.1
github.com/clbanning/mxj v1.8.4
github.com/go-bindata/go-bindata v1.0.0
github.com/go-ini/ini v1.61.0
github.com/go-kit/kit v0.9.0
github.com/go-ole/go-ole v1.2.6
Expand All @@ -17,7 +16,6 @@ require (
github.com/knightsc/system_policy v1.1.1-0.20211029142728-5f4c0d5419cc
github.com/kolide/kit v0.0.0-20221107170827-fb85e3d59eab
github.com/kolide/krypto v0.1.1-0.20231219012048-5859599c50aa
github.com/kolide/updater v0.0.0-20190315001611-15bbc19b5b80
github.com/mat/besticon v3.9.0+incompatible
github.com/mattn/go-sqlite3 v1.14.19
github.com/mixer/clock v0.0.0-20170901150240-b08e6b4da7ea
Expand All @@ -27,10 +25,8 @@ require (
github.com/pkg/errors v0.9.1
github.com/scjalliance/comshim v0.0.0-20190308082608-cf06d2532c4e
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516
github.com/sirupsen/logrus v1.9.2 // indirect
github.com/stretchr/testify v1.8.4
github.com/theupdateframework/go-tuf v0.5.2
github.com/theupdateframework/notary v0.6.1
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.etcd.io/bbolt v1.3.6
Expand Down Expand Up @@ -93,38 +89,23 @@ require (

require (
github.com/BurntSushi/toml v1.1.0 // indirect
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d // indirect
github.com/WatchBeam/clock v0.0.0-20170901150240-b08e6b4da7ea // indirect
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect
github.com/bugsnag/bugsnag-go v1.3.2 // indirect
github.com/bugsnag/panicwrap v1.2.0 // indirect
github.com/cenkalti/backoff v2.0.0+incompatible // indirect
github.com/cloudflare/cfssl v0.0.0-20181102015659-ea4033a214e7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/go v1.5.1-1 // indirect
github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logfmt/logfmt v0.4.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/certificate-transparency-go v1.0.21 // indirect
github.com/google/go-tpm v0.3.3 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/jinzhu/gorm v1.9.1 // indirect
github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a // indirect
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/miekg/pkcs11 v0.0.0-20180208123018-5f6e0d0dad6f // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/samber/slog-multi v1.0.2
github.com/secure-systems-lab/go-securesystemslib v0.5.0 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/spf13/viper v1.8.1 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tevino/abool v1.2.0 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
Expand All @@ -136,9 +117,6 @@ require (
go.opentelemetry.io/otel/sdk v1.21.0
go.opentelemetry.io/otel/trace v1.21.0
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/dancannon/gorethink.v3 v3.0.5 // indirect
gopkg.in/fatih/pool.v2 v2.0.0 // indirect
gopkg.in/gorethink/gorethink.v3 v3.0.5 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down

0 comments on commit b298692

Please sign in to comment.