xolo-admin 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/client/xolo +30 -3
- data/lib/xolo/admin/processing.rb +3 -0
- data/lib/xolo/admin/title.rb +4 -1
- data/lib/xolo/admin/version.rb +3 -1
- data/lib/xolo/core/base_classes/title.rb +9 -4
- data/lib/xolo/core/base_classes/version.rb +6 -1
- data/lib/xolo/core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8637742b96fa6e20b3d2d781f6c3e6d7c19cf0fbaa9bd4d39625cf9738f06845
|
|
4
|
+
data.tar.gz: af15092c906bd833441229bccc8d2944b99dbc035fc29a6ddcb3985979ab4f77
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d73169bf141bf0d98d2b05c586673e073d2d43785418bbfe57c34a4876637f1e6fca2e5b91f3739ec35d563bc4d254e57f58d6e61d629814ed5f47bfe750e2d9
|
|
7
|
+
data.tar.gz: a7edfa0ddc811772c3dc12c3621bdf200b01630f4c0605190ee8c07e4abbb7065bda17be11cf0dd3857dfb5b302a60641225a4cbd2397a5fbae0de1758f9dba4
|
data/data/client/xolo
CHANGED
|
@@ -54,9 +54,15 @@ JAMF='/usr/local/bin/jamf'
|
|
|
54
54
|
# The path to the client data json file
|
|
55
55
|
CLIENT_DATA_JSON_FILE="/Library/Application Support/xolo/client-data.json"
|
|
56
56
|
|
|
57
|
+
# The path to the test client data json file, from a text xolo server
|
|
58
|
+
TEST_CLIENT_DATA_JSON_FILE="/Library/Application Support/xolo/test-client-data.json"
|
|
59
|
+
|
|
57
60
|
# The jamf policy trigger to update the client data
|
|
58
61
|
UPDATE_CLIENT_DATA_TRIGGER='update-xolo-client-data'
|
|
59
62
|
|
|
63
|
+
# The jamf policy trigger to update the test client data
|
|
64
|
+
TEST_UPDATE_CLIENT_DATA_TRIGGER='test-update-xolo-client-data'
|
|
65
|
+
|
|
60
66
|
# In the CLI args, titles and versions are separated by the first
|
|
61
67
|
# occurrence of the equals sign
|
|
62
68
|
TITLE_VERSION_SEPARATOR='='
|
|
@@ -141,6 +147,10 @@ Options:
|
|
|
141
147
|
-v, --verbose: Enable verbose mode, extra information will be printed.
|
|
142
148
|
-d, --debug: Enable debug mode, extra debug information will be printed.
|
|
143
149
|
Implies --verbose.
|
|
150
|
+
-t, --test If your site has a "test" xolo server running via the same
|
|
151
|
+
Jamf Pro server, this causes 'xolo' to only see data, titles,
|
|
152
|
+
policies, etc, from test xolo server, not the production server.
|
|
153
|
+
Setting the XOLO_TEST_MODE env. variable does the same thing.
|
|
144
154
|
-r, --recon: With 'install' or 'uninstall' run a 'jamf recon' after the
|
|
145
155
|
operation completes successfully.
|
|
146
156
|
-n, --no-versions: With the 'list-titles' and 'list-installed' commands,
|
|
@@ -221,6 +231,7 @@ function parse_cli() {
|
|
|
221
231
|
{h,H,-help}=show_help \
|
|
222
232
|
{v,-verbose}=be_verbose \
|
|
223
233
|
{d,-debug}=debugging_on \
|
|
234
|
+
{t,-test}=test_mode \
|
|
224
235
|
{n,-no-versions}=no_versions \
|
|
225
236
|
{r,-recon}=do_recon \
|
|
226
237
|
{V,-version}=show_xolo_version || \
|
|
@@ -230,10 +241,14 @@ function parse_cli() {
|
|
|
230
241
|
show_help=$show_help[-1]
|
|
231
242
|
be_verbose=$be_verbose[-1]
|
|
232
243
|
debugging_on=$debugging_on[-1]
|
|
244
|
+
test_mode=$test_mode[-1]
|
|
233
245
|
no_versions=$no_versions[-1]
|
|
234
246
|
do_recon=$do_recon[-1]
|
|
235
247
|
show_xolo_version=$show_xolo_version[-1]
|
|
236
248
|
|
|
249
|
+
# test mode can be triggered by an env var
|
|
250
|
+
[[ -n "$XOLO_TEST_MODE" ]] && test_mode=1
|
|
251
|
+
|
|
237
252
|
# if debugging is on, verbose is also on
|
|
238
253
|
[[ -n $debugging_on ]] && be_verbose=1
|
|
239
254
|
|
|
@@ -246,6 +261,8 @@ function parse_cli() {
|
|
|
246
261
|
debug "..show_help is: $show_help"
|
|
247
262
|
debug "..be_verbose is: $be_verbose"
|
|
248
263
|
debug "..debugging_on is: $debugging_on"
|
|
264
|
+
debug "..test_mode is: $test_mode"
|
|
265
|
+
[[ -n "$XOLO_TEST_MODE" ]] && debug " ..via XOLO_TEST_MODE env."
|
|
249
266
|
debug "..no_versions is: $no_versions"
|
|
250
267
|
debug "..show_xolo_version is: $show_xolo_version"
|
|
251
268
|
|
|
@@ -381,7 +398,7 @@ app.includeStandardAdditions = true;
|
|
|
381
398
|
|
|
382
399
|
// run() is automatically executed when the program is called, and will print any output returned.
|
|
383
400
|
function run() {
|
|
384
|
-
var parsed_data = JSON.parse(app.read("${
|
|
401
|
+
var parsed_data = JSON.parse(app.read("${client_data_json_file}"));
|
|
385
402
|
var result;
|
|
386
403
|
|
|
387
404
|
// the line below will sub-in whatever code we were passed
|
|
@@ -761,7 +778,7 @@ function refresh_client_data() {
|
|
|
761
778
|
|
|
762
779
|
[[ "$command" == 'refresh' ]] && say "Refreshing client data..." || debug "Refreshing client data..."
|
|
763
780
|
|
|
764
|
-
run_jamf_policy_trigger $
|
|
781
|
+
run_jamf_policy_trigger "$update_client_data_trigger"
|
|
765
782
|
|
|
766
783
|
client_data_refreshed=1
|
|
767
784
|
}
|
|
@@ -1156,6 +1173,10 @@ function expire() {
|
|
|
1156
1173
|
###############################
|
|
1157
1174
|
|
|
1158
1175
|
function main() {
|
|
1176
|
+
# defaults
|
|
1177
|
+
client_data_json_file="$CLIENT_DATA_JSON_FILE"
|
|
1178
|
+
update_client_data_trigger="$UPDATE_CLIENT_DATA_TRIGGER"
|
|
1179
|
+
|
|
1159
1180
|
# Parse the command line
|
|
1160
1181
|
parse_cli "$@"
|
|
1161
1182
|
|
|
@@ -1171,10 +1192,16 @@ function main() {
|
|
|
1171
1192
|
exit 0
|
|
1172
1193
|
fi
|
|
1173
1194
|
|
|
1195
|
+
# use the test data file if in test mode
|
|
1196
|
+
if [[ -n "$test_mode" ]] ; then
|
|
1197
|
+
client_data_json_file="$TEST_CLIENT_DATA_JSON_FILE"
|
|
1198
|
+
update_client_data_trigger="$TEST_UPDATE_CLIENT_DATA_TRIGGER"
|
|
1199
|
+
fi
|
|
1200
|
+
|
|
1174
1201
|
if [[ "$command" != "refresh" ]] ; then
|
|
1175
1202
|
# If we're not refreshing, we need to have the client data file
|
|
1176
1203
|
# and it needs to be up to date
|
|
1177
|
-
[[ -f "$
|
|
1204
|
+
[[ -f "$client_data_json_file" ]] || die "No client data file found at $client_data_json_file.\nPlease run the 'refresh' command to update the client data."
|
|
1178
1205
|
fi
|
|
1179
1206
|
|
|
1180
1207
|
[[ -z "$command" ]] && die "No command given.\nUsage: $USAGE\nUse --help for more information."
|
|
@@ -750,6 +750,9 @@ module Xolo
|
|
|
750
750
|
# description is handled specially below
|
|
751
751
|
next if attr == :description
|
|
752
752
|
|
|
753
|
+
# only show patch_source and title_id if subscribed
|
|
754
|
+
next if %i[patch_source title_id].include?(attr) && !title.subscribed?
|
|
755
|
+
|
|
753
756
|
value = title.send attr
|
|
754
757
|
value = value.join(Xolo::COMMA_JOIN) if value.is_a? Array
|
|
755
758
|
puts "- #{deets[:label]}: #{value}".pix_word_wrap
|
data/lib/xolo/admin/title.rb
CHANGED
|
@@ -169,7 +169,10 @@ module Xolo
|
|
|
169
169
|
# @return [Hash] the response body from the server
|
|
170
170
|
####################
|
|
171
171
|
def release(cnx = self.cnx, version:)
|
|
172
|
-
resp = cnx.patch "#{SERVER_ROUTE}/#{title}/release/#{version}", {}
|
|
172
|
+
resp = cnx.patch "#{SERVER_ROUTE}/#{title}/release/#{URI::Parser.new.escape version}", {}
|
|
173
|
+
### the CGI escape one doesn't seem to work with, e.g. "7.1.5 (84650)"
|
|
174
|
+
# resp = cnx.patch "#{SERVER_ROUTE}/#{title}/release/#{CGI.escape version}", {}
|
|
175
|
+
|
|
173
176
|
resp.body
|
|
174
177
|
end
|
|
175
178
|
|
data/lib/xolo/admin/version.rb
CHANGED
|
@@ -50,7 +50,9 @@ module Xolo
|
|
|
50
50
|
####################
|
|
51
51
|
def self.server_route(title, version = nil)
|
|
52
52
|
route = SERVER_ROUTE.sub(Xolo::Admin::Title::TARGET_TITLE_PLACEHOLDER, title)
|
|
53
|
-
route << "/#{version}" if version
|
|
53
|
+
route << "/#{URI::Parser.new.escape(version)}" if version
|
|
54
|
+
### the CGI escape one doesn't seem to work with, e.g. "7.1.5 (84650)"
|
|
55
|
+
# route << "/#{CGI.escape(version)}" if version
|
|
54
56
|
route
|
|
55
57
|
end
|
|
56
58
|
|
|
@@ -474,6 +474,8 @@ module Xolo
|
|
|
474
474
|
desc: <<~ENDDESC
|
|
475
475
|
One or more Jamf Computer Groups whose members will automatically have new versions installed or updated for testing before it is released.
|
|
476
476
|
|
|
477
|
+
These groups affect both the initial installation of and updates to a title when a version is added, before it is released.
|
|
478
|
+
|
|
477
479
|
These computers will be used for testing not just the software, but the installation process itself. Exclusions win, so computers that are also in an excluded group for the title will not be used as pilots.
|
|
478
480
|
|
|
479
481
|
Pilot groups can also be defined per version, in which case these will be ignored. Defining them in the title is useful for subscribed titles, where new versions are created automatically.
|
|
@@ -505,7 +507,9 @@ module Xolo
|
|
|
505
507
|
readline: :jamf_computer_group_names,
|
|
506
508
|
invalid_msg: 'Invalid release group(s). Must exist in Jamf and not be excluded.',
|
|
507
509
|
desc: <<~ENDDESC
|
|
508
|
-
One or more Jamf Computer Groups whose members will automatically have this title installed
|
|
510
|
+
One or more Jamf Computer Groups whose members will automatically have this title installed.
|
|
511
|
+
|
|
512
|
+
These groups affect the _initial_ installation of a title when a version is released. Any Mac with the title installed, will get updates (if not excluded) regardless of the release-groups.
|
|
509
513
|
|
|
510
514
|
If your Xolo administrators allow it, you can use '#{Xolo::TARGET_ALL}' to auto-install on all computers that aren't excluded. If not, you'll be told how to request setting release groups to '#{Xolo::TARGET_ALL}'.
|
|
511
515
|
|
|
@@ -534,7 +538,7 @@ module Xolo
|
|
|
534
538
|
desc: <<~ENDDESC
|
|
535
539
|
One or more Jamf Computer Groups whose members are not allowed to install this title.
|
|
536
540
|
|
|
537
|
-
When a computer is in one of these groups, the title is not available even if the computer is in a pilot or release group.
|
|
541
|
+
When a computer is in one of these groups, the title is not available at all, for installation or updates, even if the computer is in a pilot or release group.
|
|
538
542
|
|
|
539
543
|
When using the --excluded-groups CLI option, you can specify more than one group by using the option more than once, or by providing a single option value with the groups separated by commas.
|
|
540
544
|
|
|
@@ -663,6 +667,7 @@ module Xolo
|
|
|
663
667
|
It will never be available to excluded computers.
|
|
664
668
|
|
|
665
669
|
Self Service is not available for titles with the release_group 'all'.
|
|
670
|
+
To remove the self-service option, use --no-self-service.
|
|
666
671
|
ENDDESC
|
|
667
672
|
},
|
|
668
673
|
|
|
@@ -799,7 +804,7 @@ module Xolo
|
|
|
799
804
|
# @!attribute ted_id_number
|
|
800
805
|
# @return [Integer] The Windoo::SoftwareTitle#softwareTitleId
|
|
801
806
|
ted_id_number: {
|
|
802
|
-
label: 'Title Editor ID
|
|
807
|
+
label: 'Title Editor ID',
|
|
803
808
|
type: :integer,
|
|
804
809
|
cli: false,
|
|
805
810
|
changelog: false,
|
|
@@ -812,7 +817,7 @@ module Xolo
|
|
|
812
817
|
# @!attribute jamf_patch_title_id
|
|
813
818
|
# @return [Integer] The Windoo::SoftwareTitle#softwareTitleId
|
|
814
819
|
jamf_patch_title_id: {
|
|
815
|
-
label: '
|
|
820
|
+
label: 'Jamf Patch Title ID',
|
|
816
821
|
type: :integer,
|
|
817
822
|
cli: false,
|
|
818
823
|
changelog: false,
|
|
@@ -170,6 +170,7 @@ module Xolo
|
|
|
170
170
|
changelog: true,
|
|
171
171
|
desc: <<~ENDDESC
|
|
172
172
|
The installation of this version requires the computer to reboot. Users will be notified before installation.
|
|
173
|
+
To remove the reboot option, use --no-reboot.
|
|
173
174
|
ENDDESC
|
|
174
175
|
},
|
|
175
176
|
|
|
@@ -186,6 +187,7 @@ module Xolo
|
|
|
186
187
|
changelog: true,
|
|
187
188
|
desc: <<~ENDDESC
|
|
188
189
|
The installer for this version is a full installer, not an incremental patch that must be installed on top of an earlier version.
|
|
190
|
+
To remove the standalone option, use --no-standalone.
|
|
189
191
|
ENDDESC
|
|
190
192
|
},
|
|
191
193
|
|
|
@@ -217,6 +219,7 @@ module Xolo
|
|
|
217
219
|
use them as a killapp by specifying '#{USE_TITLE_FOR_KILLAPP}'
|
|
218
220
|
|
|
219
221
|
If not using --walkthru you can use --killapps multiple times
|
|
222
|
+
To remove all killapps, use '#{Xolo::NONE}'.
|
|
220
223
|
ENDDESC
|
|
221
224
|
},
|
|
222
225
|
|
|
@@ -237,6 +240,8 @@ module Xolo
|
|
|
237
240
|
This can cause problems if that unknown version is actually newer than this version, e.g. a beta or pre-release version, or when the app has a 'self-update' mechanism that installs newer versions outside of Jamf Patch before it is aware of them.
|
|
238
241
|
|
|
239
242
|
But sometimes it may be desirable to have all unknown versions updated to this version, e.g. when the title is a helper app that is not regularly updated, or when the title is being newly managed by Xolo/Jamf Patch and you want to get all existing installations onto this version.
|
|
243
|
+
|
|
244
|
+
To remove the patch-unknown option, use --no-patch-unknown.
|
|
240
245
|
ENDDESC
|
|
241
246
|
},
|
|
242
247
|
|
|
@@ -262,7 +267,7 @@ module Xolo
|
|
|
262
267
|
|
|
263
268
|
When using the --pilot-groups CLI option, you can specify more than one group by using the option more than once, or by providing a single option value with the groups separated by commas.
|
|
264
269
|
|
|
265
|
-
When adding a new version, the pilot groups from the previous version will be inherited if you don't specify any. To make the
|
|
270
|
+
When adding a new version, the pilot groups from the previous version will be inherited if you don't specify any. To make the version have no pilot groups use '#{Xolo::NONE}'.
|
|
266
271
|
|
|
267
272
|
NOTE: Any non-excluded computer can be used for piloting at any time by manually installing the yet-to-be-released version using `sudo xolo install <title> <version>`. The members of the pilot groups are just the ones that will have it auto-installed.
|
|
268
273
|
ENDDESC
|
data/lib/xolo/core/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xolo-admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Lasell
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|