From d3d907c0a58d55c087c35105c687101da10f1d9b Mon Sep 17 00:00:00 2001 From: Bennu Date: Thu, 12 May 2022 15:03:53 +0800 Subject: [PATCH] [skip e2e] Solve the problem of file residue when uninstalling rpm (#16928) Signed-off-by: Bennu-Li --- build/rpm/milvus.spec | 12 ++++++++---- build/rpm/services/milvus-etcd.service | 2 +- build/rpm/services/milvus-minio.service | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/build/rpm/milvus.spec b/build/rpm/milvus.spec index 53c5e55ff0..eb5b9cd1f1 100644 --- a/build/rpm/milvus.spec +++ b/build/rpm/milvus.spec @@ -1,9 +1,9 @@ %if 0%{!?version:1} -%global version 2.0.0 +%global version 2.0.2 %endif %if 0%{!?release:1} -%global release %(date +%Y%m%d)%{?dist} +%global release 1%{?dist} %endif Name: milvus @@ -37,10 +37,11 @@ install -m 755 bin/etcd %{buildroot}/usr/bin/milvus-etcd install -m 755 bin/minio %{buildroot}/usr/bin/milvus-minio # lib +install -m 755 lib/libknowhere.so %{buildroot}/lib64/milvus/libknowhere.so +install -m 755 lib/libmilvus_common.so %{buildroot}/lib64/milvus/libmilvus_common.so install -m 755 lib/libmilvus_indexbuilder.so %{buildroot}/lib64/milvus/libmilvus_indexbuilder.so install -m 755 lib/libmilvus_segcore.so %{buildroot}/lib64/milvus/libmilvus_segcore.so install -m 755 /usr/lib/libopenblas-r0.3.9.so %{buildroot}/lib64/milvus/libopenblas.so.0 -install -m 755 lib/libfiu.so.1.00 %{buildroot}/lib64/milvus/libfiu.so.0 install -m 755 lib/libngt.so.1.12.0 %{buildroot}/lib64/milvus/libngt.so.1 install -m 755 /usr/lib64/libgfortran.so.4.0.0 %{buildroot}/lib64/milvus/libgfortran.so.4 @@ -66,6 +67,8 @@ systemctl daemon-reload # disable service before remove systemctl stop milvus systemctl disable milvus +rm -rf /lib64/milvus +rm -rf /etc/milvus %postun # update ld, systemd cache @@ -78,10 +81,11 @@ systemctl daemon-reload /usr/bin/milvus-etcd /usr/bin/milvus-minio +/lib64/milvus/libknowhere.so +/lib64/milvus/libmilvus_common.so /lib64/milvus/libmilvus_indexbuilder.so /lib64/milvus/libmilvus_segcore.so /lib64/milvus/libopenblas.so.0 -/lib64/milvus/libfiu.so.0 /lib64/milvus/libngt.so.1 /lib64/milvus/libgfortran.so.4 diff --git a/build/rpm/services/milvus-etcd.service b/build/rpm/services/milvus-etcd.service index e7e9039faf..fb8ecccaa4 100644 --- a/build/rpm/services/milvus-etcd.service +++ b/build/rpm/services/milvus-etcd.service @@ -27,4 +27,4 @@ StandardError=inherit Restart=always # Start main service -ExecStart=/usr/bin/milvus-etcd --data-dir /etc/milvus/etcd-data +ExecStart=/usr/bin/milvus-etcd --data-dir /var/lib/milvus/etcd-data diff --git a/build/rpm/services/milvus-minio.service b/build/rpm/services/milvus-minio.service index edc7971d52..2d02296516 100644 --- a/build/rpm/services/milvus-minio.service +++ b/build/rpm/services/milvus-minio.service @@ -28,4 +28,4 @@ StandardError=inherit Restart=always # Start main service -ExecStart=/usr/bin/milvus-minio server /etc/milvus/minio-data +ExecStart=/usr/bin/milvus-minio server /var/lib/milvus/minio-data