From c257b555225193e54d85daf541d29578b3c93882 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sun, 17 Apr 2005 12:04:01 +0000 Subject: [PATCH] Merged silc_1_0_branch to trunk. cvs -z3 update -j silc_trunk_merged_silc_1_0_branch_3 -j silc_1_0_branch --- CHANGES | 915 ++ CREDITS | 38 +- INSTALL | 2 +- Makefile.am.pre => Makefile.ad | 156 +- Makefile.defines.pre => Makefile.defines.in | 16 +- ...defines_int.pre => Makefile.defines_int.in | 11 + README.CVS | 68 +- README.DIST | 112 + TODO | 32 +- acconfig.h.pre | 82 - apps/Makefile.ad | 23 + apps/autodist/AUTHORS | 3 + apps/autodist/COPYING | 25 + apps/autodist/INSTALL | 236 + apps/autodist/Makefile.am | 49 + apps/autodist/README | 49 + apps/autodist/autodist.conf | 49 + apps/autodist/autodist.in | 1600 +++ apps/autodist/configure.ad | 52 + apps/autodist/default | 10 + apps/autodist/doc/Makefile.am | 19 + apps/autodist/doc/autodist.texi | 1603 +++ apps/autodist/doc/fdl.texi | 452 + apps/autodist/doc/mdate-sh | 133 + apps/autodist/doc/texinfo.tex | 6740 ++++++++++ apps/autodist/makedist.in | 35 + apps/autodist/tests/Makefile.am | 27 + apps/autodist/tests/autodist1.test | 67 + apps/autodist/tests/autodist2.test | 86 + apps/irssi/autogen.sh | 2 +- apps/irssi/configure.in | 4 +- apps/irssi/default.theme | 26 +- apps/irssi/docs/help/in/action.in | 7 +- apps/irssi/docs/help/in/cumode.in | 8 +- apps/irssi/docs/help/in/kill.in | 33 +- apps/irssi/docs/help/in/listkeys.in | 11 + apps/irssi/docs/help/in/mmsg.in | 39 + apps/irssi/docs/help/in/msg.in | 7 +- apps/irssi/docs/help/in/nick.in | 1 - apps/irssi/docs/help/in/notice.in | 5 + apps/irssi/docs/help/in/oper.in | 2 +- apps/irssi/docs/help/in/ping.in | 5 +- apps/irssi/docs/help/in/silcnet.in | 10 + apps/irssi/docs/help/in/silcoper.in | 6 +- apps/irssi/docs/help/in/umode.in | 10 +- apps/irssi/docs/help/in/watch.in | 7 + apps/irssi/docs/help/in/whois.in | 3 + apps/irssi/docs/help/in/whowas.in | 4 - apps/irssi/docs/signals.txt | 4 +- apps/irssi/scripts/Makefile.am | 3 +- apps/irssi/scripts/mime-test.pl | 43 - apps/irssi/scripts/silc-mime.pl | 514 + apps/irssi/silc.conf | 1 - apps/irssi/src/fe-common/silc/Makefile.am | 10 +- .../irssi/src/fe-common/silc/fe-common-silc.c | 14 +- apps/irssi/src/fe-common/silc/fe-messages.c | 248 - .../{fe-channels.c => fe-silc-channels.c} | 2 +- .../src/fe-common/silc/fe-silc-channels.h | 7 + .../src/fe-common/silc/fe-silc-messages.c | 518 + .../src/fe-common/silc/fe-silc-messages.h | 7 + .../src/fe-common/silc/fe-silc-queries.c | 66 + .../src/fe-common/silc/fe-silc-queries.h | 7 + apps/irssi/src/fe-common/silc/fe-silcnet.c | 153 + apps/irssi/src/fe-common/silc/fe-silcnet.h | 7 + .../irssi/src/fe-common/silc/module-formats.c | 66 +- .../irssi/src/fe-common/silc/module-formats.h | 63 +- apps/irssi/src/perl/Makefile.am | 20 +- apps/irssi/src/perl/silc/Channel.xs | 5 + apps/irssi/src/perl/silc/Makefile.PL.in | 12 + apps/irssi/src/perl/silc/Query.xs | 10 + apps/irssi/src/perl/silc/Server.xs | 14 + apps/irssi/src/perl/silc/Silc.pm | 25 + apps/irssi/src/perl/silc/Silc.xs | 37 + apps/irssi/src/perl/silc/module.h | 16 + apps/irssi/src/perl/silc/typemap | 15 + apps/irssi/src/silc/core/Makefile.am | 8 +- apps/irssi/src/silc/core/client_ops.c | 461 +- apps/irssi/src/silc/core/client_ops.h | 30 +- apps/irssi/src/silc/core/clientutil.c | 49 +- apps/irssi/src/silc/core/silc-channels.c | 600 +- apps/irssi/src/silc/core/silc-chatnets.c | 84 + apps/irssi/src/silc/core/silc-chatnets.h | 32 + apps/irssi/src/silc/core/silc-cmdqueue.c | 148 + apps/irssi/src/silc/core/silc-cmdqueue.h | 41 + apps/irssi/src/silc/core/silc-core.c | 65 +- apps/irssi/src/silc/core/silc-lag.c | 2 +- apps/irssi/src/silc/core/silc-queries.c | 16 +- apps/irssi/src/silc/core/silc-servers.c | 204 +- apps/irssi/src/silc/core/silc-servers.h | 17 +- apps/silcd/Makefile.am | 7 +- apps/silcd/command.c | 550 +- apps/silcd/command_reply.c | 263 +- apps/silcd/idlist.c | 142 +- apps/silcd/idlist.h | 16 +- apps/silcd/packet_receive.c | 402 +- apps/silcd/packet_send.c | 127 +- apps/silcd/packet_send.h | 10 +- apps/silcd/protocol.c | 5 + apps/silcd/route.c | 10 +- apps/silcd/route.h | 2 +- apps/silcd/server.c | 333 +- apps/silcd/server.h | 7 +- apps/silcd/server_backup.c | 99 +- apps/silcd/server_internal.h | 5 + apps/silcd/server_query.c | 339 +- apps/silcd/server_util.c | 260 +- apps/silcd/server_util.h | 4 +- apps/silcd/server_version.c | 2 +- apps/silcd/serverconfig.c | 58 +- apps/silcd/serverid.c | 23 +- apps/silcd/serverid.h | 9 +- apps/silcd/silcd.c | 21 +- config.guess | 342 +- config.sub | 172 +- configure.in.pre => configure.ad | 525 +- distdir/BSD | 25 + distdir/BSD-header | 8 + distdir/GPL | 340 + distdir/GPL-header | 8 + distdir/autodist | 18 + distdir/autodist.conf | 49 + distdir/client | 7 + distdir/common | 10 + distdir/default | 16 + distdir/pre-run | 20 + distdir/server | 7 + distdir/toolkit | 13 + distributions | 80 - doc/FAQ | 2 +- doc/{Makefile.am.pre => Makefile.ad} | 93 +- doc/draft-riikonen-presence-attrs-03.nroff | 669 + doc/draft-riikonen-silc-commands-06.nroff | 115 +- ...raft-riikonen-silc-flags-payloads-04.nroff | 522 + doc/draft-riikonen-silc-ke-auth-08.nroff | 1180 ++ doc/draft-riikonen-silc-pp-08.nroff | 193 +- doc/draft-riikonen-silc-pp-09.nroff | 3030 +++++ doc/draft-riikonen-silc-spec-08.nroff | 345 +- doc/draft-riikonen-silc-spec-09.nroff | 2848 +++++ doc/example_silcd.conf.in | 5 +- doc/silcd.yo | 43 +- doc/whitepaper/silc_protocol.html | 211 +- includes/{Makefile.am => Makefile.ad} | 21 +- includes/silcincludes.h.in | 23 +- includes/{silcversion.h => silcversion.h.in} | 7 +- lib/{Makefile.am.pre => Makefile.ad} | 115 +- lib/configure.ad | 152 + lib/contrib/Makefile.am | 19 +- lib/contrib/gunicomp.h | 661 + lib/contrib/gunidecomp.h | 10363 ++++++++++++++++ lib/contrib/nfkc.c | 1054 ++ lib/contrib/rfc3454.c | 3544 ++++++ lib/contrib/stringprep.c | 675 + lib/contrib/stringprep.h | 181 + lib/doc/INDEX.tmpl | 6 +- lib/doc/LIBINDEX | 2 +- lib/doc/command_reply_args.html | 11 +- lib/doc/notifyargs.html | 3 +- lib/doc/silcclient_unicode.html | 40 + lib/silc.pc.in | 12 + lib/silcclient.pc.in | 13 + lib/silcclient/DIRECTORY | 3 +- lib/silcclient/{Makefile.am => Makefile.ad} | 15 +- lib/silcclient/client.c | 127 +- lib/silcclient/client.h | 7 - lib/silcclient/client_attrs.c | 18 +- lib/silcclient/client_channel.c | 103 +- lib/silcclient/client_ftp.c | 229 +- lib/silcclient/client_internal.h | 9 +- lib/silcclient/client_keyagr.c | 119 +- lib/silcclient/client_notify.c | 75 +- lib/silcclient/client_ops_example.c | 7 +- lib/silcclient/client_prvmsg.c | 84 +- lib/silcclient/client_resume.c | 16 +- lib/silcclient/command.c | 223 +- lib/silcclient/command.h | 4 +- lib/silcclient/command_reply.c | 97 +- lib/silcclient/idlist.c | 397 +- lib/silcclient/protocol.c | 17 +- lib/silcclient/protocol.h | 10 +- lib/silcclient/silcclient.h | 280 +- lib/silccore/{Makefile.am => Makefile.ad} | 14 +- lib/silccore/silcargument.h | 1 + lib/silccore/silcattrs.c | 14 +- lib/silccore/silcattrs.h | 63 +- lib/silccore/silccommand.c | 3 +- lib/silccore/silcidcache.c | 28 +- lib/silccore/silcidcache.h | 85 +- lib/silccore/silcmessage.h | 9 +- lib/silccore/silcpacket.c | 39 +- lib/silccore/silcstatus.h | 4 +- lib/silccrypt/DIRECTORY | 2 +- lib/silccrypt/{Makefile.am => Makefile.ad} | 25 +- lib/silccrypt/ciphers.h | 1 - lib/silccrypt/pkcs1.c | 475 - lib/silccrypt/pkcs1.h | 35 - lib/silccrypt/rc6.c | 220 - lib/silccrypt/rc6.h | 34 - lib/silccrypt/rc6_internal.h | 39 - lib/silccrypt/rsa.c | 557 +- lib/silccrypt/rsa.h | 14 +- lib/silccrypt/rsa_internal.h | 27 +- lib/silccrypt/silccipher.c | 66 +- lib/silccrypt/silcpkcs.c | 63 +- lib/silccrypt/silcpkcs.h | 46 +- lib/silccrypt/silcpkcs1.c | 160 + lib/silccrypt/silcpkcs1.h | 115 + lib/silccrypt/silcrng.c | 88 +- lib/silccrypt/silcrng.h | 26 +- lib/silccrypt/tests/Makefile.am | 7 +- lib/silccrypt/tests/test_silcpkcs.c | 309 + lib/silcmath/{Makefile.am => Makefile.ad} | 22 +- lib/silcsftp/DIRECTORY | 2 +- lib/silcsftp/{Makefile.am => Makefile.ad} | 15 +- lib/silcsftp/sftp_client.c | 99 +- lib/silcsftp/sftp_fs_memory.c | 95 +- lib/silcsftp/sftp_server.c | 106 +- lib/silcsftp/silcsftp.h | 70 +- lib/silcsim/{Makefile.am => Makefile.ad} | 14 +- lib/silcske/{Makefile.am => Makefile.ad} | 13 +- lib/silcutil/DIRECTORY | 2 + lib/silcutil/{Makefile.am => Makefile.ad} | 27 +- lib/silcutil/silcapputil.c | 21 +- lib/silcutil/silcbuffmt.c | 2 +- lib/silcutil/silcbuffmt.h | 24 +- lib/silcutil/silcfileutil.c | 4 +- lib/silcutil/silchashtable.c | 41 +- lib/silcutil/silchashtable.h | 122 +- lib/silcutil/silclist.h | 2 +- lib/silcutil/silclog.c | 21 +- lib/silcutil/silclog.h | 28 +- lib/silcutil/silcmemory.h | 2 +- lib/silcutil/silcnet.c | 58 +- lib/silcutil/silcschedule.c | 83 +- lib/silcutil/silcsockconn.c | 40 +- lib/silcutil/silcsockconn.h | 56 +- lib/silcutil/silcstringprep.c | 269 + lib/silcutil/silcstringprep.h | 138 + lib/silcutil/silcstrutil.c | 536 +- lib/silcutil/silcstrutil.h | 303 +- lib/silcutil/silctypes.h | 95 +- lib/silcutil/silcutf8.c | 588 + lib/silcutil/silcutf8.h | 166 + lib/silcutil/silcutil.c | 52 +- lib/silcutil/silcutil.h | 38 +- lib/silcutil/silcvcard.c | 36 +- lib/silcutil/tests/Makefile.am | 29 + lib/silcutil/tests/test_silchashtable.c | 297 + lib/silcutil/tests/test_silcstringprep.c | 166 + lib/silcutil/tests/test_silcstrutil.c | 140 + lib/silcutil/unix/silcunixnet.c | 17 + lib/silcutil/unix/silcunixschedule.c | 47 +- lib/silcutil/unix/silcunixsockconn.c | 39 +- lib/silcutil/win32/silcwin32schedule.c | 5 +- lib/silcutil/win32/silcwin32util.c | 2 +- prepare | 158 - prepare-clean | 97 - scripts/silcdoc/silcdoc | 7 +- tutorial/mybot/mybot.c | 1 + util/robodoc/Source/generator.c | 6 + win32/libsilc/libsilc.def | 1193 +- win32/libsilc/libsilc.dsp | 100 +- win32/libsilc_static/libsilc_static.dsp | 32 +- win32/libsilcclient/libsilcclient.def | 338 +- win32/libsilcclient/libsilcclient.dsp | 4 +- .../libsilcclient_static.dsp | 4 +- win32/silcdefs.h | 2 + 266 files changed, 50753 insertions(+), 6546 deletions(-) rename Makefile.am.pre => Makefile.ad (68%) rename Makefile.defines.pre => Makefile.defines.in (78%) rename Makefile.defines_int.pre => Makefile.defines_int.in (81%) create mode 100644 README.DIST delete mode 100644 acconfig.h.pre create mode 100644 apps/Makefile.ad create mode 100644 apps/autodist/AUTHORS create mode 100644 apps/autodist/COPYING create mode 100644 apps/autodist/INSTALL create mode 100644 apps/autodist/Makefile.am create mode 100644 apps/autodist/README create mode 100644 apps/autodist/autodist.conf create mode 100755 apps/autodist/autodist.in create mode 100644 apps/autodist/configure.ad create mode 100644 apps/autodist/default create mode 100644 apps/autodist/doc/Makefile.am create mode 100644 apps/autodist/doc/autodist.texi create mode 100644 apps/autodist/doc/fdl.texi create mode 100755 apps/autodist/doc/mdate-sh create mode 100644 apps/autodist/doc/texinfo.tex create mode 100755 apps/autodist/makedist.in create mode 100644 apps/autodist/tests/Makefile.am create mode 100755 apps/autodist/tests/autodist1.test create mode 100755 apps/autodist/tests/autodist2.test create mode 100644 apps/irssi/docs/help/in/listkeys.in create mode 100644 apps/irssi/docs/help/in/mmsg.in create mode 100644 apps/irssi/docs/help/in/silcnet.in delete mode 100644 apps/irssi/scripts/mime-test.pl create mode 100644 apps/irssi/scripts/silc-mime.pl delete mode 100644 apps/irssi/src/fe-common/silc/fe-messages.c rename apps/irssi/src/fe-common/silc/{fe-channels.c => fe-silc-channels.c} (96%) create mode 100644 apps/irssi/src/fe-common/silc/fe-silc-channels.h create mode 100644 apps/irssi/src/fe-common/silc/fe-silc-messages.c create mode 100644 apps/irssi/src/fe-common/silc/fe-silc-messages.h create mode 100644 apps/irssi/src/fe-common/silc/fe-silc-queries.c create mode 100644 apps/irssi/src/fe-common/silc/fe-silc-queries.h create mode 100644 apps/irssi/src/fe-common/silc/fe-silcnet.c create mode 100644 apps/irssi/src/fe-common/silc/fe-silcnet.h create mode 100644 apps/irssi/src/perl/silc/Channel.xs create mode 100644 apps/irssi/src/perl/silc/Makefile.PL.in create mode 100644 apps/irssi/src/perl/silc/Query.xs create mode 100644 apps/irssi/src/perl/silc/Server.xs create mode 100644 apps/irssi/src/perl/silc/Silc.pm create mode 100644 apps/irssi/src/perl/silc/Silc.xs create mode 100644 apps/irssi/src/perl/silc/module.h create mode 100644 apps/irssi/src/perl/silc/typemap create mode 100644 apps/irssi/src/silc/core/silc-chatnets.c create mode 100644 apps/irssi/src/silc/core/silc-chatnets.h create mode 100644 apps/irssi/src/silc/core/silc-cmdqueue.c create mode 100644 apps/irssi/src/silc/core/silc-cmdqueue.h rename configure.in.pre => configure.ad (78%) create mode 100644 distdir/BSD create mode 100644 distdir/BSD-header create mode 100644 distdir/GPL create mode 100644 distdir/GPL-header create mode 100644 distdir/autodist create mode 100644 distdir/autodist.conf create mode 100644 distdir/client create mode 100644 distdir/common create mode 100644 distdir/default create mode 100644 distdir/pre-run create mode 100644 distdir/server create mode 100644 distdir/toolkit delete mode 100644 distributions rename doc/{Makefile.am.pre => Makefile.ad} (56%) create mode 100644 doc/draft-riikonen-presence-attrs-03.nroff create mode 100644 doc/draft-riikonen-silc-flags-payloads-04.nroff create mode 100644 doc/draft-riikonen-silc-ke-auth-08.nroff create mode 100644 doc/draft-riikonen-silc-pp-09.nroff create mode 100644 doc/draft-riikonen-silc-spec-09.nroff rename includes/{Makefile.am => Makefile.ad} (65%) rename includes/{silcversion.h => silcversion.h.in} (80%) rename lib/{Makefile.am.pre => Makefile.ad} (58%) create mode 100644 lib/configure.ad create mode 100644 lib/contrib/gunicomp.h create mode 100644 lib/contrib/gunidecomp.h create mode 100644 lib/contrib/nfkc.c create mode 100644 lib/contrib/rfc3454.c create mode 100644 lib/contrib/stringprep.c create mode 100644 lib/contrib/stringprep.h create mode 100644 lib/doc/silcclient_unicode.html create mode 100644 lib/silc.pc.in create mode 100644 lib/silcclient.pc.in rename lib/silcclient/{Makefile.am => Makefile.ad} (76%) rename lib/silccore/{Makefile.am => Makefile.ad} (82%) rename lib/silccrypt/{Makefile.am => Makefile.ad} (81%) delete mode 100644 lib/silccrypt/pkcs1.c delete mode 100644 lib/silccrypt/pkcs1.h delete mode 100644 lib/silccrypt/rc6.c delete mode 100644 lib/silccrypt/rc6.h delete mode 100644 lib/silccrypt/rc6_internal.h create mode 100644 lib/silccrypt/silcpkcs1.c create mode 100644 lib/silccrypt/silcpkcs1.h create mode 100644 lib/silccrypt/tests/test_silcpkcs.c rename lib/silcmath/{Makefile.am => Makefile.ad} (75%) rename lib/silcsftp/{Makefile.am => Makefile.ad} (76%) rename lib/silcsim/{Makefile.am => Makefile.ad} (86%) rename lib/silcske/{Makefile.am => Makefile.ad} (74%) rename lib/silcutil/{Makefile.am => Makefile.ad} (81%) create mode 100644 lib/silcutil/silcstringprep.c create mode 100644 lib/silcutil/silcstringprep.h create mode 100644 lib/silcutil/silcutf8.c create mode 100644 lib/silcutil/silcutf8.h create mode 100644 lib/silcutil/tests/Makefile.am create mode 100644 lib/silcutil/tests/test_silchashtable.c create mode 100644 lib/silcutil/tests/test_silcstringprep.c create mode 100644 lib/silcutil/tests/test_silcstrutil.c delete mode 100755 prepare delete mode 100755 prepare-clean diff --git a/CHANGES b/CHANGES index 06d20905..fa8a3230 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,918 @@ +Sat Apr 16 20:23:48 EEST 2005 Pekka Riikonen + + * Added Autodist. + +Thu Apr 14 20:25:08 EEST 2005 Pekka Riikonen + + * Handle empty LIST command reply correcttly in server. Affected + file silcd/command_reply.c. + + * Handle empty LIST command reply correctly in client library. + The application will now receive one LIST command reply with + all arguments set to NULL if there are no channels. Updated + Client Library documentation accordingly. Affected file + lib/silcclient/command_reply.c. + +Tue Apr 12 00:02:09 EEST 2005 Pekka Riikonen + + * Added channel name string stringprep profile to the protocol + and implementation to allow a little free'er channel name + strings. Affected files are lib/silcutil/silcstringprep.[ch]. + + * Added silc_channel_name_[check|verify] to check and verify + channel name strings. Affected files are + lib/silcutil/silcstrutil.[ch]. + + * Added support for the new channel name preparation in client + library and server. Affected files in lib/silcclient and + silcd/. + +Mon Apr 11 13:40:27 EEST 2005 Pekka Riikonen + + * Added the Autodist into the source tree. It replaces the + old ./prepare. It can be used to create distributions as + previously. See README.CVS and README.DIST. See + distributions in distdir/. + +Sun Apr 10 11:30:56 EEST 2005 Pekka Riikonen + + * Make sure query sends at least an error back if nothing + more is sent. Affected file silcd/server_query.c. + +Thu Apr 7 14:50:01 EEST 2005 Pekka Riikonen + + * During query, check if the original command caller goes + away. If it does, stop the query. Affected file + silcd/server_query.c. + + * Check for valid channel creation in JOIN command reply. + Affected file lib/silcclient/command_reply.c. + + * Handle the resolver counter in silc_client_get_users_by_channel + callback correctly. Fixed auto-join bug in Gaim. Affected + file lib/silcclient/idlist.c. + +Wed Apr 6 16:56:53 EEST 2005 Pekka Riikonen + + * Added some better error messages. Affected file + silcd/command_reply.c and packet_receive.c. + + * Handle error in WATCH command propely on backup router. + Affected file silcd/command.c. + + * Fixed freeing of unfreeable variable in WHOIS command reply. + Affected file silcd/command_reply.c. + +Wed Apr 6 09:10:31 CEST 2005 Pekka Riikonen + + * Added pkg-config .pc file creation for silc core library + and silcclient library. A patch by c0ffee. + + * Removed the need for GNU Libidn. Added the simple stringprep + from libidn into lib/contrib/. It is now used also on Windows + build. + +Mon Apr 4 15:15:46 EEST 2005 Pekka Riikonen + + * Simplified the invite and ban string handling in the + server. Check for valid invite and ban arguments also. + Affected file silcd/server_util.c. + +Sun Apr 3 14:58:53 EEST 2005 Pekka Riikonen + + * Added WATCH list announcing in backup router protocol. + Affected files are silcd/command.c, server.c, server_backup.c. + + * Do not change users mode to founder on normal server/backup + if the founder mode is set, and user is first one to join. + Affected file silcd/pcaket_receive.c. + + * Do not send CUMODE_CHANGE notify back to sender. Affected + file silcd/packet_receive.c. + + * Added getrusage() to take noise in SILC RNG. A patch by + Mika Boström. Affected files are configure.in.pre, + includes/silcincludes.h.in, lib/silccrypt/silcrng.c. + +Sat Apr 2 18:09:30 EEST 2005 Pekka Riikonen + + * Splitted the SILC libraries configuration into a configure + fragment into lib/configure.ad. It is now possible, once + this feature is added, to specify whether to compile or not + compile included SILC libraries. Affected files are + configure.in.pre, lib/silcmath/mpi/configure.ad, + lib/configure.ad, Makefile.defines.pre and + Makefile.defines_int.pre. + + * Added --with-silc-includes and --with-silc-libs to configure. + If specified the included libs are not compiled, but the + specified libs are used. Pkg-config is not yet supported. + Affected file configure.in.pre. + + * Fixed WATCH command handling on backup router. Router does not + send the watch command any more to backup if it originates from + backup. Affected file silcd/command.c. + +Fri Apr 1 18:52:47 EEST 2005 Pekka Riikonen + + * Changed announcing to not announce unregistered clients. + Affected file silcd/server.c. + + * Fixed username handling in command reply. Affected file + silcd/command_reply.c. + + * Log files are now 0600. Affected file lib/silcutil/silclog.c. + +Thu Mar 31 22:34:22 CEST 2005 Patrik Weiskircher + + * Added new define SILC_MACOSX, if __APPLE__ and __MACH__ is defined. + Affected file: includes/silcincludes.h.in + + * bool is defined as _Bool on Mac OS X now. + Affected file: lib/silcutil/silctypes.h + +Thu Mar 31 08:52:06 EEST 2005 Pekka Riikonen + + * Added support for UTF-8 nicknames, channel names and + server names in client library. Affected files in + lib/silcclient/. + + * Added __SILC_HAVE_PTHREAD, __SILC_HAVE_SIM, __SILC_HAVE_LIBIDN, + and __SILC_ENABLE_DEBUG to include/silcclient.h for third-party + software to check how Toolkit has been compiled. + +Wed Mar 30 22:16:35 EEST 2005 Pekka Riikonen + + * Added silc_utf8_str[n]casecmp into lib/silcutil/silcutf8.[ch]. + + * Use silc_utf8_str[n]casecmp instead of strcmp routines + in library and in SILC Client when dealing with nicknames + and other identifier strings. Affected file in client lib + and irssi. + + * Convert nickname to UTF-8 in /msg and /smsg. Affected file + irssi/src/silc/core/silc-servers.c. + +Wed Mar 30 10:50:02 EEST 2005 Pekka Riikonen + + * Fixed idcache to work with the new identifier strings. + Affected file lib/silccore/silcidcache.c. + + * Added UTF-8 hash and compare function for SilcHashTable. + Affected file lib/silcutil/silcutil.[ch]. + + * Added casefolding stringprep, SILC_CASEFOLD_PREP. + Affected file lib/silcutil/silcstringprep.[ch]. + + * Changed the identifier string handling to include the original + format in client, server, channel entries and normalized + format in cache. Affected files in silcd/. + +Tue Mar 29 16:51:35 EEST 2005 Pekka Riikonen + + * Added support for the new identifier strings and their + validity checking. Nicknames, channel names and usernames + can now include practically any kind of letters and various + other characters. Affected files in silcd/ and in libraries. + + NOTE: comparing these strings should now be done with memcmp() + to check binary compatibility. All these strings are normalized + and casing is irrelevant. + + * Added silc_identifier_check to lib/silcutil/silcstrutil.[ch] + as easy function for applications to check whether identifier + strings are valid. + +Tue Mar 29 00:45:11 EEST 2005 Pekka Riikonen + + * Fixed SILC_STRING_LDAP_DN encoding and decoding. Affected + file lib/silcutil/silcutf8.c. + + * Added SILC_STRING_UTF8_ESCAPE to lib/silcutil/silcstrutil.h. + +Mon Mar 28 22:46:23 CEST 2005 Jochen Eisinger + + * Make public key in getkey reply mandatory. Affected file + lib/silcclient/command_reply.c + +Sun Mar 27 19:03:31 CEST 2005 Patrik Weiskircher + + * Added Parameter dont_register_crypto_library to + SilcClientParam. If set to TRUE, silcclient library will + not initalize the Crypto Libraries and application + will need to do it. Affected file lib/silcclient/silcclient.h, + lib/silcclient/client.c. + +Sun Mar 27 19:02:48 EEST 2005 Pekka Riikonen + + * Imported new silc_utf8_[encode|decode] routines from + my internal SILC 1.1 source tree. New encodings added: + SILC_STRING_LOCALE (SILC_STRING_LANGUAGE is deprecated), + SILC_STRING_UTF8, SILC_STRING_PRINTABLE, SILC_STRING_VISIBLE, + SILC_STRING_TELETEX, SILC_STRING_NUMERICAL and + SILC_STRING_LDAP_DN. + + * Splitted UTF-8 routines into lib/silcutil/silcutf8.[ch]. + + * Implemented stringprep (RFC 3454) API. Internally we use + GNU Libidn's stringprep, for now, so it is required now to + compile SILC sources. Added lib/silcutil/silcstringprep.[ch]. + + * Added checking for GNU Libidn and --with-libidn to configure. + +Wed Mar 23 11:20:33 CET 2005 Jochen Eisinger + + * If the passphrases entered do not match while generating a new key, + completly start over instead of going into an infinite loop asking + the user to re-enter the passphrase correctly. Affected file + lib/silcutil/silcapputil.c + +Sun Jan 9 14:28:51 CET 2005 Pekka Riikonen + + * Make sure server is removed from backup list when it is + deleted. Affected files silcd/command.c, server.c, + server_util.c. + + * Close socket when connecting to router fails. Affected + file silcd/server.c. + +Tue Jan 4 13:06:26 CET 2005 Jochen Eisinger + + * Adopt configuration toolchain to current auto-tools. + Affected files prepare, irssi/configure.in + * Revert most of the UTF-8 fixes to SILC Client 1.0.1. Will + redo that. Affected files irssi/src/silc/core/client_ops.c, + irssi/src/fe-common/silc/fe-silc-channels.c + * Take over command line options into silcclient data structure. + Affected file irssi/src/silc/core/silc-core.c + +Wed Dec 8 16:15:11 CET 2004 Pekka Riikonen + + * Do not try to initiate backup resuming protocol forever. + Affected file silcd/server_backup.c. + +Wed Nov 24 18:24:05 CET 2004 Pekka Riikonen + + * ID change in resuming has to be done before changing + detached client's modes, since the ID change may fail and + leave ghosts on the network. Affected file is + silcd/packet_receive.c. + +Tue Nov 23 16:54:35 CET 2004 Pekka Riikonen + + * Fixed Win32 scheduler to not stuck anymore. A patch from + Juha Räsänen. Affected file is + lib/silcutil/win32/silcwin32schedule.c. + + * Fixed QoS parsing for connection blocks in server. Affected + file is silcd/serverconfig.c. + + * Fixed server statistics increasing in server. Affected file + is silcd/server.c. + + * The CLOSE command now marks backup router as self disconnected + to avoid resuming problems. Affected file silcd/command.c. + +Wed Sep 22 19:46:32 CEST 2004 Patrik Weiskircher + + * When using silc_net_create_connection[_async], and your system can + create IPv6 sockets, it will try to connect to the IPv6 host. + Now it tries to connect to an IPv4 host if IPv6 fails. Affected + file lib/silcutil/unix/silcunixnet.c + +Fri Jun 18 19:26:58 CEST 2004 Pekka Riikonen + + * Check for valid route when receiving packet from router and + when routing it to local server in the cell. A patch from + Matt Miller. Affected files silcd/router.c and server.c. + +Sat May 1 13:55:54 CEST 2004 Patrik Weiskircher + + * Couldn't detach and reattach twice, because of the previous + commit. Affected file silcd/packet_receive.c + +Fri Apr 30 19:40:28 CEST 2004 Patrik Weiskircher + + * Added check to ignore Port value if Initiator is FALSE. + Remote router coudln't connect if Port was set. Affected file + silcd/serverconfig.c + + * If some client tries to resume more than once at the same time, + server crashed. Router didn't crash, but showed odd behaviour + (didn't allow clients to join anymore, ..). Affected files + silcd/packet_receive.c silcd/idlist.h + +Mon Mar 15 21:10:08 EET 2004 Pekka Riikonen + + * Destroy the file transfer session in silc_client_file_close + with timeout. Affected file lib/silcclient/client_ftp.c. + + * Call SFTP server monitor in READ and WRITE after the actual + operations. Affected file lib/silcsftp/sftp_server.c. + +Wed Mar 10 21:30:02 EET 2004 Pekka Riikonen + + * Create one configure script from configure fragments + (configure.ad). This is a first step towards new distribution + system. Affected files prepare, configure.in.pre, + lib/silcmath/mpi/configure.ad. + +Wed Mar 10 18:35:24 CET 2004 Jochen Eisinger + + * Removed expiring of client key pair. Affected file is + irssi/src/silc/core/clientutil.c + +Tue Mar 9 17:11:58 EET 2004 Pekka Riikonen + + * Check the number of connections from real number of + connections instead of socket number, when deciding if + server is full. Affected files are silcd/server.c, + server_internal.h and silcd.c. + + * Clarified the connections_max meaning in General section + in doc/example_silcd.conf.in. + + * The reconnect_keep_trying default value set to TRUE + if it is not defined in the config file. Affected file + silcd/serverconfig.c. + +Wed Mar 3 15:13:49 CET 2004 Pekka Riikonen + + * Fixed crashbug in connection closing, after a protocol + completion callback, which might have closed it already. + Affected file silcd/server.c. + + * Fixed rekey with PFS in backup router. It did not allow + rekeys with PFS, and when the rekey protocol timedout + it crashed the backup router without the above fix. Affected + file silcd/packet_send.c and server.c. + +Sat Feb 28 16:25:09 EET 2004 Pekka Riikonen + + * The silc_client_add_channel_private_key now returns the + private key context if pointer is given as argument. + Affected files are lib/silcclient/silcclient.h and + client_channel.c. + + * Added support for using channel private keys in SILC + Client Library even if the private key mode is not set + on the channel. Affected file lib/silcclient/client_channel.c. + + * The channel private key used to decrypt message is now + delivered to the application in the 'channel_messageÃ' client + operation. Affected files are lib/silcclient/silcclient.h + and client_channel.c. + + * Fixed wrong arg type for user limit in CMODE command reply. + Affected file silcd/command.c. + + * The user limit is now taken and saved to SilcClientEntry in + JOIN and CMODE command replies and in CMODE_CHANGE notify. + Affected files lib/silcclient/silcclient.h, command_reply.c + and client_notify.c. + + * Added support to the new private message key indicator + packet. Added a new function to the client library: + silc_client_send_private_message_key_request. The sender + indicates to be initiator, and receiver is responder. + Added the indicator to the SilcClientEntry as 'prv_resp' + boolean. Affected files are lib/silcclient/silcclient.h + client.[ch], and client_prvmsg.c. + +Fri Feb 27 11:25:26 CET 2004 Pekka Riikonen + + * Fixed the JOIN command calling when called with both + -auth and -founder. Affected file is lib/silcclien/command.c. + +Wed Feb 25 23:12:11 EET 2004 Pekka Riikonen + + * Check watcher list for resumed clients as well. Affected + file is silcd/packet_receive.c. + +Tue Feb 24 16:49:10 EET 2004 Pekka Riikonen + + * Implemented the user limit to the CMODE_CHANGE notify, + CMODE command reply and JOIN command reply in server. + Affected files are silcd/server.c, command.c, command_reply.c, + packet_send.c and packet_receive.c. + +Mon Feb 23 23:31:15 EET 2004 Pekka Riikonen + + * Defined SILC_STRFMT_END that must be used now with + silc_buffer_strformat, instead of SILC_STR_END. Fixes + crashes on AMD64. Affected files are lib/silcutil/silcbuffmt.h, + lib/silcclient/silcvcard.c, silcd/server_util.c. + + * Fixed the adding of public key to the WATCH list in server. + Fixed the WATCH notify sending to client. Affected files + are silcd/packet_send.[ch], command.c, server_util.c. + + * Implemented the watching by public key in the SILC Client + Library and SILC Client. Affected files are + lib/silcclient/command.c and client_notify.c. + +Mon Feb 23 09:30:30 CET 2004 Pekka Riikonen + + * Added support for public key watching in server. Affected + files are silcd/server.c, server_internal.h, command.c, + server_util.c. + +Sun Feb 22 19:03:59 EET 2004 Pekka Riikonen + + * Added public key to the SIlcClientEntry. Affected files + are lib/silcclient/silcclient.h, command_reply.c, idlist.c + + * Fixed the get_clients_whois reply processing to return + exactly same entries server returned. Makes it possible + to search using attributes. Affected file is + lib/silcclient/idlist.c. + +Sat Feb 21 19:21:57 EET 2004 Pekka Riikonen + + * Save founder key to SilcChannelEntry. Affected files are + lib/silcclient/silcclient.h, command_reply.c, idlist.c. + +Fri Feb 20 20:37:38 EET 2004 Pekka Riikonen + + * Call the monitor callback with _CLOSED status from the + silc_client_file_close. Affected files are + lib/silcclient/client_fpt.c, silcclient.h + + * Added silc_client_get_clients_whois which resolves using + WHOIS, and supports requested attributes as well. + Affected files are lib/silcclient/silcclient.h, idlist.c. + +Fri Feb 19 21:09:22 EET 2004 Pekka Riikonen + + * Added support for asking the destination filename where + the downloaded file is saved in the file transfer. Affected + files are lib/silccilent/silcclient.h, client_ftp.c. + +Wed Feb 18 02:46:17 EET 2004 Pekka Riikonen + + * Fixed error handling in resuming data processing. Affected + files are lib/silcclient/client_resume.c and client.c. + +Tue Feb 17 19:34:30 EET 2004 Pekka Riikonen + + * Fixed silc_client_send_private_message to return TRUE correctly. + Affected file lib/silcclient/client_prvmsg.c. + + * Added topic to the SilcChannelEntry. Affected files are + lib/silcclient/silcclient.h, command_reply.c, client_notify.c. + +Fri Feb 13 14:19:14 CET 2004 Jochen Eisinger + + * Use conn->cmd_ident for all silc_client_command_call()s. Affected + file lib/silcclient/command.c + +Fri Feb 13 13:53:45 CET 2004 Jochen Eisinger + + * Convert all commands to UTF-8 before passing them to the + client library. Still need to convert replies from UTF-8 to + the locale encoding. Affected file + irssi/src/silc/core/silc-cmdqueue.c + +Fri Feb 13 13:13:07 CET 2004 Jochen Eisinger + + * redirect all silc_client_command_calls through a queueing framework. + This fixes /CYCLE and the annoying "nick change after auto-joining + a channel". Furthermore it defines one central point where + command parameters can be UTF-8-ified. Affected files + irssi/src/silc/core/Makefile, client_ops.c, silc-channels.c, + silc-servers.[ch], silc-core.c, silc-cmdqueue.[ch], silc-lag.c + +Fri Feb 13 12:04:41 CET 2004 Jochen Eisinger + + * use asynchronous connect() to establish router connections. + Fixes problem when the primary router goes down. Affected files + silcd/server.c, silcd/server_backup.c + +Thu Feb 12 20:09:59 EET 2004 Pekka Riikonen + + * Added SILC_[32|64]_TO_PTR and SILC_PTR_TO_[32|64] macros. + Fixed various compilation warnings when type casting ints + to pointers or vice versa, of different size. Updates around + the source free. + +Tue Feb 3 23:25:17 EET 2004 Pekka Riikonen + + * Surrogates not allowed in UTF-8 strings, updated decoder. + Affected file lib/silcutil/silcstrutil.c. Added UTF-8 + testers in lib/silcutil/tests/ directory. + +Wed Jan 14 18:42:44 EET 2004 Pekka Riikonen + + * Added SILC_CLIENT_CONN_ERROR_KE, ERROR_AUTH, ERROR_RESUME and + ERROR_TIMEOUT SilcClientConnectionStatus errors. Affected + files are lib/silcclient/silcclient.h, client.c. + +Mon Jan 12 13:01:10 CET 2004 Jochen Eisinger + + * When resuming a session fails, notify the user that the session + file needs to be removed eventually. Affected files + irssi/src/fe-common/silc/module-formats.[ch], + irssi/src/silc/core/client_ops.c. + +Tue Jan 04 12:16:04 CET 2004 Jochen Eisinger + + * Added DIST_SUBDIRS symbols to include all subdirs in distributions. + Affected files lib/silcutil/Makefile.am, lib/silcmath/Makefile.am + + * Typofix in Irssi::Silc module. Affected file + irssi/src/perl/silc/Silc.xs. + +Tue Jan 04 02:43:44 CET 2004 Jochen Eisinger + + * Changed the way NOTICE flagged messages are treated. Added support + for notices in queries and signing notices. Affected files + irssi/default.theme; irssi/docs/help/in/notice.in; + irssi/src/fe-common/silc/module-formats.[ch], fe-silc-messages.c; + irssi/src/silc/core/client_ops.c, silc-channels.c, silc-servers.c + + * Fixed typo in /ACTION help. Affected file + irssi/docs/help/in/action.in + +Mon Jan 03 23:26:38 CET 2004 Jochen Eisinger + + * Fixed typo in perl module. Affected file + irssi/src/perl/silc/Server.xs + + * Changed the way ACTION flagged messages are treated. Added support + for actions in queries and signing actions. Affected files + irssi/default.theme; irssi/docs/help/in/action.in; + irssi/src/fe-common/silc/module-formats.[ch], fe-silc-messages.c, + fe-silc-queries.c; irssi/src/silc/core/client_ops.c, silc-channels.c, + silc-servers.[ch] + +Mon Jan 03 16:04:29 CET 2004 Jochen Eisinger + + * Incorrectly reported error when client had to be resolved from + server in /SMSG. Affected file irssi/src/silc/core/silc-servers.c + +Sat Jan 3 16:37:15 EET 2004 Pekka Riikonen + + * Fixed whois public key hash table deleting and adding in + detached client case. Affected file silcd/packet_receive.c. + +Sat Jan 03 12:15:38 CET 2004 Jochen Eisinger + + * Changed filenames of silc/fe module not to collide with filenames + from core/fe. Also seperated public messages printing from + query messages printing. Affected files are all in + irssi/src/fe-common/silc. + +Sat Jan 3 12:18:07 EET 2004 Pekka Riikonen + + * Fixed the invite process handling during joining to use + correct server name for the client that is matched against + the invite string for the channel. Wrong server name caused + inability to join the channel. Affected file is + silcd/command.c. + +Fri Jan 2 23:34:17 EET 2004 Pekka Riikonen + + * Fixed the CUMODE channel founder authentication on normal + server to not remove the founder rights on existing founder + before checking that router accepts the mode change. Affected + files are silcd/command.c and silcd/packet_receive.c. + + * Remove the server entry correctly when rekey timeouts and + remote router connection on normal server is closed. Fixes + a crash where server uses the freed server entry. Affected + file silcd/server.c. + +Fri Jan 02 10:28:15 CET 2004 Jochen Eisinger + + * Add /SILCNET [ADD|REMOVE|LIST] command to manage different SILC + networks. This is the first step in solving the bug about + /SERVER ADD -silcnet . Affected files + irssi/docs/in/silcnet.in; irssi/src/fe-common/silc/Makefile.am, + fe-silcnet.c, fe-common-silc.c, module-formats.[ch]; + irssi/src/silc/core/silc-chatnets.[ch], silc-core.c, Makefile.am + +Thu Jan 01 20:11:32 CET 2004 Jochen Eisinger + + * /SMSG and /MMSG now correctly create new queries. Affected files + irssi/src/fe-common/silc/fe-messages.c, irssi/scripts/silc-mime.pl + + * Add basic support for SILC protocol specific variables in perl. + Affected files irssi/src/perl/silc/*, irssi/configure.in, + irssi/src/perl/Makefile.am + +Wed Dec 31 17:06:55 CET 2003 Jochen Eisinger + + * Don't use silc_get_input, it's obviously not reliable. Fixes + issue when the current key expires. Affect file + irssi/src/silc/core/clientutils.c + + * Make the session data filename configurable. This makes it + possible to have different session files for different + SILC networks. Affected files irssi/src/silc/core/silc-core.c, + client_ops.[ch], silc-servers.c, + irssi/src/silc/fe-common/silc/module-formats.[ch] + + * Use the same set of libtool files for the MPI lib as for the + rest of the toolkit. Affected files lib/silcmath/mpi/config.guess, + config.sub, configure.in, install-sh, missing, mkinstalldirs + +Sun Dec 28 21:57:39 EET 2003 Pekka Riikonen + + * Fixed server statistics decrementing error to not go to + negative. Affected file silcd/packet_receive.c. + +Sat Dec 20 14:42:36 EET 2003 Pekka Riikonen + + * Use silc_server_query_add_error to add error in public key + search error. Added support in send_reply to send errors + without specific argument. Affected file silcd/server_query.c. + + * Fixed the WHOIS, IDENTIFY and WHOWAS error handling in SILC + Client for NO_SUCH_NICK. It was against the protocol specs. + Affected file irssi/src/silc/core/client_ops.c. + + * Added backwards support for the wrong NO_SUCH_NICK error sending + in server. To be removed in SILC Server 1.0. Both old clients + and clients with fixed error handling now works. Affected file + silcd/server_query.c. + +Sat Dec 20 00:44:47 CET 2003 Patrik Weiskircher + + * fixed a bug in the whois using attributes function where no + error was sent if no nickname and client id but the attributes were + given to whois. Affected file silcd/server_query.c + +Tue Dec 16 21:34:59 CET 2003 Patrik Weiskircher + + * remove public key from public key hashtable on detach. Affected + file silcd/packet_receive.c + + * free public key hashtable before removing clients on server + shutdown. Affected file silcd/server.c + + * remove public key prior deleting client-data on killing a client. + Affected file silcd/server_util.c + +Sat Dec 06 21:35:14 CET 2003 Patrik Weiskircher + + * Getting the MOTD from other servers works now. Affected + files are silcd/command.c and silcd/command_reply.c + +Thu Dec 04 11:33:46 CET 2003 Jochen Eisinger + + * Initialize the variable idletag, since it is tested in + silc_core_deinit for its default value. Affected file + irssi/src/silc/core/silc-core.c + +Sun Nov 30 19:47:02 CET 2003 Patrik Weiskircher + + * Fixed signed channel messages across cells. Affected file + silcd/packet_send.c + +Fri Nov 28 19:13:21 EET 2003 Pekka Riikonen + + * Changed the SILC_LOG_* macros to not be empty if SILC_DEBUG + is not defined. They can now be safely used in if-statements + without braces. Affected file lib/silcutil/silclog.h. + + * Added the checks for backup closing connection due to error + (local or remote) and thus not allow the resuming to occur + in reconnect. Affected files are silcd/packet_send.c + and server.c. + +Tue Nov 25 15:20:59 EET 2003 Pekka Riikonen + + * Help file updates. Affected files in irssi/src/docs/help/in/. + +Wed Nov 23 20:51:21 CET 2003 Patrik Weiskircher + + * Fixed channel messages across cells. Affected file + silcd/packet_send.c + +Wed Nov 12 11:34:56 EET 2003 Pekka Riikonen + + * Fixed file transmission accepting in client library to not + start the negotiation if user hasn't accepted the transfer, + instead create new session for resent transfer. Affected + file lib/silcclient/client_ftp.c. + + * Show the session ID in the file transmision list. Remove + session from list that failed to transfer. Switch the current + session automatically after transmission, and in errors, to new + session if other sessions exists in the transfer list. Affected + files are irssi/src/silc/core/silc-servers.c, + irssi/src/fe-common/silc/modfule-formats.c. + +Mon Nov 10 14:41:40 CET 2003 Jochen Eisinger + + * Fixed MIME header parsing for the hopefully last time. Affected + file lib/silcutil/silcstrutil.c + +Mon Nov 10 13:03:46 EET 2003 Pekka Riikonen + + * Rewrote the PKCS#1 routines. Added lib/silccrypt/silcpkcs1.[ch]. + + * The SILC RNG is now gauranteed to return non-zero random + values. Affected files are lib/silccrypt/silcrng.[ch]. + +Sun Nov 9 20:44:56 EET 2003 Pekka Riikonen + + * Fixed nickname formatting when changing only case of the + nickname. Affected file lib/silcclient/idlist.c. + +Sun Nov 9 19:33:59 CET 2003 Jochen Eisinger + + * Fixed a memory leak and incorrect printing of the "appears as" + message. Affected file irssi/src/silc/core/client_ops.c + +Sun Nov 9 17:45:11 EET 2003 Pekka Riikonen + + * Added CRT (Chinese Remainder Theorem) supported RSA + private keys and private key operations. This significantly + increases private key operation efficiency. No compatibility + issues with new or old private keys. Affected files are + lib/silccrypt/rsa.[ch], rsa_internal.h and pkcs1.c. + +Sat Nov 8 13:08:53 EET 2003 Pekka Riikonen + + * Fixed GCC-3.3.2 related compilation warnings from the + source tree. + +Fri Nov 7 23:01:47 EET 2003 Pekka Riikonen + + * Removed RC6 from distributions. + +Fri Nov 7 19:38:42 EET 2003 Pekka Riikonen + + * Added some better comments to lib/silccrypt/silcpkcs.h, + optimized some routines in lib/silccrypt/silcpkcs.c. + Added test_silcpkcs into lib/silccrypt/tests/. + + * Fixed silc_rng_global_init to actually init the global RNG + if RNG wasn't provided for it. Affected file is + lib/silccrypt/silrng.c. + +Thu Nov 6 21:08:28 EET 2003 Pekka Riikonen + + * Added silc_hash_table_find_by_context_ext. Affected files + lib/silcutil/silchashtable.[ch]. + + * Save the public key on normal server in WHOIS command reply + from attributes, if present, and add it to public key hash + table. Fixes WHOIS resolving by public key on normal server. + + Optimized the attributes resolving on normal server to not + resolve if we resolved them already from router. + + Affected files are silcd/server_query.c, command_reply.c. + +Wed Nov 5 19:36:30 CET 2003 Patrik Weiskircher + + * Added support for whois using attributes. + Affected files silcd/command_reply.c, silcd/packet_receive.c, + silcd/server.c, silcd/server_internal.h, silcd/server_query.c, + silcd/server_util.c + + * Added support for whois using public key attribute to /WHOIS i + client command. Affected files irssi/docs/help/in/whois.in, + irssi/src/silc/core/silc-servers.c, lib/silcclient/command.c + +Wed Nov 5 23:37:36 EET 2003 Pekka Riikonen + + * Fixed UMODE setting in server when the client has anonymous + mode set. The mode setting was not working. Affected file + silcd/command.c. + +Mon Nov 2 11:36:08 CET 2003 Jochen Eisinger + + * Fixed some bugs and typos related to sending split messages. + Print notification when sending messages with /MMSG. Affected + files irssi/scripts/silc-mime.pl, irssi/src/silc/core/client_ops.c + +Fri Oct 31 12:33:59 EET 2003 Pekka Riikonen + + * Optimized the socket referencing in packet routines, client + library and server. Affected files are lib/silccore/silcpacket.c, + lib/silcclient/client.c and silcd/server.c. + + * If silc_socket_set_qos is given with NULL arguments the QoS is + reset from the socket. Affected files are + lib/silcutil/silcsockconn.[ch]. + +Thu Oct 30 21:23:24 CET 2003 Jochen Eisinger + + * Add a /LISTKEYS command which lists the locally cached + client and server keys. Affected files + irssi/src/fe-common/module-formats.[ch], + irssi/src/silc/core/silc-{channels,servers}.c + irssi/docs/help/in/listkeys.in + +Thu Oct 30 20:23:40 EET 2003 Pekka Riikonen + + * Check that packet queue purging was successful. Affected + files lib/silcclient/client.c and silcd/packet_send.c. Related + to MAC failed errors. + + * Do not clear the inbuf even if it is empty if QoS was applied + to it. Otherwise the QoS data is cleared and MAC failed error + will occur. Affected file lib/silccore/silcpacket.c. + + * Use the rekey period time as rekey protocol timeout value. + If the rekey does not succeed during the rekey period there's + something very wrong, and we most likely end up with wrong keys, + do graceful reconnect then. Affected file silcd/server.c. + + * Take reference of the socket in the parser context, as it's + possible to have the parsers in queue after the socket is + disconnected and this may cause crash. Affected files are + lib/silccore/silcpacket.c, lib/silcclient/client.c and + silcd/server.c. + +Thu Oct 30 17:01:01 EET 2003 Pekka Riikonen + + * Fixed KICK command reply sending, it sent to replies. + Affected file silcd/command.c. + +Wed Oct 30 14:06:52 CET 2003 Jochen Eisinger + + * Finish the silc-mime.pl script. It now supports MIME type + guessing using magic files, signing data messages, executing + MIME handlers in background. Affected files + irssi/scripts/silc-mime.pl and irssi/docs/help/in/mmsg.in + + * Changed MIME signal handler to make things easier for the perl + script. Affected files irssi/src/silc/core/client_ops.c, + silc-servers.c, and irssi/docs/signals.txt + + * Cleaned up the silc_mime_parse function and fixed detection + of wrapped header lines. Affected file lib/silcutil/silcstrutil.c + +Sun Oct 26 21:19:02 EET 2003 Pekka Riikonen + + * Resolve the IP for file transfer listener from the connection + socket. Affected file lib/silcclient/client_ftp.c. + + * Accept NULL hostname parameter in the functions + silc_net_check_[local|remote]_by_socket. Do not reverse lookup + if hostname is not wanted. + +Fri Oct 24 21:24:12 CEST 2003 Jochen Eisinger + + * Fixed race condition between silc_client_init and + my_silc_scheduler. Affected file irssi/src/silc/core/silc-core.c + +Fri Oct 24 16:43:40 EEST 2003 Pekka Riikonen + + * Fixed file transfer connection closing when SIGNOFF for + the client is received from server. Affected file is + lib/silcclient/client_ftp.c. + +Tue Oct 21 13:35:57 CEST 2003 Pekka Riikonen + + * Check for disconnected socket in QUIT callback. Affected + file silcd/command.c. + +Thu Oct 21 09:43:17 CEST 2003 Jochen Eisinger + + * Modified the MIME parsing to allow \n and \r\n as delimiters. + Affected files lib/silcutil/silcstrutil.c + + * Cleaned up the escape/unescape functions for correctness and + speed. Affected file irssi/src/silc/core/client_ops.c + + * Removed handling for data messages with Content-Type: text/*, + moved parsing of MIME headers to the signal handler, added + support for signing and verifying data messages. Affected + files are irssi/docs/signals.txt, irssi/src/silc/core/client_ops.c, + irssi/src/silc/core/silc-{servers,channels}.c + + * Added a perl script for handling data messages based on + information read from Mailcap files. New file + irssi/scripts/silc-mime.pl + +Mon Oct 20 16:08:22 EEST 2003 Pekka Riikonen + + * Added new SILC_MESSAGE_FLAG_ACK that can be used to + acknowledge recepetion of a message to the sender. Updated + protocol specs. + +Sat Oct 18 11:55:33 EEST 2003 Pekka Riikonen + + * Unregister channel key saving callback when deleting channel. + Affected file lib/silcclient/idlist.c. + + * Do not remove the client from channels in NOTIFY_TYPE_SIGNOFF + before calling notify client operation. Affected file is + lib/silcclient/client_notify.c. + + * Unregister QoS tasks when deleting the socket connection. + Affected files lib/silcutil/silcsockconn.[ch], + unix/silcunixsockconn.c. + + * Implemented latest presence-attrs draft changes. Affected + files lib/silccore/silcattrs.h and + irssi/src/silc/core/silc-queries.c. + Tue Oct 14 18:24:53 EEST 2003 Pekka Riikonen * Save old channel keys in list to allow more rapid change diff --git a/CREDITS b/CREDITS index 950df4ab..9d5c3464 100644 --- a/CREDITS +++ b/CREDITS @@ -33,9 +33,17 @@ S: Skinnarilankatu 28 E 2 S: 53850 Lappeenranta S: Finland +N: Jochen "c0ffee" Eisinger +E: jochen@penguin-breeder.org +W: http://penguin-breeder.org/ +D: maintainer of the SILC Client & SILC Plugin +D: several new subtle bugs disguised as fixes and patches +S: Haslacher Str. 45 +S: 79115 Freiburg +S: Germany + N: Giovanni Giacobbi E: giovanni@giacobbi.net -E: johnny@themnemonic.org P: 1024D/B2D79FC1 6247 640C 1C90 1EE4 D800 E4E2 2D58 3DF1 B2D7 9FC1 D: silcconfig, silclog, various patches around D: RPM packages @@ -44,7 +52,7 @@ S: Italy N: Pekka Riikonen E: priikone@silcnet.org -E: priikone@ssh.com +E: priikone@iki.fi P: 1024/A924ED4F AD 82 53 2D 84 FF C7 D1 FF 63 19 0E 1A 78 9F 8A A9 24 ED 4F D: Protocol architect D: Main developer @@ -69,15 +77,15 @@ D: Bughunting N: Lubomir Sedlacik E: salo@Xtrmntr.org +E: salo@NetBSD.org W: http://Xtrmntr.org -P: 1024/7E3B70E2 DB EC 8B EC 9A 90 EC EC 0F EF 71 6E 59 CE B7 0B 7E 3B 70 E2 -D: web pages +P: 1024/54BC7263 75 B2 2B 96 CD 75 03 85 1C 49 39 B8 8B 08 C3 0E 54 BC 72 63 D: configure.in bugfixes -D: NetBSD and Solaris packages +D: NetBSD packages D: project server administrator D: mirrors coordinator -S: 92101 Piestany -S: Slovakia +S: 15000 Prague +S: Czech Republic N: Timo Sirainen E: tss@iki.fi @@ -105,13 +113,21 @@ S: Arnyas ut 38-40/H S: 1121 Budapest S: Hungary +N: Patrik Weiskircher +E: pat@icore.at +P: 1024D/BF475975 3240 EE43 E979 C5B9 981F 12D5 EC14 B9CD BF47 5975 +D: patch for whois using attributes +S: Kandlgasse 17/3 +S: 1070 Vienna +S: Austria + N: Toni Willberg W: http://toniw.iki.fi/ E: toniw@iki.fi -D: bugzilla.silcnet.org admin -D: silc.peelo.com admin -D: Silc Admin development -D: Testing +D: silc.atbusiness.com admin +D: www.fi.silcnet.org admin +D: Hunting the client library bugs while developing Silky. +D: General whining. S: Helsinki S: Finland diff --git a/INSTALL b/INSTALL index 25b5ea04..a6c12c07 100644 --- a/INSTALL +++ b/INSTALL @@ -32,7 +32,7 @@ path in your system which contains lib/ and include/ for GMP library. GMP can be used as a fall-back if you have problems with the MPI library included within this package. -'--with-iconv[=DIR]' +`--with-iconv[=DIR]' If your system doesn't provide iconv() function in its native libraries (usually libc) or if this function is broken (e.g. older Solaris systems), diff --git a/Makefile.am.pre b/Makefile.ad similarity index 68% rename from Makefile.am.pre rename to Makefile.ad index 2c1eae37..1ffcbca2 100644 --- a/Makefile.am.pre +++ b/Makefile.ad @@ -1,9 +1,9 @@ # -# Makefile.am +# Makefile.ad # # Author: Pekka Riikonen # -# Copyright (C) 2000 - 2003 Pekka Riikonen +# Copyright (C) 2000 - 2005 Pekka Riikonen # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,49 +17,50 @@ AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign -COMMONDIRS = lib irssi silc silcd doc includes - -# Sub directories defined by "distributions" file, and can be overridden -# with ./configure, which substitutes these variables. -SUBDIRS = @SILC_DIST_SUBDIRS@ -DIST_SUBDIRS = @SILC_DIST_SUBDIRS@ - -include $(top_srcdir)/Makefile.defines.in - -dist-bzip: distdir - -chmod -R a+r $(distdir) - -tar chof $(distdir).tar $(distdir) - -bzip2 $(distdir).tar - -rm -rf $(distdir) - -SILC_EXTRA_DIST = SILC_DISTRIBUTION_EXTRA -EXTRA_DIST = libtoolfix CHANGES CREDITS $(SILC_EXTRA_DIST) - +SUBDIRS = \ +#ifdef SILC_DIST_APPS + apps \ +#endif SILC_DIST_APPS +#ifdef SILC_DIST_LIB + lib \ +#endif SILC_DIST_LIB +#ifdef SILC_DIST_CLIENT + irssi \ +#endif SILC_DIST_CLIENT +#ifdef SILC_DIST_SERVER + silcd \ +#endif SILC_DIST_SERVER +#ifdef SILC_DIST_TOOLKIT + silc \ + win32 \ +#endif SILC_DIST_TOOLKIT +#ifdef SILC_DIST_INCLUDES + includes \ +#endif SILC_DIST_INCLUDES +#ifdef SILC_DIST_DOC + doc +#endif SILC_DIST_DOC + +EXTRA_DIST = \ + silcdefs.h.in \ +#ifdef SILC_DIST_SILC +#ifdef SILC_DIST_TOOLKIT + README.CVS README.WIN32 README.MACOSX silcer tutorial \ +#endif SILC_DIST_TOOLKIT + libtoolfix \ + CHANGES CREDITS +#endif SILC_DIST_SILC + +#ifdef SILC_DIST_SILC # # Installing of SILC into the system # -etcdir = $(DESTDIR)$(silc_etcdir) -modulesdir = $(DESTDIR)$(silc_modulesdir) -helpdir = $(DESTDIR)$(silc_helpdir) -docdir = $(DESTDIR)$(silc_docdir) -logsdir = $(DESTDIR)$(silc_logsdir) -mandir = $(DESTDIR)@mandir@ - install-dirs: -mkdir -p $(etcdir) -mkdir -p $(modulesdir) -mkdir -p $(docdir) -install-dirs-client: install-dirs - -mkdir -p $(helpdir) - -mkdir -p $(mandir)/man1 - -install-dirs-server: install-dirs - -mkdir -p $(logsdir) - -mkdir -p $(mandir)/man5 - -mkdir -p $(mandir)/man8 - doc-install: -$(INSTALL_DATA) $(srcdir)/doc/CodingStyle $(docdir)/ -$(INSTALL_DATA) $(srcdir)/doc/FAQ $(docdir)/ @@ -71,12 +72,37 @@ doc-install: -$(INSTALL_DATA) $(srcdir)/INSTALL $(docdir)/ -$(INSTALL_DATA) $(srcdir)/TODO $(docdir)/ +#ifdef SILC_DIST_SIM +sim-install: + -$(INSTALL_DATA) $(srcdir)/lib/silcsim/*.so $(modulesdir)/ +#endif SILC_DIST_SIM + +#ifdef SILC_DIST_CLIENT +install-dirs-client: install-dirs + -mkdir -p $(helpdir) + -mkdir -p $(mandir)/man1 + doc-install-client: doc-install $(INSTALL_DATA) $(srcdir)/irssi/silc.conf $(docdir)/example_silc.conf -@if test -f $(srcdir)/doc/silc.1 ; then \ $(INSTALL_DATA) $(srcdir)/doc/silc.1 $(mandir)/man1; \ fi +etc-install-client: + -@if test '!' -d $(srcdir)/irssi ; then \ + if test '!' -f $(etcdir)/silc.conf ; then \ + $(INSTALL_DATA) $(srcdir)/irssi/silc.conf \ + $(etcdir)/silc.conf; \ + fi; \ + fi +#endif SILC_DIST_CLIENT + +#ifdef SILC_DIST_SERVER +install-dirs-server: install-dirs + -mkdir -p $(logsdir) + -mkdir -p $(mandir)/man5 + -mkdir -p $(mandir)/man8 + doc-install-server: doc-install -$(INSTALL_DATA) $(srcdir)/doc/example_silcd.conf $(docdir)/ -@if test -f $(srcdir)/doc/silcd.8 ; then \ @@ -86,14 +112,6 @@ doc-install-server: doc-install $(INSTALL_DATA) $(srcdir)/doc/silcd.conf.5 $(mandir)/man5; \ fi -etc-install-client: - -@if test '!' -d $(srcdir)/irssi ; then \ - if test '!' -f $(etcdir)/silc.conf ; then \ - $(INSTALL_DATA) $(srcdir)/irssi/silc.conf \ - $(etcdir)/silc.conf; \ - fi; \ - fi - etc-install-server: -@if test '!' -f $(etcdir)/silcd.conf ; then \ $(INSTALL_DATA) $(srcdir)/doc/example_silcd.conf \ @@ -103,15 +121,6 @@ etc-install-server: chmod go= $(etcdir)/silcd.conf; \ fi -sim-install: - -$(INSTALL_DATA) $(srcdir)/lib/silcsim/*.so $(modulesdir)/ - -toolkit-install: - -mkdir -p $(docdir)/toolkit/ - -$(INSTALL_DATA) $(srcdir)/doc/toolkit/* $(docdir)/toolkit - -$(INSTALL_DATA) $(srcdir)/lib/doc/*.gif $(docdir)/toolkit - -cp -R $(srcdir)/tutorial $(prefix) - examples-install: -mkdir -p $(docdir)/examples/ -$(INSTALL_DATA) $(srcdir)/doc/examples/README $(docdir)/examples/ @@ -121,13 +130,36 @@ generate-server-key: -@if test '!' -f $(etcdir)/silcd.pub ; then \ $(sbindir)/silcd -C $(etcdir); \ fi +#endif SILC_DIST_SERVER + +#ifdef SILC_DIST_TOOLKIT +toolkit-install: + -mkdir -p $(docdir)/toolkit/ + -$(INSTALL_DATA) $(srcdir)/doc/toolkit/* $(docdir)/toolkit + -$(INSTALL_DATA) $(srcdir)/lib/doc/*.gif $(docdir)/toolkit + -cp -R $(srcdir)/tutorial $(prefix) +#endif SILC_DIST_TOOLKIT + +install-data-hook: \ +#ifdef SILC_DIST_CLIENT + install-dirs-client \ + doc-install-client \ + etc-install-client \ +#endif SILC_DIST_CLIENT +#ifdef SILC_DIST_SERVER + install-dirs-server \ + doc-install-server \ + etc-install-server \ + examples-install \ + generate-server-key \ +#endif SILC_DIST_SERVER +#ifdef SILC_DIST_TOOLKIT + toolkit-install \ +#endif SILC_DIST_TOOLKIT +#ifdef SILC_DIST_SIM + sim-install +#endif SILC_DIST_SIM + +include $(top_srcdir)/Makefile.defines.in -if SILC_DIST_CLIENT -install-data-hook: install-dirs-client sim-install doc-install-client etc-install-client -else -if SILC_DIST_TOOLKIT -install-data-hook: install-dirs-client install-dirs-server sim-install doc-install-client doc-install-server toolkit-install examples-install etc-install-client etc-install-server -else -install-data-hook: install-dirs-server sim-install doc-install-server examples-install etc-install-server generate-server-key -endif -endif +#endif SILC_DIST_SILC diff --git a/Makefile.defines.pre b/Makefile.defines.in similarity index 78% rename from Makefile.defines.pre rename to Makefile.defines.in index 192ff0f5..926a3035 100644 --- a/Makefile.defines.pre +++ b/Makefile.defines.in @@ -43,19 +43,9 @@ # INCLUDES = $(ADD_INCLUDES) $(SILC_CFLAGS) -DHAVE_SILCDEFS_H \ -I$(srcdir) -I$(top_srcdir) \ - -I$(silc_top_srcdir) \ - -I$(silc_top_srcdir)/lib/silccore \ - -I$(silc_top_srcdir)/lib/silccrypt \ - -I$(silc_top_srcdir)/lib/silcmath \ - -I$(silc_top_srcdir)/lib/silcmath/mpi \ - -I$(silc_top_srcdir)/lib/silcske \ - -I$(silc_top_srcdir)/lib/silcsim \ - -I$(silc_top_srcdir)/lib/silcutil \ - -I$(silc_top_srcdir)/lib/silcsftp \ - -I$(silc_top_srcdir)/lib/silcclient \ - -I$(silc_top_srcdir)/lib/contrib \ - -I$(silc_top_srcdir)/includes \ - -I$(silc_top_srcdir)/doc + -I$(silc_top_srcdir) $(SILC_LIB_INCLUDES) \ + -I$(silc_top_srcdir)/includes \ + -I$(silc_top_srcdir)/doc # #includes-install: Makefile diff --git a/Makefile.defines_int.pre b/Makefile.defines_int.in similarity index 81% rename from Makefile.defines_int.pre rename to Makefile.defines_int.in index 4c7f4145..3f829471 100644 --- a/Makefile.defines_int.pre +++ b/Makefile.defines_int.in @@ -37,6 +37,11 @@ SILC_COMMON_LIBS= @LIBS@ -L$(silc_top_srcdir)/lib -lsilc # SILC_CFLAGS=@CFLAGS@ +# +# SILC Library includes +# +SILC_LIB_INCLUDES=@SILC_LIB_INCLUDES@ + # # Installation defines # @@ -45,3 +50,9 @@ silc_modulesdir=@MODULESDIR@ silc_helpdir=@HELPDIR@ silc_docdir=@DOCDIR@ silc_logsdir=@LOGSDIR@ +etcdir = $(DESTDIR)$(silc_etcdir) +modulesdir = $(DESTDIR)$(silc_modulesdir) +helpdir = $(DESTDIR)$(silc_helpdir) +docdir = $(DESTDIR)$(silc_docdir) +logsdir = $(DESTDIR)$(silc_logsdir) +mandir = $(DESTDIR)@mandir@ diff --git a/README.CVS b/README.CVS index e7568ead..4672367d 100644 --- a/README.CVS +++ b/README.CVS @@ -164,18 +164,20 @@ Following directories currently exist in SILC source tree. Howto Compile SILC Source Tree ============================== -After checkout from CVS the SILC source tree must be prepared for -configuration and compilation. To compile the source tree, give, +To be able to prepare the CVS tree for configuration and compilation +Autodist must be installed into the system. You can download the latest +version of Autodist from: - ./prepare + http://silcnet.org/software/download/autodist/ + +To prepare the CVS source tree for configuration and compilation, give: + + autodist ./configure --enable-debug make -The ./prepare script is included in to the source tree and it never -appears in public distribution. The script prepares the source tree -by creating configuration scripts and Makefiles. The prepare must be -run every time you make some changes to configuration scripts (however, -making changes to Makefile.am's does not require running ./prepare). +The autodist must be run every time you make some changes to configuration +scripts. As a developer you should read the ./configure script's help by giving ./configure --help and study all of its different options. Also, @@ -197,31 +199,31 @@ like "*server*,*rng*" to match all functions, and filenames that has can freely define regural expressions as debug string. -Howto Clean SILC Source Tree -============================ - -To entirely clear the source tree to the state after it was checked out -from CVS, give, - - ./prepare-clean - -This calls `make distclean' plus removes automatically generated files -by hand. It also removes *.log files. However, it will not remove -any other files you might have created. - - Makefiles and configuration files ================================= -Developers should never directly write a Makefile. All Makefiles are -always automatically generated by ./prepare and later by ./configure -scripts. Instead, developers must write Makefile.am files. There -are plenty of examples what they should look like. If you change -Makefile.am during development you don't have to run ./prepare, just -run normal make. - -Configuration files are the files that ./prepare automatically generates -and what will be included into public distribution. ./prepare creates -for example the ./configure script that is not commited to the CVS. -`configure.in' is the file that developers must edit to change ./configure -script. After changing one must run ./prepare. +Developers should never directly write a Makefile. All Makefiles are +always automatically generated by autodist and later by ./configure +scripts. Instead, developers must write Makefile.ad files or Makefile.am +files. If the Makefile needs to include any distdefs (SILC_DIST_XXX), +then Makefile.ad (.ad stands for autodist) must be written. If the +Makefile is generic (common to all distributions) then Makefile.am may be +written. Note that distdefs MUST NOT be used in Makefile.am files, as the +autodist will modify them. See the source tree for examples. If you +change Makefile.ad files, the autodist must be rerun. + +The autodist also creates the configure.ac script from which the autoconf +then creates the ./configure script. All changes to configure must +always be done into the configure.ad scripts. All changes made to +configure.ac will be lost. The autodist distdefs may also be used in +configure.ad files. It is also possible to write more than one +configure.ad in the source tree. All configure.ad fragments will be +collected from the source tree by autodist and combined into one +configure.ac scripts. After making changes to configure.ad files the +autodist must be rerun. + +The distdefs are defined in the corresponding distributions. All +distributions live in distdir/ directory. The distdefs can be used in any +file in the source tree, but mainly they are used in Makefile.ad, +configure.ad and source and headers files. See autodist documentation for +more information how to use distdefs. diff --git a/README.DIST b/README.DIST new file mode 100644 index 00000000..e5264ef8 --- /dev/null +++ b/README.DIST @@ -0,0 +1,112 @@ +How to create SILC distributions +================================ + +This document describes how to prepare SILC distributions in SILC source +tree and how to package distributions for releasing. This also defines +the procedure what one should do when distribution is created for +releasing. + + +The 'distributions' file +======================== + +The 'distributions' file descibres all distributions that can be created +from the SILC CVS source tree. You should read that file if you want to +learn how to create new distributions. The file already defines the main +distributions that can be created from the soure tree. These are the +'client', 'server' and 'toolkit' distributions. + + +Preparing distribution +====================== + +The SILC CVS source tree must be prepared before it can be configured, +compiled and packaged. The ./prepare script is used to prepare +distribution for configuration, compilation and packaging. To prepare a +specific distribution with specific version, give command: + + autodist + +Where the is the distribution name. It is one of the distributions +that was defined in distdir/ directory. The is the version of +the distribution that will be prepared. The version format is +major.minor.build, for example 0.9.10. Example: + + autodist client 0.9.15 + +This prepares 'client' distribution of version 0.9.15. The package will +have the version 0.9.15 automatically. + + +Configuring and compiling the distribution +========================================== + +When you prepare the distribution for releasing you should configure the +distribution without any specific configuration options, hence just give +the command: + + ./configure + +To compile the distribution, give command: + + make + +If you want you can clear the environment first with make clean command, +but this is not necessary. + + +Packaging the distribution +========================== + +After the distribution is prepared, configured and compiled it can be +packaged with the following commands: + + make -C doc dist-hook + makedist --bzip2 + +The 'makedist --bzip2' creates the default 'tar.gz' and 'tar.bz2' +distribution. + +NOTE: Before giving this command, make sure that you do not have any of +the tests in the SILC source tree compiled. If they are the binaries +will be included in the distribution which is not allowed. The tests are +always located in the tests/ directory, for example lib/silccore/tests/. +The tests are not compiled by default, but if you compiled them by +yourself make sure you make clean them before creating the distribution. + +NOTE: Same thing must be assured for silcer/ and tutorial/ sub +directories. Make sure they are not compiled and does not include any +extra files. If you haven't compiled them after the CVS checkout, they do +not include any extra files. + +NOTE for 'toolkit' distribution: Before giving make dist the following +must be done: + + go to util/robodoc/ + give ./configure;make to compile robodoc + go to doc/ + give make toolkit-ref-html + +This then creates the Toolkit reference manual. After this the toolkit +distribution can be packaged. + + +Before releasing the distribution +================================= + +Before releasing the distribution the created distribution must be tagged +in the CVS so that it can be checkout at a later time, if needed. The tag +format is as follows: + + silc__ + +Where is the distribution name and is the version of the +distribution in following format: major_minor_build, for example 0_9_10. +Example: + + silc_client_0_9_15 + +To tag the distribution go to the root of the SILC CVS source tree and +give, for example, command: + + cvs tag silc_client_0_9_15 diff --git a/TODO b/TODO index 416a3cf1..e1c30b32 100644 --- a/TODO +++ b/TODO @@ -1,31 +1,47 @@ -TODO for Irssi SILC Client 1.0 -============================== +TODO for SILC Client 1.0 branch +=============================== - o Testing - See test plan: - http://silcnet.org/docs/silc-client-1.0-test.pdf - http://silcnet.org/docs/silc-client-1.0-test.ps + o Bugs reported on the mailing list that will be fixed eventually. + The numbers are arbitrary and assigned by me (c0ffee), bugs in + parentheses are fixed. + + (#1 Ignore ALL doesn't ignore target using /me) + #2 specification of the silc network + (#3 expired private key dialogue doesn't work) + #4 silc client allows setting non-utf8 topics + #5 SILC-client displaying wrong totals with /names TODO for SILC Server 1.0 ======================== + o BUG: silc_idlist_del_client had been called but sock->user_data remained + and pointed to invalid pointer. Where it was called is not known. + + o Basic UTF-8 stringprep profile that makes sure UTF-8 strings are + as defined in spec-08 section 3.13. + + o Server sometimes connects more than once to router and keeps + connecting even though connection exists. + o Testing TODO/bugs In SILC Libraries =========================== - o Test cases for all cryptographic primitive in lib/silccrypt/ - o Test cases for all payload encoding and decoding routins in lib/silccore/ o Test cases for math library routines in lib/silcmath/ + o Implement new version of SFTP protocol (missing versions 4 and 5, we + have version 3). + TODO in Toolkit Documentation ============================= -Stuff that needs to be done in order to complete the Tooolkit Reference +Stuff that needs to be done in order to complete the Toolkit Reference Manual (Do these to 0.9.x). o Write "Programming with Toolkit" document, describing how to build diff --git a/acconfig.h.pre b/acconfig.h.pre deleted file mode 100644 index ca82e2c5..00000000 --- a/acconfig.h.pre +++ /dev/null @@ -1,82 +0,0 @@ -/* Name of the package. */ -#undef PACKAGE - -/* Version of the package. */ -#undef VERSION - -/* Default configuration file */ -#undef SILC_SERVER_CONFIG_FILE - -/* Multi-thread support */ -#undef SILC_THREADS - -/* These can be defined only on other than Win32 systems */ -#ifndef SILC_WIN32 - -/* Debugging */ -#undef SILC_DEBUG -#undef SILC_STACKTRACE - -/* Multi-thread support */ -#undef SILC_HAVE_PTHREAD - -/* IPv6 Support */ -#undef HAVE_IPV6 - -#endif /* SILC_WIN32 */ - -/* Default paths */ -#undef SILC_ETCDIR -#undef SILC_HELPDIR -#undef SILC_DOCDIR -#undef SILC_MODULESDIR -#undef SILC_LOGSDIR - -/* SIM (SILC Module) support */ -#undef SILC_SIM -#undef HAVE_RTLD_NOW -#undef HAVE_RTLD_LAZY - -/* MP library */ -#undef SILC_MP_GMP -#undef SILC_MP_NSS_MPI - -/* Redefs for SOCKS5 library */ -/* macros/curses checks */ -#undef HAS_CURSES -#undef USE_SUNOS_CURSES -#undef USE_BSD_CURSES -#undef USE_SYSV_CURSES -#undef USE_NCURSES -#undef NO_COLOR_CURSES -#undef SCO_FLAVOR - -#undef SOCKS -#undef SOCKS5 -#undef Rconnect -#undef Rgetsockname -#undef Rgetpeername -#undef Rbind -#undef Raccept -#undef Rlisten -#undef Rselect -#undef Rrecvfrom -#undef Rsendto -#undef Rrecv -#undef Rsend -#undef Rread -#undef Rwrite -#undef Rrresvport -#undef Rshutdown -#undef Rlisten -#undef Rclose -#undef Rdup -#undef Rdup2 -#undef Rfclose -#undef Rgethostbyname - -/* Native WIN32 compilation (-mno-cygwin GCC option) under cygwin, though - the code compiles with any native WIN32 compiler. */ -#undef SILC_WIN32 - -/* SILC distribution definitions (leave this at the end of file) */ diff --git a/apps/Makefile.ad b/apps/Makefile.ad new file mode 100644 index 00000000..0a01a55f --- /dev/null +++ b/apps/Makefile.ad @@ -0,0 +1,23 @@ +# +# Makefile.ad +# +# Author: Pekka Riikonen +# +# Copyright (C) 2005 Pekka Riikonen +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign + +SUBDIRS = \ +#ifdef SILC_DIST_AUTODIST + autodist +#endif SILC_DIST_AUTODIST diff --git a/apps/autodist/AUTHORS b/apps/autodist/AUTHORS new file mode 100644 index 00000000..99141c09 --- /dev/null +++ b/apps/autodist/AUTHORS @@ -0,0 +1,3 @@ +Authors of SILC Autodist. + +Pekka Riikonen diff --git a/apps/autodist/COPYING b/apps/autodist/COPYING new file mode 100644 index 00000000..53293212 --- /dev/null +++ b/apps/autodist/COPYING @@ -0,0 +1,25 @@ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/apps/autodist/INSTALL b/apps/autodist/INSTALL new file mode 100644 index 00000000..56b077d6 --- /dev/null +++ b/apps/autodist/INSTALL @@ -0,0 +1,236 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PREFIX', the package will +use PREFIX as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/apps/autodist/Makefile.am b/apps/autodist/Makefile.am new file mode 100644 index 00000000..c9d8c9ae --- /dev/null +++ b/apps/autodist/Makefile.am @@ -0,0 +1,49 @@ +# +# Makefile.am +# +# Author: Pekka Riikonen +# +# Copyright (C) 2005 Pekka Riikonen +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign + +SUBDIRS = . doc tests + +AUTODIST_SOURCE = autodist.in makedist.in +bin_SCRIPTS = autodist makedist + +autodistdir = @AUTODISTDIR@ +autodist_DATA = autodist.conf default COPYING + +CLEANFILES = $(bin_SCRIPTS) + +APIVERSION = @APIVERSION@ +# Install versioned links. +install-exec-hook: + @for i in $(bin_SCRIPTS); do \ + f="`echo $$i | sed '$(transform)'`"; \ + fv="$$f-$(APIVERSION)"; \ + rm -f $(DESTDIR)$(bindir)/$$fv; \ + chmod +x $(DESTDIR)$(bindir)/$$f; \ + chmod a-w $(DESTDIR)$(bindir)/$$f; \ + ln $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv; \ + done + +uninstall-hook: + @for i in $(bin_SCRIPTS); do \ + f="`echo $$i|sed '$(transform)'`"; \ + fv="$$f-$(APIVERSION)"; \ + rm -f $(DESTDIR)$(bindir)/$$fv; \ + done + +EXTRA_DIST = $(AUTODIST_SOURCE) default autodist.conf diff --git a/apps/autodist/README b/apps/autodist/README new file mode 100644 index 00000000..e9545994 --- /dev/null +++ b/apps/autodist/README @@ -0,0 +1,49 @@ +Autodist + +The Autodist is a source distribution management system that allows +powerful mechanisms to define what is included in and excluded from a +distribution, and what license the distribution is released under. It is +also used to create the actual distribution source packages. Autodist +allows distribution management in file, directory and file content level. +Different distributions may include different portions of files, for +example, excluding certain features from certain distributions. It is +always guaranteed that anything not defined for the distribution, is +removed automatically (files, file content, directories), thus ensuring +that nothing is accidentally included in the distribution. + +Autodist is closely related to the Autoconf and Automake tools, and +complements the features Autoconf and Automake provides. It is especially +targeted into circumstances where multiple distributions are created from +one source tree. The Autoconf and Automake environment is mainly designed +for one application per one source tree situations. Autodist provides +mechanisms to create all kinds of distributions that can be created from +one source tree. To be able to use Autodist, the Autoconf and Automake +must be installed into the system. + +The motivation behind Autodist stems from need to be able to create +multiple distributions from one large source tree in a precise and +controllable manner. The Autoconf and Automake provides mere basic +control what is included in and excluded from distributions and how the +distributions are created. They also do not provide mechanism to define +different licensing conditions for different distributions, or changing +the license automatically for different user or customer purposes. Many +large software projects, companies and corporations have commonly been +using Autoconf and Automake tools, but have had the need to create their +own ad-hoc mechanisms to control distribution creation. The Autodist +attempts to provide a tool that any size software project or company can +effectively use to manage their distributions. + +Autodist is not a binary packaging system. It is specificly used to +create source distributions. A binary packaging system, however can be +hooked to the distribution creation process, if needed. + +Read the INSTALL file on how to install the Autodist. Refer info pages +for Autodist documentation by giving 'info autodist'. Mail suggestions +and/or patches to autodist@silcnet.org, and bugs to +autodist-bugs@silcnet.org. Please, always include the Autodist version +number to your email. Give 'autodist --version' to get version. + +Autodist was originally written for the SILC Project (Secure Internet Live +Conferencing), which needed controlled mechanism to create several +distinct distributions from one source tree. + diff --git a/apps/autodist/autodist.conf b/apps/autodist/autodist.conf new file mode 100644 index 00000000..4748b0e3 --- /dev/null +++ b/apps/autodist/autodist.conf @@ -0,0 +1,49 @@ +# Autodist configuration file + +# By default distdef prefix is '_DIST_'. To add your own prefix set the +# prefix here. NOTE: Remember to change all 'define' directives in +# distributions to use the new prefix if you change it. Example: +# +# DISTPREFIX="SILC" +# +# Will set the distdef prefix as 'SILC_DIST_'. +# +DISTPREFIX="" + +# The distdef header will be created by the Autodist. It need to be included +# in the source code in order for the preprocessor to respect distdef +# conditionals in source code. Example: +# +# DISTDEFS="include/distdefs.h" +# +DISTDEFS="distdefs.h" + +# Location of the aclocal tool. If this is omitted the Autodist will not +# run aclocal. User need to run it manually then. +# +ACLOCAL="aclocal" + +# Location of the autoheader tool. If this is omitted the Autodist will not +# run autoheader. User need to run it manually then. +# +AUTOHEADER="autoheader" + +# Location of the autoconf tool. If this is omitted the Autodist will not +# run autoconf. User need to run it manually then. +# +AUTOCONF="autoconf" + +# Location of the automake tool. If this is omitted the Autodist will not +# run automake. User need to run it manually then. +# +AUTOMAKE="automake -a" + +# Location of the libtoolize tool. This option should be omitted if your +# source tree does not use libtool. +# +LIBTOOLIZE="libtoolize --automake --copy" + +# Location of the make program. This must be specified in order to be +# able to create distributions. +# +MAKE="make" diff --git a/apps/autodist/autodist.in b/apps/autodist/autodist.in new file mode 100755 index 00000000..27e6c222 --- /dev/null +++ b/apps/autodist/autodist.in @@ -0,0 +1,1600 @@ +#!/bin/sh +# +# Author: Pekka Riikonen +# +# Copyright (C) 2005 Pekka Riikonen +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +# NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +############################################################################### +# Global variables + +# Packaging and compressing +ad_gzip=true +ad_bzip2=false +ad_compress=false +ad_zip=false + +# Distribution subdirectory +distdir="distdir" +am_distdir= + +# This current distribution +distribution=default +distfile=$distribution +dist_version=0.0 +package= +bug_report= + +# All inherited distributions in this distribution +inherits= + +# All distribution defines for this distribution +distdefs= + +# All distribution undefines for this distribution +undistdefs= + +# All distribution options +options= +opt_template=false +opt_no_dist=false +opt_no_inherit=false + +# All includes +includes= + +# All excludes +excludes= + +# All noprocesses +noprocess= + +# All pre, post pre-dist and post-dist hooks +pre_hooks= +post_hooks= +pre_dist_hooks= +post_dist_hooks= + +# Distribution license and license header +license= +licenseh= + +# Whether to output ad_debug information +debug=false + +# Autodist version +ver=@VERSION@ + +############################################################################### +# Configuration file +if test -f "$distdir/autodist.conf"; then + . $distdir/autodist.conf +fi + +DP=$DISTPREFIX + + +############################################################################### +# Functions + +# +# Print out debug information if debugging is enabled. To enable debugging +# set the global variable "debug" to true value. +# +# Arguments: ad_debug +# +ad_debug() +{ + if test x$debug = xtrue; then + set -f + echo autodist: $1 + set +f + fi +} + +# +# Prints out error message and exits the script. +# +# Arguments: ad_fatal +# +ad_fatal() +{ + set -f + echo autodist: error: $1 + set +f + exit 1 +} + +# +# Prints out warning message +# +# Arguments: ad_warning +# +ad_warning() +{ + set -f + echo autodist: warning: $1 + set +f +} + +# +# Initializes the Autodist environment, creates default distribution +# directory, and default distribution. +# +# Arguments: ad_initialize +# +ad_initialize() +{ + ad_debug ">ad_initialize" + + # Create default distdir + if test '!' -f $distdir; then + mkdir -p $distdir + fi + + # Create Autodist configuration file + if test -f @AUTODISTDIR@/autodist.conf; then + cp -p @AUTODISTDIR@/autodist.conf $distdir + fi + + # Create default distribution + if test -f @AUTODISTDIR@/default; then + cp -p @AUTODISTDIR@/default $distdir + fi + + ad_debug "ad_create_distdefs_h" + + fname=$DISTDEFS + rm -f $fname + echo "/*" > $fname + echo " Automatically generated by Autodist $ver. Do not edit." >> $fname + echo >> $fname + echo " Generated: `date` by `whoami`" >> $fname + echo " Distribution: $distribution" >> $fname + echo " License: $license" >> $fname + echo "*/" >> $fname + echo >> $fname + echo "#ifndef _"$DP"_DISTDEFS_H" >> $fname + echo "#define _"$DP"_DISTDEFS_H" >> $fname + echo >> $fname + + for i in $distdefs + do + echo "#define $i 1" >>$fname + done + + echo >> $fname + echo "#endif /* _"$DP"_DISTDEFS_H */" >> $fname + + ad_debug "ad_make_configure" + local run_autoconf=false + + rm -f configure + + if test "$ACLOCAL"; then + ad_debug "Running aclocal" + $ACLOCAL 1>/dev/null 2>/dev/null + if test $? != 0; then + ad_fatal "aclocal failed" + fi + fi + + if test "$AUTOCONF"; then + ad_debug "Running autoconf" + $AUTOCONF + if test $? != 0; then + ad_fatal "autoconf failed" + fi + run_autoconf=true + fi + + if test "$AUTOHEADER"; then + ad_debug "Running autoheader" + $AUTOHEADER + if test $? != 0; then + ad_fatal "autoheader failed" + fi + fi + + if test "$LIBTOOLIZE"; then + ad_debug "Running libtoolize" + $LIBTOOLIZE + if test $? != 0; then + ad_fatal "libtoolize failed" + fi + fi + + if test x$run_autoconf = xtrue; then + if test '!' -f configure; then + ad_fatal "creating configure script failed" + fi + fi + + ad_debug " +# +ad_make_configure_ac() +{ + ad_debug ">ad_make_configure_ac: $1" + + if test '!' -f $1; then + ad_fatal "The configure file '$1' does not exist" + fi + + local check="`cat $1 | sed 's/^[ ]*//' | grep -v "^#" | grep -e "AD_INIT"`" + if test -z $check; then + rm -f configure.ad.cfs + rm -f $fname $fname.tmp + ad_fatal "The 'AD_INIT' macro has not been set in configure.ac" + fi + + rm -f configure.ac configure.ad.cfs + + cfs=`find . -name configure\*\.ad` + for i in $cfs + do + if test "x$i" = "x$1"; then + continue + fi + ad_debug "including $i" + cat $i >> configure.ad.cfs + done + + if test -f configure.ad.cfs; then + local check="`cat $1 | sed 's/^[ ]*//' | grep -v "^#" | grep -e "AD_INCLUDE_CONFIGURE"`" + if test -z $check; then + rm -f configure.ad.cfs + ad_warning "configure.ad fragments found but 'AD_INCLUDE_CONFIGURE' is not set" + fi + fi + + # Header for configure.ac + fname="configure.tmp.ac" + echo "# Automatically generated by Autodist $ver. Do not edit." > $fname + echo "# To make changes edit the $i file in the source tree." >> $fname + echo >> $fname + echo "# Source: $i" >> $fname + echo "# Generated: `date` by `whoami`" >> $fname + echo "# Distribution: $distribution" >> $fname + echo "# License: $license" >> $fname + echo >> $fname + + ad_debug "creating configure.ac" + if test -f configure.ad.cfs; then + sed '/AD_INCLUDE_CONFIGURE/ r configure.ad.cfs' $1 > $fname.tmp + sed -e "/AD_INCLUDE_CONFIGURE/s///" $fname.tmp >> $fname + rm -f configure.ad.cfs $fname.tmp + else + cat $1 >> $fname.tmp + fi + + # Process AD_INIT + sed -e "/AD_INIT/s//AC_INIT([$distribution], [$dist_version], [$bug_report], [$package])/" $fname > $fname.tmp + + # Process for distribution + rm -f $fname + ad_process_file $fname.tmp $fname + + # Remove any trailing backslashes + if test -f "$fname"; then + cat $fname | sed -e :a -e '/\\$/N; s/\\\n//; ta' > configure.ac + else + cp -p $fname.tmp configure.ac + fi + rm -f $fname $fname.tmp + + ad_debug "ad_make_makefile_ins" + + if test "$AUTOMAKE"; then + ad_debug "Running automake" + $AUTOMAKE + if test $? != 0; then + ad_fatal "automake failed" + fi + fi + + ad_debug "ad_make_makefile_ams" + + files=`find . -name Makefile\.ad` + for ff in $files + do + fname=`echo $ff | sed s/\.ad//` + + # Header for the Makefile.am + echo "# Automatically generated by Autodist $ver from Makefile.ad. Do not edit." > $fname.am + echo "# To make changes edit the $ff file in the source tree." >> $fname.am + echo >> $fname.am + echo "# Source: $ff" >> $fname.am + echo "# Generated: `date` by `whoami`" >> $fname.am + echo "# Distribution: $distribution" >> $fname.am + echo "# License: $license" >> $fname.am + echo >> $fname.am + + # Run the distribution processing for this Makefile.ad + ad_debug "Processing $ff to be $fname.am" + ad_process_file $ff $fname.tmp + + # Remove any trailing backslashes + if test -f "$fname.tmp"; then + cat $fname.tmp | sed -e :a -e '/\\$/N; s/\\\n//; ta' >> $fname.am + else + cat $ff >> $fname.am + fi + + rm -f $fname.tmp + done + + ad_debug "ad_process_ads" + + files=`find . -name \*\.ad \! -name configure\*\.ad \! -name Makefile\.ad` + for i in $files + do + fname=`echo $i | sed s/\.ad//` + + # Header + echo "# Automatically generated by Autodist $ver. Do not edit." > $fname + echo "# To make changes edit the $i file in the source tree." >> $fname + echo >> $fname + echo "# Source: $i" >> $fname + echo "# Generated: `date` by `whoami`" >> $fname + echo "# Distribution: $distribution" >> $fname + echo "# License: $license" >> $fname + echo >> $fname + + # Run the distribution processing for this file + ad_debug "Processing $i to be $fname" + ad_process_file $i $fname + done + + ad_debug " [] +# +# If only source path, which may be file, directory or regular expression, +# is specified the path will be same in distribution. If the destination +# path is specified that will be the new name and/or new location of the +# source path. This, in effect, is a cp utility with ability to create +# directories if they do not exist. +# +# Arguments: ad_dist_includes +# +ad_dist_includes() +{ + ad_debug ">ad_dist_includes: $1 $2" + + # By default do not expand pathnames + set -f + + # Add : separator at the end + local incs="`echo "$1" | sed 's/$/ : /'`" + + src= + dst= + for i in $incs + do + if test "$i" = ":" && test -z "$src"; then + continue + fi + if test -z "$src"; then + src=$i + continue + fi + if test -z "$dst" && test "$i" != ":"; then + dst=$i + else + dst=$src + fi + + ad_debug "Including $src into $dst" + + if test -f "$src"; then + # Add file + + if test "$src" = "$dst"; then + # Add to same location + d=`echo $src | sed 's,/[^/]*$,,'` + if test "$d" != "$src" && test "$d" != "." && \ + test '!' -d $am_distdir/$d; then + mkdir -p $am_distdir/$d || exit 1 + fi + else + # Add to different location + check=`echo "$dst" | sed 's/?//; s/*//; s/\[//; s/\]//'` + if test "$check" != "$dst"; then + ad_fatal "Invalid destination in 'include $src $dst'" + fi + + d=`echo $dst | sed 's,/[^/]*$,,'` + if test "$d" != "$dst" && test "$d" != "." && \ + test '!' -d $am_distdir/$d; then + mkdir -p $am_distdir/$d || exit 1 + fi + fi + + cp -p $src $am_distdir/$d || exit 1 + + elif test -d "$src"; then + # Add directory + + if test "$src" = "$dst"; then + # Add to same location + d=`echo $src | sed 's,/[^/]*$,,'` + ds=`echo $src | sed 's/\/$//'` + if test "$ds" = "$d"; then + d=`echo $d | sed 's,/[^/]*$,,'` + fi + if test '!' -d $am_distdir/$d && test "$ds" != "$d"; then + mkdir -p $am_distdir/$d || exit 1 + fi + + cp -pR $src $am_distdir/$d || exit 1 + else + # Add to different location + check=`echo "$dst" | sed 's/?//; s/*//; s/\[//; s/\]//'` + if test "$check" != "$dst"; then + ad_fatal "Invalid destination in 'include $src $dst'" + fi + + d=`echo $dst | sed 's,/[^/]*$,,'` + ds=`echo $dst | sed 's/\/$//'` + if test "$ds" = "$d"; then + d=`echo $d | sed 's,/[^/]*$,,'` + fi + if test '!' -d $am_distdir/$d && test "$dst" != "$d"; then + mkdir -p $am_distdir/$d || exit 1 + fi + + cp -pR $src $am_distdir/$dst || exit 1 + fi + + elif test x$2 != xtrue; then + # We assume regular expression in filename + check=`echo "$src" | sed 's/?//; s/*//; s/\[//; s/\]//'` + if test "$check" == "$src"; then + if test '!' -a $src; then + ad_fatal "Including $src: No such file or directory" + fi + src= + dst= + continue + fi + + # Recursively call this function with expanded pathnames. The + # reason why we don't let sh by default expand patnames is that + # the include's destination is optional. If sh expands by default + # we don't know the destination. For this reason, we handle the + # expansion here ourselves. + + # If src and dst are same, then expand the pathname as we'll copy + # matches to their own locations. + if test "$src" = "$dst"; then + # Expand pathnames, and format to our include format + set +f + srcs=`echo $src | sed -e 's/ / : /g' -e 's/^/ : /'` || exit 1 + set -f + else + # Destination is new, and it has to be a directory. + check=`echo "$dst" | sed 's/?//; s/*//; s/\[//; s/\]//'` + if test "$check" != "$dst"; then + ad_fatal "Invalid destination in 'include $src $dst'" + fi + + # Make sure dst has / at the end, as this must be a directory + dst=`echo $dst | sed 's/\/$//; s/$/\//'` + + # Escape dst for sed + dste=`echo $dst | sed 's/\\//\\\\\//g'` || exit 1 + + # Expand pathnames, and format to our include format + set +f + srcs=`echo $src | sed -e "s/ / $dste : /g" \ + -e 's/^/ : /' -e "s/$/ $dste/"` || exit 1 + set -f + fi + + # Include recursively + ad_dist_includes "$srcs" true + + elif test '!' -a $src; then + ad_fatal "Including $src: No such file or directory" + fi + + src= + dst= + done + + set +f + + ad_debug " +# +# The path may be file, directory or regular expression. +# +# Arguments: ad_dist_includes +# +ad_dist_excludes() +{ + ad_debug ">ad_dist_excludes: $1" + + for i in $1 + do + ad_debug "Excluding $i" + rm -rf $am_distdir/$i + done + + ad_debug " +# +ad_process_tree() +{ + ad_debug ">ad_process_tree: $1" + + # We take all files, other than *.ad, including source files, in case + # they use the non-C-compiler-friendly format of distdefs, which is + # possible. + + files=`find $am_distdir \! -name \*\.ad` + files=`echo $files | sed 's/$am_distdir//'` + + # Take away noprocess list + if test -f autodist.noprocess; then + files=`echo $files | sh autodist.noprocess` || exit 1 + fi + + for ff in $files + do + ad_process_file $ff $ff.tmp + if test -f $ff.tmp; then + rm -f $ff || exit 1 + mv -f $ff.tmp $ff || exit 1 + fi + done + + ad_debug " +# +ad_process_source_tree() +{ + ad_debug ">ad_process_source_tree: $1" + + # We take only C/C++ files since they use the C compiler friendly + # version of distdefs. Other files are not assumed to use them. + files=`find $am_distdir \! -name \*\.ad \( \ + -name \*\.[cC] -o \ + -name \*\.[cC][cCpP] -o \ + -name \*\.[cC][xX][xX] -o \ + -name \*\.[cC][pP][pP] -o \ + -name \*\.[cC]++ -o \ + -name \*\.m -o \ + -name \*\.[hH] -o \ + -name \*\.hh \)` + + # Take away noprocess list + if test -f autodist.noprocess; then + files=`echo $files | sh autodist.noprocess` || exit 1 + fi + + for ff in $files + do + ad_process_source_file $ff $ff.tmp + if test -f $ff.tmp; then + rm -f $ff || exit 1 + mv -f $ff.tmp $ff || exit 1 + fi + done + + ad_debug "ad_makedist_makesane:" + + # DO NOT change these order unless you know what you are doing. + if test -f $am_distdir/configure.ac; then + touch $am_distdir/configure.ac + fi + + if test -f $am_distdir/aclocal.m4; then + touch $am_distdir/aclocal.m4 + fi + + if test '!' -f Makefile; then + ad_fatal "Makefile: No such file or directory" + fi + + configh=`grep "^CONFIG_HEADER" Makefile | cut -d= -f2 | sed 's/^[ \t]//'` + touch $am_distdir/$configh.in 1>/dev/null 2>/dev/null + + files=`find $am_distdir -name Makefile\.in` + for i in $files + do + touch $i + done + + if test -f $am_distdir/configure; then + touch $am_distdir/configure + fi + + if test -f $am_distdir/config.status; then + touch $am_distdir/config.status + fi + + ad_debug "ad_makedist" + + if test '!' -f autodist.dist; then + ad_fatal "Autodist has not been run yet to prepare source tree" + fi + + if test -z $MAKE; then + ad_fatal "The MAKE variable is not set in autodist.conf" + fi + + # Get distdir from Makefile + if test '!' -f Makefile; then + ad_fatal "The source tree is not configured, run ./configure first" + fi + + # Parse the requested distribution + distribution=`cat autodist.dist | grep "dist:" | cut -d: -f2` + dist_version=`cat autodist.dist | grep "ver:" | cut -d: -f2` + ad_parse_distribution $distribution false + ad_process_distdefs + am_distdir="$package-$dist_version" + + if test x$opt_no_dist = xtrue; then + ad_fatal "The '$distribution' distribution cannot be packaged" + fi + + # Create distribution directory + ad_debug "Creating distribution directory $am_distdir" + $MAKE distdir || exit 1 + chmod -R a+r $am_distdir + + if test '!' -d $am_distdir; then + ad_fatal "Distribution directory $am_distdir not created" + fi + + # Run pre-dist-hooks + ad_run_dist_hooks "$pre_dist_hooks" + + # Run excludes + ad_dist_excludes "$excludes" + + # Run includes + ad_dist_includes "$includes" + + # Include specific license file if specified + if test "$license" != ""; then + cp -p $license $am_distdir/COPYING || exit 1 + fi + + # Process noprocesses + ad_process_noprocess + + # Process source files + ad_debug "Process distribution source tree" + ad_process_source_tree $am_distdir + + # Process non-source files + ad_debug "Process distribution tree" + ad_process_tree $am_distdir + + # Run post-dist-hooks + ad_run_dist_hooks "$post_dist_hooks" + + # Make distribution sane + ad_makedist_makesane + + # Package + ad_debug "Packaging distribution" + tar chof $am_distdir.tar $am_distdir || exit 1 + + # Compress + ad_debug "Compressing distribution package" + if test x$ad_gzip = xtrue; then + gzip -9 -c $am_distdir.tar > $am_distdir.tar.gz || exit 1 + fi + if test x$ad_bzip2 = xtrue; then + bzip2 -9 -c $am_distdir.tar > $am_distdir.tar.bz2 || exit 1 + fi + if test x$ad_compress = xtrue; then + compress -c $am_distdir.tar > $am_distdir.tar.Z || exit 1 + fi + if test x$ad_zip = xtrue; then + rm -f $am_distdir.zip + zip -rq $am_distdir.zip $am_distdir || exit 1 + fi + rm -f $am_distdir.tar + + # Cleanup + rm -rf $am_distdir + rm -f autodist.noprocess + + ad_debug " +# +# Following options are supported: +# +# template +# no-dist +# no-inherit +# +# Arguments: ad_handle_options +# +ad_handle_options() +{ + ad_debug ">ad_handle_options: $1" + + for i in $1 + do + if test "$i" = "template"; then + opt_template=true + continue + elif test "$i" = "no-dist"; then + opt_no_dist=true + continue + elif test "$i" = "no-inherit"; then + opt_no_inherit=true + continue + fi + done + + ad_debug "ad_clear_options" + opt_template=false + opt_no_dist=false + opt_no_inherit=false + ad_debug " +# +ad_parse_distribution() +{ + ad_debug ">ad_parse_distribution: $1 $2" + + if test '!' -f $distdir/$1; then + ad_fatal "Distribution '$1' is not declared" + fi + + # Get inherited + local inhs=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "inherit " | cut -d' ' -f2 | sort | uniq` + + # Get distdefs + local defs=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "define " | cut -d' ' -f2 | sort | uniq` + + if test "$inhs" = "" && test "$defs" = ""; then + ad_fatal "Distribution '$1' does not define anything" + fi + + # Get undefined distdefs + local undefs=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "undef " | cut -d' ' -f2 | sort | uniq` + + # Get includes + local incs=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "include " | sed 's/include / : /'` + + # Get excludes + local excs=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "exclude " | cut -d' ' -f2- | sort | uniq` + + # Get noprocesses + local nops=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "noprocess " | cut -d' ' -f2- | sort | uniq` + + # Get options + local opts=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "option " | cut -d' ' -f2- | sort | uniq` + + # Check options + ad_handle_options "$opts" + if test x$2 = xtrue && test x$opt_no_inherit = xtrue; then + ad_fatal "Distribution '$1' cannot be inherited" + fi + if test x$2 = xfalse && test x$opt_template = xtrue; then + ad_fatal "Template distribution '$1' cannot be prepared or packaged" + fi + + ad_debug "inherits=$inhs" + ad_debug "distdefs=$defs" + ad_debug "includes=$incs" + ad_debug "excludes=$excs" + ad_debug "noprocess=$nops" + ad_debug "undistdefs=$undefs" + ad_debug "options=$opts" + + # Expand distdefs from inherited distributions + for i in $inhs + do + if test x$1 = x$i; then + ad_fatal "Infinite recursion detected. Fix the '$distdir/$1' \ + distribution to not have 'inherit $i' declared." + fi + + if test '!' -f $distdir/$i; then + ad_fatal "Distribution '$i' is not declared (inherited from '$1')" + fi + + ad_parse_distribution $i true + ad_clear_options + done + + # Get license + license=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "license " | cut -d' ' -f2` + licenseh=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "license-header " | sed 's/license-header / : /'` + + ad_debug "license=$license" + ad_debug "licenseh=$licenseh" + + if test x$2 = xfalse; then + # Get distribution name + local dname=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "name " | cut -d' ' -f2-` + + if test "$dname"; then + distribution=$dname + fi + + # Get distribution package name (optional) + local dpname=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "package " | cut -d' ' -f2` + + if test "$dpname"; then + package=$dpname + else + package=$distribution + fi + + # Get Bug-report email address (optional) + local bugr=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "bug-report " | cut -d' ' -f2-` + + if test "$bugr"; then + bug_report=$bugr + fi + + ad_debug "distribution=$distribution" + ad_debug "package=$package" + ad_debug "bug-report=$bug_report" + + # Get hooks (optional) + local prh=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "pre-hook " | cut -d' ' -f2-` + local poh=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "post-hook " | cut -d' ' -f2-` + local prdh=`cat $distdir/$1 | sed 's/^[ ]*//' | grep -v "^#" \ + | grep "pre-dist-hook " | sed 's/^[ ]*//' | cut -d' ' -f2-` + local podh=`cat $distdir/$1 | grep -v "^#" \ + | grep "post-dist-hook " | sed 's/^[ ]*//' | cut -d' ' -f2-` + + pre_hooks="$pre_hooks $prh" + post_hooks="$post_hooks $poh" + pre_dist_hooks="$pre_dist_hooks $prdh" + post_dist_hooks="$post_dist_hooks $podh" + options="$options $opts" + + ad_handle_options "$options" + ad_debug "options=$options" + fi + + # Return to caller + inherits="$inherits $inhs" + distdefs="$distdefs $defs" + includes="$includes $incs" + excludes="$excludes $excs" + noprocess="$noprocess $nops" + undistdefs="$undistdefs $undefs" + + ad_debug "ad_process_distdefs" + + # Remove all undefined distribution defines + for i in $undistdefs + do + ad_debug "undefining $i distdef" + distdefs=`echo $distdefs | sed s/$i//` + done + + rm -f autodist.tmp.defs autodist.pre.hooks autodist.post.hooks + rm -f autodist.pre.dist.hooks autodist.post.dist.hooks + + # Remove duplicate distdefs + for i in $distdefs + do + echo $i >>autodist.tmp.defs + done + distdefs=`cat autodist.tmp.defs | sort | uniq` + distdefs=`echo $distdefs` + rm -f autodist.tmp.defs + + ad_debug "distdefs=$distdefs" + + ad_debug " +# +ad_process_license_header() +{ + ad_debug ">ad_process_license_header" + + # Add : separator at the end + lics=`echo "$licenseh" | sed 's/$/ : /'` + + src= + dst= + for i in $lics + do + if test "$i" = ":" && test -z "$src"; then + continue + fi + if test -z "$src"; then + src=$i + continue + fi + if test -z "$dst" && test "$i" != ":"; then + dst=$i + else + ad_fatal "Missing argument in 'license-header $src'" + fi + + ad_debug "Replacing $src license with $dst license" + + if test '!' -f $src; then + ad_fatal "License header $src: No such file or directory" + fi + + if test '!' -f $dst; then + ad_fatal "License header $dst: No such file or directory" + fi + + # Awk script to replace the license header + fl=`sed q $src | sed 's/\\//\\\\\//g' > autodist.lsrc` || exit 1 + ll=`sed -n '$p' $src | sed 's/\\//\\\\\//g' > autodist.ldst` || exit 1 + echo "/`cat autodist.lsrc`/,/`cat autodist.ldst`/ { FILE1=\"$src\"; FILE2=\"$dst\"; getline F1 < FILE1; getline F2 < FILE2; if (F1) sub(F1, F2); else { F1=\"\$\"; sub(F1, F2); } }" >> $1 + rm -f autodist.lsrc autodist.ldst + + src= + dst= + done + + ad_debug "ad_process_noprocess" + local np=false + + local n="sed " + + for i in $noprocess + do + # Escape + ie=`echo $i | sed 's/\\//\\\\\//g'` || exit 1 + + n="$n -e 's/$am_distdir\\/$ie//'" + np=true + done + + rm -f autodist.noprocess + if test x$np = xtrue; then + echo $n > autodist.noprocess || exit 1 + fi + + ad_debug " +# +ad_process_file() +{ + local found=false + + # Process only regular files + if test '!' -f $1; then + return + fi + + ad_debug ">ad_process_file: $1 $2" + + local f="autodist.tmp.script" + rm -f $f + + # If license header is provided, replace the license header in the file. + ad_process_license_header $f + + ad_debug "Getting #ifdef's and #ifndef's" + + # Get defined distribution defines + local defs=`awk "/^#ifdef "$DP"_DIST_|^#else "$DP"_DIST_/ { print; }" \ + $1 |cut -d'*' -f2 |cut -d' ' -f2 | sort | uniq` + + # Get explicitly not-defined distribution defines + local ndefs=`awk "/^#ifndef "$DP"_DIST_|^#else !"$DP"_DIST_/ { print; }" \ + $1 |cut -d'*' -f2 |cut -d' ' -f2 | cut -d'!' -f2 | sort | uniq` + + ad_debug "defs=$defs" + ad_debug "ndefs=$ndefs" + + # Create the script to include and exclude stuff in the file according + # to the distribution defines + + # ifdefs + ad_debug "processing ifdefs" + for d in $defs + do + found=false + for i in $distdefs + do + if test x$d = x$i; then + found=true + break + fi + done + + # If distribution define was not found exclude those lines from the file. + # This also handles the #ifdef's #else (ie. #ifndef) branch. + if test x$found = xfalse; then + ad_debug "ifdef $d will be excluded (it is NOT defined)" + echo "/^#ifdef $d/,/^#else !$d|^#endif $d/ { next; }" >> $f + else + echo "/^#else !$d/,/^#endif $d/ { next; }" >> $f + fi + done + + # ifndefs + ad_debug "processing ifndefs" + for d in $ndefs + do + found=false + for i in $distdefs + do + if test x$d = x$i; then + found=true + break + fi + done + + # If distribution define was found exclude those lines from the file. + # This also handles the #ifndef's #else (ie. #ifdef) branch. + if test x$found = xtrue; then + ad_debug "ifndef $d will be excluded (it IS defined)" + echo "/^#ifndef $d/,/^#else $d|^#endif $d/ { next; }" >> $f + else + echo "/^#else $d/,/^#endif $d/ { next; }" >> $f + fi + done + + # Now process the file with the script + if test -f $f; then + + # Those distdef lines that remain in the file are removed to make + # the appearance prettier + echo "/^#ifdef "$DP"_DIST_|^#endif "$DP"_DIST_|^#else "$DP"_DIST_|^#else !"$DP"_DIST_|^#ifndef "$DP"_DIST_/ { next; }" >> $f + echo "{ print; }" >> $f + + # Execute the script + cp -p $1 $2 || exit 1 + awk -f $f $1 > $2 || exit 1 + fi + + rm -f $f + + ad_debug " +# +ad_process_source_file() +{ + local found=false + + # Process only regular files + if test '!' -f $1; then + return + fi + + ad_debug ">ad_process_source_file: $1 $2" + + local f="autodist.tmp.script" + rm -f $f + + # If license header is provided, replace the license header in the file. + ad_process_license_header $f + + ad_debug "Getting #ifdef's and #ifndef's" + + # Get defined distribution defines + local defs=`awk '/^#ifdef SILC_DIST_|^#else \/\* SILC_DIST_/ { print; }' \ + $1 |cut -d'*' -f2 |cut -d' ' -f2 | sort | uniq` + + # Get explicitly not-defined distribution defines + local ndefs=`awk '/^#ifndef SILC_DIST_|^#else \/\* \!SILC_DIST_/ { print; }' \ + $1 |cut -d'*' -f2 |cut -d' ' -f2 | cut -d'!' -f2 | sort | uniq` + + ad_debug "defs=$defs ndefs=$ndefs" + + # Create the script to include and exclude stuff in the file according + # to the distribution defines + + # ifdefs + ad_debug "processing ifdefs" + for d in $defs + do + found=false + for i in $distdefs + do + if test x$d = x$i; then + found=true + break + fi + done + + # If distribution define was not found exclude those lines from the file. + # This also handles the #ifdef's #else (ie. #ifndef) branch. + if test x$found = xfalse; then + ad_debug "ifdef $d will be excluded (it is NOT defined)" + echo "/^#ifdef $d/,/^#else \/\* \!$d|^#endif \/\* $d/ { next; }" >> $f + else + echo "/^#else \/\* \!$d/,/^#endif \/\* $d/ { next; }" >> $f + fi + done + + # ifndefs + ad_debug "processing ifndefs" + for d in $ndefs + do + found=false + for i in $distdefs + do + if test x$d = x$i; then + found=true + break + fi + done + + # If distribution define was found exclude those lines from the file. + # This also handles the #ifndef's #else (ie. #ifdef) branch. + if test x$found = xtrue; then + ad_debug "ifndef $d will be excluded (it IS defined)" + echo "/^#ifndef $d/,/^#else \/\* $d|^#endif \/\* $d/ { next; }" >> $f + else + echo "/^#else \/\* $d/,/^#endif \/\* $d/ { next; }" >> $f + fi + done + + # Now process the file with the script + if test -f $f; then + + # Those distdef lines that remain in the file are removed to make + # the appearance prettier + echo "/^#ifdef SILC_DIST_|^#endif \/\* SILC_DIST_|^#else \/\* SILC_DIST_|^#else \/\* \!SILC_DIST_|^#ifndef SILC_DIST_/ { next; }" >> $f + echo "{ print; }" >> $f + + # Execute the script + cp -p $1 $2 || exit 1 + awk -f $f $1 > $2 || exit 1 + fi + + rm -f $f + + ad_debug " +# +ad_run_hooks() +{ + ad_debug ">ad_run_hooks: $1" + + for i in $1 + do + if test '!' -f $i; then + ad_fatal "Hook script $i does not exist" + fi + sh $i $distribution $dist_version $package || exit 1 + done + + ad_debug " +# +ad_run_dist_hooks() +{ + ad_debug ">ad_run_dist_hooks: $1" + + for i in $1 + do + if test '!' -f $i; then + ad_fatal "Dist hook script $i does not exist" + fi + sh $i $distribution $dist_version $package $am_distdir || exit 1 + done + + ad_debug "&2; exit 1; } + distdir="${1}"; + shift;; + + --list) + exit 0;; + + -s | --distdefs) + shift; + if test $# -eq 0; then + ad_parse_distribution $distribution false + echo "Distribution: ${distribution}" 1>&2; + else + ad_parse_distribution $1 false + echo "Distribution: ${1}" 1>&2; + fi + ad_process_distdefs + echo "Distdefs:" 1>&2; + echo "${distdefs}"; + exit 0;; + + -i | --init) + ad_initialize; + exit 0;; + + -m | --makedist) + ad_makedist + exit 0;; + + --gzip) + ad_gzip=true + shift;; + + --bzip2) + ad_bzip2=true + shift;; + + --compress) + ad_compress=true + shift;; + + --zip) + ad_zip=true + shift;; + + -v | --verbose) + debug=true + shift;; + + -h | --help | --h*) + echo "${usage}" 1>&2; + echo 1>&2; + echo "${help}" 1>&2; + echo 1>&2; + exit 0;; + + -V | --version) + echo "@PACKAGE@ (@PACKAGE_NAME@) $ver" 1>&2; + echo "Written by Pekka Riikonen" 1>&2; + echo 1>&2; + echo "Copyright (C) 2004 - 2005 SILC Project" 1>&2; + echo "\ +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. " 1>&2; + exit 0;; + + --) + shift; + break;; + + -*) + echo "${usage}" 1>&2; + exit 1;; + + *) + break;; + + esac +done + +# +# Parse the requested distribution +# +if test $# != 0; then + distribution="${1}"; + distfile=$distribution + shift +fi +ad_parse_distribution $distribution false +ad_process_distdefs + +if test $# != 0; then + dist_version="${1}"; +fi + +ad_debug "Preparing source tree for configuration and compilation..." +ad_debug "Preparing $distribution distribution version $dist_version" + +# +# Create the distribution defines header file +# +if test "$DISTDEFS"; then + ad_create_distdefs_h +else + ad_fatal "DISTDEFS not defined in $distdir/autodist.conf" +fi + +# +# Run pre-hooks +# +ad_run_hooks "$pre_hooks" + +# +# Generate the Makefile.am files from Makefile.ad files +# +ad_make_makefile_ams + +# +# Generate the configure.ac from configure.ad file(s) +# +ad_make_configure_ac ./configure.ad + +# +# Generate configure script +# +ad_make_configure + +# +# Generate Makefile.in files +# +ad_make_makefile_ins + +# +# Process all files with .ad suffix for distribution processing +# +ad_process_ads + +# +# Create autodist.dist +# +ad_debug "Creating autodist.dist" +echo "dist:$distfile" > autodist.dist +echo "ver:$dist_version" >> autodist.dist +echo "$package-$dist_version" >> autodist.dist + +# +# Run post-hooks +# +ad_run_hooks "$post_hooks" + +ad_debug "Done, now run ./configure and make." +exit 0 diff --git a/apps/autodist/configure.ad b/apps/autodist/configure.ad new file mode 100644 index 00000000..806ac54f --- /dev/null +++ b/apps/autodist/configure.ad @@ -0,0 +1,52 @@ +#ifdef SILC_DIST_AUTODIST +# +# apps/autodist/configure.ad +# +# Author: Pekka Riikonen +# +# Copyright (C) 2005 Pekka Riikonen +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +# The APIVERSION is appended to the filename, to give versioned name. +# The base version (X.Y) is taken. +APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'` +AC_SUBST(APIVERSION) + +old_exec_prefix=$exec_prefix +old_prefix=$prefix +exec_prefix=$silc_prefix +prefix=$silc_prefix + +# Path to the autodist in installed environment +s_bindir=`eval echo $bindir`;s_bindir=`eval echo $s_bindir` +AUTODIST=$s_bindir/autodist +AC_SUBST(AUTODIST) + +# Path to the Autodist data +s_datadir=`eval echo $datadir`;s_bindir=`eval echo $s_datadir` +AUTODISTDIR=$s_datadir/autodist +AC_SUBST(AUTODISTDIR) + +exec_prefix=$old_exec_prefix +prefix=$old_prefix + +# +# Makefile outputs +# +AC_CONFIG_FILES( +apps/autodist/Makefile +apps/autodist/autodist +apps/autodist/makedist +apps/autodist/doc/Makefile +apps/autodist/tests/Makefile +) +#endif SILC_DIST_AUTODIST diff --git a/apps/autodist/default b/apps/autodist/default new file mode 100644 index 00000000..84cea7ca --- /dev/null +++ b/apps/autodist/default @@ -0,0 +1,10 @@ +# Default distribution +# +# NOTE: By default, this distribution cannot be packaged. Take away the +# 'no-dist option if you whish to use this as a normal distribution. +# +# If you add new distributions into distdir/ you may want to inherit them +# here. +# +option no-dist +define _DIST_DEFAULT diff --git a/apps/autodist/doc/Makefile.am b/apps/autodist/doc/Makefile.am new file mode 100644 index 00000000..2ffb4b0c --- /dev/null +++ b/apps/autodist/doc/Makefile.am @@ -0,0 +1,19 @@ +# +# Makefile.am +# +# Author: Pekka Riikonen +# +# Copyright (C) 2005 Pekka Riikonen +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +info_TEXINFOS = autodist.texi +autodist_TEXINFOS = fdl.texi diff --git a/apps/autodist/doc/autodist.texi b/apps/autodist/doc/autodist.texi new file mode 100644 index 00000000..870cc91f --- /dev/null +++ b/apps/autodist/doc/autodist.texi @@ -0,0 +1,1603 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename autodist.info +@settitle autodist +@setchapternewpage off +@c %**end of header + +@include version.texi + +@copying + +This manual is for SILC Autodist (version @value{VERSION}, +@value{UPDATED}), a program which is used to manage and create source +distributions. + +Copyright @copyright{} 2004 - 2005 Pekka Riikonen, SILC Project + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the @acronym{GNU} Free Documentation License, +Version 1.2 or any later version published by the Free Software +Foundation; with no Invariant Sections, with the Front-Cover texts +being ``A @acronym{GNU} Manual,'' and with the Back-Cover Texts as in +(a) below. A copy of the license is included in the section entitled +``@acronym{GNU} Free Documentation License.'' + +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and +modify this @acronym{GNU} Manual, like @acronym{GNU} software. Copies +published by the Free Software Foundation raise funds for +@acronym{GNU} development.'' +@end quotation +@end copying + +@dircategory Software development +@direntry +* autodist: (autodist). Managing and creating source distributions. +@end direntry + +@dircategory Individual utilities +@direntry +* makedist: (autodist)Invoking makedist. Creating distribution +@end direntry + +@titlepage +@title SILC Autodist +@subtitle For version @value{VERSION}, @value{UPDATED} +@author Pekka Riikonen +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@ifnottex +@node Top +@comment node-name, next, previous, up +@top SILC Autodist + +@insertcopying + +@menu +* Introduction:: Purpose of Autodist +* Integrating Autodist:: Integrating Autodist into your project +* Invoking Autodist:: Running Autodist +* Examples:: Examples using Autodist + +@detailmenu + --- The Detailed Node Listing --- + +Introduction + +* Motivation:: Reasons for using Autodist + +Integrating Autodist + +* Creating distdir:: Creating distributions directory +* autodist.conf:: Configuring Autodist +* Creating new distribution:: Adding new distribution +* Distribution file format:: Detailed document for distfile format +* configure.ad files:: configure script for creating configure.ac +* Makefile.ad files:: Makefile.ad for creating Makefile.am +* Other .ad files:: Other files with .ad suffix +* Distdefines:: Using distdefs in files + +Invoking Autodist + +* Preparing source tree:: Preparing source tree with Autodist +* Creating distribution:: Creating distribution with Autodist + +Examples + +* Single distribution tree:: Single distribution example +* Multiple distribution tree:: Multiple distributions example + +@end detailmenu +@end menu + +@end ifnottex + + +@node Introduction +@chapter Introduction + +The Autodist is a source distribution management system that allows +powerful mechanisms to define what is included in and excluded from a +distribution, and what license the distribution is released under. It is +also used to create the actual distribution source packages. Autodist +allows distribution management in file, directory and file content level. +Different distributions may include different portions of files, for +example, excluding certain features from certain distributions. It is +always guaranteed that anything not defined for the distribution, is +removed automatically (files, file content, directories), thus ensuring +that nothing is accidentally included in the distribution. + +The Autodist creates 'Makefile.am' files from 'Makefile.ad' files and +'configure.ac' file from one or more 'configure.ad' files. Any other file +ending with '.ad' suffix will also be processed. The processed file will +have the '.ad' suffix removed (@pxref{Preparing source tree, , , , }). +Autodist also creates and packages the distribution using common GNU +distribution creation process, specificly `make dist'. Autodist, however, +controls this process and during packaging phase the Autodist processes +all files in the distribution (other than '*.ad' files, which has already +been processed earlier by Autodist). The resulted package is a processed +source distribution package, processed according to the rules specified +in the distribution file(s) (@pxref{Creating distribution, , , , }). + +Any file in the source tree may use distdefs (distribution defines (@pxref{Distdefines, , , , })) which are defined in the distributions. When distribution +is packaged only the files, directories and file content that is either +outside of any distdef, or inside the defined distdefs will be included +in the distribution. Any other file, directory or content in the file +will be removed. It is guaranteed, if a file, a directory or a piece of +file content is not inside a defined distdef it will not be delivered to +the distribution. + +Any file, 'Makefile.am', 'configure.ac', or source file processed with +Autodist is always compliant with the tools needed to process them. All +files can also be processed with the corresponding tools even before +processing them with Autodist. This makes it possible, for example, to +compile sources before they have been processed, and undefined lines +are removed. The distdefs are respected in source files by the +preprocessor. + +Autodist is not a binary packaging system. It is specificly used to +create source distributions. A binary packaging system, however can be +hooked to the distribution creation process, if needed. + +@menu +* Motivation:: Reasons for using Autodist +@end menu + + +@node Motivation +@section Reasons for using Autodist + +Autodist is closely related to the Autoconf and Automake tools, and +complements the features Autoconf and Automake provides. It is especially +targeted into circumstances where multiple distributions are created from +one source tree. The Autoconf and Automake environment is mainly designed +for one distribution (one application) per one source tree situations. +Autodist provides mechanisms to create all kinds of distributions that can +be created from one source tree. To be able to use Autodist, the Autoconf +and Automake must be installed into the system (@pxref{Integrating Autodist, , , , }). +Autoconf version must be at least 2.52g. + +Small software projects usually do very well with Autoconf and Automake +and their distribution management features. Often these projects do not +need Autodist, though they can benefit from it. However, if your software +project is large, you need to create multiple distributions from one source +tree, you have complex licensing terms for different distributions, you +have different target users or customers that may require different +feature set or licenses in different distributions, you have need to +continue concurrent development in the main source tree and still be able +to create stable distributions, and/or you have need to control file +content in different distributions (to avoid distributing code or features +that aren't supposed to be distributed, or to avoid leaking information +to your competitors on what new features you are working on), then Autodist +is a tool you may find usefull. + +The motivation behind Autodist stems from need to be able to create +multiple distributions from one large source tree in a precise and +controllable manner, and guarantee that anything that is not part of the +distribution is removed from the distribution. The Autoconf and Automake +provides mere basic control what is included in and excluded from +distributions and how the distributions are created. They also do not +provide mechanism to define different licensing conditions for different +distributions, or changing the license automatically for different user +or customer purposes. Many large software projects, companies and +corporations have commonly been using Autoconf and Automake tools, but +have had the need to create their own ad-hoc mechanisms to control +distribution creation. The Autodist attempts to provide a tool that any +size software project can effectively use to manage their distributions. + +Without a tool like Autodist, large software projects usually has to be +split into separate source trees, which may not always be possible because +they may share large portions of common code (which may further make +concurrent development of the applications hard), or multiple Autoconf and +Automake environments (multiple configure scripts) needs to be created +in one source tree. In this case the source tree usually gets very +complicated and controlling what is compiled and what is included in +distributions becomes harder, especially when different parts code is shared +between applications and libraries. + + +@node Integrating Autodist +@chapter Integrating Autodist + +Integrating Autodist into existing software project can be a very simple +task or a fairly complicated task. It depends on the size and complexity +of the software project. Generally speaking, integrating Autodist into +software project is fairly straightforward process: + +1. The distributions directory and 'default' distribution are created + +2. The 'configure.ad' is created + +3. If needed, 'Makefile.ad' file(s) are created + +After this the Autodist can already be used to prepare the source tree +for configuration and compilation (@pxref{Preparing source tree, , , , }). +Adding a new distribution would then allow the actual distribution +packaging also. + +If the software project has had own ad-hoc distribution system already in +place, it may take some work to move from that system into the Autodist. +If there are multiple applications and distributions created from the +source tree, the distributions and distribution defines for them need to +be created. While this may be unthankful job, it only needs to be done +once. + +Integrating Autodist into a new software project is a very simple task as +renaming 'configure.ac' and possibly 'Makefile.am' files are not required, +as they may not exist yet. + + +@menu +* Creating distdir:: Creating distributions directory +* autodist.conf:: Configuring Autodist +* Creating new distribution:: Adding new distribution +* Distribution file format:: Detailed document for distfile format +* configure.ad files:: configure script for creating configure.ac +* Makefile.ad files:: Makefile.ad for creating Makefile.am +* Other .ad files:: Other files with .ad suffix +* Distdefines:: Using distdefs in files +@end menu + + +@node Creating distdir +@section Creating distributions directory + +The distributions directory is 'distdir', which is expected to be +located in the root of the source tree. This directory will hold all +the distribution files, and the Autodist configuration file 'autodist.conf' (@pxref{autodist.conf, , , , }). +If this directory does not exist it can be created with the Autodist. + +@example + autodist -i +@end example + +This will create the 'distdir' and copy the default 'autodist.conf' +configuration file and the 'default' distribution into the directory. +The 'default' distribution will be used by default by the Autodist +unless other distribution is specified. + +After this the Autodist has effectively been integrated into the +software project. However, usually after this, one would create new +distributions, the 'configure.ad' and possibly 'Makefile.ad' file(s). +Without 'configure.ad' file a distribution package cannot be created. +However, even without 'configure.ad' file the source tree can be +prepared for configuration and compilation (@pxref{Preparing source tree, , , , }). + +@menu +* autodist.conf:: Configuring Autodist +@end menu + + +@node autodist.conf +@section Configuring Autodist + +After the Autodist has been integrated into the software by creating +the 'distdir', the 'autodist.conf' configuration file was added to the +'distdir' also. Usually software projects will want to modify some of +the 'autodist.conf' options, mainly specifying the distdef prefix. + +The 'autodist.conf' is a text file. The following options are available +in 'autodist.conf': + + +@example +DISTPREFIX="" +@end example + +By default the distdef prefix is '_DIST_'. To add own software package +specific prefix the 'DISTPREFIX' can be defined. + +Example: +@example +DISTPREFIX="SILC" +@end example + +Will set the distdef prefix as 'SILC_DIST_'. + + +@example +DISTDEFS="distdefs.h" +@end example + +The 'DISTDEFS' option specifies the file name of the distdef header file +which Autodist will create. The software project should '#include' the +header file in order for the preprocessor to respect the distdef +conditionals (@pxref{Distdefines, , , , }). By default the file name +is 'distdefs.h' and is created at the root of source tree. Other location +may be specified if needed. + +Example: +@example +DISTDEFS="include/distdefs.h" +@end example + + +@example +ACLOCAL="aclocal" +@end example + +The 'ACLOCAL' specifies the location of the 'aclocal' tool. If Autodist +should not run 'aclocal' this option may be removed or set to empty value. +User need to then run it manually. + + +@example +AUTOHEADER="autoheader" +@end example + +The 'AUTOHEADER' specifies the location of the 'autoheader' tool. If +Autodist should not run 'autoheader' this option may be removed or set +to empty value. User need to then run it manually. + +@example +AUTOCONF="autoconf" +@end example + +The 'AUTOCONF' specifies the location of the 'autoconf' tool. If +Autodist should not run 'autoconf' this option may be removed or set +to empty value. User need to then run it manually. + + +@example +AUTOMAKE="automake -a -c" +@end example + +The 'AUTOMAKE' specifies the location of the 'automake' tool. If +Autodist should not run 'automake' this option may be removed or set +to empty value. User need to then run it manually. By default, the +'-a' and '-c' options are given to 'automake' to add any missing required +files. + + +@example +LIBTOOLIZE="libtoolize --automake -c" +@end example + +The 'LIBTOOLIZE' specifies the location of the 'libtoolize' tool. +This option should be removed or ste to empty value if 'libtool' is not +used in the source tree. + + +@example +MAKE=make +@end example + +The 'MAKE' specifies the location of the 'make' program. This option must +be set to valid value in order to create distributions. + + +@menu +* Creating new distribution:: Adding new distribution +@end menu + + +@node Creating new distribution +@section Creating new distribution + +After the Autodist has been integrated into the software project by +creating the 'distdir' and 'default' distribution, the source tree +can be prepared for configuration and compilation (@pxref{Preparing source tree, , , , }). However, the 'default' distribution should be used only as +a development distribution. Usually it is used to prepare the raw source +tree (such as a tree just checkout +from CVS) for configuration and compilation. By default, the 'default' +distribution cannot be packaged. However, if the software project is +small (one distribution), it may be convenient to edit the 'default' +distribution to be as the distribution that is packaged from the source +tree. In software project where multiple distributions are created using +the 'default' only as a development distribution is recommended. The +real distributions should be defined as separate distributions. + +Creating a new distribution is a simple process. Each distribution +is placed in the 'distdir' and the file name of the distribution file is +used to reference to it. By default, the distribution name is the +file name of the distribution file. The actual distribution file is +a simple text file with various directives that define the distribution. + +If the 'default' distribution is used as a development distribution it +might be desired to inherit some or all of the created distributions in +it, so that development becomes possible with the 'default' distribution. +Adding 'inherit' directive into the 'distdir/default' will inherit the +specified distribution. + + +@menu +* Distribution file format:: Detailed document for distfile format +@end menu + + +@node Distribution file format +@section Distribution file format in detail + +The distribution file, or distfile from now on, defines your distribution, +distribution defines, options, included and excluded files and +directories, license, and additional processing. Each distribution is +defined in a separate file and the distributions are referenced by +their file name. + +The distfile is a text file that contains various directives that define +the actual distribution. Lines starting with '#' are considered comments +and are ignored. + + +@section Directive: name + +The 'name' directive defines the name of the distribution. It is optional +directive, and if omitted the distribution name will be the name of the +distfile. + +Example: +@example +name FOO Application +@end example + +Will set your distribution name as 'Foo Application'. + + +@section Directive: package + +The 'package' directive defines the name of the distribution package. It is +optional directive, and if omitted the distribution package name will +be the name of the distribution, if defined, or if omitted, then the name +of the distfile. If this directive is omitted then normal GNU convention +is used to decide the package name, derived from the distribution name. + +Example: +@example +package foo-client +@end example + +Will create distribution packages named, for example, as +'foo-client-1.0.tar.gz'. + + +@section Directive: bug-report + +The 'bug-report' directive can be used to define the email address where +the bug-reports for the distribution should be sent. The directive is +optional. The 'bug-report' email address will be set for the Autoconf +which will deliver it via AC_INIT macro. + + +@section Directive: license + +The 'license' directive can be used to define the license file for the +distribution. This directive is optional. The license file will be +copied into the distribution in the name 'COPYING'. If the 'COPYING' +file already exist it will be replaced. + +Example: +@example +license license/GPL +@end example + +Will include the file 'license/GPL' into the distribution in the file +name 'COPYING'. + + +@section Directive: license-header + +The 'license-header' can be used to re-license your files into a new +license. This directive is optional. There may be zero or more +'license-header' directives in distribution. The 'license-header' +directive will compare the license header that usually appear at the +start of a file to the . If it matches it will +be replaced with the . The license header in the file +will be replaced and the file will have effectively been re-licensed. + +Example: +@example +license-header license/BSD-header license/GPL-header +@end example + +Will replace all appearances of the license header in 'license/BSD-header' +file to the license header in 'license/GPL-header' in any file in the +distribution. Note that, the header change will be performed when +the distribution is packaged (@pxref{Creating distribution, , , , }). + +With 'license-header' directive you may initially set your files in the +source tree into what ever license you prefer. However, if you need to +re-license parts of the source tree in certain distributions the +'license-header' will achieve this automatically. For example, suppose +one wants to create two different versions of a library distribution, with +different feature sets, in two different licenses. + +There are several limitations in the current implementation of Autodist +with the 'license-header' directive: + +First limitation is that the header files must have equal amount of lines. +If the new header file has fewer lines that the current header file, all +of the lines from the current header will not be replaced. If the new header +has fewer lines, empty lines must be added to it. If the new header file +has more lines than the current header file, the extra lines will not appear +in the replaced header. Basic rule is to always make sure the header file +has equal amount of lines in them. + +Second limitation is in indentation of the header files. It is suggested, +though not mandatory, that the header files have the same indentation as +is commonly used in the source tree; if the license header text in a file +starts at the second character instead of at the start of the line, then +the header file should start the license text at the second character also. +If same indentation is not used the appearance of the replaced header +may not be perfect. While this is a cosmetic issue, one still to remember. + +Example current header: +@example +--- Start example + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +--- end example +@end example + +Example new header: +@example +--- Start example + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the conditions listed in the + COPYING file are met. + + + +--- end example +@end example + +In this example, if the text in the current header file is found in any +file in the distribution it will be replaced with the new header file. +Notice that, both header files has same amount of lines (8 lines). + +Note that, the current header must match exactly the header used in +files. Otherwise the replacement will not be complete. + + +@section Directive: inherit + +The Autodist provides inheritance of distributions. The 'inherit' +directive is used to define the distribution which will be inherited +into the distribution. The specifies the name of the +inherited distribution. If the distribution cannot be inherited Autodist +will give an error. + +The 'inherit' will inherit the following information from the distribution: +distdefs, undefines, includes, excludes and noprocess. Other information +will not be inherited. If the inherited distribution inherits other +distributions, they will also be inherited automatically. User should be +careful when inheriting distributions as it may be possible to create an +infinite recursion. The Autodist would allow for this and not detect this +error. Zero or more 'inherit' directives may be set for distribution. + +Example: +@example +inherit common +inherit client +inherit toolkit +@end example + +Will inherit distributions 'common', 'client' and 'toolkit' into this +distribution. All distdefs, undefines, includes, excludes and noprocesses +from these distributions are now also part this distribution. + + +@section Directive: define + +The 'define' directive is used to define the distdef symbols for the +distribution. This directive is optional, however, all distributions +should define at least one distdef so that the distribution may be +controlled with the distdef conditionals in files in the source tree (@pxref{Distdefines, , , , }). By default, the distdef prefix is '_DIST_'. Many +software projects will want to set their own prefix for the distdefs +for consistency. The prefix may be defined in the 'autodist.conf' file +(@pxref{autodist.conf, , , , }). + +Example: +@example +define _DIST_FOO +define _DIST_FEATURE_X +define _DIST_LIBRARY_Y +@end example + +Will define the following distdefs for the distribution: '_DIST_FOO', +'_DIST_FEATURE_X' and '_DIST_LIBRARY_Y'. These distdefs may then be +used in the source tree and source code to control what is included in +or excluded from this distribution. + + +@section Directive: undef + +The 'undef' directive may be used to explicitly undefine a distdef. +When inheriting distributions it may be desired to be able undefine +certain distdefs. This directive is optional. + +Example: +@example +undef _DIST_FEATURE_Y +@end example + +Will undefine '_DIST_FEATURE_Y' distdef. This distdef will not be part +of this distribution anymore, even if it is defined in some inherited +distribution. + + +@section Directive: option