Changes between Initial Version and Version 1 of debbuild-doc


Ignore:
Timestamp:
11/09/11 18:08:00 (13 years ago)
Author:
kdeugau
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • debbuild-doc

    v1 v1  
     1Extracted via pod2html, then cleaned up a little.
     2
     3* [#name NAME]
     4* [#synop SYNOPSIS]
     5* [#desc DESCRIPTION]
     6* [#assump ASSUMPTIONS]
     7* [#errata ERRATA]
     8   * [#ba BuildArch or BuildArchitecture]
     9   * [#showpkg Finding out what packages should be built (-showpkgs)]
     10* [#author AUTHOR]
     11* [#bugs BUGS]
     12* [#also SEE ALSO]
     13
     14----
     15
     16== [=#name] NAME ==
     17
     18`debbuild` - Build Debian-compatible packages from RPM spec files
     19
     20----
     21
     22
     23== [=#synop] SYNOPSIS ==
     24
     25{{{
     26 debbuild {-ba|-bb|-bp|-bc|-bi|-bl|-bs} [build-options] file.spec
     27
     28 debbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [build-options] file.tar.{gz|bz2}
     29
     30 debbuild --rebuild file.{src.rpm|sdeb}
     31
     32 debbuild --showpkgs file.spec
     33}}}
     34
     35----
     36
     37== [=#desc] DESCRIPTION ==
     38
     39This script attempts to build Debian-friendly semi-native packages from RPM spec files, RPM-friendly tarballs, and RPM source packages (.src.rpm files). It accepts most of the options rpmbuild does, and should be able to interpret most spec files usefully. Perl modules should be handled via CPAN+dh-make-perl instead; Debian's conventions for such things do not lend themselves to automated conversion.
     40
     41As far as possible, the command-line options are identical to those from rpmbuild, although several rpmbuild options are not supported:
     42
     43{{{
     44 --recompile
     45 --showrc
     46 --clean
     47 --nobuild
     48 --rmsource
     49 --rmspec
     50 --sign
     51 --target
     52}}}
     53
     54Some of these could probably be trivially added. Feel free to send me a patch. ;)
     55
     56Complex spec files will most likely not work well, if at all. Rewrite them from scratch - you'll have to make heavy modifications anyway. (To the dependency lists, if nothing else.)
     57
     58If you see something you don't like, mail me. Send a patch if you feel inspired. I don't promise I'll do anything other than say "Yup, that's broken" or "Got your message".
     59
     60----
     61
     62== [=#assump] ASSUMPTIONS ==
     63
     64As with rpmbuild, debbuild makes some assumptions about your system.
     65
     66* Either you have rights to do as you please under /usr/src/debian, or you have created a file ~/.debmacros containing a suitable %_topdir definition.
     67
     68  Both rpmbuild and debbuild require the directories %_topdir/{BUILD,SOURCES,SPECS}. However, where rpmbuild requires the %_topdir/{RPMS,SRPMS} directories, debbuild requires %_topdir/{DEBS,SDEBS} instead. Create them in advance; some subdirectories are created automatically as needed, but most are not.
     69
     70* /var/tmp must allow script execution - rpmbuild and debbuild both rely on creating and executing shell scripts for much of their functionality. By default, debbuild also creates install trees under /var/tmp - however this is (almost) entirely under the control of the package's .spec file.
     71
     72* If you wish to --rebuild a .src.rpm, your %_topdir for both debbuild and rpmbuild must either match, or be suitably symlinked one direction or another so that both programs are effectively working in the same tree. (Or you could just manually wrestle files around your system.)
     73
     74  You could symlink ~/.rpmmacros to ~/.debmacros (or vice versa) and save yourself some hassle if you need to rebuild .src.rpm packages on a regular basis. Currently debbuild only uses the %_topdir macro definition, although there are many more things that rpmbuild can use from ~/.rpmmacros.
     75
     76----
     77
     78== [=#errata] ERRATA ==
     79
     80debbuild deliberately does a few things differently from rpm.
     81
     82=== [=#ba] !BuildArch or !BuildArchitecture ===
     83
     84rpm takes the last BuildArch entry it finds in the .spec file, whatever it is, and runs with that for all packages. Debian's repository system is fairly heavily designed around the assumption that a single source package may generate small binary (executable) packages for each arch, and large binary arch-all packages containing shared data.
     85
     86debbuild allows this by using the architecture specified by (in order of preference):
     87
     88* Host architecture
     89* BuildArch specified in .spec file preamble
     90* "Last specified" BuildArch for packages with several subpackages
     91* BuildArch specified in the %package section for that subpackage
     92
     93=== [=#showpkg] Finding out what packages should be built (--showpkgs) ===
     94
     95rpmbuild does not include any convenient method I know of to list the packages a spec file will produce. Since I needed this ability for another tool, I added it.
     96
     97It requires the .spec file for the package, and produces a list of full package filenames (without path data) that would be generated by one of --rebuild, -ta, -tb, -ba, or -bb. This includes the .sdeb source package.
     98
     99----
     100
     101== [=#author] AUTHOR ==
     102
     103debbuild was written by Kris Deugau <kdeugau@deepnet.cx>.  The current version should be available from https://secure.deepnet.cx/trac/debbuild/.
     104
     105----
     106
     107== [=#bugs] BUGS ==
     108
     109Funky Things Happen if you forget a command-line option or two.
     110
     111Many macro expansions are unsupported or incompletely supported.
     112
     113The generated scriptlets don't quite match those from rpmbuild exactly. There are extra environment variables and preprocessing that I haven't needed (yet).
     114
     115%_topdir and the five "working" directories under %_topdir could arguably be created by debbuild. However, rpmbuild doesn't create these directories either.
     116
     117----
     118
     119== [=#also] SEE ALSO ==
     120
     121rpm(8), rpmbuild(8), and pretty much any document describing how to write a .spec file.