-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
148 lines (101 loc) · 5 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
Installation using packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: generating packages traditionally requires root privileges (to be able to set
proper ownership and permissions on package members). You can overcome that using
the magnificent "fakeroot" utility. BUT you can use it only for package creation,
NOT package installation. To install you packages, you have to be real root.
*** DEBIAN PACKAGES ***
1) Files you need:
cntlm_0.XX-Y.diff.gz
cntlm_0.XX-Y.dsc
cntlm_0.XX.orig.tar.gz
Those can be acquired from the FTP and soon, from Debian pool directly.
2) Compilation steps:
$ dpkg-source -x cntlm_0.XX-Y.dsc
$ cd cntlm-0.XX/
$ dpkg-buildpackage -b -rfakeroot
# dpkg -i ../cntlm_0.XX-Y_arch.deb
Upon installation, the package takes care of creating a dedicated user for
cntlm, init script integration, manages eventual configuration file updates
with new upstream versions, things like restart of the daemon after future
updates, etc. You can later revert all these changes with one command, should
you decide to remove cntlm from your system. Basic "apt-get remove" keeps your
configuration file intact, so you can easily reinstall cntlm when you've grown
older and wiser. :) Alternatively, you can get rid of everything using "apt-get
--purge remove".
*** RPM FROM SCRATCH ***
1) For the impatient:
$ make rpm # you'll need root privs. or fakeroot utility
# rpm -i cntlm-X.XX-{arch}.rpm
2) Detailed howto (or if make rpm doesn't work for you)
As root:
# redhat/build binary
of as an unprivileged user:
$ fakeroot redhat/build binary
Either way, packages will then be in your current directory.
--- OR ---
To build an RPM package from scratch, as root change to
/usr/src/[redhat|rpm|whatever]/SOURCES
Copy there all files from cntlm's redhat/ directory plus appropriate version of
the source tar.gz and type:
# rpmbuild -ba cntlm.spec
Shortly after, you'll have source and binary RPMs ready in your ../SRPMS, resp.
../RPMS directories.
If your build cannot find the default config file in /etc, you probably have
broken RPM build environment. You should add this to your ~/.rpmmacros:
%_sysconfdir /etc
*** RPM FROM *.SRC.RPM ***
If you just want to create a binary package from src.rpm, as root type:
# rpmbuild --rebuild pkgname.src.rpm
Resulting binary RPM will be at /usr/src/..../RPMS
If your build cannot find the default config file in /etc, you probably have
broken RPM build environment. You should add this to your ~/.rpmmacros:
%_sysconfdir /etc
Traditional installation
~~~~~~~~~~~~~~~~~~~~~~~~
First, you have to compile cntlm. Using the Makefile, this should be very easy:
$ ./configure
$ make
Cntlm does not require any dynamic libraries and there are no dependencies you
have to satisfy before compilation, except for libpthreads. This library is
required for all threaded applications and is very likely to be part of your
system already, because it comes with libc. Next, install cntlm onto your
system like so:
$ make install
Default installation directories are /usr/local/bin, /usr/local/share/man and
/usr/local/etc. Should you want to install cntlm into a different location,
change the BINDIR, MANDIR and SYSCONFDIR in the Makefile or on the command line
(see below). Installation uses the "install" helper, which has many differences
across various platforms. Currently, we use GNU flavour by default and
autodetect AIX. You might need to change some parameters on other POSIX
systems.
$ make install BINDIR=/usr/bin MANDIR=/usr/share/man
Cntlm is compiled with system-wide configuration file by default. That means
whenever you run cntlm, it looks into a hardcoded path (see SYSCONFDIR in the
Makefile) and tries to load cntml.conf. You cannot make it not to do so, unless
you use -c with an alternative file or /dev/null. This is standard behaviour
and probably what you want. On the other hand, some of you might not want to
use cntlm as a daemon started by init scripts and you would prefer setting up
everything on the command line. This is possible, just comment out SYSCONFDIR
variable definition in the Makefile before you compile cntlm and it will remove
this feature.
Installation includes the main binary, the man page (see "man cntlm") and if
the default config feature was not removed, it also installs a configuration
template. Please note that unlike bin and man targets, existing configuration
is never overwritten during installation. In the doc/ directory you can find
among other things a file called "cntlmd". It can be used as an init.d script.
Architectures
~~~~~~~~~~~~~
The build system now has an independent autodetection of the build arch
endianness. The result is printed during the compilation and is also part of
cntlm's startup banner.
Compilers
~~~~~~~~~
Cntlm was tested and successfully compiles with GCC and IBM XL C/C++. Other
compilers might work for you (then again, they might not). To compile with
XLC, use:
$ make -f Makefile.xlc ...
or rename Makefile.xlc to Makefile. The rest is the same.
Contact
~~~~~~~
David Kubicek <[email protected]>, <[email protected]>