]> git.sur5r.net Git - bacula/docs/blob - docs/manual-fr/rpm-faq.tex
Initial revision
[bacula/docs] / docs / manual-fr / rpm-faq.tex
1 %%
2 %%
3
4 \section*{Bacula\raisebox{.6ex}{{\footnotesize
5 \textsuperscript{\textregistered}}} - RPM Packaging FAQ}
6 \label{_ChapterStart34}
7 \index[general]{FAQ!Bacula\textsuperscript{\textregistered} - RPM Packaging }
8 \index[general]{Bacula\textsuperscript{\textregistered} - RPM Packaging FAQ }
9 \addcontentsline{toc}{section}{Bacula\textsuperscript{\textregistered} - RPM
10 Packaging FAQ}
11
12 \begin{enumerate}
13 \item 
14    \ilink{How do I build Bacula for platform xxx?}{faq1}  
15 \item 
16    \ilink{How do I control which database support gets built?}{faq2} 
17
18 \item 
19    \ilink{What other defines are used?}{faq3}  
20 \item 
21    \ilink{I'm getting errors about not having permission when I try to build the
22    packages. Do I need to be root?}{faq4}  
23 \item 
24    \ilink{I'm building my own rpms but on all platforms and compiles I get an
25    unresolved dependancy for something called
26 /usr/afsws/bin/pagsh.}{faq5} 
27 \end{enumerate}
28
29 \subsection*{Answers}
30 \index[general]{Answers }
31 \addcontentsline{toc}{subsection}{Answers}
32
33 \begin{enumerate}
34 \item 
35    \label{faq1}
36    {\bf How do I build Bacula for platform xxx?}
37 The bacula spec file contains defines to build for several platforms:  RedHat
38 7.x (rh7), RedHat 8.0 (rh8), RedHat 9 (rh9), Fedora Core (fc1),  Whitebox
39 Enterprise Linux (RHEL) 3.0 (wb3), Mandrake 10.x (mdk) and SuSE 9.x (su9). 
40 The package build is controlled by a mandatory define set at the beginning of 
41 the file. These defines basically just control the dependancy information that
42  gets coded into the finished rpm package. 
43 The platform define may be edited in the spec file directly (by default all 
44 defines are set to 0 or ``not set''). For example, to build the RedHat 7.x 
45 package find the line in the spec file which reads  
46
47 \footnotesize
48 \begin{verbatim}
49         %define rh7 0
50         
51 \end{verbatim}
52 \normalsize
53
54 and edit it to read  
55
56 \footnotesize
57 \begin{verbatim}
58         %define rh7 1
59         
60 \end{verbatim}
61 \normalsize
62
63 Alternately you may pass the define on the command line when calling rpmbuild:
64  
65
66 \footnotesize
67 \begin{verbatim}
68         rpmbuild -ba --define "build_rh7 1" bacula.spec
69         rpmbuild --rebuild --define build_rh7 1" bacula-x.x.x-x.src.rpm
70         
71 \end{verbatim}
72 \normalsize
73
74 \item 
75    \label{faq2}
76    {\bf How do I control which database support gets built?}
77 Another mandatory build define controls which database support is compiled,
78 one of  build\_sqlite, build\_mysql or build\_postgresql. To get the MySQL
79 package and support either  set the  
80
81 \footnotesize
82 \begin{verbatim}
83         %define mysql 0
84         
85 \end{verbatim}
86 \normalsize
87
88 to  
89
90 \footnotesize
91 \begin{verbatim}
92         %define mysql 1
93         
94 \end{verbatim}
95 \normalsize
96
97 in the spec file directly or pass it to rpmbuild on the command line:  
98
99 \footnotesize
100 \begin{verbatim}
101         rpmbuild -ba --define "build_rh7 1" --define "build_mysql 1" bacula.spec
102         
103 \end{verbatim}
104 \normalsize
105
106 \item 
107    \label{faq3}
108    {\bf What other defines are used?}
109 Two other building defines of note are the depkgs\_version and tomsrtbt
110 identifiers. These  two defines are set with each release and must match the
111 version of those sources that are  being used to build the packages. You would
112 not ordinarily need to edit these.  
113 \item 
114    \label{faq4}
115    {\bf I'm getting errors about not having permission when I try  to build the
116 packages. Do I need to be root?}
117 No, you do not need to be root and, in fact, it is better practice to build
118 rpm packages  as a non-root user. Bacula packages are designed to be built by
119 a regular user but you must  make a few changes on your system to do this. If
120 you are building on your own system then  the simplest method is to add write
121 permissions for all to the build directory  (/usr/src/redhat/). To accomplish
122 this execute the following command as root:  
123
124 \footnotesize
125 \begin{verbatim}
126         chmod -R 777 /usr/src/redhat
127         
128 \end{verbatim}
129 \normalsize
130
131 If you are working on a shared system where you can not use the method above
132 then you need to  recreate the /usr/src/redhat directory tree with all of it's
133 subdirectories inside your home  directory. Then create a file named  {\tt
134 .rpmmacros} in your home directory (or edit  the file if it already exists)
135 and add the following line:  
136
137 \footnotesize
138 \begin{verbatim}
139         %_topdir /home/myuser/redhat
140         
141 \end{verbatim}
142 \normalsize
143
144 \item 
145    \label{faq5}
146    {\bf I'm building my own rpms but on all platforms and compiles  I get an
147 unresolved dependancy for something called /usr/afsws/bin/pagsh.}
148 This is a shell from the OpenAFS (Andrew File System). If you are seeing this
149 then you  chose to include the docs/examples directory in your package. One of
150 the example scripts  in this directory is a pagsh script. Rpmbuild, when
151 scanning for dependancies, looks at  the shebang line of all packaged scripts
152 in addition to checking shared libraries. To avoid  this do not package the
153 examples directory.  
154 \end{enumerate}