[skip e2e] Solve the problem of file residue when uninstalling rpm (#16928)

Signed-off-by: Bennu-Li <yunmei.li@zilliz.com>
pull/16946/head
Bennu 2022-05-12 15:03:53 +08:00 committed by GitHub
parent 08ad77c71b
commit d3d907c0a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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