File: dpkg-repack.pod

package info (click to toggle)
dpkg-repack 1.45
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 132 kB
  • sloc: perl: 375; makefile: 37; sh: 29
file content (125 lines) | stat: -rw-r--r-- 4,241 bytes parent folder | download
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
# Copyright © 1996-2006 Joey Hess <joeyh@debian.org>
# Copyright © 2012, 2014-2016, 2018 Guillem Jover <guillem@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

=head1 NAME

dpkg-repack - put an unpacked .deb file back together

=head1 SYNOPSIS

B<dpkg-repack> [I<option>...] I<package-name>...

=head1 DESCRIPTION

B<dpkg-repack> creates a .deb file out of a Debian package that has already
been installed on your system.

If any changes have been made to the package while it was unpacked (e.g.
conffiles files in /etc modified), the new package will inherit the changes.
(There are exceptions to this, including changes to configuration files that
are not conffiles, including those managed by ucf.)

This utility can make it easy to copy packages from one computer to another,
or to recreate packages that are installed on your system, but no longer
available elsewhere.

Note: B<dpkg-repack> will place the created package in the current directory.

=head1 OPTIONS

=over 4

=item B<--root=>I<dir>

Take package from filesystem rooted on I<dir>. This is useful if, for example,
you have another computer nfs mounted on /mnt, then you can use B<--root=/mnt>
to reassemble packages from that computer.

=item B<--arch=>I<architecture>

Make the package be for a specific I<architecture>. B<dpkg-repack> might not
be able to tell if an installed package is architecture B<all> or is specific
to the system's architecture, in case it lacks the B<Architecture> field. If
you know the package architecture, you can use this option to force
B<dpkg-repack> to use the right architecture.

=item B<-d>, B<--deb-option=>I<option>

Pass I<option> as build argument to B<dpkg-deb>. This option can be specified
multiple times.

=item B<--generate>

Generate a temporary directory suitable for building a package from, but do
not actually create the package. This is useful if you want to move files
around in the package before building it. The package can be built from this
temporary directory by running "B<dpkg-deb --build> I<dir> B<.>" as root
(or by using B<fakeroot -u>), where I<dir> is the generated directory.

=item B<--tag=>I<thing>[,...]

Specify a comma-separated list of things to tag in the package as having
been repackaged. The current list of I<thing>s to tag is:

=over 2

=item B<none>

Tag nothing. This can be specified first to be augmented by more specific
I<thing>s.

=item B<description>

Append a timestamped "Repackaged by dpkg-repack" tagline to the package's
control file B<Description> field. This tag is enabled by default.

=item B<version>

Append a "+repack" tag to the package version.

=item B<all>

Tag everything.

=back

=item I<package-name>

The name of the package to attempt to repack. Multiple packages can be listed.

=back

=head1 BUGS

There is a tricky situation that can occur if you B<dpkg-repack> a package
that has modified conffiles. The modified conffiles are packed up. Now if
you install the package, B<dpkg>(1) does not realize that the conffiles
in it are modified. So if you later upgrade to a new version of the package,
B<dpkg>(1) will believe that the old (repacked) package has older conffiles
than the new version, and will silently replace the conffiles with those in
the package you are upgrading to.

While B<dpkg-repack> can be run under B<fakeroot>(1) and will work most of
the time, B<fakeroot -u> must be used if any of the files to be repacked
are owned by non-root users. Otherwise the package will have them owned by
root. B<dpkg-repack> will warn if you run it under B<fakeroot>(1) without
the B<-u> flag.

=head1 SEE ALSO

B<dpkg>(1),
B<dpkg-deb>(1),
B<fakeroot>(1).