-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaurbuild.1
145 lines (105 loc) · 8.56 KB
/
aurbuild.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
.TH "aurbuild" "1" "June 6, 2010" "aurbuild 1.8.10" ""
.SH "NAME"
aurbuild \- A utility to build and install packages from the AUR.
.SH "SYNOPSIS"
\fBaurbuild\fR [options] [package] <package>
.SH "DESCRIPTION"
\fBaurbuild\fR is a utility to build and install packages from the Arch Linux User-Community Repository. It can retrieve tarballs containing build files, invoke makepkg to build packages via an under privileged user, and call pacman to install them. A menu is available to view or edit the build files if needed.
.SH "OPTIONS"
A dependency installation method must be passed to aurbuild before it attempts to build a package.
.TP
\fB\-b, \-\-builddeps\fR
Build missing dependencies from source using the abs tree. makedepends and depends will be evaluated and satisfied in that order. It is wise to run abs refresh your abs tree before building.
.TP
\fB\-s, \-\-syncdeps\fR
Sync missing dependencies using pacman to retrieve prebuilt *.pkg.tar.gz binaries. makedepends and depends will be evaluated and satisfied in that order.
.TP
\fB\-o "OPTS", \-\-builder\-opts="OPTS"\fR
This will pass options directly to the builder of choice (currently makepkg) as selected from the menu during the build process. Be sure to encapsulate your options in double quotes to ensure they are passed down correctly to the builder. Please note aurbuild will always pass -f to makepkg by default and some options will not work as an under-privileged build user. Also note the use of this switch is optional and normally not needed to build most packages. Below is an example:
\fBExample:\fR
`makepkg -Bn --foo` would become:
aurbuild -so "-B -n --foo"
OR
aurbuild --syncdeps --builder-opts="-B -n --foo"
.TP
\fB\-\-auto\fR
Bypass the menu, build and install the package automatically. Use this as a modifier to --builddeps or --syncdeps. It cannot be used alone.
.TP
\fB\-e, \-\-save\fR
Save the build files extracted from the tarball in AUR to the directory \fI/var/tmp/aurbuild/pkgbuilds/<PKGNAME>\fR.
.TP
\fB\-l, \-\-local\fR
Look in \fI/var/tmp/aurbuild/pkgbuilds/\fR, aurbuild's --save location, for the build files instead of AUR.
.TP
\fB\-f, \-\-official\fR
Build official packages using \fI/var/abs/\fR as the PKGBUILD root. NOTE: packages will only be as up to date as your abs tree is! To update it run the command \fBabs\fR. This is switch is also used when aurbuild finds community packages. See the section \fBCOMMUNITY PACKAGES\fR for more details.
.TP
\fB\-u, \-\-upgrade\fR
Upgrade out of date packages installed from unsupported AUR. This will check AUR's website for each AUR package so it may take a while. Each package will be evaluated and upgraded one by one displaying a confirmation message. Use this as a modifier to --syncdeps or --builddeps.
Note: --auto may be used to bypass the menu, but is not generally recommended unless you know what you are doing.
.TP
\fBExample:\fR
aurbuild -su
.TP
\fB\-c, \-\-clean\fR
Clean the build directory /var/tmp/aurbuild/build. This may be necessary if several failed builds have not been properly dealt with. See \fBFAILED BUILDS\fR for more details.
.TP
\fB\-n, \-\-noconfirm\fR
Bypass any confirmation message by answering yes.
.TP
\fB\-x, \-\-noinstall\fR
Add this switch to not install the package after it has been built. Be sure you have set your PKGDEST variable in \fI/etc/makepkg.conf\fR if you wish to keep the built package without being deleted.
.TP
\fB\-m, \-\-rm\-make\-deps\fR
Remove unneeded make dependencies after a successful build. You will be prompted before proceeding.
.TP
\fB\-S, \-\-search\fR
Use this to search AUR for a single [keyword]. Results are piped to \fBless (1)\fR.
.TP
\fB\-\-verbose\fR
With this switch searches will display more information
.TP
\fB\-h, \-\-help\fR
Display the help message and exit.
.TP
\fB\-v, \-\-version\fR
Display version number and exit.
.SH "PACKAGE"
This will be the name of the package as defined in AUR minus any version numbers or compression extensions. More than one package may be installed at a time by separating each with a space. This is especially useful when aur packages depend on other aur packages. Say foo3 requires foo2 and foo2 requires foo1. The line given to aurbuild would be as follows:
.TP
\fBExample:\fR
aurbuild -s foo1 foo2 foo3
.SH "THE MENU"
The menu will be displayed as text on your terminal. It will display a corresponding number to each build file extracted from the tarball to view or edit if desired. If a .install file is found it will be displayed immediately for review. Once you are convinced all files are sound, you may choose to either build via makepkg (and install via pacman), skip the package, or quit all together without building.
.TP
\fBWARNING:\fR Editing build files should \fIonly\fR be done by users who know what they are doing!
.SH "YOUR EDITOR"
aurbuild utilizes the EDITOR environment variable as the editor to be use in the menu. If you do not have one specified, it will default to nano. You can create an EDITOR variable in \fI~.bashrc\fR as shown below. It may be necessary to logout and login again.
.TP
\fBExample:\fR
#
# ~.bashrc
#
export EDITOR="vim"
.SH "UNDER PRIVILEGED BUILDING"
The logic behind building packages as an under privilege user is safety. If for example during the build process a file wants to be moved into the root file system i.e. from a poor PKGBUILD, makepkg will catch the permission error and exit. As you may or may not know, makepkg needs to install\fB all\fR of it's files into $startdir/pkg/ so that it may be compressed and given to pacman to install and keep track of. Had it been run as root user and a file was moved into the root file system during build, the package would still have been built and pacman would not be able to track that one file. The problem with building a package as regular user however, is that permissions of the files may inherit those of the user. This is where \fBfakeroot\fR comes into play. fakeroot allows a package to be built resembling the root user so that files may be owned by root, yet regular root permissions are denied. fakeroot is a required dependency. Aurbuild solves this by temporarily dropping down to a designated and under privileged build user and returning to root once the build has been complete.
.SH "FAILED BUILDS"
Should a package fail to build, aurbuild will retain the build directory in /var/tmp/aurbuild/build/<pkgname> by default. In some cases the package can be fixed and makepkg can be run manually with success. When a package builds success fully under aurbuild it's build files are deleted automatically.
.SH "PACKAGE LOCATION"
aurbuild closely adheres to \fBmakepkg\fR configurations and behavior. So if you wish to keep the package you built, uncomment and set the \fBexport PKGDEST=\fR variable in \fI/etc/makepkg.conf\fR to the location you wish to store the packages. A generally accepted location is \fI/home/pkgs\fR although it is purely a matter of preference. Appropriate write and execute permissions to this directory will be necessary to the aurbuild user or group. If this variable is not set, aurbuild will delete the package along with its temporary work directory in which it was built in \fI/var/tmp/aurbuild/build/<pkgname>.<pid>\fR.
.SH "PACKAGE INSTALLATION"
If a package is built successfully, it is installed via pacman -U. If you do not wish for this behavior, set the --no-install switch. Note if you do not have PKGDEST set in /etc/makepkg.conf, the package and its build directory will be deleted.
.SH "SOURCE FILES"
If possible, aurbuild will attempt to copy any source files used for the build into pacman's src directory in /var/cache/pacman/src. This will prevent unnecessary multiple download sessions if the package needs to be built again in the future.
.SH "COMMUNITY PACKAGES"
Because the AUR has the same database for unsupported packages as well as community, aurbuild is often able to detect either one. If a community package is found, aurbuild will prompt and propose to build the package via \fBaurbuild <CURRENT DEP RESOLVE OPT> --official <PKGNAME>\fR. This will force aurbuild to look in /var/abs/ for the desired PKGBUILD instead of AUR's website. NOTE: packages built using --official will only be as up to date as your abs tree is! Run the command \fBabs\fR to update it.
.SH "COLOR OUTPUT"
The use of color is determined by setting color in the BUILDENV array in \fI/etc/makepkg.conf\fR. If you wish to turn it off prefix with an exclamation point (!).
.SH "SEE ALSO"
.B pacman
is the Arch Linux package manager.
.B makepkg
is the package building tool that comes with pacman.
.SH "AUTHORS"
Tyler Gates <[email protected]>
Loui Chang <[email protected]> is the current maintainer.