Skip to content

Commit

Permalink
Change Orbit osquery to Fleet osquery in generated packages (#3034)
Browse files Browse the repository at this point in the history
Use "Fleet osquery" rather than "Orbit osquery" in packages generated
 by `fleetctl package`.
  • Loading branch information
zwass authored Nov 19, 2021
1 parent 8303667 commit b65c61c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
1 change: 1 addition & 0 deletions changes/fleetctl-package-names
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Use "Fleet osquery" rather than "Orbit osquery" in packages generated by `fleetctl package`
21 changes: 10 additions & 11 deletions cmd/fleetctl/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,21 @@ func TestPackage(t *testing.T) {
runAppCheckErr(t, []string{"package", "--type=deb", "--insecure", "--fleet-certificate=test123"}, "--insecure and --fleet-certificate may not be provided together")

// run package tests, each should output their respective package type
// orbit-osquery_0.0.3_amd64.deb
// fleet-osquery_0.0.3_amd64.deb
runAppForTest(t, []string{"package", "--type=deb", "--insecure"})
info, err := os.Stat("orbit-osquery_0.0.3_amd64.deb")
info, err := os.Stat("fleet-osquery_0.0.3_amd64.deb")
require.NoError(t, err)
require.Greater(t, info.Size(), int64(0)) // TODO verify contents
// orbit-osquery-0.0.3.x86_64.rpm
// fleet-osquery-0.0.3.x86_64.rpm
runAppForTest(t, []string{"package", "--type=rpm", "--insecure"})
info, err = os.Stat("orbit-osquery-0.0.3.x86_64.rpm")
info, err = os.Stat("fleet-osquery-0.0.3.x86_64.rpm")
require.NoError(t, err)
require.Greater(t, info.Size(), int64(0)) // TODO verify contents
// orbit-osquery_0.0.3.msi
//runAppForTest(t, []string{"package", "--type=msi", "--insecure"}) TODO: this is currently failing on Github runners due to permission issues
//info, err = os.Stat("orbit-osquery_0.0.3.msi")
//require.NoError(t, err)
//require.Greater(t, info.Size(), int64(0))

//runAppForTest(t, []string{"package", "--type=pkg", "--insecure"}) TODO: had a hard time getting xar installed on Ubuntu
// fleet-osquery.msi
// runAppForTest(t, []string{"package", "--type=msi", "--insecure"}) TODO: this is currently failing on Github runners due to permission issues
// info, err = os.Stat("orbit-osquery_0.0.3.msi")
// require.NoError(t, err)
// require.Greater(t, info.Size(), int64(0))

// runAppForTest(t, []string{"package", "--type=pkg", "--insecure"}) TODO: had a hard time getting xar installed on Ubuntu
}
6 changes: 3 additions & 3 deletions orbit/pkg/packaging/linux_shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ func buildNFPM(opt Options, pkger nfpm.Packager) (string, error) {
// Build package

info := &nfpm.Info{
Name: "orbit-osquery",
Name: "fleet-osquery",
Version: opt.Version,
Description: "Orbit osquery -- runtime and autoupdater by Fleet",
Description: "Fleet osquery -- runtime and autoupdater",
Arch: "amd64",
Maintainer: "Fleet Engineers <[email protected]>",
Homepage: "https://github.com/fleetdm/orbit",
Homepage: "https://fleetdm.com",
Overridables: nfpm.Overridables{
Contents: contents,
EmptyFolders: []string{
Expand Down
2 changes: 1 addition & 1 deletion orbit/pkg/packaging/macos.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func BuildPkg(opt Options) (string, error) {
}
}

filename := fmt.Sprintf("orbit-osquery_%s_amd64.pkg", opt.Version)
filename := "fleet-osquery.pkg"
if err := file.Copy(generatedPath, filename, constant.DefaultFileMode); err != nil {
return "", errors.Wrap(err, "rename pkg")
}
Expand Down
4 changes: 2 additions & 2 deletions orbit/pkg/packaging/macos_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ var macosPackageInfoTemplate = template.Must(template.New("").Option("missingkey
var macosDistributionTemplate = template.Must(template.New("").Option("missingkey=error").Parse(
`<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="2">
<title>Orbit</title>
<title>Fleet osquery</title>
<choices-outline>
<line choice="choiceBase"/>
</choices-outline>
<choice id="choiceBase" title="Orbit osquery" enabled="false" selected="true" description="Standard installation for Orbit osquery.">
<choice id="choiceBase" title="Fleet osquery" enabled="false" selected="true" description="Standard installation for Fleet osquery.">
<pkg-ref id="{{.Identifier}}.base.pkg"/>
</choice>
<pkg-ref id="{{.Identifier}}.base.pkg" version="{{.Version}}" auth="root">#base.pkg</pkg-ref>
Expand Down
2 changes: 1 addition & 1 deletion orbit/pkg/packaging/windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func BuildMSI(opt Options) (string, error) {
return "", errors.Wrap(err, "build package")
}

filename := fmt.Sprintf("orbit-osquery_%s.msi", opt.Version)
filename := "fleet-osquery.msi"
if err := file.Copy(filepath.Join(tmpDir, "orbit.msi"), filename, constant.DefaultFileMode); err != nil {
return "", errors.Wrap(err, "rename msi")
}
Expand Down
12 changes: 6 additions & 6 deletions orbit/pkg/packaging/windows_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ var windowsWixTemplate = template.Must(template.New("").Option("missingkey=error
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product
Id="C2C2437D-0562-465E-A0BB-2C4484025BD6"
Name="Orbit osquery"
Name="Fleet osquery"
Language="1033"
Version="{{.Version}}"
Manufacturer="Fleet Device Management (fleetdm.com)"
UpgradeCode="B681CB20-107E-428A-9B14-2D3C1AFED244" >
<Package
Id="*"
Keywords='orbit osquery'
Description="Orbit osquery"
Keywords='Fleet osquery'
Description="Fleet osquery"
InstallerVersion="500"
Compressed="yes"
InstallScope="perMachine"
Expand Down Expand Up @@ -47,7 +47,7 @@ var windowsWixTemplate = template.Must(template.New("").Option("missingkey=error
<PermissionEx Sddl="O:SYG:SYD:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;0x1200a9;;;BU)" />
</File>
<ServiceInstall
Name="Orbit osquery"
Name="Fleet osquery"
Account="NT AUTHORITY\SYSTEM"
ErrorControl="ignore"
Start="auto"
Expand All @@ -64,7 +64,7 @@ var windowsWixTemplate = template.Must(template.New("").Option("missingkey=error
</ServiceInstall>
<ServiceControl
Id="StartOrbitService"
Name="Orbit osquery"
Name="Fleet osquery"
Start="install"
Stop="both"
Remove="uninstall"
Expand All @@ -76,7 +76,7 @@ var windowsWixTemplate = template.Must(template.New("").Option("missingkey=error
</Directory>
</Directory>
<Feature Id="Orbit" Title="Orbit osquery" Level="1" Display="hidden">
<Feature Id="Orbit" Title="Fleet osquery" Level="1" Display="hidden">
<ComponentGroupRef Id="OrbitFiles" />
<ComponentRef Id="C_ORBITBIN" />
<ComponentRef Id="C_ORBITROOT" />
Expand Down

1 comment on commit b65c61c

@vercel
Copy link

@vercel vercel bot commented on b65c61c Nov 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.