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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
#!/usr/bin/env perl
use 5.16.0;
use strict;
use warnings FATAL => 'all';
use Test::More;
use Capture::Tiny qw/ capture_merged /;
use FindBin '$RealBin';
use lib $RealBin;
use Test::Sbotools qw/ make_slackbuilds_txt sbocheck sboclean sboconfig sbofind sboinstall sboremove sbosnap sboupgrade /;
plan tests => 14;
make_slackbuilds_txt();
# 1-8: test -h output of sbo* scripts
## sbocheck
sbocheck '-h', { expected => <<'SBOCHECK' };
Usage: sbocheck
Options:
-h|--help:
this screen.
-v|--version:
version information.
SBOCHECK
## sboclean
sboclean '-h', { expected => <<'SBOCLEAN' };
Usage: sboclean (options) [package]
Options:
-h|--help:
this screen.
-v|--version:
version information.
-d|--dist:
clean distfiles.
-w|--work:
clean working directories.
-i|--interactive:
be interactive.
SBOCLEAN
## sboconfig
my $sboconfig = <<'SBOCONFIG';
Usage: sboconfig [options] [arguments]
Options:
-h|--help:
this screen.
-v|--version:
version information.
-l|--list:
show current options.
Config options (defaults shown):
-c|--clean FALSE:
NOCLEAN: if TRUE, do NOT clean up after building by default.
-d|--distclean FALSE:
DISTCLEAN: if TRUE, DO clean distfiles by default after building.
-f|--fallback-archive ftp://slackware.uk/sbosrcarch:
FALLBACK_ARCHIVE: Fallback URL to download package source's. FALSE to disable.
-j|--jobs FALSE:
JOBS: numeric -j setting to feed to make for multicore systems.
-g|--gpg-key D3076BC3E783EE747F09B8B70368EF579C7BA3B6:
GPG_KEY GPG key ID for verification.
-p|--pkg-dir FALSE:
PKG_DIR: set a directory to store packages in.
-s|--sbo-home /usr/sbo:
SBO_HOME: set the SBo directory.
-o|--local-overrides FALSE:
LOCAL_OVERRIDES: a directory containing local overrides.
-V|--slackware-version FALSE:
SLACKWARE_VERSION: use the SBo repository for this version.
-r|--repo FALSE:
REPO: use a repository other than SBo.
SBOCONFIG
sboconfig '-h', { expected => $sboconfig };
sboconfig { expected => $sboconfig };
## sbofind
my $sbofind = <<'SBOFIND';
Usage: sbofind (search_term)
Options:
-h|--help:
this screen.
-v|--verison:
version information.
-e|--exact:
only exact matching.
-t|--no-tags:
exclude tags from search.
-i|--info:
show the .info for each found item.
-r|--readme:
show the README for each found item.
-q|--queue:
show the build queue for each found item.
Example:
sbofind libsexy
SBOFIND
sbofind '-h', { expected => $sbofind };
sbofind { expected => $sbofind, exit => 1 };
## sboinstall
my $sboinstall = <<'SBOINSTALL';
Usage: sboinstall [options] sbo
sboinstall --use-template file
Options (defaults shown first where applicable):
-h|--help:
this screen.
-v|--version:
version information.
-c|--noclean (FALSE|TRUE):
set whether or not to clean working files/directories after the build.
-d|--distclean (TRUE|FALSE):
set whether or not to clean distfiles afterward.
-i|--noinstall:
do not run installpkg at the end of the build process.
-j|--jobs (FALSE|#):
specify "-j" setting to make, for multicore systems; overrides conf file.
-p|--compat32:
install an SBo as a -compat32 pkg on a multilib x86_64 system.
-r|--nointeractive:
non-interactive; skips README and all prompts.
-R|--norequirements:
view the README but do not parse requirements, commands, or options.
--reinstall:
Ask to reinstall any already-installed packages in the requirement list.
--create-template (FILE):
create a template with specified requirements, commands, and options.
--use-template (FILE):
use a template created by --create-template to install requirements with
specified commands and options. This also enables the --nointeractive flag.
SBOINSTALL
sboinstall '-h', { expected => $sboinstall };
sboinstall { expected => $sboinstall, exit => 1 };
## sboremove
my $sboremove = <<'SBOREMOVE';
Usage: sboremove [options] sbo
Options (defaults shown first where applicable):
-h|--help:
this screen.
-v|--version:
version information.
-a|--alwaysask:
always ask to remove, even if required by other packages on system.
Note: optional dependencies need to be removed separately.
SBOREMOVE
sboremove '-h', { expected => $sboremove };
sboremove { expected => $sboremove, exit => 1 };
## sbosnap
my $sbosnap = <<'SBOSNAP';
Usage: sbosnap [options|command]
Options:
-h|--help:
this screen.
-v|--version:
version information.
Commands:
fetch: initialize a local copy of the slackbuilds.org tree.
import-key [path or url]: import GPG for verifying the slackbuilds.org tree. Defaults to the key shipped with sbotools2.
update: update an existing local copy of the slackbuilds.org tree.
(generally, you may prefer "sbocheck" over "sbosnap update")
SBOSNAP
sbosnap '-h', { expected => $sbosnap };
sbosnap { expected => $sbosnap, exit => 1 };
## sboupgrade
my $sboupgrade = <<'SBOUPGRADE';
Usage: sboupgrade (options) [package]
Options (defaults shown first where applicable):
-h|--help:
this screen.
-v|--version:
version information.
-c|--noclean (FALSE|TRUE):
set whether or not to clean working directories after building.
-d|--distclean (TRUE|FALSE):
set whether or not to clean distfiles afterward.
-f|--force:
force an update, even if the "upgrade" version is the same or lower.
-i|--noinstall:
do not run installpkg at the end of the build process.
-j|--jobs (FALSE|#):
specify "-j" setting to make, for multicore systems; overrides conf file.
-r|--nointeractive:
non-interactive; skips README and all prompts.
-z|--force-reqs:
when used with -f, will force rebuilding an SBo's requirements as well.
--all
this flag will upgrade everything reported by sbocheck(1).
SBOUPGRADE
sboupgrade '-h', { expected => $sboupgrade };
sboupgrade { expected => $sboupgrade, exit => 1 };
|