forked from cs3org/wopiserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cernbox-wopi-server.spec
191 lines (178 loc) · 8.81 KB
/
cernbox-wopi-server.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#
# cernbox-wopi-server spec file
#
Name: cernbox-wopi-server
Summary: A WOPI server to support Office online suites for the ScienceMesh IOP
Version: %{_version}
Release: 0%{?dist}
License: GPLv3
Buildroot: %{_tmppath}/%{name}-buildroot
Group: CERN-IT/ST
BuildArch: noarch
Source: %{name}-%{version}.tar.gz
BuildRequires: python(abi) >= 3.6
Requires: python(abi) >= 3.6, python36-pip
# pip3-installed "Requires" are to be found in the requirements.txt file.
# Note that python3-xrootd and the CS3APIs bindings are not explicit dependencies given that they are dynamically loaded.
# Also note that when using the CS3APIs the required python version is 3.8, which is NOT available
# in CentOS 7. This RPM targets xrootd based deployments, where python 3.6 is sufficient.
# The following to avoid to pick up /bin/python as an automatic dependency
AutoReq: no
%description
This RPM provides a Flask-based reference implementation of the WOPI protocol for the CS3 ScienceMesh IOP.
The server supports storage via the CS3 APIs to the IOP, local storage for testing purposes,
as well as xrootd-based storages currently used in production at CERN for CERNBox.
# Don't do any post-install weirdness, especially compiling .py files
%define __os_install_post %{nil}
# Get the python lib directory
%define _python_lib %(python3 -c "from distutils import sysconfig; print(sysconfig.get_python_lib())")
%prep
%setup -n %{name}-%{version}
%install
# server versioning
sed -i "s/WOPISERVERVERSION = 'git'/WOPISERVERVERSION = '%{version}-%{release}'/" src/wopiserver.py
# installation
rm -rf %buildroot/
mkdir -p %buildroot/usr/bin
mkdir -p %buildroot/%_python_lib
mkdir -p %buildroot/etc/wopi
mkdir -p %buildroot/etc/logrotate.d
mkdir -p %buildroot/usr/lib/systemd/system
mkdir -p %buildroot/var/log/wopi
install -m 755 src/wopiserver.py %buildroot/usr/bin/wopiserver.py
install -m 644 src/wopiutils.py %buildroot/%_python_lib/wopiutils.py
install -m 644 src/xrootiface.py %buildroot/%_python_lib/xrootiface.py
install -m 644 src/localiface.py %buildroot/%_python_lib/localiface.py
install -m 644 src/cs3iface.py %buildroot/%_python_lib/cs3iface.py
install -m 644 wopiserver.service %buildroot/usr/lib/systemd/system/wopiserver.service
install -m 644 wopiserver.conf %buildroot/etc/wopi/wopiserver.defaults.conf
install -m 644 wopiserver.logrotate %buildroot/etc/logrotate.d/cernbox-wopi-server
install -m 755 tools/wopicheckfile.py %buildroot/usr/bin/wopicheckfile.py
install -m 755 tools/wopilistopenfiles.sh %buildroot/usr/bin/wopilistopenfiles.sh
install -m 755 tools/wopiopen.py %buildroot/usr/bin/wopiopen.py
%clean
rm -rf %buildroot/
%preun
%post
touch /etc/wopi/wopisecret
touch /etc/wopi/iopsecret
%files
%defattr(-,root,root,-)
/etc/wopi
/etc/logrotate.d/cernbox-wopi-server
%attr(0755,cboxwopi,def-cg) /var/log/wopi
/usr/lib/systemd/system/wopiserver.service
/usr/bin/*
%_python_lib/*
%changelog
* Mon Nov 30 2020 Giuseppe Lo Presti <[email protected]> 5.7.0
- Log is now in JSON format as opposed to syslog-like
- Use direct data transfers (non-TUS-based) with CS3 storages
- Improved locks handling and responses
- Improved exception handling in /cbox/lock
* Mon Oct 19 2020 Giuseppe Lo Presti <[email protected]> 5.6.0
- Renamed codimdurl to wopibridgeurl
- Improved logging and exception handling
- Minor fix on PutFile
- Improved locking for non-office files
* Tue Sep 22 2020 Giuseppe Lo Presti <[email protected]> 5.5.0
- Moved to 3-digit releases to help drone-based automatic builds
- Minor fixes in cboxLock and CheckFileInfo
- Made logs group-writable for flume agents to push them to Kibana
* Thu Aug 27 2020 Giuseppe Lo Presti <[email protected]> 5.4
- Make CS3-based uploads work with tus and through gateway
- Fixed race condition in cboxLock
- Delay lock checks when needed (i.e. in WOPI LOCK), not
at access token creation time
* Tue Aug 4 2020 Giuseppe Lo Presti <[email protected]> 5.3
- Fixed CS3-based workflows: the wopiopen.py tool and the
open-file-in-app-provider reva command both support
generic storage ids and have been tested with Collabora
- Fixed wopiurl config parameter
* Thu Jul 2 2020 Giuseppe Lo Presti <[email protected]> 5.2
- Fixed xrootd encoding of file names with special chars
- Incorporated unit test suite in the docker images
* Fri Jun 26 2020 Giuseppe Lo Presti <[email protected]> 5.1
- Exposed a new /wopi/iop/open endpoint to match Reva. The
former /wopi/cbox/open endpoint is deprecated and will
be dropped once production moves forward.
- Added support for inodes invariant to save operations,
in order to properly support collaborative editing
* Fri Jun 5 2020 Giuseppe Lo Presti <[email protected]> 5.0
- General refactoring of the code base and evolution to become
fully vendor-neutral: see https://github.com/cs3org/wopiserver/pull/14
- Included a pure python-based docker image
- Ported to xrootd 4.12 and python 3.8
- Moved to the CS3 Organisation
* Thu May 14 2020 Giuseppe Lo Presti <[email protected]> 4.3
- Included some fixes around locking; this is hopefully the last release
before the ScienceMesh integration
* Wed Apr 08 2020 Giuseppe Lo Presti <[email protected]> 4.2
- Introduced two new lock-related endpoints to cover interoperability
with OnlyOffice
* Wed Apr 01 2020 Giuseppe Lo Presti <[email protected]> 4.1
- Improved WOPI lock handling
- Added detection of lock files created by Desktop apps
(Microsoft Office and LibreOffice) to prevent data losses
* Fri Mar 06 2020 Giuseppe Lo Presti <[email protected]> 4.0
- Major refactoring to introduce support of multiple storage access plugins:
currently supported xrootd (default) and local storage, a CS3APIs-compliant
access plugin is foreseen in an upcoming release.
- Added support for multiple office-like applications: currently supported
office apps are Microsoft Office Online and Collabora Online
- Included minor fixes in the core WOPI code
* Mon Jul 1 2019 Giuseppe Lo Presti <[email protected]> 3.1
- Fixed handling of strings/byte-arrays
- Packaging adapted to CentOS7 and pip3
* Tue Oct 9 2018 Giuseppe Lo Presti <[email protected]> 3.0
- Ported software to Python 3
- Removed experimental nginx configuration
* Mon Jul 2 2018 Giuseppe Lo Presti <[email protected]> 2.8
- Introduced support for multiple storage backends
* Thu Feb 15 2018 Giuseppe Lo Presti <[email protected]> 2.7
- Improved handling of newly created files, including working
around an issue with concurrent editing from Office Online
* Mon Jan 22 2018 Giuseppe Lo Presti <[email protected]> 2.6
- Port to xrootd 4.8 and its python bindings
- Docker and docker-compose files made available in the repo
* Thu Dec 7 2017 Giuseppe Lo Presti <[email protected]> 2.5
- Improved logging to get time statistics about xrootd remote calls
and consistently log the access token across all relevant log messages
- Included script to parse logs and send statistics to grafana
* Mon Aug 21 2017 Giuseppe Lo Presti <[email protected]> 2.0
- Incorporated contributions from AARNet, introduced many configurable items
- Improved docker image configuration for running behind a load balancer
- Included support for nginx as load balancer (this is still experimental
and not required for the functioning of the WOPI server)
- Improved logging for monitoring purposes, introduced script
to populate a grafana instance with relevant metrics
- Fixed WebDAV URL
* Fri May 19 2017 Giuseppe Lo Presti <[email protected]> 1.5
- Improved support for anonymous shares
- Added support for desktop access via WebDAV
- Fixed handling of expired WOPI locks
* Fri May 5 2017 Giuseppe Lo Presti <[email protected]> 1.4
- Disabled renaming and added work-around for looping locking requests
- Get list of currently opened files for operations purposes
- General refactoring of the code
* Fri Apr 7 2017 Giuseppe Lo Presti <[email protected]> 1.3
- Improved navigation and properties in Office Online
- Fixed lock handling to adhere to specifications (this is known
to break renaming in Word and PowerPoint)
* Wed Mar 22 2017 Giuseppe Lo Presti <[email protected]> 1.2
- Support creation of new documents
* Wed Mar 1 2017 Giuseppe Lo Presti <[email protected]> 1.1
- Improved lock handling to fully support concurrent editing
* Fri Feb 24 2017 Giuseppe Lo Presti <[email protected]> 1.0
- First official release for internal deployment after first round of tests
* Fri Feb 17 2017 Giuseppe Lo Presti <[email protected]> 0.4
- Support for https, download URL and minor fixes
- Release for pre-production tests
* Tue Feb 14 2017 Giuseppe Lo Presti <[email protected]> 0.3
- Implemented the locking interface
- Support the PutRelativeFile, RenameFile, DeleteFile operations
- Refined the /cbox API to interact with OwnCloud
* Wed Jan 18 2017 Giuseppe Lo Presti <[email protected]> 0.2
- First nearly complete version for test deployment with eosbackup
* Thu Jan 5 2017 Giuseppe Lo Presti <[email protected]> 0.1
- First packaging for the WOPI server prototype