From f744c672cb6f8ed1dcd7948b417ea66f5e3573f7 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Thu, 15 Dec 2022 17:29:54 +0300 Subject: [PATCH] [#2] Update debpackage Signed-off-by: Denis Kirillov --- debian/changelog | 4 ++-- debian/control | 14 ++++++------ debian/copyright | 10 +++++---- debian/frostfs-s3-gw.dirs | 2 ++ .../{neofs-s3-gw.docs => frostfs-s3-gw.docs} | 0 ...-s3-gw.examples => frostfs-s3-gw.examples} | 0 debian/frostfs-s3-gw.install | 4 ++++ ...-s3-gw.postinst => frostfs-s3-gw.postinst} | 22 +++++++++---------- ...eofs-s3-gw.postrm => frostfs-s3-gw.postrm} | 4 ++-- ...fs-s3-gw.preinst => frostfs-s3-gw.preinst} | 2 +- ...{neofs-s3-gw.prerm => frostfs-s3-gw.prerm} | 2 +- debian/frostfs-s3-gw.service | 16 ++++++++++++++ debian/neofs-s3-gw.dirs | 2 -- debian/neofs-s3-gw.install | 4 ---- debian/neofs-s3-gw.service | 16 -------------- debian/rules | 2 +- 16 files changed, 53 insertions(+), 51 deletions(-) create mode 100644 debian/frostfs-s3-gw.dirs rename debian/{neofs-s3-gw.docs => frostfs-s3-gw.docs} (100%) rename debian/{neofs-s3-gw.examples => frostfs-s3-gw.examples} (100%) create mode 100644 debian/frostfs-s3-gw.install rename debian/{neofs-s3-gw.postinst => frostfs-s3-gw.postinst} (54%) rename debian/{neofs-s3-gw.postrm => frostfs-s3-gw.postrm} (92%) rename debian/{neofs-s3-gw.preinst => frostfs-s3-gw.preinst} (94%) rename debian/{neofs-s3-gw.prerm => frostfs-s3-gw.prerm} (96%) create mode 100644 debian/frostfs-s3-gw.service delete mode 100644 debian/neofs-s3-gw.dirs delete mode 100644 debian/neofs-s3-gw.install delete mode 100644 debian/neofs-s3-gw.service diff --git a/debian/changelog b/debian/changelog index 7cb0e2df4..186b4efb7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -neofs-s3-gw (0.0.0) stable; urgency=medium +forstfs-s3-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 2eee1cee7..0c5bab7ce 100644 --- a/debian/control +++ b/debian/control @@ -1,14 +1,14 @@ -Source: neofs-s3-gw +Source: frostfs-s3-gw Section: misc Priority: optional -Maintainer: NeoSPCC +Maintainer: TrueCloudLab Build-Depends: debhelper-compat (= 13), git, devscripts Standards-Version: 4.5.1 -Homepage: https://fs.neo.org/ -Vcs-Git: https://github.com/nspcc-dev/neofs-s3-gw.git -Vcs-Browser: https://github.com/nspcc-dev/neofs-s3-gw +Homepage: http://frostfs.info/ +Vcs-Git: https://github.com/TrueCloudLab/frostfs-s3-gw.git +Vcs-Browser: https://github.com/TrueCloudLab/frostfs-s3-gw -Package: neofs-s3-gw +Package: frostfs-s3-gw Architecture: any Depends: ${misc:Depends} -Description: NeoFS S3 gateway provides API compatible with Amazon S3 cloud storage service. +Description: FrostFS S3 gateway provides API compatible with Amazon S3 cloud storage service. diff --git a/debian/copyright b/debian/copyright index b9b7a64dd..13871fe37 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-s3-gw -Upstream-Contact: tech@nspcc.ru -Source: https://github.com/nspcc-dev/neofs-s3-gw +Upstream-Name: frostfs-s3-gw +Upstream-Contact: tech@frostfs.info +Source: https://github.com/TrueCloudLab/frostfs-s3-gw Files: * -Copyright: 2018-2022 NeoSPCC (@nspcc-dev), contributors of neofs-s3-gw project +Copyright: 2018-2022 NeoSPCC (@nspcc-dev), contributors of neofs-s3-gw project (https://github.com/nspcc-dev/neofs-s3-gw/blob/master/CREDITS.md) + 2022 True Cloud Lab (@TrueCloudLab), contributors of frostfs-s3-gw project + (https://github.com/TrueCloudLab/frostfs-s3-gw/blob/master/CREDITS.md) License: AGPL-3.0-only diff --git a/debian/frostfs-s3-gw.dirs b/debian/frostfs-s3-gw.dirs new file mode 100644 index 000000000..bc6d0fd35 --- /dev/null +++ b/debian/frostfs-s3-gw.dirs @@ -0,0 +1,2 @@ +etc/frostfs/s3 +var/lib/frostfs/s3 diff --git a/debian/neofs-s3-gw.docs b/debian/frostfs-s3-gw.docs similarity index 100% rename from debian/neofs-s3-gw.docs rename to debian/frostfs-s3-gw.docs diff --git a/debian/neofs-s3-gw.examples b/debian/frostfs-s3-gw.examples similarity index 100% rename from debian/neofs-s3-gw.examples rename to debian/frostfs-s3-gw.examples diff --git a/debian/frostfs-s3-gw.install b/debian/frostfs-s3-gw.install new file mode 100644 index 000000000..7e4b6e1da --- /dev/null +++ b/debian/frostfs-s3-gw.install @@ -0,0 +1,4 @@ +config/config.yaml etc/frostfs/s3 +config/rules.json var/lib/frostfs/s3 +bin/frostfs-s3-gw usr/bin +bin/frostfs-s3-authmate usr/bin diff --git a/debian/neofs-s3-gw.postinst b/debian/frostfs-s3-gw.postinst similarity index 54% rename from debian/neofs-s3-gw.postinst rename to debian/frostfs-s3-gw.postinst index 42b6ff3d1..82345f655 100644 --- a/debian/neofs-s3-gw.postinst +++ b/debian/frostfs-s3-gw.postinst @@ -1,5 +1,5 @@ #!/bin/sh -# postinst script for neofs-s3-gw +# postinst script for frostfs-s3-gw # # see: dh_installdeb(1) @@ -21,17 +21,17 @@ set -e case "$1" in configure) USERNAME=s3 - id -u neofs-$USERNAME >/dev/null 2>&1 || useradd -s /usr/sbin/nologin -d /var/lib/neofs/s3 --system -M -U -c "NeoFS S3 gateway" neofs-$USERNAME - if ! dpkg-statoverride --list /etc/neofs/$USERNAME >/dev/null; then - chown -f -R 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 /var/lib/frostfs/s3 --system -M -U -c "FrostFS S3 gateway" frostfs-$USERNAME + if ! dpkg-statoverride --list /etc/frostfs/$USERNAME >/dev/null; then + chown -f -R 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 - chown -f neofs-$USERNAME: $USERDIR/rules.json + USERDIR=$(getent passwd "frostfs-$USERNAME" | cut -d: -f6) + if ! dpkg-statoverride --list frostfs-$USERDIR >/dev/null; then + chown -f frostfs-$USERNAME: $USERDIR + chown -f frostfs-$USERNAME: $USERDIR/rules.json fi ;; diff --git a/debian/neofs-s3-gw.postrm b/debian/frostfs-s3-gw.postrm similarity index 92% rename from debian/neofs-s3-gw.postrm rename to debian/frostfs-s3-gw.postrm index 488791d44..729f80104 100644 --- a/debian/neofs-s3-gw.postrm +++ b/debian/frostfs-s3-gw.postrm @@ -1,5 +1,5 @@ #!/bin/sh -# postrm script for neofs-s3-gw +# postrm script for frostfs-s3-gw # # see: dh_installdeb(1) @@ -21,7 +21,7 @@ set -e case "$1" in purge) - rm -rf /var/lib/neofs/s3 + rm -rf /var/lib/frostfs/s3 ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) diff --git a/debian/neofs-s3-gw.preinst b/debian/frostfs-s3-gw.preinst similarity index 94% rename from debian/neofs-s3-gw.preinst rename to debian/frostfs-s3-gw.preinst index 1dcfc1b28..c26a51e53 100644 --- a/debian/neofs-s3-gw.preinst +++ b/debian/frostfs-s3-gw.preinst @@ -1,5 +1,5 @@ #!/bin/sh -# preinst script for neofs-s3-gw +# preinst script for frostfs-s3-gw # # see: dh_installdeb(1) diff --git a/debian/neofs-s3-gw.prerm b/debian/frostfs-s3-gw.prerm similarity index 96% rename from debian/neofs-s3-gw.prerm rename to debian/frostfs-s3-gw.prerm index dc142d319..99c4acbfd 100644 --- a/debian/neofs-s3-gw.prerm +++ b/debian/frostfs-s3-gw.prerm @@ -1,5 +1,5 @@ #!/bin/sh -# prerm script for neofs-s3-gw +# prerm script for frostfs-s3-gw # # see: dh_installdeb(1) diff --git a/debian/frostfs-s3-gw.service b/debian/frostfs-s3-gw.service new file mode 100644 index 000000000..baad2d10e --- /dev/null +++ b/debian/frostfs-s3-gw.service @@ -0,0 +1,16 @@ +[Unit] +Description=FrostFS S3 Gateway +Requires=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/frostfs-s3-gw --config /etc/frostfs/s3/config.yaml +User=frostfs-s3 +Group=frostfs-s3 +WorkingDirectory=/var/lib/frostfs/s3 +Restart=always +RestartSec=5 +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/debian/neofs-s3-gw.dirs b/debian/neofs-s3-gw.dirs deleted file mode 100644 index 9f7f6d601..000000000 --- a/debian/neofs-s3-gw.dirs +++ /dev/null @@ -1,2 +0,0 @@ -etc/neofs/s3 -var/lib/neofs/s3 diff --git a/debian/neofs-s3-gw.install b/debian/neofs-s3-gw.install deleted file mode 100644 index 40f0322f1..000000000 --- a/debian/neofs-s3-gw.install +++ /dev/null @@ -1,4 +0,0 @@ -config/config.yaml etc/neofs/s3 -config/rules.json var/lib/neofs/s3 -bin/neofs-s3-gw usr/bin -bin/neofs-s3-authmate usr/bin diff --git a/debian/neofs-s3-gw.service b/debian/neofs-s3-gw.service deleted file mode 100644 index 2f2626b7a..000000000 --- a/debian/neofs-s3-gw.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=NeoFS S3 Gateway -Requires=network.target - -[Service] -Type=simple -ExecStart=/usr/bin/neofs-s3-gw --config /etc/neofs/s3/config.yaml -User=neofs-s3 -Group=neofs-s3 -WorkingDirectory=/var/lib/neofs/s3 -Restart=always -RestartSec=5 -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules index 1187dd122..fbd95cc71 100755 --- a/debian/rules +++ b/debian/rules @@ -2,7 +2,7 @@ # Do not try to strip Go binaries export DEB_BUILD_OPTIONS := nostrip -SERVICE = neofs-s3-gw +SERVICE = frostfs-s3-gw %: dh $@