-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfnal-snow-python.spec
138 lines (109 loc) · 4.93 KB
/
fnal-snow-python.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
Name: fnal-snow-python
Summary: Python Scripts and libraries to interact with Service Now @ FNAL
Version: 1.4.5
Release: 0%{?dist}
Group: Applications/System
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{version}-%{release}.tar.gz
BuildArch: noarch
%if 0%{?rhel} == 8
Requires: python3 python3-requests python3-PyYAML
# also pysnow and iso8601, no rpm available for that yet
BuildRequires: python3 python3-setuptools python3-rpm-macros rsync perl-podlators
%else
Requires: python36 python36-iso8601 python36-requests python36-PyYAML
# also pysnow, no rpm available for that yet
BuildRequires: python36 python36-setuptools python3-rpm-macros rsync perl-podlators
%endif
Vendor: ECF-SSI
License: Artistic 2.0
URL: http://www.fnal.gov/
%description
Installs scripts and tools that provide an interface to the Fermi Service
Now interface via the JSON API.
%prep
%setup -c -q -n %{name}-%{version}-%{release}
%build
%install
if [[ $RPM_BUILD_ROOT != "/" ]]; then
rm -rf $RPM_BUILD_ROOT
fi
mkdir -p ${RPM_BUILD_ROOT}/usr/share/man/man1
for i in `ls usr/bin`; do
pod2man --section 1 --center="System Commands" usr/bin/${i} \
> ${RPM_BUILD_ROOT}/usr/share/man/man1/${i}.1 ;
done
rsync -Crlpt ./usr ${RPM_BUILD_ROOT}
python3 setup.py install --prefix=${RPM_BUILD_ROOT}/usr \
--single-version-externally-managed --record=installed_files
rm -rf ${RPM_BUILD_ROOT}/usr/bin/.mypy_cache
%clean
# Adding empty clean section per rpmlint. In this particular case, there is
# nothing to clean up as there is no build process
%files
%defattr(-,root,root)
/usr/bin/*
/usr/share/man/man1/*
%{python3_sitelib}/pyfnalsnow/*.py*
%{python3_sitelib}/pyfnalsnow/__pycache__/*.pyc
%{python3_sitelib}/*egg-info
%changelog
* Mon Dec 6 2021 Tim Skirvin <[email protected]> 1.4.4-0
- ticket.py - fixed journal timestamps, now includes timezone in ticket
printing (and that timezone is converted from UTC)
* Tue Jul 6 2021 Tim Skirvin <[email protected]> 1.4.3-0
- ticket.py, Incident.py - recognizing 'Cancelled' tickets when printing
resolutions, and doing a better job of recognizing when tickets are
actually resolved in the first place
* Tue Dec 1 2020 Tim Skirvin <[email protected]> 1.4.2-0
- Incident.py + snow-incident-list - can now search by age (number of days
since the ticket was created)
* Mon Nov 16 2020 Tim Skirvin <[email protected]> 1.4.1-0
- RITM.py - tktIsResolved() now says "False" for work-in-progress tickets
- various Exceptions fixed
* Mon Apr 20 2020 Tim Skirvin <[email protected]> 1.4.0-0
- updated to work with new SNOW (where it's not at service-now.com anymore)
- bug fixes
* Thu Nov 14 2019 Tim Skirvin <[email protected]> 1.3.2-0
- fixes to make requestor work better with user guest, and to handle
errors a bit more gracefully
* Mon Aug 19 2019 Tim Skirvin <[email protected]> 1.3.1-0
- RITM.py - tktPending() 'unresolved' search now includes pending
* Mon Aug 19 2019 Tim Skirvin <[email protected]> 1.3.0-0
- python 3
- ran through the flake8 python linter, cleaned up to match
* Wed Mar 20 2019 Tim Skirvin <[email protected]> 1.2.3-0
- moving the changelog to CHANGELOG.md going forwards
- generally re-working for distribution via pypi
* Wed Dec 05 2018 Tim Skirvin <[email protected]> 1.2.2-0
- snow-tkt-resolve - adds a 'goal' state so that we can cancel incidents
instead of just resolving them
- Incident.py - changes to match
* Wed Nov 21 2018 Tim Skirvin <[email protected]> 1.2.1-0
- add 'caller' search to snow-incident-list
- snow-incident-list format changes - includes CI if available, some tweaking
- add 'ciById' and 'ciByName' to __init__.py
- Incident.py knows how to deal with CIs and caller searches
* Wed Oct 03 2018 Tim Skirvin <[email protected]> 1.2.0-0
- wrote snow-tkt-pending and interfaces for RITM
- snow-ritm-resolve was merged into snow-tkt-resolve
- tested and confirmed that 'resolve' works for Incident + RITM
(also, test suite)
- snow-incident-create
- fixed Incident reporting for resolutions
- many miscellaneous bug fixes
* Tue Oct 02 2018 Tim Skirvin <[email protected]> 1.1.1-0
- adding 'snow-tkt-resolve' and interfaces for Incident + RITM
- various bug fixes
* Mon Apr 30 2018 Tim Skirvin <[email protected]> 1.1.0-0
- now uses pysnow 0.7.4
* Wed Feb 07 2018 Tim Skirvin <[email protected]> 1.0.2-0
- snow-ritm-create - don't add extra newlines to the body of the ritms
* Mon Feb 13 2017 Tim Skirvin <[email protected]> 1.0.1-0
- snow-ritm-create - now uses a config file template for new entries; adds
support for urgency, priority, and basic categorization
- __init__.py - better support for "empty" journal entries
- ticket.py - _FieldOrEmpty(tkt) for internal use, should make it easier
to deal with unknown field values
* Fri Feb 10 2017 Tim Skirvin <[email protected]> 1.0.0-0
- initial release, still missing resolve/reopen and incident-create