• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

build-aux/H03-Nov-2021-24,40820,172

contrib/H03-Nov-2021-2616

doc/H03-May-2022-4,6313,752

lang/H03-Nov-2021-1,9331,439

m4/H03-Nov-2021-13,36912,141

po/H03-May-2022-45,40734,892

src/H03-Nov-2021-37,20328,357

tests/H03-Nov-2021-4,4383,420

ABOUT-NLSH A D12-Nov-201691.6 KiB1,2831,244

AUTHORSH A D18-Feb-20202.3 KiB7253

COPYINGH A D15-Mar-201317.6 KiB341281

COPYING.LIBH A D15-Mar-201325.9 KiB

ChangeLogH A D03-Nov-2021197.8 KiB5,5534,367

ChangeLog-2011H A D15-Mar-201337.4 KiB1,212826

INSTALLH A D15-Mar-20139.3 KiB237179

Makefile.amH A D21-Dec-20205.3 KiB165110

Makefile.inH A D03-Nov-202133.4 KiB1,036893

NEWSH A D03-Nov-202136.9 KiB1,156853

READMEH A D12-Jul-20185.9 KiB169117

THANKSH A D02-Dec-2016629 1711

VERSIONH A D03-Nov-20215 21

aclocal.m4H A D03-Nov-202150.2 KiB1,3611,242

autogen.rcH A D12-Jul-2018392 2520

autogen.shH A D12-Jul-201814 KiB514403

config.h.inH A D03-Nov-202110.2 KiB385268

configureH A D03-Nov-2021620.4 KiB21,27917,959

configure.acH A D03-Nov-202124.7 KiB763684

libgpg-error.specH A D03-Nov-20211.3 KiB5845

libgpg-error.spec.inH A D15-Mar-20131.4 KiB5847

mkinstalldirsH A D15-Mar-20133.5 KiB163112

potomoH A D15-Mar-20132.1 KiB6537

README

