Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH] debian: don't install systemd service file twice
@ 2018-06-08 16:43 Alexander Turenko
  2018-06-08 18:57 ` [tarantool-patches] " Alexander Turenko
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Turenko @ 2018-06-08 16:43 UTC (permalink / raw)
  To: Konstantin Osipov, Kirill Yukhin; +Cc: Alexander Turenko, tarantool-patches

It fixes the following errors during tarantool installation from
packages on debian / ubuntu:

```
Unpacking tarantool (1.9.1.23.gacbd91c-1) ...
dpkg: error processing archive /var/cache/apt/archives/tarantool_1.9.1.23.gacbd91c-1_amd64.deb (--unpack):
 trying to overwrite '/lib/systemd/system/tarantool.service', which is also in package tarantool-common 1.9.1.23.gacbd91c-1
```

The problem is that tarantool.service file was shipped with
tarantool-common and tarantool packages both. It is the regression after
8925b8622f381378684de633e917229051e3482f.

The way to avoid installing / enabling the service file within tarantool
package is to pass `--name` option to dh_systemd_enable, but do not pass
the service file name. In that case dh_systemd_enable does not found the
service file and does not enforce existence of the file.

Hope there is less hacky way to do so, but I don't found one at the
moment.
---

issue: no
branch: Totktonada/fix-debian-packages
travis-ci: https://travis-ci.org/tarantool/tarantool/builds/389768109

 debian/rules | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index f3be35edc..edfecfc33 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,9 +20,12 @@ DEB_CMAKE_EXTRA_FLAGS := \
 	-DWITH_SYSVINIT=ON \
 	-DWITH_SYSTEMD=$(WITH_SYSTEMD)
 
-DEB_DH_INSTALLINIT_ARGS    := --name=tarantool
+# Install tarantool.service within tarantool-common package, but does not
+# install it within tarantool and tarantool-dev packages.
+DEB_DH_INSTALLINIT_ARGS                     := --name=tarantool
+DEB_DH_SYSTEMD_ENABLE_ARGS_tarantool        := --name=tarantool
 DEB_DH_SYSTEMD_ENABLE_ARGS_tarantool-common := --name=tarantool tarantool.service
-DEB_DH_SYSTEMD_START_ARGS_tarantool-common := --no-restart-on-upgrade tarantool.service
+DEB_DH_SYSTEMD_START_ARGS_tarantool-common  := --no-restart-on-upgrade tarantool.service
 
 # Needed for proper backtraces in fiber.info()
 DEB_DH_STRIP_ARGS	        := -X/usr/bin/tarantool
-- 
2.17.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tarantool-patches] Re: [PATCH] debian: don't install systemd service file twice
  2018-06-08 16:43 [tarantool-patches] [PATCH] debian: don't install systemd service file twice Alexander Turenko
@ 2018-06-08 18:57 ` Alexander Turenko
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Turenko @ 2018-06-08 18:57 UTC (permalink / raw)
  To: Konstantin Osipov, Kirill Yukhin; +Cc: tarantool-patches

Hi all,

Got Kostya O. approve in the chat. Pushed to 1.9, merged up to 1.10.

WBR, Alexander Turenko.

On Fri, Jun 08, 2018 at 07:43:38PM +0300, Alexander Turenko wrote:
> It fixes the following errors during tarantool installation from
> packages on debian / ubuntu:
> 
> ```
> Unpacking tarantool (1.9.1.23.gacbd91c-1) ...
> dpkg: error processing archive /var/cache/apt/archives/tarantool_1.9.1.23.gacbd91c-1_amd64.deb (--unpack):
>  trying to overwrite '/lib/systemd/system/tarantool.service', which is also in package tarantool-common 1.9.1.23.gacbd91c-1
> ```
> 
> The problem is that tarantool.service file was shipped with
> tarantool-common and tarantool packages both. It is the regression after
> 8925b8622f381378684de633e917229051e3482f.
> 
> The way to avoid installing / enabling the service file within tarantool
> package is to pass `--name` option to dh_systemd_enable, but do not pass
> the service file name. In that case dh_systemd_enable does not found the
> service file and does not enforce existence of the file.
> 
> Hope there is less hacky way to do so, but I don't found one at the
> moment.
> ---
> 
> issue: no
> branch: Totktonada/fix-debian-packages
> travis-ci: https://travis-ci.org/tarantool/tarantool/builds/389768109
> 
>  debian/rules | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/debian/rules b/debian/rules
> index f3be35edc..edfecfc33 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -20,9 +20,12 @@ DEB_CMAKE_EXTRA_FLAGS := \
>  	-DWITH_SYSVINIT=ON \
>  	-DWITH_SYSTEMD=$(WITH_SYSTEMD)
>  
> -DEB_DH_INSTALLINIT_ARGS    := --name=tarantool
> +# Install tarantool.service within tarantool-common package, but does not
> +# install it within tarantool and tarantool-dev packages.
> +DEB_DH_INSTALLINIT_ARGS                     := --name=tarantool
> +DEB_DH_SYSTEMD_ENABLE_ARGS_tarantool        := --name=tarantool
>  DEB_DH_SYSTEMD_ENABLE_ARGS_tarantool-common := --name=tarantool tarantool.service
> -DEB_DH_SYSTEMD_START_ARGS_tarantool-common := --no-restart-on-upgrade tarantool.service
> +DEB_DH_SYSTEMD_START_ARGS_tarantool-common  := --no-restart-on-upgrade tarantool.service
>  
>  # Needed for proper backtraces in fiber.info()
>  DEB_DH_STRIP_ARGS	        := -X/usr/bin/tarantool
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-08 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08 16:43 [tarantool-patches] [PATCH] debian: don't install systemd service file twice Alexander Turenko
2018-06-08 18:57 ` [tarantool-patches] " Alexander Turenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox