55 | 55 |
REALVER=<old-version> ./update.sh <rust-crate-name> # then
|
56 | 56 |
REALVER=<old-version> ./release.sh <rust-crate-name>
|
57 | 57 |
|
|
58 |
Repackaging the existing revision
|
|
59 |
---------------------------------
|
|
60 |
|
|
61 |
In order to build a package A already in ``debcargo-conf/src``
|
|
62 |
in the exact version which is present here, do the following::
|
|
63 |
|
|
64 |
$ ./repackage.sh A
|
|
65 |
$ cd build
|
|
66 |
$ ./build.sh A
|
|
67 |
|
|
68 |
If this package is already in the archive and you want to recreate that
|
|
69 |
exactly, you will need to use the exact same version of debcargo that was
|
|
70 |
used previously. This version is mentioned in ``debian/changelog``.
|
|
71 |
|
58 | 72 |
|
59 | 73 |
Repository structure
|
60 | 74 |
====================
|
|
71 | 85 |
cd build && [SOURCEONLY=1] ./build.sh <rust-crate-name> [<old-version>]
|
72 | 86 |
|
73 | 87 |
omitting or not omitting the stuff in [] as needed.
|
|
88 |
|
|
89 |
|
|
90 |
Build environment
|
|
91 |
=================
|
|
92 |
|
|
93 |
To set up a suitable build environment for ``./build.sh``::
|
|
94 |
|
|
95 |
$ sudo apt-get install devscripts reprepro debootstrap sbuild dh-cargo
|
|
96 |
$ sudo sbuild-createchroot --include=eatmydata,ccache,gnupg,dh-cargo,cargo,lintian,perl-openssl-defaults \
|
|
97 |
--chroot-prefix debcargo-unstable unstable \
|
|
98 |
/srv/chroot/debcargo-unstable-amd64-sbuild http://deb.debian.org/debian
|
|
99 |
|
|
100 |
Normally, ``./build.sh`` will fail early if not all the build dependencies are
|
|
101 |
available in your local apt cache. If you are packaging a large dependency tree
|
|
102 |
however, to avoid many round-trips through NEW it is possible to bypass this
|
|
103 |
check and build all the packages together. Suppose package B depends on package
|
|
104 |
A, then you can run something like::
|
|
105 |
|
|
106 |
$ export IGNORE_MISSING_BUILD_DEPS=1
|
|
107 |
$ ./release.sh A
|
|
108 |
$ ( cd build && ./build.sh A )
|
|
109 |
# push pending and checkout master
|
|
110 |
$ ./release.sh B
|
|
111 |
$ ( cd build && ./build.sh B librust-A*.deb )
|
|
112 |
|
|
113 |
The extra arguments after ``./build.sh B <args>`` is extra deb files to pass to
|
|
114 |
sbuild to use as dependencies. In this case, ``librust-A*.deb`` should have
|
|
115 |
been built by the previous step.
|
|
116 |
|
|
117 |
After everything is built successfully, you can ``dput`` all of them and then
|
|
118 |
push all the ``pending-*`` branches as normal.
|
74 | 119 |
|
75 | 120 |
|
76 | 121 |
General packaging tips
|
|
187 | 232 |
to be updated, you should instead name the patch ``update-dep-<crate>.patch``
|
188 | 233 |
and add both the ``Cargo.toml`` and the source code changes to it. Use
|
189 | 234 |
``quilt rename`` if that helps you.
|
190 | |
|
191 | |
|
192 | |
DD instructions
|
193 | |
===============
|
194 | |
|
195 | |
To set up a suitable build environment for ``./build.sh``::
|
196 | |
|
197 | |
$ sudo apt-get install devscripts reprepro debootstrap sbuild dh-cargo
|
198 | |
$ sudo sbuild-createchroot --include=eatmydata,ccache,gnupg,dh-cargo,cargo,lintian,perl-openssl-defaults \
|
199 | |
--chroot-prefix debcargo-unstable unstable \
|
200 | |
/srv/chroot/debcargo-unstable-amd64-sbuild http://deb.debian.org/debian
|
201 | |
|
202 | |
Normally, ``./build.sh`` will fail early if not all the build dependencies are
|
203 | |
available in your local apt cache. If you are packaging a large dependency tree
|
204 | |
however, to avoid many round-trips through NEW it is possible to bypass this
|
205 | |
check and build all the packages together. Suppose package B depends on package
|
206 | |
A, then you can run something like::
|
207 | |
|
208 | |
$ export IGNORE_MISSING_BUILD_DEPS=1
|
209 | |
$ ./release.sh A
|
210 | |
$ ( cd build && ./build.sh A )
|
211 | |
# push pending and checkout master
|
212 | |
$ ./release.sh B
|
213 | |
$ ( cd build && ./build.sh B librust-A*.deb )
|
214 | |
|
215 | |
The extra arguments after ``./build.sh B <args>`` is extra deb files to pass to
|
216 | |
sbuild to use as dependencies. In this case, ``librust-A*.deb`` should have
|
217 | |
been built by the previous step.
|
218 | |
|
219 | |
After everything is built successfully, you can ``dput`` all of them and then
|
220 | |
push all the ``pending-*`` branches as normal.
|
221 | |
|
222 | |
Packaging the existing revision
|
223 | |
===============================
|
224 | |
|
225 | |
In order to build a package A already in ``debcargo-conf/src``
|
226 | |
in the exact version which is present here, do the following::
|
227 | |
|
228 | |
$ ./repackage.sh A
|
229 | |
$ cd build
|
230 | |
$ ./build.sh A
|
231 | |
|
232 | |
If this package is already in the archive and you want to recreate that, you
|
233 | |
will need to use the exact same version of debcargo that was used previously.
|