Skip to content

Commit 50b447e

Browse files
authored
Merge pull request #205 from funbox/develop
Version 0.27.0
2 parents 39d56d0 + 52839fb commit 50b447e

File tree

9 files changed

+94
-71
lines changed

9 files changed

+94
-71
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333

3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@v5
3737

3838
- name: Set up Go
39-
uses: actions/setup-go@v5
39+
uses: actions/setup-go@v6
4040
with:
4141
go-version: ${{ matrix.go }}
4242

@@ -54,10 +54,10 @@ jobs:
5454

5555
steps:
5656
- name: Checkout
57-
uses: actions/checkout@v4
57+
uses: actions/checkout@v5
5858

5959
- name: Set up Go
60-
uses: actions/setup-go@v5
60+
uses: actions/setup-go@v6
6161
with:
6262
go-version: 'stable'
6363

@@ -78,7 +78,7 @@ jobs:
7878

7979
steps:
8080
- name: Code checkout
81-
uses: actions/checkout@v4
81+
uses: actions/checkout@v5
8282

8383
- name: Login to GitHub Container Registry
8484
uses: docker/login-action@v3
@@ -100,7 +100,7 @@ jobs:
100100

101101
steps:
102102
- name: Checkout
103-
uses: actions/checkout@v4
103+
uses: actions/checkout@v5
104104

105105
- name: Check spelling
106106
uses: crate-ci/typos@master

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919
with:
2020
fetch-depth: 2
2121

2222
- name: Initialize CodeQL
23-
uses: github/codeql-action/init@v3
23+
uses: github/codeql-action/init@v4
2424
with:
2525
languages: go
2626

2727
- name: Perform CodeQL Analysis
28-
uses: github/codeql-action/analyze@v3
28+
uses: github/codeql-action/analyze@v4

Makefile

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
################################################################################
22

3-
# This Makefile generated by GoMakeGen 3.2.3 using next command:
3+
# This Makefile generated by GoMakeGen 3.3.3 using next command:
44
# gomakegen --mod .
55
#
66
# More info: https://kaos.sh/gomakegen
@@ -27,7 +27,7 @@ GITREV ?= $(shell test -s $(MAKEDIR)/.git && git rev-parse --short HEAD)
2727
################################################################################
2828

2929
.DEFAULT_GOAL := help
30-
.PHONY = fmt vet all install uninstall clean deps update test init vendor gen-fuzz mod-init mod-update mod-download mod-vendor help
30+
.PHONY = fmt vet all install uninstall clean deps update test init vendor gen-fuzz tidy mod-init mod-update mod-download mod-vendor help
3131

3232
################################################################################
3333

@@ -66,43 +66,53 @@ gen-fuzz: ## Generate archives for fuzz testing
6666
@echo "Generating fuzzing data…"
6767
@go-fuzz-build -o procfile-fuzz.zip github.com/funbox/init-exporter/procfile
6868

69+
tidy: ## Cleanup dependencies
70+
@echo "•• Tidying up dependencies…"
71+
ifdef COMPAT ## Compatible Go version (String)
72+
@go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT) -go=$(COMPAT)
73+
else
74+
@go mod tidy $(VERBOSE_FLAG)
75+
endif
76+
@echo "•• Updating vendored dependencies…"
77+
@test -d vendor && rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
78+
6979
mod-init:
70-
@echo "[37m[1/3][0m [36;1mModules initialization…[0m"
80+
@echo "[32m•[0m[90m••[0m [36;1mModules initialization…[0m"
7181
@rm -f go.mod go.sum
7282
ifdef MODULE_PATH ## Module path for initialization (String)
7383
@go mod init $(MODULE_PATH)
7484
else
7585
@go mod init
7686
endif
7787

78-
@echo "[37m[2/3][0m [36;1mDependencies cleanup…[0m"
88+
@echo "[32m••[0m[90m•[0m [36;1mDependencies cleanup…[0m"
7989
ifdef COMPAT ## Compatible Go version (String)
8090
@go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT) -go=$(COMPAT)
8191
else
8292
@go mod tidy $(VERBOSE_FLAG)
8393
endif
84-
@echo "[37m[3/3][0m [36;1mStripping toolchain info…[0m"
94+
@echo "[32m•••[0m [36;1mStripping toolchain info…[0m"
8595
@grep -q 'toolchain ' go.mod && go mod edit -toolchain=none || :
8696

