gbp-import-orig.sgml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <refentry id="man.gbp.import.orig">
  2. <refentryinfo>
  3. <address>
  4. &dhemail;
  5. </address>
  6. <author>
  7. &dhfirstname;
  8. &dhsurname;
  9. </author>
  10. </refentryinfo>
  11. <refmeta>
  12. <refentrytitle>gbp-import-orig</refentrytitle>
  13. &dhsection;
  14. </refmeta>
  15. <refnamediv>
  16. <refname>gbp-import-orig</refname>
  17. <refpurpose>Import an upstream source into a git repository</refpurpose>
  18. </refnamediv>
  19. <refsynopsisdiv>
  20. <cmdsynopsis>
  21. &gbp-import-orig;
  22. &man.common.options.synopsis;
  23. <arg><option>--upstream-version=</option><replaceable>version</replaceable></arg>
  24. <arg><option>--[no-]merge</option></arg>
  25. <arg><option>--merge-mode=</option><replaceable>[merge|replace]</replaceable></arg>
  26. <arg><option>--upstream-branch=</option><replaceable>branch_name</replaceable></arg>
  27. <arg><option>--debian-branch=</option><replaceable>branch_name</replaceable></arg>
  28. <arg><option>--upstream-vcs-tag=</option><replaceable>tag-format</replaceable></arg>
  29. <arg><option>--[no-]sign-tags</option></arg>
  30. <arg><option>--keyid=</option><replaceable>gpg-keyid</replaceable></arg>
  31. <arg><option>--upstream-tag=</option><replaceable>tag-format</replaceable></arg>
  32. <arg><option>--filter=</option><replaceable>pattern</replaceable></arg>
  33. <arg><option>--[no-]pristine-tar</option></arg>
  34. <arg><option>--[no-]filter-pristine-tar</option></arg>
  35. <arg><option>--[no-]symlink-orig</option></arg>
  36. <arg><option>--postimport=cmd</option></arg>
  37. <arg><option>--[no-]interactive</option></arg>
  38. <arg><option>--download</option></arg>
  39. <group choice="plain">
  40. <arg choice="plain"><replaceable>upstream-source</replaceable></arg>
  41. <arg><option>--uscan</option></arg>
  42. </group>
  43. </cmdsynopsis>
  44. </refsynopsisdiv>
  45. <refsect1>
  46. <title>DESCRIPTION</title>
  47. <para>
  48. &gbp-import-orig; imports <replaceable>upstream-source</replaceable> into
  49. the &git; repository. <replaceable>upstream-source</replaceable> can either
  50. be a gzip, bzip2, lzma or xz compressed tar archive, a zip archive, or an
  51. already unpacked source tree. If it is already of the form
  52. <replaceable>package-name_version.orig.tar.gz</replaceable>, the version
  53. information is read from the tarball's filename, otherwise it can be given
  54. on the command line via <option>--upstream-version</option>. If the source
  55. package name or version can't be determined, &gbp-import-orig; will prompt
  56. for it unless <option>--no-interactive</option> is given.
  57. </para>
  58. <para>
  59. The sources are placed on the upstream branch (default:
  60. <replaceable>upstream</replaceable>), tagged and merged onto the debian
  61. branch (default: <replaceable>master</replaceable>).
  62. </para>
  63. </refsect1>
  64. <refsect1>
  65. <title>OPTIONS</title>
  66. <variablelist>
  67. &man.common.options.description;
  68. <varlistentry>
  69. <term><option>--upstream-version</option>=<replaceable>version</replaceable></term>
  70. <term><option>-u</option><replaceable>version</replaceable></term>
  71. <listitem>
  72. <para>
  73. The upstream version number
  74. </para>
  75. </listitem>
  76. </varlistentry>
  77. <varlistentry>
  78. <term><option>--[no-]merge</option></term>
  79. <listitem>
  80. <para>
  81. Merge the upstream branch to the &debian; branch after import
  82. </para>
  83. </listitem>
  84. </varlistentry>
  85. <varlistentry>
  86. <term><option>--merge-mode=</option><replaceable>[merge|replace]</replaceable></term>
  87. <listitem>
  88. <para>
  89. How to fold the newly imported upstream source to the
  90. &debian; packaging branch after import.
  91. </para>
  92. <para>
  93. The default mode
  94. <replaceable>merge</replaceable> does a
  95. &git; <command>merge</command> leaving you on your own in
  96. case of merge conflict resolution.
  97. </para>
  98. <para>
  99. <replaceable>replace</replaceable> mode on the
  100. other hand makes the head of the &debian; packaging branch
  101. identical to the newly imported tree but preserves the
  102. content of the <filename>debian/</filename> directory
  103. while keeping the current head as well as the newly
  104. important trees as parents of the generated commit. This is
  105. similar to a <option>theirs</option> merge strategy while
  106. preserving <filename>debian/</filename>.
  107. </para>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry>
  111. <term><option>--upstream-branch</option>=<replaceable>branch_name</replaceable>
  112. </term>
  113. <listitem>
  114. <para>
  115. The branch in the &git; repository the upstream sources are put
  116. onto. Default is <replaceable>upstream</replaceable>.
  117. </para>
  118. </listitem>
  119. </varlistentry>
  120. <varlistentry>
  121. <term><option>--debian-branch</option>=<replaceable>branch_name</replaceable>
  122. </term>
  123. <listitem>
  124. <para>
  125. The branch in the &git; repository the &debian; package is being
  126. developed on, default is <replaceable>master</replaceable>. After
  127. importing the new sources on the upstream branch, &gbp-import-orig;
  128. will try to merge the new version onto this branch.
  129. </para>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry>
  133. <term><option>--upstream-vcs-tag</option>=<replaceable>tag-format</replaceable>
  134. </term>
  135. <listitem>
  136. <para>
  137. Add <replaceable>tag-format</replaceable> as additional parent to the
  138. commit of the upstream tarball. Useful when upstream uses git and you
  139. want to link to its revision history. The
  140. <replaceable>tag-format</replaceable> can be a pattern similar to
  141. what <option>--upstream-tag</option> supports.
  142. </para>
  143. </listitem>
  144. </varlistentry>
  145. <varlistentry>
  146. <term><option>--[no-]sign-tags</option>
  147. </term>
  148. <listitem>
  149. <para>
  150. GPG sign all created tags
  151. </para>
  152. </listitem>
  153. </varlistentry>
  154. <varlistentry>
  155. <term><option>--keyid=</option><replaceable>gpg-keyid</replaceable>
  156. </term>
  157. <listitem>
  158. <para>
  159. use this keyid for gpg signing tags
  160. </para>
  161. </listitem>
  162. </varlistentry>
  163. <varlistentry>
  164. <term><option>--upstream-tag=</option><replaceable>tag-format</replaceable>
  165. </term>
  166. <listitem>
  167. <para>
  168. use this tag format when tagging upstream versions,
  169. default is <replaceable>upstream/%(version)s</replaceable>
  170. </para>
  171. </listitem>
  172. </varlistentry>
  173. <varlistentry>
  174. <term><option>--import-msg=</option><replaceable>msg-format</replaceable>
  175. </term>
  176. <listitem>
  177. <para>
  178. use this format string for the commit message when importing upstream
  179. versions, default is
  180. <replaceable>Imported Upstream version %(version)s</replaceable>
  181. </para>
  182. </listitem>
  183. </varlistentry>
  184. <varlistentry>
  185. <term><option>--filter=</option><replaceable>pattern</replaceable>
  186. </term>
  187. <listitem>
  188. <para>
  189. filter out files glob-matching pattern. Can be given multiple times.
  190. </para>
  191. </listitem>
  192. </varlistentry>
  193. <varlistentry>
  194. <term><option>--[no-]pristine-tar</option>
  195. </term>
  196. <listitem>
  197. <para>
  198. generate <command>pristine-tar</command> delta file
  199. </para>
  200. </listitem>
  201. </varlistentry>
  202. <varlistentry>
  203. <term><option>--[no-]filter-pristine-tar</option>
  204. </term>
  205. <listitem>
  206. <para>
  207. if using a filter, also filter the files out of the tarball
  208. passed to <command>pristine-tar</command>
  209. </para>
  210. </listitem>
  211. </varlistentry>
  212. <varlistentry>
  213. <term><option>--[no-]symlink-orig</option></term>
  214. <listitem>
  215. <para>
  216. Whether to create and keep a symlink from the upstream tarball
  217. to a &debian; policy conformant upstream tarball name located in
  218. <filename class="directory">../</filename>.
  219. </para>
  220. <para>
  221. This is a good idea if not using <command>pristine-tar</command>
  222. since it avoids creating a new tarball with a different md5sum.
  223. </para>
  224. </listitem>
  225. </varlistentry>
  226. <varlistentry>
  227. <term><option>--postimport=<replaceable>cmd</replaceable></option></term>
  228. <listitem>
  229. <para>
  230. run <replaceable>cmd</replaceable> after the import.
  231. </para>
  232. </listitem>
  233. </varlistentry>
  234. <varlistentry>
  235. <term><option>--uscan</option></term>
  236. <listitem>
  237. <para>
  238. Use uscan to fetch new upstream version.
  239. </para>
  240. </listitem>
  241. </varlistentry>
  242. <varlistentry>
  243. <term><option>--uscan</option></term>
  244. <listitem>
  245. <para>
  246. Download the tarball from the given HTTP URL. This needs
  247. python-request installed.
  248. </para>
  249. </listitem>
  250. </varlistentry>
  251. <varlistentry>
  252. <term><option>--[no-]interactive</option></term>
  253. <listitem>
  254. <para>
  255. Run command interactively, i.e. ask package name and version if
  256. needed.
  257. </para>
  258. </listitem>
  259. </varlistentry>
  260. </variablelist>
  261. </refsect1>
  262. <refsect1>
  263. <title>EXAMPLES</title>
  264. <para>
  265. Download and import a new upstream version using the information from <filename>debian/watch</filename>
  266. </para>
  267. <screen>
  268. &gbp-import-orig; --uscan
  269. </screen>
  270. <para>
  271. After downloading an upstream tarball by hand, import it
  272. </para>
  273. <screen>
  274. &gbp-import-orig; ../upstream-tarball-0.1.tar.gz
  275. </screen>
  276. </refsect1>
  277. <refsect1>
  278. &man.gbp.config-files;
  279. </refsect1>
  280. <refsect1>
  281. <title>SEE ALSO</title>
  282. <para>
  283. <xref linkend="man.gbp.buildpackage"/>,
  284. <xref linkend="man.gbp.import.dsc"/>,
  285. <xref linkend="man.gbp.import.dscs"/>,
  286. <xref linkend="man.gbp.dch"/>,
  287. <xref linkend="man.gbp.conf"/>,
  288. &man.seealso.common;
  289. </para>
  290. </refsect1>
  291. <refsect1>
  292. <title>AUTHOR</title>
  293. <para>
  294. &dhusername; &dhemail;
  295. </para>
  296. </refsect1>
  297. </refentry>
  298. <!-- LocalWords: xz lzma bzip gzip tarball
  299. -->