Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 ##
2 ## uuid -- OpenPKG UUID Update Utility
3 ## Copyright (c) 2000-2012 OpenPKG GmbH <http://openpkg.com/>
4 ##
5 ## This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
6 ## All rights reserved. Licenses which grant limited permission to use,
7 ## copy, modify and distribute this software are available from the
8 ## OpenPKG GmbH.
9 ##
10 ## THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
24 =pod
26 =head1 NAME
28 B<openpkg uuid> - OpenPKG UUID Update Utility
30 =head1 SYNOPSIS
32 B<openpkg uuid> [B<--verbose>] [B<--multicast>] B<reset>|B<update>|B<info>
34 =head1 DESCRIPTION
36 The B<openpkg uuid> command is the maintenance utility for the DCE 1.1
37 and ISO/IEC 11578:1996 compliant I<Universally Unique Identifiers>
38 (UUID) of an B<OpenPKG> instance. It is internally based on B<OSSP
39 uuid>.
41 UUIDs are 128 bit numbers which are intended to have a high likelihood
42 of uniqueness over space and time and are computationally difficult
43 to guess. They are globally unique identifiers which can be locally
44 generated without contacting a global registration authority. UUIDs are
45 intended as unique identifiers for both mass tagging objects with an
46 extremely short lifetime and to reliably identifying very persistent
47 objects across a network. The three classical UUID variants are DCE 1.1
48 UUIDs of version 1 (time and node based), version 3 (name based) and
49 version 4 (random number based).
51 For an B<OpenPKG> instance, three different UUIDs are used:
53 =over 3
55 =item 1. B<OpenPKG Registry> (C<UUID_REGISTRY>)
57 This is a version 1 UUID which uniquely identifiers the B<OpenPKG>
58 instance for global registration purposes. It is generated just once in
59 the lifetime of the B<OpenPKG> instance. The value of this UUID cannot
60 be recalculated deterministically.
62 =item 2. B<OpenPKG Instance> (C<UUID_INSTANCE>)
64 This is a version 3 UUID which summarizes the B<OpenPKG>
65 instance parameters. Currently the values of the following
66 particular OpenPKG RPM macros are uses as input:
68 %{l_openpkg_release} %{l_prefix}
69 %{l_susr} %{l_suid} %{l_sgrp} %{l_sgid}
70 %{l_musr} %{l_muid} %{l_mgrp} %{l_mgid}
71 %{l_rusr} %{l_ruid} %{l_rgrp} %{l_rgid}
72 %{l_nusr} %{l_nuid} %{l_ngrp} %{l_ngid}
74 The value of this UUID can be recalculated deterministically and will
75 not chance as long as none of the values of the above macro do not
76 change. This UUID can be used for detecting OpenPKG release upgrades,
77 accidentally changed UIDs or GIDs, etc. Notice that version 3 UUIDs are
78 message digests (actually MD5 based) and so are one-way functions which do
79 not allow one to recalculate the input values from the UUID.
81 =item 3. B<OpenPKG Platform> (C<UUID_PLATFORM>)
83 This is a version 3 UUID which summarizes the B<OpenPKG> platform
84 parameters. Currently the OpenPKG RPM platform id plus the FQDN and IP
85 address of the underlying host are used as input. This UUID can be used
86 for detecting operating system and host changes. Notice that version
87 3 UUIDs are message digests (actually MD5 based) and so are one-way
88 functions which do not allow one to recalculate the input values from
89 the UUID.
91 =back
93 =head1 OPTIONS
95 =over 4
97 =item B<--verbose>
99 Print verbose messages during operation.
101 =item B<--multicast>
103 Generate a random multicast MAC address instead of using the real IEEE
104 802 MAC address of the underlying host when generating the version 1
105 UUID C<UUID_REGISTRY>.
107 =back
109 =head1 COMMANDS
111 =over 4
113 =item B<reset>
115 This resets the three UUIDs C<UUID_REGISTRY>, C<UUID_INSTANCE> and
116 C<UUID_PLATFORM> to the "Nil UUID". They are then automatically
117 regenerated within one day if already done explicitly afterward with
118 "C<openpkg uuid update>".
120 =item B<update>
122 This updates the three UUIDs C<UUID_REGISTRY>, C<UUID_INSTANCE> and
123 C<UUID_PLATFORM> to the "Nil UUID". C<UUID_REGISTRY> is kept unless it
124 is the "Nil UUID" (see "C<openpkg uuid reset>" command above). The UUIDs
125 C<UUID_INSTANCE> and C<UUID_PLATFORM> are updated only if their input
126 values (and this way the resulting UUIDs) have changed. This operation
127 is performed daily automatically.
129 =item B<info>
131 This print summary page of identification information, including all
132 UUIDs and all of their calculation inputs.
134 =back
136 =head1 FILES
138 The three UUIDs of the B<OpenPKG> instance are stored in the file
139 C<@l_prefix@/etc/openpkg/uuid> in Bourne-Shell syntax. An example
140 content is:
142 UUID_REGISTRY="81eca44e-4d18-11d8-a837-0090272ff725"
143 UUID_INSTANCE="c55a8d2d-31bb-3ae0-9edb-68337af61acc"
144 UUID_PLATFORM="05ec2532-9e3f-37dc-a7ed-b291c2c463ed"
146 =head1 CAVEATS
148 By default and in full compliance with DCE 1.1 and ISO/IEC 11578:1996,
149 the OpenPKG Registry UUID (C<UUID_REGISTRY>) contains the IEEE 802 MAC
150 address of the underlying host. If this is not acceptable by local
151 security policies you can easily at any time generate a new OpenPKG
152 Registry UUID with a random multicast MAC address instead by running:
154 $ openpkg uuid reset
155 $ openpkg uuid --multicast update
157 =head1 SEE ALSO
159 B<OSSP uuid> E<lt>http://www.ossp.org/pkg/lib/uuid/E<gt>.
161 =head1 HISTORY
163 The B<openpkg uuid> command first appeared in B<OpenPKG 2.0>.
165 =cut