From: Pekka Riikonen Date: Sun, 5 Oct 2008 14:45:59 +0000 (+0300) Subject: Merge commit 'origin/silc.1.1.branch' X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=HEAD;hp=e9374395ec9747bddd3ea0bfd3e5a17717e97b31 Merge commit 'origin/silc.1.1.branch' Conflicts: CHANGES TODO apps/Makefile.ad apps/autodist/CHANGES apps/autodist/autodist.in apps/autodist/doc/autodist.1.in apps/autodist/doc/autodist.texi apps/silcd/command.c apps/silcd/server.c apps/silcd/server_backup.c apps/silcd/server_query.c configure.ad distdir/autodist distdir/pre-dist-client distdir/pre-dist-toolkit includes/silc.h.in includes/silcversion.h.in lib/Makefile.ad lib/configure.ad lib/contrib/Makefile.ad lib/silcasn1/silcasn1.c lib/silcasn1/silcasn1_decode.c lib/silcasn1/silcasn1_encode.c lib/silcclient/client.h lib/silcclient/client_entry.c lib/silcclient/silcclient.h lib/silccore/silcpacket.c lib/silccrypt/Makefile.ad lib/silccrypt/aes.c lib/silccrypt/aes_x86.asm lib/silccrypt/aes_x86_64.asm lib/silccrypt/ciphers.h lib/silccrypt/configure.ad lib/silccrypt/rijndael_internal.h lib/silccrypt/silccipher.c lib/silccrypt/silcpk.c lib/silccrypt/silcpkcs.c lib/silccrypt/silcpkcs1.c lib/silcmath/configure.ad lib/silcsim/Makefile.ad lib/silcske/silcconnauth.c lib/silcske/silcske.c lib/silcskr/silcskr.c lib/silcutil/silcatomic.h lib/silcutil/silcbuffer.h lib/silcutil/silcbuffmt.c lib/silcutil/silcconfig.c lib/silcutil/silcdlist.h lib/silcutil/silcfdstream.c lib/silcutil/silcfsm.c lib/silcutil/silclist.h lib/silcutil/silclog.c lib/silcutil/silcmime.c lib/silcutil/silcmutex.h lib/silcutil/silcnet.h lib/silcutil/silcschedule.c lib/silcutil/silcschedule.h lib/silcutil/silcschedule_i.h lib/silcutil/silcsocketstream.c lib/silcutil/silcsocketstream_i.h lib/silcutil/silcstack.c lib/silcutil/silcstack.h lib/silcutil/silcstringprep.c lib/silcutil/silctime.c lib/silcutil/silctypes.h lib/silcutil/silcutil.c lib/silcutil/stacktrace.c lib/silcutil/tests/test_silcschedule.c lib/silcutil/tests/test_silctime.c lib/silcutil/unix/silcunixnet.c lib/silcutil/unix/silcunixschedule.c lib/silcutil/unix/silcunixsocketstream.c lib/silcutil/unix/silcunixthread.c lib/silcutil/win32/silcwin32schedule.c win32/libsilc/libsilc.def --- diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index b79d574a..00000000 --- a/.cvsignore +++ /dev/null @@ -1,26 +0,0 @@ -Makefile -Makefile.in -Makefile.am -Makefile.defines -Makefile.defines.in -Makefile.defines_int -Makefile.defines_int.in -acconfig.h -aclocal.m4 -autom4te.cache -autom4te-*.cache -config.cache -config.guess -config.h -config.h.in -config.log -config.status -config.sub -configure -configure.in -libtool -libtool-shared -ltconfig -ltmain.sh -stamp-h -stamp-h.in diff --git a/CHANGES b/CHANGES index 128c76fc..dfaf9cad 100644 --- a/CHANGES +++ b/CHANGES @@ -129,7 +129,7 @@ Sun Sep 9 17:52:49 EEST 2007 Pekka Riikonen * SILC Toolkit 1.1.3. * Fixed possible buffer overflows from SILC Config code. - Patch from Jérémy Bobbio. Affected file is + Patch from J�r�my Bobbio. Affected file is lib/silcutil/silcconfig.c. Sun Aug 26 12:28:49 EEST 2007 Pekka Riikonen @@ -160,7 +160,7 @@ Thu Jul 19 21:08:49 EEST 2007 Pekka Riikonen files are lib/silccrypt/aes.c. * Fixed lib/silcutil/silcatomic.h compilation on IA64. Patch - from Jérémy Bobbio. + from J�r�my Bobbio. * Fixed public key identifier parsing to check lengths correctly. Affected file is lib/silccrypt/silcpk.c. @@ -1535,7 +1535,7 @@ Sun Apr 3 14:58:53 EEST 2005 Pekka Riikonen 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, + 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 @@ -1705,7 +1705,7 @@ Wed Nov 24 18:24:05 CET 2004 Pekka Riikonen 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 + Juha R�s�nen. Affected file is lib/silcutil/win32/silcwin32schedule.c. * Fixed QoS parsing for connection blocks in server. Affected @@ -1803,7 +1803,7 @@ Sat Feb 28 16:25:09 EET 2004 Pekka Riikonen 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 + delivered to the application in the 'channel_message�' client operation. Affected files are lib/silcclient/silcclient.h and client_channel.c. @@ -2689,7 +2689,7 @@ Tue Dec 17 10:05:00 CET 2002 Pekka Riikonen Aldous . * Added better implementation using CriticalSection of - SilcMutex on WIN32. A patch by Mikko Lähteenmäki + SilcMutex on WIN32. A patch by Mikko L�hteenm�ki . * Added some Winsock WIN32 compatiblity defines into @@ -3060,7 +3060,7 @@ Sun Nov 24 18:26:42 EET 2002 Pekka Riikonen notifys in Irssi SILC Client. Affected file is irssi/src/silc/core/client_ops.c. Bug #82. - * Applied Ville Räsänen's manual page and --mandir bugfix + * Applied Ville R�s�nen's manual page and --mandir bugfix patch. Affected files are configure.in.pre and Makefile.am.pre. Bug #88. @@ -3239,8 +3239,8 @@ Thu Nov 7 10:05:28 CET 2002 Pekka Riikonen Wed Nov 6 17:18:13 EET 2002 Pekka Riikonen - * Fixed manual page installation patch by Ville Räsänen. - USERS help page fix patch by Ville Räsänen + * Fixed manual page installation patch by Ville R�s�nen. + USERS help page fix patch by Ville R�s�nen * Changed the silc_client_command_call interface to make the command call simpler for the application. The library @@ -3286,7 +3286,7 @@ Sun Nov 3 17:59:15 EET 2002 Pekka Riikonen was missing altogether. Affected file silcd/command_reply.c. Bug #44. -Sun Nov 3 00:42:05 EET 2002 Mika Boström +Sun Nov 3 00:42:05 EET 2002 Mika Bostr�m * Added man-pages for silc(1), silcd(8) and silcd.conf(5). Included yodl sources for each of these. Also modified @@ -3487,7 +3487,7 @@ Sun Oct 20 14:12:24 CEST 2002 Pekka Riikonen Sat Oct 19 13:32:15 CEST 2002 Pekka Riikonen * ROBODoc documented lib/silcutil/silcbuffer.h and - lib/silcutil/silcdlist.h. Patch by Ville Räsänen + lib/silcutil/silcdlist.h. Patch by Ville R�s�nen . Fri Oct 18 10:51:04 EEST 2002 Pekka Riikonen @@ -3739,7 +3739,7 @@ Sun Sep 15 12:25:10 EEST 2002 Pekka Riikonen file lib/silcutil/silcutil.[ch]. * Added STATS command to client library and Irssi SILC client. - Patch provided by Ville Räsänen . + Patch provided by Ville R�s�nen . Wed Sep 11 09:22:00 CEST 2002 Pekka Riikonen @@ -3961,7 +3961,7 @@ Fri Jun 28 11:53:25 CEST 2002 Pekka Riikonen Thu Jun 27 20:07:27 EEST 2002 Pekka Riikonen * Buffer overflow with CUMODE command's mode->mode character - conversion. Reported by Ville Räsänen. Affected file + conversion. Reported by Ville R�s�nen. Affected file lib/silcutil/silcutil.c. Thu Jun 27 16:54:33 EEST 2002 Pekka Riikonen @@ -4049,7 +4049,7 @@ Tue Jun 25 18:47:39 EEST 2002 Pekka Riikonen * Fixed a bug in version string parsing which could crash the program with specially formatted version string. - Bug reported and patch provided by Ville Räsänen. Affected + Bug reported and patch provided by Ville R�s�nen. Affected file lib/silcutil/silcutil.c. * Handle the disconnection immediately when DISCONNECT @@ -7861,7 +7861,7 @@ Thu Sep 6 12:47:37 EEST 2001 Pekka Riikonen Added function silc_client_nickname_format to the file lib/silcclient/idlist.c. It performs the nickname formatting. - Added new field `hostname´ to the SilcClientEntry context. + Added new field `hostname� to the SilcClientEntry context. It holds the hostname of the client. Affected file is lib/silcclient/idlist.h. @@ -11232,7 +11232,7 @@ Wed Feb 21 14:17:04 EET 2001 Pekka Riikonen * Fixed buffer overflow from lib/silcclient/command.c in USERS command parsing. -Wed Feb 21 12:44:00 EET 2001 Mika Boström +Wed Feb 21 12:44:00 EET 2001 Mika Bostr�m * Changed all SilcConfigServer* and silc_config_server* to SilcServerConfig* and silc_server_config*, respectively. diff --git a/CHANGES.TOOLKIT b/CHANGES.TOOLKIT new file mode 100644 index 00000000..66096514 --- /dev/null +++ b/CHANGES.TOOLKIT @@ -0,0 +1,75 @@ +Tue Jan 8 17:09:25 EET 2008 Pekka Riikonen + + * Moved SILC ID utility functions to utility library to + core library. Affected files are lib/silccore/silcid.[ch]. + +Tue Jan 8 16:24:56 EET 2008 Pekka Riikonen + + * Fixed silc_nickname_parse to always return valid nickname + when it returns TRUE. Affected files are + lib/silcclient/client_entry,c and command.c + +Thu Nov 15 16:45:48 EET 2007 Pekka Riikonen + + * Fixed public key authentication as responder. Affected file + is lib/silcske/silcconnauth.c. + + * Report packet engine errors to client application. Affected + file is lib/silcclient/client.c. + + * If channel user list could not be resolved or was not even + closely fully resolved, report it to application. Affected + file is lib/silcclient/command_reply.c. + + * Reprocess JOIN command synchronously after resolving channel + user list. Affected file is lib/silcclient/command_reply.c. + + * In JOIN command reply check if the channel key is already + saved. If it is we have received new key from server while + resolving user and must not save the old key. Affected file + is lib/silcclient/command_reply.c. + + * Remove all channel keys and hmacs after giving LEAVE command. + Affected file is lib/silcclient/command_reply.c. + +Tue Nov 13 18:24:56 EET 2007 Pekka Riikonen + + * Added missing channel unreferencing in CMODE, CUMODE, + TOPIC, INVITE, BAN and KICK command replies. Affected + file is lib/silcclient/command_reply.c. + +Mon Nov 5 23:07:58 EET 2007 Pekka Riikonen + + * Zero tail of CTR mode IV in IV Included mode. Change does + not cause compatibility issues. Affected file is + lib/silcske/silcske.c. + +Mon Nov 5 22:24:25 EET 2007 Pekka Riikonen + + * Fixed CTR mode rekey. Affected file is lib/silcske/silcske.c. + + * Rewrote the IV Included CTR mode encryption/decryption in + packet engine. Affected file is lib/silccore/silcpacket.c. + +Sun Aug 26 12:28:49 EEST 2007 Pekka Riikonen + + * Fixed TIMEOUT handling in user info resolving during JOINing, + fixes crash. Affected file is lib/silcclient/client_notify.c. + +Tue Jul 10 20:02:04 EEST 2007 Pekka Riikonen + + * Added support for new PKCS API and other API changes from + Crypto Toolkit to client library. Affected files are in + lib/silcclient/. + +Sun Jul 8 20:20:22 EEST 2007 Pekka Riikonen + + * Changed message payload encoding async, due to the PKCS API + changes. Affected files are lib/silccore/silcmessage.[ch]. + + * Added new PKCS API support for connauth and SKE. Affected + files are lib/silcske/silconnauth.c and silcske.c. + +----------------------------------------------------------------------------- + +For older changes please see the CHANGES file from the CVS tree. diff --git a/README.CVS b/README.GIT similarity index 85% rename from README.CVS rename to README.GIT index c50be0b5..0dd847d3 100644 --- a/README.CVS +++ b/README.GIT @@ -231,3 +231,42 @@ 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. + + +Merging Between CVS Branches +============================ + +Usually development moves from trunk to a specific branch when we are +nearing releasing the software. After release the trunk will continue new +development and the branch will continue maintenance of the latest +version. At some point the branch needs to be merged back to trunk to +bring all relevant fixes back to trunk. The merge is to be done as +follows: + + cvs -z3 co -j branch_to_merge silc + cd silc + ... check trunk status ... + cvs -z3 commit + +The first command will merge the branch_to_merge to the trunk. After +merging the state of the trunk should be checked for any possible +conflicts and fix if any exist. The trunk then must be committed. + +After merge has been done the branch must be tagged: + + cvs -z3 co -r branch_to_merge silc + cd silc + cvs -z3 tag branch_merged_20070701 + +This tag can be used later when merging more changes from the same branch +to the trunk: + + cvs -z3 co -j branch_merged_20070701 -j branch_to_merge silc + cd silc + ... check trunk status ... + cvs -z3 commit + +The tag is relevant so that the earlier changes would not be merged twice. +The tag assures that only changes made after the last merge will be merged +to trunk. After this merge has been done the branch must be tagged again +in case more changes are merged again later. diff --git a/TODO b/TODO index d89901f8..e6950f06 100644 --- a/TODO +++ b/TODO @@ -1,320 +1,207 @@ -TODO for 1.1 -============ +TODO for 1.2 And Beyond +======================= NOTE: Any item that doesn't have (***DONE) in it, isn't done yet. The (***TESTING NEEDED) means that the item has been done but not yet properly tested. +NOTE: A TODO entry does not mean that it is ever going to be done. Some +of the entries may be just ideas, good, bad or ugly. If you want to work +on some of the TODO entries simply let us know about it by dropping a note +to silc-devel mailing list or appear on 'silc' channel on SILCNet. -apps/silcd, The SILC Server ****PARTLY DONE**** -=========================== - - o Fix/test GETKEY. (***DONE) - - o Fix/test MOTD. (***DONE) - - o Rewrite rehash, HUP. - - o Heartbeat-keepalive. - - o Port all code to use SILC Toolkit 1.1 APIs. (***DONE) - - o Remove protocol.[ch]. (***DONE) - - o Rewrite connecting accepting. (***DONE) - - o Rewrite async connecting. (***DONE) - - o Test backup router resuming protocol. (***DONE) - - o Check all packet receive routines that they call silc_packet_free. - (***DONE) - - o Add Web statistics module using lib/silchttp. Give out server - statistics. (***DONE) - - -SILC Client ****DONE**** -=========== - - o Porting to new Toolkit API and new Client Library API (***DONE) - - o Improve help files, especially /cmode, /cumode and /key. (***DONE) - - -lib/silcclient, The Client Library ***DONE**** -================================== - - o silcclient.h clean up and API rewrites. (***DONE) - - o silcclient_entry.h finishing, all entry relates APIs to this header. - (***DONE) - - o SilcChannelEntry, SilcServerEntry, SilcChannelUser, allocating, - freeing, finding, etc. rewrite. Also making them reference counted for - multi threads use. (***DONE) - - o Rewrite client side WHOIS command (for whois -details). (***DONE) - - o Finish all the missing SILC packet processings, rewrites. (***DONE) - - o The client_notify.c rewrite. (***DONE) - - o Resuming to client_register.c (remove client_resume.c) (***DONE) - - o Rekey rewrite. (***DONE) - - o Remove protocol.[ch]. (***DONE) - - o File transfer rewrite. (***DONE) - - o File transfer API documentation. (***DONE) - - o Connection auth request. (***DONE) - - o Password auth test, public key auth test. (***DONE) - - o Starting key exchange directly, rewrite. (***DONE) - - o Channel messages, channel private keys, channel entires, channel - search, etc. rewrite. (***DONE) - - o For many APIs leave the hash context allocations to the caller instead - of using client->sha1hash and client->md5hash, or some kind of thread - safe (no locking) concept. (***DONE) - - o Key agreement rewrite. (***DONE) - - o Connecting to remote client (***DONE) - - o Private message waiting API (in threads) (***TESTING NEEDED) - - o client_attrs.c, attributes rewrite. (***DONE) - - o No SilcBuffer lists back to application in command_reply operations. - Convert them all to real lists and/or structures for easier use. - (***DONE) - - o Nickname formatting rewrite. (***DONE) - o UDP connections. (***TESTING NEEDED) - - -lib/silcsftp ****DONE**** +lib/silccore ============ - o Porting to use the new util library. (***DONE) - - -lib/silccore/silcpacket.[ch] ****DONE**** -============================ - - o SilcPacketEngine. (***DONE) - - o New SILC Packet API. (***DONE) - - o Implement silc_packet_engine_stop and silc_packet_stream_destroy. (***DONE) - - o IV Included flag support, UDP transport support (***TESTING NEEDED) - - -lib/silccore/silcid.[ch] ****DONE**** -======================== - - o Add silc_id_str2id to accept the destination buffer as argument - and thus not require any memory allocation. Same will happen - with silc_id_payload_* functions. (***DONE) - - o silc_id_str2id, silc_id2str to non-allocating routines. (***DONE) - - -lib/silcskr ****DONE**** -=========== - - o Removing key from the repository is not possible currently. It should - be. (***DONE) - - -lib/silcske/silcske.[ch] ***DONE**** -======================== - - o Responder rekey (***DONE) - - o IV Included flag support in SKE (***DONE) + o SILC_PACKET_FLAG_ACK support. Implement ACK packet and packet payload + to silcpacket.c. - o UDP transport changes; retransmission support by using exponential - backoff algorithm. (***DONE) + o All payload encoding routines should take SilcStack as argument. - o SilcConnAuth header file documentation. (***DONE) + o Remove SilcCommandCb from silccommand.h. (***DONE) + o All payload test routines into lib/silccore/tests/. -lib/silccrypt ****DONE**** -============= - o Implement PKCS #1 sign/verify with hash OID. (***TESTING NEEDED) - - o Implement SILC Public Key Version 2 handling in sign/verify. Implement - Version (V) identifier (***DONE) - - o SILC PKCS (silcpkcs.h) reorganizing when other PK supports added. - Move the SILC Public Key routines away from the crypto library into - the core library (silccore). silc_pkcs_public/private_key_* routines - to silc_public/private_key_* routines. The silc_public_key_* routines - should also automatically handle SILC Public Keys, and other keys - and certificates as well. Add fe. silcpk.h into silccore. It should - also include the Public Key Payload encoding and decoding routines. - (***DONE) - - o Assembler AES (***DONE) - - -lib/silcutil ****DONE**** -============ +lib/silcclient, The Client Library +================================== - o The regex code from lib/contrib might compile fine on all platforms. - No need to make it silcutil/unix/ specific. Add them to generic - silcutil.c. (***DONE) + o LIST command should take server name as argument, a server name whose + channels to list. This way it is possible to list channels from + any server in internet, eg. /LIST example.com. - o Silc FD Stream to WIN32 (lib/silcutil/silcfdstream.h) (***TESTING NEEDED) + o UDP SILC connection support to SILC server - o bool -> SilcBool (***DONE) + o Giving WHOIS for nick that doesn't exist should remove any same + named entries from the client cache. + o peer-to-peer private messages -lib/silcutil/silcbuffer.h ****DONE**** -========================= + o Private message key request notification to application. See XXX in + client_prvmsg.c. - o Remove the `truelen' field from SilcBuffer as it is entirely - redundant since we can get the true length of the buffer by - doing buffer->end - buffer->header. Add silc_buffer_truelen - macro instead. Consider also removing `len' field too since - it effectively is buffer->tail - buffer->data, and adding - silc_buffer_len macro can do the same. These would save - totally 8 bytes of memory per buffer. (***DONE) + o in JOIN notify handle resolving that timedout. Currently the user is + never joined the channel if this happens. What to do if message is + received from user that hasn't been resolved/joined? + o Connection option that attemps to connect to remot host with various + different mechanisms: UDP 706, TCP 706, TCP 80, TCP 443, UDP 7706 and + TCP 7706. This is the so called hole punching mechanism. -lib/silcutil/silcbuffmt.[ch] ****DONE**** -============================ + o Message ACKing support. - o SilcStack aware silc_buffer_unformat (***DONE) + o in /cmode and /cumode with +r, maybe the public key and private key + could be just some "string", which would then match to "string.pub" and + "string.prv". - o SilcStack aware silc_buffer_format (***DONE) + o If the SILC Events (see below) are implemented, perhaps client library + should provide events so that application developer has a choice of + developing the SILC app with callbacks or with events. - o silc_buffer_format reallocates automatically (***DONE) + o Ability to recover from rekey errors, at least try to. - o SILC_STR_OFFSET (***DONE) + o Add the SilcStream (socket stream) from the SilcPacketStream and + SilcSocket from the socket stream to SilcClientConnection for easier + access to them for programmers. Currently these have to be digged up + from the packet stream. (***DONE) -lib/silcutil/silcstack.[ch] ****DONE**** +SFTP Library, lib/silcsftp/ =========================== - o Data stack implementation (***DONE) - - -lib/silcutil/silcstream.[ch] ****DONE**** -============================ - - o Add abstract SilcStream. (***DONE) + o Read prefetch (read-ahead, reading ahead of time). Maybe if this can + be done easily. -lib/silcutil/silcsocketstream.[ch] ****DONE**** -================================== - - o Add SilcSocketStream (***DONE) - - o Add SilcSocketStream for WIN32 (***TESTING NEEDED) - - o Test QoS after the changes made to socket stream - +lib/silcske/silcske.[ch] +======================== -lib/silcutil/silcschedule*.[ch] ****DONE**** -=============================== + o Ratelimit to UDP/IP transport for incoming packets. - o Scheduler can be optimized for FD tasks by changing the fd_queue - to SilcHashTable instead of using linked list. We need to do - one-to-one mapping of FD to task and hash table is more efficient - for this usage. - Also redefine the silc_select to perhaps return a separate - structure of the events that actually occurred, instead of - returning the events in the fd_list which is then traversed - in the generic code to find the changed events. This can be - made faster by having own struct which includes only the - changed events, thus the tarversing is faster since the whole - fd_list is not traversed anymore (it is still traversed in the - silc_select but at least it removes one extra tarversing later - for the same list). +apps/silcd +========== - Other task queues should be changed to use SilcList. (***DONE) + o Deprecate the old server. Write interface for the new lib/silcserver + server library. The interface should work on Unix/Linux systems. - o Add SILC scheduler's internal routines into a table of implementation - function pointers, that the generic code then takes as extern from - implementation. These are the silc_schedule_internal_* routines. - (***DONE) + o Consider deprecating also the old config file format and use XML + istead. This should require SILC XML API implementation first. - o Change SILC_TASK_CALLBACK to non-static, and remove the macro - SILC_TASK_CALLBACK_GLOBAL. (***DONE) + o The configuration must support dynamic router and server connections. + The silcd must work without specifying any servers or routers to + connect to. - o SILC Schedule API changes to WIN32. (***DONE) + o The configuration must support specifying whether the server is + SILC Server or SILC Router. This should not be deduced from the + configuration as it was in < 1.2. + o The configuration must support specifying the ciphers and hmacs and + their order so that user can specify which algorithms take preference. -lib/silcutil/silcasync.[ch] ****DONE**** -=========================== - o Add SilcAsyncOperation to utility library. Any function that takes - callback as an argument must/should return SilcAsyncOperation. - (***DONE) +lib/silcserver +============== + o Rewrite the entire server. Deprecate apps/silcd as the main server + implementation and create lib/silcserver/. It is a platform + independent server library. The apps/silcd will merely provide a + a simple interface for the library. -lib/silcutil/silctime.[ch] ****DONE**** -=========================== + o Write the SILC Server library extensively using SILC FSM. - o SilcTime. (***DONE) + o Server library must support multiple networks. This means that one + server must be able to create multiple connections that each reach + different SILC network. This means also that all cache's etc. must + be either connection-specific or network-specific. - o system time, universal, generalized. (***DONE) + o Library must support dynamic router and server connections. This means + that connections are create only when they are needed, like when someone + says JOIN foo@foo.bar.com or WHOIS foobar@silcnet.org. + o Library must support server-to-server connections even though protocol + prohibits that. The responder of the connection should automatically + act as a router. The two servers create an own, isolated, SILC network. + To be used specifically with dynamic connections. -lib/silcutil/silcfsm.[ch] ****DONE**** -========================= + o Library must support multiple threads and must be entirely thread safe. - o SILC Finite State Machine API. Replaces SILC Protocol API (***DONE) + o Library must have support for SERVICE command. + o Both UDP and TCP support for incoming connecetions. Maintaining long + term UDP sessions. -lib/silcutil/silcnet*, lib/silcutil/*/silc*net* ****DONE**** -=============================================== + o The server must be able to run behind NAT device. This means that + Server ID must be based on public IP instead of private IP (See + also NAT detection protocol in SILC protocol specification). - o Add UDP interface (***DONE) + o The following data must be in per-connection context: client id cache, + server id cache, channel id cache, all statistics must be + per-connection. - o Add UDP interface for WIN32 (***TESTING NEEDED) + o The following data must be in per-thread context: command context + freelist/pool, pending commands, random number generator. - o New network interfaces (***DONE) + o Do inccoming packet processing in an own FSM thread in the + server-threads FSM. Same as in client library. + o Binding to other ports than 706 too. To allow easier traversing + through NATs and firewalls server should also bind to 80, 443 and 7706 + by default (at least try to bind). Connections must work normally + even if they were established to some other port other than 706. -lib/silcmath ****DONE**** -============ + Connection option that attemps to connect to remot server with various + different mechanisms: UDP 706, TCP 706, TCP 80, TCP 443, UDP 7706 and + TCP 7706. This is the so called hole punching mechanism. - o Test on x86_64. (***TESTING NEEDED) + o Ability to recover from rekey errors, at least try to. - o Change LTM and TFM function names when importing to SILC tree to avoid - rare linking problems on system that has same named symbols already in - the system. (***DONE) + o Reference count all Silc*Entry structures. + o All channel names in any command (where appropriate) must be allowed to + be in format channel@server so that the server can be connected to do + the command for the channel. Change protocol if it doesn't allow it. -lib/silcutil/symbian/ ****DONE**** -===================== + o All nicknames in any command (where appropriate) must be allowed to be + in format nick@server so that the server can be connected to do the + command for the nickname. Change protocol if it doesn't allow it. - o lib/silcutil/symbian routines missing or not completed. - (****TESTING NEEDED) + Some issues that must be kept in mind from 1.0 and 1.1 silcd's: - o Something needs to be thought to the logging globals as well, - like silc_debug etc. They won't work on EPOC. Perhaps logging - and debugging is to be disabled on EPOC. + o The server and router software MUST work out of the box. After + installation the server must not require any configuration to run the + most basic working configuration. No defining IP addresses, etc. + The server must work just by running it. + o The SERVER_SIGNOFF notify handing is not optimal, because it'll + cause sending of multiple SIGNOFF notify's instead of the one + SERVER_SIGNOFF notify that the server received. This should be + optimized so that the only SERVER_SIGNOFF is sent and not + SIGNOFF of notify at all (using SIGNOFF takes the idea about + SERVER_SIGNOFF away entirely). -lib/silcasn1 ****DONE**** -============ + o Another SERVER_SIGNOFF opt/bugfix: Currently the signoff is + sent to a client if it is on same channel as the client that + signoffed. However, the entire SERVER_SIGNOFF list is sent to + the client, ie. it may receive clients that was not on the + same channel. This is actually against the specs. It must be + done per channel. It shouldn't receive the whole list just + because one client happened to be on same channel. - o ASN.1 library (***DONE) + o If client's public key is saved in the server (and doing public key + authentication) then the hostname and the username information could + be taken from the public key. Should be a configuration option! - o Header documentation missing. (***DONE) + o Add a timeout to handling incoming JOIN commands. It should be + enforced that JOIN command is executed only once in a second or two + seconds. Now it is possible to accept n incoming JOIN commands + and process them without any timeouts. THis must be employed because + each JOIN command will create and distribute the new channel key + to everybody on the channel. - o Some string encodings missing (copy/paste matter). (***DONE) + o Related to above. If multiple JOINs are received in sequence perhaps + new key should be created only once, if the JOINs are handeled at the same + time. Now we create multiple keys and never end up using them because + many JOINs are processed at the same time in sequence. Only the last + key ends up being used. diff --git a/TODO-SILC b/TODO-SILC index 533dd9b7..2ce1eb7a 100644 --- a/TODO-SILC +++ b/TODO-SILC @@ -11,11 +11,35 @@ point. silc-architecture-xx.txt silc-specification-xx.txt + o Make @ reserved character in channel names. Accept channel@server + names in all commands and notify types. + o Add acknowlegments section to specification documents. - + o Group Diffie-Hellman protocol for establishig key with two or more users on a channel. + o Change CTR mode description: + + Truncated HASH from SKE (4 bytes) - This value is the first 4 + bytes from the HASH value that was computed as a result of SKE + protocol. This acts as session identifier and each rekey MUST + produce a new HASH value. + + to + + Truncated HASH from SKE (4 bytes) - This value is the first 4 + bytes from the HASH value that was computed in SKE. In each rekey + the value MUST be recomputed as follows: + + HASH = hash(new Sending/Receiving IV from SKE) + + The hash function is the one used in SKE. The 'new Sending/Receiving + IV from SKE' is the first 8 bytes of the new value computed during + rekey. The first 4 bytes are used from the recomputed HASH. + + o Consider for future authenticated encryption modes, especially GCM. + o Extend the Channel ID port to be actually a counter, allowing the 2^32 channels per cell, instead of 2^16 like now. The port with compliant implementation would always be 706, and it could be used @@ -26,11 +50,21 @@ point. the one that actually WANTs to establish the keys. So no need for responder to retransmit. Define this clearly in the specs. - o Dynamic server and router connections, ala Jabber. SILC has allowed + o Define clearly that the DSS signature format is the the Dss-Sig-Value + ASN.1 encoding defined for PKIX. + + o Define clearly the SSH2 signature format is the one specified for SSH2 + protocol. + + o Dynamic server and router connections, ala Jabber. SILC has allowed this from the beginning. It should be written out clearly in the specs. Connection would be created with nick strings (which are of format nick@server). + o NAT detection protocool during SKE so that party behind NAT can + detect if it is behind NAT and receive the public IP address and port + that it may need (servers need it to create valid Server ID). (***DONE) + o Counter block send/receive IV 64 bits instead of 32 bits, and the value itself is used as 64-bit MSB ordered counter, which must be reset before the packet sequence counter wraps. It's basically @@ -41,7 +75,7 @@ point. o Add Source and Destination ID in message MAC computation to fully associate the Message Payload with the true sender and the true recipient of the message. This will fix some security issues that - currently exists. It is currently possible in some specific set of + currently exists. It is currently possible in some specific set of conditions to mount a replay attack using Message Payload. This change will remove the possibility of these attacks. @@ -55,12 +89,12 @@ point. has changed nickname, has detached and resumed, or has reconnected to other server. 4. the original receiver of the message is still in the network, has - not changed nickname, has not detached and resumed, and has not + not changed nickname, has not detached and resumed, and has not reconnected to any other server, or, some other user has the same client ID. - 5. the attacker is able to get the same client ID as the original + 5. the attacker is able to get the same client ID as the original sender. - 6. the original receiver still has the static key set for the same + 6. the original receiver still has the static key set for the same remote client ID (for original sender's client ID). All this is possible to happen though likelyhood is quite small. It @@ -68,7 +102,7 @@ point. o The SILC public key identifier separator is ', ' not ','. The whitespace is mandatory. (***DONE) - + o Definition of EAP as new authentication method for connection auth protocol (RFC 3748). @@ -82,5 +116,3 @@ point. silc-users. (This is very old issue) o The time values in STATS is 32-bits. After 2038 it's over 32-bits. - - o Consider for future authenticated encryption modes. diff --git a/apps/Makefile.ad b/apps/Makefile.ad index 2be826d5..4c8d26d6 100644 --- a/apps/Makefile.ad +++ b/apps/Makefile.ad @@ -17,17 +17,21 @@ AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign -SUBDIRS = \ +SUBDIRS = \ #ifdef SILC_DIST_AUTODIST - autodist \ + autodist \ #endif SILC_DIST_AUTODIST #ifdef SILC_DIST_SERVER - @SILCD_SUBDIR@ \ + @SILCD_SUBDIR@ \ #endif SILC_DIST_SERVER #ifdef SILC_DIST_CLIENT - @IRSSI_SUBDIR@ \ + @IRSSI_SUBDIR@ \ #endif SILC_DIST_CLIENT #ifdef SILC_DIST_INPLACE -# silcstress +# silcstress \ #endif SILC_DIST_INPLACE +#ifdef SILC_DIST_ASN1UTILS + asn1utils \ +#endif SILC_DIST_ASN1UTILS + diff --git a/apps/autodist/AUTHORS b/apps/autodist/AUTHORS deleted file mode 100644 index 99141c09..00000000 --- a/apps/autodist/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -Authors of SILC Autodist. - -Pekka Riikonen diff --git a/apps/autodist/CHANGES b/apps/autodist/CHANGES deleted file mode 100644 index 73d44ff5..00000000 --- a/apps/autodist/CHANGES +++ /dev/null @@ -1,126 +0,0 @@ -Thu May 31 23:34:00 EEST 2007 Pekka Riikonen - - * Autodist 1.3.2. - - * Added 'prereq' directive to support encforcment of Autodist - version. - - * Added support for providing extra parameters to autodist that - are passed to the hook scripts. User can specify whatever - extra parameter they want. - -Wed Feb 21 15:45:50 EET 2007 Pekka Riikonen - - * Autodist 1.3.1. - -Sat Jun 24 23:38:24 EEST 2006 Pekka Riikonen - - * Match distdef names exactly (/^foo$/ instead of /^foo/). - -Wed May 4 10:58:24 EEST 2005 Pekka Riikonen - - * Autodist 1.3. - -Sun May 1 17:31:55 EEST 2005 Pekka Riikonen - - * Added support for dependencies in makefiles. - - * Added AD_DISABLE_DEPENDENCIES macro to disable Autodist - dependencies in makefiles. Added support for dependencies - in makefiles. - - * Added -p option to Autodist. It can be used to a process file - from the command line. - - * Added dependency support for configure.ad files as well. - -Sat Apr 30 17:49:05 EEST 2005 Pekka Riikonen - - * The 'noprocess' directive now works recursively with - directories. - -Sat Apr 30 11:49:01 EEST 2005 Pekka Riikonen - - * Added better debug messages. - - * Added log file creation, autodist.log and makedist.log. - - * Fixed license-header to change license only during packaging, - not also during preparation. - - * Fixed .ad processing when the file was not processed, to - copy the original to new name. - - * Fixed 'include' when copying directories to root of the - distdir, and the destination directory already exist. - -Fri Apr 29 16:48:16 EEST 2005 Pekka Riikonen - - * Fixed configure.ac creation when no fragments in use. - -Thu Apr 28 11:44:59 EEST 2005 Pekka Riikonen - - * The '.in' suffix with source file suffixes expects source code - format for the distdefs. - -Sun Apr 24 21:11:49 EEST 2005 Pekka Riikonen - - * Fixed undefining to actually work. - - * The top distribution now takes precedence on defined - distdefs over inherited distributions, and can override - defined and undefined distdefs (previously it could only - undefine defined but not define specificly undefined :)). - - * Prettier distdef output with -s. - -Sat Apr 23 12:49:09 EEST 2005 Pekka Riikonen - - * Autodist 1.2.1. - - * Fixed 'noprocess' sed script. - -Fri Apr 22 20:23:06 EEST 2005 Pekka Riikonen - - * Autodist 1.2. - - * Various 'cat' optimizations. - - * More test cases in tests/. - - * No Autodist header for "other" '.ad' files as we don't know - what the file contains. - - * No non-source distdef format processing for source files - anymore. - -Tue Apr 19 17:12:09 EEST 2005 Pekka Riikonen - - * Remove extra ' ' and '\t' when joining backslashed lines. - - * Fixed argument delivery to hook scripts. - -Mon Apr 18 21:05:42 EEST 2005 Pekka Riikonen - - * Process '*.ad' files before calling autoconf and automake. - - * Various shell compatibility kludges added. - -Mon Apr 18 20:06:24 EEST 2005 Pekka Riikonen - - * Autodist 1.1. - - * All 'local' variables must be at the start of function for - compatibility. - -Sun Apr 17 20:08:28 EEST 2005 Pekka Riikonen - - * Added TODO. - - * Added pre-process-dist-hook and post-process-dist-hook. - - * Added autodist.1. - -Sun Apr 16 23:00:02 EEST 2005 Pekka Riikonen - - * First release, Autodist 1.0. diff --git a/apps/autodist/COPYING b/apps/autodist/COPYING deleted file mode 100644 index 53293212..00000000 --- a/apps/autodist/COPYING +++ /dev/null @@ -1,25 +0,0 @@ - -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 deleted file mode 100644 index 56b077d6..00000000 --- a/apps/autodist/INSTALL +++ /dev/null @@ -1,236 +0,0 @@ -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 deleted file mode 100644 index c9d8c9ae..00000000 --- a/apps/autodist/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# -# 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 deleted file mode 100644 index e9545994..00000000 --- a/apps/autodist/README +++ /dev/null @@ -1,49 +0,0 @@ -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/TODO b/apps/autodist/TODO deleted file mode 100644 index 106cb484..00000000 --- a/apps/autodist/TODO +++ /dev/null @@ -1,8 +0,0 @@ -TODO In Autodist -================ - -o Better 'license-header' implementation. - -o Perhaps ability to partially re-license the source tree. Now all files - will be processed if 'license-header' is used. Only way to control - this is to use 'noprocess' or specify different header in file. diff --git a/apps/autodist/autodist.conf b/apps/autodist/autodist.conf deleted file mode 100644 index cbf17b5c..00000000 --- a/apps/autodist/autodist.conf +++ /dev/null @@ -1,49 +0,0 @@ -# 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 -c" - -# 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 deleted file mode 100755 index e4388ab0..00000000 --- a/apps/autodist/autodist.in +++ /dev/null @@ -1,2056 +0,0 @@ -#!/bin/sh -# -# Author: Pekka Riikonen -# -# Copyright (C) 2005 - 2007 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. -# - -############################################################################### -# Shell compatibility - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - # Despite of this, we have managed to segfault some zsh's. - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - - -############################################################################### -# 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 -doptions= -opt_template=false -opt_no_dist=false -opt_no_inherit=false - -# All includes -includes= - -# All excludes -excludes= - -# All noprocesses -noprocess= - -# All hooks -pre_hooks= -post_hooks= -pre_dist_hooks= -post_dist_hooks= -pre_p_dist_hooks= -post_p_dist_hooks= - -# Distribution license and license header -license= -licenseh= - -# Whether to output ad_debug information -debug=false -nolog=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 - ad_log "error: $1" - echo autodist: error: $1 - set +f - exit 1 -} - -# -# Prints out warning message -# -# Arguments: ad_warning -# -ad_warning() -{ - set -f - ad_log "warning: $1" - echo autodist: warning: $1 - set +f -} - -# -# Opens a log file. -# -# Arguments: ad_log_open -# -ad_log_open() -{ - rm -rf $1 - exec 5> $1 - - cat >&5 << EOF -This file contains messages produced by the Autodist $ver. - -EOF -} - -# -# Prints to an open log file -# -# Arguments: ad_log -# -ad_log() -{ - if test x$nolog = xfalse; then - echo "$1" >&5 - fi -} - -# -# Initializes the Autodist environment, creates default distribution -# directory, and default distribution. -# -# Arguments: ad_initialize -# -ad_initialize() -{ - ad_debug "Initializing Autodist environment" - - # 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 "Autodist environment initialized" -} - -# -# Creates the distdefs header file including defined distdefs -# -# Arguments: ad_create_distdefs_h -# -ad_create_distdefs_h() -{ - ad_debug "Creating distdef header file" - - fname=$DISTDEFS - rm -f $fname - cat > $fname <>$fname - done - - cat >> $fname </dev/null 2>/dev/null - fi - 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 "Ending configure creation" -} - -# -# Creates the configure.ac script from the configure.ad fragments in -# the source tree. Takes the source configure file as argument which -# is used to create the actual configure.ac. -# -# Arguments: ad_make_configure_ac -# -ad_make_configure_ac() -{ - local check - - ad_debug "Starting creating configure.ac: $1" - - ad_log "" - ad_log "Following configure.ad files were processed into configure.ac:" - ad_log "--------------------------------------------------------------" - - if test '!' -f $1; then - ad_fatal "The configure file '$1' does not exist" - fi - - check="`sed 's/^[ ]*//' < $1 | 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 . -type f -name configure\*\.ad` - for i in $cfs - do - if test "x$i" = "x$1"; then - continue - fi - - ad_debug "including $i" - ad_log " $i" - - cat $i >> configure.ad.cfs - done - - if test -f configure.ad.cfs; then - check="`sed 's/^[ ]*//' < $1 | 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" - cat > $fname < $fname.tmp - sed -e "/^AD_INCLUDE_CONFIGURE/d" $fname.tmp >> $fname - rm -f configure.ad.cfs $fname.tmp - else - cat $1 >> $fname - fi - - # Process AD_INIT - sed -e "/AD_INIT/s//AC_INIT([$distribution], [$dist_version], [$bug_report], [$package])/" $fname > $fname.tmp - - # Remove AD_DISABLE_DEPENDENCIES - sed -e "/^AD_DISABLE_DEPENDENCIES/d" $fname.tmp > $fname - - # Process for distribution - rm -f $fname.tmp - ad_process_file $fname $fname.tmp false - - # Remove any trailing backslashes - if test -f "$fname.tmp"; then - sed -e :a -e '/\\$/N; s/[ ]*\\\n//; ta' < $fname.tmp > configure.ac - else - cp -p $fname configure.ac - fi - rm -f $fname $fname.tmp - - ad_log " ./configure.ad" - ad_log "" - - ad_debug "Ending creating configure.ac: $1" -} - -# -# Creates the Makefile.in files by running the automake tool. -# -# Arguments: ad_make_makefile_ins -# -ad_make_makefile_ins() -{ - ad_debug "Starting creating Makefile.in files" - - if test "$AUTOMAKE"; then - ad_debug "Running automake" - $AUTOMAKE - if test $? != 0; then - ad_fatal "automake failed" - fi - fi - - ad_debug "Ending creating Makefile.in files" -} - -# -# Creates the Makefile.am files from the Makefile.ad files in the -# source tree. This runs the distribution specific processing for the -# Makefile.ad files. -# -# Arguments: ad_make_makefile_ams -# -ad_make_makefile_ams() -{ - ad_debug "Starting creating Makefile.am files" - - ad_log "" - ad_log "Following Makefile.ad files were processed into Makefile.am files:" - ad_log "------------------------------------------------------------------" - - files=`find . -type f -name Makefile\.ad` - for ff in $files - do - ad_log " $ff" - fname=`echo $ff | sed s/\.ad//` - ad_make_makefile_am $ff $fname.am - done - ad_log "" - - ad_debug "Ending creating Makefile.am files" -} - -# -# Creates Makefile.am file from the Makefile.ad file. -# -# Arguments: ad_make_makefile_am -# -ad_make_makefile_am() -{ - local am_deps=true - local f=$1 - local fname=$2 - - # Disable dependencies if requested - dc=`sed 's/^[ ]*//' < configure.ad | grep -v "^#" \ - | grep "AD_DISABLE_DEPENDENCIES"` - if test "$dc" = "AD_DISABLE_DEPENDENCIES"; then - am_deps=false - fi - - # Header for the Makefile.am - cat > $fname <> $fname - else - cat $f >> $fname - fi - - # Enable dependencies if requested - if test x$am_deps = xtrue; then - # Get list of configure.ad's to get them into deps also - cfs=`find . -type f -name configure\*\.ad` - cfs=`echo $cfs | sed 's/\.\///g'` - - cat >> $fname < [] -# -# 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() -{ - local incs - - ad_debug "Starting running includes: $1 $2" - - if test x$3 = xtrue; then - ad_log "" - ad_log "Following files and directories were included in distribution:" - ad_log "--------------------------------------------------------------" - fi - - # By default do not expand pathnames - set -f - - # Add : separator at the end - 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 - - if test x$3 = xtrue; then - ad_log " $src into $am_distdir/$d" - 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 "$ds" = "$d"; then - d="" - fi - if test '!' -d $am_distdir/$d && test "$ds" != "$d"; then - mkdir -p -- $am_distdir/$d || exit 1 - fi - - if test x$3 = xtrue; then - ad_log " $src into $am_distdir/$d" - 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 - - if test x$3 = xtrue; then - ad_log " $src into $am_distdir/$dst" - 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 pathnames 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 - - if test x$3 = xtrue; then - ad_log "" - fi - - set +f - - ad_debug "Ending running includes: $1 $2" -} - -# -# Excludes files specified in the distribution for exclusion. Used when -# creating the distribution for packaging. -# -# exclude has the following format in distfile: -# -# exclude -# -# The path may be file, directory or regular expression. -# -# Arguments: ad_dist_includes -# -ad_dist_excludes() -{ - ad_debug "Starting running excludes: $1" - - if test x$2 = xtrue; then - ad_log "" - ad_log "Following files and directories were excluded from distribution:" - ad_log "----------------------------------------------------------------" - fi - - cur=`pwd` - cd $am_distdir || exit 1 - for i in $1 - do - ad_debug "Excluding $i" - if test x$2 = xtrue; then - ad_log " $i" - fi - rm -rf $i - done - cd $cur || exit 1 - - if test x$2 = xtrue; then - ad_log "" - fi - - ad_debug "Ending running excludes: $1" -} - -# -# Processes the entire tree for distribution. This inspects files other -# than source and header files, with exception of any file with .ad -# suffix, and performs distribution processing for the file. The original -# file is replaced with the processed file. This function is used when -# creating the distribution for packaging. -# -# Arguments: ad_process_tree -# -ad_process_tree() -{ - ad_debug "Starting processing non-source files: $1" - - # Take files, except source and .ad files. - files=`find $am_distdir -type f \! -name \*\.ad \( \ - \! -name \*\.[cC] -a \ - \! -name \*\.[cC][cCpP] -a \ - \! -name \*\.[cC][xX][xX] -a \ - \! -name \*\.[cC][pP][pP] -a \ - \! -name \*\.[cC]++ -a \ - \! -name \*\.m -a \ - \! -name \*\.[hH] -a \ - \! -name \*\.hh -a \ - \! -name \*\.[cC]\.in -a \ - \! -name \*\.[cC][cCpP]\.in -a \ - \! -name \*\.[cC][xX][xX]\.in -a \ - \! -name \*\.[cC][pP][pP]\.in -a \ - \! -name \*\.[cC]++\.in -a \ - \! -name \*\.m\.in -a \ - \! -name \*\.[hH]\.in -a \ - \! -name \*\.hh\.in \)` - files=`echo $files | sed 's/$am_distdir//'` - - for ff in $files - do - ad_process_file $ff $ff.tmp true - if test -f $ff.tmp; then - rm -f $ff || exit 1 - mv -f $ff.tmp $ff || exit 1 - fi - done - - ad_debug "Ending processing non-source files: $1" -} - -# -# Processes the entire source tree for distribution. This inspects files -# in the source tree, with exception of any file with .ad suffix, and -# performs distribution processing for the file. The original file is -# replaced with the processed file. This function is used when creating -# the distribution for packaging. -# -# Call this before ad_process_tree(). -# -# Arguments: ad_process_source_tree -# -ad_process_source_tree() -{ - ad_debug "Starting processing source files: $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 -type f \! -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 -o \ - -name \*\.[cC]\.in -o \ - -name \*\.[cC][cCpP]\.in -o \ - -name \*\.[cC][xX][xX]\.in -o \ - -name \*\.[cC][pP][pP]\.in -o \ - -name \*\.[cC]++\.in -o \ - -name \*\.m\.in -o \ - -name \*\.[hH]\.in -o \ - -name \*\.hh\.in \)` - - for ff in $files - do - ad_process_source_file $ff $ff.tmp true - if test -f $ff.tmp; then - rm -f $ff || exit 1 - mv -f $ff.tmp $ff || exit 1 - fi - done - - ad_debug "Ending processing source files: $1" -} - -# -# Removes Autodist dependencies, as they cannot be delivered to distribution. -# -# Arguments: ad_remove_dependencies -# -ad_remove_dependencies() -{ - ad_debug "Removing dependencies" - - ams=`find $1 -type f -name Makefile\.\*` - for i in $ams - do - sed -e "/^# S_AD_ENABLE_DEPENDENCIES/,/^# E_AD_ENABLE_DEPENDENCIES/d" $i > $i.tmp - mv $i.tmp $i - done -} - -# -# Makes distribution sane, ala modtimes. Since we modify the distribution -# we need to make it sane after that. -# -# Arguments: ad_makedist_makesane -# -ad_makedist_makesane() -{ - ad_debug "Making distribution file modtimes sane" - - # 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/^[ ]*//'` - touch $am_distdir/$configh.in 1>/dev/null 2>/dev/null - - files=`find $am_distdir -type f -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 "Distribution made sane" -} - -# -# Creates distribution of the source tree. All files in the distribution -# will be processed and the distribution will be packaged. -# -# Arguments: ad_makedist -# -ad_makedist() -{ - ad_log_open "makedist.log" - ad_debug "Starting distribution creation" - - ad_log "Created distribution" - ad_log "--------------------" - ad_log "" - - 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=`grep "dist:" < autodist.dist | cut -d: -f2` || exit 1 - dist_version=`grep "ver:" < autodist.dist | cut -d: -f2` || exit 1 - am_distdir=`grep "distdir:" < autodist.dist | cut -d: -f2` || exit 1 - params=`grep "params:" < autodist.dist | cut -d: -f2` || exit 1 - ad_parse_distribution $distribution false - ad_log " Distribution: $distribution $dist_version" - ad_log " Destination directory: $am_distdir" - ad_log "" - ad_process_distdefs - - if test x$opt_no_dist = xtrue; then - ad_fatal "The '$distribution' distribution cannot be packaged" - fi - - # Run pre-dist-hooks - ad_run_dist_hooks "$pre_dist_hooks" "$params" - - # 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-process-dist-hooks - ad_run_dist_hooks "$pre_p_dist_hooks" "$params" - - # Run excludes - ad_dist_excludes "$excludes" true - - # Run includes - ad_dist_includes "$includes" false true - - # Include specific license file if specified - if test "$license" != ""; then - ad_log "" - ad_log "License file in distribution:" - ad_log "-----------------------------" - ad_log " $license into $am_distdir/COPYING" - ad_log "" - cp -p $license $am_distdir/COPYING || exit 1 - fi - - # Remove dependencies - ad_remove_dependencies $am_distdir - - # Process noprocesses, first pass - ad_process_noprocess true - - ad_log "" - ad_log "Following files were not re-licensed:" - ad_log "-------------------------------------" - - # 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 - - ad_log "" - - # Process noprocesses, second pass - ad_process_noprocess false - - # Run post-process_dist-hooks - ad_run_dist_hooks "$post_p_dist_hooks" "$params" - - # 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 - ad_debug "Compressing distribution package $am_distdir.tar.gz" - gzip -9 -c $am_distdir.tar > $am_distdir.tar.gz || exit 1 - fi - if test x$ad_bzip2 = xtrue; then - ad_debug "Compressing distribution package $am_distdir.tar.bz2" - bzip2 -9 -c $am_distdir.tar > $am_distdir.tar.bz2 || exit 1 - fi - if test x$ad_compress = xtrue; then - ad_debug "Compressing distribution package $am_distdir.tar.Z" - compress -c $am_distdir.tar > $am_distdir.tar.Z || exit 1 - fi - if test x$ad_zip = xtrue; then - rm -f $am_distdir.zip - ad_debug "Compressing distribution package $am_distdir.zip" - zip -rq $am_distdir.zip $am_distdir || exit 1 - fi - rm -f $am_distdir.tar - - # Run post-dist-hooks - ad_run_dist_hooks "$post_dist_hooks" "$params" - - # Cleanup - rm -rf $am_distdir - - ad_log "Distribution created successfully." - - ad_debug "Ending distribution creation" -} - -# -# Handles distribution options. -# -# option has the following format in distfile: -# -# option