Skip to content

Commit f7d5173

Browse files
dbutenhofriya-17
authored andcommitted
Streamline server RPM spec file (distributed-system-analysis#2124)
Although the Agent spec file efficiently references directories to be packaged hierarchically, the Server spec file has a full list of the individual packaged files. This is unnecessarily awkward to maintain, and error prone. The challenge here was some experimentation (the documentation is terrible) to figure out the order of precedence across the %attr and %defattr with directories and contained individual files. I added some comments in the spec file to clarify.
1 parent 8e25623 commit f7d5173

File tree

1 file changed

+8
-87
lines changed

1 file changed

+8
-87
lines changed

server/rpm/pbench-server.spec.j2

Lines changed: 8 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -101,101 +101,22 @@ fi
101101
%posttrans
102102

103103
%files
104+
104105
%defattr(644, pbench, pbench, 755)
105106
/%{installdir}/VERSION
106107
/%{installdir}/SEQNO
107108
/%{installdir}/SHA1
108-
/%{installdir}/%{static}/VERSION
109109
/%{installdir}/package.json
110110
/%{installdir}/requirements.txt
111111

112-
/%{installdir}/lib/config/pbench-server-satellite.cfg.example
113-
/%{installdir}/lib/config/pbench-server.cfg.example
114-
/%{installdir}/lib/config/pbench-server-default.cfg
115-
116-
/%{installdir}/lib/crontab
117-
/%{installdir}/lib/mappings
118-
/%{installdir}/lib/settings
119-
120-
/%{installdir}/lib/pbench/common/configtools.py
121-
/%{installdir}/lib/pbench/common/__init__.py
122-
/%{installdir}/lib/pbench/common/conf.py
123-
/%{installdir}/lib/pbench/common/constants.py
124-
/%{installdir}/lib/pbench/common/exceptions.py
125-
/%{installdir}/lib/pbench/common/logger.py
126-
/%{installdir}/lib/pbench/common/utils.py
127-
/%{installdir}/lib/pbench/__init__.py
128-
/%{installdir}/lib/pbench/server/__init__.py
129-
/%{installdir}/lib/pbench/server/indexer.py
130-
/%{installdir}/lib/pbench/server/report.py
131-
/%{installdir}/lib/pbench/server/mock.py
132-
/%{installdir}/lib/pbench/server/utils.py
133-
/%{installdir}/lib/pbench/server/api/__init__.py
134-
/%{installdir}/lib/pbench/server/api/resources/graphql_api.py
135-
/%{installdir}/lib/pbench/server/api/resources/upload_api.py
136-
/%{installdir}/lib/pbench/server/api/resources/query_apis/__init__.py
137-
/%{installdir}/lib/pbench/server/api/resources/query_apis/elasticsearch_api.py
138-
/%{installdir}/lib/pbench/server/api/resources/query_apis/query_controllers.py
139-
/%{installdir}/lib/pbench/server/s3backup/__init__.py
140-
/%{installdir}/lib/pbench/cli/__init__.py
141-
/%{installdir}/lib/pbench/cli/getconf.py
142-
/%{installdir}/lib/pbench/cli/server/shell.py
143-
144-
/%{installdir}/bin/pbench-base.sh
145-
146-
%defattr(755, pbench, pbench, 755)
147-
/%{installdir}/bin/pbench-config
148-
/%{installdir}/bin/pbench-server
149-
/%{installdir}/bin/pbench-server-activate-create-crontab
150-
/%{installdir}/bin/pbench-server-prep-shim-002
151-
/%{installdir}/bin/pbench-audit-server
152-
/%{installdir}/bin/pbench-backup-tarballs
153-
/%{installdir}/bin/pbench-verify-backup-tarballs
154-
/%{installdir}/bin/pbench-clean-up-dangling-results-links
155-
/%{installdir}/bin/pbench-copy-sosreports
156-
/%{installdir}/bin/pbench-index
157-
/%{installdir}/bin/pbench-reindex
158-
/%{installdir}/bin/pbench-unpack-tarballs
159-
/%{installdir}/bin/pbench-satellite-cleanup
160-
/%{installdir}/bin/pbench-satellite-state-change
161-
/%{installdir}/bin/pbench-remote-satellite-state-change
162-
/%{installdir}/bin/pbench-remote-sync-package-tarballs
163-
/%{installdir}/bin/pbench-dispatch
164-
/%{installdir}/bin/pbench-report-status
165-
/%{installdir}/bin/pbench-pp-status
166-
/%{installdir}/bin/pbench-sync-package-tarballs
167-
/%{installdir}/bin/pbench-sync-satellite
168-
/%{installdir}/bin/pbench-server-set-result-state
169-
/%{installdir}/bin/pbench-audit-server.sh
170-
/%{installdir}/bin/pbench-backup-tarballs.py
171-
/%{installdir}/bin/pbench-base.py
172-
/%{installdir}/bin/pbench-clean-up-dangling-results-links.sh
173-
/%{installdir}/bin/pbench-copy-sosreports.sh
174-
/%{installdir}/bin/pbench-dispatch.sh
175-
/%{installdir}/bin/pbench-index.py
176-
/%{installdir}/bin/pbench-reindex.py
177-
/%{installdir}/bin/pbench-report-status.py
178-
/%{installdir}/bin/pbench-satellite-cleanup.sh
179-
/%{installdir}/bin/pbench-satellite-state-change.py
180-
/%{installdir}/bin/pbench-server-prep-shim-002.py
181-
/%{installdir}/bin/pbench-sync-package-tarballs.sh
182-
/%{installdir}/bin/pbench-sync-satellite.sh
183-
/%{installdir}/bin/pbench-trampoline
184-
/%{installdir}/bin/pbench-unpack-tarballs.sh
185-
/%{installdir}/bin/pbench-verify-backup-tarballs.py
186-
/%{installdir}/bin/pbench-check-tb-age
187-
/%{installdir}/bin/pbench-check-tb-age.py
188-
/%{installdir}/bin/pbench-cull-unpacked-tarballs
189-
/%{installdir}/bin/pbench-cull-unpacked-tarballs.py
190-
191-
/%{installdir}/lib/systemd/pbench-server.service
112+
# pbench-base.sh %attr overrides previous /bin %attr
113+
%attr(755, pbench, pbench) /%{installdir}/bin
114+
%attr(644, pbench, pbench) /%{installdir}/bin/pbench-base.sh
192115

193-
%defattr(644, pbench, pbench, 755)
194-
/%{installdir}/%{static}/css/v0.2/pbench_utils.css
195-
/%{installdir}/%{static}/js/v0.2/pbench_utils.js
196-
/%{installdir}/%{static}/js/v0.2/app.js
197-
/%{installdir}/%{static}/css/v0.3/jschart.css
198-
/%{installdir}/%{static}/js/v0.3/jschart.js
116+
# service script %attr overrides %defattr on later /lib
117+
%attr(755, pbench, pbench) /%{installdir}/lib/systemd/pbench-server.service
118+
/%{installdir}/lib
119+
/%{installdir}/%{static}
199120

200121
%doc
201122
/%{installdir}/lib/pbench/server/s3backup/README

0 commit comments

Comments
 (0)