1What is Libgpg-error
2====================
3
4Libgpg-error is a library that defines common error values for all
5GnuPG components.  Among these are GPG, GPGSM, GPGME, GPG-Agent,
6libgcrypt, Libksba, DirMngr, Pinentry, SmartCard Daemon and more.
7Meanwhile Libgcrypt also sports functions commonly used by all GnuPG
8components and which are believed to be generally useful.  The main
9components are
10
11 - Structured error codes and utility functions.
12
13 - Replacement functions for stdio stream (estream) to provide a
14   reliable set of printf features on all platforms.  For convenience
15   macros are provided to make migration from stdio to estream easier
16   (ie. the prefix "es_")
17
18 - Generic Mutex implementation for all platforms using an ABI
19   independent of the underlying implementation.
20
21 - A lean gettext and iconv implementation for Windows.
22
23 - Log functions
24
25 - Option parser
26
27 - Base-64 encoder and decoder.
28
29More components will be added over time.  Most functions are prefixed
30with "gpgrt" (GnuPG Run Time) instead of "gpg_err" to indicate the
31long term plan to rename this library to gpgrt.
32
33Libgpg-error is free software; you can redistribute it and/or modify
34it under the terms of the GNU Lesser General Public License as
35published by the Free Software Foundation; either version 2.1 of the
36License, or (at your option) any later version.  See the file
37COPYING.LIB for copyright and warranty information.  See the file
38AUTHORS for a list of authors and important mail addresses.
39
40However, some files (for example src/mkerrnos.awk) used in the build
41process of the library and the manual are covered by a different
42license.  Please see the header of these files and the file COPYING
43for copyright and warranty information on these files.  A special
44exception in the copyright license of these files makes sure that the
45output in the build process, which is used in libgpg-error, is not
46affected by the GPL.
47
48
49Installation
50============
51
52Please read the file INSTALL!
53
54Here is a quick summary:
55
561) Check that you have unmodified sources.  You can find instructions
57   how to verify the sources below.  Don't skip this - it is an
58   important step!
59
602) Unpack the archive.  With GNU tar you can do it this way:
61   "tar xjvf libgpg-error-x.y.tar.bz2"
62
633) "cd libgpg-error-x.y"
64
654) "./configure"
66
675) "make"
68
696) "make install"
70
71
72How to Verify the Source
73========================
74
75In order to check that the version of libgpg-error which you are going
76to install is an original and unmodified copy of the original, you can
77do it in one of the following ways:
78
79a) If you already have a trusted version of GnuPG installed, you can
80   simply check the supplied signature:
81
82   $ gpg --verify libgpg-error-x.y.tar.bz2.sig libgpg-error-x.y.tar.bz2
83
84   This checks that the detached signature libgpg-error-x.y.tar.bz2.sig
85   is indeed a signature of libgpg-error-x.y.tar.bz2.  Make sure that
86   the signature has been created by a trusted keys.
87
88   Please note that you have to use an old version of GnuPG to do all
89   this stuff.  *Never* use the version which was built using the
90   library you are trying to verify!
91
92b) If you don't have any a trusted version of GnuPG, you can attempt
93   to verify the SHA1 checksum, using a trusted version of the sha1sum
94   program:
95
96   $ sha1sum libgpg-error-x.y.tar.bz2
97
98   This should yield an output _similar_ to this:
99
100   610064e5b77700f5771c8fde2691c4365e1ca100  libgpg-error-x.y.tar.bz2
101
102   Now check that this checksum is _exactly_ the same as the one
103   published via the announcement list and probably via Usenet.
104
105
106Hints
107=====
108
109To build for Windows you you may use the convenience command:
110
111   ./autogen.sh --build-w32
112
113which runs configure with suitable options.  There is also basic
114support for building a 64 bit Windows version:
115
116   ./autogen.sh --build-w64
117
118
119Cross-Compiling
120===============
121
122Libgpg-error needs to figure out some platform specific properties.
123These are used to build the platform specific gpg-error.h file.  The
124detection is done during build time but can't be done when
125cross-compiling.  Thus if you run into an error during building you
126need to figure out these values.  You may use these commands:
127
128  build="$(build-aux/config.guess)"
129  ./configure --prefix=TARGETDIR --host=TARGET --build=$build
130  cd src
131  make gen-posix-lock-obj
132  scp gen-posix-lock-obj TARGET:
133  ssh TARGET ./gen-posix-lock-obj >tmp.h
134  mv tmp.h "syscfg/$(awk 'NR==1 {print $2}' tmp.h)"
135
136If you are using a VPATH build adjust accordingly.  If this all works
137for you (make sure to run the test programs on the target platform),
138please send the generated file to the gnupg-devel mailing list so that
139we can include it in the next release.  Note that in addition to the
140aliasing done by config.sub the src/mkheader build tool does some
141extra aliasing to avoid having too much identical syscfg files.
142
143
144
145Known Problems
146==============
147
148On Windows, WSA Error Codes can be provided as system error codes and
149will be transparently converted to the corresponding gpg error codes.
150There are two problems with this support:
151
152* Not all error codes corresponding to WSA Error codes have a detailed
153  description when printed with gpg_strerror.  Some will default to
154  "Unknown error" for pretty printing.  For example, WSAEHOSTDOWN will
155  be translated to GPG_ERR_EHOSTDOWN, but there is no corresponding
156  EHOSTDOWN in Windows and thus gpg_strerror will default to "Unknown
157  error" as printed by the system's strerror function for the argument
158  WSAEHOSTDOWN.  (This could be fixed by adding our own error strings
159  replacing or extending the system error strings, including their
160  translations).
161
162* The translation to a gpg error code and back to a system error code
163  in some cases does not preserve information.  For example, the error
164  code WSAEACCES translates to GPG_ERR_EACCES, which translates back
165  to EACCES.
166
167Any WSA Error code has either the first problem or the second (but not
168both), depending on if there is a corresponding Windows error code.
169