blob: 285e14731d6032095bbb3f23f3148d6a2e5b59dd [file] [log] [blame]
Jacob Appelbaumf8fd2f82013-04-11 00:09:29 -07001tlsdate should build and work on the following Operating Systems:
2
Jacob Appelbaum4bc568b2013-04-16 19:19:37 -07003 Debian Gnu/Linux squeeze, wheezy, sid
4 Ubuntu lucid, natty, oneiric, precise, quantal
Jacob Appelbaumb66696e2013-04-12 11:19:24 -07005 CentOS 6.2, 6.3, 6.4
Jacob Appelbaumf8fd2f82013-04-11 00:09:29 -07006 Fedora 17, 18
7 RedHat Enterprise Server 6.4
8 OpenSUSE 11.2, 12.3
9 FreeBSD 10-CURRENT
10 Mac OS X 10.8.2, 10.8.3
Jacob Appelbaum90dba9e2013-04-17 10:30:24 -070011 ChromeOS Release 25, 26, 27 and above
Jacob Appelbaum1df358f2013-04-12 11:16:29 -070012 Android with the Android NDK (use Makefile.android)
Jacob Appelbaumc4080b52013-04-12 12:19:36 -070013 Arch Linux (Don't forget to symlink to /dev/rtc to /dev/rtc0)
Jacob Appelbaum4b25b762013-04-12 17:51:03 -070014 NetBSD 6.0.1
Jacob Appelbaum9ad9b982013-04-14 01:43:56 -070015 OpenBSD 5.2
Jacob Appelbaumc6ca4c92013-04-17 02:44:10 -070016 Gentoo 20130413
Jacob Appelbaum72940d72013-04-18 20:46:34 -070017 DragonFly BSD 3.3-DEVELOPMENT
Jacob Appelbaume274c9b2013-04-26 13:38:02 -070018 Debian GNU/kFreeBSD 7.0 (8.2-1-amd64)
Jacob Appelbaum4c596eb2013-04-24 11:06:45 -070019
Jacob Appelbaumb2028d72013-04-24 23:19:16 -070020tlsdate should build and might even work on the following Operating Systems:
Jacob Appelbaum4c596eb2013-04-24 11:06:45 -070021
Jacob Appelbaum2f7224a2013-04-24 19:57:17 -070022 Win32 with Cygwin CYGWIN_NT-6.1 1.7.18(0.263/5/3
23 Win32 with MinGW
Jacob Appelbaum4c596eb2013-04-24 11:06:45 -070024 Haiku r1alpha4
Jacob Appelbaumf8fd2f82013-04-11 00:09:29 -070025
26Please file a bug or email the tlsdate team if you have successfully built or
27use tlsdate on a platform that is not listed. We are specifically looking for
28ports of tlsdate or for tlsdate integration on the following Operating Systems:
29
Jacob Appelbaum2f7224a2013-04-24 19:57:17 -070030 Windows native
Jacob Appelbaumf8fd2f82013-04-11 00:09:29 -070031 OpenWRT
32 pfsense
Jacob Appelbaumb6e6f1a2013-04-13 22:05:47 -070033 OpenVMS
Jacob Appelbaum6512bff2013-04-18 23:06:04 -070034 Irix
Jacob Appelbaum9478d572013-04-23 22:14:00 -070035 Minix
Jacob Appelbaum2f7224a2013-04-24 19:57:17 -070036 Any of the other classic unix systems
Jacob Appelbaumb6e6f1a2013-04-13 22:05:47 -070037
38Currently porting is in progress or partially documented for:
39
Jacob Appelbaumb6e6f1a2013-04-13 22:05:47 -070040 Plan9 (with APE)
Jacob Appelbaumd0f69d72013-04-26 13:58:45 -070041 Debian GNU/Hurd 7.0 (GNU-Mach 1.3.99-486-dbg/Hurd-0.3)
42 Currently we report "server time 0 (difference is about 1367009757 s)"
Jacob Appelbaum4bc568b2013-04-16 19:19:37 -070043Building and install of tlsdate on GNU/Linux and FreeBSD:
Jacob Appelbaum5de8b0a2012-02-02 01:43:22 +010044
45 ./autogen.sh
46 ./configure
47 make
48 make install
49
Jacob Appelbaumf8fd2f82013-04-11 00:09:29 -070050Cleaning is the usual:
51
52 make clean
53
Jacob Appelbaumc6ca4c92013-04-17 02:44:10 -070054On Debian Gnu/Linux sid/unstable:
Jacob Appelbaum4bc568b2013-04-16 19:19:37 -070055
56 apt-get install tlsdate
57
Jacob Appelbaum6d57ace2013-04-19 17:55:00 -070058On Debian GNU/Linux and related systems, we provide an init.d script that
59controls the tlsdated daemon. It will notice network changes and regularly
60invoke tlsdate to keep the clock in sync. Start it like so:
61
62 /etc/init.d/tlsdate start
63
Jacob Appelbaume274c9b2013-04-26 13:38:02 -070064Debian GNU/Hurd does not yet support autotools bootstrapping and users must
65bootstrap with `make dist` on another platform from the tlsdate git
66repository. With such a release tar.gz it is the expected process:
67
68 ./configure
69 make
70 make install
71
72Please note that setting time on GNU/Hurd has not yet been tested.
73
Jacob Appelbaum90dba9e2013-04-17 10:30:24 -070074On ChromeOS:
75
76 tlsdate is part of the ChromeOS TCB; no install needed
77
Jacob Appelbaumc6ca4c92013-04-17 02:44:10 -070078On Gentoo:
79
80 emerge net-misc/tlsdate
81
Jacob Appelbaumf667c4c2013-04-12 14:18:12 -070082On FreeBSD one may also use the ports system:
83
84 cd /usr/ports/sysutils/tlsdate
85 make
86 make install
87
Fabian Keilf543f762013-03-15 15:50:43 +010088On Mac OS X, we require that you have XCode installed. You may also need brew
Jacob Appelbaum8f5dbfd2013-02-13 23:13:44 -080089for autoconf and automake packages:
90
91 brew install autoconf automake libtool pkg-config
92
Jacob Appelbaumf8fd2f82013-04-11 00:09:29 -070093It should also be possible to install tlsdate on OS X 10.8.x with brew directly:
Jacob Appelbaum5de8b0a2012-02-02 01:43:22 +010094
Jacob Appelbaumf8fd2f82013-04-11 00:09:29 -070095 brew install tlsdate
Jacob Appelbaum807b4d02012-07-09 22:24:16 +020096
Jacob Appelbaum6a00b292012-07-11 18:45:13 +020097To make an unsigned Debian package:
Jacob Appelbaum807b4d02012-07-09 22:24:16 +020098
99 git checkout debian-master
100 make deb
Jacob Appelbaum6a00b292012-07-11 18:45:13 +0200101
Jacob Appelbaum37afccc2013-04-12 21:02:20 -0700102On Fedora:
103
104 yum install tlsdate
105
106To run tlsdated as a service on Fedora:
107
108 systemctl enable tlsdate.service
109 systemctl start tlsdate.service
110
Jacob Appelbaum9d50cef2013-04-12 19:00:25 -0700111On Arch Linux there is a PKGBUILD in the Arch User Repository:
112
113 https://aur.archlinux.org/packages/tlsdate
114 https://aur.archlinux.org/packages/tl/tlsdate/PKGBUILD
115
Jacob Appelbaum455a90c2013-04-23 20:35:15 -0700116Cygwin requires that the user installs openssl-dev, gcc, pkg-config, libtool, automake, autoconf:
117
118 ./configure
119 make
120
Jacob Appelbaumb6e6f1a2013-04-13 22:05:47 -0700121On Plan9 the start of building might look something like this:
122
123 ip/ipconfig
124 ndb/dns -r
125 9fs sources
126 /n/sources/contrib/fgb/root/rc/bin/contrib/install fgb/openssl
Noah Evans22ede402013-04-15 23:10:00 +0200127 mk install
Jacob Appelbaumb6e6f1a2013-04-13 22:05:47 -0700128
Jacob Appelbaumf0f17b92013-04-24 04:08:57 -0700129On Haiku we must use gcc4:
130
131 export CC=/boot/develop/abi/x86/gcc4/tools/gcc4.6.3-haiku-121101/bin/gcc
132 export LDFLAGS="$LDFLAGS -lbsd"
Jacob Appelbaum4c596eb2013-04-24 11:06:45 -0700133 ./configure # This includes the above exports currently
Jacob Appelbaumf0f17b92013-04-24 04:08:57 -0700134 make
135
Jacob Appelbaum9ad9b982013-04-14 01:43:56 -0700136OpenBSD builds from source and is not yet in the port system:
Jacob Appelbaumb6e6f1a2013-04-13 22:05:47 -0700137
Bryan5dba9882013-04-14 01:55:50 -0700138 export AUTOCONF_VERSION=<your installed version>
139 export AUTOMAKE_VERSION=<your installed version>
140 ./autogen.sh
Jacob Appelbaumb6e6f1a2013-04-13 22:05:47 -0700141 ./configure
142 make
143 make install
144
Jacob Appelbaum6a00b292012-07-11 18:45:13 +0200145To make a Debian source package:
146
147 git checkout master
148 ./autogen.sh
149 ./configure && make debian_orig
150 git checkout debian-master
151 fakeroot debian/rules clean
Jacob Appelbaum23ee98a2012-07-12 15:13:35 +0200152 cd ../
Jacob Appelbaum3e92a2e2012-10-30 15:57:32 +0100153 dpkg-source -i'.*' -b tlsdate
Jacob Appelbaum6a00b292012-07-11 18:45:13 +0200154
Jacob Appelbaumbed9e242012-07-12 15:47:57 +0200155Example of how to build a package for Debian:
156
157 # First build the source package above
158 scp tlsdate_* dixie.torproject.org:~/src/debian-builds/
159 ~/bin/sbuild-stuff tlsdate_0.0.1-1.dsc
160 # Download or build the package locally
161 # and sign the .changes or .dsc file
Jacob Appelbaum9bd80272012-07-12 15:57:48 +0200162 debsign -k0xD81D840E tlsdate_0.0.1-1.dsc
Jacob Appelbaum33da9ff2012-07-12 16:21:29 +0200163
164Example of how to upload it (after a Debian sponsor signs off on it):
Jacob Appelbaumf8fd2f82013-04-11 00:09:29 -0700165
Jacob Appelbaum33da9ff2012-07-12 16:21:29 +0200166 dget http://www.example.com/tlsdate_0.0.1-1_amd64.changes
167 dput tlsdate_0.0.1-1_amd64.changes
168
Abel Luckd9427682013-04-12 12:12:52 +0200169For Android:
170
171To cross compile tlsdate for Android (tested on Linux) you must have the
172Android NDK (>=r8) installed somewhere on your system, and define the
173environment variable NDK_BASE to be the path to the NDK's root dir.
174
175 export NDK_BASE=/home/user/src/android-ndk-r8d
176
177The Android build also requires a cross-compiled OpenSSL. The Android Makefile
178will attempt to build openssl, if you provide the path via the OPENSSL_ANDROID
179env var.
180
181 git clone https://github.com/guardianproject/openssl-android.git /path/to/android-openssl
182 export OPENSSL_ANDROID=/path/to/android-openssl
183
184Once NDK_BASE and OPENSSL_ANDROID are set properly, you can cross compile tlsdate with:
185
186 make distclean # clean any previous builds
187 rm configure # distclean doesn't remove this file
188 make -f Makefile.android
189
190Android NDK: https://developer.android.com/tools/sdk/ndk/index.html
191OpenSSL for Android: https://github.com/guardianproject/openssl-android
192