diff --git a/.goreleaser.yml b/.goreleaser.yml index 75745dc..7ba7116 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,6 +3,7 @@ --- project_name: xmidt-agent +version: 2 changelog: use: github @@ -71,6 +72,33 @@ archives: format: zip name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' +nfpms: + - + vendor: xmidt-org + homepage: https://github.com/xmidt-org/xmidt-agent + license: Apache-2.0 + maintainer: see_maintainers_file@example.com + description: The client agent for the Xmidt service. + + formats: + - ipk + + dependencies: + - systemd + + contents: + # systemd service file + - src: .release/ipk/xmidt-agent.service + dst: /usr/lib/systemd/system/xmidt-agent.service + + # base configuration file + - src: .release/ipk/config.yml + dst: /etc/xmidt-agent/01-config.yml + + ipk: + fields: + Bugs: https://github.com/xmidt-org/xmidt-agent/issues + source: enabled: true name_template: '{{ .ProjectName }}_{{ .Version }}_src' diff --git a/.release/ipk/config.yml b/.release/ipk/config.yml new file mode 100644 index 0000000..f16a386 --- /dev/null +++ b/.release/ipk/config.yml @@ -0,0 +1,8 @@ +# SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC +# SPDX-License-Identifier: Apache-2.0 +# +# Put any configuration values that should always be present here. +# +# Note: +# These values should be generic and apply to all consumers (openwrt, rdk, etc) +--- diff --git a/.release/ipk/xmidt-agent.service b/.release/ipk/xmidt-agent.service new file mode 100644 index 0000000..31ac404 --- /dev/null +++ b/.release/ipk/xmidt-agent.service @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC +# SPDX-License-Identifier: Apache-2.0 + +[Unit] +Description=The client agent for the Xmidt service. +After=network.target remote-fs.target nss-lookup.target + +[Service] +User=xmidt-agent +Group=xmidt-agent +SyslogIdentifier=xmidt-agent +PIDFile=/run/xmidt-agent.pid +ExecStartPre=/usr/bin/rm -f /run/xmidt-agent.pid +ExecStart=/usr/bin/xmidt-agent +Type=simple +ExecReload=/bin/kill -s HUP $MAINPID +KillMode=process +PrivateTmp=true +Restart=always + +[Install] +WantedBy=multi-user.target \ No newline at end of file