From ff67e903ca69cf4d00036840932c57d9a45f6972 Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Wed, 26 Oct 2022 09:48:00 +0300 Subject: [PATCH] [#409] Add default package changelog Make it work with simple `dpkg-buildpackage` Signed-off-by: Stanislav Bogatyrev --- Makefile | 22 +++++----- debian/.gitignore | 2 - debian/changelog | 11 +++++ debian/control | 12 +++--- .../{neofs-node-cli.docs => neofs-cli.docs} | 0 ...ofs-node-cli.install => neofs-cli.install} | 0 ...s-node-cli.manpages => neofs-cli.manpages} | 0 debian/{neofs-node-ir.dirs => neofs-ir.dirs} | 0 debian/{neofs-node-ir.docs => neofs-ir.docs} | 0 ...neofs-node-ir.install => neofs-ir.install} | 0 ...ofs-node-ir.postinst => neofs-ir.postinst} | 0 .../{neofs-node-ir.postrm => neofs-ir.postrm} | 0 ...neofs-node-ir.preinst => neofs-ir.preinst} | 0 .../{neofs-node-ir.prerm => neofs-ir.prerm} | 0 ...e-ir.neofs-ir.service => neofs-ir.service} | 0 ...s-node-storage.dirs => neofs-storage.dirs} | 0 ...s-node-storage.docs => neofs-storage.docs} | 0 ...-storage.install => neofs-storage.install} | 0 ...torage.postinst => neofs-storage.postinst} | 0 ...de-storage.postrm => neofs-storage.postrm} | 0 ...-storage.preinst => neofs-storage.preinst} | 0 ...node-storage.prerm => neofs-storage.prerm} | 0 ...-storage.service => neofs-storage.service} | 0 debian/rules | 41 +++++++++---------- docs/release-instruction.md | 5 +++ 25 files changed, 54 insertions(+), 39 deletions(-) delete mode 100644 debian/.gitignore create mode 100644 debian/changelog rename debian/{neofs-node-cli.docs => neofs-cli.docs} (100%) rename debian/{neofs-node-cli.install => neofs-cli.install} (100%) rename debian/{neofs-node-cli.manpages => neofs-cli.manpages} (100%) rename debian/{neofs-node-ir.dirs => neofs-ir.dirs} (100%) rename debian/{neofs-node-ir.docs => neofs-ir.docs} (100%) rename debian/{neofs-node-ir.install => neofs-ir.install} (100%) rename debian/{neofs-node-ir.postinst => neofs-ir.postinst} (100%) rename debian/{neofs-node-ir.postrm => neofs-ir.postrm} (100%) rename debian/{neofs-node-ir.preinst => neofs-ir.preinst} (100%) rename debian/{neofs-node-ir.prerm => neofs-ir.prerm} (100%) rename debian/{neofs-node-ir.neofs-ir.service => neofs-ir.service} (100%) rename debian/{neofs-node-storage.dirs => neofs-storage.dirs} (100%) rename debian/{neofs-node-storage.docs => neofs-storage.docs} (100%) rename debian/{neofs-node-storage.install => neofs-storage.install} (100%) rename debian/{neofs-node-storage.postinst => neofs-storage.postinst} (100%) rename debian/{neofs-node-storage.postrm => neofs-storage.postrm} (100%) rename debian/{neofs-node-storage.preinst => neofs-storage.preinst} (100%) rename debian/{neofs-node-storage.prerm => neofs-storage.prerm} (100%) rename debian/{neofs-node-storage.neofs-storage.service => neofs-storage.service} (100%) diff --git a/Makefile b/Makefile index b6b63fd2d..9b0525144 100644 --- a/Makefile +++ b/Makefile @@ -21,11 +21,11 @@ BINS = $(addprefix $(BIN)/, $(CMDS)) # .deb package versioning OS_RELEASE = $(shell lsb_release -cs) -PACK_VERSION ?= $(shell echo $(VERSION) | sed "s/^v//" | \ +PKG_VERSION ?= $(shell echo $(VERSION) | sed "s/^v//" | \ sed -E "s/(.*)-(g[a-fA-F0-9]{6,8})(.*)/\1\3~\2/" | \ - sed "s/-/~/")-$(OS_RELEASE) - -.PHONY: help all images dep clean fmts fmt imports test lint docker/lint + sed "s/-/~/") + +.PHONY: help all images dep clean fmts fmt imports test lint docker/lint prepare-release debpackage # To build a specific binary, use it's name prefix with bin/ as a target @@ -152,11 +152,13 @@ clean: # Package for Debian debpackage: - rm -f debian/changelog - dch --create --package neofs-node -M -v $(PACK_VERSION) \ - -D $(OS_RELEASE) \ - "Please see CHANGELOG.md for code changes for "$(VERSION) - dpkg-buildpackage --no-sign -b + dch --package neofs-node \ + --controlmaint \ + --newversion $(PKG_VERSION) \ + --force-bad-version \ + --distribution $(OS_RELEASE) \ + "Please see CHANGELOG.md for code changes for $(VERSION)" + dpkg-buildpackage --no-sign -b docker/debpackage: docker run --rm -t \ @@ -167,4 +169,4 @@ docker/debpackage: golang:$(GO_VERSION) apt update && apt install debhelper-compat dh-sequence-bash-completion devscripts && make debpackage debclean: - dh clean + dh clean diff --git a/debian/.gitignore b/debian/.gitignore deleted file mode 100644 index 9890f7dc6..000000000 --- a/debian/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -changelog -*debhelper* diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..27b14cb00 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,11 @@ +neofs-node (0.33.0~72~g6955fe82) jammy; urgency=medium + + * Please see CHANGELOG.md for code changes for v0.33.0-72-g6955fe82 + + -- NeoSPCC Wed, 26 Oct 2022 12:19:45 +0300 + +neofs-node (0.33.0) stable; urgency=medium + + * Initial change + + -- NeoSPCC Tue, 25 Oct 2022 21:10:49 +0300 diff --git a/debian/control b/debian/control index b0cff2234..747bcdeef 100644 --- a/debian/control +++ b/debian/control @@ -8,28 +8,28 @@ Homepage: https://fs.neo.org/ Vcs-Git: https://github.com/nspcc-dev/neofs-node.git Vcs-Browser: https://github.com/nspcc-dev/neofs-node -Package: neofs-node-storage +Package: neofs-storage Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Storage service for neofs-node +Description: NeoFS Storage node NeoFS is a decentralized distributed object storage integrated with the NEO Blockchain. NeoFS Nodes are organized in a peer-to-peer network that takes care of storing and distributing user's data. Any Neo user may participate in the network and get paid for providing storage resources to other users or store their data in NeoFS and pay a competitive price for it. -Package: neofs-node-ir +Package: neofs-ir Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: InnerRing service for neofs-node +Description: NeoFS InnerRing node NeoFS is a decentralized distributed object storage integrated with the NEO Blockchain. NeoFS Nodes are organized in a peer-to-peer network that takes care of storing and distributing user's data. Any Neo user may participate in the network and get paid for providing storage resources to other users or store their data in NeoFS and pay a competitive price for it. -Package: neofs-node-cli +Package: neofs-cli Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: cli tools for neofs-node +Description: CLI tools for NeoFS NeoFS is a decentralized distributed object storage integrated with the NEO Blockchain. NeoFS Nodes are organized in a peer-to-peer network that takes care of storing and distributing user's data. Any Neo user may participate in the network and get paid for providing storage resources to other users or diff --git a/debian/neofs-node-cli.docs b/debian/neofs-cli.docs similarity index 100% rename from debian/neofs-node-cli.docs rename to debian/neofs-cli.docs diff --git a/debian/neofs-node-cli.install b/debian/neofs-cli.install similarity index 100% rename from debian/neofs-node-cli.install rename to debian/neofs-cli.install diff --git a/debian/neofs-node-cli.manpages b/debian/neofs-cli.manpages similarity index 100% rename from debian/neofs-node-cli.manpages rename to debian/neofs-cli.manpages diff --git a/debian/neofs-node-ir.dirs b/debian/neofs-ir.dirs similarity index 100% rename from debian/neofs-node-ir.dirs rename to debian/neofs-ir.dirs diff --git a/debian/neofs-node-ir.docs b/debian/neofs-ir.docs similarity index 100% rename from debian/neofs-node-ir.docs rename to debian/neofs-ir.docs diff --git a/debian/neofs-node-ir.install b/debian/neofs-ir.install similarity index 100% rename from debian/neofs-node-ir.install rename to debian/neofs-ir.install diff --git a/debian/neofs-node-ir.postinst b/debian/neofs-ir.postinst similarity index 100% rename from debian/neofs-node-ir.postinst rename to debian/neofs-ir.postinst diff --git a/debian/neofs-node-ir.postrm b/debian/neofs-ir.postrm similarity index 100% rename from debian/neofs-node-ir.postrm rename to debian/neofs-ir.postrm diff --git a/debian/neofs-node-ir.preinst b/debian/neofs-ir.preinst similarity index 100% rename from debian/neofs-node-ir.preinst rename to debian/neofs-ir.preinst diff --git a/debian/neofs-node-ir.prerm b/debian/neofs-ir.prerm similarity index 100% rename from debian/neofs-node-ir.prerm rename to debian/neofs-ir.prerm diff --git a/debian/neofs-node-ir.neofs-ir.service b/debian/neofs-ir.service similarity index 100% rename from debian/neofs-node-ir.neofs-ir.service rename to debian/neofs-ir.service diff --git a/debian/neofs-node-storage.dirs b/debian/neofs-storage.dirs similarity index 100% rename from debian/neofs-node-storage.dirs rename to debian/neofs-storage.dirs diff --git a/debian/neofs-node-storage.docs b/debian/neofs-storage.docs similarity index 100% rename from debian/neofs-node-storage.docs rename to debian/neofs-storage.docs diff --git a/debian/neofs-node-storage.install b/debian/neofs-storage.install similarity index 100% rename from debian/neofs-node-storage.install rename to debian/neofs-storage.install diff --git a/debian/neofs-node-storage.postinst b/debian/neofs-storage.postinst similarity index 100% rename from debian/neofs-node-storage.postinst rename to debian/neofs-storage.postinst diff --git a/debian/neofs-node-storage.postrm b/debian/neofs-storage.postrm similarity index 100% rename from debian/neofs-node-storage.postrm rename to debian/neofs-storage.postrm diff --git a/debian/neofs-node-storage.preinst b/debian/neofs-storage.preinst similarity index 100% rename from debian/neofs-node-storage.preinst rename to debian/neofs-storage.preinst diff --git a/debian/neofs-node-storage.prerm b/debian/neofs-storage.prerm similarity index 100% rename from debian/neofs-node-storage.prerm rename to debian/neofs-storage.prerm diff --git a/debian/neofs-node-storage.neofs-storage.service b/debian/neofs-storage.service similarity index 100% rename from debian/neofs-node-storage.neofs-storage.service rename to debian/neofs-storage.service diff --git a/debian/rules b/debian/rules index cd98895e2..f9c5734ec 100755 --- a/debian/rules +++ b/debian/rules @@ -9,33 +9,32 @@ export DEB_BUILD_OPTIONS := nostrip override_dh_auto_test: override_dh_auto_install: - echo $(DEB_BUILD_OPTIONS) - dh_auto_install + echo $(DEB_BUILD_OPTIONS) + dh_auto_install - bin/neofs-adm gendoc -t man man/ - bin/neofs-cli gendoc -t man man/ + bin/neofs-adm gendoc -t man man/ + bin/neofs-cli gendoc -t man man/ - bin/neofs-adm completion bash > debian/neofs-adm.bash-completion - bin/neofs-cli completion bash > debian/neofs-cli.bash-completion - install -m 0755 -d debian/neofs-node-cli/usr/share/fish/completions - install -m 0755 -d debian/neofs-node-cli/usr/share/zsh/vendor-completions/ - bin/neofs-adm completion fish > debian/neofs-node-cli/usr/share/fish/completions/neofs-adm.fish - bin/neofs-adm completion zsh > debian/neofs-node-cli/usr/share/zsh/vendor-completions/_neofs-adm - bin/neofs-cli completion fish > debian/neofs-node-cli/usr/share/fish/completions/neofs-cli.fish - bin/neofs-cli completion zsh > debian/neofs-node-cli/usr/share/zsh/vendor-completions/_neofs-cli + bin/neofs-adm completion bash > debian/neofs-adm.bash-completion + bin/neofs-cli completion bash > debian/neofs-cli.bash-completion + install -m 0755 -d debian/neofs-cli/usr/share/fish/completions + install -m 0755 -d debian/neofs-cli/usr/share/zsh/vendor-completions/ + bin/neofs-adm completion fish > debian/neofs-cli/usr/share/fish/completions/neofs-adm.fish + bin/neofs-adm completion zsh > debian/neofs-cli/usr/share/zsh/vendor-completions/_neofs-adm + bin/neofs-cli completion fish > debian/neofs-cli/usr/share/fish/completions/neofs-cli.fish + bin/neofs-cli completion zsh > debian/neofs-cli/usr/share/zsh/vendor-completions/_neofs-cli - install -T config/example/ir.yaml debian/neofs-node-ir/etc/neofs/ir/config.yml - install -T config/example/ir-control.yaml debian/neofs-node-ir/etc/neofs/ir/control.yml - install -T config/example/node.yaml debian/neofs-node-storage/etc/neofs/storage/config.yml - install -T config/example/node-control.yaml debian/neofs-node-storage/etc/neofs/storage/control.yml + install -T config/example/ir.yaml debian/neofs-ir/etc/neofs/ir/config.yml + install -T config/example/ir-control.yaml debian/neofs-ir/etc/neofs/ir/control.yml + install -T config/example/node.yaml debian/neofs-storage/etc/neofs/storage/config.yml + install -T config/example/node-control.yaml debian/neofs-storage/etc/neofs/storage/control.yml override_dh_installsystemd: - dh_installsystemd --no-enable --no-start --name=neofs-ir - dh_installsystemd --no-enable --no-start --name=neofs-storage + dh_installsystemd --no-enable --no-start --name=neofs-ir + dh_installsystemd --no-enable --no-start --name=neofs-storage override_dh_installchangelogs: - dh_installchangelogs -k CHANGELOG.md + dh_installchangelogs -k CHANGELOG.md override_dh_installdocs: - dh_installdocs - + dh_installdocs diff --git a/docs/release-instruction.md b/docs/release-instruction.md index 7e9491d8b..a4c747ba0 100644 --- a/docs/release-instruction.md +++ b/docs/release-instruction.md @@ -43,6 +43,11 @@ Write new revision number into the root `VERSION` file: $ echo ${NEOFS_TAG_PREFIX}${NEOFS_REVISION} > VERSION ``` +Update version in Debian package changelog file +``` +$ cat debian/changelog +``` + Update the supported version of `nspcc-dev/neofs-contract` module in root `README.md` if needed.