Skip to content

Commit

Permalink
Remove sysvinit files from rpm packages (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
kminehart authored Dec 2, 2024
1 parent 842fd59 commit 5b38cfd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion artifacts/package_rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func (d *RPM) BuildFile(ctx context.Context, builder *dagger.Container, opts *pi
NameOverride: d.NameOverride,
ConfigFiles: [][]string{
{"/src/packaging/rpm/sysconfig/grafana-server", "/pkg/etc/sysconfig/grafana-server"},
{"/src/packaging/rpm/init.d/grafana-server", "/pkg/etc/rc.d/init.d/grafana-server"},
{"/src/packaging/rpm/systemd/grafana-server.service", "/pkg/usr/lib/systemd/system/grafana-server.service"},
},
AfterInstall: "/src/packaging/rpm/control/postinst",
Expand Down
4 changes: 1 addition & 3 deletions fpm/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ func Build(builder *dagger.Container, opts BuildOpts, targz *dagger.File) *dagge

// init.d scripts are service management scripts that start/stop/restart/enable the grafana service without systemd.
// these are likely to be deprecated as systemd is now the default pretty much everywhere.
if opts.PackageType == PackageTypeRPM {
packagePaths = append(packagePaths, "/pkg/etc/rc.d/init.d")
} else {
if opts.PackageType != PackageTypeRPM {
packagePaths = append(packagePaths, "/pkg/etc/init.d")
}

Expand Down
3 changes: 1 addition & 2 deletions frontend/npm.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ func NPMPackages(builder *dagger.Container, src *dagger.Directory, ersion string
return builder.WithExec([]string{"mkdir", "npm-packages"}).
WithEnvVariable("SHELL", "/bin/bash").
WithExec([]string{"yarn", "install", "--immutable"}).
WithExec([]string{"yarn", "run", "packages:build"}).
WithExec([]string{"/bin/bash", "-c", fmt.Sprintf("yarn run lerna version %s --exact --no-git-tag-version --no-push --force-publish -y && yarn lerna exec --no-private -- yarn pack --out /src/npm-packages/%%s-%v.tgz", ersion, "v"+ersion)}).
WithExec([]string{"/bin/bash", "-c", fmt.Sprintf("yarn run packages:build && yarn run lerna version %s --exact --no-git-tag-version --no-push --force-publish -y && yarn lerna exec --no-private -- yarn pack --out /src/npm-packages/%%s-%v.tgz", ersion, "v"+ersion)}).
Directory("./npm-packages")
}

Expand Down

0 comments on commit 5b38cfd

Please sign in to comment.