Merge lp:~serge-hallyn/ubuntu/natty/multipath-tools/debe1 into lp:ubuntu/natty/multipath-tools
- Natty (11.04)
- debe1
- Merge into natty
Status: | Needs review |
---|---|
Proposed branch: | lp:~serge-hallyn/ubuntu/natty/multipath-tools/debe1 |
Merge into: | lp:ubuntu/natty/multipath-tools |
Diff against target: |
38058 lines (+36955/-0) (has conflicts) 215 files modified
.gitignore (+10/-0) AUTHOR (+1/-0) COPYING (+483/-0) ChangeLog (+6/-0) FAQ (+97/-0) Makefile (+72/-0) Makefile.inc (+44/-0) README (+1/-0) TODO (+1/-0) debian/NEWS (+21/-0) debian/README.source (+57/-0) debian/changelog (+526/-0) debian/compat (+1/-0) debian/control (+60/-0) debian/copyright (+12/-0) debian/dmsetup_env (+31/-0) debian/initramfs/hooks (+65/-0) debian/initramfs/local-top (+60/-0) debian/kpartx.install (+4/-0) debian/kpartx.manpages (+1/-0) debian/kpartx.postinst (+49/-0) debian/kpartx.udev (+45/-0) debian/multipath-tools-boot.config (+13/-0) debian/multipath-tools-boot.postinst (+34/-0) debian/multipath-tools-boot.postrm (+45/-0) debian/multipath-tools-boot.templates (+10/-0) debian/multipath-tools.README.Debian (+71/-0) debian/multipath-tools.docs (+2/-0) debian/multipath-tools.examples (+2/-0) debian/multipath-tools.init (+57/-0) debian/multipath-tools.install (+4/-0) debian/multipath-tools.postinst (+49/-0) debian/multipath-tools.preinst (+43/-0) debian/multipath-tools.prerm (+22/-0) debian/multipath-udeb.install (+4/-0) debian/multipath.udev (+12/-0) debian/patches/0001-blacklist-cciss-devices.patch (+29/-0) debian/patches/0002-Make-user_friendly_names-compatible-to-multipath-too.patch (+60/-0) debian/patches/0003-explicitly-include-posix_types.h.patch (+36/-0) debian/patches/1000--set-umask-in-multipathd.patch (+29/-0) debian/patches/1001--fix-linking-command.patch (+18/-0) debian/patches/series (+5/-0) debian/po/POTFILES.in (+1/-0) debian/po/cs.po (+49/-0) debian/po/de.po (+46/-0) debian/po/es.po (+75/-0) debian/po/fr.po (+51/-0) debian/po/ja.po (+45/-0) debian/po/pt.po (+48/-0) debian/po/ru.po (+50/-0) debian/po/sv.po (+49/-0) debian/po/templates.pot (+41/-0) debian/reportbug/script (+15/-0) debian/rules (+88/-0) debian/watch (+3/-0) getuid/usb_id (+6/-0) kpartx/ChangeLog (+9/-0) kpartx/Makefile (+35/-0) kpartx/README (+9/-0) kpartx/bsd.c (+114/-0) kpartx/byteorder.h (+25/-0) kpartx/crc32.c (+393/-0) kpartx/crc32.h (+19/-0) kpartx/dasd.c (+262/-0) kpartx/dasd.h (+293/-0) kpartx/devmapper.c (+270/-0) kpartx/devmapper.h (+13/-0) kpartx/dos.c (+105/-0) kpartx/dos.h (+13/-0) kpartx/efi.h (+58/-0) kpartx/gpt.c (+647/-0) kpartx/gpt.h (+131/-0) kpartx/kpartx.8 (+42/-0) kpartx/kpartx.c (+644/-0) kpartx/kpartx.h (+50/-0) kpartx/kpartx.rules (+36/-0) kpartx/kpartx_id (+93/-0) kpartx/lopart.c (+306/-0) kpartx/lopart.h (+6/-0) kpartx/mac.c (+47/-0) kpartx/mac.h (+30/-0) kpartx/solaris.c (+71/-0) kpartx/sun.c (+131/-0) kpartx/sysmacros.h (+9/-0) kpartx/unixware.c (+83/-0) kpartx/xstrncpy.c (+10/-0) kpartx/xstrncpy.h (+1/-0) libmultipath/Makefile (+41/-0) libmultipath/alias.c (+450/-0) libmultipath/alias.h (+12/-0) libmultipath/blacklist.c (+360/-0) libmultipath/blacklist.h (+39/-0) libmultipath/callout.c (+224/-0) libmultipath/callout.h (+7/-0) libmultipath/checkers.c (+201/-0) libmultipath/checkers.h (+132/-0) libmultipath/checkers/Makefile (+33/-0) libmultipath/checkers/cciss.h (+142/-0) libmultipath/checkers/cciss_tur.c (+137/-0) libmultipath/checkers/directio.c (+202/-0) libmultipath/checkers/directio.h (+8/-0) libmultipath/checkers/emc_clariion.c (+234/-0) libmultipath/checkers/emc_clariion.h (+8/-0) libmultipath/checkers/hp_sw.c (+142/-0) libmultipath/checkers/hp_sw.h (+8/-0) libmultipath/checkers/libsg.c (+95/-0) libmultipath/checkers/libsg.h (+8/-0) libmultipath/checkers/rdac.c (+132/-0) libmultipath/checkers/rdac.h (+8/-0) libmultipath/checkers/readsector0.c (+46/-0) libmultipath/checkers/readsector0.h (+8/-0) libmultipath/checkers/tur.c (+115/-0) libmultipath/checkers/tur.h (+8/-0) libmultipath/config.c (+544/-0) libmultipath/config.h (+135/-0) libmultipath/configure.c (+682/-0) libmultipath/configure.h (+31/-0) libmultipath/debug.c (+39/-0) libmultipath/debug.h (+13/-0) libmultipath/defaults.c (+23/-0) libmultipath/defaults.h (+24/-0) libmultipath/devmapper.c (+1121/-0) libmultipath/devmapper.h (+42/-0) libmultipath/dict.c (+2210/-0) libmultipath/dict.h (+10/-0) libmultipath/discovery.c (+890/-0) libmultipath/discovery.h (+59/-0) libmultipath/dmparser.c (+530/-0) libmultipath/dmparser.h (+3/-0) libmultipath/hwtable.c (+1138/-0) libmultipath/hwtable.h (+6/-0) libmultipath/list.h (+289/-0) libmultipath/lock.c (+18/-0) libmultipath/lock.h (+34/-0) libmultipath/log.c (+195/-0) libmultipath/log.h (+42/-0) libmultipath/log_pthread.c (+104/-0) libmultipath/log_pthread.h (+16/-0) libmultipath/memory.c (+474/-0) libmultipath/memory.h (+76/-0) libmultipath/parser.c (+504/-0) libmultipath/parser.h (+83/-0) libmultipath/pgpolicies.c (+349/-0) libmultipath/pgpolicies.h (+34/-0) libmultipath/print.c (+1392/-0) libmultipath/print.h (+62/-0) libmultipath/prio.c (+102/-0) libmultipath/prio.h (+57/-0) libmultipath/prioritizers/Makefile (+35/-0) libmultipath/prioritizers/alua.c (+109/-0) libmultipath/prioritizers/alua.h (+9/-0) libmultipath/prioritizers/alua_rtpg.c (+304/-0) libmultipath/prioritizers/alua_rtpg.h (+30/-0) libmultipath/prioritizers/alua_spc3.h (+322/-0) libmultipath/prioritizers/const.c (+8/-0) libmultipath/prioritizers/datacore.c (+112/-0) libmultipath/prioritizers/emc.c (+79/-0) libmultipath/prioritizers/hds.c (+170/-0) libmultipath/prioritizers/hp_sw.c (+100/-0) libmultipath/prioritizers/netapp.c (+243/-0) libmultipath/prioritizers/random.c (+15/-0) libmultipath/prioritizers/rdac.c (+91/-0) libmultipath/propsel.c (+525/-0) libmultipath/propsel.h (+19/-0) libmultipath/regex.c (+4032/-0) libmultipath/regex.h (+252/-0) libmultipath/sg_include.h (+25/-0) libmultipath/structs.c (+392/-0) libmultipath/structs.h (+248/-0) libmultipath/structs_vec.c (+565/-0) libmultipath/structs_vec.h (+40/-0) libmultipath/switchgroup.c (+63/-0) libmultipath/switchgroup.h (+2/-0) libmultipath/sysfs.c (+611/-0) libmultipath/sysfs.h (+27/-0) libmultipath/uevent.c (+355/-0) libmultipath/uevent.h (+20/-0) libmultipath/util.c (+158/-0) libmultipath/util.h (+18/-0) libmultipath/uxsock.c (+164/-0) libmultipath/uxsock.h (+7/-0) libmultipath/vector.c (+151/-0) libmultipath/vector.h (+56/-0) libmultipath/version.h (+37/-0) libmultipath/waiter.c (+239/-0) libmultipath/waiter.h (+22/-0) multipath-tools.spec.in (+58/-0) multipath.conf.annotated (+591/-0) multipath.conf.defaults (+692/-0) multipath.conf.synthetic (+74/-0) multipath/01_udev (+50/-0) multipath/02_multipath (+33/-0) multipath/Makefile (+38/-0) multipath/dev_t.h (+15/-0) multipath/main.c (+477/-0) multipath/multipath.8 (+84/-0) multipath/multipath.conf.5 (+434/-0) multipath/multipath.rules (+7/-0) multipathd/Makefile (+48/-0) multipathd/cli.c (+555/-0) multipathd/cli.h (+84/-0) multipathd/cli_handlers.c (+768/-0) multipathd/cli_handlers.h (+29/-0) multipathd/main.c (+1620/-0) multipathd/main.h (+13/-0) multipathd/multipathd.8 (+114/-0) multipathd/multipathd.init.debian (+35/-0) multipathd/multipathd.init.redhat (+146/-0) multipathd/multipathd.init.suse (+132/-0) multipathd/pidfile.c (+67/-0) multipathd/pidfile.h (+1/-0) multipathd/uxclnt.c (+109/-0) multipathd/uxclnt.h (+1/-0) multipathd/uxlsnr.c (+173/-0) multipathd/uxlsnr.h (+7/-0) Conflict adding file AUTHOR. Moved existing file to AUTHOR.moved. Conflict adding file COPYING. Moved existing file to COPYING.moved. Conflict adding file ChangeLog. Moved existing file to ChangeLog.moved. Conflict adding file FAQ. Moved existing file to FAQ.moved. Conflict adding file Makefile.inc. Moved existing file to Makefile.inc.moved. Conflict adding file Makefile. Moved existing file to Makefile.moved. Conflict adding file README. Moved existing file to README.moved. Conflict adding file TODO. Moved existing file to TODO.moved. Conflict adding file debian. Moved existing file to debian.moved. Conflict adding file getuid. Moved existing file to getuid.moved. Conflict adding file kpartx. Moved existing file to kpartx.moved. Conflict adding file libmultipath. Moved existing file to libmultipath.moved. Conflict adding file multipath-tools.spec.in. Moved existing file to multipath-tools.spec.in.moved. Conflict adding file multipath.conf.annotated. Moved existing file to multipath.conf.annotated.moved. Conflict adding file multipath.conf.synthetic. Moved existing file to multipath.conf.synthetic.moved. Conflict adding file multipath. Moved existing file to multipath.moved. Conflict adding file multipathd. Moved existing file to multipathd.moved. |
To merge this branch: | bzr merge lp:~serge-hallyn/ubuntu/natty/multipath-tools/debe1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson | Needs Fixing | ||
Review via email: mp+45177@code.launchpad.net |
Commit message
Description of the change
This is essentially just a sync of the debian experimental multipath-tools package.
Serge Hallyn (serge-hallyn) wrote : | # |
Quoting Colin Watson (<email address hidden>):
> Review: Needs Fixing
Thanks for the review, Colin.
> This entire branch really needs to be constructed based on lp:debian/experimental/multipath-tools,
Great, I didn't know that existed :) I'll base it on that.
> I think - otherwise the bzr toolset doesn't work in a particularly friendly fashion. For example, it will be unnecessarily difficult to merge changes in future. Can you please replay your changes on top of that? (In fact, it would be best if you started with the existing lp:ubuntu/multipath-tools and then used 'bzr merge-package lp:debian/experimental/multipath-tools'.)
>
This sounds like a bad idea in principle. We have a base tree in the
debian branch, which we have forked off to make changes which were
later applied upstream and from there to the debian tree. Merging
our own tree back in to then hand-undo those changes (which are each
parts of commits which we don't want to drop entirely) seems dirty
and duplicative of the effort already spent identifying each of the
differences we do and don't want to keep. If each change was really
a separate commit in the origianl tree it might be not as bad, but even
then it still seems to be abusing a rebase to pretend that we've
actually not rebased.
In order to come up with anything reasonable, I'd have to
merge lp:ubuntu/multipath-tools in one revision at a time (akin
to a git rebase with each commit changed to an 'edit').
So I prefer to just base it on lp:debian/experimental/multipath-tools.
> Regarding the actual changes:
>
> * Maintainer is out of date - the current standard is "Ubuntu Developers <email address hidden>" (nitpick).
> * Please describe the remaining Ubuntu changes in debian/changelog, and preserve all the old Ubuntu debian/changelog entries since you're performing a merge here and that history is valuable; I shouldn't have to dig out the changelog from 0.4.8-14ubuntu1 (no longer in your package) to find out why various deltas from Debian exist. See the existing package in natty for an example.
Will do, thanks
-serge
Colin Watson (cjwatson) wrote : | # |
On Wed, Jan 05, 2011 at 07:46:53PM -0000, Serge Hallyn wrote:
> This sounds like a bad idea in principle.
Lots of other Ubuntu developers maintain packages like this, at many
different scales of complexity. It's pretty much the standard approach
for packages maintained in bzr (though the merge source varies).
I realise that the Linux kernel approach is to rebase, but this is not
usual for most userspace packages; we merge, and don't worry about there
being a "clean" commit series corresponding to each of our changes.
Management of a queue of changes to be sent upstream is typically
handled by patches in debian/patches/ instead, allowing comments on each
change to be easily visible by people who download the source package.
> In order to come up with anything reasonable, I'd have to
> merge lp:ubuntu/multipath-tools in one revision at a time (akin
> to a git rebase with each commit changed to an 'edit').
>
> So I prefer to just base it on lp:debian/experimental/multipath-tools.
This will at least not break tools (i.e. it'll be possible to do a merge
later, or even a rebase), so I would be OK with sponsoring a package
built that way. However, I do think it would be worth you getting used
to the way most Ubuntu developers maintain packages in bzr; if only
because if you're cooperating on a package with somebody else then they
will probably be most annoyed if you rebase on them. :-)
Serge Hallyn (serge-hallyn) wrote : | # |
Quoting Colin Watson (<email address hidden>):
> > So I prefer to just base it on lp:debian/experimental/multipath-tools.
>
> This will at least not break tools (i.e. it'll be possible to do a merge
> later, or even a rebase), so I would be OK with sponsoring a package
> built that way. However, I do think it would be worth you getting used
> to the way most Ubuntu developers maintain packages in bzr; if only
> because if you're cooperating on a package with somebody else then they
> will probably be most annoyed if you rebase on them. :-)
Ok, I'll do that then.
thanks,
-serge
Unmerged revisions
- 9. By Serge Hallyn
-
debian/
patches/ 1001--fix- linking- command. patch
Description: Specify LDFLAGS after objects
Otherwise linking fails. Not (yet) sent upstream, may be
specific to Ubuntu toolchain since someone otherwise surely
would have noticed failure to build. - 8. By Serge Hallyn
-
Sync remaining differences in debian/control from Ubuntu version
- 7. By Serge Hallyn
-
Merge in changes from Ubuntu's initramfs/hooks
- 6. By Serge Hallyn
-
Old commit (ubuntu-specific): debian/control
+ Bump debhelper dependency to install udev rules to
/lib/udev/rules.d, bump udev dependencies as well.
+ multipath-udeb must not depend on multipath-modules,
because the Ubuntu kernel already includes the modules and no
package provides m-m. - 5. By Serge Hallyn
-
Old commit: rules: Move udev rules to priority 95, because rules that load
modules should be >90. - 4. By Serge Hallyn
-
Old commit: patches/
1000--set- umask-in- multipathd. patch: Set umask in multipathd. - 3. By Serge Hallyn
-
Old commit: multipath-
tools.preinst: Fix preinst script to modprobe dm-multipath.
This will make sure that multipathd will be able to start. - 2. By Serge Hallyn
-
Apply old ubuntu-specific commit:
kpartx.udev, multipath-
tools-boot. init:
Replace multipath-tools-boot init script with udev rules. - 1. By Serge Hallyn
-
New multipath tree based on Debian experimental
I'll add ubuntu-specific fixes I think we need here, one tiny
revision at a time.
Preview Diff
1 | === added file '.gitignore' |
2 | --- .gitignore 1970-01-01 00:00:00 +0000 |
3 | +++ .gitignore 2011-01-04 21:28:57 +0000 |
4 | @@ -0,0 +1,10 @@ |
5 | +*.o |
6 | +.dotest |
7 | +*~ |
8 | +*.so |
9 | +*.so.0 |
10 | +*.a |
11 | +*.gz |
12 | +kpartx |
13 | +multipath |
14 | +multipathd |
15 | |
16 | === added file 'AUTHOR' |
17 | --- AUTHOR 1970-01-01 00:00:00 +0000 |
18 | +++ AUTHOR 2011-01-04 21:28:57 +0000 |
19 | @@ -0,0 +1,1 @@ |
20 | +Christophe Varoqui, <christophe.varoqui@opensvc.com> |
21 | |
22 | === renamed file 'AUTHOR' => 'AUTHOR.moved' |
23 | === added file 'COPYING' |
24 | --- COPYING 1970-01-01 00:00:00 +0000 |
25 | +++ COPYING 2011-01-04 21:28:57 +0000 |
26 | @@ -0,0 +1,483 @@ |
27 | + |
28 | + GNU LIBRARY GENERAL PUBLIC LICENSE |
29 | + Version 2, June 1991 |
30 | + |
31 | + Copyright (C) 1991 Free Software Foundation, Inc. |
32 | + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
33 | + Everyone is permitted to copy and distribute verbatim copies |
34 | + of this license document, but changing it is not allowed. |
35 | + |
36 | +[This is the first released version of the library GPL. It is |
37 | + numbered 2 because it goes with version 2 of the ordinary GPL.] |
38 | + |
39 | + Preamble |
40 | + |
41 | + The licenses for most software are designed to take away your |
42 | +freedom to share and change it. By contrast, the GNU General Public |
43 | +Licenses are intended to guarantee your freedom to share and change |
44 | +free software--to make sure the software is free for all its users. |
45 | + |
46 | + This license, the Library General Public License, applies to some |
47 | +specially designated Free Software Foundation software, and to any |
48 | +other libraries whose authors decide to use it. You can use it for |
49 | +your libraries, too. |
50 | + |
51 | + When we speak of free software, we are referring to freedom, not |
52 | +price. Our General Public Licenses are designed to make sure that you |
53 | +have the freedom to distribute copies of free software (and charge for |
54 | +this service if you wish), that you receive source code or can get it |
55 | +if you want it, that you can change the software or use pieces of it |
56 | +in new free programs; and that you know you can do these things. |
57 | + |
58 | + To protect your rights, we need to make restrictions that forbid |
59 | +anyone to deny you these rights or to ask you to surrender the rights. |
60 | +These restrictions translate to certain responsibilities for you if |
61 | +you distribute copies of the library, or if you modify it. |
62 | + |
63 | + For example, if you distribute copies of the library, whether gratis |
64 | +or for a fee, you must give the recipients all the rights that we gave |
65 | +you. You must make sure that they, too, receive or can get the source |
66 | +code. If you link a program with the library, you must provide |
67 | +complete object files to the recipients so that they can relink them |
68 | +with the library, after making changes to the library and recompiling |
69 | +it. And you must show them these terms so they know their rights. |
70 | + |
71 | + Our method of protecting your rights has two steps: (1) copyright |
72 | +the library, and (2) offer you this license which gives you legal |
73 | +permission to copy, distribute and/or modify the library. |
74 | + |
75 | + Also, for each distributor's protection, we want to make certain |
76 | +that everyone understands that there is no warranty for this free |
77 | +library. If the library is modified by someone else and passed on, we |
78 | +want its recipients to know that what they have is not the original |
79 | +version, so that any problems introduced by others will not reflect on |
80 | +the original authors' reputations. |
81 | + |
82 | |
83 | + Finally, any free program is threatened constantly by software |
84 | +patents. We wish to avoid the danger that companies distributing free |
85 | +software will individually obtain patent licenses, thus in effect |
86 | +transforming the program into proprietary software. To prevent this, |
87 | +we have made it clear that any patent must be licensed for everyone's |
88 | +free use or not licensed at all. |
89 | + |
90 | + Most GNU software, including some libraries, is covered by the ordinary |
91 | +GNU General Public License, which was designed for utility programs. This |
92 | +license, the GNU Library General Public License, applies to certain |
93 | +designated libraries. This license is quite different from the ordinary |
94 | +one; be sure to read it in full, and don't assume that anything in it is |
95 | +the same as in the ordinary license. |
96 | + |
97 | + The reason we have a separate public license for some libraries is that |
98 | +they blur the distinction we usually make between modifying or adding to a |
99 | +program and simply using it. Linking a program with a library, without |
100 | +changing the library, is in some sense simply using the library, and is |
101 | +analogous to running a utility program or application program. However, in |
102 | +a textual and legal sense, the linked executable is a combined work, a |
103 | +derivative of the original library, and the ordinary General Public License |
104 | +treats it as such. |
105 | + |
106 | + Because of this blurred distinction, using the ordinary General |
107 | +Public License for libraries did not effectively promote software |
108 | +sharing, because most developers did not use the libraries. We |
109 | +concluded that weaker conditions might promote sharing better. |
110 | + |
111 | + However, unrestricted linking of non-free programs would deprive the |
112 | +users of those programs of all benefit from the free status of the |
113 | +libraries themselves. This Library General Public License is intended to |
114 | +permit developers of non-free programs to use free libraries, while |
115 | +preserving your freedom as a user of such programs to change the free |
116 | +libraries that are incorporated in them. (We have not seen how to achieve |
117 | +this as regards changes in header files, but we have achieved it as regards |
118 | +changes in the actual functions of the Library.) The hope is that this |
119 | +will lead to faster development of free libraries. |
120 | + |
121 | + The precise terms and conditions for copying, distribution and |
122 | +modification follow. Pay close attention to the difference between a |
123 | +"work based on the library" and a "work that uses the library". The |
124 | +former contains code derived from the library, while the latter only |
125 | +works together with the library. |
126 | + |
127 | + Note that it is possible for a library to be covered by the ordinary |
128 | +General Public License rather than by this special one. |
129 | + |
130 | |
131 | + GNU LIBRARY GENERAL PUBLIC LICENSE |
132 | + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
133 | + |
134 | + 0. This License Agreement applies to any software library which |
135 | +contains a notice placed by the copyright holder or other authorized |
136 | +party saying it may be distributed under the terms of this Library |
137 | +General Public License (also called "this License"). Each licensee is |
138 | +addressed as "you". |
139 | + |
140 | + A "library" means a collection of software functions and/or data |
141 | +prepared so as to be conveniently linked with application programs |
142 | +(which use some of those functions and data) to form executables. |
143 | + |
144 | + The "Library", below, refers to any such software library or work |
145 | +which has been distributed under these terms. A "work based on the |
146 | +Library" means either the Library or any derivative work under |
147 | +copyright law: that is to say, a work containing the Library or a |
148 | +portion of it, either verbatim or with modifications and/or translated |
149 | +straightforwardly into another language. (Hereinafter, translation is |
150 | +included without limitation in the term "modification".) |
151 | + |
152 | + "Source code" for a work means the preferred form of the work for |
153 | +making modifications to it. For a library, complete source code means |
154 | +all the source code for all modules it contains, plus any associated |
155 | +interface definition files, plus the scripts used to control compilation |
156 | +and installation of the library. |
157 | + |
158 | + Activities other than copying, distribution and modification are not |
159 | +covered by this License; they are outside its scope. The act of |
160 | +running a program using the Library is not restricted, and output from |
161 | +such a program is covered only if its contents constitute a work based |
162 | +on the Library (independent of the use of the Library in a tool for |
163 | +writing it). Whether that is true depends on what the Library does |
164 | +and what the program that uses the Library does. |
165 | + |
166 | + 1. You may copy and distribute verbatim copies of the Library's |
167 | +complete source code as you receive it, in any medium, provided that |
168 | +you conspicuously and appropriately publish on each copy an |
169 | +appropriate copyright notice and disclaimer of warranty; keep intact |
170 | +all the notices that refer to this License and to the absence of any |
171 | +warranty; and distribute a copy of this License along with the |
172 | +Library. |
173 | + |
174 | + You may charge a fee for the physical act of transferring a copy, |
175 | +and you may at your option offer warranty protection in exchange for a |
176 | +fee. |
177 | + |
178 | |
179 | + 2. You may modify your copy or copies of the Library or any portion |
180 | +of it, thus forming a work based on the Library, and copy and |
181 | +distribute such modifications or work under the terms of Section 1 |
182 | +above, provided that you also meet all of these conditions: |
183 | + |
184 | + a) The modified work must itself be a software library. |
185 | + |
186 | + b) You must cause the files modified to carry prominent notices |
187 | + stating that you changed the files and the date of any change. |
188 | + |
189 | + c) You must cause the whole of the work to be licensed at no |
190 | + charge to all third parties under the terms of this License. |
191 | + |
192 | + d) If a facility in the modified Library refers to a function or a |
193 | + table of data to be supplied by an application program that uses |
194 | + the facility, other than as an argument passed when the facility |
195 | + is invoked, then you must make a good faith effort to ensure that, |
196 | + in the event an application does not supply such function or |
197 | + table, the facility still operates, and performs whatever part of |
198 | + its purpose remains meaningful. |
199 | + |
200 | + (For example, a function in a library to compute square roots has |
201 | + a purpose that is entirely well-defined independent of the |
202 | + application. Therefore, Subsection 2d requires that any |
203 | + application-supplied function or table used by this function must |
204 | + be optional: if the application does not supply it, the square |
205 | + root function must still compute square roots.) |
206 | + |
207 | +These requirements apply to the modified work as a whole. If |
208 | +identifiable sections of that work are not derived from the Library, |
209 | +and can be reasonably considered independent and separate works in |
210 | +themselves, then this License, and its terms, do not apply to those |
211 | +sections when you distribute them as separate works. But when you |
212 | +distribute the same sections as part of a whole which is a work based |
213 | +on the Library, the distribution of the whole must be on the terms of |
214 | +this License, whose permissions for other licensees extend to the |
215 | +entire whole, and thus to each and every part regardless of who wrote |
216 | +it. |
217 | + |
218 | +Thus, it is not the intent of this section to claim rights or contest |
219 | +your rights to work written entirely by you; rather, the intent is to |
220 | +exercise the right to control the distribution of derivative or |
221 | +collective works based on the Library. |
222 | + |
223 | +In addition, mere aggregation of another work not based on the Library |
224 | +with the Library (or with a work based on the Library) on a volume of |
225 | +a storage or distribution medium does not bring the other work under |
226 | +the scope of this License. |
227 | + |
228 | + 3. You may opt to apply the terms of the ordinary GNU General Public |
229 | +License instead of this License to a given copy of the Library. To do |
230 | +this, you must alter all the notices that refer to this License, so |
231 | +that they refer to the ordinary GNU General Public License, version 2, |
232 | +instead of to this License. (If a newer version than version 2 of the |
233 | +ordinary GNU General Public License has appeared, then you can specify |
234 | +that version instead if you wish.) Do not make any other change in |
235 | +these notices. |
236 | + |
237 | |
238 | + Once this change is made in a given copy, it is irreversible for |
239 | +that copy, so the ordinary GNU General Public License applies to all |
240 | +subsequent copies and derivative works made from that copy. |
241 | + |
242 | + This option is useful when you wish to copy part of the code of |
243 | +the Library into a program that is not a library. |
244 | + |
245 | + 4. You may copy and distribute the Library (or a portion or |
246 | +derivative of it, under Section 2) in object code or executable form |
247 | +under the terms of Sections 1 and 2 above provided that you accompany |
248 | +it with the complete corresponding machine-readable source code, which |
249 | +must be distributed under the terms of Sections 1 and 2 above on a |
250 | +medium customarily used for software interchange. |
251 | + |
252 | + If distribution of object code is made by offering access to copy |
253 | +from a designated place, then offering equivalent access to copy the |
254 | +source code from the same place satisfies the requirement to |
255 | +distribute the source code, even though third parties are not |
256 | +compelled to copy the source along with the object code. |
257 | + |
258 | + 5. A program that contains no derivative of any portion of the |
259 | +Library, but is designed to work with the Library by being compiled or |
260 | +linked with it, is called a "work that uses the Library". Such a |
261 | +work, in isolation, is not a derivative work of the Library, and |
262 | +therefore falls outside the scope of this License. |
263 | + |
264 | + However, linking a "work that uses the Library" with the Library |
265 | +creates an executable that is a derivative of the Library (because it |
266 | +contains portions of the Library), rather than a "work that uses the |
267 | +library". The executable is therefore covered by this License. |
268 | +Section 6 states terms for distribution of such executables. |
269 | + |
270 | + When a "work that uses the Library" uses material from a header file |
271 | +that is part of the Library, the object code for the work may be a |
272 | +derivative work of the Library even though the source code is not. |
273 | +Whether this is true is especially significant if the work can be |
274 | +linked without the Library, or if the work is itself a library. The |
275 | +threshold for this to be true is not precisely defined by law. |
276 | + |
277 | + If such an object file uses only numerical parameters, data |
278 | +structure layouts and accessors, and small macros and small inline |
279 | +functions (ten lines or less in length), then the use of the object |
280 | +file is unrestricted, regardless of whether it is legally a derivative |
281 | +work. (Executables containing this object code plus portions of the |
282 | +Library will still fall under Section 6.) |
283 | + |
284 | + Otherwise, if the work is a derivative of the Library, you may |
285 | +distribute the object code for the work under the terms of Section 6. |
286 | +Any executables containing that work also fall under Section 6, |
287 | +whether or not they are linked directly with the Library itself. |
288 | + |
289 | |
290 | + 6. As an exception to the Sections above, you may also compile or |
291 | +link a "work that uses the Library" with the Library to produce a |
292 | +work containing portions of the Library, and distribute that work |
293 | +under terms of your choice, provided that the terms permit |
294 | +modification of the work for the customer's own use and reverse |
295 | +engineering for debugging such modifications. |
296 | + |
297 | + You must give prominent notice with each copy of the work that the |
298 | +Library is used in it and that the Library and its use are covered by |
299 | +this License. You must supply a copy of this License. If the work |
300 | +during execution displays copyright notices, you must include the |
301 | +copyright notice for the Library among them, as well as a reference |
302 | +directing the user to the copy of this License. Also, you must do one |
303 | +of these things: |
304 | + |
305 | + a) Accompany the work with the complete corresponding |
306 | + machine-readable source code for the Library including whatever |
307 | + changes were used in the work (which must be distributed under |
308 | + Sections 1 and 2 above); and, if the work is an executable linked |
309 | + with the Library, with the complete machine-readable "work that |
310 | + uses the Library", as object code and/or source code, so that the |
311 | + user can modify the Library and then relink to produce a modified |
312 | + executable containing the modified Library. (It is understood |
313 | + that the user who changes the contents of definitions files in the |
314 | + Library will not necessarily be able to recompile the application |
315 | + to use the modified definitions.) |
316 | + |
317 | + b) Accompany the work with a written offer, valid for at |
318 | + least three years, to give the same user the materials |
319 | + specified in Subsection 6a, above, for a charge no more |
320 | + than the cost of performing this distribution. |
321 | + |
322 | + c) If distribution of the work is made by offering access to copy |
323 | + from a designated place, offer equivalent access to copy the above |
324 | + specified materials from the same place. |
325 | + |
326 | + d) Verify that the user has already received a copy of these |
327 | + materials or that you have already sent this user a copy. |
328 | + |
329 | + For an executable, the required form of the "work that uses the |
330 | +Library" must include any data and utility programs needed for |
331 | +reproducing the executable from it. However, as a special exception, |
332 | +the source code distributed need not include anything that is normally |
333 | +distributed (in either source or binary form) with the major |
334 | +components (compiler, kernel, and so on) of the operating system on |
335 | +which the executable runs, unless that component itself accompanies |
336 | +the executable. |
337 | + |
338 | + It may happen that this requirement contradicts the license |
339 | +restrictions of other proprietary libraries that do not normally |
340 | +accompany the operating system. Such a contradiction means you cannot |
341 | +use both them and the Library together in an executable that you |
342 | +distribute. |
343 | + |
344 | |
345 | + 7. You may place library facilities that are a work based on the |
346 | +Library side-by-side in a single library together with other library |
347 | +facilities not covered by this License, and distribute such a combined |
348 | +library, provided that the separate distribution of the work based on |
349 | +the Library and of the other library facilities is otherwise |
350 | +permitted, and provided that you do these two things: |
351 | + |
352 | + a) Accompany the combined library with a copy of the same work |
353 | + based on the Library, uncombined with any other library |
354 | + facilities. This must be distributed under the terms of the |
355 | + Sections above. |
356 | + |
357 | + b) Give prominent notice with the combined library of the fact |
358 | + that part of it is a work based on the Library, and explaining |
359 | + where to find the accompanying uncombined form of the same work. |
360 | + |
361 | + 8. You may not copy, modify, sublicense, link with, or distribute |
362 | +the Library except as expressly provided under this License. Any |
363 | +attempt otherwise to copy, modify, sublicense, link with, or |
364 | +distribute the Library is void, and will automatically terminate your |
365 | +rights under this License. However, parties who have received copies, |
366 | +or rights, from you under this License will not have their licenses |
367 | +terminated so long as such parties remain in full compliance. |
368 | + |
369 | + 9. You are not required to accept this License, since you have not |
370 | +signed it. However, nothing else grants you permission to modify or |
371 | +distribute the Library or its derivative works. These actions are |
372 | +prohibited by law if you do not accept this License. Therefore, by |
373 | +modifying or distributing the Library (or any work based on the |
374 | +Library), you indicate your acceptance of this License to do so, and |
375 | +all its terms and conditions for copying, distributing or modifying |
376 | +the Library or works based on it. |
377 | + |
378 | + 10. Each time you redistribute the Library (or any work based on the |
379 | +Library), the recipient automatically receives a license from the |
380 | +original licensor to copy, distribute, link with or modify the Library |
381 | +subject to these terms and conditions. You may not impose any further |
382 | +restrictions on the recipients' exercise of the rights granted herein. |
383 | +You are not responsible for enforcing compliance by third parties to |
384 | +this License. |
385 | + |
386 | |
387 | + 11. If, as a consequence of a court judgment or allegation of patent |
388 | +infringement or for any other reason (not limited to patent issues), |
389 | +conditions are imposed on you (whether by court order, agreement or |
390 | +otherwise) that contradict the conditions of this License, they do not |
391 | +excuse you from the conditions of this License. If you cannot |
392 | +distribute so as to satisfy simultaneously your obligations under this |
393 | +License and any other pertinent obligations, then as a consequence you |
394 | +may not distribute the Library at all. For example, if a patent |
395 | +license would not permit royalty-free redistribution of the Library by |
396 | +all those who receive copies directly or indirectly through you, then |
397 | +the only way you could satisfy both it and this License would be to |
398 | +refrain entirely from distribution of the Library. |
399 | + |
400 | +If any portion of this section is held invalid or unenforceable under any |
401 | +particular circumstance, the balance of the section is intended to apply, |
402 | +and the section as a whole is intended to apply in other circumstances. |
403 | + |
404 | +It is not the purpose of this section to induce you to infringe any |
405 | +patents or other property right claims or to contest validity of any |
406 | +such claims; this section has the sole purpose of protecting the |
407 | +integrity of the free software distribution system which is |
408 | +implemented by public license practices. Many people have made |
409 | +generous contributions to the wide range of software distributed |
410 | +through that system in reliance on consistent application of that |
411 | +system; it is up to the author/donor to decide if he or she is willing |
412 | +to distribute software through any other system and a licensee cannot |
413 | +impose that choice. |
414 | + |
415 | +This section is intended to make thoroughly clear what is believed to |
416 | +be a consequence of the rest of this License. |
417 | + |
418 | + 12. If the distribution and/or use of the Library is restricted in |
419 | +certain countries either by patents or by copyrighted interfaces, the |
420 | +original copyright holder who places the Library under this License may add |
421 | +an explicit geographical distribution limitation excluding those countries, |
422 | +so that distribution is permitted only in or among countries not thus |
423 | +excluded. In such case, this License incorporates the limitation as if |
424 | +written in the body of this License. |
425 | + |
426 | + 13. The Free Software Foundation may publish revised and/or new |
427 | +versions of the Library General Public License from time to time. |
428 | +Such new versions will be similar in spirit to the present version, |
429 | +but may differ in detail to address new problems or concerns. |
430 | + |
431 | +Each version is given a distinguishing version number. If the Library |
432 | +specifies a version number of this License which applies to it and |
433 | +"any later version", you have the option of following the terms and |
434 | +conditions either of that version or of any later version published by |
435 | +the Free Software Foundation. If the Library does not specify a |
436 | +license version number, you may choose any version ever published by |
437 | +the Free Software Foundation. |
438 | + |
439 | |
440 | + 14. If you wish to incorporate parts of the Library into other free |
441 | +programs whose distribution conditions are incompatible with these, |
442 | +write to the author to ask for permission. For software which is |
443 | +copyrighted by the Free Software Foundation, write to the Free |
444 | +Software Foundation; we sometimes make exceptions for this. Our |
445 | +decision will be guided by the two goals of preserving the free status |
446 | +of all derivatives of our free software and of promoting the sharing |
447 | +and reuse of software generally. |
448 | + |
449 | + NO WARRANTY |
450 | + |
451 | + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO |
452 | +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. |
453 | +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR |
454 | +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY |
455 | +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE |
456 | +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
457 | +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE |
458 | +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME |
459 | +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
460 | + |
461 | + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN |
462 | +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY |
463 | +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU |
464 | +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR |
465 | +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE |
466 | +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING |
467 | +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A |
468 | +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF |
469 | +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
470 | +DAMAGES. |
471 | + |
472 | + END OF TERMS AND CONDITIONS |
473 | + |
474 | |
475 | + Appendix: How to Apply These Terms to Your New Libraries |
476 | + |
477 | + If you develop a new library, and you want it to be of the greatest |
478 | +possible use to the public, we recommend making it free software that |
479 | +everyone can redistribute and change. You can do so by permitting |
480 | +redistribution under these terms (or, alternatively, under the terms of the |
481 | +ordinary General Public License). |
482 | + |
483 | + To apply these terms, attach the following notices to the library. It is |
484 | +safest to attach them to the start of each source file to most effectively |
485 | +convey the exclusion of warranty; and each file should have at least the |
486 | +"copyright" line and a pointer to where the full notice is found. |
487 | + |
488 | + <one line to give the library's name and a brief idea of what it does.> |
489 | + Copyright (C) <year> <name of author> |
490 | + |
491 | + This library is free software; you can redistribute it and/or |
492 | + modify it under the terms of the GNU Library General Public |
493 | + License as published by the Free Software Foundation; either |
494 | + version 2 of the License, or (at your option) any later version. |
495 | + |
496 | + This library is distributed in the hope that it will be useful, |
497 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
498 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
499 | + Library General Public License for more details. |
500 | + |
501 | + You should have received a copy of the GNU Library General Public |
502 | + License along with this library; if not, write to the Free |
503 | + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
504 | + MA 02111-1307, USA |
505 | + |
506 | +Also add information on how to contact you by electronic and paper mail. |
507 | + |
508 | +You should also get your employer (if you work as a programmer) or your |
509 | +school, if any, to sign a "copyright disclaimer" for the library, if |
510 | +necessary. Here is a sample; alter the names: |
511 | + |
512 | + Yoyodyne, Inc., hereby disclaims all copyright interest in the |
513 | + library `Frob' (a library for tweaking knobs) written by James Random Hacker. |
514 | + |
515 | + <signature of Ty Coon>, 1 April 1990 |
516 | + Ty Coon, President of Vice |
517 | + |
518 | +That's all there is to it! |
519 | |
520 | === renamed file 'COPYING' => 'COPYING.moved' |
521 | === added file 'ChangeLog' |
522 | --- ChangeLog 1970-01-01 00:00:00 +0000 |
523 | +++ ChangeLog 2011-01-04 21:28:57 +0000 |
524 | @@ -0,0 +1,6 @@ |
525 | +Change logs are at : |
526 | + |
527 | +- pre-0.4.5 |
528 | + http://christophe.varoqui.free.fr/wiki/wakka.php?wiki=ChangeLog |
529 | +- post-0.4.5 |
530 | + http://www.kernel.org/git/gitweb.cgi?p=linux/storage/multipath-tools/.git;a=log |
531 | |
532 | === renamed file 'ChangeLog' => 'ChangeLog.moved' |
533 | === added file 'FAQ' |
534 | --- FAQ 1970-01-01 00:00:00 +0000 |
535 | +++ FAQ 2011-01-04 21:28:57 +0000 |
536 | @@ -0,0 +1,97 @@ |
537 | +More at http://christophe.varoqui.free.fr/faq.html |
538 | +See also http://christophe.varoqui.free.fr/usage.html |
539 | + |
540 | +1. How to set up System-on-multipath ? |
541 | +====================================== |
542 | + |
543 | +prerequisite : udev and multipath-tools installed |
544 | + |
545 | +here are the steps on a Debian SID system : |
546 | + |
547 | +* add dm-mpath and dm-multipath to /etc/mkinitrd/modules |
548 | +* copy $tools_dir/multipath/0[12]_* to /etc/mkinitrd/scripts |
549 | +* define a friendly alias for your multipathed root disk |
550 | + (in /etc/multipath.conf). Example : "system" |
551 | +* enable busybox in /etc/mkinitrd/mkinitrd.conf and set ROOT |
552 | + to any valid block-device (but not a /dev/dm-* one, due to |
553 | + an mkintrd misbelief that all dm-* are managed by LVM2) |
554 | +* run mkinitrd |
555 | +* in /boot/grub/menu.lst, define the root= kernel parameter |
556 | + Example : root=/dev/system1 |
557 | +* modify /etc/fstab to reference /dev/system* partitions |
558 | + |
559 | +At reboot, you should see some info like : |
560 | + |
561 | +path /dev/sda : multipath system |
562 | +... |
563 | +gpt: 0 slices |
564 | +dos: 5 slices |
565 | +reduced size of partition #2 to 63 |
566 | +Added system1 : 0 70685937 linear /dev/system 63 |
567 | +Added system2 : 0 63 linear /dev/system 7068600 |
568 | +Added system5 : 0 995967 linear /dev/system 70686063 |
569 | +... |
570 | + |
571 | +2. How does it compare to commercial product XXX ? |
572 | +================================================== |
573 | + |
574 | +Here are a few distinctive features : |
575 | + |
576 | +* you can mix HBA models, even different vendors, different speed ... |
577 | +* you can mix storage controllers on your SAN, and access them all, applying |
578 | + different path grouping policy |
579 | +* completely event-driven model : no administration burden if you accept the |
580 | + default behaviours |
581 | +* extensible : you can plug your own policies if the available ones don't fill |
582 | + your needs |
583 | +* supports root FS on multipathed SAN |
584 | +* free, open-source software |
585 | + |
586 | +3. LVM2 doesn't see my multipathed devices as PV, what's up ? |
587 | +============================================================= |
588 | + |
589 | +By default, lvm2 does not consider device-mapper block devices (such as a |
590 | +dm-crypt device) for use as physical volumes. |
591 | + |
592 | +In order to use a dm-crypt device as an lvm2 pv, add this line to the |
593 | +devices block in /etc/lvm/lvm.conf: |
594 | + |
595 | +types = [ "device-mapper", 16 ] |
596 | + |
597 | +If /etc/lvm/lvm.conf does not exist, you can create one based on your |
598 | +current/default config like so: |
599 | + |
600 | +lvm dumpconfig > /etc/lvm/lvm.conf |
601 | + |
602 | +(tip from Christophe Saout) |
603 | + |
604 | +4. I see a lot of "io_setup failed" message using the directio checker |
605 | +====================================================================== |
606 | + |
607 | +The directio path checker makes use of the asynchronous I/O API (aio) provided |
608 | +by modern Linux systems. Asynchronous I/O allows an application to submit I/O |
609 | +requests asynchronously and be notified later of their completion status. To |
610 | +allow this, we must allocate an asynchronous I/O context (an object of type |
611 | +aio_context_t) and this task is handled by the io_setup system call. |
612 | + |
613 | +A system wide limit on the number of AIO contexts that may be active |
614 | +simultaneously is imposed via the aio-max-nr sysctl parameter. |
615 | + |
616 | +Once this limit has been reached further calls to io_setup will fail with the |
617 | +error number EAGAIN leading to the "io_setup failed" messages seen for e.g. when |
618 | +running "multipath -ll". |
619 | + |
620 | +To avoid this problem the number of available aio contexts should be increased |
621 | +by setting the aio-max-nr parameter. This can be set on a one-time basis via the |
622 | +/proc file system, for e.g.: |
623 | + |
624 | + # echo 131072 > /proc/sys/fs/aio-max-nr |
625 | + |
626 | +Doubles the number of available contexts from the default value of 65536. |
627 | + |
628 | +To make this setting persistent a line may be added to /etc/sysctl.conf: |
629 | + |
630 | + fs.aio-max-nr = 131072 |
631 | + |
632 | +Consult appropriate application and operating system tuning recommendations for |
633 | +guidance on appropriate values for this parameter. |
634 | |
635 | === renamed file 'FAQ' => 'FAQ.moved' |
636 | === added file 'Makefile' |
637 | --- Makefile 1970-01-01 00:00:00 +0000 |
638 | +++ Makefile 2011-01-04 21:28:57 +0000 |
639 | @@ -0,0 +1,72 @@ |
640 | +# Makefile |
641 | +# |
642 | +# Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@opensvc.com> |
643 | +# |
644 | + |
645 | +# |
646 | +# Try to supply the linux kernel headers. |
647 | +# |
648 | +ifeq ($(KRNLSRC),) |
649 | +KRNLLIB = /lib/modules/$(shell uname -r) |
650 | +ifeq ($(shell test -r $(KRNLLIB)/source && echo 1),1) |
651 | +KRNLSRC = $(KRNLLIB)/source |
652 | +KRNLOBJ = $(KRNLLIB)/build |
653 | +else |
654 | +KRNLSRC = $(KRNLLIB)/build |
655 | +KRNLOBJ = $(KRNLLIB)/build |
656 | +endif |
657 | +endif |
658 | +export KRNLSRC |
659 | +export KRNLOBJ |
660 | + |
661 | +BUILDDIRS = \ |
662 | + libmultipath \ |
663 | + libmultipath/prioritizers \ |
664 | + libmultipath/checkers \ |
665 | + multipath \ |
666 | + multipathd \ |
667 | + kpartx |
668 | + |
669 | +ifeq ($(MULTIPATH_VERSION),) |
670 | +VERSION = $(shell basename ${PWD} | cut -d'-' -f3) |
671 | +else |
672 | +VERSION = $(MULTIPATH_VERSION) |
673 | +endif |
674 | + |
675 | +all: recurse |
676 | + |
677 | +recurse: |
678 | + @for dir in $(BUILDDIRS); do \ |
679 | + $(MAKE) -C $$dir BUILD=$(BUILD) VERSION=$(VERSION) \ |
680 | + KRNLSRC=$(KRNLSRC) KRNLOBJ=$(KRNLOBJ) || exit $?; \ |
681 | + done |
682 | + |
683 | +recurse_clean: |
684 | + @for dir in $(BUILDDIRS); do \ |
685 | + $(MAKE) -C $$dir clean || exit $?; \ |
686 | + done |
687 | + |
688 | +recurse_install: |
689 | + @for dir in $(BUILDDIRS); do \ |
690 | + $(MAKE) -C $$dir install || exit $?; \ |
691 | + done |
692 | + |
693 | +recurse_uninstall: |
694 | + @for dir in $(BUILDDIRS); do \ |
695 | + $(MAKE) -C $$dir uninstall || exit $?; \ |
696 | + done |
697 | + |
698 | +clean: recurse_clean |
699 | + rm -f multipath-tools.spec |
700 | + rm -rf rpms |
701 | + |
702 | +install: recurse_install |
703 | + |
704 | +uninstall: recurse_uninstall |
705 | + |
706 | +release: |
707 | + sed -e "s/__VERSION__/${VERSION}/" \ |
708 | + multipath-tools.spec.in > multipath-tools.spec |
709 | + |
710 | +rpm: release |
711 | + rpmbuild -bb multipath-tools.spec |
712 | |
713 | === added file 'Makefile.inc' |
714 | --- Makefile.inc 1970-01-01 00:00:00 +0000 |
715 | +++ Makefile.inc 2011-01-04 21:28:57 +0000 |
716 | @@ -0,0 +1,44 @@ |
717 | +# Makefile.inc |
718 | +# |
719 | +# Copyright (C) 2004 Christophe Varoqui, <christophe.varoqui@opensvc.com> |
720 | + |
721 | +# |
722 | +# Allow to force some libraries to be used statically. (Uncomment one of the |
723 | +# following lines or define the values when calling make.) |
724 | +# |
725 | +# WITH_LOCAL_LIBDM = 1 |
726 | +# WITH_LOCAL_LIBSYSFS = 1 |
727 | + |
728 | +ifeq ($(TOPDIR),) |
729 | + TOPDIR = .. |
730 | +endif |
731 | + |
732 | +ifndef LIB |
733 | + ifeq ($(shell test -d /lib64 && echo 1),1) |
734 | + LIB=lib64 |
735 | + else |
736 | + LIB=lib |
737 | + endif |
738 | +endif |
739 | + |
740 | +prefix = |
741 | +exec_prefix = $(prefix) |
742 | +bindir = $(exec_prefix)/sbin |
743 | +libudevdir = ${prefix}/lib/udev |
744 | +multipathdir = $(TOPDIR)/libmultipath |
745 | +mandir = $(prefix)/usr/share/man/man8 |
746 | +man5dir = $(prefix)/usr/share/man/man5 |
747 | +rcdir = $(prefix)/etc/init.d |
748 | +syslibdir = $(prefix)/$(LIB) |
749 | +libdir = $(prefix)/$(LIB)/multipath |
750 | + |
751 | +GZIP = /bin/gzip -9 -c |
752 | +INSTALL_PROGRAM = install |
753 | + |
754 | +OPTFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes |
755 | +CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" |
756 | +SHARED_FLAGS = -shared |
757 | + |
758 | +%.o: %.c |
759 | + $(CC) $(CFLAGS) -c -o $@ $< |
760 | + |
761 | |
762 | === renamed file 'Makefile.inc' => 'Makefile.inc.moved' |
763 | === renamed file 'Makefile' => 'Makefile.moved' |
764 | === added file 'README' |
765 | --- README 1970-01-01 00:00:00 +0000 |
766 | +++ README 2011-01-04 21:28:57 +0000 |
767 | @@ -0,0 +1,1 @@ |
768 | +Things to read |
769 | |
770 | === renamed file 'README' => 'README.moved' |
771 | === added file 'TODO' |
772 | --- TODO 1970-01-01 00:00:00 +0000 |
773 | +++ TODO 2011-01-04 21:28:57 +0000 |
774 | @@ -0,0 +1,1 @@ |
775 | +Things to do |
776 | |
777 | === renamed file 'TODO' => 'TODO.moved' |
778 | === added directory 'debian' |
779 | === renamed directory 'debian' => 'debian.moved' |
780 | === added file 'debian/NEWS' |
781 | --- debian/NEWS 1970-01-01 00:00:00 +0000 |
782 | +++ debian/NEWS 2011-01-04 21:28:57 +0000 |
783 | @@ -0,0 +1,21 @@ |
784 | +multipath-tools (0.4.7-2) unstable; urgency=low |
785 | + |
786 | + udev, which provides scsi_id, moved the binary to /lib/udev. |
787 | + The old name will stop working in the future. |
788 | + |
789 | + The default config now uses /lib/udev/scsi_id. And you have to |
790 | + update /etc/multipath.conf by hand to reflect the new location. |
791 | + |
792 | + -- Bastian Blank <waldi@debian.org> Wed, 29 Mar 2006 12:08:32 +0200 |
793 | + |
794 | +multipath-tools (0.4.5-1) unstable; urgency=low |
795 | + |
796 | + This version removes creation of devices via udev in /dev. All |
797 | + device-mapper devices are created by libdevmapper in /dev/mapper. |
798 | + |
799 | + To readd the creation of devices in /dev, add the following line to |
800 | + the udev rules (e.g. /etc/udev/rules.d/multipath.rules): |
801 | + KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c", OPTIONS+="last_rule" |
802 | + |
803 | + -- Bastian Blank <waldi@debian.org> Mon, 19 Sep 2005 15:03:31 +0200 |
804 | + |
805 | |
806 | === added file 'debian/README.source' |
807 | --- debian/README.source 1970-01-01 00:00:00 +0000 |
808 | +++ debian/README.source 2011-01-04 21:28:57 +0000 |
809 | @@ -0,0 +1,57 @@ |
810 | +This package uses quilt to manage all modifications to the upstream |
811 | +source. Changes are stored in the source package as diffs in |
812 | +debian/patches and applied during the build. |
813 | + |
814 | +To configure quilt to use debian/patches instead of patches, you want |
815 | +either to export QUILT_PATCHES=debian/patches in your environment |
816 | +or use this snippet in your ~/.quiltrc: |
817 | + |
818 | + for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do |
819 | + if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then |
820 | + export QUILT_PATCHES=debian/patches |
821 | + fi |
822 | + done |
823 | + |
824 | +To get the fully patched source after unpacking the source package, cd to |
825 | +the root level of the source package and run: |
826 | + |
827 | + quilt push -a |
828 | + |
829 | +The last patch listed in debian/patches/series will become the current |
830 | +patch. |
831 | + |
832 | +To add a new set of changes, first run quilt push -a, and then run: |
833 | + |
834 | + quilt new <patch> |
835 | + |
836 | +where <patch> is a descriptive name for the patch, used as the filename in |
837 | +debian/patches. Then, for every file that will be modified by this patch, |
838 | +run: |
839 | + |
840 | + quilt add <file> |
841 | + |
842 | +before editing those files. You must tell quilt with quilt add what files |
843 | +will be part of the patch before making changes or quilt will not work |
844 | +properly. After editing the files, run: |
845 | + |
846 | + quilt refresh |
847 | + |
848 | +to save the results as a patch. |
849 | + |
850 | +Alternately, if you already have an external patch and you just want to |
851 | +add it to the build system, run quilt push -a and then: |
852 | + |
853 | + quilt import -P <patch> /path/to/patch |
854 | + quilt push -a |
855 | + |
856 | +(add -p 0 to quilt import if needed). <patch> as above is the filename to |
857 | +use in debian/patches. The last quilt push -a will apply the patch to |
858 | +make sure it works properly. |
859 | + |
860 | +To remove an existing patch from the list of patches that will be applied, |
861 | +run: |
862 | + |
863 | + quilt delete <patch> |
864 | + |
865 | +You may need to run quilt pop -a to unapply patches first before running |
866 | +this command. |
867 | |
868 | === added file 'debian/changelog' |
869 | --- debian/changelog 1970-01-01 00:00:00 +0000 |
870 | +++ debian/changelog 2011-01-04 21:28:57 +0000 |
871 | @@ -0,0 +1,526 @@ |
872 | +multipath-tools (0.4.9-1ubuntu1) natty; urgency=low |
873 | + |
874 | + * Import from Debian upstream |
875 | + * Ensure that multipath has setup all its paths before we proceed |
876 | + with mountroot. Otherwise, either root or some other device |
877 | + could get mounted by it's block device, after which multipath |
878 | + can't take it. |
879 | + |
880 | + -- Serge Hallyn <serge.hallyn@ubuntu.com> Tue, 21 Dec 2010 16:47:34 -0600 |
881 | + |
882 | +multipath-tools (0.4.9-1) experimental; urgency=low |
883 | + |
884 | + * New upstream version 0.4.9 (Closes: #587315, #595127) |
885 | + * [500e341] Don't fail "mulitipath-tools start" if multipathd is |
886 | + already running (Closes: #587678) |
887 | + * [f4e697c] Drop upstream patches: |
888 | + * 0001-Fix-udev-rules-for-dmraid.patch |
889 | + * 0003-fix-URL-to-FAQ.patch |
890 | + * 0004-check-header-file-for-defintion-of-dm_task_no_flush.patch |
891 | + * 0005-set-a-soname.patch |
892 | + * 0006-add-library-dependencies.patch |
893 | + * 0007-multipath-tools-rdac-path-checked-leads-to-I-O-hang-.patch |
894 | + * 0010-Dots-are-special-in-groff.patch |
895 | + * 0011-multipath-fix-offset-for-containted-slices.patch |
896 | + * [678dcb6] Bindings file moved to /etc/multipath |
897 | + * [ac2f9d5] Bump standards version |
898 | + * [baea3a2] Add upstream homepage |
899 | + * [9daa1b8] Remove /usr from $PATH so lintian doesn't assume we're |
900 | + calling scripts from $remove_fs. |
901 | + * [1a3c85e] Update po files |
902 | + |
903 | + -- Guido Günther <agx@sigxcpu.org> Wed, 01 Sep 2010 15:10:26 +0200 |
904 | + |
905 | +multipath-tools (0.4.8+git0.761c66f-9) unstable; urgency=low |
906 | + |
907 | + * [0435cc1] Make sure the patchcheckers end up in /lib (Closes: #581377) |
908 | + * [858f733] New patch 0011-multipath-fix-offset-for-containted- slices.patch |
909 | + multipath: fix offset for containted slices. (Closes: #586104) - thanks to |
910 | + Benjamin Marzinski |
911 | + |
912 | + -- Guido Günther <agx@sigxcpu.org> Wed, 16 Jun 2010 20:02:47 +0200 |
913 | + |
914 | +multipath-tools (0.4.8+git0.761c66f-8) unstable; urgency=low |
915 | + |
916 | + * [16268d8] Drop path from dmsetup_env call - thanks to Ferenc Wagner |
917 | + * [2f3bdd5] Use $name in multipath.udev as well - thanks to Ferenc Wagner |
918 | + for testing |
919 | + * [c978487] Don't pass -g on mips(el) to work around a binutils bug. See |
920 | + http://sources.redhat.com/bugzilla/show_bug.cgi?id=10144 for details. |
921 | + * [9daf438] Make sure we discover multipaths before checkfs/mountall runs |
922 | + This covers the cornercase where e.g. /home is on multipath (but not on |
923 | + LVM) and multipath-tols aren't started via initramfs. (Closes: #577172) |
924 | + * [f7cc840] Bump standards version |
925 | + |
926 | + -- Guido Günther <agx@sigxcpu.org> Sun, 11 Apr 2010 13:22:35 +0200 |
927 | + |
928 | +multipath-tools (0.4.8+git0.761c66f-7) unstable; urgency=low |
929 | + |
930 | + * [13f7436] Properly add multipath-udeb to dh_makeshlibs (Closes: #564489) - |
931 | + thanks to again Frans Pop |
932 | + |
933 | + -- Guido Günther <agx@sigxcpu.org> Sat, 23 Jan 2010 00:14:04 +0100 |
934 | + |
935 | +multipath-tools (0.4.8+git0.761c66f-6) unstable; urgency=low |
936 | + |
937 | + * [5b0c7be] Fix dependency on nonexistent multipath-tools udeb (Closes: |
938 | + #564489) - thanks to Frans Pop |
939 | + * [c2a06f7] New patch debian/patches/0010-Dots-are-special-in- groff.patch |
940 | + Dots are special in groff |
941 | + |
942 | + -- Guido Günther <agx@sigxcpu.org> Sun, 10 Jan 2010 18:10:05 +0100 |
943 | + |
944 | +multipath-tools (0.4.8+git0.761c66f-5) unstable; urgency=low |
945 | + |
946 | + * [9c68527] Explicitly include posix_types.h to get the correct type for |
947 | + __kernel_old_dev_t (Closes: #558990) |
948 | + |
949 | + -- Guido Günther <agx@sigxcpu.org> Sat, 05 Dec 2009 18:14:05 +0100 |
950 | + |
951 | +multipath-tools (0.4.8+git0.761c66f-4) unstable; urgency=low |
952 | + |
953 | + * [eb7bcf2] Add kpartx_id to initramfs for persistent partition links. |
954 | + * [7ecd444] Use $name instead of $kernel since 2.6.31 doesn't create |
955 | + /dev/dm-* anymore. |
956 | + |
957 | + -- Guido Günther <agx@sigxcpu.org> Sat, 21 Nov 2009 21:11:31 +0100 |
958 | + |
959 | +multipath-tools (0.4.8+git0.761c66f-3) unstable; urgency=low |
960 | + |
961 | + * upload to unstable |
962 | + * [f62b619] Tighten multipath-tools-boot dependency Older versions might not |
963 | + be able to cope with renamed patch checkers, etc. |
964 | + * [7bb23db] Add udev rules to initramfs This makes the initramfs properly |
965 | + event based. Once #455979 is fixed in LVM, root on lvm on multipatph can |
966 | + work reliably. (Closes: #539498) |
967 | + * [d9fcc80] Another init script dependency fix (Closes: #542370) - thanks to |
968 | + Petter Reinholdtsen |
969 | + * [3faab35] redo patches |
970 | + * [c903696] Make user_friendly_names compatible to multipath-tools 0.4.8 and |
971 | + earlier |
972 | + |
973 | + -- Guido Günther <agx@sigxcpu.org> Sat, 21 Nov 2009 18:04:07 +0100 |
974 | + |
975 | +multipath-tools (0.4.8+git0.761c66f-2) experimental; urgency=low |
976 | + |
977 | + * [34758f1] don't install files into /lib64 on 64 bit architectures - thanks |
978 | + to Pascal de Bruijn |
979 | + * [2b0a3da] use libreadline-dev (Closes: #553813) |
980 | + * [8394b3a] cherry-pick 362d2e5f215894818b52a0d03b723b75917390fb (Closes: |
981 | + #555901) |
982 | + |
983 | + -- Guido Günther <agx@sigxcpu.org> Thu, 12 Nov 2009 17:35:28 +0100 |
984 | + |
985 | +multipath-tools (0.4.8+git0.761c66f-1) experimental; urgency=low |
986 | + |
987 | + * upload current git snapshot to experimental |
988 | + * [71c9c74] warn about user_friendly_names and suggest using /dev/disk/by-id/ |
989 | + * [329762e] increase locking timeout on bindings file to 30 secs - thanks to |
990 | + Ritesh Raj Sarraf for the patch |
991 | + * [759ad9b] add spanish translation (Closes: #528972) - thanks to Fernando |
992 | + González de Requena |
993 | + * [7c327fa] add Czech translation (Closes: #533524) - thanks to Tomas Fidler |
994 | + * [49c78ba] drop patches merged upstream: |
995 | + * 0001-get-rid-of-arch-specific-ifdef-spaghettis.patch |
996 | + * 0002--libmultipath-filter_wwid-is-called-with-the-wron.patch |
997 | + * 0004--kpartx-fix-extended-partition-handling.patch |
998 | + * 0005--kpartx-remove-partitions-in-reverse-order.patch |
999 | + * 0006--kpartx-documentation-fixes.patch |
1000 | + * 0007--kpartx-remove-dead-code.patch |
1001 | + * 0008-udev-as-of-0.124-doesn-t-support-scsi_id-s-anymor.patch |
1002 | + * 0011--kpartx-use-uint64_t-to-account-slices-start-size.patch |
1003 | + * 0012--libmultipath-Update-discovery-to-work-with-new-sys.patch |
1004 | + * 0013-multipathd-crash-on-shutdown.patch |
1005 | + * 0014--var-run-multipathd.sock-is-world-writable.patch |
1006 | + * 0015-Increase-timeout-to-30-secs-to-avoid-locking-issue.patch |
1007 | + * [52b5373] checkers and prio callouts are now SOs |
1008 | + * [e493cde] debian/rules: use --fail-missing |
1009 | + * [b1c5baf] devmap_name is no more |
1010 | + * [fd41e76] bump standards version |
1011 | + * [82dc3df] drop iscsi to work around #542370 |
1012 | + * [cce7640] new patch: |
1013 | + 0004-check-header-file-for-defintion-of-dm_task_no_flush: check the header |
1014 | + file for dm_task_no_flush instead |
1015 | + of one of the installed libs. |
1016 | + * [876a5fb] new patch: 0005-set-a-soname.patch add a soname to libmultipath |
1017 | + * [1912767] new patch 0006-add-library-dependencies.patch add libraries to |
1018 | + the linker call |
1019 | + * [4d1b506] add dh_makeshlibs call |
1020 | + * [1ee06d5] install lib with soname |
1021 | + |
1022 | + -- Guido Günther <agx@sigxcpu.org> Sun, 30 Aug 2009 15:53:24 +0200 |
1023 | + |
1024 | +multipath-tools (0.4.8-15) unstable; urgency=low |
1025 | + |
1026 | + * [e3fdd6f] add iscsi as a prereq and add verbose logic from mdadm. |
1027 | + * [9299e3d] On shutdown multipathd flushes its internal message queue |
1028 | + but we have to check if the messages on the queue are not empty. |
1029 | + (Closes: #519252) |
1030 | + * [df5ee21] fix umask of multipathd socket (CVE-2009-0115). Upstream |
1031 | + commit 0a0319d381249760c71023edbe0ac9c093bb4a74. (Closes: #522813) |
1032 | + |
1033 | + -- Guido Günther <agx@sigxcpu.org> Mon, 06 Apr 2009 19:36:25 +0200 |
1034 | + |
1035 | +multipath-tools (0.4.8-14) unstable; urgency=low |
1036 | + |
1037 | + * [6dad4a0] kpartx: use uint64_t to account slices start/size based on |
1038 | + 65d108fbe. Fixes handling of devices >2TB. |
1039 | + (Closes: #512601) - thanks to Vincent McIntyre for testing |
1040 | + * [1fe965c] fix failure to gather block device information. Cherry-pick |
1041 | + 88f88d from upstream: With the new sysfs layout the parent device of a |
1042 | + block device is 'block', and only the parent of this is the 'real' parent. |
1043 | + Fixes problems on kernels >= 2.6.27. |
1044 | + (LP: #307032) - thanks to Jens Langner for forwarding this. |
1045 | + * [85c6d6e] README.Debian: explain howto best access multipath devices |
1046 | + (Closes: #510911) - thanks to Vincent McIntyre |
1047 | + * [a2bf65e] FAQ: fix URL to FAQ - thanks to Vincent McIntyre |
1048 | + * [e65a06d] README.Debian: doc typo |
1049 | + * [a1de95f] add ja debconf translation |
1050 | + (Closes: #512857) - thanks to Hideki Yamane |
1051 | + * [8400b79] rules: drop redo-patches target handled via external script now |
1052 | + * [50eb583] control: fix maintainer name |
1053 | + * [fe7e471] drop superflous headers and footers of patches, no functional |
1054 | + changes |
1055 | + |
1056 | + -- Guido Günther <agx@sigxcpu.org> Thu, 29 Jan 2009 10:17:36 +0100 |
1057 | + |
1058 | +multipath-tools (0.4.8-13) unstable; urgency=low |
1059 | + |
1060 | + [ Guido Günther ] |
1061 | + * [5585feb] simplify udev dependency |
1062 | + * [4cc8116] add a versioned dependency on dmsetup (Closes: #497686) |
1063 | + * [9887760] blacklist cciss devices (Closes: #500991) |
1064 | + |
1065 | + -- Guido Günther <agx@sigxcpu.org> Fri, 03 Oct 2008 12:42:46 +0200 |
1066 | + |
1067 | +multipath-tools (0.4.8-12) unstable; urgency=low |
1068 | + |
1069 | + * [2ee3c11] udev as of 0.124 doesn't support 'scsi_id -s' anymore |
1070 | + * [736eaa3] ...unfortunately older udev's don't support 'scsi_id -d' |
1071 | + properly so add a conflict |
1072 | + * [49961fa] update bugnumbers for the "dmsetup export" fun |
1073 | + * [82d47a3] bump standards version |
1074 | + * [18fb979] add README.source |
1075 | + |
1076 | + -- Guido Guenther <agx@sigxcpu.org> Thu, 21 Aug 2008 09:28:30 +0200 |
1077 | + |
1078 | +multipath-tools (0.4.8-11) unstable; urgency=low |
1079 | + |
1080 | + * [3dadace] use the full path to dmsetup so we don't have to worry about |
1081 | + $PATH |
1082 | + * [33642da] update initramfs during postinst/postrm (Closes: #477839) |
1083 | + * [41391c9] Conflict on etch's multipath-tools-initramfs - together with the |
1084 | + multipath-tools-initramfs NMU from Bernd Zeimetz this provides a clean |
1085 | + upgrade path from etch to lenny for multipath-tools-initramfs users. |
1086 | + * [4f8a5d1] Call multipath via udev on block device add/change events This |
1087 | + helps slow devices when either /etc/init.d/multipath-tools-boot or the |
1088 | + initramfs script are being run although the devices are not ready yet. |
1089 | + (Closes: #489850) - many thanks to Janusz Dziemidowicz for his suggestions |
1090 | + and testing |
1091 | + * [5cbb079] add swedish debconf translation (Closes: #492107) - thanks to |
1092 | + Martin Ã…gren |
1093 | + * [12639e9] redo quilt patches - no code changes |
1094 | + |
1095 | + -- Guido Guenther <agx@sigxcpu.org> Wed, 30 Jul 2008 17:59:03 -0400 |
1096 | + |
1097 | +multipath-tools (0.4.8-10) unstable; urgency=low |
1098 | + |
1099 | + * [183da2c] Add russion debconf translation (Closes: #486353) - thanks |
1100 | + to Yuri Kozlov |
1101 | + * [02b7853] Add pt, de, and fr translations (Closes: #482035, #482845, |
1102 | + #482905) - thanks to the Portuguese Translation Team, Helge |
1103 | + Kreutzmann and Jean Guillou |
1104 | + |
1105 | + -- Guido Guenther <agx@sigxcpu.org> Thu, 19 Jun 2008 13:06:09 +0200 |
1106 | + |
1107 | +multipath-tools (0.4.8-9) unstable; urgency=low |
1108 | + |
1109 | + * [958c4b1] attach multipath.conf to bugreports |
1110 | + * [2ac083e] make multipath-tools-boot arch all |
1111 | + * [2eb8b51] Warn about outdated /etc/multipath.conf via debconf. The |
1112 | + changed location of udev's /sbin/scsi_id already hit two people. |
1113 | + Since this renders the system unbootable we should warn about it at |
1114 | + priority critical. (Closes: #481447) |
1115 | + |
1116 | + -- Guido Guenther <agx@sigxcpu.org> Sat, 17 May 2008 15:13:40 +0200 |
1117 | + |
1118 | +multipath-tools (0.4.8-8) unstable; urgency=low |
1119 | + |
1120 | + * libdevmapper doesn't ship the init script anymore so drop that and depend |
1121 | + on checkroot instead so we have a defined boot order (Closes: 470063) |
1122 | + * multipath-tools.init: remove superflous stop link in S in the LSB header |
1123 | + * add boot breakage warning to multipath-tools boot |
1124 | + * depend on libdevmapper-dev (>= 2:1.02.20) instead of (>= 2:1.02.20-1) |
1125 | + since this eases backports |
1126 | + * bump standards version |
1127 | + |
1128 | + -- Guido Guenther <agx@sigxcpu.org> Sun, 09 Mar 2008 18:55:38 +0100 |
1129 | + |
1130 | +multipath-tools (0.4.8-7) unstable; urgency=low |
1131 | + |
1132 | + * add watch file |
1133 | + * move multipath-tools-boot startup to S21 to allow module-loading |
1134 | + (Closes: #457804) |
1135 | + |
1136 | + -- Guido Guenther <agx@sigxcpu.org> Tue, 08 Jan 2008 13:49:18 +0100 |
1137 | + |
1138 | +multipath-tools (0.4.8-6) unstable; urgency=low |
1139 | + |
1140 | + * depend on a libaio that resides in /lib (>= 0.3.106-8) so we can... |
1141 | + * ...drop link-libaio-static.diff |
1142 | + * fix_wwid_blacklist.diff: pulled from upstream to fix blacklisting by |
1143 | + wwid |
1144 | + * kpartx-docfix.diff: document -g |
1145 | + * kpartx-remove-dead-code.diff: remove unused commandline option |
1146 | + * kpartx-fix-extpart-rm.diff: fix partition removal of extended |
1147 | + partitions |
1148 | + |
1149 | + -- Guido Guenther <agx@sigxcpu.org> Sat, 01 Dec 2007 15:41:36 +0100 |
1150 | + |
1151 | +multipath-tools (0.4.8-5) unstable; urgency=low |
1152 | + |
1153 | + * apply kpartx-fix-udev-dmraid.diff to our shipped udev rules too |
1154 | + * fix itemized list in control file (Closes: #441176) |
1155 | + * link statically against libaio since it's in /usr/lib and |
1156 | + multipath{,d} are in /sbin and we can avoid a libaio udeb for now |
1157 | + * build a udeb for d-i support (Closes: #440334) |
1158 | + |
1159 | + -- Guido Guenther <agx@sigxcpu.org> Fri, 07 Sep 2007 19:47:05 +0200 |
1160 | + |
1161 | +multipath-tools (0.4.8-4) unstable; urgency=low |
1162 | + |
1163 | + * split out initramfs support into a separate package (Closes: #440206) |
1164 | + * copy persistent bindings into initramfs |
1165 | + * debian/rules: don't ignore errors on clean (to make lintian happy) |
1166 | + * multipath-tools-boot.sh: add Default-Stop pseudo header |
1167 | + |
1168 | + -- Guido Guenther <agx@sigxcpu.org> Fri, 31 Aug 2007 09:47:35 +0200 |
1169 | + |
1170 | +multipath-tools (0.4.8-3) unstable; urgency=low |
1171 | + |
1172 | + * add a prerm script to handle updates from broken versions that don't allow |
1173 | + for a stopped multipathd in the init script, really (closes: #439126). |
1174 | + |
1175 | + -- Guido Guenther <agx@sigxcpu.org> Sun, 26 Aug 2007 10:24:49 +0200 |
1176 | + |
1177 | +multipath-tools (0.4.8-2) unstable; urgency=low |
1178 | + |
1179 | + * initramfs: mpath_prio_tpc has been renamed to mpath_prio_rdac |
1180 | + * fetch patches by Hannes Reinecke from dm-devel: |
1181 | + * fix udev rule for dmraid: kpartx-fix-udev-dmraid.diff |
1182 | + * fix extended partition calculation in kpartx: kpartx-fix-extpart.diff |
1183 | + * fix DEB_BUILD_OTIIONS=nostrip (Closes: #437596) |
1184 | + |
1185 | + -- Guido Guenther <agx@sigxcpu.org> Mon, 13 Aug 2007 18:32:12 +0200 |
1186 | + |
1187 | +multipath-tools (0.4.8-1) unstable; urgency=low |
1188 | + |
1189 | + * new upstream release |
1190 | + * drop clariion-fix-read-buffer.diff, applied upstream |
1191 | + * init script: don't fail the stop target if multipathd |
1192 | + * conflict with multipath-tools-initramfs |
1193 | + |
1194 | + -- Guido Guenther <agx@sigxcpu.org> Sat, 04 Aug 2007 13:08:52 +0200 |
1195 | + |
1196 | +multipath-tools (0.4.7-9) unstable; urgency=low |
1197 | + |
1198 | + * fix segfault on EMC Clariions |
1199 | + * add initramfs hooks to support rootfs on multipath |
1200 | + * version the dependency on dmsetup since the one from etch doesn't |
1201 | + support -oattr needed by dmsetup_env |
1202 | + * use LSB functions in init scripts |
1203 | + |
1204 | + -- Guido Guenther <agx@sigxcpu.org> Tue, 31 Jul 2007 14:01:00 +0200 |
1205 | + |
1206 | +multipath-tools (0.4.7-8) unstable; urgency=low |
1207 | + |
1208 | + * since Debian's dmestup doesn't include the "export" patch used by other |
1209 | + distros (#434241), work around this by implementing a minimal dmsetup_env |
1210 | + that can be used by kpartx.udev (Closes: #376161) |
1211 | + * add LSB headers to init scripts |
1212 | + |
1213 | + -- Guido Guenther <agx@sigxcpu.org> Sat, 28 Jul 2007 17:34:48 +0200 |
1214 | + |
1215 | +multipath-tools (0.4.7-7) unstable; urgency=low |
1216 | + |
1217 | + * create build dirs (Closes: #425910) |
1218 | + * forward to upstream git b413c9dbe554c2d50aba7c6446ec86f850cf8dde |
1219 | + * drop libmultipath-cache-sysfs_devices.diff, applied upstream |
1220 | + |
1221 | + -- Guido Guenther <agx@sigxcpu.org> Fri, 27 Jul 2007 22:25:29 +0200 |
1222 | + |
1223 | +multipath-tools (0.4.7-6) unstable; urgency=low |
1224 | + |
1225 | + * kpartx.udev: fix path to kpartx_id |
1226 | + * install kpartx_id |
1227 | + * debian/control: add XS-Vcs-Browser |
1228 | + |
1229 | + -- Guido Guenther <agx@sigxcpu.org> Sun, 22 Jul 2007 15:38:05 +0200 |
1230 | + |
1231 | +multipath-tools (0.4.7-5) unstable; urgency=low |
1232 | + |
1233 | + * forward to upstream git 00fe3ac6ff515bec4a2c7385d6e2e4a7ed5dfb36 |
1234 | + * new patch: libmultipath-cache-sysfs_devices.diff (Closes: #433949) |
1235 | + |
1236 | + -- Guido Guenther <agx@sigxcpu.org> Fri, 20 Jul 2007 23:15:27 +0200 |
1237 | + |
1238 | +multipath-tools (0.4.7-4) unstable; urgency=low |
1239 | + |
1240 | + * move to git |
1241 | + * Drop patches applied upstream: |
1242 | + * fix-segfault-on-disappearing-paths.diff |
1243 | + * exclude-quilt.diff |
1244 | + * scsi_id.diff |
1245 | + * Makefile_cleanups.diff |
1246 | + * use dh_installudev |
1247 | + * no need to build-depend on libsysfs-dev anymore |
1248 | + * build-depend on libaio-dev |
1249 | + |
1250 | + -- Guido Guenther <agx@sigxcpu.org> Fri, 29 Jun 2007 11:31:28 -0400 |
1251 | + |
1252 | +multipath-tools (0.4.7-3) experimental; urgency=low |
1253 | + |
1254 | + * forward to upstream git as of 178b93111d54828a89ad280c0aaaea0812343a6a |
1255 | + (Closes: #427532, #365363) |
1256 | + * adjust scsi_id.patch to apply again |
1257 | + * drop udev.patch, not needed |
1258 | + * make sure multipath-tools-init runs after udev so the /dev/mapper/ |
1259 | + entries appear in the correct place |
1260 | + * debhelper version 5 (Closes: #425910) |
1261 | + * split out kpartx into a separate package (Closes: #422600) |
1262 | + |
1263 | + -- Guido Guenther <agx@sigxcpu.org> Fri, 08 Jun 2007 11:51:00 +0200 |
1264 | + |
1265 | +multipath-tools (0.4.7-2) unstable; urgency=low |
1266 | + |
1267 | + [ Bastian Blank ] |
1268 | + * Use /lib/udev/scsi_id. (closes: #358985) |
1269 | + |
1270 | + [ Guido Guenther ] |
1271 | + * Acknowledge NMU - thanks John! (closes: #382244) |
1272 | + * use quilt for the git patch |
1273 | + * remove Bastian and Andres from Uploaders on their request |
1274 | + * cleanup pp_hds_modular so the package is rebuildable several times |
1275 | + * scsi_id.diff, Makefile-cleanups.diff, remove-arch-ifdefs.diff, udev.diff: |
1276 | + split out Debian's modifications into separate patches |
1277 | + * remove now superflous multipath.sh (closes: #350814) |
1278 | + * bump standards version to 3.7.2 (no source changes) |
1279 | + |
1280 | + -- Guido Guenther <agx@sigxcpu.org> Wed, 20 Dec 2006 17:40:59 +0100 |
1281 | + |
1282 | +multipath-tools (0.4.7-1.1) unstable; urgency=medium |
1283 | + |
1284 | + * Added missing dependency on dmsetup. Closes: #381068. |
1285 | + * Fixed PID file handling. Closes: #294066. |
1286 | + * Pulled in numerous fixes from upstream git tree to fix |
1287 | + various segfaults, spewing garbage onto the console, etc. |
1288 | + Tree is now synced to upstream git as of commit |
1289 | + 40b575955cc189aa993e6a030b66b5fef6bcf288 on July 19, 2006, |
1290 | + which is the current state of the upstream tree. Closes: #382214. |
1291 | + |
1292 | + -- John Goerzen <jgoerzen@complete.org> Wed, 9 Aug 2006 11:52:08 -0500 |
1293 | + |
1294 | +multipath-tools (0.4.7-1) unstable; urgency=low |
1295 | + |
1296 | + * New upstream version. |
1297 | + - Build against libsysfs2. (closes: #355775) |
1298 | + * Acknowledge NMU. (closes: #337081) |
1299 | + |
1300 | + -- Bastian Blank <waldi@debian.org> Fri, 17 Mar 2006 17:23:03 +0100 |
1301 | + |
1302 | +multipath-tools (0.4.6-1) unstable; urgency=low |
1303 | + |
1304 | + * New upstream version. |
1305 | + |
1306 | + -- Bastian Blank <waldi@debian.org> Thu, 09 Feb 2006 22:12:52 +0100 |
1307 | + |
1308 | +multipath-tools (0.4.5-3) unstable; urgency=low |
1309 | + |
1310 | + * Fix kpartx compiling errors and dos support. |
1311 | + |
1312 | + -- Bastian Blank <waldi@debian.org> Fri, 30 Sep 2005 13:01:55 +0200 |
1313 | + |
1314 | +multipath-tools (0.4.5-2) unstable; urgency=low |
1315 | + |
1316 | + * Move boot init script before udev and load dm-multipath module. |
1317 | + |
1318 | + -- Bastian Blank <waldi@debian.org> Wed, 28 Sep 2005 19:35:49 +0200 |
1319 | + |
1320 | +multipath-tools (0.4.5-1) unstable; urgency=low |
1321 | + |
1322 | + * New upstream version. |
1323 | + * Move device check logic to udev rules. |
1324 | + * Don't longer create devices in /dev by default. |
1325 | + |
1326 | + -- Bastian Blank <waldi@debian.org> Mon, 19 Sep 2005 16:32:00 +0200 |
1327 | + |
1328 | +multipath-tools (0.4.2.4-2) unstable; urgency=medium |
1329 | + |
1330 | + * New maintainer. |
1331 | + * Rebuild against new libdevmapper. |
1332 | + |
1333 | + -- Bastian Blank <waldi@debian.org> Fri, 04 Mar 2005 15:16:30 +0100 |
1334 | + |
1335 | +multipath-tools (0.4.2.4-1) unstable; urgency=low |
1336 | + |
1337 | + * New upstream. |
1338 | + NOTE: This is actually upstream's 0.4.2 but 0.4.2.3 came first for some |
1339 | + reason. |
1340 | + * Use start-stop-daemon to control the multipathd daemon and do it's own |
1341 | + PID file handling (which is now commented out of the daemon itself) |
1342 | + |
1343 | + -- Patrick Caulfield <patrick@debian.org> Fri, 28 Jan 2005 15:15:01 +0000 |
1344 | + |
1345 | +multipath-tools (0.4.2.3-1) unstable; urgency=low |
1346 | + |
1347 | + * New upstream |
1348 | + * Remove initrd files as they break things. |
1349 | + Closes: #288150 |
1350 | + * Fix some duplicate patching. |
1351 | + |
1352 | + -- Patrick Caulfield <patrick@debian.org> Mon, 17 Jan 2005 11:19:20 +0000 |
1353 | + |
1354 | +multipath-tools (0.4.1-1) unstable; urgency=low |
1355 | + |
1356 | + * New upstream |
1357 | + Closes: #295926, #286789 |
1358 | + * Include initrd scripts contributed by Guido Guenther |
1359 | + Closes: #286791 |
1360 | + |
1361 | + -- Patrick Caulfield <patrick@debian.org> Thu, 13 Jan 2005 09:25:42 +0000 |
1362 | + |
1363 | +multipath-tools (0.4.0-1) unstable; urgency=low |
1364 | + |
1365 | + * New upstream |
1366 | + |
1367 | + -- Patrick Caulfield <patrick@debian.org> Fri, 24 Dec 2004 11:54:44 +0000 |
1368 | + |
1369 | +multipath-tools (0.3.9-1) unstable; urgency=low |
1370 | + |
1371 | + * New upstream |
1372 | + |
1373 | + -- Patrick Caulfield <patrick@debian.org> Tue, 7 Dec 2004 13:15:15 +0000 |
1374 | + |
1375 | +multipath-tools (0.3.8-1) unstable; urgency=low |
1376 | + |
1377 | + * New upstream |
1378 | + * Fix error in preinst, when upgrading. |
1379 | + * Don't clean klibc directory. |
1380 | + Closes: #283043 |
1381 | + |
1382 | + -- Patrick Caulfield <patrick@debian.org> Mon, 29 Nov 2004 08:56:50 +0000 |
1383 | + |
1384 | +multipath-tools (0.3.7-1) unstable; urgency=low |
1385 | + |
1386 | + * New upstream |
1387 | + |
1388 | + -- Patrick Caulfield <patrick@debian.org> Sat, 13 Nov 2004 11:14:35 +0000 |
1389 | + |
1390 | +multipath-tools (0.3.6-1) unstable; urgency=low |
1391 | + |
1392 | + * Initial upload. Based loosely on upstream's work |
1393 | + Closes: #277898 |
1394 | + |
1395 | + -- Patrick Caulfield <patrick@debian.org> Wed, 3 Nov 2004 10:16:34 +0000 |
1396 | + |
1397 | + |
1398 | |
1399 | === added file 'debian/compat' |
1400 | --- debian/compat 1970-01-01 00:00:00 +0000 |
1401 | +++ debian/compat 2011-01-04 21:28:57 +0000 |
1402 | @@ -0,0 +1,1 @@ |
1403 | +5 |
1404 | |
1405 | === added file 'debian/control' |
1406 | --- debian/control 1970-01-01 00:00:00 +0000 |
1407 | +++ debian/control 2011-01-04 21:28:57 +0000 |
1408 | @@ -0,0 +1,60 @@ |
1409 | +Source: multipath-tools |
1410 | +Section: admin |
1411 | +Priority: extra |
1412 | +Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
1413 | +XSBC-Original-Maintainer: Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org> |
1414 | +Uploaders: Guido Günther <agx@sigxcpu.org> |
1415 | +Build-Depends: debhelper (>= 7.0.17ubuntu2), po-debconf, libdevmapper-dev (>= 2:1.02.20), libreadline-dev, quilt (>= 0.40), libaio-dev |
1416 | +XS-Vcs-Git: git://git.debian.org/git/pkg-lvm/multipath-tools.git |
1417 | +XS-Vcs-Browser: http://git.debian.org/?p=pkg-lvm/multipath-tools.git |
1418 | +Standards-Version: 3.9.1 |
1419 | +Homepage: http://christophe.varoqui.free.fr/ |
1420 | + |
1421 | +Package: multipath-tools |
1422 | +Architecture: any |
1423 | +Depends: ${shlibs:Depends}, ${misc:Depends}, udev (>= 136-1), initscripts (>= 2.85-16), |
1424 | + kpartx (>= ${binary:Version}), lsb-base (>= 3), libaio1 (>= 0.3.106-8), sysv-rc (>= 2.86.ds1-14.1ubuntu2) |
1425 | +Conflicts: multipath-tools-initramfs (<= 1.0.1) |
1426 | +Suggests: multipath-tools-boot |
1427 | +Description: maintain multipath block device access |
1428 | + These tools are in charge of maintaining the disk multipath device maps and |
1429 | + react to path and map events. |
1430 | + . |
1431 | + If you install this package you may have to change the way you address block |
1432 | + devices. See README.Debian for details. |
1433 | + |
1434 | +Package: kpartx |
1435 | +Architecture: any |
1436 | +Depends: ${shlibs:Depends}, ${misc:Depends}, udev (>> 136-1), dmsetup (>= 2:1.02.24) |
1437 | +Replaces: multipath-tools (<< 0.4.7-3) |
1438 | +Description: create device mappings for partitions |
1439 | + Kpartx can be used to set up device mappings for the partitions of any |
1440 | + partitioned block device. It is part of the Linux multipath-tools. |
1441 | + |
1442 | +Package: multipath-tools-boot |
1443 | +Architecture: all |
1444 | +Depends: ${misc:Depends}, initramfs-tools, |
1445 | + multipath-tools (>= ${source:Version}), multipath-tools (<< ${source:Version}.1~) |
1446 | +Replaces: multipath-tools-initramfs (<< 1.0.1+nmu1) |
1447 | +Conflicts: multipath-tools-initramfs (<< 1.0.1+nmu1) |
1448 | +Description: Support booting from multipath devices |
1449 | + This package contains the necessary support for booting from a multipath |
1450 | + device: |
1451 | + . |
1452 | + * copy over multipath.conf and persistent bindings if necessary |
1453 | + * load the necessary kernel modules |
1454 | + * detect multipath block devices |
1455 | + . |
1456 | + Don't install this package if you're not booting from a multipath device. |
1457 | + |
1458 | +Package: multipath-udeb |
1459 | +XC-Package-Type: udeb |
1460 | +Architecture: any |
1461 | +Depends: ${shlibs:Depends} |
1462 | +Section: debian-installer |
1463 | +Description: maintain multipath block device access |
1464 | + This is a udeb, or a microdeb, for the debian-installer. |
1465 | + . |
1466 | + These tools are in charge of maintaining the disk multipath device maps and |
1467 | + react to path and map events. |
1468 | + |
1469 | |
1470 | === added file 'debian/copyright' |
1471 | --- debian/copyright 1970-01-01 00:00:00 +0000 |
1472 | +++ debian/copyright 2011-01-04 21:28:57 +0000 |
1473 | @@ -0,0 +1,12 @@ |
1474 | +This is the Debian GNU/Linux prepackaged version of multipath-tools. |
1475 | + |
1476 | +Copyright (C) 2003,2004 Christophe Varoqui <christophe.varoqui@free.fr> |
1477 | + |
1478 | +multipath-tools is licensed under the GNU GPL version 2. |
1479 | +libsysfs is licensed under the GNU LGPL version 2.1 or later. |
1480 | +libdevmapper is licensed under the GNU LGPL version 2. |
1481 | + |
1482 | +On Debian systems, the complete text of the GNU General Public License |
1483 | +and of the GNU Lesser Public License can be found in |
1484 | +/usr/share/common-licenses/GPL and /usr/share/common-licenses/LGPL . |
1485 | + |
1486 | |
1487 | === added file 'debian/dmsetup_env' |
1488 | --- debian/dmsetup_env 1970-01-01 00:00:00 +0000 |
1489 | +++ debian/dmsetup_env 2011-01-04 21:28:57 +0000 |
1490 | @@ -0,0 +1,31 @@ |
1491 | +#!/bin/sh |
1492 | +# |
1493 | +# Debian's dmsetup is lacking the export patch, so gather the minimum |
1494 | +# information here in order to get proper partition mappings via kpartx |
1495 | +# |
1496 | +# See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=434241 |
1497 | +# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487881 |
1498 | +# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493078 |
1499 | + |
1500 | +MAJOR=$1 |
1501 | +MINOR=$2 |
1502 | + |
1503 | +if [ -z "$MAJOR" -o -z "$MINOR" ]; then |
1504 | + echo "usage: $0 major minor" |
1505 | + exit 1 |
1506 | +fi |
1507 | + |
1508 | +DMSETUP="/sbin/dmsetup -c --noheadings info -j$MAJOR -m$MINOR" |
1509 | + |
1510 | +DM_UUID=`$DMSETUP -oUUID` |
1511 | +if [ -n "$DM_UUID" ]; then |
1512 | + echo DM_UUID=$DM_UUID |
1513 | + ATTRS=`$DMSETUP -oattr` |
1514 | + case "$ATTRS" in |
1515 | + L-*) # this is the only state needed for the kpartx udev rules |
1516 | + echo DM_TABLE_STATE=LIVE |
1517 | + echo DM_STATE=ACTIVE |
1518 | + ;; |
1519 | + esac |
1520 | +fi |
1521 | +echo DM_NAME=`$DMSETUP -oname` |
1522 | |
1523 | === added directory 'debian/initramfs' |
1524 | === added file 'debian/initramfs/hooks' |
1525 | --- debian/initramfs/hooks 1970-01-01 00:00:00 +0000 |
1526 | +++ debian/initramfs/hooks 2011-01-04 21:28:57 +0000 |
1527 | @@ -0,0 +1,65 @@ |
1528 | +#!/bin/sh |
1529 | + |
1530 | +PREREQS="udev" |
1531 | + |
1532 | +prereqs() { echo "$PREREQS"; } |
1533 | + |
1534 | +case $1 in |
1535 | +prereqs) |
1536 | + prereqs |
1537 | + exit 0 |
1538 | + ;; |
1539 | +esac |
1540 | + |
1541 | +if [ ! -x /sbin/multipath ]; then |
1542 | + exit 0 |
1543 | +fi |
1544 | + |
1545 | +. /usr/share/initramfs-tools/hook-functions |
1546 | + |
1547 | +add_bindings() |
1548 | +{ |
1549 | + if [ -r /var/lib/multipath/bindings ]; then |
1550 | + mkdir -p $DESTDIR/var/lib/multipath |
1551 | + cp /var/lib/multipath/bindings $DESTDIR/var/lib/multipath/ |
1552 | + fi |
1553 | +} |
1554 | + |
1555 | +add_udev_rules() |
1556 | +{ |
1557 | + for rules in 95-multipath.rules 95-kpartx.rules; do |
1558 | + if [ -e /lib/udev/rules.d/$rules ]; then |
1559 | + cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/ |
1560 | + fi |
1561 | + done |
1562 | +} |
1563 | + |
1564 | +copy_exec /sbin/multipath /sbin |
1565 | +copy_exec /sbin/kpartx /sbin |
1566 | +copy_exec /sbin/devmap_name /sbin |
1567 | +copy_exec /sbin/dmsetup /sbin |
1568 | +copy_exec /lib/udev/dmsetup_env /lib/udev |
1569 | +copy_exec /lib/udev/kpartx_id /lib/udev |
1570 | + |
1571 | +copy_exec /sbin/mpath_prio_alua /sbin |
1572 | +copy_exec /sbin/mpath_prio_emc /sbin |
1573 | +copy_exec /sbin/mpath_prio_hp_sw /sbin |
1574 | +copy_exec /sbin/mpath_prio_rdac /sbin |
1575 | +copy_exec /sbin/mpath_prio_netapp /sbin |
1576 | +copy_exec /sbin/mpath_prio_random /sbin |
1577 | +copy_exec /sbin/mpath_prio_hds_modular /sbin |
1578 | +copy_exec /sbin/mpath_prio_balance_units /sbin |
1579 | + |
1580 | +mkdir -p $DESTDIR/lib/multipath/ |
1581 | +for x in /lib/multipath/*; do |
1582 | + copy_exec $x /lib/multipath/ |
1583 | +done |
1584 | +add_udev_rules |
1585 | + |
1586 | +[ -r /etc/multipath.conf ] && cp /etc/multipath.conf $DESTDIR/etc/ |
1587 | +add_bindings |
1588 | + |
1589 | +for x in dm-multipath dm-round-robin dm-emc; do |
1590 | + manual_add_modules ${x} |
1591 | +done |
1592 | + |
1593 | |
1594 | === added file 'debian/initramfs/local-top' |
1595 | --- debian/initramfs/local-top 1970-01-01 00:00:00 +0000 |
1596 | +++ debian/initramfs/local-top 2011-01-04 21:28:57 +0000 |
1597 | @@ -0,0 +1,60 @@ |
1598 | +#!/bin/sh |
1599 | +# |
1600 | +# multipath discovery |
1601 | + |
1602 | +PREREQ="udev iscsi" |
1603 | + |
1604 | +prereqs() { echo "$PREREQ"; } |
1605 | + |
1606 | +case $1 in |
1607 | +prereqs) |
1608 | + prereqs |
1609 | + exit 0 |
1610 | + ;; |
1611 | +esac |
1612 | + |
1613 | +. /scripts/functions |
1614 | + |
1615 | +verbose() |
1616 | +{ |
1617 | + case "$quiet" in y*|Y*|1|t*|T*) |
1618 | + return 1;; |
1619 | + *) |
1620 | + return 0;; |
1621 | + esac |
1622 | +} |
1623 | + |
1624 | +maybe_break pre-multipath |
1625 | +VERBOSITY=0 |
1626 | +MP_MODULES="dm-multipath dm-emc" |
1627 | + |
1628 | +if [ ! -e /sbin/multipath ]; then |
1629 | + exit 0 |
1630 | +fi |
1631 | + |
1632 | +verbose && log_begin_msg "Loading multipath modules" |
1633 | +for module in ${MP_MODULES}; do |
1634 | + if modprobe --syslog "$module"; then |
1635 | + verbose && log_success_msg "loaded module ${module}." |
1636 | + else |
1637 | + log_failure_msg "failed to load module ${module}." |
1638 | + fi |
1639 | +done |
1640 | +verbose && log_end_msg |
1641 | + |
1642 | +verbose && log_begin_msg "Discovering multipaths" |
1643 | +/sbin/multipath -v $VERBOSITY |
1644 | +verbose && log_end_msg |
1645 | + |
1646 | +if [ -x /sbin/kpartx -a -x /sbin/dmsetup ]; then |
1647 | + /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p p" >/dev/null |
1648 | +fi |
1649 | + |
1650 | +if [ -x /sbin/udevadm ]; then |
1651 | + /sbin/udevadm settle --timeout=10 |
1652 | +fi |
1653 | + |
1654 | +maybe_break post-multipath |
1655 | + |
1656 | +exit 0 |
1657 | + |
1658 | |
1659 | === added file 'debian/kpartx.install' |
1660 | --- debian/kpartx.install 1970-01-01 00:00:00 +0000 |
1661 | +++ debian/kpartx.install 2011-01-04 21:28:57 +0000 |
1662 | @@ -0,0 +1,4 @@ |
1663 | +/usr/share/man/man8/kpartx.8.gz |
1664 | +/sbin/kpartx |
1665 | +/lib/udev/kpartx_id |
1666 | +/lib/udev/dmsetup_env |
1667 | |
1668 | === added file 'debian/kpartx.manpages' |
1669 | --- debian/kpartx.manpages 1970-01-01 00:00:00 +0000 |
1670 | +++ debian/kpartx.manpages 2011-01-04 21:28:57 +0000 |
1671 | @@ -0,0 +1,1 @@ |
1672 | +kpartx/kpartx.8 |
1673 | |
1674 | === added file 'debian/kpartx.postinst' |
1675 | --- debian/kpartx.postinst 1970-01-01 00:00:00 +0000 |
1676 | +++ debian/kpartx.postinst 2011-01-04 21:28:57 +0000 |
1677 | @@ -0,0 +1,49 @@ |
1678 | +#!/bin/sh |
1679 | +# postinst script for kpartx |
1680 | +# |
1681 | +# see: dh_installdeb(1) |
1682 | + |
1683 | +set -e |
1684 | + |
1685 | +# summary of how this script can be called: |
1686 | +# * <postinst> `configure' <most-recently-configured-version> |
1687 | +# * <old-postinst> `abort-upgrade' <new version> |
1688 | +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> |
1689 | +# <new-version> |
1690 | +# * <postinst> `abort-remove' |
1691 | +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' |
1692 | +# <failed-install-package> <version> `removing' |
1693 | +# <conflicting-package> <version> |
1694 | +# for details, see http://www.debian.org/doc/debian-policy/ or |
1695 | +# the debian-policy package |
1696 | + |
1697 | +RULE=/etc/udev/rules.d/kpartx.rules |
1698 | + |
1699 | +case "$1" in |
1700 | + configure) |
1701 | + if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.4.7-4"; then |
1702 | + if [ -L $RULE ] && ! readlink -e $RULE; then |
1703 | + echo -n "Removing dangling $RULE symlink..." |
1704 | + rm $RULE |
1705 | + echo "done." |
1706 | + fi |
1707 | + fi |
1708 | + ;; |
1709 | + |
1710 | + abort-upgrade|abort-remove|abort-deconfigure) |
1711 | + ;; |
1712 | + |
1713 | + *) |
1714 | + echo "postinst called with unknown argument \`$1'" >&2 |
1715 | + exit 1 |
1716 | + ;; |
1717 | +esac |
1718 | + |
1719 | +# dh_installdeb will replace this with shell code automatically |
1720 | +# generated by other debhelper scripts. |
1721 | + |
1722 | +#DEBHELPER# |
1723 | + |
1724 | +exit 0 |
1725 | + |
1726 | + |
1727 | |
1728 | === added file 'debian/kpartx.udev' |
1729 | --- debian/kpartx.udev 1970-01-01 00:00:00 +0000 |
1730 | +++ debian/kpartx.udev 2011-01-04 21:28:57 +0000 |
1731 | @@ -0,0 +1,45 @@ |
1732 | +# |
1733 | +# persistent links for device-mapper devices |
1734 | +# only hardware-backed device-mapper devices (ie multipath, dmraid, |
1735 | +# and kpartx) have meaningful persistent device names |
1736 | +# |
1737 | + |
1738 | +# Always attempt to load dm-multipath. This way we can get rid of the |
1739 | +# init script. |
1740 | +ACTION=="add|change", SUBSYSTEM=="block", \ |
1741 | + RUN+="/sbin/modprobe -qba dm-multipath" |
1742 | + |
1743 | +KERNEL!="dm-*", GOTO="kpartx_end" |
1744 | +ACTION=="remove", GOTO="kpartx_end" |
1745 | + |
1746 | +# This is a temporary hack until Debian's dmsetup properly supports "dmsetup |
1747 | +# export". For more information see: #434241, #487881, #493078 |
1748 | +IMPORT{program}="dmsetup_env %M %m" |
1749 | + |
1750 | +ENV{DM_TABLE_STATE}!="LIVE", GOTO="kpartx_end" |
1751 | + |
1752 | +ENV{DM_UUID}=="?*", IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}" |
1753 | + |
1754 | +OPTIONS="link_priority=50" |
1755 | + |
1756 | +# Create persistent links for multipath tables |
1757 | +ENV{DM_UUID}=="mpath-*", \ |
1758 | + SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}" |
1759 | + |
1760 | +# Create persistent links for dmraid tables |
1761 | +ENV{DM_UUID}=="dmraid-*", \ |
1762 | + SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}" |
1763 | + |
1764 | +# Create persistent links for partitions |
1765 | +ENV{DM_PART}=="?*", \ |
1766 | + SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}" |
1767 | + |
1768 | +# Create dm tables for partitions |
1769 | +ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="mpath-*", \ |
1770 | + RUN+="/sbin/kpartx -a -p -part /dev/$name" |
1771 | +ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="dmraid-*", \ |
1772 | + RUN+="/sbin/kpartx -a -p -part /dev/$name" |
1773 | + |
1774 | +LABEL="kpartx_end" |
1775 | + |
1776 | + |
1777 | |
1778 | === added file 'debian/multipath-tools-boot.config' |
1779 | --- debian/multipath-tools-boot.config 1970-01-01 00:00:00 +0000 |
1780 | +++ debian/multipath-tools-boot.config 2011-01-04 21:28:57 +0000 |
1781 | @@ -0,0 +1,13 @@ |
1782 | +#!/bin/sh |
1783 | + |
1784 | +set -e |
1785 | + |
1786 | +CONF=/etc/multipath.conf |
1787 | + |
1788 | +# if the user still references /sbin/scsi_id warn him: |
1789 | +if [ -e "$CONF" ] && grep -sq '^[[:space:]]*getuid_callout[[:space:]]*\"/sbin/scsi_id[[:space:]]\+' $CONF; then |
1790 | + . /usr/share/debconf/confmodule |
1791 | + db_input critical multipath-tools-boot/scsi_id || true |
1792 | + db_go || true |
1793 | +fi |
1794 | + |
1795 | |
1796 | === added file 'debian/multipath-tools-boot.postinst' |
1797 | --- debian/multipath-tools-boot.postinst 1970-01-01 00:00:00 +0000 |
1798 | +++ debian/multipath-tools-boot.postinst 2011-01-04 21:28:57 +0000 |
1799 | @@ -0,0 +1,34 @@ |
1800 | +#!/bin/sh |
1801 | +# postinst script for multipath-tools |
1802 | +# |
1803 | +# see: dh_installdeb(1) |
1804 | + |
1805 | +set -e |
1806 | + |
1807 | +# Source debconf library. |
1808 | +. /usr/share/debconf/confmodule |
1809 | + |
1810 | +case "$1" in |
1811 | + configure) |
1812 | + if [ -x /usr/sbin/update-initramfs -a -e /etc/initramfs-tools/initramfs.conf ]; then |
1813 | + update-initramfs -u |
1814 | + fi |
1815 | + ;; |
1816 | + |
1817 | + abort-upgrade|abort-remove|abort-deconfigure) |
1818 | + ;; |
1819 | + |
1820 | + *) |
1821 | + echo "postinst called with unknown argument \`$1'" >&2 |
1822 | + exit 1 |
1823 | + ;; |
1824 | +esac |
1825 | + |
1826 | +# dh_installdeb will replace this with shell code automatically |
1827 | +# generated by other debhelper scripts. |
1828 | + |
1829 | +#DEBHELPER# |
1830 | + |
1831 | +exit 0 |
1832 | + |
1833 | + |
1834 | |
1835 | === added file 'debian/multipath-tools-boot.postrm' |
1836 | --- debian/multipath-tools-boot.postrm 1970-01-01 00:00:00 +0000 |
1837 | +++ debian/multipath-tools-boot.postrm 2011-01-04 21:28:57 +0000 |
1838 | @@ -0,0 +1,45 @@ |
1839 | +#!/bin/sh |
1840 | +# postrm script for multipath-tools-boot |
1841 | +# |
1842 | +# see: dh_installdeb(1) |
1843 | + |
1844 | +set -e |
1845 | + |
1846 | +# summary of how this script can be called: |
1847 | +# * <postrm> `remove' |
1848 | +# * <postrm> `purge' |
1849 | +# * <old-postrm> `upgrade' <new-version> |
1850 | +# * <new-postrm> `failed-upgrade' <old-version> |
1851 | +# * <new-postrm> `abort-install' |
1852 | +# * <new-postrm> `abort-install' <old-version> |
1853 | +# * <new-postrm> `abort-upgrade' <old-version> |
1854 | +# * <disappearer's-postrm> `disappear' <overwriter> |
1855 | +# <overwriter-version> |
1856 | +# for details, see http://www.debian.org/doc/debian-policy/ or |
1857 | +# the debian-policy package |
1858 | + |
1859 | + |
1860 | +case "$1" in |
1861 | + remove) |
1862 | + if [ -x /usr/sbin/update-initramfs -a -e /etc/initramfs-tools/initramfs.conf ]; then |
1863 | + update-initramfs -u |
1864 | + fi |
1865 | + ;; |
1866 | + |
1867 | + purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) |
1868 | + ;; |
1869 | + |
1870 | + *) |
1871 | + echo "postrm called with unknown argument \`$1'" >&2 |
1872 | + exit 1 |
1873 | + ;; |
1874 | +esac |
1875 | + |
1876 | +# dh_installdeb will replace this with shell code automatically |
1877 | +# generated by other debhelper scripts. |
1878 | + |
1879 | +#DEBHELPER# |
1880 | + |
1881 | +exit 0 |
1882 | + |
1883 | + |
1884 | |
1885 | === added file 'debian/multipath-tools-boot.templates' |
1886 | --- debian/multipath-tools-boot.templates 1970-01-01 00:00:00 +0000 |
1887 | +++ debian/multipath-tools-boot.templates 2011-01-04 21:28:57 +0000 |
1888 | @@ -0,0 +1,10 @@ |
1889 | +Template: multipath-tools-boot/scsi_id |
1890 | +Type: note |
1891 | +_Description: The location of the getuid callout has changed |
1892 | + Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/scsi_id |
1893 | + but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. Please update |
1894 | + your configuration. This is best done by removing the getuid_callout option |
1895 | + entirely. |
1896 | + . |
1897 | + Don't forget to update your initramfs after these changes. Otherwise your |
1898 | + system might not boot from multipath. |
1899 | |
1900 | === added file 'debian/multipath-tools.README.Debian' |
1901 | --- debian/multipath-tools.README.Debian 1970-01-01 00:00:00 +0000 |
1902 | +++ debian/multipath-tools.README.Debian 2011-01-04 21:28:57 +0000 |
1903 | @@ -0,0 +1,71 @@ |
1904 | +Additional information for users of multipath-tools from Debian. |
1905 | + |
1906 | +What are these weird numbers in /dev/mapper? |
1907 | +============================================ |
1908 | +Modern Fibre-Channel connected storage devices are identified by |
1909 | +World-Wide-Numbers. If multipath-tools detects one of these devices, |
1910 | +it uses that as the default identifier in /dev/mapper. |
1911 | +If you want multipath-tools to use easier-to-read names, set |
1912 | + user_friendly_names = yes |
1913 | +in the 'defaults' section of /etc/multipath.conf. |
1914 | + |
1915 | +Note: While widely used (including the Debian Installer, which depends on it), |
1916 | +user_friendly_names can lead to locking issues with large numbers of LUNs |
1917 | +resulting in some maps not having friendly_names [1]. |
1918 | + |
1919 | +Where did my FC-connected filesystem go? |
1920 | +======================================== |
1921 | +If you were previously mounting a device connected to your system by |
1922 | +Fibre Channel and then installed multipath-tools, you need to change |
1923 | +the way you mount the device. The device must now be accessed using |
1924 | +the identifier by which device-mapper knows it. |
1925 | + |
1926 | +For example if you have in /dev/mapper a file like this: |
1927 | + brw-rw---- 1 root disk 254, 8 2009-01-05 14:35 /dev/mapper/36000393000007d3901000000fef00a2d |
1928 | + |
1929 | +then you can mount the filesystem like this: |
1930 | + mount /dev/mapper/36000393000007d3901000000fef00a2d /mnt |
1931 | +or this |
1932 | + mount /dev/disk/by-id/scsi-36000393000007d3901000000fef00a2d /mnt |
1933 | +You should prefer the latter, as this will work whether or not |
1934 | +multipath-tools is installed. |
1935 | + |
1936 | +Note that with multipath-tools installed you cannot use the device's node |
1937 | +in /dev, e.g. |
1938 | + # mount /dev/sdc1 /mnt |
1939 | + mount: /dev/sdc1 already mounted or /mnt busy |
1940 | +The device is 'busy' because it is part of a multipath map. |
1941 | +See the output of 'multipath -l' to confirm this. |
1942 | + |
1943 | +Preventing multipath-tools mapping any devices |
1944 | +============================================== |
1945 | +You may wish to prevent multipath-tools mapping any of your storage devices. |
1946 | +To do this replace the contents of /etc/multipath.conf with: |
1947 | + |
1948 | + blacklist { |
1949 | + devnode "*" |
1950 | + } |
1951 | + |
1952 | +Booting from multipathed devices |
1953 | +================================ |
1954 | +To enable booting from multipathed devices install the multipath-tools-boot |
1955 | +package. Be sure to update your bootloader configuration (e.g. |
1956 | +/boot/grub/menu.lst) to point to the multipathed root device afterwards. |
1957 | + |
1958 | +By default this will be |
1959 | + |
1960 | + /dev/disk/by-id/scsi-<wwid>-part<N> |
1961 | + |
1962 | +If you set user_friendly_names = yes in /etc/multipath.conf, the path |
1963 | +to the device will be |
1964 | + |
1965 | + /dev/mapper/mpath<X>-part<N> |
1966 | + |
1967 | +If you make changes in multipath.conf, remember to run update-initramfs so the |
1968 | +updated version of the configuration gets included in the initramfs. |
1969 | + |
1970 | + -- Guido Günther <agx@sigxcpu.org> Tue, 20 Feb 2008 13:49:18 +0100 |
1971 | + |
1972 | +-- |
1973 | +[1] https://bugzilla.redhat.com/show_bug.cgi?id=445268 |
1974 | + |
1975 | |
1976 | === added file 'debian/multipath-tools.docs' |
1977 | --- debian/multipath-tools.docs 1970-01-01 00:00:00 +0000 |
1978 | +++ debian/multipath-tools.docs 2011-01-04 21:28:57 +0000 |
1979 | @@ -0,0 +1,2 @@ |
1980 | +FAQ |
1981 | +README |
1982 | |
1983 | === added file 'debian/multipath-tools.examples' |
1984 | --- debian/multipath-tools.examples 1970-01-01 00:00:00 +0000 |
1985 | +++ debian/multipath-tools.examples 2011-01-04 21:28:57 +0000 |
1986 | @@ -0,0 +1,2 @@ |
1987 | +multipath.conf.annotated |
1988 | +multipath.conf.synthetic |
1989 | |
1990 | === added file 'debian/multipath-tools.init' |
1991 | --- debian/multipath-tools.init 1970-01-01 00:00:00 +0000 |
1992 | +++ debian/multipath-tools.init 2011-01-04 21:28:57 +0000 |
1993 | @@ -0,0 +1,57 @@ |
1994 | +#! /bin/sh |
1995 | +### BEGIN INIT INFO |
1996 | +# Provides: multipath-tools |
1997 | +# Required-Start: udev $local_fs $syslog |
1998 | +# Required-Stop: udev $local_fs $syslog |
1999 | +# Should-Start: iscsi |
2000 | +# Should-Stop: iscsi |
2001 | +# Default-Start: 2 3 4 5 |
2002 | +# Default-Stop: 0 1 6 |
2003 | +# Short-Description: multipath daemon |
2004 | +# Description: |
2005 | +### END INIT INFO |
2006 | + |
2007 | +PATH=/sbin:/bin |
2008 | +DAEMON=/sbin/multipathd |
2009 | +NAME=multipathd |
2010 | +DESC="multipath daemon" |
2011 | + |
2012 | +test -x $DAEMON || exit 0 |
2013 | + |
2014 | +. /lib/lsb/init-functions |
2015 | + |
2016 | +if [ -f /etc/default/multipath-tools ] ; then |
2017 | + . /etc/default/multipath-tools |
2018 | +fi |
2019 | + |
2020 | +set -e |
2021 | + |
2022 | +case "$1" in |
2023 | + start) |
2024 | + log_daemon_msg "Starting $DESC" "$NAME" |
2025 | + start-stop-daemon --oknodo --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS |
2026 | + log_end_msg $? |
2027 | + ;; |
2028 | + stop) |
2029 | + log_daemon_msg "Stopping $DESC" "$NAME" |
2030 | + start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON |
2031 | + log_end_msg $? |
2032 | + ;; |
2033 | + reload|force-reload) |
2034 | + log_daemon_msg "Reloading $DESC" "$NAME" |
2035 | + start-stop-daemon --stop --signal 1 --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON |
2036 | + log_end_msg $? |
2037 | + ;; |
2038 | + restart|force-reload) |
2039 | + $0 stop |
2040 | + sleep 1 |
2041 | + $0 start |
2042 | + ;; |
2043 | + *) |
2044 | + N=/etc/init.d/multipath-tools |
2045 | + echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 |
2046 | + exit 1 |
2047 | + ;; |
2048 | +esac |
2049 | + |
2050 | +exit 0 |
2051 | |
2052 | === added file 'debian/multipath-tools.install' |
2053 | --- debian/multipath-tools.install 1970-01-01 00:00:00 +0000 |
2054 | +++ debian/multipath-tools.install 2011-01-04 21:28:57 +0000 |
2055 | @@ -0,0 +1,4 @@ |
2056 | +/sbin/multi* |
2057 | +/lib/multipath/* |
2058 | +/lib/libmultipath.so.* |
2059 | +/usr/share/man/man*/multi*gz |
2060 | |
2061 | === added file 'debian/multipath-tools.postinst' |
2062 | --- debian/multipath-tools.postinst 1970-01-01 00:00:00 +0000 |
2063 | +++ debian/multipath-tools.postinst 2011-01-04 21:28:57 +0000 |
2064 | @@ -0,0 +1,49 @@ |
2065 | +#!/bin/sh |
2066 | +# postinst script for multipath-tools |
2067 | +# |
2068 | +# see: dh_installdeb(1) |
2069 | + |
2070 | +set -e |
2071 | + |
2072 | +# summary of how this script can be called: |
2073 | +# * <postinst> `configure' <most-recently-configured-version> |
2074 | +# * <old-postinst> `abort-upgrade' <new version> |
2075 | +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> |
2076 | +# <new-version> |
2077 | +# * <postinst> `abort-remove' |
2078 | +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' |
2079 | +# <failed-install-package> <version> `removing' |
2080 | +# <conflicting-package> <version> |
2081 | +# for details, see http://www.debian.org/doc/debian-policy/ or |
2082 | +# the debian-policy package |
2083 | + |
2084 | +RULE=/etc/udev/rules.d/multipath.rules |
2085 | + |
2086 | +case "$1" in |
2087 | + configure) |
2088 | + if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.4.7-4"; then |
2089 | + if [ -L $RULE ] && ! readlink -e $RULE; then |
2090 | + echo -n "Removing dangling $RULE symlink..." |
2091 | + rm $RULE |
2092 | + echo "done." |
2093 | + fi |
2094 | + fi |
2095 | + ;; |
2096 | + |
2097 | + abort-upgrade|abort-remove|abort-deconfigure) |
2098 | + ;; |
2099 | + |
2100 | + *) |
2101 | + echo "postinst called with unknown argument \`$1'" >&2 |
2102 | + exit 1 |
2103 | + ;; |
2104 | +esac |
2105 | + |
2106 | +# dh_installdeb will replace this with shell code automatically |
2107 | +# generated by other debhelper scripts. |
2108 | + |
2109 | +#DEBHELPER# |
2110 | + |
2111 | +exit 0 |
2112 | + |
2113 | + |
2114 | |
2115 | === added file 'debian/multipath-tools.preinst' |
2116 | --- debian/multipath-tools.preinst 1970-01-01 00:00:00 +0000 |
2117 | +++ debian/multipath-tools.preinst 2011-01-04 21:28:57 +0000 |
2118 | @@ -0,0 +1,43 @@ |
2119 | +#! /bin/sh |
2120 | +# preinst script for multipath-tools |
2121 | + |
2122 | +set -e |
2123 | + |
2124 | +case "$1" in |
2125 | + install) |
2126 | + ;; |
2127 | + |
2128 | + upgrade) |
2129 | + if dpkg --compare-versions "$2" lt "0.4.7-3"; then |
2130 | + [ -e /etc/rcS.d/S03multipath-tools-boot ] && rm /etc/rcS.d/S03multipath-tools-boot |
2131 | + fi |
2132 | + if dpkg --compare-versions "$2" lt "0.4.8-7"; then |
2133 | + [ -e /etc/rcS.d/S04multipath-tools-boot ] && rm /etc/rcS.d/S04multipath-tools-boot |
2134 | + fi |
2135 | + if dpkg --compare-versions "$2" lt "0.4.9"; then |
2136 | + if [ -e /var/lib/multipath/bindings ]; then |
2137 | + echo "Moving bindings file to /etc/multipath/" |
2138 | + mkdir -p /etc/multipath/ |
2139 | + mv /var/lib/multipath/bindings /etc/multipath/ |
2140 | + fi |
2141 | + fi |
2142 | + ;; |
2143 | + |
2144 | + abort-upgrade) |
2145 | + ;; |
2146 | + |
2147 | + *) |
2148 | + echo "preinst called with unknown argument \`$1'" >&2 |
2149 | + exit 1 |
2150 | + ;; |
2151 | +esac |
2152 | + |
2153 | +if ! dmsetup targets | cut -d' ' -f1 | grep -q '^multipath$'; then |
2154 | + modprobe -v dm-multipath || true |
2155 | +fi |
2156 | + |
2157 | +#DEBHELPER# |
2158 | + |
2159 | +exit 0 |
2160 | + |
2161 | + |
2162 | |
2163 | === added file 'debian/multipath-tools.prerm' |
2164 | --- debian/multipath-tools.prerm 1970-01-01 00:00:00 +0000 |
2165 | +++ debian/multipath-tools.prerm 2011-01-04 21:28:57 +0000 |
2166 | @@ -0,0 +1,22 @@ |
2167 | +#!/bin/sh |
2168 | +# |
2169 | +# multipath-tools prerm script |
2170 | +set -e |
2171 | + |
2172 | +FIXED=0.4.8-1 |
2173 | +# fix upgrades from versions << $FIXED where the init script would return an |
2174 | +# error on stop when the daemon isn't running: |
2175 | +if [ "$1" = "failed-upgrade" ] && dpkg --compare-versions "$2" lt "$FIXED"; then |
2176 | + if [ -x "/etc/init.d/multipath-tools" ]; then |
2177 | + echo "Ignoring broken stop target in versions << $FIXED..." |
2178 | + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then |
2179 | + invoke-rc.d multipath-tools stop || true |
2180 | + else |
2181 | + /etc/init.d/multipath-tools stop || true |
2182 | + fi |
2183 | + exit 0 |
2184 | + fi |
2185 | +fi |
2186 | + |
2187 | +#DEBHELPER# |
2188 | + |
2189 | |
2190 | === added file 'debian/multipath-udeb.install' |
2191 | --- debian/multipath-udeb.install 1970-01-01 00:00:00 +0000 |
2192 | +++ debian/multipath-udeb.install 2011-01-04 21:28:57 +0000 |
2193 | @@ -0,0 +1,4 @@ |
2194 | +/sbin/multipath |
2195 | +/lib/multipath/ |
2196 | +/lib/libmultipath.so.* |
2197 | +/sbin/kpartx |
2198 | |
2199 | === added file 'debian/multipath.udev' |
2200 | --- debian/multipath.udev 1970-01-01 00:00:00 +0000 |
2201 | +++ debian/multipath.udev 2011-01-04 21:28:57 +0000 |
2202 | @@ -0,0 +1,12 @@ |
2203 | +# |
2204 | +# udev rules for multipathing. |
2205 | +# The persistent symlinks are created with the kpartx rules |
2206 | +# |
2207 | + |
2208 | +# socket for uevents |
2209 | +RUN+="socket:/org/kernel/dm/multipath_event" |
2210 | + |
2211 | +# Coalesce multipath devices before multipathd is running (initramfs, early |
2212 | +# boot) |
2213 | +ACTION=="add|change", SUBSYSTEM=="block", RUN+="/sbin/multipath -v0 /dev/$name" |
2214 | + |
2215 | |
2216 | === added directory 'debian/patches' |
2217 | === added file 'debian/patches/0001-blacklist-cciss-devices.patch' |
2218 | --- debian/patches/0001-blacklist-cciss-devices.patch 1970-01-01 00:00:00 +0000 |
2219 | +++ debian/patches/0001-blacklist-cciss-devices.patch 2011-01-04 21:28:57 +0000 |
2220 | @@ -0,0 +1,29 @@ |
2221 | +From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> |
2222 | +Date: Fri, 3 Oct 2008 12:39:48 +0200 |
2223 | +Subject: [PATCH] blacklist cciss devices |
2224 | + |
2225 | +cciss support isn't complete in 0.4.8 and the half functioning causes |
2226 | +problems in d-i among other things. |
2227 | +Closes: #500991 |
2228 | +--- |
2229 | + libmultipath/blacklist.c | 6 ++++++ |
2230 | + 1 files changed, 6 insertions(+), 0 deletions(-) |
2231 | + |
2232 | +diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c |
2233 | +index f369517..2e5efc8 100644 |
2234 | +--- a/libmultipath/blacklist.c |
2235 | ++++ b/libmultipath/blacklist.c |
2236 | +@@ -121,6 +121,12 @@ setup_default_blist (struct config * conf) |
2237 | + if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) |
2238 | + return 1; |
2239 | + |
2240 | ++ str = STRDUP("^cciss!c[0-9]d[0-9]*"); |
2241 | ++ if (!str) |
2242 | ++ return 1; |
2243 | ++ if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) |
2244 | ++ return 1; |
2245 | ++ |
2246 | + vector_foreach_slot (conf->hwtable, hwe, i) { |
2247 | + if (hwe->bl_product) { |
2248 | + if (alloc_ble_device(conf->blist_device)) |
2249 | +-- |
2250 | |
2251 | === added file 'debian/patches/0002-Make-user_friendly_names-compatible-to-multipath-too.patch' |
2252 | --- debian/patches/0002-Make-user_friendly_names-compatible-to-multipath-too.patch 1970-01-01 00:00:00 +0000 |
2253 | +++ debian/patches/0002-Make-user_friendly_names-compatible-to-multipath-too.patch 2011-01-04 21:28:57 +0000 |
2254 | @@ -0,0 +1,60 @@ |
2255 | +From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> |
2256 | +Date: Sat, 21 Nov 2009 17:31:55 +0100 |
2257 | +Subject: [PATCH] Make user_friendly_names compatible to multipath-tools 0.4.8 and earlier |
2258 | + |
2259 | +--- |
2260 | + libmultipath/alias.c | 30 ++++++------------------------ |
2261 | + 1 files changed, 6 insertions(+), 24 deletions(-) |
2262 | + |
2263 | +diff --git a/libmultipath/alias.c b/libmultipath/alias.c |
2264 | +index 95506b4..02b384b 100644 |
2265 | +--- a/libmultipath/alias.c |
2266 | ++++ b/libmultipath/alias.c |
2267 | +@@ -184,40 +184,22 @@ format_devname(char *name, int id, int len) |
2268 | + { |
2269 | + int pos; |
2270 | + |
2271 | +- memset(name,0, len); |
2272 | +- strcpy(name,"mpath"); |
2273 | +- for (pos = len - 1; pos >= 5; pos--) { |
2274 | +- name[pos] = 'a' + id % 26; |
2275 | +- if (id < 26) |
2276 | +- break; |
2277 | +- id /= 26; |
2278 | +- id--; |
2279 | +- } |
2280 | +- memmove(name + 5, name + pos, len - pos); |
2281 | +- name[5 + len - pos] = '\0'; |
2282 | +- return (5 + len - pos); |
2283 | ++ memset(name, 0, len); |
2284 | ++ return snprintf(name, len, "mpath%d", id); |
2285 | + } |
2286 | + |
2287 | + static int |
2288 | + scan_devname(char *alias) |
2289 | + { |
2290 | +- char *c; |
2291 | +- int i, n = 0; |
2292 | ++ int n = 0; |
2293 | + |
2294 | + if (strncmp(alias, "mpath", 5)) |
2295 | + return -1; |
2296 | + |
2297 | +- c = alias + 5; |
2298 | +- while (*c != '\0' && *c != ' ' && *c != '\t') { |
2299 | +- i = *c - 'a'; |
2300 | +- n = ( n * 26 ) + i; |
2301 | +- c++; |
2302 | +- if (*c < 'a' || *c > 'z') |
2303 | +- break; |
2304 | +- n++; |
2305 | +- } |
2306 | ++ if (sscanf(alias, "mpath%d", &n) >= 1) |
2307 | ++ return n; |
2308 | + |
2309 | +- return n; |
2310 | ++ return -1; |
2311 | + } |
2312 | + |
2313 | + static int |
2314 | +-- |
2315 | |
2316 | === added file 'debian/patches/0003-explicitly-include-posix_types.h.patch' |
2317 | --- debian/patches/0003-explicitly-include-posix_types.h.patch 1970-01-01 00:00:00 +0000 |
2318 | +++ debian/patches/0003-explicitly-include-posix_types.h.patch 2011-01-04 21:28:57 +0000 |
2319 | @@ -0,0 +1,36 @@ |
2320 | +From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> |
2321 | +Date: Sat, 5 Dec 2009 18:11:00 +0100 |
2322 | +Subject: [PATCH] explicitly include posix_types.h |
2323 | + |
2324 | +to get the correct type for __kernel_old_dev_t |
2325 | + |
2326 | +Closes: #558990 |
2327 | +--- |
2328 | + kpartx/lopart.c | 13 +------------ |
2329 | + 1 files changed, 1 insertions(+), 12 deletions(-) |
2330 | + |
2331 | +diff --git a/kpartx/lopart.c b/kpartx/lopart.c |
2332 | +index 79d8328..570c8ad 100644 |
2333 | +--- a/kpartx/lopart.c |
2334 | ++++ b/kpartx/lopart.c |
2335 | +@@ -26,18 +26,7 @@ |
2336 | + #include <sys/stat.h> |
2337 | + #include <sys/mman.h> |
2338 | + #include <sysmacros.h> |
2339 | +- |
2340 | +-#if defined(__hppa__) || defined(__powerpc64__) || defined (__alpha__) \ |
2341 | +- || defined (__x86_64__) |
2342 | +-typedef unsigned long __kernel_old_dev_t; |
2343 | +-#elif defined(__powerpc__) || defined(__ia64__) || (defined(__sparc__) && defined (__arch64__)) |
2344 | +-typedef unsigned int __kernel_old_dev_t; |
2345 | +-#else |
2346 | +-typedef unsigned short __kernel_old_dev_t; |
2347 | +-#endif |
2348 | +- |
2349 | +-#define dev_t __kernel_old_dev_t |
2350 | +- |
2351 | ++#include <asm/posix_types.h> |
2352 | + #include <linux/loop.h> |
2353 | + |
2354 | + #include "lopart.h" |
2355 | +-- |
2356 | |
2357 | === added file 'debian/patches/1000--set-umask-in-multipathd.patch' |
2358 | --- debian/patches/1000--set-umask-in-multipathd.patch 1970-01-01 00:00:00 +0000 |
2359 | +++ debian/patches/1000--set-umask-in-multipathd.patch 2011-01-04 21:28:57 +0000 |
2360 | @@ -0,0 +1,29 @@ |
2361 | +Index: multipath-tools-0.4.8-14ubuntu1/multipathd/uxlsnr.c |
2362 | +=================================================================== |
2363 | +--- multipath-tools-0.4.8-14ubuntu1.orig/multipathd/uxlsnr.c 2009-02-12 16:03:36.166109941 +0200 |
2364 | ++++ multipath-tools-0.4.8-14ubuntu1/multipathd/uxlsnr.c 2009-02-12 16:04:44.842624340 +0200 |
2365 | +@@ -19,6 +19,7 @@ |
2366 | + #include <sys/socket.h> |
2367 | + #include <sys/un.h> |
2368 | + #include <sys/poll.h> |
2369 | ++#include <sys/stat.h> |
2370 | + |
2371 | + #include <checkers.h> |
2372 | + |
2373 | +@@ -93,11 +94,16 @@ |
2374 | + int ux_sock; |
2375 | + size_t len; |
2376 | + int rlen; |
2377 | ++ mode_t mask; |
2378 | + char *inbuf; |
2379 | + char *reply; |
2380 | + |
2381 | ++ mask=umask(0177); |
2382 | ++ |
2383 | + ux_sock = ux_socket_listen(DEFAULT_SOCKET); |
2384 | + |
2385 | ++ umask(mask); |
2386 | ++ |
2387 | + if (ux_sock == -1) { |
2388 | + condlog(0, "ux_socket_listen error"); |
2389 | + exit(1); |
2390 | |
2391 | === added file 'debian/patches/1001--fix-linking-command.patch' |
2392 | --- debian/patches/1001--fix-linking-command.patch 1970-01-01 00:00:00 +0000 |
2393 | +++ debian/patches/1001--fix-linking-command.patch 2011-01-04 21:28:57 +0000 |
2394 | @@ -0,0 +1,18 @@ |
2395 | +Description: Specify LDFLAGS after objects |
2396 | + Otherwise linking fails. Not (yet) sent upstream, may be |
2397 | + specific to Ubuntu toolchain since someone otherwise surely |
2398 | + would have noticed failure to build. |
2399 | + |
2400 | +Index: multipath-tools-0.4.9/multipathd/Makefile |
2401 | +=================================================================== |
2402 | +--- multipath-tools-0.4.9.orig/multipathd/Makefile 2010-12-22 12:03:11.010874001 -0600 |
2403 | ++++ multipath-tools-0.4.9/multipathd/Makefile 2010-12-22 12:03:19.274874001 -0600 |
2404 | +@@ -28,7 +28,7 @@ |
2405 | + all : $(EXEC) |
2406 | + |
2407 | + $(EXEC): $(OBJS) |
2408 | +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS) |
2409 | ++ $(CC) $(CFLAGS) -o $(EXEC) $(OBJS) $(LDFLAGS) |
2410 | + $(GZIP) $(EXEC).8 > $(EXEC).8.gz |
2411 | + |
2412 | + install: |
2413 | |
2414 | === added file 'debian/patches/series' |
2415 | --- debian/patches/series 1970-01-01 00:00:00 +0000 |
2416 | +++ debian/patches/series 2011-01-04 21:28:57 +0000 |
2417 | @@ -0,0 +1,5 @@ |
2418 | +0001-blacklist-cciss-devices.patch |
2419 | +0002-Make-user_friendly_names-compatible-to-multipath-too.patch |
2420 | +0003-explicitly-include-posix_types.h.patch |
2421 | +1000--set-umask-in-multipathd.patch |
2422 | +1001--fix-linking-command.patch |
2423 | |
2424 | === added directory 'debian/po' |
2425 | === added file 'debian/po/POTFILES.in' |
2426 | --- debian/po/POTFILES.in 1970-01-01 00:00:00 +0000 |
2427 | +++ debian/po/POTFILES.in 2011-01-04 21:28:57 +0000 |
2428 | @@ -0,0 +1,1 @@ |
2429 | +[type: gettext/rfc822deb] multipath-tools-boot.templates |
2430 | |
2431 | === added file 'debian/po/cs.po' |
2432 | --- debian/po/cs.po 1970-01-01 00:00:00 +0000 |
2433 | +++ debian/po/cs.po 2011-01-04 21:28:57 +0000 |
2434 | @@ -0,0 +1,49 @@ |
2435 | +# Translation of multipath-tools debconf templates to Czech |
2436 | +# Copyright (C) 2009 Debian Czech l10n team <debian-l10n-czech@lists.debian.org> |
2437 | +# This file is distributed under the same license as the multipath-tools package. |
2438 | +# |
2439 | +# Translators: |
2440 | +# Tomas Fidler <tomas.fidler@tiscali.cz>, 2009. |
2441 | +msgid "" |
2442 | +msgstr "" |
2443 | +"Project-Id-Version: multipath-tools 0.4.8-15\n" |
2444 | +"Report-Msgid-Bugs-To: multipath-tools@packages.debian.org\n" |
2445 | +"POT-Creation-Date: 2008-05-17 14:36+0200\n" |
2446 | +"PO-Revision-Date: 2009-06-17 14:00+0200\n" |
2447 | +"Last-Translator: Tomas Fidler <tomas.fidler@tiscali.cz>\n" |
2448 | +"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n" |
2449 | +"Language: cs\n" |
2450 | +"MIME-Version: 1.0\n" |
2451 | +"Content-Type: text/plain; charset=UTF-8\n" |
2452 | +"Content-Transfer-Encoding: 8bit\n" |
2453 | + |
2454 | +#. Type: note |
2455 | +#. Description |
2456 | +#: ../multipath-tools-boot.templates:1001 |
2457 | +msgid "The location of the getuid callout has changed" |
2458 | +msgstr "ZmÄ›nilo se umÃstÄ›nà getuid callout" |
2459 | + |
2460 | +#. Type: note |
2461 | +#. Description |
2462 | +#: ../multipath-tools-boot.templates:1001 |
2463 | +msgid "" |
2464 | +"Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/" |
2465 | +"scsi_id but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. " |
2466 | +"Please update your configuration. This is best done by removing the " |
2467 | +"getuid_callout option entirely." |
2468 | +msgstr "" |
2469 | +"Soubor /etc/multipath.conf v parametru „getuid_callout“ odkazuje na /sbin/" |
2470 | +"scsi_id. Tento soubor se v udev verze 0.113 a vyššà přesunul do /lib/udev/" |
2471 | +"scsi_id. ProsÃm aktualizujte Váš konfiguraÄ�nà soubor. NejjednoduÅ¡Å¡Ã cestou " |
2472 | +"pro aktualizaci je odstraněnà parametru getuid_callout ze souboru /etc/" |
2473 | +"multipath.conf." |
2474 | + |
2475 | +#. Type: note |
2476 | +#. Description |
2477 | +#: ../multipath-tools-boot.templates:1001 |
2478 | +msgid "" |
2479 | +"Don't forget to update your initramfs after these changes. Otherwise your " |
2480 | +"system might not boot from multipath." |
2481 | +msgstr "" |
2482 | +"Nezapomeňte po provedené zmÄ›nÄ› aktualizovat initramfs. V opaÄ�ném pÅ™ÃpadÄ› se " |
2483 | +"nemusà podaÅ™it start systému z multipath zaÅ™ÃzenÃ." |
2484 | |
2485 | === added file 'debian/po/de.po' |
2486 | --- debian/po/de.po 1970-01-01 00:00:00 +0000 |
2487 | +++ debian/po/de.po 2011-01-04 21:28:57 +0000 |
2488 | @@ -0,0 +1,46 @@ |
2489 | +# Translation of multipath-tools debconf templates to German |
2490 | +# Copyright (C) Helge Kreutzmann <debian@helgefjell.de>, 2008. |
2491 | +# This file is distributed under the same license as the multipath-tools package. |
2492 | +# |
2493 | +msgid "" |
2494 | +msgstr "" |
2495 | +"Project-Id-Version: multipath-tools 0.4.8-9\n" |
2496 | +"Report-Msgid-Bugs-To: multipath-tools@packages.debian.org\n" |
2497 | +"POT-Creation-Date: 2008-05-17 14:36+0200\n" |
2498 | +"PO-Revision-Date: 2008-05-20 20:37+0200\n" |
2499 | +"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n" |
2500 | +"Language-Team: de <debian-l10n-german@lists.debian.org>\n" |
2501 | +"Language: \n" |
2502 | +"MIME-Version: 1.0\n" |
2503 | +"Content-Type: text/plain; charset=ISO-8859-15\n" |
2504 | +"Content-Transfer-Encoding: 8bit\n" |
2505 | + |
2506 | +#. Type: note |
2507 | +#. Description |
2508 | +#: ../multipath-tools-boot.templates:1001 |
2509 | +msgid "The location of the getuid callout has changed" |
2510 | +msgstr "Der Ort des Getuid-Callouts ist geändert worden" |
2511 | + |
2512 | +#. Type: note |
2513 | +#. Description |
2514 | +#: ../multipath-tools-boot.templates:1001 |
2515 | +msgid "" |
2516 | +"Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/" |
2517 | +"scsi_id but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. " |
2518 | +"Please update your configuration. This is best done by removing the " |
2519 | +"getuid_callout option entirely." |
2520 | +msgstr "" |
2521 | +"In Ihrer /etc/multipath.conf weist ein getuid_callout auf /sbin/scsi_id, das " |
2522 | +"Programm wurde aber in Udev 0.113-1 nach /lib/udev/scsi_id verschoben. Bitte " |
2523 | +"aktualisieren Sie Ihre Konfiguration. Dies erfolgt am besten durch das " |
2524 | +"komplette Entfernen der Option getuid_callout." |
2525 | + |
2526 | +#. Type: note |
2527 | +#. Description |
2528 | +#: ../multipath-tools-boot.templates:1001 |
2529 | +msgid "" |
2530 | +"Don't forget to update your initramfs after these changes. Otherwise your " |
2531 | +"system might not boot from multipath." |
2532 | +msgstr "" |
2533 | +"Vergessen Sie nicht, nach dieser Änderung Ihr Initramfs zu aktualisieren. " |
2534 | +"Andernfalls könnte Ihr System nicht vom Multipath aus starten." |
2535 | |
2536 | === added file 'debian/po/es.po' |
2537 | --- debian/po/es.po 1970-01-01 00:00:00 +0000 |
2538 | +++ debian/po/es.po 2011-01-04 21:28:57 +0000 |
2539 | @@ -0,0 +1,75 @@ |
2540 | +# multipath-tools po-debconf translation to Spanish. |
2541 | +# Copyright (C) 2009 Software in the Public Interest. |
2542 | +# This file is distributed under the same license as the multipath-tools package. |
2543 | +# |
2544 | +# Changes: |
2545 | +# - Initial translation |
2546 | +# Fernando González de Requena <fgrequena@gmail.com>, 2009. |
2547 | +# |
2548 | +# |
2549 | +# Traductores, si no conoce el formato PO, merece la pena leer la |
2550 | +# documentación de gettext, especialmente las secciones dedicadas a este |
2551 | +# formato, por ejemplo ejecutando: |
2552 | +# info -n '(gettext)PO Files' |
2553 | +# info -n '(gettext)Header Entry' |
2554 | +# |
2555 | +# Equipo de traducción al español, por favor lean antes de traducir |
2556 | +# los siguientes documentos: |
2557 | +# |
2558 | +# - El proyecto de traducción de Debian al español |
2559 | +# http://www.debian.org/intl/spanish/ |
2560 | +# especialmente las notas y normas de traducción en |
2561 | +# http://www.debian.org/intl/spanish/notas |
2562 | +# |
2563 | +# - La guÃa de traducción de po's de debconf: |
2564 | +# /usr/share/doc/po-debconf/README-trans |
2565 | +# o http://www.debian.org/intl/l10n/po-debconf/README-trans |
2566 | +# |
2567 | +# Si tiene dudas o consultas sobre esta traducción consulte con el último |
2568 | +# traductor (campo Last-Translator) y ponga en copia a la lista de |
2569 | +# traducción de Debian al español (<debian-l10n-spanish@lists.debian.org>) |
2570 | +# |
2571 | +msgid "" |
2572 | +msgstr "" |
2573 | +"Project-Id-Version: multipath-tools 0.4.8-15\n" |
2574 | +"Report-Msgid-Bugs-To: multipath-tools@packages.debian.org\n" |
2575 | +"POT-Creation-Date: 2008-05-17 14:36+0200\n" |
2576 | +"PO-Revision-Date: 2009-05-04 18:22+0200\n" |
2577 | +"Last-Translator: Fernando González de Requena <fgrequena@gmail.com>\n" |
2578 | +"Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n" |
2579 | +"Language: es\n" |
2580 | +"MIME-Version: 1.0\n" |
2581 | +"Content-Type: text/plain; charset=UTF-8\n" |
2582 | +"Content-Transfer-Encoding: 8bit\n" |
2583 | +"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
2584 | +"X-Generator: KBabel 1.11.4\n" |
2585 | + |
2586 | +#. Type: note |
2587 | +#. Description |
2588 | +#: ../multipath-tools-boot.templates:1001 |
2589 | +msgid "The location of the getuid callout has changed" |
2590 | +msgstr "Ha cambiado el lugar del «getuid callout»" |
2591 | + |
2592 | +#. Type: note |
2593 | +#. Description |
2594 | +#: ../multipath-tools-boot.templates:1001 |
2595 | +msgid "" |
2596 | +"Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/" |
2597 | +"scsi_id but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. " |
2598 | +"Please update your configuration. This is best done by removing the " |
2599 | +"getuid_callout option entirely." |
2600 | +msgstr "" |
2601 | +"Su archivo «/etc/multipath.conf» todavÃa tiene un campo «getuid_callout» " |
2602 | +"apuntando a «/sbin/scsi_id», pero en udev 0.113-1 el binario se ha " |
2603 | +"trasladado a «/lib/udev/scsi_id». Actualice su configuración. La mejor mejor " |
2604 | +"manera de hacerlo es eliminar completamente la opción «getuid_callout»." |
2605 | + |
2606 | +#. Type: note |
2607 | +#. Description |
2608 | +#: ../multipath-tools-boot.templates:1001 |
2609 | +msgid "" |
2610 | +"Don't forget to update your initramfs after these changes. Otherwise your " |
2611 | +"system might not boot from multipath." |
2612 | +msgstr "" |
2613 | +"No olvide actualizar su initramfs tras estos cambios. De otro modo su " |
2614 | +"sistema podrÃa no arrancar desde multipath." |
2615 | |
2616 | === added file 'debian/po/fr.po' |
2617 | --- debian/po/fr.po 1970-01-01 00:00:00 +0000 |
2618 | +++ debian/po/fr.po 2011-01-04 21:28:57 +0000 |
2619 | @@ -0,0 +1,51 @@ |
2620 | +# translation of multipath-tools debconf templates to French |
2621 | +# Copyright (C) Jean Guillou <guillou.jean@free.fr> |
2622 | +# This file is distributed under the same license as the multipath-tools package |
2623 | +# |
2624 | +# Jean Guillou <guillou.jean@free.fr>, 2008. |
2625 | +msgid "" |
2626 | +msgstr "" |
2627 | +"Project-Id-Version: multipath-tools\n" |
2628 | +"Report-Msgid-Bugs-To: multipath-tools@packages.debian.org\n" |
2629 | +"POT-Creation-Date: 2008-05-17 14:36+0200\n" |
2630 | +"PO-Revision-Date: 2008-05-19 11:20+0200\n" |
2631 | +"Last-Translator: Jean Guillou <guillou.jean@free.fr>\n" |
2632 | +"Language-Team: French <debian-l10n-french@lists.debian.org>\n" |
2633 | +"Language: fr\n" |
2634 | +"MIME-Version: 1.0\n" |
2635 | +"Content-Type: text/plain; charset=UTF-8\n" |
2636 | +"Content-Transfer-Encoding: 8bit\n" |
2637 | +"X-Generator: KBabel 1.11.4\n" |
2638 | + |
2639 | +#. Type: note |
2640 | +#. Description |
2641 | +#: ../multipath-tools-boot.templates:1001 |
2642 | +msgid "The location of the getuid callout has changed" |
2643 | +msgstr "Modification de la valeur du champ « getuid_callout »" |
2644 | + |
2645 | +#. Type: note |
2646 | +#. Description |
2647 | +#: ../multipath-tools-boot.templates:1001 |
2648 | +msgid "" |
2649 | +"Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/" |
2650 | +"scsi_id but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. " |
2651 | +"Please update your configuration. This is best done by removing the " |
2652 | +"getuid_callout option entirely." |
2653 | +msgstr "" |
2654 | +"Dans le fichier /etc/multipath.conf la valeur actuelle du champ « " |
2655 | +"getuid_callout » est toujours /sbin/scsi_id mais l'adresse de l'exécutable " |
2656 | +"est /lib/udev/scsi_id dans udev 0.113-1. Il est impératif de modifier le " |
2657 | +"fichier de configuration. La solution suggérée est la suppression de cette " |
2658 | +"option." |
2659 | + |
2660 | +#. Type: note |
2661 | +#. Description |
2662 | +#: ../multipath-tools-boot.templates:1001 |
2663 | +msgid "" |
2664 | +"Don't forget to update your initramfs after these changes. Otherwise your " |
2665 | +"system might not boot from multipath." |
2666 | +msgstr "" |
2667 | +"Veuillez noter que vous devrez mettre à jour le système de fichiers initial " |
2668 | +"en mémoire (« initramfs ») après ces changements. En l'absence de cette " |
2669 | +"action, le système pourrait refuser de démarrer depuis un périphérique " |
2670 | +"multichemins (« multipath »)." |
2671 | |
2672 | === added file 'debian/po/ja.po' |
2673 | --- debian/po/ja.po 1970-01-01 00:00:00 +0000 |
2674 | +++ debian/po/ja.po 2011-01-04 21:28:57 +0000 |
2675 | @@ -0,0 +1,45 @@ |
2676 | +# Copyright (C) 2008-2009 Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org> |
2677 | +# This file is distributed under the same license as the multipath-tools package. |
2678 | +# Hideki Yamane (Debian-JP) <henrich@debian.or.jp>, 2009. |
2679 | +# |
2680 | +msgid "" |
2681 | +msgstr "" |
2682 | +"Project-Id-Version: multipath-tools 0.4.8-13\n" |
2683 | +"Report-Msgid-Bugs-To: multipath-tools@packages.debian.org\n" |
2684 | +"POT-Creation-Date: 2008-05-17 14:36+0200\n" |
2685 | +"PO-Revision-Date: 2009-01-06 06:26+0900\n" |
2686 | +"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n" |
2687 | +"Language-Team: Japanese <debian-japanese@lists.debian.org>\n" |
2688 | +"Language: ja\n" |
2689 | +"MIME-Version: 1.0\n" |
2690 | +"Content-Type: text/plain; charset=UTF-8\n" |
2691 | +"Content-Transfer-Encoding: 8bit\n" |
2692 | + |
2693 | +#. Type: note |
2694 | +#. Description |
2695 | +#: ../multipath-tools-boot.templates:1001 |
2696 | +msgid "The location of the getuid callout has changed" |
2697 | +msgstr "getuid callout ��置�変更�れ���" |
2698 | + |
2699 | +#. Type: note |
2700 | +#. Description |
2701 | +#: ../multipath-tools-boot.templates:1001 |
2702 | +msgid "" |
2703 | +"Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/" |
2704 | +"scsi_id but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. " |
2705 | +"Please update your configuration. This is best done by removing the " |
2706 | +"getuid_callout option entirely." |
2707 | +msgstr "" |
2708 | +"/etc/multipath.conf �� /sbin/scsi_id を����る getuid_callout ��り��" |
2709 | +"ã�Œã€�ãƒ�イナリã�¯ udev 0.113-1 ã�§ /lib/udeb/scsi_id ã�«ç§»å‹•ã�—ã�¾ã�—ã�Ÿã€‚è¨å®šã‚’æ›´æ–°ã�—" |
2710 | +"ã�¦ã��ã� ã�•ã�„。完全ã�« getuid_callout オプションを削除ã�™ã‚‹ã�®ã�Œä¸€ç•ªè‰¯ã�„方法ã�§ã�™ã€‚" |
2711 | + |
2712 | +#. Type: note |
2713 | +#. Description |
2714 | +#: ../multipath-tools-boot.templates:1001 |
2715 | +msgid "" |
2716 | +"Don't forget to update your initramfs after these changes. Otherwise your " |
2717 | +"system might not boot from multipath." |
2718 | +msgstr "" |
2719 | +"ã�“ã�®å¤‰æ›´ã‚’è¡Œã�£ã�Ÿå¾Œã�§ initramfs をアップデートã�™ã‚‹ã�®ã‚’忘れã�ªã�„よã�†ã�«ã�—ã�¦ã��ã� ã�•" |
2720 | +"�。�������システム�マル�パス�ら起動����り��。" |
2721 | |
2722 | === added file 'debian/po/pt.po' |
2723 | --- debian/po/pt.po 1970-01-01 00:00:00 +0000 |
2724 | +++ debian/po/pt.po 2011-01-04 21:28:57 +0000 |
2725 | @@ -0,0 +1,48 @@ |
2726 | +# translation of multipath-tools debconf to Portuguese |
2727 | +# Copyright (C) 2008 Américo Monteiro |
2728 | +# This file is distributed under the same license as the multipath-tools package. |
2729 | +# |
2730 | +# Américo Monteiro <a_monteiro@netcabo.pt>, 2008. |
2731 | +msgid "" |
2732 | +msgstr "" |
2733 | +"Project-Id-Version: multipath-tools 0.4.8-9\n" |
2734 | +"Report-Msgid-Bugs-To: multipath-tools@packages.debian.org\n" |
2735 | +"POT-Creation-Date: 2008-05-17 14:36+0200\n" |
2736 | +"PO-Revision-Date: 2008-05-19 19:16+0100\n" |
2737 | +"Last-Translator: Américo Monteiro <a_monteiro@netcabo.pt>\n" |
2738 | +"Language-Team: Portuguese <traduz@debianpt.org>\n" |
2739 | +"Language: pt\n" |
2740 | +"MIME-Version: 1.0\n" |
2741 | +"Content-Type: text/plain; charset=UTF-8\n" |
2742 | +"Content-Transfer-Encoding: 8bit\n" |
2743 | +"X-Generator: KBabel 1.11.4\n" |
2744 | + |
2745 | +#. Type: note |
2746 | +#. Description |
2747 | +#: ../multipath-tools-boot.templates:1001 |
2748 | +msgid "The location of the getuid callout has changed" |
2749 | +msgstr "A localização de 'getuid callout' mudou" |
2750 | + |
2751 | +#. Type: note |
2752 | +#. Description |
2753 | +#: ../multipath-tools-boot.templates:1001 |
2754 | +msgid "" |
2755 | +"Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/" |
2756 | +"scsi_id but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. " |
2757 | +"Please update your configuration. This is best done by removing the " |
2758 | +"getuid_callout option entirely." |
2759 | +msgstr "" |
2760 | +"O seu /etc/multipath.conf ainda tem o getuid_callout a apontar para /sbin/" |
2761 | +"scsi_id mas o binário foi movido para /lib/udev/scsi_id no udev 0.113-1. Por " |
2762 | +"favor actualize a sua configuração. Isto fica melhor se remover " |
2763 | +"completamente a opção getuid_callout." |
2764 | + |
2765 | +#. Type: note |
2766 | +#. Description |
2767 | +#: ../multipath-tools-boot.templates:1001 |
2768 | +msgid "" |
2769 | +"Don't forget to update your initramfs after these changes. Otherwise your " |
2770 | +"system might not boot from multipath." |
2771 | +msgstr "" |
2772 | +"Não se esqueça de actualizar o seu initramfs após estas alterações. De outra " |
2773 | +"maneira o seu sistema pode não arrancar a partir do multipath." |
2774 | |
2775 | === added file 'debian/po/ru.po' |
2776 | --- debian/po/ru.po 1970-01-01 00:00:00 +0000 |
2777 | +++ debian/po/ru.po 2011-01-04 21:28:57 +0000 |
2778 | @@ -0,0 +1,50 @@ |
2779 | +# translation of ru.po to Russian |
2780 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2781 | +# This file is distributed under the same license as the PACKAGE package. |
2782 | +# |
2783 | +# Yuri Kozlov <kozlov.y@gmail.com>, 2008. |
2784 | +msgid "" |
2785 | +msgstr "" |
2786 | +"Project-Id-Version: multipath-tools 0.4.8-9\n" |
2787 | +"Report-Msgid-Bugs-To: multipath-tools@packages.debian.org\n" |
2788 | +"POT-Creation-Date: 2008-05-17 14:36+0200\n" |
2789 | +"PO-Revision-Date: 2008-06-15 19:17+0400\n" |
2790 | +"Last-Translator: Yuri Kozlov <kozlov.y@gmail.com>\n" |
2791 | +"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n" |
2792 | +"Language: ru\n" |
2793 | +"MIME-Version: 1.0\n" |
2794 | +"Content-Type: text/plain; charset=UTF-8\n" |
2795 | +"Content-Transfer-Encoding: 8bit\n" |
2796 | +"X-Generator: KBabel 1.11.4\n" |
2797 | +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" |
2798 | +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" |
2799 | + |
2800 | +#. Type: note |
2801 | +#. Description |
2802 | +#: ../multipath-tools-boot.templates:1001 |
2803 | +msgid "The location of the getuid callout has changed" |
2804 | +msgstr "Изменило�ь ра�положение getuid callout" |
2805 | + |
2806 | +#. Type: note |
2807 | +#. Description |
2808 | +#: ../multipath-tools-boot.templates:1001 |
2809 | +msgid "" |
2810 | +"Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/" |
2811 | +"scsi_id but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. " |
2812 | +"Please update your configuration. This is best done by removing the " |
2813 | +"getuid_callout option entirely." |
2814 | +msgstr "" |
2815 | +"В имеющем�� файле /etc/multipath.conf параметр getuid_callout указывает на /" |
2816 | +"sbin/scsi_id, но �тот двоичный файл был перемещён в /lib/udev/scsi_id (пакет " |
2817 | +"udev, вер�и� 0.113-1). Обновите вашу на�тройку. Лучше в�его вообще удалить " |
2818 | +"параметр getuid_callout." |
2819 | + |
2820 | +#. Type: note |
2821 | +#. Description |
2822 | +#: ../multipath-tools-boot.templates:1001 |
2823 | +msgid "" |
2824 | +"Don't forget to update your initramfs after these changes. Otherwise your " |
2825 | +"system might not boot from multipath." |
2826 | +msgstr "" |
2827 | +"�е забудьте обновить initramfs по�ле изменени�. Иначе �и�тема может не " |
2828 | +"загрузить�� � помощью многоканального до�тупа." |
2829 | |
2830 | === added file 'debian/po/sv.po' |
2831 | --- debian/po/sv.po 1970-01-01 00:00:00 +0000 |
2832 | +++ debian/po/sv.po 2011-01-04 21:28:57 +0000 |
2833 | @@ -0,0 +1,49 @@ |
2834 | +# translation of multipath-tools_0.4.8-10_sv.po to Swedish |
2835 | +# Copyright (C) 2008 |
2836 | +# This file is distributed under the same license as the multipath-tools package. |
2837 | +# |
2838 | +# Martin Ã…gren <martin.agren@gmail.com>, 2008. |
2839 | +msgid "" |
2840 | +msgstr "" |
2841 | +"Project-Id-Version: multipath-tools_0.4.8-10_sv\n" |
2842 | +"Report-Msgid-Bugs-To: multipath-tools@packages.debian.org\n" |
2843 | +"POT-Creation-Date: 2008-05-17 14:36+0200\n" |
2844 | +"PO-Revision-Date: 2008-07-23 20:58+0200\n" |
2845 | +"Last-Translator: Martin Ã…gren <martin.agren@gmail.com>\n" |
2846 | +"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n" |
2847 | +"Language: sv\n" |
2848 | +"MIME-Version: 1.0\n" |
2849 | +"Content-Type: text/plain; charset=UTF-8\n" |
2850 | +"Content-Transfer-Encoding: 8bit\n" |
2851 | +"X-Generator: KBabel 1.11.4\n" |
2852 | +"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
2853 | + |
2854 | +#. Type: note |
2855 | +#. Description |
2856 | +#: ../multipath-tools-boot.templates:1001 |
2857 | +msgid "The location of the getuid callout has changed" |
2858 | +msgstr "Sökvägen till getuid-utanropet har ändrats" |
2859 | + |
2860 | +#. Type: note |
2861 | +#. Description |
2862 | +#: ../multipath-tools-boot.templates:1001 |
2863 | +msgid "" |
2864 | +"Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/" |
2865 | +"scsi_id but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. " |
2866 | +"Please update your configuration. This is best done by removing the " |
2867 | +"getuid_callout option entirely." |
2868 | +msgstr "" |
2869 | +"Din /etc/multipath.conf har fortfarande en getuid_callout som pekar på /sbin/" |
2870 | +"scsi_id men binären har flyttats till /lib/udev/scsi_id i udev 0.113-1. " |
2871 | +"Uppdatera din konfiguration. Detta görs bäst genom att ta bort " |
2872 | +"getuid_callout-valet helt och hållet." |
2873 | + |
2874 | +#. Type: note |
2875 | +#. Description |
2876 | +#: ../multipath-tools-boot.templates:1001 |
2877 | +msgid "" |
2878 | +"Don't forget to update your initramfs after these changes. Otherwise your " |
2879 | +"system might not boot from multipath." |
2880 | +msgstr "" |
2881 | +"Glöm inte att uppdatera din initramfs efter dessa ändringar. Annars kanske " |
2882 | +"inte ditt system startar upp från multipath." |
2883 | |
2884 | === added file 'debian/po/templates.pot' |
2885 | --- debian/po/templates.pot 1970-01-01 00:00:00 +0000 |
2886 | +++ debian/po/templates.pot 2011-01-04 21:28:57 +0000 |
2887 | @@ -0,0 +1,41 @@ |
2888 | +# SOME DESCRIPTIVE TITLE. |
2889 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
2890 | +# This file is distributed under the same license as the PACKAGE package. |
2891 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
2892 | +# |
2893 | +#, fuzzy |
2894 | +msgid "" |
2895 | +msgstr "" |
2896 | +"Project-Id-Version: PACKAGE VERSION\n" |
2897 | +"Report-Msgid-Bugs-To: multipath-tools@packages.debian.org\n" |
2898 | +"POT-Creation-Date: 2008-05-17 14:36+0200\n" |
2899 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
2900 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
2901 | +"Language-Team: LANGUAGE <LL@li.org>\n" |
2902 | +"MIME-Version: 1.0\n" |
2903 | +"Content-Type: text/plain; charset=CHARSET\n" |
2904 | +"Content-Transfer-Encoding: 8bit\n" |
2905 | + |
2906 | +#. Type: note |
2907 | +#. Description |
2908 | +#: ../multipath-tools-boot.templates:1001 |
2909 | +msgid "The location of the getuid callout has changed" |
2910 | +msgstr "" |
2911 | + |
2912 | +#. Type: note |
2913 | +#. Description |
2914 | +#: ../multipath-tools-boot.templates:1001 |
2915 | +msgid "" |
2916 | +"Your /etc/multipath.conf still has a getuid_callout pointing to /sbin/" |
2917 | +"scsi_id but the binary has moved to /lib/udev/scsi_id in udev 0.113-1. " |
2918 | +"Please update your configuration. This is best done by removing the " |
2919 | +"getuid_callout option entirely." |
2920 | +msgstr "" |
2921 | + |
2922 | +#. Type: note |
2923 | +#. Description |
2924 | +#: ../multipath-tools-boot.templates:1001 |
2925 | +msgid "" |
2926 | +"Don't forget to update your initramfs after these changes. Otherwise your " |
2927 | +"system might not boot from multipath." |
2928 | +msgstr "" |
2929 | |
2930 | === added directory 'debian/reportbug' |
2931 | === added file 'debian/reportbug/script' |
2932 | --- debian/reportbug/script 1970-01-01 00:00:00 +0000 |
2933 | +++ debian/reportbug/script 2011-01-04 21:28:57 +0000 |
2934 | @@ -0,0 +1,15 @@ |
2935 | +#!/bin/sh |
2936 | + |
2937 | +CONFIG_FILE=/etc/multipath.conf |
2938 | + |
2939 | +exec >&3 |
2940 | + |
2941 | +if [ -e "$CONFIG_FILE" ]; then |
2942 | + printf "Contents of $CONFIG_FILE:\n" |
2943 | + grep -Ev "^([[:space:]]*#|$)" $CONFIG_FILE |
2944 | +else |
2945 | + printf "$CONFIG_FILE does not exist.\n" |
2946 | +fi |
2947 | + |
2948 | +printf "\n" |
2949 | + |
2950 | |
2951 | === added file 'debian/rules' |
2952 | --- debian/rules 1970-01-01 00:00:00 +0000 |
2953 | +++ debian/rules 2011-01-04 21:28:57 +0000 |
2954 | @@ -0,0 +1,88 @@ |
2955 | +#!/usr/bin/make -f |
2956 | + |
2957 | +include /usr/share/quilt/quilt.make |
2958 | + |
2959 | +INITRAMFS=$(CURDIR)/debian/multipath-tools-boot/usr/share/initramfs-tools/ |
2960 | + |
2961 | +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
2962 | + INSTALL_PROGRAM = install -s |
2963 | +else |
2964 | + INSTALL_PROGRAM = install |
2965 | +endif |
2966 | + |
2967 | +# Work around misp(el) linker bug: |
2968 | +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=10144 |
2969 | +DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH) |
2970 | +ifneq (,$(findstring mips,$(DEB_HOST_ARCH))) |
2971 | + OPTFLAGS = "OPTFLAGS=-pipe -Wall -Wunused -Wstrict-prototypes" |
2972 | +endif |
2973 | + |
2974 | +# Uncomment this to turn on verbose mode. |
2975 | +#export DH_VERBOSE=1 |
2976 | + |
2977 | +build: build-stamp |
2978 | +build-stamp: patch |
2979 | + dh_testdir |
2980 | + |
2981 | + $(MAKE) $(OPTFLAGS) LIB=lib |
2982 | + |
2983 | + touch $@ |
2984 | + |
2985 | +clean-tree: |
2986 | + $(MAKE) clean |
2987 | + |
2988 | +clean: clean-tree unpatch |
2989 | + dh_testdir |
2990 | + rm -f build-stamp |
2991 | + dh_clean |
2992 | + debconf-updatepo |
2993 | + |
2994 | +install: |
2995 | + dh_testdir |
2996 | + dh_testroot |
2997 | + dh_clean -k |
2998 | + dh_installdirs |
2999 | + |
3000 | + mkdir -p $(CURDIR)/debian/tmp/sbin |
3001 | + $(MAKE) install INSTALL_PROGRAM=$(INSTALL_PROGRAM) DESTDIR=$(CURDIR)/debian/tmp LIB=lib |
3002 | + install -m 755 debian/dmsetup_env $(CURDIR)/debian/tmp/lib/udev/ |
3003 | + dh_install -X.rules --fail-missing --sourcedir=$(CURDIR)/debian/tmp |
3004 | + # initramfs stuff: |
3005 | + install -D -m 755 debian/initramfs/hooks $(INITRAMFS)/hooks/multipath |
3006 | + install -D -m 755 debian/initramfs/local-top \ |
3007 | + $(INITRAMFS)/scripts/local-top/multipath |
3008 | + # reportbug: |
3009 | + for pkg in "multipath-tools" "multipath-tools-boot"; do \ |
3010 | + install -D -m 755 debian/reportbug/script debian/$${pkg}/usr/share/bug/$${pkg}/script; \ |
3011 | + done |
3012 | + |
3013 | +# Build architecture-independent files here. |
3014 | +binary-indep: build install |
3015 | +# We have nothing to do by default. |
3016 | + |
3017 | +# Build architecture-dependent files here. |
3018 | +binary-arch: build install |
3019 | + dh_testdir |
3020 | + dh_testroot |
3021 | + dh_installchangelogs ChangeLog |
3022 | + dh_installdocs |
3023 | + dh_installexamples |
3024 | + dh_installinit -pmultipath-tools |
3025 | + dh_installinit -pmultipath-tools --name=multipath-tools-boot --no-start -- start 21 S . |
3026 | + dh_installudev -pkpartx --priority=95 |
3027 | + dh_installudev -pmultipath-tools --name=multipath --priority=95 |
3028 | + dh_installdebconf -pmultipath-tools-boot |
3029 | + dh_installman |
3030 | + dh_makeshlibs --add-udeb=multipath-udeb |
3031 | + dh_link |
3032 | + dh_strip |
3033 | + dh_compress |
3034 | + dh_fixperms |
3035 | + dh_installdeb |
3036 | + dh_shlibdeps |
3037 | + dh_gencontrol |
3038 | + dh_md5sums |
3039 | + dh_builddeb |
3040 | + |
3041 | +binary: binary-indep binary-arch |
3042 | +.PHONY: binary binary-arch binary-indep unpack configure build clean |
3043 | |
3044 | === added file 'debian/watch' |
3045 | --- debian/watch 1970-01-01 00:00:00 +0000 |
3046 | +++ debian/watch 2011-01-04 21:28:57 +0000 |
3047 | @@ -0,0 +1,3 @@ |
3048 | +# format version number, currently 3; this line is compulsory! |
3049 | +version=3 |
3050 | +http://christophe.varoqui.free.fr/multipath-tools/multipath-tools-([\d\.]*)\.tar\.bz2 |
3051 | |
3052 | === added directory 'getuid' |
3053 | === renamed directory 'getuid' => 'getuid.moved' |
3054 | === added file 'getuid/usb_id' |
3055 | --- getuid/usb_id 1970-01-01 00:00:00 +0000 |
3056 | +++ getuid/usb_id 2011-01-04 21:28:57 +0000 |
3057 | @@ -0,0 +1,6 @@ |
3058 | +#!/bin/sh |
3059 | +# |
3060 | +# copy in /bin and add this line to a device block in multipath.conf : |
3061 | +# getuid_callout "/bin/usb_id %n" |
3062 | +# |
3063 | +cd /sys/block/$1 && cd $(ls -l device|cut -d">" -f2) && cd ../../../.. && cat serial |
3064 | |
3065 | === added directory 'kpartx' |
3066 | === renamed directory 'kpartx' => 'kpartx.moved' |
3067 | === added file 'kpartx/ChangeLog' |
3068 | --- kpartx/ChangeLog 1970-01-01 00:00:00 +0000 |
3069 | +++ kpartx/ChangeLog 2011-01-04 21:28:57 +0000 |
3070 | @@ -0,0 +1,9 @@ |
3071 | +002: |
3072 | +* convert to kpartx name everywhere |
3073 | +* remove all HDGEO ioctl code |
3074 | +* now work with files by mapping loops on the fly |
3075 | +* merged and massage lopart.[ch] from lomount.[ch] |
3076 | + (due credit to original author here : hpa ?) |
3077 | +* added a fn find_loop_by_file in lopart.[ch] |
3078 | +001: |
3079 | +* Initial release |
3080 | |
3081 | === added file 'kpartx/Makefile' |
3082 | --- kpartx/Makefile 1970-01-01 00:00:00 +0000 |
3083 | +++ kpartx/Makefile 2011-01-04 21:28:57 +0000 |
3084 | @@ -0,0 +1,35 @@ |
3085 | +# Makefile |
3086 | +# |
3087 | +# Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@opensvc.com> |
3088 | +# |
3089 | +include ../Makefile.inc |
3090 | + |
3091 | +CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 |
3092 | + |
3093 | +LDFLAGS = -ldevmapper |
3094 | +OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \ |
3095 | + gpt.o mac.o crc32.o lopart.o xstrncpy.o devmapper.o |
3096 | +EXEC = kpartx |
3097 | + |
3098 | +all: $(EXEC) |
3099 | + |
3100 | +$(EXEC): $(OBJS) |
3101 | + $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) |
3102 | + $(GZIP) $(EXEC).8 > $(EXEC).8.gz |
3103 | + |
3104 | +install: $(EXEC) $(EXEC).8 |
3105 | + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) |
3106 | + $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir) |
3107 | + $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir) |
3108 | + $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir) |
3109 | + $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d |
3110 | + $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/ |
3111 | + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) |
3112 | + $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) |
3113 | + |
3114 | +uninstall: |
3115 | + rm -f $(DESTDIR)$(bindir)/$(EXEC) |
3116 | + rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz |
3117 | + |
3118 | +clean: |
3119 | + rm -f core *.o $(EXEC) *.gz |
3120 | |
3121 | === added file 'kpartx/README' |
3122 | --- kpartx/README 1970-01-01 00:00:00 +0000 |
3123 | +++ kpartx/README 2011-01-04 21:28:57 +0000 |
3124 | @@ -0,0 +1,9 @@ |
3125 | +This version of partx is intented to be build |
3126 | +static against klibc. |
3127 | + |
3128 | +It creates partitions as device maps. |
3129 | + |
3130 | +With due respect to the original authors, |
3131 | + |
3132 | +have fun, |
3133 | +cvaroqui |
3134 | |
3135 | === added file 'kpartx/bsd.c' |
3136 | --- kpartx/bsd.c 1970-01-01 00:00:00 +0000 |
3137 | +++ kpartx/bsd.c 2011-01-04 21:28:57 +0000 |
3138 | @@ -0,0 +1,114 @@ |
3139 | +#include "kpartx.h" |
3140 | +#include <stdio.h> |
3141 | + |
3142 | +#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */ |
3143 | +#define XBSD_MAXPARTITIONS 16 |
3144 | +#define BSD_FS_UNUSED 0 |
3145 | + |
3146 | +struct bsd_disklabel { |
3147 | + unsigned int d_magic; /* the magic number */ |
3148 | + short int d_type; /* drive type */ |
3149 | + short int d_subtype; /* controller/d_type specific */ |
3150 | + char d_typename[16]; /* type name, e.g. "eagle" */ |
3151 | + char d_packname[16]; /* pack identifier */ |
3152 | + unsigned int d_secsize; /* # of bytes per sector */ |
3153 | + unsigned int d_nsectors; /* # of data sectors per track */ |
3154 | + unsigned int d_ntracks; /* # of tracks per cylinder */ |
3155 | + unsigned int d_ncylinders; /* # of data cylinders per unit */ |
3156 | + unsigned int d_secpercyl; /* # of data sectors per cylinder */ |
3157 | + unsigned int d_secperunit; /* # of data sectors per unit */ |
3158 | + unsigned short d_sparespertrack;/* # of spare sectors per track */ |
3159 | + unsigned short d_sparespercyl; /* # of spare sectors per cylinder */ |
3160 | + unsigned int d_acylinders; /* # of alt. cylinders per unit */ |
3161 | + unsigned short d_rpm; /* rotational speed */ |
3162 | + unsigned short d_interleave; /* hardware sector interleave */ |
3163 | + unsigned short d_trackskew; /* sector 0 skew, per track */ |
3164 | + unsigned short d_cylskew; /* sector 0 skew, per cylinder */ |
3165 | + unsigned int d_headswitch; /* head switch time, usec */ |
3166 | + unsigned int d_trkseek; /* track-to-track seek, usec */ |
3167 | + unsigned int d_flags; /* generic flags */ |
3168 | + unsigned int d_drivedata[5]; /* drive-type specific information */ |
3169 | + unsigned int d_spare[5]; /* reserved for future use */ |
3170 | + unsigned int d_magic2; /* the magic number (again) */ |
3171 | + unsigned short d_checksum; /* xor of data incl. partitions */ |
3172 | + |
3173 | + /* filesystem and partition information: */ |
3174 | + unsigned short d_npartitions; /* number of partitions in following */ |
3175 | + unsigned int d_bbsize; /* size of boot area at sn0, bytes */ |
3176 | + unsigned int d_sbsize; /* max size of fs superblock, bytes */ |
3177 | + struct bsd_partition { /* the partition table */ |
3178 | + unsigned int p_size; /* number of sectors in partition */ |
3179 | + unsigned int p_offset; /* starting sector */ |
3180 | + unsigned int p_fsize; /* filesystem basic fragment size */ |
3181 | + unsigned char p_fstype; /* filesystem type, see below */ |
3182 | + unsigned char p_frag; /* filesystem fragments per block */ |
3183 | + unsigned short p_cpg; /* filesystem cylinders per group */ |
3184 | + } d_partitions[XBSD_MAXPARTITIONS];/* actually may be more */ |
3185 | +}; |
3186 | + |
3187 | +int |
3188 | +read_bsd_pt(int fd, struct slice all, struct slice *sp, int ns) { |
3189 | + struct bsd_disklabel *l; |
3190 | + struct bsd_partition *p; |
3191 | + unsigned int offset = all.start, end; |
3192 | + int max_partitions; |
3193 | + char *bp; |
3194 | + int n = 0, i, j; |
3195 | + |
3196 | + bp = getblock(fd, offset+1); /* 1 sector suffices */ |
3197 | + if (bp == NULL) |
3198 | + return -1; |
3199 | + |
3200 | + l = (struct bsd_disklabel *) bp; |
3201 | + if (l->d_magic != BSD_DISKMAGIC) |
3202 | + return -1; |
3203 | + |
3204 | + max_partitions = 16; |
3205 | + if (l->d_npartitions < max_partitions) |
3206 | + max_partitions = l->d_npartitions; |
3207 | + for (p = l->d_partitions; p - l->d_partitions < max_partitions; p++) { |
3208 | + if (p->p_fstype == BSD_FS_UNUSED) |
3209 | + /* nothing */; |
3210 | + else if (n < ns) { |
3211 | + sp[n].start = p->p_offset; |
3212 | + sp[n].size = p->p_size; |
3213 | + n++; |
3214 | + } else { |
3215 | + fprintf(stderr, |
3216 | + "bsd_partition: too many slices\n"); |
3217 | + break; |
3218 | + } |
3219 | + } |
3220 | + /* |
3221 | + * Convention has it that the bsd disklabel will always have |
3222 | + * the 'c' partition spanning the entire disk. |
3223 | + * So we have to check for contained slices. |
3224 | + */ |
3225 | + for(i = 0; i < n; i++) { |
3226 | + if (sp[i].size == 0) |
3227 | + continue; |
3228 | + |
3229 | + end = sp[i].start + sp[i].size; |
3230 | + for(j = 0; j < n; j ++) { |
3231 | + if ( i == j ) |
3232 | + continue; |
3233 | + if (sp[j].size == 0) |
3234 | + continue; |
3235 | + |
3236 | + if (sp[i].start < sp[j].start) { |
3237 | + if (end > sp[j].start && |
3238 | + end < sp[j].start + sp[j].size) { |
3239 | + /* Invalid slice */ |
3240 | + fprintf(stderr, |
3241 | + "bsd_disklabel: slice %d overlaps with %d\n", i , j); |
3242 | + sp[i].size = 0; |
3243 | + } |
3244 | + } else { |
3245 | + if (end <= sp[j].start + sp[j].size) { |
3246 | + sp[i].container = j + 1; |
3247 | + } |
3248 | + } |
3249 | + } |
3250 | + } |
3251 | + return n; |
3252 | +} |
3253 | |
3254 | === added file 'kpartx/byteorder.h' |
3255 | --- kpartx/byteorder.h 1970-01-01 00:00:00 +0000 |
3256 | +++ kpartx/byteorder.h 2011-01-04 21:28:57 +0000 |
3257 | @@ -0,0 +1,25 @@ |
3258 | +#ifndef BYTEORDER_H_INCLUDED |
3259 | +#define BYTEORDER_H_INCLUDED |
3260 | + |
3261 | +#ifdef __linux__ |
3262 | +# include <endian.h> |
3263 | +# include <byteswap.h> |
3264 | +#else |
3265 | +# error unsupported |
3266 | +#endif |
3267 | + |
3268 | +#if BYTE_ORDER == LITTLE_ENDIAN |
3269 | +# define le16_to_cpu(x) (x) |
3270 | +# define be16_to_cpu(x) bswap_16(x) |
3271 | +# define le32_to_cpu(x) (x) |
3272 | +# define be32_to_cpu(x) bswap_32(x) |
3273 | +#elif BYTE_ORDER == BIG_ENDIAN |
3274 | +# define le16_to_cpu(x) bswap_16(x) |
3275 | +# define be16_to_cpu(x) (x) |
3276 | +# define le32_to_cpu(x) bswap_32(x) |
3277 | +# define be32_to_cpu(x) (x) |
3278 | +#else |
3279 | +# error unsupported |
3280 | +#endif |
3281 | + |
3282 | +#endif /* BYTEORDER_H_INCLUDED */ |
3283 | |
3284 | === added file 'kpartx/crc32.c' |
3285 | --- kpartx/crc32.c 1970-01-01 00:00:00 +0000 |
3286 | +++ kpartx/crc32.c 2011-01-04 21:28:57 +0000 |
3287 | @@ -0,0 +1,393 @@ |
3288 | +/* |
3289 | + * crc32.c |
3290 | + * This code is in the public domain; copyright abandoned. |
3291 | + * Liability for non-performance of this code is limited to the amount |
3292 | + * you paid for it. Since it is distributed for free, your refund will |
3293 | + * be very very small. If it breaks, you get to keep both pieces. |
3294 | + */ |
3295 | + |
3296 | +#include "crc32.h" |
3297 | + |
3298 | +#if __GNUC__ >= 3 /* 2.x has "attribute", but only 3.0 has "pure */ |
3299 | +#define attribute(x) __attribute__(x) |
3300 | +#else |
3301 | +#define attribute(x) |
3302 | +#endif |
3303 | + |
3304 | +/* |
3305 | + * There are multiple 16-bit CRC polynomials in common use, but this is |
3306 | + * *the* standard CRC-32 polynomial, first popularized by Ethernet. |
3307 | + * x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0 |
3308 | + */ |
3309 | +#define CRCPOLY_LE 0xedb88320 |
3310 | +#define CRCPOLY_BE 0x04c11db7 |
3311 | + |
3312 | +/* How many bits at a time to use. Requires a table of 4<<CRC_xx_BITS bytes. */ |
3313 | +/* For less performance-sensitive, use 4 */ |
3314 | +#define CRC_LE_BITS 8 |
3315 | +#define CRC_BE_BITS 8 |
3316 | + |
3317 | +/* |
3318 | + * Little-endian CRC computation. Used with serial bit streams sent |
3319 | + * lsbit-first. Be sure to use cpu_to_le32() to append the computed CRC. |
3320 | + */ |
3321 | +#if CRC_LE_BITS > 8 || CRC_LE_BITS < 1 || CRC_LE_BITS & CRC_LE_BITS-1 |
3322 | +# error CRC_LE_BITS must be a power of 2 between 1 and 8 |
3323 | +#endif |
3324 | + |
3325 | +#if CRC_LE_BITS == 1 |
3326 | +/* |
3327 | + * In fact, the table-based code will work in this case, but it can be |
3328 | + * simplified by inlining the table in ?: form. |
3329 | + */ |
3330 | +#define crc32init_le() |
3331 | +#define crc32cleanup_le() |
3332 | +/** |
3333 | + * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32 |
3334 | + * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for |
3335 | + * other uses, or the previous crc32 value if computing incrementally. |
3336 | + * @p - pointer to buffer over which CRC is run |
3337 | + * @len - length of buffer @p |
3338 | + * |
3339 | + */ |
3340 | +uint32_t attribute((pure)) crc32_le(uint32_t crc, unsigned char const *p, size_t len) |
3341 | +{ |
3342 | + int i; |
3343 | + while (len--) { |
3344 | + crc ^= *p++; |
3345 | + for (i = 0; i < 8; i++) |
3346 | + crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); |
3347 | + } |
3348 | + return crc; |
3349 | +} |
3350 | +#else /* Table-based approach */ |
3351 | + |
3352 | +static uint32_t *crc32table_le; |
3353 | +/** |
3354 | + * crc32init_le() - allocate and initialize LE table data |
3355 | + * |
3356 | + * crc is the crc of the byte i; other entries are filled in based on the |
3357 | + * fact that crctable[i^j] = crctable[i] ^ crctable[j]. |
3358 | + * |
3359 | + */ |
3360 | +static int |
3361 | +crc32init_le(void) |
3362 | +{ |
3363 | + unsigned i, j; |
3364 | + uint32_t crc = 1; |
3365 | + |
3366 | + crc32table_le = |
3367 | + malloc((1 << CRC_LE_BITS) * sizeof(uint32_t)); |
3368 | + if (!crc32table_le) |
3369 | + return 1; |
3370 | + crc32table_le[0] = 0; |
3371 | + |
3372 | + for (i = 1 << (CRC_LE_BITS - 1); i; i >>= 1) { |
3373 | + crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); |
3374 | + for (j = 0; j < 1 << CRC_LE_BITS; j += 2 * i) |
3375 | + crc32table_le[i + j] = crc ^ crc32table_le[j]; |
3376 | + } |
3377 | + return 0; |
3378 | +} |
3379 | + |
3380 | +/** |
3381 | + * crc32cleanup_le(): free LE table data |
3382 | + */ |
3383 | +static void |
3384 | +crc32cleanup_le(void) |
3385 | +{ |
3386 | + if (crc32table_le) free(crc32table_le); |
3387 | + crc32table_le = NULL; |
3388 | +} |
3389 | + |
3390 | +/** |
3391 | + * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32 |
3392 | + * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for |
3393 | + * other uses, or the previous crc32 value if computing incrementally. |
3394 | + * @p - pointer to buffer over which CRC is run |
3395 | + * @len - length of buffer @p |
3396 | + * |
3397 | + */ |
3398 | +uint32_t attribute((pure)) crc32_le(uint32_t crc, unsigned char const *p, size_t len) |
3399 | +{ |
3400 | + while (len--) { |
3401 | +# if CRC_LE_BITS == 8 |
3402 | + crc = (crc >> 8) ^ crc32table_le[(crc ^ *p++) & 255]; |
3403 | +# elif CRC_LE_BITS == 4 |
3404 | + crc ^= *p++; |
3405 | + crc = (crc >> 4) ^ crc32table_le[crc & 15]; |
3406 | + crc = (crc >> 4) ^ crc32table_le[crc & 15]; |
3407 | +# elif CRC_LE_BITS == 2 |
3408 | + crc ^= *p++; |
3409 | + crc = (crc >> 2) ^ crc32table_le[crc & 3]; |
3410 | + crc = (crc >> 2) ^ crc32table_le[crc & 3]; |
3411 | + crc = (crc >> 2) ^ crc32table_le[crc & 3]; |
3412 | + crc = (crc >> 2) ^ crc32table_le[crc & 3]; |
3413 | +# endif |
3414 | + } |
3415 | + return crc; |
3416 | +} |
3417 | +#endif |
3418 | + |
3419 | +/* |
3420 | + * Big-endian CRC computation. Used with serial bit streams sent |
3421 | + * msbit-first. Be sure to use cpu_to_be32() to append the computed CRC. |
3422 | + */ |
3423 | +#if CRC_BE_BITS > 8 || CRC_BE_BITS < 1 || CRC_BE_BITS & CRC_BE_BITS-1 |
3424 | +# error CRC_BE_BITS must be a power of 2 between 1 and 8 |
3425 | +#endif |
3426 | + |
3427 | +#if CRC_BE_BITS == 1 |
3428 | +/* |
3429 | + * In fact, the table-based code will work in this case, but it can be |
3430 | + * simplified by inlining the table in ?: form. |
3431 | + */ |
3432 | +#define crc32init_be() |
3433 | +#define crc32cleanup_be() |
3434 | + |
3435 | +/** |
3436 | + * crc32_be() - Calculate bitwise big-endian Ethernet AUTODIN II CRC32 |
3437 | + * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for |
3438 | + * other uses, or the previous crc32 value if computing incrementally. |
3439 | + * @p - pointer to buffer over which CRC is run |
3440 | + * @len - length of buffer @p |
3441 | + * |
3442 | + */ |
3443 | +uint32_t attribute((pure)) crc32_be(uint32_t crc, unsigned char const *p, size_t len) |
3444 | +{ |
3445 | + int i; |
3446 | + while (len--) { |
3447 | + crc ^= *p++ << 24; |
3448 | + for (i = 0; i < 8; i++) |
3449 | + crc = |
3450 | + (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : |
3451 | + 0); |
3452 | + } |
3453 | + return crc; |
3454 | +} |
3455 | + |
3456 | +#else /* Table-based approach */ |
3457 | +static uint32_t *crc32table_be; |
3458 | + |
3459 | +/** |
3460 | + * crc32init_be() - allocate and initialize BE table data |
3461 | + */ |
3462 | +static int |
3463 | +crc32init_be(void) |
3464 | +{ |
3465 | + unsigned i, j; |
3466 | + uint32_t crc = 0x80000000; |
3467 | + |
3468 | + crc32table_be = |
3469 | + malloc((1 << CRC_BE_BITS) * sizeof(uint32_t)); |
3470 | + if (!crc32table_be) |
3471 | + return 1; |
3472 | + crc32table_be[0] = 0; |
3473 | + |
3474 | + for (i = 1; i < 1 << CRC_BE_BITS; i <<= 1) { |
3475 | + crc = (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : 0); |
3476 | + for (j = 0; j < i; j++) |
3477 | + crc32table_be[i + j] = crc ^ crc32table_be[j]; |
3478 | + } |
3479 | + return 0; |
3480 | +} |
3481 | + |
3482 | +/** |
3483 | + * crc32cleanup_be(): free BE table data |
3484 | + */ |
3485 | +static void |
3486 | +crc32cleanup_be(void) |
3487 | +{ |
3488 | + if (crc32table_be) free(crc32table_be); |
3489 | + crc32table_be = NULL; |
3490 | +} |
3491 | + |
3492 | + |
3493 | +/** |
3494 | + * crc32_be() - Calculate bitwise big-endian Ethernet AUTODIN II CRC32 |
3495 | + * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for |
3496 | + * other uses, or the previous crc32 value if computing incrementally. |
3497 | + * @p - pointer to buffer over which CRC is run |
3498 | + * @len - length of buffer @p |
3499 | + * |
3500 | + */ |
3501 | +uint32_t attribute((pure)) crc32_be(uint32_t crc, unsigned char const *p, size_t len) |
3502 | +{ |
3503 | + while (len--) { |
3504 | +# if CRC_BE_BITS == 8 |
3505 | + crc = (crc << 8) ^ crc32table_be[(crc >> 24) ^ *p++]; |
3506 | +# elif CRC_BE_BITS == 4 |
3507 | + crc ^= *p++ << 24; |
3508 | + crc = (crc << 4) ^ crc32table_be[crc >> 28]; |
3509 | + crc = (crc << 4) ^ crc32table_be[crc >> 28]; |
3510 | +# elif CRC_BE_BITS == 2 |
3511 | + crc ^= *p++ << 24; |
3512 | + crc = (crc << 2) ^ crc32table_be[crc >> 30]; |
3513 | + crc = (crc << 2) ^ crc32table_be[crc >> 30]; |
3514 | + crc = (crc << 2) ^ crc32table_be[crc >> 30]; |
3515 | + crc = (crc << 2) ^ crc32table_be[crc >> 30]; |
3516 | +# endif |
3517 | + } |
3518 | + return crc; |
3519 | +} |
3520 | +#endif |
3521 | + |
3522 | +/* |
3523 | + * A brief CRC tutorial. |
3524 | + * |
3525 | + * A CRC is a long-division remainder. You add the CRC to the message, |
3526 | + * and the whole thing (message+CRC) is a multiple of the given |
3527 | + * CRC polynomial. To check the CRC, you can either check that the |
3528 | + * CRC matches the recomputed value, *or* you can check that the |
3529 | + * remainder computed on the message+CRC is 0. This latter approach |
3530 | + * is used by a lot of hardware implementations, and is why so many |
3531 | + * protocols put the end-of-frame flag after the CRC. |
3532 | + * |
3533 | + * It's actually the same long division you learned in school, except that |
3534 | + * - We're working in binary, so the digits are only 0 and 1, and |
3535 | + * - When dividing polynomials, there are no carries. Rather than add and |
3536 | + * subtract, we just xor. Thus, we tend to get a bit sloppy about |
3537 | + * the difference between adding and subtracting. |
3538 | + * |
3539 | + * A 32-bit CRC polynomial is actually 33 bits long. But since it's |
3540 | + * 33 bits long, bit 32 is always going to be set, so usually the CRC |
3541 | + * is written in hex with the most significant bit omitted. (If you're |
3542 | + * familiar with the IEEE 754 floating-point format, it's the same idea.) |
3543 | + * |
3544 | + * Note that a CRC is computed over a string of *bits*, so you have |
3545 | + * to decide on the endianness of the bits within each byte. To get |
3546 | + * the best error-detecting properties, this should correspond to the |
3547 | + * order they're actually sent. For example, standard RS-232 serial is |
3548 | + * little-endian; the most significant bit (sometimes used for parity) |
3549 | + * is sent last. And when appending a CRC word to a message, you should |
3550 | + * do it in the right order, matching the endianness. |
3551 | + * |
3552 | + * Just like with ordinary division, the remainder is always smaller than |
3553 | + * the divisor (the CRC polynomial) you're dividing by. Each step of the |
3554 | + * division, you take one more digit (bit) of the dividend and append it |
3555 | + * to the current remainder. Then you figure out the appropriate multiple |
3556 | + * of the divisor to subtract to being the remainder back into range. |
3557 | + * In binary, it's easy - it has to be either 0 or 1, and to make the |
3558 | + * XOR cancel, it's just a copy of bit 32 of the remainder. |
3559 | + * |
3560 | + * When computing a CRC, we don't care about the quotient, so we can |
3561 | + * throw the quotient bit away, but subtract the appropriate multiple of |
3562 | + * the polynomial from the remainder and we're back to where we started, |
3563 | + * ready to process the next bit. |
3564 | + * |
3565 | + * A big-endian CRC written this way would be coded like: |
3566 | + * for (i = 0; i < input_bits; i++) { |
3567 | + * multiple = remainder & 0x80000000 ? CRCPOLY : 0; |
3568 | + * remainder = (remainder << 1 | next_input_bit()) ^ multiple; |
3569 | + * } |
3570 | + * Notice how, to get at bit 32 of the shifted remainder, we look |
3571 | + * at bit 31 of the remainder *before* shifting it. |
3572 | + * |
3573 | + * But also notice how the next_input_bit() bits we're shifting into |
3574 | + * the remainder don't actually affect any decision-making until |
3575 | + * 32 bits later. Thus, the first 32 cycles of this are pretty boring. |
3576 | + * Also, to add the CRC to a message, we need a 32-bit-long hole for it at |
3577 | + * the end, so we have to add 32 extra cycles shifting in zeros at the |
3578 | + * end of every message, |
3579 | + * |
3580 | + * So the standard trick is to rearrage merging in the next_input_bit() |
3581 | + * until the moment it's needed. Then the first 32 cycles can be precomputed, |
3582 | + * and merging in the final 32 zero bits to make room for the CRC can be |
3583 | + * skipped entirely. |
3584 | + * This changes the code to: |
3585 | + * for (i = 0; i < input_bits; i++) { |
3586 | + * remainder ^= next_input_bit() << 31; |
3587 | + * multiple = (remainder & 0x80000000) ? CRCPOLY : 0; |
3588 | + * remainder = (remainder << 1) ^ multiple; |
3589 | + * } |
3590 | + * With this optimization, the little-endian code is simpler: |
3591 | + * for (i = 0; i < input_bits; i++) { |
3592 | + * remainder ^= next_input_bit(); |
3593 | + * multiple = (remainder & 1) ? CRCPOLY : 0; |
3594 | + * remainder = (remainder >> 1) ^ multiple; |
3595 | + * } |
3596 | + * |
3597 | + * Note that the other details of endianness have been hidden in CRCPOLY |
3598 | + * (which must be bit-reversed) and next_input_bit(). |
3599 | + * |
3600 | + * However, as long as next_input_bit is returning the bits in a sensible |
3601 | + * order, we can actually do the merging 8 or more bits at a time rather |
3602 | + * than one bit at a time: |
3603 | + * for (i = 0; i < input_bytes; i++) { |
3604 | + * remainder ^= next_input_byte() << 24; |
3605 | + * for (j = 0; j < 8; j++) { |
3606 | + * multiple = (remainder & 0x80000000) ? CRCPOLY : 0; |
3607 | + * remainder = (remainder << 1) ^ multiple; |
3608 | + * } |
3609 | + * } |
3610 | + * Or in little-endian: |
3611 | + * for (i = 0; i < input_bytes; i++) { |
3612 | + * remainder ^= next_input_byte(); |
3613 | + * for (j = 0; j < 8; j++) { |
3614 | + * multiple = (remainder & 1) ? CRCPOLY : 0; |
3615 | + * remainder = (remainder << 1) ^ multiple; |
3616 | + * } |
3617 | + * } |
3618 | + * If the input is a multiple of 32 bits, you can even XOR in a 32-bit |
3619 | + * word at a time and increase the inner loop count to 32. |
3620 | + * |
3621 | + * You can also mix and match the two loop styles, for example doing the |
3622 | + * bulk of a message byte-at-a-time and adding bit-at-a-time processing |
3623 | + * for any fractional bytes at the end. |
3624 | + * |
3625 | + * The only remaining optimization is to the byte-at-a-time table method. |
3626 | + * Here, rather than just shifting one bit of the remainder to decide |
3627 | + * in the correct multiple to subtract, we can shift a byte at a time. |
3628 | + * This produces a 40-bit (rather than a 33-bit) intermediate remainder, |
3629 | + * but again the multiple of the polynomial to subtract depends only on |
3630 | + * the high bits, the high 8 bits in this case. |
3631 | + * |
3632 | + * The multile we need in that case is the low 32 bits of a 40-bit |
3633 | + * value whose high 8 bits are given, and which is a multiple of the |
3634 | + * generator polynomial. This is simply the CRC-32 of the given |
3635 | + * one-byte message. |
3636 | + * |
3637 | + * Two more details: normally, appending zero bits to a message which |
3638 | + * is already a multiple of a polynomial produces a larger multiple of that |
3639 | + * polynomial. To enable a CRC to detect this condition, it's common to |
3640 | + * invert the CRC before appending it. This makes the remainder of the |
3641 | + * message+crc come out not as zero, but some fixed non-zero value. |
3642 | + * |
3643 | + * The same problem applies to zero bits prepended to the message, and |
3644 | + * a similar solution is used. Instead of starting with a remainder of |
3645 | + * 0, an initial remainder of all ones is used. As long as you start |
3646 | + * the same way on decoding, it doesn't make a difference. |
3647 | + */ |
3648 | + |
3649 | + |
3650 | +/** |
3651 | + * init_crc32(): generates CRC32 tables |
3652 | + * |
3653 | + * On successful initialization, use count is increased. |
3654 | + * This guarantees that the library functions will stay resident |
3655 | + * in memory, and prevents someone from 'rmmod crc32' while |
3656 | + * a driver that needs it is still loaded. |
3657 | + * This also greatly simplifies drivers, as there's no need |
3658 | + * to call an initialization/cleanup function from each driver. |
3659 | + * Since crc32.o is a library module, there's no requirement |
3660 | + * that the user can unload it. |
3661 | + */ |
3662 | +int |
3663 | +init_crc32(void) |
3664 | +{ |
3665 | + int rc1, rc2, rc; |
3666 | + rc1 = crc32init_le(); |
3667 | + rc2 = crc32init_be(); |
3668 | + rc = rc1 || rc2; |
3669 | + return rc; |
3670 | +} |
3671 | + |
3672 | +/** |
3673 | + * cleanup_crc32(): frees crc32 data when no longer needed |
3674 | + */ |
3675 | +void |
3676 | +cleanup_crc32(void) |
3677 | +{ |
3678 | + crc32cleanup_le(); |
3679 | + crc32cleanup_be(); |
3680 | +} |
3681 | |
3682 | === added file 'kpartx/crc32.h' |
3683 | --- kpartx/crc32.h 1970-01-01 00:00:00 +0000 |
3684 | +++ kpartx/crc32.h 2011-01-04 21:28:57 +0000 |
3685 | @@ -0,0 +1,19 @@ |
3686 | +/* |
3687 | + * crc32.h |
3688 | + */ |
3689 | +#ifndef _CRC32_H |
3690 | +#define _CRC32_H |
3691 | + |
3692 | +#include <inttypes.h> |
3693 | +#include <stdlib.h> |
3694 | + |
3695 | +extern int init_crc32(void); |
3696 | +extern void cleanup_crc32(void); |
3697 | +extern uint32_t crc32_le(uint32_t crc, unsigned char const *p, size_t len); |
3698 | +extern uint32_t crc32_be(uint32_t crc, unsigned char const *p, size_t len); |
3699 | + |
3700 | +#define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)data, length) |
3701 | +#define ether_crc_le(length, data) crc32_le(~0, data, length) |
3702 | +#define ether_crc(length, data) crc32_be(~0, data, length) |
3703 | + |
3704 | +#endif /* _CRC32_H */ |
3705 | |
3706 | === added file 'kpartx/dasd.c' |
3707 | --- kpartx/dasd.c 1970-01-01 00:00:00 +0000 |
3708 | +++ kpartx/dasd.c 2011-01-04 21:28:57 +0000 |
3709 | @@ -0,0 +1,262 @@ |
3710 | +/* |
3711 | + * dasd.c |
3712 | + * |
3713 | + * IBM DASD partition table handling. |
3714 | + * |
3715 | + * Mostly taken from drivers/s390/block/dasd.c |
3716 | + * |
3717 | + * Copyright (c) 2005, Hannes Reinecke, SUSE Linux Products GmbH |
3718 | + * Copyright IBM Corporation, 2009 |
3719 | + * |
3720 | + * This program is free software; you can redistribute it and/or |
3721 | + * modify it under the terms of the GNU General Public License |
3722 | + * as published by the Free Software Foundation; either version 2 |
3723 | + * of the License, or (at your option) any later version. |
3724 | + * |
3725 | + * This program is distributed in the hope that it will be useful, |
3726 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3727 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3728 | + * GNU General Public License for more details. |
3729 | + * |
3730 | + * You should have received a copy of the GNU General Public License |
3731 | + * along with this program; if not, write to the Free Software |
3732 | + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
3733 | + * USA. |
3734 | + */ |
3735 | + |
3736 | +#include <stdio.h> |
3737 | +#include <stdlib.h> |
3738 | +#include <unistd.h> |
3739 | +#include <inttypes.h> |
3740 | +#include <sys/types.h> |
3741 | +#include <sys/stat.h> |
3742 | +#include <sys/ioctl.h> |
3743 | +#include <linux/hdreg.h> |
3744 | +#include <errno.h> |
3745 | +#include <string.h> |
3746 | +#include <fcntl.h> |
3747 | +#include <libdevmapper.h> |
3748 | +#include "devmapper.h" |
3749 | +#include "kpartx.h" |
3750 | +#include "byteorder.h" |
3751 | +#include "dasd.h" |
3752 | + |
3753 | +unsigned long long sectors512(unsigned long long sectors, int blocksize) |
3754 | +{ |
3755 | + return sectors * (blocksize >> 9); |
3756 | +} |
3757 | + |
3758 | +/* |
3759 | + */ |
3760 | +int |
3761 | +read_dasd_pt(int fd, struct slice all, struct slice *sp, int ns) |
3762 | +{ |
3763 | + int retval = -1; |
3764 | + int blocksize; |
3765 | + uint64_t disksize; |
3766 | + uint64_t offset, size, fmt_size; |
3767 | + dasd_information_t info; |
3768 | + struct hd_geometry geo; |
3769 | + char type[5] = {0,}; |
3770 | + volume_label_t vlabel; |
3771 | + unsigned char *data = NULL; |
3772 | + uint64_t blk; |
3773 | + int fd_dasd = -1; |
3774 | + struct stat sbuf; |
3775 | + dev_t dev; |
3776 | + char *devname; |
3777 | + char pathname[256]; |
3778 | + |
3779 | + if (fd < 0) { |
3780 | + return -1; |
3781 | + } |
3782 | + |
3783 | + if (fstat(fd, &sbuf) == -1) { |
3784 | + return -1; |
3785 | + } |
3786 | + |
3787 | + devname = dm_mapname(major(sbuf.st_rdev), minor(sbuf.st_rdev)); |
3788 | + |
3789 | + if (devname != NULL) { |
3790 | + /* We were passed a handle to a dm device. |
3791 | + * Get the first target and operate on that instead. |
3792 | + */ |
3793 | + if (!(dev = dm_get_first_dep(devname))) { |
3794 | + free(devname); |
3795 | + return -1; |
3796 | + } |
3797 | + free(devname); |
3798 | + |
3799 | + if ((unsigned int)major(dev) != 94) { |
3800 | + /* Not a DASD */ |
3801 | + return -1; |
3802 | + } |
3803 | + |
3804 | + /* |
3805 | + * Hard to believe, but there's no simple way to translate |
3806 | + * major/minor into an openable device file, so we have |
3807 | + * to create one for ourselves. |
3808 | + */ |
3809 | + |
3810 | + sprintf(pathname, "/dev/.kpartx-node-%u-%u", |
3811 | + (unsigned int)major(dev), (unsigned int)minor(dev)); |
3812 | + if ((fd_dasd = open(pathname, O_RDONLY)) == -1) { |
3813 | + /* Devicenode does not exist. Try to create one */ |
3814 | + if (mknod(pathname, 0600 | S_IFBLK, dev) == -1) { |
3815 | + /* Couldn't create a device node */ |
3816 | + return -1; |
3817 | + } |
3818 | + fd_dasd = open(pathname, O_RDONLY); |
3819 | + /* |
3820 | + * The file will vanish when the last process (we) |
3821 | + * has ceased to access it. |
3822 | + */ |
3823 | + unlink(pathname); |
3824 | + } |
3825 | + if (!fd_dasd) { |
3826 | + /* Couldn't open the device */ |
3827 | + return -1; |
3828 | + } |
3829 | + } else { |
3830 | + fd_dasd = fd; |
3831 | + } |
3832 | + |
3833 | + if (ioctl(fd_dasd, BIODASDINFO, (unsigned long)&info) != 0) { |
3834 | + goto out; |
3835 | + } |
3836 | + |
3837 | + if (ioctl(fd_dasd, HDIO_GETGEO, (unsigned long)&geo) != 0) { |
3838 | + goto out; |
3839 | + } |
3840 | + |
3841 | + if (ioctl(fd_dasd, BLKGETSIZE64, &disksize) != 0) |
3842 | + goto out; |
3843 | + disksize >>= 9; |
3844 | + |
3845 | + if (ioctl(fd_dasd, BLKSSZGET, &blocksize) != 0) |
3846 | + goto out; |
3847 | + |
3848 | + if (blocksize < 512 || blocksize > 4096) |
3849 | + goto out; |
3850 | + |
3851 | + /* |
3852 | + * Get volume label, extract name and type. |
3853 | + */ |
3854 | + |
3855 | + if (!(data = (unsigned char *)malloc(blocksize))) |
3856 | + goto out; |
3857 | + |
3858 | + |
3859 | + if (lseek(fd_dasd, info.label_block * blocksize, SEEK_SET) == -1) |
3860 | + goto out; |
3861 | + if (read(fd_dasd, data, blocksize) == -1) { |
3862 | + perror("read"); |
3863 | + goto out; |
3864 | + } |
3865 | + |
3866 | + if ((!info.FBA_layout) && (!strcmp(info.type, "ECKD"))) |
3867 | + memcpy (&vlabel, data, sizeof(vlabel)); |
3868 | + else { |
3869 | + bzero(&vlabel,4); |
3870 | + memcpy (&vlabel.vollbl, data, sizeof(vlabel) - 4); |
3871 | + } |
3872 | + vtoc_ebcdic_dec(vlabel.vollbl, type, 4); |
3873 | + |
3874 | + /* |
3875 | + * Three different types: CMS1, VOL1 and LNX1/unlabeled |
3876 | + */ |
3877 | + if (strncmp(type, "CMS1", 4) == 0) { |
3878 | + /* |
3879 | + * VM style CMS1 labeled disk |
3880 | + */ |
3881 | + unsigned int *label = (unsigned int *) &vlabel; |
3882 | + |
3883 | + blocksize = label[4]; |
3884 | + if (label[14] != 0) { |
3885 | + /* disk is reserved minidisk */ |
3886 | + offset = label[14]; |
3887 | + size = sectors512(label[8] - 1, blocksize); |
3888 | + } else { |
3889 | + offset = info.label_block + 1; |
3890 | + size = sectors512(label[8], blocksize); |
3891 | + } |
3892 | + sp[0].start = sectors512(offset, blocksize); |
3893 | + sp[0].size = size - sp[0].start; |
3894 | + retval = 1; |
3895 | + } else if ((strncmp(type, "VOL1", 4) == 0) && |
3896 | + (!info.FBA_layout) && (!strcmp(info.type, "ECKD"))) { |
3897 | + /* |
3898 | + * New style VOL1 labeled disk |
3899 | + */ |
3900 | + int counter; |
3901 | + |
3902 | + /* get block number and read then go through format1 labels */ |
3903 | + blk = cchhb2blk(&vlabel.vtoc, &geo) + 1; |
3904 | + counter = 0; |
3905 | + if (lseek(fd_dasd, blk * blocksize, SEEK_SET) == -1) |
3906 | + goto out; |
3907 | + |
3908 | + while (read(fd_dasd, data, blocksize) != -1) { |
3909 | + format1_label_t f1; |
3910 | + |
3911 | + memcpy(&f1, data, sizeof(format1_label_t)); |
3912 | + |
3913 | + /* skip FMT4 / FMT5 / FMT7 labels */ |
3914 | + if (EBCtoASC[f1.DS1FMTID] == '4' |
3915 | + || EBCtoASC[f1.DS1FMTID] == '5' |
3916 | + || EBCtoASC[f1.DS1FMTID] == '7' |
3917 | + || EBCtoASC[f1.DS1FMTID] == '9') { |
3918 | + blk++; |
3919 | + continue; |
3920 | + } |
3921 | + |
3922 | + /* only FMT1 and FMT8 valid at this point */ |
3923 | + if (EBCtoASC[f1.DS1FMTID] != '1' && |
3924 | + EBCtoASC[f1.DS1FMTID] != '8') |
3925 | + break; |
3926 | + |
3927 | + /* OK, we got valid partition data */ |
3928 | + offset = cchh2blk(&f1.DS1EXT1.llimit, &geo); |
3929 | + size = cchh2blk(&f1.DS1EXT1.ulimit, &geo) - |
3930 | + offset + geo.sectors; |
3931 | + sp[counter].start = sectors512(offset, blocksize); |
3932 | + sp[counter].size = sectors512(size, blocksize); |
3933 | + counter++; |
3934 | + blk++; |
3935 | + } |
3936 | + retval = counter; |
3937 | + } else { |
3938 | + /* |
3939 | + * Old style LNX1 or unlabeled disk |
3940 | + */ |
3941 | + if (strncmp(type, "LNX1", 4) == 0) { |
3942 | + if (vlabel.ldl_version == 0xf2) { |
3943 | + fmt_size = sectors512(vlabel.formatted_blocks, |
3944 | + blocksize); |
3945 | + } else if (!strcmp(info.type, "ECKD")) { |
3946 | + /* formated w/o large volume support */ |
3947 | + fmt_size = geo.cylinders * geo.heads |
3948 | + * geo.sectors * (blocksize >> 9); |
3949 | + } else { |
3950 | + /* old label and no usable disk geometry |
3951 | + * (e.g. DIAG) */ |
3952 | + fmt_size = disksize; |
3953 | + } |
3954 | + size = disksize; |
3955 | + if (fmt_size < size) |
3956 | + size = fmt_size; |
3957 | + } else |
3958 | + size = disksize; |
3959 | + |
3960 | + sp[0].start = sectors512(info.label_block + 1, blocksize); |
3961 | + sp[0].size = size - sp[0].start; |
3962 | + retval = 1; |
3963 | + } |
3964 | + |
3965 | + out: |
3966 | + if (data != NULL) |
3967 | + free(data); |
3968 | + if (fd_dasd != -1 && fd_dasd != fd) |
3969 | + close(fd_dasd); |
3970 | + return retval; |
3971 | +} |
3972 | |
3973 | === added file 'kpartx/dasd.h' |
3974 | --- kpartx/dasd.h 1970-01-01 00:00:00 +0000 |
3975 | +++ kpartx/dasd.h 2011-01-04 21:28:57 +0000 |
3976 | @@ -0,0 +1,293 @@ |
3977 | +/* |
3978 | + * dasd.h |
3979 | + * |
3980 | + * IBM DASD partition table handling. |
3981 | + * |
3982 | + * Mostly taken from drivers/s390/block/dasd.c |
3983 | + * |
3984 | + * Copyright (c) 2005, Hannes Reinecke, SUSE Linux Products GmbH |
3985 | + * Copyright IBM Corporation, 2009 |
3986 | + * |
3987 | + * This program is free software; you can redistribute it and/or |
3988 | + * modify it under the terms of the GNU General Public License |
3989 | + * as published by the Free Software Foundation; either version 2 |
3990 | + * of the License, or (at your option) any later version. |
3991 | + * |
3992 | + * This program is distributed in the hope that it will be useful, |
3993 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3994 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3995 | + * GNU General Public License for more details. |
3996 | + * |
3997 | + * You should have received a copy of the GNU General Public License |
3998 | + * along with this program; if not, write to the Free Software |
3999 | + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
4000 | + * USA. |
4001 | + */ |
4002 | + |
4003 | +#ifndef _DASD_H |
4004 | +#define _DASD_H |
4005 | + |
4006 | +typedef struct ttr |
4007 | +{ |
4008 | + uint16_t tt; |
4009 | + uint8_t r; |
4010 | +} __attribute__ ((packed)) ttr_t; |
4011 | + |
4012 | +typedef struct cchhb |
4013 | +{ |
4014 | + uint16_t cc; |
4015 | + uint16_t hh; |
4016 | + uint8_t b; |
4017 | +} __attribute__ ((packed)) cchhb_t; |
4018 | + |
4019 | +typedef struct cchh |
4020 | +{ |
4021 | + uint16_t cc; |
4022 | + uint16_t hh; |
4023 | +} __attribute__ ((packed)) cchh_t; |
4024 | + |
4025 | +typedef struct labeldate |
4026 | +{ |
4027 | + uint8_t year; |
4028 | + uint16_t day; |
4029 | +} __attribute__ ((packed)) labeldate_t; |
4030 | + |
4031 | + |
4032 | +typedef struct volume_label |
4033 | +{ |
4034 | + char volkey[4]; /* volume key = volume label */ |
4035 | + char vollbl[4]; /* volume label */ |
4036 | + char volid[6]; /* volume identifier */ |
4037 | + uint8_t security; /* security byte */ |
4038 | + cchhb_t vtoc; /* VTOC address */ |
4039 | + char res1[5]; /* reserved */ |
4040 | + char cisize[4]; /* CI-size for FBA,... */ |
4041 | + /* ...blanks for CKD */ |
4042 | + char blkperci[4]; /* no of blocks per CI (FBA), blanks for CKD */ |
4043 | + char labperci[4]; /* no of labels per CI (FBA), blanks for CKD */ |
4044 | + char res2[4]; /* reserved */ |
4045 | + char lvtoc[14]; /* owner code for LVTOC */ |
4046 | + char res3[28]; /* reserved */ |
4047 | + char ldl_version; /* version number, valid for ldl format */ |
4048 | + uint64_t formatted_blocks; /* valid when ldl_version >= f2 */ |
4049 | +} __attribute__ ((packed)) volume_label_t; |
4050 | + |
4051 | + |
4052 | +typedef struct extent |
4053 | +{ |
4054 | + uint8_t typeind; /* extent type indicator */ |
4055 | + uint8_t seqno; /* extent sequence number */ |
4056 | + cchh_t llimit; /* starting point of this extent */ |
4057 | + cchh_t ulimit; /* ending point of this extent */ |
4058 | +} __attribute__ ((packed)) extent_t; |
4059 | + |
4060 | + |
4061 | +typedef struct dev_const |
4062 | +{ |
4063 | + uint16_t DS4DSCYL; /* number of logical cyls */ |
4064 | + uint16_t DS4DSTRK; /* number of tracks in a logical cylinder */ |
4065 | + uint16_t DS4DEVTK; /* device track length */ |
4066 | + uint8_t DS4DEVI; /* non-last keyed record overhead */ |
4067 | + uint8_t DS4DEVL; /* last keyed record overhead */ |
4068 | + uint8_t DS4DEVK; /* non-keyed record overhead differential */ |
4069 | + uint8_t DS4DEVFG; /* flag byte */ |
4070 | + uint16_t DS4DEVTL; /* device tolerance */ |
4071 | + uint8_t DS4DEVDT; /* number of DSCB's per track */ |
4072 | + uint8_t DS4DEVDB; /* number of directory blocks per track */ |
4073 | +} __attribute__ ((packed)) dev_const_t; |
4074 | + |
4075 | + |
4076 | +typedef struct format1_label |
4077 | +{ |
4078 | + char DS1DSNAM[44]; /* data set name */ |
4079 | + uint8_t DS1FMTID; /* format identifier */ |
4080 | + char DS1DSSN[6]; /* data set serial number */ |
4081 | + uint16_t DS1VOLSQ; /* volume sequence number */ |
4082 | + labeldate_t DS1CREDT; /* creation date: ydd */ |
4083 | + labeldate_t DS1EXPDT; /* expiration date */ |
4084 | + uint8_t DS1NOEPV; /* number of extents on volume */ |
4085 | + uint8_t DS1NOBDB; /* no. of bytes used in last direction blk */ |
4086 | + uint8_t DS1FLAG1; /* flag 1 */ |
4087 | + char DS1SYSCD[13]; /* system code */ |
4088 | + labeldate_t DS1REFD; /* date last referenced */ |
4089 | + uint8_t DS1SMSFG; /* system managed storage indicators */ |
4090 | + uint8_t DS1SCXTF; /* sec. space extension flag byte */ |
4091 | + uint16_t DS1SCXTV; /* secondary space extension value */ |
4092 | + uint8_t DS1DSRG1; /* data set organisation byte 1 */ |
4093 | + uint8_t DS1DSRG2; /* data set organisation byte 2 */ |
4094 | + uint8_t DS1RECFM; /* record format */ |
4095 | + uint8_t DS1OPTCD; /* option code */ |
4096 | + uint16_t DS1BLKL; /* block length */ |
4097 | + uint16_t DS1LRECL; /* record length */ |
4098 | + uint8_t DS1KEYL; /* key length */ |
4099 | + uint16_t DS1RKP; /* relative key position */ |
4100 | + uint8_t DS1DSIND; /* data set indicators */ |
4101 | + uint8_t DS1SCAL1; /* secondary allocation flag byte */ |
4102 | + char DS1SCAL3[3]; /* secondary allocation quantity */ |
4103 | + ttr_t DS1LSTAR; /* last used track and block on track */ |
4104 | + uint16_t DS1TRBAL; /* space remaining on last used track */ |
4105 | + uint16_t res1; /* reserved */ |
4106 | + extent_t DS1EXT1; /* first extent description */ |
4107 | + extent_t DS1EXT2; /* second extent description */ |
4108 | + extent_t DS1EXT3; /* third extent description */ |
4109 | + cchhb_t DS1PTRDS; /* possible pointer to f2 or f3 DSCB */ |
4110 | +} __attribute__ ((packed)) format1_label_t; |
4111 | + |
4112 | + |
4113 | +/* |
4114 | + * struct dasd_information_t |
4115 | + * represents any data about the data, which is visible to userspace |
4116 | + */ |
4117 | +typedef struct dasd_information_t { |
4118 | + unsigned int devno; /* S/390 devno */ |
4119 | + unsigned int real_devno; /* for aliases */ |
4120 | + unsigned int schid; /* S/390 subchannel identifier */ |
4121 | + unsigned int cu_type : 16; /* from SenseID */ |
4122 | + unsigned int cu_model : 8; /* from SenseID */ |
4123 | + unsigned int dev_type : 16; /* from SenseID */ |
4124 | + unsigned int dev_model : 8; /* from SenseID */ |
4125 | + unsigned int open_count; |
4126 | + unsigned int req_queue_len; |
4127 | + unsigned int chanq_len; /* length of chanq */ |
4128 | + char type[4]; /* from discipline.name, 'none' for unknown */ |
4129 | + unsigned int status; /* current device level */ |
4130 | + unsigned int label_block; /* where to find the VOLSER */ |
4131 | + unsigned int FBA_layout; /* fixed block size (like AIXVOL) */ |
4132 | + unsigned int characteristics_size; |
4133 | + unsigned int confdata_size; |
4134 | + char characteristics[64]; /* from read_device_characteristics */ |
4135 | + char configuration_data[256]; /* from read_configuration_data */ |
4136 | +} dasd_information_t; |
4137 | + |
4138 | +#define DASD_IOCTL_LETTER 'D' |
4139 | +#define BIODASDINFO _IOR(DASD_IOCTL_LETTER,1,dasd_information_t) |
4140 | +#define BLKGETSIZE _IO(0x12,96) |
4141 | +#define BLKSSZGET _IO(0x12,104) |
4142 | +#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* device size in bytes (u64 *arg)*/ |
4143 | + |
4144 | +/* |
4145 | + * Only compile this on S/390. Doesn't make any sense |
4146 | + * for other architectures. |
4147 | + */ |
4148 | + |
4149 | +static unsigned char EBCtoASC[256] = |
4150 | +{ |
4151 | +/* 0x00 NUL SOH STX ETX *SEL HT *RNL DEL */ |
4152 | + 0x00, 0x01, 0x02, 0x03, 0x07, 0x09, 0x07, 0x7F, |
4153 | +/* 0x08 -GE -SPS -RPT VT FF CR SO SI */ |
4154 | + 0x07, 0x07, 0x07, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, |
4155 | +/* 0x10 DLE DC1 DC2 DC3 -RES -NL BS -POC |
4156 | + -ENP ->LF */ |
4157 | + 0x10, 0x11, 0x12, 0x13, 0x07, 0x0A, 0x08, 0x07, |
4158 | +/* 0x18 CAN EM -UBS -CU1 -IFS -IGS -IRS -ITB |
4159 | + -IUS */ |
4160 | + 0x18, 0x19, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, |
4161 | +/* 0x20 -DS -SOS FS -WUS -BYP LF ETB ESC |
4162 | + -INP */ |
4163 | + 0x07, 0x07, 0x1C, 0x07, 0x07, 0x0A, 0x17, 0x1B, |
4164 | +/* 0x28 -SA -SFE -SM -CSP -MFA ENQ ACK BEL |
4165 | + -SW */ |
4166 | + 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x06, 0x07, |
4167 | +/* 0x30 ---- ---- SYN -IR -PP -TRN -NBS EOT */ |
4168 | + 0x07, 0x07, 0x16, 0x07, 0x07, 0x07, 0x07, 0x04, |
4169 | +/* 0x38 -SBS -IT -RFF -CU3 DC4 NAK ---- SUB */ |
4170 | + 0x07, 0x07, 0x07, 0x07, 0x14, 0x15, 0x07, 0x1A, |
4171 | +/* 0x40 SP RSP ä ---- */ |
4172 | + 0x20, 0xFF, 0x83, 0x84, 0x85, 0xA0, 0x07, 0x86, |
4173 | +/* 0x48 . < ( + | */ |
4174 | + 0x87, 0xA4, 0x9B, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, |
4175 | +/* 0x50 & ---- */ |
4176 | + 0x26, 0x82, 0x88, 0x89, 0x8A, 0xA1, 0x8C, 0x07, |
4177 | +/* 0x58 ß ! $ * ) ; */ |
4178 | + 0x8D, 0xE1, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xAA, |
4179 | +/* 0x60 - / ---- Ä ---- ---- ---- */ |
4180 | + 0x2D, 0x2F, 0x07, 0x8E, 0x07, 0x07, 0x07, 0x8F, |
4181 | +/* 0x68 ---- , % _ > ? */ |
4182 | + 0x80, 0xA5, 0x07, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, |
4183 | +/* 0x70 --- ---- ---- ---- ---- ---- ---- */ |
4184 | + 0x07, 0x90, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, |
4185 | +/* 0x78 * ` : # @ ' = " */ |
4186 | + 0x70, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, |
4187 | +/* 0x80 * a b c d e f g */ |
4188 | + 0x07, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, |
4189 | +/* 0x88 h i ---- ---- ---- */ |
4190 | + 0x68, 0x69, 0xAE, 0xAF, 0x07, 0x07, 0x07, 0xF1, |
4191 | +/* 0x90 ° j k l m n o p */ |
4192 | + 0xF8, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, |
4193 | +/* 0x98 q r ---- ---- */ |
4194 | + 0x71, 0x72, 0xA6, 0xA7, 0x91, 0x07, 0x92, 0x07, |
4195 | +/* 0xA0 ~ s t u v w x */ |
4196 | + 0xE6, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, |
4197 | +/* 0xA8 y z ---- ---- ---- ---- */ |
4198 | + 0x79, 0x7A, 0xAD, 0xAB, 0x07, 0x07, 0x07, 0x07, |
4199 | +/* 0xB0 ^ ---- § ---- */ |
4200 | + 0x5E, 0x9C, 0x9D, 0xFA, 0x07, 0x07, 0x07, 0xAC, |
4201 | +/* 0xB8 ---- [ ] ---- ---- ---- ---- */ |
4202 | + 0xAB, 0x07, 0x5B, 0x5D, 0x07, 0x07, 0x07, 0x07, |
4203 | +/* 0xC0 { A B C D E F G */ |
4204 | + 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, |
4205 | +/* 0xC8 H I ---- ö ---- */ |
4206 | + 0x48, 0x49, 0x07, 0x93, 0x94, 0x95, 0xA2, 0x07, |
4207 | +/* 0xD0 } J K L M N O P */ |
4208 | + 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, |
4209 | +/* 0xD8 Q R ---- ü */ |
4210 | + 0x51, 0x52, 0x07, 0x96, 0x81, 0x97, 0xA3, 0x98, |
4211 | +/* 0xE0 \ S T U V W X */ |
4212 | + 0x5C, 0xF6, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, |
4213 | +/* 0xE8 Y Z ---- Ö ---- ---- ---- */ |
4214 | + 0x59, 0x5A, 0xFD, 0x07, 0x99, 0x07, 0x07, 0x07, |
4215 | +/* 0xF0 0 1 2 3 4 5 6 7 */ |
4216 | + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
4217 | +/* 0xF8 8 9 ---- ---- Ü ---- ---- ---- */ |
4218 | + 0x38, 0x39, 0x07, 0x07, 0x9A, 0x07, 0x07, 0x07 |
4219 | +}; |
4220 | + |
4221 | +static inline void |
4222 | +vtoc_ebcdic_dec (const char *source, char *target, int l) |
4223 | +{ |
4224 | + int i; |
4225 | + |
4226 | + for (i = 0; i < l; i++) |
4227 | + target[i]=(char)EBCtoASC[(unsigned char)(source[i])]; |
4228 | +} |
4229 | + |
4230 | +/* |
4231 | + * compute the block number from a |
4232 | + * cyl-cyl-head-head structure |
4233 | + */ |
4234 | +static inline uint64_t |
4235 | +cchh2blk (cchh_t *ptr, struct hd_geometry *geo) |
4236 | +{ |
4237 | + uint64_t cyl; |
4238 | + uint16_t head; |
4239 | + |
4240 | + /*decode cylinder and heads for large volumes */ |
4241 | + cyl = ptr->hh & 0xFFF0; |
4242 | + cyl <<= 12; |
4243 | + cyl |= ptr->cc; |
4244 | + head = ptr->hh & 0x000F; |
4245 | + return cyl * geo->heads * geo->sectors + |
4246 | + head * geo->sectors; |
4247 | +} |
4248 | + |
4249 | +/* |
4250 | + * compute the block number from a |
4251 | + * cyl-cyl-head-head-block structure |
4252 | + */ |
4253 | +static inline uint64_t |
4254 | +cchhb2blk (cchhb_t *ptr, struct hd_geometry *geo) |
4255 | +{ |
4256 | + uint64_t cyl; |
4257 | + uint16_t head; |
4258 | + |
4259 | + /*decode cylinder and heads for large volumes */ |
4260 | + cyl = ptr->hh & 0xFFF0; |
4261 | + cyl <<= 12; |
4262 | + cyl |= ptr->cc; |
4263 | + head = ptr->hh & 0x000F; |
4264 | + return cyl * geo->heads * geo->sectors + |
4265 | + head * geo->sectors + |
4266 | + ptr->b; |
4267 | +} |
4268 | + |
4269 | +#endif /* _DASD_H */ |
4270 | |
4271 | === added file 'kpartx/devmapper.c' |
4272 | --- kpartx/devmapper.c 1970-01-01 00:00:00 +0000 |
4273 | +++ kpartx/devmapper.c 2011-01-04 21:28:57 +0000 |
4274 | @@ -0,0 +1,270 @@ |
4275 | +/* |
4276 | + * Copyright (c) 2004, 2005 Christophe Varoqui |
4277 | + */ |
4278 | +#include <stdio.h> |
4279 | +#include <stdlib.h> |
4280 | +#include <string.h> |
4281 | +#include <stdint.h> |
4282 | +#include <libdevmapper.h> |
4283 | +#include <ctype.h> |
4284 | +#include <errno.h> |
4285 | +#include "devmapper.h" |
4286 | + |
4287 | +#define UUID_PREFIX "part%d-" |
4288 | +#define MAX_PREFIX_LEN 8 |
4289 | + |
4290 | +extern int |
4291 | +dm_prereq (char * str, int x, int y, int z) |
4292 | +{ |
4293 | + int r = 1; |
4294 | + struct dm_task *dmt; |
4295 | + struct dm_versions *target; |
4296 | + struct dm_versions *last_target; |
4297 | + |
4298 | + if (!(dmt = dm_task_create(DM_DEVICE_LIST_VERSIONS))) |
4299 | + return 1; |
4300 | + |
4301 | + dm_task_no_open_count(dmt); |
4302 | + |
4303 | + if (!dm_task_run(dmt)) |
4304 | + goto out; |
4305 | + |
4306 | + target = dm_task_get_versions(dmt); |
4307 | + |
4308 | + /* Fetch targets and print 'em */ |
4309 | + do { |
4310 | + last_target = target; |
4311 | + |
4312 | + if (!strncmp(str, target->name, strlen(str)) && |
4313 | + /* dummy prereq on multipath version */ |
4314 | + target->version[0] >= x && |
4315 | + target->version[1] >= y && |
4316 | + target->version[2] >= z |
4317 | + ) |
4318 | + r = 0; |
4319 | + |
4320 | + target = (void *) target + target->next; |
4321 | + } while (last_target != target); |
4322 | + |
4323 | + out: |
4324 | + dm_task_destroy(dmt); |
4325 | + return r; |
4326 | +} |
4327 | + |
4328 | +extern int |
4329 | +dm_simplecmd (int task, const char *name, int no_flush, uint32_t *cookie) { |
4330 | + int r = 0; |
4331 | + int udev_wait_flag = (task == DM_DEVICE_RESUME || |
4332 | + task == DM_DEVICE_REMOVE); |
4333 | + struct dm_task *dmt; |
4334 | + |
4335 | + if (!(dmt = dm_task_create(task))) |
4336 | + return 0; |
4337 | + |
4338 | + if (!dm_task_set_name(dmt, name)) |
4339 | + goto out; |
4340 | + |
4341 | + dm_task_no_open_count(dmt); |
4342 | + dm_task_skip_lockfs(dmt); |
4343 | + |
4344 | + if (no_flush) |
4345 | + dm_task_no_flush(dmt); |
4346 | + |
4347 | + if (udev_wait_flag && !dm_task_set_cookie(dmt, cookie, 0)) |
4348 | + goto out; |
4349 | + r = dm_task_run(dmt); |
4350 | + |
4351 | + out: |
4352 | + dm_task_destroy(dmt); |
4353 | + return r; |
4354 | +} |
4355 | + |
4356 | +extern int |
4357 | +dm_addmap (int task, const char *name, const char *target, |
4358 | + const char *params, uint64_t size, const char *uuid, int part, |
4359 | + mode_t mode, uid_t uid, gid_t gid, uint32_t *cookie) { |
4360 | + int r = 0; |
4361 | + struct dm_task *dmt; |
4362 | + char *prefixed_uuid = NULL; |
4363 | + |
4364 | + if (!(dmt = dm_task_create (task))) |
4365 | + return 0; |
4366 | + |
4367 | + if (!dm_task_set_name (dmt, name)) |
4368 | + goto addout; |
4369 | + |
4370 | + if (!dm_task_add_target (dmt, 0, size, target, params)) |
4371 | + goto addout; |
4372 | + |
4373 | + if (task == DM_DEVICE_CREATE && uuid) { |
4374 | + prefixed_uuid = malloc(MAX_PREFIX_LEN + strlen(uuid) + 1); |
4375 | + if (!prefixed_uuid) { |
4376 | + fprintf(stderr, "cannot create prefixed uuid : %s\n", |
4377 | + strerror(errno)); |
4378 | + goto addout; |
4379 | + } |
4380 | + sprintf(prefixed_uuid, UUID_PREFIX "%s", part, uuid); |
4381 | + if (!dm_task_set_uuid(dmt, prefixed_uuid)) |
4382 | + goto addout; |
4383 | + } |
4384 | + |
4385 | + if (!dm_task_set_mode(dmt, mode)) |
4386 | + goto addout; |
4387 | + if (!dm_task_set_uid(dmt, uid)) |
4388 | + goto addout; |
4389 | + if (!dm_task_set_gid(dmt, gid)) |
4390 | + goto addout; |
4391 | + |
4392 | + dm_task_no_open_count(dmt); |
4393 | + |
4394 | + if (task == DM_DEVICE_CREATE && !dm_task_set_cookie(dmt, cookie, 0)) |
4395 | + goto addout; |
4396 | + r = dm_task_run (dmt); |
4397 | + |
4398 | + addout: |
4399 | + dm_task_destroy (dmt); |
4400 | + |
4401 | + return r; |
4402 | +} |
4403 | + |
4404 | +extern int |
4405 | +dm_map_present (char * str) |
4406 | +{ |
4407 | + int r = 0; |
4408 | + struct dm_task *dmt; |
4409 | + struct dm_info info; |
4410 | + |
4411 | + if (!(dmt = dm_task_create(DM_DEVICE_INFO))) |
4412 | + return 0; |
4413 | + |
4414 | + if (!dm_task_set_name(dmt, str)) |
4415 | + goto out; |
4416 | + |
4417 | + dm_task_no_open_count(dmt); |
4418 | + |
4419 | + if (!dm_task_run(dmt)) |
4420 | + goto out; |
4421 | + |
4422 | + if (!dm_task_get_info(dmt, &info)) |
4423 | + goto out; |
4424 | + |
4425 | + if (info.exists) |
4426 | + r = 1; |
4427 | +out: |
4428 | + dm_task_destroy(dmt); |
4429 | + return r; |
4430 | +} |
4431 | + |
4432 | + |
4433 | +char * |
4434 | +dm_mapname(int major, int minor) |
4435 | +{ |
4436 | + struct dm_task *dmt; |
4437 | + char *mapname = NULL; |
4438 | + const char *map; |
4439 | + |
4440 | + if (!(dmt = dm_task_create(DM_DEVICE_INFO))) |
4441 | + return NULL; |
4442 | + |
4443 | + dm_task_no_open_count(dmt); |
4444 | + dm_task_set_major(dmt, major); |
4445 | + dm_task_set_minor(dmt, minor); |
4446 | + |
4447 | + if (!dm_task_run(dmt)) |
4448 | + goto out; |
4449 | + |
4450 | + map = dm_task_get_name(dmt); |
4451 | + if (map && strlen(map)) |
4452 | + mapname = strdup(map); |
4453 | + |
4454 | +out: |
4455 | + dm_task_destroy(dmt); |
4456 | + return mapname; |
4457 | +} |
4458 | + |
4459 | +/* |
4460 | + * dm_get_first_dep |
4461 | + * |
4462 | + * Return the device number of the first dependend device |
4463 | + * for a given target. |
4464 | + */ |
4465 | +dev_t dm_get_first_dep(char *devname) |
4466 | +{ |
4467 | + struct dm_task *dmt; |
4468 | + struct dm_deps *dm_deps; |
4469 | + dev_t ret = 0; |
4470 | + |
4471 | + if ((dmt = dm_task_create(DM_DEVICE_DEPS)) == NULL) { |
4472 | + return ret; |
4473 | + } |
4474 | + if (!dm_task_set_name(dmt, devname)) { |
4475 | + goto out; |
4476 | + } |
4477 | + if (!dm_task_run(dmt)) { |
4478 | + goto out; |
4479 | + } |
4480 | + if ((dm_deps = dm_task_get_deps(dmt)) == NULL) { |
4481 | + goto out; |
4482 | + } |
4483 | + if (dm_deps->count > 0) { |
4484 | + ret = dm_deps->device[0]; |
4485 | + } |
4486 | +out: |
4487 | + dm_task_destroy(dmt); |
4488 | + |
4489 | + return ret; |
4490 | +} |
4491 | + |
4492 | +char * |
4493 | +dm_mapuuid(int major, int minor) |
4494 | +{ |
4495 | + struct dm_task *dmt; |
4496 | + const char *tmp; |
4497 | + char *uuid = NULL; |
4498 | + |
4499 | + if (!(dmt = dm_task_create(DM_DEVICE_INFO))) |
4500 | + return NULL; |
4501 | + |
4502 | + dm_task_no_open_count(dmt); |
4503 | + dm_task_set_major(dmt, major); |
4504 | + dm_task_set_minor(dmt, minor); |
4505 | + |
4506 | + if (!dm_task_run(dmt)) |
4507 | + goto out; |
4508 | + |
4509 | + tmp = dm_task_get_uuid(dmt); |
4510 | + if (tmp[0] != '\0') |
4511 | + uuid = strdup(tmp); |
4512 | +out: |
4513 | + dm_task_destroy(dmt); |
4514 | + return uuid; |
4515 | +} |
4516 | + |
4517 | +int |
4518 | +dm_devn (char * mapname, int *major, int *minor) |
4519 | +{ |
4520 | + int r = 1; |
4521 | + struct dm_task *dmt; |
4522 | + struct dm_info info; |
4523 | + |
4524 | + if (!(dmt = dm_task_create(DM_DEVICE_INFO))) |
4525 | + return 0; |
4526 | + |
4527 | + if (!dm_task_set_name(dmt, mapname)) |
4528 | + goto out; |
4529 | + |
4530 | + if (!dm_task_run(dmt)) |
4531 | + goto out; |
4532 | + |
4533 | + if (!dm_task_get_info(dmt, &info)) |
4534 | + goto out; |
4535 | + |
4536 | + *major = info.major; |
4537 | + *minor = info.minor; |
4538 | + |
4539 | + r = 0; |
4540 | +out: |
4541 | + dm_task_destroy(dmt); |
4542 | + return r; |
4543 | +} |
4544 | + |
4545 | |
4546 | === added file 'kpartx/devmapper.h' |
4547 | --- kpartx/devmapper.h 1970-01-01 00:00:00 +0000 |
4548 | +++ kpartx/devmapper.h 2011-01-04 21:28:57 +0000 |
4549 | @@ -0,0 +1,13 @@ |
4550 | +#define MAJOR(dev) ((dev & 0xfff00) >> 8) |
4551 | +#define MINOR(dev) ((dev & 0xff) | ((dev >> 12) & 0xfff00)) |
4552 | +#define MKDEV(ma,mi) ((mi & 0xff) | (ma << 8) | ((mi & ~0xff) << 12)) |
4553 | + |
4554 | +int dm_prereq (char *, int, int, int); |
4555 | +int dm_simplecmd (int, const char *, int, uint32_t *); |
4556 | +int dm_addmap (int, const char *, const char *, const char *, uint64_t, |
4557 | + const char *, int, mode_t, uid_t, gid_t, uint32_t *); |
4558 | +int dm_map_present (char *); |
4559 | +char * dm_mapname(int major, int minor); |
4560 | +dev_t dm_get_first_dep(char *devname); |
4561 | +char * dm_mapuuid(int major, int minor); |
4562 | +int dm_devn (char * mapname, int *major, int *minor); |
4563 | |
4564 | === added file 'kpartx/dos.c' |
4565 | --- kpartx/dos.c 1970-01-01 00:00:00 +0000 |
4566 | +++ kpartx/dos.c 2011-01-04 21:28:57 +0000 |
4567 | @@ -0,0 +1,105 @@ |
4568 | +/* |
4569 | + * Source: copy of util-linux' partx dos.c |
4570 | + * |
4571 | + * Copyrights of the original file apply |
4572 | + * Copyright (c) 2005 Bastian Blank |
4573 | + */ |
4574 | +#include "kpartx.h" |
4575 | +#include "byteorder.h" |
4576 | +#include <stdio.h> |
4577 | +#include <string.h> |
4578 | +#include "dos.h" |
4579 | + |
4580 | +static int |
4581 | +is_extended(int type) { |
4582 | + return (type == 5 || type == 0xf || type == 0x85); |
4583 | +} |
4584 | + |
4585 | +static int |
4586 | +read_extended_partition(int fd, struct partition *ep, int en, |
4587 | + struct slice *sp, int ns) |
4588 | +{ |
4589 | + struct partition p; |
4590 | + unsigned long start, here, next; |
4591 | + unsigned char *bp; |
4592 | + int loopct = 0; |
4593 | + int moretodo = 1; |
4594 | + int i, n=0; |
4595 | + |
4596 | + next = start = le32_to_cpu(ep->start_sect); |
4597 | + |
4598 | + while (moretodo) { |
4599 | + here = next; |
4600 | + moretodo = 0; |
4601 | + if (++loopct > 100) |
4602 | + return n; |
4603 | + |
4604 | + bp = (unsigned char *)getblock(fd, here); |
4605 | + if (bp == NULL) |
4606 | + return n; |
4607 | + |
4608 | + if (bp[510] != 0x55 || bp[511] != 0xaa) |
4609 | + return n; |
4610 | + |
4611 | + for (i=0; i<2; i++) { |
4612 | + memcpy(&p, bp + 0x1be + i * sizeof (p), sizeof (p)); |
4613 | + if (is_extended(p.sys_type)) { |
4614 | + if (p.nr_sects && !moretodo) { |
4615 | + next = start + le32_to_cpu(p.start_sect); |
4616 | + moretodo = 1; |
4617 | + } |
4618 | + continue; |
4619 | + } |
4620 | + if (n < ns) { |
4621 | + sp[n].start = here + le32_to_cpu(p.start_sect); |
4622 | + sp[n].size = le32_to_cpu(p.nr_sects); |
4623 | + sp[n].container = en + 1; |
4624 | + n++; |
4625 | + } else { |
4626 | + fprintf(stderr, |
4627 | + "dos_extd_partition: too many slices\n"); |
4628 | + return n; |
4629 | + } |
4630 | + loopct = 0; |
4631 | + } |
4632 | + } |
4633 | + return n; |
4634 | +} |
4635 | + |
4636 | +static int |
4637 | +is_gpt(int type) { |
4638 | + return (type == 0xEE); |
4639 | +} |
4640 | + |
4641 | +int |
4642 | +read_dos_pt(int fd, struct slice all, struct slice *sp, int ns) { |
4643 | + struct partition p; |
4644 | + unsigned long offset = all.start; |
4645 | + int i, n=4; |
4646 | + unsigned char *bp; |
4647 | + |
4648 | + bp = (unsigned char *)getblock(fd, offset); |
4649 | + if (bp == NULL) |
4650 | + return -1; |
4651 | + |
4652 | + if (bp[510] != 0x55 || bp[511] != 0xaa) |
4653 | + return -1; |
4654 | + |
4655 | + for (i=0; i<4; i++) { |
4656 | + memcpy(&p, bp + 0x1be + i * sizeof (p), sizeof (p)); |
4657 | + if (is_gpt(p.sys_type)) |
4658 | + return 0; |
4659 | + if (i < ns) { |
4660 | + sp[i].start = le32_to_cpu(p.start_sect); |
4661 | + sp[i].size = le32_to_cpu(p.nr_sects); |
4662 | + } else { |
4663 | + fprintf(stderr, |
4664 | + "dos_partition: too many slices\n"); |
4665 | + break; |
4666 | + } |
4667 | + if (is_extended(p.sys_type)) { |
4668 | + n += read_extended_partition(fd, &p, i, sp+n, ns-n); |
4669 | + } |
4670 | + } |
4671 | + return n; |
4672 | +} |
4673 | |
4674 | === added file 'kpartx/dos.h' |
4675 | --- kpartx/dos.h 1970-01-01 00:00:00 +0000 |
4676 | +++ kpartx/dos.h 2011-01-04 21:28:57 +0000 |
4677 | @@ -0,0 +1,13 @@ |
4678 | +#ifndef DOS_H_INCLUDED |
4679 | +#define DOS_H_INCLUDED |
4680 | + |
4681 | +struct partition { |
4682 | + unsigned char boot_ind; /* 0x80 - active */ |
4683 | + unsigned char bh, bs, bc; |
4684 | + unsigned char sys_type; |
4685 | + unsigned char eh, es, ec; |
4686 | + unsigned int start_sect; |
4687 | + unsigned int nr_sects; |
4688 | +} __attribute__((packed)); |
4689 | + |
4690 | +#endif /* DOS_H_INCLUDED */ |
4691 | |
4692 | === added file 'kpartx/efi.h' |
4693 | --- kpartx/efi.h 1970-01-01 00:00:00 +0000 |
4694 | +++ kpartx/efi.h 2011-01-04 21:28:57 +0000 |
4695 | @@ -0,0 +1,58 @@ |
4696 | +/* |
4697 | + efi.[ch] - Manipulates EFI variables as exported in /proc/efi/vars |
4698 | + |
4699 | + Copyright (C) 2001 Dell Computer Corporation <Matt_Domsch@dell.com> |
4700 | + |
4701 | + This program is free software; you can redistribute it and/or modify |
4702 | + it under the terms of the GNU General Public License as published by |
4703 | + the Free Software Foundation; either version 2 of the License, or |
4704 | + (at your option) any later version. |
4705 | + |
4706 | + This program is distributed in the hope that it will be useful, |
4707 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
4708 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4709 | + GNU General Public License for more details. |
4710 | + |
4711 | + You should have received a copy of the GNU General Public License |
4712 | + along with this program; if not, write to the Free Software |
4713 | + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
4714 | + */ |
4715 | + |
4716 | +#ifndef EFI_H |
4717 | +#define EFI_H |
4718 | + |
4719 | +/* |
4720 | + * Extensible Firmware Interface |
4721 | + * Based on 'Extensible Firmware Interface Specification' |
4722 | + * version 1.02, 12 December, 2000 |
4723 | + */ |
4724 | +#include <stdint.h> |
4725 | +#include <string.h> |
4726 | + |
4727 | +typedef struct { |
4728 | + uint8_t b[16]; |
4729 | +} efi_guid_t; |
4730 | + |
4731 | +#define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ |
4732 | +((efi_guid_t) \ |
4733 | +{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ |
4734 | + (b) & 0xff, ((b) >> 8) & 0xff, \ |
4735 | + (c) & 0xff, ((c) >> 8) & 0xff, \ |
4736 | + (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) |
4737 | + |
4738 | + |
4739 | +/****************************************************** |
4740 | + * GUIDs |
4741 | + ******************************************************/ |
4742 | +#define NULL_GUID \ |
4743 | +EFI_GUID( 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) |
4744 | + |
4745 | +static inline int |
4746 | +efi_guidcmp(efi_guid_t left, efi_guid_t right) |
4747 | +{ |
4748 | + return memcmp(&left, &right, sizeof (efi_guid_t)); |
4749 | +} |
4750 | + |
4751 | +typedef uint16_t efi_char16_t; /* UNICODE character */ |
4752 | + |
4753 | +#endif /* EFI_H */ |
4754 | |
4755 | === added file 'kpartx/gpt.c' |
4756 | --- kpartx/gpt.c 1970-01-01 00:00:00 +0000 |
4757 | +++ kpartx/gpt.c 2011-01-04 21:28:57 +0000 |
4758 | @@ -0,0 +1,647 @@ |
4759 | +/* |
4760 | + gpt.[ch] |
4761 | + |
4762 | + Copyright (C) 2000-2001 Dell Computer Corporation <Matt_Domsch@dell.com> |
4763 | + |
4764 | + EFI GUID Partition Table handling |
4765 | + Per Intel EFI Specification v1.02 |
4766 | + http://developer.intel.com/technology/efi/efi.htm |
4767 | + |
4768 | + This program is free software; you can redistribute it and/or modify |
4769 | + it under the terms of the GNU General Public License as published by |
4770 | + the Free Software Foundation; either version 2 of the License, or |
4771 | + (at your option) any later version. |
4772 | + |
4773 | + This program is distributed in the hope that it will be useful, |
4774 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
4775 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4776 | + GNU General Public License for more details. |
4777 | + |
4778 | + You should have received a copy of the GNU General Public License |
4779 | + along with this program; if not, write to the Free Software |
4780 | + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
4781 | +*/ |
4782 | + |
4783 | +#define _FILE_OFFSET_BITS 64 |
4784 | + |
4785 | +#include "gpt.h" |
4786 | +#include <stdio.h> |
4787 | +#include <string.h> |
4788 | +#include <stdlib.h> |
4789 | +#include <inttypes.h> |
4790 | +#include <sys/stat.h> |
4791 | +#include <sys/ioctl.h> |
4792 | +#include <fcntl.h> |
4793 | +#include <unistd.h> |
4794 | +#include <errno.h> |
4795 | +#include <endian.h> |
4796 | +#include <byteswap.h> |
4797 | +#include <linux/fs.h> |
4798 | +#include "crc32.h" |
4799 | + |
4800 | +#if BYTE_ORDER == LITTLE_ENDIAN |
4801 | +# define __le16_to_cpu(x) (x) |
4802 | +# define __le32_to_cpu(x) (x) |
4803 | +# define __le64_to_cpu(x) (x) |
4804 | +# define __cpu_to_le32(x) (x) |
4805 | +#elif BYTE_ORDER == BIG_ENDIAN |
4806 | +# define __le16_to_cpu(x) bswap_16(x) |
4807 | +# define __le32_to_cpu(x) bswap_32(x) |
4808 | +# define __le64_to_cpu(x) bswap_64(x) |
4809 | +# define __cpu_to_le32(x) bswap_32(x) |
4810 | +#endif |
4811 | + |
4812 | +#ifndef BLKGETLASTSECT |
4813 | +#define BLKGETLASTSECT _IO(0x12,108) /* get last sector of block device */ |
4814 | +#endif |
4815 | +#ifndef BLKGETSIZE |
4816 | +#define BLKGETSIZE _IO(0x12,96) /* return device size */ |
4817 | +#endif |
4818 | +#ifndef BLKSSZGET |
4819 | +#define BLKSSZGET _IO(0x12,104) /* get block device sector size */ |
4820 | +#endif |
4821 | +#ifndef BLKGETSIZE64 |
4822 | +#define BLKGETSIZE64 _IOR(0x12,114,sizeof(uint64_t)) /* return device size in bytes (u64 *arg) */ |
4823 | +#endif |
4824 | + |
4825 | +struct blkdev_ioctl_param { |
4826 | + unsigned int block; |
4827 | + size_t content_length; |
4828 | + char * block_contents; |
4829 | +}; |
4830 | + |
4831 | +/** |
4832 | + * efi_crc32() - EFI version of crc32 function |
4833 | + * @buf: buffer to calculate crc32 of |
4834 | + * @len - length of buf |
4835 | + * |
4836 | + * Description: Returns EFI-style CRC32 value for @buf |
4837 | + * |
4838 | + * This function uses the little endian Ethernet polynomial |
4839 | + * but seeds the function with ~0, and xor's with ~0 at the end. |
4840 | + * Note, the EFI Specification, v1.02, has a reference to |
4841 | + * Dr. Dobbs Journal, May 1994 (actually it's in May 1992). |
4842 | + */ |
4843 | +static inline uint32_t |
4844 | +efi_crc32(const void *buf, unsigned long len) |
4845 | +{ |
4846 | + return (crc32(~0L, buf, len) ^ ~0L); |
4847 | +} |
4848 | + |
4849 | +/** |
4850 | + * is_pmbr_valid(): test Protective MBR for validity |
4851 | + * @mbr: pointer to a legacy mbr structure |
4852 | + * |
4853 | + * Description: Returns 1 if PMBR is valid, 0 otherwise. |
4854 | + * Validity depends on two things: |
4855 | + * 1) MSDOS signature is in the last two bytes of the MBR |
4856 | + * 2) One partition of type 0xEE is found |
4857 | + */ |
4858 | +static int |
4859 | +is_pmbr_valid(legacy_mbr *mbr) |
4860 | +{ |
4861 | + int i, found = 0, signature = 0; |
4862 | + if (!mbr) |
4863 | + return 0; |
4864 | + signature = (__le16_to_cpu(mbr->signature) == MSDOS_MBR_SIGNATURE); |
4865 | + for (i = 0; signature && i < 4; i++) { |
4866 | + if (mbr->partition[i].sys_type == |
4867 | + EFI_PMBR_OSTYPE_EFI_GPT) { |
4868 | + found = 1; |
4869 | + break; |
4870 | + } |
4871 | + } |
4872 | + return (signature && found); |
4873 | +} |
4874 | + |
4875 | + |
4876 | +/************************************************************ |
4877 | + * get_sector_size |
4878 | + * Requires: |
4879 | + * - filedes is an open file descriptor, suitable for reading |
4880 | + * Modifies: nothing |
4881 | + * Returns: |
4882 | + * sector size, or 512. |
4883 | + ************************************************************/ |
4884 | +static int |
4885 | +get_sector_size(int filedes) |
4886 | +{ |
4887 | + int rc, sector_size = 512; |
4888 | + |
4889 | + rc = ioctl(filedes, BLKSSZGET, §or_size); |
4890 | + if (rc) |
4891 | + sector_size = 512; |
4892 | + return sector_size; |
4893 | +} |
4894 | + |
4895 | +/************************************************************ |
4896 | + * _get_num_sectors |
4897 | + * Requires: |
4898 | + * - filedes is an open file descriptor, suitable for reading |
4899 | + * Modifies: nothing |
4900 | + * Returns: |
4901 | + * Last LBA value on success |
4902 | + * 0 on error |
4903 | + * |
4904 | + * Try getting BLKGETSIZE64 and BLKSSZGET first, |
4905 | + * then BLKGETSIZE if necessary. |
4906 | + * Kernels 2.4.15-2.4.18 and 2.5.0-2.5.3 have a broken BLKGETSIZE64 |
4907 | + * which returns the number of 512-byte sectors, not the size of |
4908 | + * the disk in bytes. Fixed in kernels 2.4.18-pre8 and 2.5.4-pre3. |
4909 | + ************************************************************/ |
4910 | +static uint64_t |
4911 | +_get_num_sectors(int filedes) |
4912 | +{ |
4913 | + int rc; |
4914 | + uint64_t bytes=0; |
4915 | + |
4916 | + rc = ioctl(filedes, BLKGETSIZE64, &bytes); |
4917 | + if (!rc) |
4918 | + return bytes / get_sector_size(filedes); |
4919 | + |
4920 | + return 0; |
4921 | +} |
4922 | + |
4923 | +/************************************************************ |
4924 | + * last_lba(): return number of last logical block of device |
4925 | + * |
4926 | + * @fd |
4927 | + * |
4928 | + * Description: returns Last LBA value on success, 0 on error. |
4929 | + * Notes: The value st_blocks gives the size of the file |
4930 | + * in 512-byte blocks, which is OK if |
4931 | + * EFI_BLOCK_SIZE_SHIFT == 9. |
4932 | + ************************************************************/ |
4933 | + |
4934 | +static uint64_t |
4935 | +last_lba(int filedes) |
4936 | +{ |
4937 | + int rc; |
4938 | + uint64_t sectors = 0; |
4939 | + struct stat s; |
4940 | + memset(&s, 0, sizeof (s)); |
4941 | + rc = fstat(filedes, &s); |
4942 | + if (rc == -1) { |
4943 | + fprintf(stderr, "last_lba() could not stat: %s\n", |
4944 | + strerror(errno)); |
4945 | + return 0; |
4946 | + } |
4947 | + |
4948 | + if (S_ISBLK(s.st_mode)) { |
4949 | + sectors = _get_num_sectors(filedes); |
4950 | + } else { |
4951 | + fprintf(stderr, |
4952 | + "last_lba(): I don't know how to handle files with mode %x\n", |
4953 | + s.st_mode); |
4954 | + sectors = 1; |
4955 | + } |
4956 | + |
4957 | + return sectors ? sectors - 1 : 0; |
4958 | +} |
4959 | + |
4960 | + |
4961 | +static ssize_t |
4962 | +read_lastoddsector(int fd, uint64_t lba, void *buffer, size_t count) |
4963 | +{ |
4964 | + int rc; |
4965 | + struct blkdev_ioctl_param ioctl_param; |
4966 | + |
4967 | + if (!buffer) return 0; |
4968 | + |
4969 | + ioctl_param.block = 0; /* read the last sector */ |
4970 | + ioctl_param.content_length = count; |
4971 | + ioctl_param.block_contents = buffer; |
4972 | + |
4973 | + rc = ioctl(fd, BLKGETLASTSECT, &ioctl_param); |
4974 | + if (rc == -1) perror("read failed"); |
4975 | + |
4976 | + return !rc; |
4977 | +} |
4978 | + |
4979 | +static ssize_t |
4980 | +read_lba(int fd, uint64_t lba, void *buffer, size_t bytes) |
4981 | +{ |
4982 | + int sector_size = get_sector_size(fd); |
4983 | + off_t offset = lba * sector_size; |
4984 | + uint64_t lastlba; |
4985 | + ssize_t bytesread; |
4986 | + |
4987 | + lseek(fd, offset, SEEK_SET); |
4988 | + bytesread = read(fd, buffer, bytes); |
4989 | + |
4990 | + lastlba = last_lba(fd); |
4991 | + if (!lastlba) |
4992 | + return bytesread; |
4993 | + |
4994 | + /* Kludge. This is necessary to read/write the last |
4995 | + block of an odd-sized disk, until Linux 2.5.x kernel fixes. |
4996 | + This is only used by gpt.c, and only to read |
4997 | + one sector, so we don't have to be fancy. |
4998 | + */ |
4999 | + if (!bytesread && !(lastlba & 1) && lba == lastlba) { |
5000 | + bytesread = read_lastoddsector(fd, lba, buffer, bytes); |
This entire branch really needs to be constructed based on lp:debian/experimental/multipath-tools, I think - otherwise the bzr toolset doesn't work in a particularly friendly fashion. For example, it will be unnecessarily difficult to merge changes in future. Can you please replay your changes on top of that? (In fact, it would be best if you started with the existing lp:ubuntu/multipath-tools and then used 'bzr merge-package lp:debian/experimental/multipath-tools'.)
Regarding the actual changes:
* Maintainer is out of date - the current standard is "Ubuntu Developers <email address hidden>" (nitpick).
* Please describe the remaining Ubuntu changes in debian/changelog, and preserve all the old Ubuntu debian/changelog entries since you're performing a merge here and that history is valuable; I shouldn't have to dig out the changelog from 0.4.8-14ubuntu1 (no longer in your package) to find out why various deltas from Debian exist. See the existing package in natty for an example.