forked from KeithDHedger/LFSPkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lfspkg.1
421 lines (362 loc) · 9.11 KB
/
lfspkg.1
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
.TH "LFSPkg" "1" "0.4.23" "K.D.Hedger" ""
.SH "NAME"
\fBlfspkg\fR - A package manager for Linux From Scratch
.br
.SH "SYNOPSIS"
\fBlfspkg\fR [\fIOPTION]... [FILE]...\fR
.br
.SH "DESCRIPTION"
This is a package manager inspired by slackware's slackpkg for the linux from scratch system.
.br
This app will build, install,remove and update packages and also allow you to search for a particular file within installed packages, find an installed package and create a template file to build and install/upgrade a package.
.br
The dialog application is required.
.br
This is a source based package manager and dependencies can be checked for and built as long as a build script is available.
.br
.SH "OPTIONS"
\fB-c, --commit\fR
.br
Make and Install package.
.br
\fB-i, --install\fR \fI[FILE]\fR
.br
Install package \fI[FILE]\fR.
.br
\fB-m, --make\fR
.br
Make a package.
.br
\fB-u, --upgrade\fR \fI[PACKAGENAME]\fR \fI[/PATH/TO/NEW/PACKAGE]\fR
.br
Upgrade a package.
.br
\fB-r, --remove\fR \fI[FILE]\fR \fI[FILE]\fR ... \fI[FILE]\fR
.br
Remove a package.
.br
\fB-t, --template\fR \fI[ARG]\fR \fB[URL]\fR
.br
Create LFSBuild template for source tarball \fI[URL]\fR.
.br
ARG can be any one of configure, cmake, meson, perl, python, python2 or python3.
.br
Python will build for BOTH python 2 and 3.
.br
\fB-l, --list\fR \fI[PACKAGE]\fR
.br
List installed files from a package \fI[PACKAGE]\fR.
.br
\fB-f, --find\fR \fI[FILE]\fR
.br
Find installed file.
.br
\fB-L, --less\fR
.br
Pipe output from list/find to less.
.br
\fB-M, --remake\fR \fI[PACKAGE]\fR
.br
Re-constitute an installed package \fI[PACKAGE]\fR.
.br
\fB-B, --builddeps\fR \fI[DEPENDENCY LIST]\fR
.br
Build all dependant packages in \fI[DEPENDENCY LIST]\fR.
.br
\fB-F, --finddepends\fR \fI[DEPENDENCY LIST]\fR
.br
Find dependencies and build scripts \fI[DEPENDENCY LIST]\fR.
.br
\fB-j, --justlist\fR
.br
Just output list if query results in multiple packages.
.br
\fB-a, --preinstall\fR \fI[PACKAGE]\fR
.br
Re-run the preinstall script for \fI[PACKAGE]\fR.
.br
\fB-A, --postinstall\fR \fI[PACKAGE]\fR
.br
Re-run the postinstall script for \fI[PACKAGE]\fR.
.br
\fB-I, --info\fR \fI[PACKAGE]\fR
.br
Try to make info file from lfs/blfs website.
.br
\fB-D, --pkginfo\fR \fI[PACKAGE]\fR
.br
Print info for installed package \fI[PACKAGE]\fR.
.br
\fB-C, --check\fR \fI[PACKAGE]\fR
.br
Try to check package version.
.br
\fB-U, --rebuild\fR
.br
Re-build database.
.br
\fB-S, --search\fR \fB[PACKAGE\fR] \fB[DATANEEDED]\fR.
.br
Exact search of database DATANEEDED: 0/nothing=all,1=name,2=script version,3=path,4=depends,5=installed,6=installed version.
.br
\fB-Z, --fuzzy\fR \fB[PACKAGE\fR] \fB[DATANEEDED]\fR.
.br
Fuzzy search of database DATANEEDED: 0/nothing=all,1=name,2=script version,3=path,4=depends,5=installed,6=installed version.
.br
\fB-T, --notinstalled\fR
.br
List packages not installed.
.br
\fB-E, --installed\fR
.br
List installed packages.
.br
\fB-O, --dependson\fR \fB[ARG]\fR
.br
Find packages that depend on package ARG.
.br
\fB-P, --checkall\fR
.br
Check all packages for possible upgrade.
.br
\fB-W, --webpage\fR \fB[PKG]\fR
.br
Try to find and open webpage for PKG.
.br
\fB-K,--nocolour\fR
.br
Use colour in output default=on.
.br
\fB-Q, --setup\fR
.br
Setup lfspkg.rc file.
.br
\fB-N, --noaskroot\fR
.br
Don't check for root user when using -i or -u switches.
.br
\fB-R, --rootdir\fR \fI[ROOTDIR]\fR
.br
Use \fI[ROOTDIR]\fR prefix for install,remove (optional defaults to /).
.br
\fB-s, --suffix\fR \fI[SUFFIX]\fR
.br
Suffix of package (optional defaults to LFSPKG).
.br
\fB-d, --section\fR \fI[SECTION]\fR
.br
Section name of package (optional defaults to SYS).
.br
\fB-b, --build\fR \fI[BUILD]\fR
.br
Build number of package (optional defaults to 1).
.br
\fB-o, --output\fR \fI[/PATH/TO/OUTPUT/FOLER]\fR
.br
Output archive to \fI[/PATH/TO/OUTPUT/FOLER]\fR, default is to build in /tmp but this can be overridden either by setting OUTPUT on the commandline ( OUTPUT=/some/tmp/folder lfspk ... ) or setting the variable in /etc/lfspkg.rc, order of precedence is env variable OR /etc/lfspkg.rc OR /tmp.
.br
\fB-n, --name\fR \fI[PKGNAME]\fR
.br
Name of package.
.br
\fB-p, --pkgversion\fR \fI[\fRPKGVERSION\fI]\fR
.br
Version of package.
.br
.SH "FILES"
\fI/usr/share/LFSPkg/LFSFunctions\fR
.br
Helper functions for lfspkg
.br
/etc\fI/lfspkg.rc\fR
.br
Global config file, can contain the following:
.br
LFSVERSION=9.0
.br
OUTPUT=${OUTPUT:-/tmp/LFS}
.br
SOURCEARCHIVES=${SOURCEARCHIVES:-/tmp/LFSSourceArchives}
.br
PKGARCHIVES="/LFSBuiltPackages/9.0"
.br
BUILDSCRIPTS=${BUILDSCRIPTS:-"/LFSPkgBuildScripts/"}
.br
EXITONFAIL=${EXITONFAIL:-1}
.br
CONFIGOPTIONS=${CONFIGOPTIONS:-"--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --libdir=/usr/lib${LIBDIRSUFFIX} --enable-gtk-doc --disable-debug --disable-nls --disable-static"}
.br
MESONCONFIGOPTIONS="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --libdir=/usr/lib64 --buildtype=release --default-library=shared"
.br
CHECKETC=${CHECKETC:-1}
.br
MAKEFLAGS=${MAKEFLAGS:-" -j3 "}
.br
XORG_PREFIX=${XORG_PREFIX:-"/usr"}
.br
XORG_CONFIG=${XORG_CONFIG:-"--prefix=$XORG_PREFIX --sysconfdir=/etc --mandir=$XORG_PREFIX/share/man --localstatedir=/var --disable-static"}
.br
JAVA_HOME=${JAVA_HOME:-"/opt/jdk"}
.br
LIBDIRSUFFIX=64
.br
USESYSTEMD=0
.br
PIBUILD=0
.br
PIVERS=4
.br
USEROPTIONS=${USEROPTIONS:-"/etc/pkgoptions"}
.br
Where:
.br
TMP is the location for tempory files ( defaults to /tmp if not set )
.br
LFSVERSION Build version of LFS.
.br
OUTPUT is the location to save built packages ( defaults to /tmp if not set )
.br
SOURCEARCHIVES is the location to store downloaded source archives.
.br
PKGARCHIVES Path to folder to save built packages.
.br
BUILDSCRIPTS location of the folder containg the build scripts.
.br
EXITONFAIL Abort on first error if set to 1 or continue if unset or set any other value.
.br
CONFIGOPTIONS Basic configure options.
.br
MESONCONFIGOPTIONS Basic configure options for meson.
.br
CHECKETC Check if there maybe files to go in /etc that are probably config files.
.br
MAKEFLAGS What it says.
.br
XORG_PREFIX What it says.
.br
XORG_CONFIG Basic configure options for building xorg.
.br
JAVA_HOME go on guess!
.br
LIBDIRSUFFIX Suffix for /usr/lib, lib ( Usually 64 or nothing ).
.br
.br
USESYSTEMD 1 or 0 ,Some scripts use this flag to set/unset extra options.
.br
PIBUILD 1 or 0 Build for RPi.
.br
PIVERS Rpi version 1/2/3/4 ( only 3/4 tested ).
.br
USEROPTIONS Path to user options for scripts, defaults to /etc/pkgoptions, overides PKGNAME.options, '/LFSPkgBuildScripts/net/webkitgtk/webkitgtk.LFSBuild' for an example of the PKGNAME.options file.
.br
\fI/var/lib/LFSPackages\fR
.br
Contains lists of installed packages.
.br
PREFIX/bin lfspkg
.br
This program.
.br
PREFIX/bin/finddepends
.br
Helper app to recursivly find dependencies.
.br
.SH "EXAMPLES"
Build and install a package from the current directory:
.br
\fBlfspkg -n "SomePackage" -p "6.6.6" -d "DEV" -b 34 -c\fR
.br
Build a package from the current directory and save to /some/other/tmp:
.br
OUTPUT=/some/other/tmp lfspkg -n "SomePackage" -p "6.6.6" -m
.br
Install a package:
.br
\fBlfspkg "/media/SkyNet/UpdatedPakckages/wget-1.14-1_NET_LFSPKG.ta r.gz" -i\fR
.br
Create a template script based on an archive file name:
.br
\fBlfspkg -t http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz\fR
.br
Find a file in an installed package:
.br
\fBlfspkg -f wget\fR
.br
...
.br
wget Found in package: wget-1.14-2_NET_LFSPKG At these locations:
.br
./etc/wgetrc
.br
./usr/share/man/man1/wget.1
.br
./usr/share/locale/nl/LC_MESSAGES/wget.mo
.br
...
.br
./usr/share/info/wget.info
.br
./usr/bin/wget
.br
...
.br
Find an installed package:
.br
\fBlfspkg wget\fR
.br
Matches for:wget
.br
wget-1.14-1_NET_LFSPKG
.br
Remove a package:
.br
\fBlfspkg -r wget\fR
.br
If you use the template script when you want to update a package just place the new archive in the same folder as the script alter the version number in the script and run ( using wget for instance )
.br
\fBsudo ./wget.LFSBuild upgrade\fR
.br
or
.br
\fBsudo ./wget.LFSBuild up\fR
.br
And the package will be rebuilt and you will be asked which package to upgrade ( actually you can use any word that begins with up, upgrade update etc ).
.br
Find dependencies for package with the ROOTDIR set to /media/Zen:
.br
\fBlfspkg -R /media/Zen -F wget\fR
.br
Needed dependencies:
.br
OpenSSL-1.0.1
.br
Dependencies not installed:
.br
Installed dependencies:
.br
OpenSSL-1.0.1
.br
Build Scripts:
.br
/media/SkyNet/ZenSingleBuilds/NET/openssl.LFSBuild
.br
.SH "ENVIRONMENT"
Some useful environment variables:
.br
CHECKETC=0 Don't check for possible config files, 1=check.
.br
NODOWNLOAD=0 Download tarball, 1=Don't download tarball.
.br
FORCEDOWNLOAD !='' Remove old tarball before downloading.
.br
NODEPS !='' Don't build dependencies.
.br
ANYVERSION !='' Ignore version
.br
SIMPLEUPDATE=0 Full update of db, 1=Only update as needed.
.br
DELETEDOCS=1 Try to Remove as much documentaion as possible.
.br
.SH "AUTHOR"
K.D.Hedger keithdhedger@gmail.com
.br