blob: 329ee6e6e86b7fffad63e83ba15ca277666baa27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
Ruby packaging
==============
See [this](https://wiki.debian.org/Teams/Ruby/Packaging).
Example: packaging leap_cli and dependencies
--------------------------------------------
First, in a *fresh* vagrant box with *sid* and *testing* in the `sources.list`:
sudo apt-get install rubygems gem2deb
sudo gem install leap_cli
Then we get the dependencies and build all packages:
dependencies=" `gem list | cut -d '(' -f 1` "
Which currently gives us the following result:
* activemodel
* activesupport
* base32
* blockenspiel
* builder
* capistrano
* colored
* command_line_reporter
* gli
* gpgme
* highline
* i18n
* json
* json_pure
* leap_cli
* mini_portile
* minitest
* net-scp
* net-sftp
* net-ssh
* net-ssh-gateway
* paint
* tee
* thread_safe
* tzinfo
* versionomy
* ya2yaml
Gem cleanup:
sudo gem uninstall $dependencies
Check existing dependencies:
for item in $dependencies; do
package=ruby-"`echo $item | sed -e 's/_/-/'`"
packages="$packages $package"
done
apt-get install --dry-run $packages
Then:
* Check for non-existing packages.
* Try different package names.
* Update your list of existing `$packages`.
In this example, that gives us the following `$already_ported` dependencies:
* capistrano
* ruby-activemodel
* ruby-activesupport
* ruby-blockenspiel
* ruby-builder
* ruby-colored
* ruby-gpgme
* ruby-highline
* ruby-i18n
* ruby-json
* ruby-minitest
* ruby-net-scp
* ruby-net-sftp
* ruby-net-ssh
* ruby-net-ssh-gateway
* ruby-paint
* ruby-thread-safe
* ruby-tzinfo
* ruby-versionomy
That means the following `$gems` needs to be packaged:
* base32
* command_line_reporter
* gli
* json_pure
* leap_cli
* mini_portile
* tee
* ya2yaml
In summary, we need to port the following `$new_packages`:
* ruby-base32
* ruby-command-line-reporter
* ruby-gli
* ruby-json-pure
* ruby-leap-cli
* ruby-mini-portile
* ruby-tee
* ruby-ya2yaml
Build remaining packages:
for gem in $gems; do
gem2deb $gem
done
Backporting existing packages:
for package in $already_ported; do
apt-get -t jessie source --download-only $package
dpkg-source -x $package*dsc
done
Additional steps:
* Backport existing dependencies if needed.
* Fix `debian/control` and other FIXME's on each package.
* Put `debian/` folder in a `debian` branch on each source.
* [Review the code](https://manual.sarava.org/specs/code/).
* Automate building with pbuilder.
* Upstream pull requests.
|