Compare commits
10 Commits
b4d25539ae
...
59d1cb01c3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59d1cb01c3 | ||
|
|
e7128c6d8b | ||
|
|
4e1a26c890 | ||
|
|
ea435833d3 | ||
|
|
6e1c2ef9c7 | ||
|
|
ad0549c76d | ||
|
|
a46ce59ee8 | ||
|
|
01851153e5 | ||
|
|
eaf5487887 | ||
|
|
6ff2749faa |
@ -1,32 +0,0 @@
|
|||||||
From 0e4fbdbdbfbaccec47187e39632398ce32399be9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: herengui <herengui@uniontech.com>
|
|
||||||
Date: Fri, 2 Apr 2021 15:02:37 +0800
|
|
||||||
Subject: [PATCH] 修改make.sh中复制scripts的逻辑,脚本文件放置到/usr/share/fastdfs/bin目录中,
|
|
||||||
直接放到/usr/bin目录中,文件名不能自解释脚本功能。
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
---
|
|
||||||
make.sh | 5 +++--
|
|
||||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/make.sh b/make.sh
|
|
||||||
index 69bb072..a1c1304 100755
|
|
||||||
--- a/make.sh
|
|
||||||
+++ b/make.sh
|
|
||||||
@@ -156,8 +156,9 @@ cd ..
|
|
||||||
|
|
||||||
if [ "$1" = "install" ]; then
|
|
||||||
cd ..
|
|
||||||
- cp -f restart.sh $TARGET_PREFIX/bin
|
|
||||||
- cp -f stop.sh $TARGET_PREFIX/bin
|
|
||||||
+ SHARE_BIN_DIR=$TARGET_PREFIX/share/fastdfs/bin
|
|
||||||
+ mkdir -p $SHARE_BIN_DIR
|
|
||||||
+ cp -f restart.sh stop.sh $SHARE_BIN_DIR
|
|
||||||
|
|
||||||
if [ "$uname" = "Linux" ]; then
|
|
||||||
if [ "$WITH_LINUX_SERVICE" = "1" ]; then
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
80
0001-remove-compile-warnings-in-client-and-storage.patch
Normal file
80
0001-remove-compile-warnings-in-client-and-storage.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
From 75c5535f5a9853dfe8302cd5852bb36bc518fde5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: YuQing <384681@qq.com>
|
||||||
|
Date: Mon, 11 Mar 2024 15:25:41 +0800
|
||||||
|
Subject: [PATCH] remove compile warnings
|
||||||
|
|
||||||
|
---
|
||||||
|
client/storage_client.c | 23 +++++++++++++----------
|
||||||
|
storage/storage_service.c | 2 +-
|
||||||
|
2 files changed, 14 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/storage_client.c b/client/storage_client.c
|
||||||
|
index 5acfa9b..6f05742 100644
|
||||||
|
--- a/client/storage_client.c
|
||||||
|
+++ b/client/storage_client.c
|
||||||
|
@@ -919,7 +919,7 @@ int storage_do_upload_file(ConnectionInfo *pTrackerServer, \
|
||||||
|
char in_buff[128];
|
||||||
|
char *pInBuff;
|
||||||
|
ConnectionInfo storageServer;
|
||||||
|
- bool new_connection;
|
||||||
|
+ bool new_connection = false;
|
||||||
|
bool bUploadSlave;
|
||||||
|
int new_store_path;
|
||||||
|
int master_filename_len;
|
||||||
|
@@ -948,19 +948,22 @@ int storage_do_upload_file(ConnectionInfo *pTrackerServer, \
|
||||||
|
bUploadSlave = (strlen(group_name) > 0 && master_filename_len > 0);
|
||||||
|
if (bUploadSlave)
|
||||||
|
{
|
||||||
|
- if ((result=storage_get_update_connection(pTrackerServer, \
|
||||||
|
- &pStorageServer, group_name, master_filename, \
|
||||||
|
+ if ((result=storage_get_update_connection(pTrackerServer,
|
||||||
|
+ &pStorageServer, group_name, master_filename,
|
||||||
|
&storageServer, &new_connection)) != 0)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- else if ((result=storage_get_upload_connection(pTrackerServer, \
|
||||||
|
- &pStorageServer, group_name, &storageServer, \
|
||||||
|
- &new_store_path, &new_connection)) != 0)
|
||||||
|
+ else
|
||||||
|
{
|
||||||
|
- *group_name = '\0';
|
||||||
|
- return result;
|
||||||
|
+ if ((result=storage_get_upload_connection(pTrackerServer,
|
||||||
|
+ &pStorageServer, group_name, &storageServer,
|
||||||
|
+ &new_store_path, &new_connection)) != 0)
|
||||||
|
+ {
|
||||||
|
+ *group_name = '\0';
|
||||||
|
+ return result;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
*group_name = '\0';
|
||||||
|
@@ -1264,8 +1267,8 @@ int storage_set_metadata(ConnectionInfo *pTrackerServer, \
|
||||||
|
char *pEnd;
|
||||||
|
bool new_connection;
|
||||||
|
|
||||||
|
- if ((result=storage_get_update_connection(pTrackerServer, \
|
||||||
|
- &pStorageServer, group_name, filename, \
|
||||||
|
+ if ((result=storage_get_update_connection(pTrackerServer,
|
||||||
|
+ &pStorageServer, group_name, filename,
|
||||||
|
&storageServer, &new_connection)) != 0)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
diff --git a/storage/storage_service.c b/storage/storage_service.c
|
||||||
|
index 0a0ae82..5eea899 100644
|
||||||
|
--- a/storage/storage_service.c
|
||||||
|
+++ b/storage/storage_service.c
|
||||||
|
@@ -1783,7 +1783,7 @@ void storage_get_store_path(const char *filename, const int filename_len, \
|
||||||
|
{ \
|
||||||
|
int r; \
|
||||||
|
r = (rand() & 0x007FFFFF) | 0x80000000; \
|
||||||
|
- masked_file_size = (((int64_t)r) << 32 ) | file_size; \
|
||||||
|
+ masked_file_size = (((int64_t)r) << 32 ) | (file_size); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
BIN
V6.06.tar.gz
BIN
V6.06.tar.gz
Binary file not shown.
BIN
V6.12.0.tar.gz
Normal file
BIN
V6.12.0.tar.gz
Normal file
Binary file not shown.
85
fastdfs.spec
85
fastdfs.spec
@ -1,5 +1,5 @@
|
|||||||
Name: fastdfs
|
Name: fastdfs
|
||||||
Version: 6.06
|
Version: 6.12.0
|
||||||
Release: 2
|
Release: 2
|
||||||
Summary: FastDFS server and client
|
Summary: FastDFS server and client
|
||||||
License: GPL3.0
|
License: GPL3.0
|
||||||
@ -7,24 +7,30 @@ Group: Arch/Tech
|
|||||||
URL: https://github.com/happyfish100/fastdfs
|
URL: https://github.com/happyfish100/fastdfs
|
||||||
Source: https://github.com/happyfish100/fastdfs/archive/V%{version}.tar.gz
|
Source: https://github.com/happyfish100/fastdfs/archive/V%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: 0001-move_scripts_to_data_dir.patch
|
Patch1: 0001-remove-compile-warnings-in-client-and-storage.patch
|
||||||
|
|
||||||
Requires: gcc cmake
|
Requires: gcc cmake
|
||||||
BuildRequires: libfastcommon-devel >= 1.0.43
|
BuildRequires: libfastcommon-devel >= 1.0.66
|
||||||
|
BuildRequires: libserverframe-devel >= 1.2.1
|
||||||
|
BuildRequires: perl
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides tracker & storage of fastdfs
|
This package provides tracker & storage of fastdfs
|
||||||
|
|
||||||
%package -n fastdfs-server
|
%package -n fastdfs-server
|
||||||
Requires: libfastcommon >= 1.0.43
|
Requires: libfastcommon >= 1.0.66
|
||||||
|
Requires: libserverframe >= 1.2.1
|
||||||
|
Requires: fastdfs-config
|
||||||
Summary: fastdfs tracker & storage
|
Summary: fastdfs tracker & storage
|
||||||
|
|
||||||
%package -n fastdfs-tools
|
%package -n fastdfs-tools
|
||||||
Requires: libfastcommon
|
Requires: libfdfsclient
|
||||||
Summary: fastdfs tools
|
Summary: fastdfs tools
|
||||||
|
|
||||||
%package -n libfdfsclient
|
%package -n libfdfsclient
|
||||||
Requires: libfastcommon
|
Requires: libfastcommon >= 1.0.66
|
||||||
|
Requires: libserverframe >= 1.2.1
|
||||||
|
Requires: fastdfs-config
|
||||||
Summary: The client dynamic library of fastdfs
|
Summary: The client dynamic library of fastdfs
|
||||||
|
|
||||||
%package -n libfdfsclient-devel
|
%package -n libfdfsclient-devel
|
||||||
@ -40,67 +46,53 @@ This package is client dynamic library of fastdfs
|
|||||||
%description -n libfdfsclient-devel
|
%description -n libfdfsclient-devel
|
||||||
This package is client header of fastdfs client
|
This package is client header of fastdfs client
|
||||||
|
|
||||||
|
%package -n fastdfs-config
|
||||||
|
Summary: FastDFS config files for sample
|
||||||
|
|
||||||
%description -n fastdfs-tools
|
%description -n fastdfs-tools
|
||||||
This package is tools for fastdfs
|
This package is tools for fastdfs
|
||||||
|
|
||||||
|
%description -n fastdfs-config
|
||||||
|
FastDFS config files for sample
|
||||||
|
commit version: $COMMIT_VERSION
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./make.sh
|
./make.sh clean && ./make.sh
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
DESTDIR=$RPM_BUILD_ROOT ./make.sh install
|
DESTDIR=$RPM_BUILD_ROOT ./make.sh install
|
||||||
rm -f %{buildroot}/etc/fdfs/http.conf.sample
|
|
||||||
rm -f %{buildroot}/etc/fdfs/mime.types.sample
|
|
||||||
|
|
||||||
%post -n fastdfs-server
|
%post
|
||||||
/sbin/chkconfig --add fdfs_trackerd
|
|
||||||
/sbin/chkconfig --add fdfs_storaged
|
|
||||||
|
|
||||||
create_symbolic_link() {
|
%postun
|
||||||
local source_file="%{_datadir}/%{name}/bin/$1"
|
|
||||||
local target_file="%{_bindir}/fdfs_$1"
|
|
||||||
test -f "${source_file}" && ln -sf "${source_file}" "${target_file}"
|
|
||||||
}
|
|
||||||
|
|
||||||
create_symbolic_link "restart.sh"
|
|
||||||
create_symbolic_link "stop.sh"
|
|
||||||
|
|
||||||
%preun -n fastdfs-server
|
|
||||||
/sbin/chkconfig --del fdfs_trackerd
|
|
||||||
/sbin/chkconfig --del fdfs_storaged
|
|
||||||
|
|
||||||
%postun -n fastdfs-server
|
|
||||||
find %{_bindir} -maxdepth 1 -type l \
|
|
||||||
-name "fdfs_restart.sh" -delete -o \
|
|
||||||
-name "fdfs_stop.sh" -delete
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
|
||||||
%files -n fastdfs-server
|
%files -n fastdfs-server
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/fdfs_trackerd
|
%{_bindir}/fdfs_trackerd
|
||||||
%{_bindir}/fdfs_storaged
|
%{_bindir}/fdfs_storaged
|
||||||
%{_datadir}/%{name}/bin/restart.sh
|
%config(noreplace) /usr/lib/systemd/system/fdfs_trackerd.service
|
||||||
%{_datadir}/%{name}/bin/stop.sh
|
%config(noreplace) /usr/lib/systemd/system/fdfs_storaged.service
|
||||||
%{_sysconfdir}/init.d/*
|
|
||||||
%{_sysconfdir}/fdfs/tracker.conf.sample
|
|
||||||
%{_sysconfdir}/fdfs/storage.conf.sample
|
|
||||||
%{_sysconfdir}/fdfs/storage_ids.conf.sample
|
|
||||||
|
|
||||||
%files -n libfdfsclient
|
%files -n libfdfsclient
|
||||||
|
%defattr(-,root,root,-)
|
||||||
%{_libdir}/libfdfsclient*
|
%{_libdir}/libfdfsclient*
|
||||||
%{_usr}/lib/libfdfsclient*
|
%{_usr}/lib/libfdfsclient*
|
||||||
%{_sysconfdir}/fdfs/client.conf.sample
|
|
||||||
|
|
||||||
%files -n libfdfsclient-devel
|
%files -n libfdfsclient-devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_includedir}/fastdfs/*
|
%{_includedir}/fastdfs/*
|
||||||
|
|
||||||
%files -n fastdfs-tools
|
%files -n fastdfs-tools
|
||||||
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/fdfs_monitor
|
%{_bindir}/fdfs_monitor
|
||||||
%{_bindir}/fdfs_test
|
%{_bindir}/fdfs_test
|
||||||
%{_bindir}/fdfs_test1
|
%{_bindir}/fdfs_test1
|
||||||
@ -115,7 +107,26 @@ rm -rf %{buildroot}
|
|||||||
%{_bindir}/fdfs_upload_appender
|
%{_bindir}/fdfs_upload_appender
|
||||||
%{_bindir}/fdfs_regenerate_filename
|
%{_bindir}/fdfs_regenerate_filename
|
||||||
|
|
||||||
|
%files -n fastdfs-config
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%config(noreplace) /etc/fdfs/*.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 2 2024 zhangyaqi <zhangyaqi@kylinos.cn> - 6.12.0-2
|
||||||
|
- remove compile warnings
|
||||||
|
|
||||||
|
* Mon Feb 26 2024 liweigang <izmirvii@gmail.com> - 6.12.0-1
|
||||||
|
- update to version 6.12.0
|
||||||
|
|
||||||
|
* Mon Mar 20 2023 suweifeng <suweifeng@huawei.com> - 6.9.4-1
|
||||||
|
- Upgrade to version 6.9.4
|
||||||
|
|
||||||
|
* Fri Dec 16 2022 lihaoxiang <lihaoxiang9@huawei.com> - 6.9.1-1
|
||||||
|
- Upgrade to version 6.9.1
|
||||||
|
|
||||||
|
* Thu Jun 23 2022 lihaoxiang <lihaoxiang9@huawei.com> - 6.06-3
|
||||||
|
- Modified fastdfs.spec that add BuildRequires about perl
|
||||||
|
|
||||||
* Fri Apr 02 2021 herengui <herengui@uniontech.com> - 6.06-2
|
* Fri Apr 02 2021 herengui <herengui@uniontech.com> - 6.06-2
|
||||||
- Rearrange the files list
|
- Rearrange the files list
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user