User Tools

Site Tools


developingpld:builderscript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
developingpld:builderscript [2005-12-22 17:23]
PatrykZawadzki Initial version
developingpld:builderscript [2006-09-12 20:59]
root recovered entry
Line 2: Line 2:
  
 ====== The builder script ====== ====== The builder script ======
 +Before you can use ''​builder''​ script, You should have  [[:​DevelopingPLD:​PreparingWorkingEnvironment| working build environment]] setup. ​
 +
  
  
 ===== Using the script ===== ===== Using the script =====
-As the script ​resides ​in the //rpm/SPECS// subdirectory of your homefirst you need to change ​your current ​directory to that of the script+You can invoke ''​builder''​ (note that as the script ​is now in ''​rpm-build-tools''​, you no longer ​need to change ​the working ​directoryto see the list of possible parameters
  
  
  
-<​file>​$ ​cd +<​file>​$ builder
-$ cd rpm/SPECS +
-</​file>​ +
-Now you can invoke ''​./​builder''​ (remember that the dot and slash at the beginning are crucial) to see the list of possible parameters:  +
- +
- +
- +
-<​file>​$ ./builder+
 </​file>​ </​file>​
 The general syntax is as follows: ​ The general syntax is as follows: ​
Line 22: Line 17:
  
  
-<​file>​$ ​./builder [options] package[.spec]+<​file>​$ builder [options] package[.spec]
 </​file>​ </​file>​
 The ''​.spec''​ file extension is optional, ''​builder''​ will append it for you if needed. ​ The ''​.spec''​ file extension is optional, ''​builder''​ will append it for you if needed. ​
Line 31: Line 26:
   * ''​-bb''​ to build only binary packages (omits creating source RPM packages) ​   * ''​-bb''​ to build only binary packages (omits creating source RPM packages) ​
   * ''​-bc''​ to cleanup after successfully building a package (removes the packaging directory as it is no longer needed) ​   * ''​-bc''​ to cleanup after successfully building a package (removes the packaging directory as it is no longer needed) ​
 +  * ''​--date DATE''​ to build a specific release from the past (to make sure you also get proper SOURCES) ​
   * ''​-r BRANCH''​ to use a specific branch or revision of the given package (available branches are listed at the beginning of the building process) ​   * ''​-r BRANCH''​ to use a specific branch or revision of the given package (available branches are listed at the beginning of the building process) ​
   * ''​-U''​ to fetch all the sources and update their MD5 hashes in the ''​spec''​ file    * ''​-U''​ to fetch all the sources and update their MD5 hashes in the ''​spec''​ file 
   * ''​-5''​ to update MD5 hashes using locally fetched sources ​   * ''​-5''​ to update MD5 hashes using locally fetched sources ​
   * ''​--with FEATURE''​ or ''​--without FEATURE''​ to do a non-standard build (available features are listed at the beginning of the building process) ​   * ''​--with FEATURE''​ or ''​--without FEATURE''​ to do a non-standard build (available features are listed at the beginning of the building process) ​
-''​builder''​ automatically fetches all files needed to build the given package (if file license permits, otherwise you will need to manually download and save remaining files to your //​~/​rpm/​SOURCES//​ directory). ​+  * ''​-R''​ to fetch dependant buildrequires. it is suggested that you install ''​rpm-getdeps''​ package for best results  
 +''​builder''​ automatically fetches all files (including the ''​spec''​ file itself) ​needed to build the given package (if file license permits, otherwise you will need to manually download and save remaining files to your //​~/​rpm/​SOURCES//​ directory). After all file requirements are satisfied, ''​builder''​ launches the ''​rpmbuild''​ binary that initializes the build process. ''​rpmbuild''​ starts by checking for unsatisfied package dependencies needed to perform a successful build. If it finds any, ''​builder''​ will exit giving you a full list of needed packages. You can use ''​poldek''​ to download and install these
  
 After the build process is complete, all binary RPM files are immediately available in your //​~/​rpm/​RPMS//​ directory and source RPM packages (if any) are saved to //​~/​rpm/​SRPMS//​. ​ After the build process is complete, all binary RPM files are immediately available in your //​~/​rpm/​RPMS//​ directory and source RPM packages (if any) are saved to //​~/​rpm/​SRPMS//​. ​
 +
 +**Warning:​** all PLD packages are prepared to be built from a regular user account (without special priviledges) and you should //never use your root account// to build packages for security reasons. Keep in mind that a malfunctioning script has full write access to all your filesystems and can accidentally damage things. This is especially important when working on your own ''​spec''​ files as a little mistake can cost you hours or days of work. 
  
  
Line 46: Line 45:
  
  
-<​file>​$ ​./builder -bb -bc foo+<​file>​$ builder -bb -bc -R foo
 </​file>​ </​file>​
 To perform a full build of a package that is currently being developed on the //DEVEL// branch: ​ To perform a full build of a package that is currently being developed on the //DEVEL// branch: ​
Line 52: Line 51:
  
  
-<​file>​$ ​./builder -bc -r DEVEL foo+<​file>​$ builder -bc -r DEVEL foo
 </​file>​ </​file>​
 To update MD5 hashes after making changes to the above ''​spec''​ file:  To update MD5 hashes after making changes to the above ''​spec''​ file: 
Line 58: Line 57:
  
  
-<​file>​$ ​./builder -r DEVEL -U foo+<​file>​$ builder -r DEVEL -U foo
 </​file>​ </​file>​
  
developingpld/builderscript.txt · Last modified: 2010-05-02 13:09 by grizz