8797
mod-update:
88-
@echo "[37m[1/4][0m [36;1mUpdating dependencies…[0m"
98+
@echo "[32m•[0m[90m•••[0m [36;1mUpdating dependencies…[0m"
8999
ifdef UPDATE_ALL ## Update all dependencies (Flag)
90100
@go get -u $(VERBOSE_FLAG) all
91101
else
92102
@go get -u $(VERBOSE_FLAG) ./...
93103
endif
94104

95-
@echo "[37m[2/4][0m [36;1mStripping toolchain info…[0m"
105+
@echo "[32m••[0m[90m••[0m [36;1mStripping toolchain info…[0m"
96106
@grep -q 'toolchain ' go.mod && go mod edit -toolchain=none || :
97107

98-
@echo "[37m[3/4][0m [36;1mDependencies cleanup…[0m"
108+
@echo "[32m•••[0m[90m•[0m [36;1mDependencies cleanup…[0m"
99109
ifdef COMPAT
100110
@go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
101111
else
102112
@go mod tidy $(VERBOSE_FLAG)
103113
endif
104114

105-
@echo "[37m[4/4][0m [36;1mUpdating vendored dependencies…[0m"
115+
@echo "[32m••••[0m [36;1mUpdating vendored dependencies…[0m"
106116
@test -d vendor && rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
107117

108118
mod-download:
@@ -126,15 +136,15 @@ clean: ## Remove generated files
126136
@rm -f init-exporter
127137

