Skip to content

Commit

Permalink
Replace kardianos/service with elastic/go-service
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Jun 12, 2024
1 parent cab747c commit f3425f7
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 46 deletions.
60 changes: 30 additions & 30 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2220,6 +2220,36 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/go-licenser@v0.
limitations under the License.


--------------------------------------------------------------------------------
Dependency : github.com/elastic/go-service
Version: v0.0.0-20240611154109-f44f756f194f
Licence type (autodetected): Zlib
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected]/LICENSE:

Copyright (c) 2015 Daniel Theophanes

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.


--------------------------------------------------------------------------------
Dependency : github.com/elastic/go-sysinfo
Version: v1.14.0
Expand Down Expand Up @@ -3782,36 +3812,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/elastic/go-service
Version: v0.0.0-20230215200102-9832e01049dd
Licence type (autodetected): Zlib
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected]/LICENSE:

Copyright (c) 2015 Daniel Theophanes

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.


--------------------------------------------------------------------------------
Dependency : github.com/magefile/mage
Version: v1.15.0
Expand Down
4 changes: 0 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ require (
github.com/jedib0t/go-pretty/v6 v6.4.6
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901
github.com/josephspurrier/goversioninfo v0.0.0-20190209210621-63e6d1acd3dd
github.com/kardianos/service v1.2.1-0.20210728001519-a323c3813bc7
github.com/magefile/mage v1.15.0
github.com/mitchellh/gox v1.0.1
github.com/mitchellh/hashstructure v1.1.0
Expand Down Expand Up @@ -295,9 +294,6 @@ replace (
github.com/Shopify/sarama => github.com/elastic/sarama v1.19.1-0.20220310193331-ebc2b0d8eef3
github.com/dop251/goja => github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20
github.com/dop251/goja_nodejs => github.com/dop251/goja_nodejs v0.0.0-20171011081505-adff31b136e6

// The upstream fork at https://github.com/kardianos/service does not seem to be actively maintained.
github.com/kardianos/service => github.com/elastic/go-service v0.0.0-20230215200102-9832e01049dd
github.com/tonistiigi/fifo => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c
)

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,6 @@ github.com/elastic/go-elasticsearch/v8 v8.14.0/go.mod h1:WRvnlGkSuZyp83M2U8El/LG
github.com/elastic/go-licenser v0.3.1/go.mod h1:D8eNQk70FOCVBl3smCGQt/lv7meBeQno2eI1S5apiHQ=
github.com/elastic/go-licenser v0.4.1 h1:1xDURsc8pL5zYT9R29425J3vkHdt4RT5TNEMeRN48x4=
github.com/elastic/go-licenser v0.4.1/go.mod h1:V56wHMpmdURfibNBggaSBfqgPxyT1Tldns1i87iTEvU=
github.com/elastic/go-service v0.0.0-20230215200102-9832e01049dd h1:oCW0HQv6qJRDQ4H4izgrISOjXja4C+Atmz4sgl3aq1k=
github.com/elastic/go-service v0.0.0-20230215200102-9832e01049dd/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=
github.com/elastic/go-service v0.0.0-20240611154109-f44f756f194f h1:kMtsJ3zfcBBR6wfbf5yUExmvWLru6R7zSLaJIfSjU3g=
github.com/elastic/go-service v0.0.0-20240611154109-f44f756f194f/go.mod h1:3lVNFcuNMdWJrSpGF5SMPUVuC+qOYobfPIrMQUoizrk=
github.com/elastic/go-structform v0.0.10 h1:oy08o/Ih2hHTkNcRY/1HhaYvIp5z6t8si8gnCJPDo1w=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ import (

"gopkg.in/ini.v1"

"github.com/kardianos/service"

"github.com/elastic/elastic-agent/internal/pkg/agent/application/paths"
"github.com/elastic/go-service"
)

// EnsureServiceConfigUpToDate modifies, if necessary, Elastic Agent's service
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/agent/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"strings"

"github.com/jaypipes/ghw"
"github.com/kardianos/service"
"github.com/otiai10/copy"
"github.com/schollz/progressbar/v3"

Expand All @@ -24,6 +23,7 @@ import (
"github.com/elastic/elastic-agent/internal/pkg/cli"
v1 "github.com/elastic/elastic-agent/pkg/api/v1"
"github.com/elastic/elastic-agent/pkg/utils"
"github.com/elastic/go-service"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions internal/pkg/agent/install/installed.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import (
"os"
"path/filepath"

"github.com/kardianos/service"

"github.com/elastic/elastic-agent/internal/pkg/agent/application/paths"
"github.com/elastic/elastic-agent/internal/pkg/agent/install/pkgmgr"
"github.com/elastic/go-service"
)

// StatusType is the return status types.
Expand Down
3 changes: 1 addition & 2 deletions internal/pkg/agent/install/svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import (
"path/filepath"
"runtime"

"github.com/kardianos/service"

"github.com/elastic/elastic-agent/internal/pkg/agent/application/paths"
"github.com/elastic/go-service"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/agent/install/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"strings"
"time"

"github.com/kardianos/service"
"github.com/schollz/progressbar/v3"

"github.com/elastic/elastic-agent-libs/logp"
Expand All @@ -33,6 +32,7 @@ import (
"github.com/elastic/elastic-agent/pkg/core/logger"
"github.com/elastic/elastic-agent/pkg/features"
"github.com/elastic/elastic-agent/pkg/utils"
"github.com/elastic/go-service"
)

// Uninstall uninstalls persistently Elastic Agent on the system.
Expand Down
2 changes: 1 addition & 1 deletion pkg/component/runtime/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"runtime"
"time"

"github.com/kardianos/service"
"github.com/elastic/go-service"

"github.com/elastic/elastic-agent-client/v7/pkg/client"
"github.com/elastic/elastic-agent-client/v7/pkg/proto"
Expand Down
2 changes: 1 addition & 1 deletion testing/integration/upgrade_rollback_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"testing"
"time"

"github.com/kardianos/service"
"github.com/elastic/go-service"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down

0 comments on commit f3425f7

Please sign in to comment.