From de309e3264f733811720f322ef78ed98e7304557 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Fri, 16 Dec 2022 11:54:19 +0300 Subject: [PATCH] [#2] Update deb packages Signed-off-by: Denis Kirillov --- debian/changelog | 4 ++-- debian/control | 16 +++++++-------- debian/copyright | 10 ++++++---- debian/frostfs-http-gw.dirs | 2 ++ ...eofs-http-gw.docs => frostfs-http-gw.docs} | 0 ...p-gw.examples => frostfs-http-gw.examples} | 0 debian/frostfs-http-gw.install | 2 ++ ...p-gw.postinst => frostfs-http-gw.postinst} | 20 +++++++++---------- ...-http-gw.postrm => frostfs-http-gw.postrm} | 4 ++-- ...ttp-gw.preinst => frostfs-http-gw.preinst} | 2 +- ...fs-http-gw.prerm => frostfs-http-gw.prerm} | 2 +- debian/frostfs-http-gw.service | 16 +++++++++++++++ debian/neofs-http-gw.dirs | 2 -- debian/neofs-http-gw.install | 2 -- debian/neofs-http-gw.service | 16 --------------- debian/rules | 2 +- 16 files changed, 51 insertions(+), 49 deletions(-) create mode 100644 debian/frostfs-http-gw.dirs rename debian/{neofs-http-gw.docs => frostfs-http-gw.docs} (100%) rename debian/{neofs-http-gw.examples => frostfs-http-gw.examples} (100%) create mode 100644 debian/frostfs-http-gw.install rename debian/{neofs-http-gw.postinst => frostfs-http-gw.postinst} (56%) rename debian/{neofs-http-gw.postrm => frostfs-http-gw.postrm} (92%) rename debian/{neofs-http-gw.preinst => frostfs-http-gw.preinst} (94%) rename debian/{neofs-http-gw.prerm => frostfs-http-gw.prerm} (96%) create mode 100644 debian/frostfs-http-gw.service delete mode 100644 debian/neofs-http-gw.dirs delete mode 100644 debian/neofs-http-gw.install delete mode 100644 debian/neofs-http-gw.service diff --git a/debian/changelog b/debian/changelog index eae76ab..257bf0f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -neofs-http-gw (0.0.0) stable; urgency=medium +frostfs-http-gw (0.0.0) stable; urgency=medium * Please see CHANGELOG.md - -- NeoSPCC Wed, 24 Aug 2022 18:29:49 +0300 + -- TrueCloudLab Wed, 24 Aug 2022 18:29:49 +0300 diff --git a/debian/control b/debian/control index e428567..cd18ad5 100644 --- a/debian/control +++ b/debian/control @@ -1,15 +1,15 @@ -Source: neofs-http-gw -Section: neofs +Source: frostfs-http-gw +Section: frostfs Priority: optional -Maintainer: NeoSPCC +Maintainer: TrueCloudLab Build-Depends: debhelper-compat (= 13), dh-sysuser, git, devscripts Standards-Version: 4.5.1 -Homepage: https://fs.neo.org/ -Vcs-Git: https://github.com/nspcc-dev/neofs-http-gw.git -Vcs-Browser: https://github.com/nspcc-dev/neofs-http-gw +Homepage: https://frostfs.info/ +Vcs-Git: https://github.com/TrueCloudLab/frostfs-http-gw.git +Vcs-Browser: https://github.com/TrueCloudLab/frostfs-http-gw -Package: neofs-http-gw +Package: frostfs-http-gw Architecture: any Depends: ${misc:Depends} -Description: NeoFS HTTP Gateway bridges NeoFS internal protocol and HTTP standard. +Description: FrostFS HTTP Gateway bridges FrostFS internal protocol and HTTP standard. diff --git a/debian/copyright b/debian/copyright index 0849725..be82996 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,11 +1,13 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: neofs-http-gw -Upstream-Contact: tech@nspcc.ru -Source: https://github.com/nspcc-dev/neofs-http-gw +Upstream-Name: frostfs-http-gw +Upstream-Contact: tech@frostfs.info +Source: https://github.com/TrueCloudLab/frostfs-http-gw Files: * -Copyright: 2018-2022 NeoSPCC (@nspcc-dev), contributors of neofs-http-gw project +Copyright: 2018-2022 NeoSPCC (@nspcc-dev), contributors of neofs-http-gw project (https://github.com/nspcc-dev/neofs-http-gw/blob/master/CREDITS.md) + 2022 True Cloud Lab (@TrueCloudLab), contributors of frostfs-http-gw project + (https://github.com/TrueCloudLab/frostfs-http-gw/blob/master/CREDITS.md) License: GPL-3 diff --git a/debian/frostfs-http-gw.dirs b/debian/frostfs-http-gw.dirs new file mode 100644 index 0000000..f51b198 --- /dev/null +++ b/debian/frostfs-http-gw.dirs @@ -0,0 +1,2 @@ +etc/frostfs +srv/frostfs_cache diff --git a/debian/neofs-http-gw.docs b/debian/frostfs-http-gw.docs similarity index 100% rename from debian/neofs-http-gw.docs rename to debian/frostfs-http-gw.docs diff --git a/debian/neofs-http-gw.examples b/debian/frostfs-http-gw.examples similarity index 100% rename from debian/neofs-http-gw.examples rename to debian/frostfs-http-gw.examples diff --git a/debian/frostfs-http-gw.install b/debian/frostfs-http-gw.install new file mode 100644 index 0000000..2f71be4 --- /dev/null +++ b/debian/frostfs-http-gw.install @@ -0,0 +1,2 @@ +bin/frostfs-http-gw usr/bin +config/config.yaml etc/frostfs/http diff --git a/debian/neofs-http-gw.postinst b/debian/frostfs-http-gw.postinst similarity index 56% rename from debian/neofs-http-gw.postinst rename to debian/frostfs-http-gw.postinst index ef4dbc0..85b6c0f 100644 --- a/debian/neofs-http-gw.postinst +++ b/debian/frostfs-http-gw.postinst @@ -1,5 +1,5 @@ #!/bin/sh -# postinst script for neofs-http-gw +# postinst script for frostfs-http-gw # # see: dh_installdeb(1) @@ -21,16 +21,16 @@ set -e case "$1" in configure) USERNAME=http - id -u neofs-$USERNAME >/dev/null 2>&1 || useradd -s /usr/sbin/nologin -d /srv/neofs_cache --system -M -U -c "NeoFS HTTP gateway" neofs-$USERNAME - if ! dpkg-statoverride --list /etc/neofs/$USERNAME >/dev/null; then - chown -f root:neofs-$USERNAME /etc/neofs/$USERNAME - chown -f root:neofs-$USERNAME /etc/neofs/$USERNAME/config.yaml || true - chmod -f 0750 /etc/neofs/$USERNAME - chmod -f 0640 /etc/neofs/$USERNAME/config.yaml || true + id -u frostfs-$USERNAME >/dev/null 2>&1 || useradd -s /usr/sbin/nologin -d /srv/frostfs_cache --system -M -U -c "FrostFS HTTP gateway" frostfs-$USERNAME + if ! dpkg-statoverride --list /etc/frostfs/$USERNAME >/dev/null; then + chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME + chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME/config.yaml || true + chmod -f 0750 /etc/frostfs/$USERNAME + chmod -f 0640 /etc/frostfs/$USERNAME/config.yaml || true fi - USERDIR=$(getent passwd "neofs-$USERNAME" | cut -d: -f6) - if ! dpkg-statoverride --list neofs-$USERDIR >/dev/null; then - chown -f neofs-$USERNAME: $USERDIR + USERDIR=$(getent passwd "frostfs-$USERNAME" | cut -d: -f6) + if ! dpkg-statoverride --list frostfs-$USERDIR >/dev/null; then + chown -f frostfs-$USERNAME: $USERDIR fi ;; diff --git a/debian/neofs-http-gw.postrm b/debian/frostfs-http-gw.postrm similarity index 92% rename from debian/neofs-http-gw.postrm rename to debian/frostfs-http-gw.postrm index 02d5ccf..ebb2dec 100644 --- a/debian/neofs-http-gw.postrm +++ b/debian/frostfs-http-gw.postrm @@ -1,5 +1,5 @@ #!/bin/sh -# postrm script for neofs-http-gw +# postrm script for frostfs-http-gw # # see: dh_installdeb(1) @@ -21,7 +21,7 @@ set -e case "$1" in purge) - rm -rf /srv/neofs_cache + rm -rf /srv/frostfs_cache ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) diff --git a/debian/neofs-http-gw.preinst b/debian/frostfs-http-gw.preinst similarity index 94% rename from debian/neofs-http-gw.preinst rename to debian/frostfs-http-gw.preinst index e832e16..c18093b 100644 --- a/debian/neofs-http-gw.preinst +++ b/debian/frostfs-http-gw.preinst @@ -1,5 +1,5 @@ #!/bin/sh -# preinst script for neofs-http-gw +# preinst script for frostfs-http-gw # # see: dh_installdeb(1) diff --git a/debian/neofs-http-gw.prerm b/debian/frostfs-http-gw.prerm similarity index 96% rename from debian/neofs-http-gw.prerm rename to debian/frostfs-http-gw.prerm index 10b59ec..7623f7f 100644 --- a/debian/neofs-http-gw.prerm +++ b/debian/frostfs-http-gw.prerm @@ -1,5 +1,5 @@ #!/bin/sh -# prerm script for neofs-http-gw +# prerm script for frostfs-http-gw # # see: dh_installdeb(1) diff --git a/debian/frostfs-http-gw.service b/debian/frostfs-http-gw.service new file mode 100644 index 0000000..4851a3f --- /dev/null +++ b/debian/frostfs-http-gw.service @@ -0,0 +1,16 @@ +[Unit] +Description=FrostFS HTTP Gateway +Requires=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/frostfs-http-gw --config /etc/frostfs/http/config.yaml +User=frostfs-http +Group=frostfs-http +WorkingDirectory=/srv/frostfs_cache +Restart=always +RestartSec=5 +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/debian/neofs-http-gw.dirs b/debian/neofs-http-gw.dirs deleted file mode 100644 index 9bacd8b..0000000 --- a/debian/neofs-http-gw.dirs +++ /dev/null @@ -1,2 +0,0 @@ -etc/neofs -srv/neofs_cache diff --git a/debian/neofs-http-gw.install b/debian/neofs-http-gw.install deleted file mode 100644 index afd9c36..0000000 --- a/debian/neofs-http-gw.install +++ /dev/null @@ -1,2 +0,0 @@ -bin/neofs-http-gw usr/bin -config/config.yaml etc/neofs/http diff --git a/debian/neofs-http-gw.service b/debian/neofs-http-gw.service deleted file mode 100644 index d7ce5eb..0000000 --- a/debian/neofs-http-gw.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=NeoFS HTTP Gateway -Requires=network.target - -[Service] -Type=simple -ExecStart=/usr/bin/neofs-http-gw --config /etc/neofs/http/config.yaml -User=neofs-http -Group=neofs-http -WorkingDirectory=/srv/neofs_cache -Restart=always -RestartSec=5 -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules index cbeb2d1..477128a 100755 --- a/debian/rules +++ b/debian/rules @@ -2,7 +2,7 @@ # Do not try to strip Go binaries and do not run test export DEB_BUILD_OPTIONS := nostrip nocheck -SERVICE = neofs-http-gw +SERVICE = frostfs-http-gw %: dh $@