128138
help: ## Show this info
129-
@echo -e '\n\033[1mTargets:\033[0m\n'
139+
@printf '\n\033[1mTargets:\033[0m\n\n'
130140
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
131141
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-9s\033[0m %s\n", $$1, $$2}'
132-
@echo -e '\n\033[1mVariables:\033[0m\n'
142+
@printf '\n\033[1mVariables:\033[0m\n\n'
133143
@grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \
134144
| sed 's/ifdef //' \
135145
| sort -h \
136146
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-13s\033[0m %s\n", $$1, $$2}'
137-
@echo -e ''
138-
@echo -e '\033[90mGenerated by GoMakeGen 3.2.3\033[0m\n'
147+
@echo ''
148+
@printf '\033[90mGenerated by GoMakeGen 3.3.3\033[0m\n\n'
139149

140150
################################################################################

cli/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import (
4444
// App props
4545
const (
4646
APP = "init-exporter"
47-
VER = "0.26.0"
47+
VER = "0.27.0"
4848
DESC = "Utility for exporting services described by Procfile to init system"
4949
)
5050

common/init-exporter.spec

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
Summary: Utility for exporting services described by Procfile to init system
1212
Name: init-exporter
13-
Version: 0.26.0
13+
Version: 0.27.0
1414
Release: 0%{?dist}
1515
Group: Development/Tools
1616
License: MIT
@@ -20,7 +20,7 @@ Source0: %{name}-%{version}.tar.gz
2020

2121
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2222

23-
BuildRequires: golang >= 1.23
23+
BuildRequires: golang >= 1.24
2424

2525
Provides: upstart-exporter = %{version}-%{release}
2626
Provides: systemd-exporter = %{version}-%{release}
@@ -83,6 +83,12 @@ rm -rf %{buildroot}
8383
################################################################################
8484

8585
%changelog
86+
* Fri Oct 24 2025 Anton Novojilov <andy@essentialkaos.com> - 0.27.0-0
87+
- Added suffix support for service dependencies
88+
- Improved service dependencies processing for the systemd provider
89+
- Code refactoring
90+
- Dependencies update
91+
8692
* Tue Mar 04 2025 Anton Novojilov <andyone@fun-box.ru> - 0.26.0-0
8793
- Dependencies update
8894
- Code refactoring

export/systemd.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,16 @@ func (sp *SystemdProvider) depsToServiceList(deps []string) []string {
397397
".service", ".target", ".path", ".timer", ".slice", ".scope") {
398398
result = append(result, dep)
399399
} else {
400-
result = append(result, dep+".service")
400+
switch dep {
401+
case "basic", "cryptsetup", "getty", "integritysetup", "local-fs-pre",
402+
"local-fs", "multi-user", "network-online", "network-pre", "network",
403+
"nfs-client", "nss-user-lookup", "paths", "remote-fs-pre", "remote-fs",
404+
"rpc_pipefs", "rpcbind", "slices", "sockets", "sshd-keygen", "swap",
405+
"sysinit", "timers", "veritysetup":
406+
result = append(result, dep+".target")
407+
default:
408+
result = append(result, dep+".service")
409+
}
401410
}
402411
}
403412

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
module github.com/funbox/init-exporter
22

3-
go 1.23.6
3+
go 1.24.0
44

55
require (
66
github.com/essentialkaos/check v1.4.1
7-
github.com/essentialkaos/ek/v13 v13.19.0
8-
github.com/essentialkaos/go-simpleyaml/v2 v2.1.5
7+
github.com/essentialkaos/ek/v13 v13.36.0
8+
github.com/essentialkaos/go-simpleyaml/v2 v2.2.0
99
)
1010

1111
require (
1212
github.com/essentialkaos/depsy v1.3.1 // indirect
13+
github.com/essentialkaos/yaml/v2 v2.4.1 // indirect
1314
github.com/kr/pretty v0.3.1 // indirect
1415
github.com/kr/text v0.2.0 // indirect
15-
github.com/rogpeppe/go-internal v1.13.1 // indirect
16-
golang.org/x/sys v0.30.0 // indirect
17-
gopkg.in/yaml.v2 v2.4.0 // indirect
16+
github.com/rogpeppe/go-internal v1.14.1 // indirect
17+
golang.org/x/sys v0.37.0 // indirect
1818
)

go.sum

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@ github.com/essentialkaos/check v1.4.1 h1:SuxXzrbokPGTPWxGRnzy0hXvtb44mtVrdNxgPa1
33
github.com/essentialkaos/check v1.4.1/go.mod h1:xQOYwFvnxfVZyt5Qvjoa1SxcRqu5VyP77pgALr3iu+M=
44
github.com/essentialkaos/depsy v1.3.1 h1:00k9QcMsdPM4IzDaEFHsTHBD/zoM0oxtB5+dMUwbQa8=
55
github.com/essentialkaos/depsy v1.3.1/go.mod h1:B5+7Jhv2a2RacOAxIKU2OeJp9QfZjwIpEEPI5X7auWM=
6-
github.com/essentialkaos/ek/v13 v13.19.0 h1:iO6ohr4ena7CufxNnOz0B0GlwGNPwuFA2iNrwpojmWY=
7-
github.com/essentialkaos/ek/v13 v13.19.0/go.mod h1:hgPkEuoijmk9oWtEx+dj5stOYKnndyoxAwLEc2wKPqM=
8-
github.com/essentialkaos/go-simpleyaml/v2 v2.1.5 h1:HrFk4JhgBT5pzEkwFW4MqdgsAW4KN7/Um6rTHq1GTJk=
9-
github.com/essentialkaos/go-simpleyaml/v2 v2.1.5/go.mod h1:m3Ub1npzYSZTgSzW68wUT1ak7p9hOSFvTnyhtwKlvSA=
6+
github.com/essentialkaos/ek/v13 v13.36.0 h1:uV6A7TzQX+/te97gPmizdqTJb95AnAei9amXlEcwnmU=
7+
github.com/essentialkaos/ek/v13 v13.36.0/go.mod h1:Ofa/zFc7kYG8QbKv8/JjiVaxcmp0WYjqSevOtE8vczk=
8+
github.com/essentialkaos/go-simpleyaml/v2 v2.2.0 h1:MtTJMjRYeba3AoSald0oVF6/aiShTHHwlLl7pfs29pQ=
9+
github.com/essentialkaos/go-simpleyaml/v2 v2.2.0/go.mod h1:DggbDjR+uPz/En63o6HvoycYRZw+mSywrXc5ySvk8MU=
10+
github.com/essentialkaos/yaml/v2 v2.4.1 h1:smhmufQ6t+QYu1k3/rUPQ35qf3ymWoRUaQEOiBuTrIg=
11+
github.com/essentialkaos/yaml/v2 v2.4.1/go.mod h1:LgnGU0KlVWLyTExdsrWpdJEldaRpYN+r/Pcqh8NWSz8=
1012
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
1113
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
1214
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
1315
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
1416
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
1517
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
16-
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
17-
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
18-
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
19-
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
20-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
21-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
22-
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
23-
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
18+
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
19+
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
20+
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
21+
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=

0 commit comments

Comments
 (0)