debian/0000755000000000000000000000000011773401325007171 5ustar debian/compat0000644000000000000000000000000211760654147010377 0ustar 8 debian/sputnik.10000644000000000000000000000116311176341673010757 0ustar .\"Text automatically generated by txt2man .TH sputnik 1 "30 April 2009" "" "sputnik documentation" .SH NAME \fBsputnik \fP- utility to create sputnik based cgi or wsapi files \fB .SH SYNOPSIS .nf .fam C \fBsputnik\fP \fImake-cgi\fP .fam T .fi .fam T .fi .SH DESCRIPTION Creates in the current working directory two files: .TP .B sputnik.cgi suitable for the CGI and Fast CGI protocols (see README.Debian for more details) .TP .B sputnik.ws suitable for wsapi protocol, supported for example by the xavante web server .SH SEE ALSO /usr/share/doc/\fBsputnik\fP/README.Debian .SH AUTHOR Enrico Tassi debian/rocks0000644000000000000000000000023011176664163010240 0ustar colors diff recaptcha saci sputnik sputnik-markitup sputnik-auth-mysql sputnik-auth-sqlite3 versium versium-git versium-mysql versium-sqlite3 xssfilter debian/sputnik.docs0000644000000000000000000000001311763637704011545 0ustar README.txt debian/rules0000755000000000000000000000272311763637517010272 0ustar #!/usr/bin/make -f PACKAGES := $(shell grep Package: debian/control | cut -d : -f 2) ROCKS_sputnik := diff xssfilter \ recaptcha medialike \ saci sputnik define makedirs mkdir -p $(shell pwd)/debian/$(1)/usr/share/lua/5.1/ mkdir -p $(shell pwd)/debian/$(1)/usr/share/doc/$(1)/docs/ endef mk-dirs-%: $(call makedirs,$*) mk-all-dirs: $(addprefix mk-dirs-,$(PACKAGES)) # define installrocks DEST=$(shell pwd)/debian/$(1)/ && \ for R in $(2); do \ cp -r $$R/lua/* $$DEST/usr/share/lua/5.1/ && \ if [ -d $$R/doc/ ]; then \ mkdir -p $$DEST/usr/share/doc/$(1)/docs/$$R/ && \ cp -r $$R/doc/* $$DEST/usr/share/doc/$(1)/docs/$$R/ && \ rm -f $$DEST/usr/share/doc/$(1)/docs/$$R/*.rss; \ fi; \ done rm -f $(shell pwd)/debian/$(1)/usr/share/lua/5.1/luadoc.log rmdir $(shell pwd)/debian/$(1)/usr/share/lua/5.1/medialike || true endef inst-rocks-%: $(call installrocks,$*,$(ROCKS_$*)) inst-all-rocks: $(addprefix inst-rocks-,$(PACKAGES)) # %: dh $@ override_dh_auto_install: make -f debian/rules mk-all-dirs inst-all-rocks mkdir -p debian/sputnik/usr/bin/ mkdir -p debian/sputnik/usr/share/doc/sputnik/sample-config/ cp sputnik/bin/sputnik.lua debian/sputnik/usr/bin/sputnik chmod +x debian/sputnik/usr/bin/* cp -r debian/samples/* \ debian/sputnik/usr/share/doc/sputnik/sample-config/ override_dh_auto_build: txt2man -s 1 -t sputnik \ -v 'sputnik documentation' debian/sputnik.1.txt > sputnik.1 override_dh_compress: dh_compress -X .lua -X .xcf debian/samples/0000755000000000000000000000000011773401325010635 5ustar debian/samples/xavante/0000755000000000000000000000000011773401325012303 5ustar debian/samples/xavante/vserver.lua0000644000000000000000000000132411041114261014466 0ustar require 'wsapi.xavante' local PathToCgi = '/var/www/wiki/' local simplerules = { { match = "^[^%./]*/$", with = xavante.redirecthandler, params = {"/wiki.cgi"} }, { match = { "^/wiki.cgi$" }, with = wsapi.xavante.makeGenericHandler(PathToCgi, true) }, { match = { "^/wiki$" }, with = xavante.redirecthandler, params = {"/wiki.cgi"} }, { match = { "^/wiki/(.*)$" }, with = xavante.redirecthandler, params = {"/wiki.cgi", function(req,res,cap) print(req.cmd_url) req.cmd_url = "/wiki.cgi?p="..cap[1] return "reparse" end } }, } -- add your vhost rules to the virtualhosts map -- config.virtualhosts["mydomain:8080"] = { rules = simplerules, } debian/samples/wiki.cgi0000644000000000000000000000047511041114261012256 0ustar #! /usr/bin/env lua5.1 require 'sputnik' local conf = { -- required parameters, remember to make the wiki data directory -- writeable to the user that will run the web server (www-data) -- VERSIUM_PARAMS = { '/var/www/wiki/data' }, BASE_URL = '/wiki', } return sputnik.new_wsapi_run_fn(conf) debian/copyright0000644000000000000000000002457111772267436011151 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: sputnik Upstream-Contact: Yuri Takhteyev Source: https://github.com/yuri/sputnik/ Files: * Copyright: 2007-2012 Yuri Takhteyev, Jim Whitehead II Comment: In the Lua community this license is better known as "MIT". Unfortunately other variants of this license are also known as "MIT". To obtain a machine intepretable copyright file Debian prefers to name this version of the MIT license using the non ambiguous term "Expat". License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Files: external/crystal_icons/* sputnik/node_defaults/icons/* Copyright: Everaldo Coalhoa License: LGPL-2.1+ The software also ships some icons in a base64 encoded form. They come from the Crystal Project, and are licensed un GNU LGPL, see: /usr/share/common-licenses/LGPL-2.1 Files: sputnik/lua/sputnik/util/yui_reset.lua Copyright: 2008, Yahoo! Inc. License: BSD-3-clause Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. * Neither the name of Yahoo! Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of Yahoo! Inc. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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. Files: external/jquery/* Copyright: 2008, John Resig (jquery.com) License: Expat and GPL-2 A copy of the GPL license can be found in /usr/share/common-licenses. Files: external/fonts/lobster/* Copyright: Pablo Impallari License: OFL-1.1 PREAMBLE . The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. . The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. . DEFINITIONS . "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may . include source files, build scripts and documentation. . "Reserved Font Name" refers to any names specified as such after the copyright statement(s). . "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). . "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. . "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. . PERMISSION & CONDITIONS . Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: . 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. . 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. . 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. . 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. . 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. . TERMINATION . This license becomes null and void if any of the above conditions are not met. . DISCLAIMER . THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Files: sputnik/lua/sputnik/javascript/sorttable.lua Copyright: 1997-date Stuart Langridge License: MIT Files: external/modernizr/* Copyright: Faruk Ates, Paul Irish, Alex Sexton License: MIT and BSD-3-clause License: BSD-3-clause Copyright (c) 2011 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. * Neither the name of the Organization nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER 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. License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/source/0000755000000000000000000000000011773401325010471 5ustar debian/source/format0000644000000000000000000000001411612503534011674 0ustar 3.0 (quilt) debian/sputnik.manpages0000644000000000000000000000002111176341673012402 0ustar debian/sputnik.1 debian/sputnik.README.Debian0000644000000000000000000002076311773401273012740 0ustar This is a short howto to help you to set up a Sputnik wiki. More infos can be found at http://spu.tnik.org . Contents ======== 1. Setting up a Sputnik cgi 2. Configuration Parameters 3. Nice URLs 4. Access control 5. Git backend 6. Sqlite3 backend 7. Using Apache2 as a proxy 8. Using a system wide instance of Xavante Setting up a Sputnik instance ============================= To create an instance of a Sputnik wiki please use the `sputnik make-cgi` command. Note that some parameters can be passed to this command, like the directory in which Sputnik will store the date of the wiki, or the `--without-luarocks`. This will produce two files in your current working directory: - `sputnik.ws` can be used to start Sputnik in Xavante, a web server that is included with Sputnik; - `sputnik.cgi` can be used with any CGI server and can be easily adapted for use with FastCGI. To start Sputnik with Xavante, use: sputnik start-xavante This will start Xavante on port 8080. Please see "sputnik help" for more options. To use Sputnik via CGI, use sputnik.cgi as your CGI script. You may need to correct your the first line to point to the right version of Lua. You will also need to set the correct permissions. If you want to use the FastCGI mechanism instead of the classic CGI one, you can edit `sputnik.cgi` and replace the last two lines with: require("wsapi.fastcgi") wsapi.fastcgi.run(my_app) You will also need to install wsapi-fcgi package. Configuration Parameters ======================== sputnik.ws and sputnik.cgi files generated with "sputnik make-cgi" define a number of configuration parameters that control Sputnik's behavior. This is the minimum set of parameters that is necessary to get Sputnik running. Once Sputnik is running, however, you can edit additional parameters by navigating to "sputnik/config" node in your browser. You will need to login as `Admin` to edit this node. To create this account, just click on the "register" link, enter "Admin" as the user name and choose what you want the admin password to be. To learn about the different parameters, use "sputnik topic" command. Please note that some of the configuration parameters are applied immediately, but others will only apply once Xavante is restarted. Nice URLs ========= So far the URLs are something like `http://yourdomain:8080/?p=somepage` or `http://yourdomain/cgi-bin/sputnik.cgi?p=somepage`. Setting the sputnik `USE_NICE_URLS=true` variable you can obtain URLs like `http://yourdomain:8080/somepage` `http://yourdomain/wiki/somepage`. When Sputnik in its own dedicated Xavante instance (using "sputnik start-xavante"), setting USE_NICE_URLS to true is all you need to do. For other setups, however, you may also need to change the BASE_URL to reflect the URLs you want to use and to configure proper rewrite rules for your web server. See documentation available through "sputnik topic urls" and the project's wiki for more information. Access control ============== After creating the `Admin` user, you may want to make the wiki read-only or only allow edits by authenticated users. To edit permissions for all nodes, login as `Admin`, navigate to the "@Root" node, click on the "Configure" button, then edit the permissions rules in the "Permissions" box under "Advanced Fields". For example, to disallow edits by non-admin users you would need to comment out the following line (the initial -- starts a comment): -- allow(all_users, edit_and_save) -- edit, save, preview You can also set permissions for individual nodes by clicking on the "Configure" button for those specific nodes. It is also possible to set permissions for a class of nodes by creating a "prototype" nodes, configuring it, and setting node as a "prototype" for all nodes that should have the same permissions. You may also inhibit the registration of new users. To achieve this you have to set the `DISABLE_REGISTRATION=true` variable in the configuration node ("sputnik/config"). If you want to allow anonymous edits, but you want an additional protection from spam, you may use the recaptcha service adding the following lines to your `sputnik.cgi` conf table: CAPTCHA_MODULE = 'recaptcha', CAPTCHA_PARAMS = { PUBLIC, PRIVATE}, Note that `PUBLIC` and `PRIVATE` here are values that you get with you recaptcha account. This mechanism is also used to protect new users creation. You can also require email verification of new accounts. You need a working SMTP server and to add the following lines to your `sputnik.cgi` conf table: SMTP_SERVER = "localhost", SMTP_SERVER_PORT = "25", SMTP_USERNAME = "username", SMTP_PASSWORD = "pa$$w0rd", The last three parameters are optional. Configuring your Sputnik to email account verification will also automatically allow users to reset their password via email. (The passwords will never be sent by email but the user will be able to get a temporary token that would allow them to reset their password.) Git backend =========== If you want to use a Git-based backend, instead of the plain file default one, put the following snippet in your configuration table. VERSIUM_STORAGE_MODULE = 'versium.git', Also remember to run `git init` in the wiki-data directory as the user that will run Sputnik (`www-data` if you use Apache or system wide Xavante) and to _end_and_start_the_path_ with a '/', otherwise it will not work (this also means the path has to be absolute). Using the Git backend gives you the following benefits: 1. You can access your wiki history without the browser by just using "git log" (e.g. "git log Home_Page.lua") 2. You can edit files by hand, then commit changes through Git, and those changes will then show up in Sputnik's history. 3. You can pull files from the server that runs Sputnik onto your laptop, edit them locally in your favorite editor, commit, push, and the changes will appear (with history!) in the Sputnik running on the server. (Or, you can sync data between two Sputniks - e.g., one running on the server and one running locally.) 4. If you are doing 3 and meanwhile someone edits the data on the server, you can actually merge them. SQLite3 backend =============== To use the sqlite3 backend you can put the following snippet in your configuration table. VERSIUM_PARAMS = { '/some/path/wiki-data.db' }, VERSIUM_STORAGE_MODULE = "versium.sqlite3", The wiki-data.db file should not exist, but make sure your web server has permissions to create it. Using Apache2 as a proxy ======================== Xavante is a nice piece of software, but you may want to use a well tested alternative like Apache at least to proxy your Xavante daemon protecting it. Assuming you are running Xavante on localhost:8080, the following Apache2 snippet plus the command `a2enmod proxy_http` should do the job: ProxyRequests Off Order deny,allow Allow from all ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ Using a system wide instance of Xavante ======================================= If you want to use a system wide instance of Xavante you may find the following notes useful. Nevertheless this is more complex and the recommended solution is to use `sputnik start-xavante`. You have to edit the configuration file of Xavante and create a generic WSAIU handler for the Sputnik CGI with an entry like the following one: { match = { "^/sputnik.ws$" }, with = wsapi.xavante.makeGenericHandler(PathToCgi, {isolated=false})}, Be careful to not omit the last parameter, since it avoids a caching mechanism that makes Sputnik behave wrongly. PathToCgi is the directory in which you placed the Sputnik `ws` file. Remember to require 'wsapi.xavante' at the beginning of the configuration file. To have nice URLs with system wide instance of Xavante you have to tune its configuration file further. Add the following lines to your Xavante configuration file: { match = "^[^%./]*/$", with = xavante.redirecthandler, params = {"/sputnik.ws"} }, { match = { "^/wiki$" }, with = xavante.redirecthandler, params = {"/sputnik.ws"} }, These rules make requests to `http://yourdomain/` and `http://yourdomain/wiki` to be handled by the wiki's main node. { match = { "^/wiki/(.*)$" }, with = xavante.redirecthandler, params = {"/sputnik.ws", function(req,res,cap) req.cmd_url = "/sputnik.ws?p="..cap[1] return "reparse" end } }, This rule rewrites URLs like `http://yourdomain/wiki/yourpage` to `http://yourdomain/sputnik.ws?p=yourpage` specifying a custom action to the redirection handler. debian/control0000644000000000000000000000346011765435434010610 0ustar Source: sputnik Section: web Priority: optional Maintainer: Enrico Tassi Build-Depends: debhelper (>= 8), txt2man Standards-Version: 3.9.3 Vcs-Svn: svn://svn.debian.org/pkg-lua/packages/sputnik Vcs-Browser: http://svn.debian.org/viewsvn/pkg-lua/packages/sputnik Homepage: http://spu.tnik.org/ Package: sputnik Architecture: all Depends: lua5.1-coxpcall, lua5.1-wsapi, lua5.1-markdown, lua5.1-cosmo, lua5.1-filesystem, lua5.1-md5, lua5.1-socket, lua5.1, ${misc:Depends} Recommends: lua5.1-posix, lua5.1-iconv Suggests: git, lua5.1-sql-sqlite3, lua5.1-sql-mysql, lua5.1-logging, lua5.1-zlib, xavante Description: Extensible wiki Sputnik is a wiki written in Lua. It is also a platform for building a range of wiki-like applications, drawing on Lua's strengths as an extension language. . Out of the box Sputnik behaves like a wiki with all the standard wiki features: editable pages, protection against spam bots, history view of pages, diff, preview, per-page-RSS feed for site changes. . At the same time, Sputnik is designed to be used as a platform for a wide range of "social software" applications. Sputnik stores its data as versioned "pages" that can be editable through the web, and it allows those pages to store any data that can be saved as text (prose, comma-separated values, lists of named parameters, Lua tables, mbox-formatted messages, XML, etc.) While by default the page is displayed as if it carried Markdown-formatted text, the way the page is viewed (or edited, or saved, etc.) can be overridden on a per-page basis by over-riding or adding "actions". . The packages provide a wide range of storage modules that may require one of the suggested packages: git, lua5.1-sql-sqlite3, lua5.1-sql-mysql. . The easiest form of deployment is by using the Xavante web server. debian/changelog0000644000000000000000000000713311773401312011043 0ustar sputnik (12.06.27-2) unstable; urgency=low * Doc fixup -- Enrico Tassi Thu, 28 Jun 2012 10:41:40 +0200 sputnik (12.06.27-1) unstable; urgency=low * New upstream release -- Enrico Tassi Wed, 27 Jun 2012 09:03:51 +0200 sputnik (12.06.26-1) unstable; urgency=low * New upstream release -- Enrico Tassi Tue, 26 Jun 2012 10:16:00 +0200 sputnik (12.06.25-1) unstable; urgency=low * New upstream release, including the jquery source -- Enrico Tassi Mon, 11 Jun 2012 20:44:32 +0200 sputnik (12.06.04-5) unstable; urgency=low * Add build-dep on txt2man (Closes: #676744 -- Enrico Tassi Mon, 11 Jun 2012 16:46:54 +0200 sputnik (12.06.04-4) unstable; urgency=low * Few more fixes to the doc -- Enrico Tassi Fri, 08 Jun 2012 09:58:44 +0200 sputnik (12.06.04-3) unstable; urgency=low * Fix README.Debian index -- Enrico Tassi Fri, 08 Jun 2012 09:53:46 +0200 sputnik (12.06.04-2) unstable; urgency=low * Update copyright and README.Debian -- Enrico Tassi Thu, 07 Jun 2012 16:58:06 +0200 sputnik (12.06.04-1) unstable; urgency=low * New upstream release: Galaxy 12.06.04 including additional tarballs for: - diff 8.06.15 (required) - medialike 8.08.08 (extra) - recaptcha 8.05.26 (extra) - xssfilter 10.12.28 (extra) - jquery 1.2.3 (extra, to conform to DFSG) * Standards-version bumped to 3.9.3, no changes * Switch from CDBS to dh * debian/compat set to 8 * Remove sputnik-storage-* packages, since they are now merged inside sputnik * Update package dependencies * Dependencies renamed according to the new Lua policy * Suggest the packages needed for optional storage backends * Copyright format 1.0 -- Enrico Tassi Thu, 07 Jun 2012 15:18:47 +0200 sputnik (9.03.13+1-4) unstable; urgency=low * Standards-version bumped to 3.9.2, no changes * source format 3.0 (quilt) -- Enrico Tassi Sat, 23 Jul 2011 10:30:57 +0200 sputnik (9.03.13+1-3) unstable; urgency=low * removed Recommend on sputnik-goodies (Closes: #544123) -- Enrico Tassi Sun, 30 Aug 2009 14:01:33 +0200 sputnik (9.03.13+1-2) unstable; urgency=low * added dependency over lua-coxpcall (Closes: #539993) -- Enrico Tassi Wed, 05 Aug 2009 18:33:56 +0200 sputnik (9.03.13+1-1) unstable; urgency=low * Missing module (sputnik-markitup) added to the source tarball. -- Enrico Tassi Fri, 01 May 2009 23:23:06 +0200 sputnik (9.03.13-1) unstable; urgency=low * Upstream ships a sputnik binary, old sputnik-mk-cgi removed in favour of 'sputnik make-cgi' * README.Debian updated according to the new sputnik binary * New upstream version with major improvements. Highlights: * the default edit UI is simplified * a script to create CGI files * a @Discussion node type allows creation of forum nodes * built-in search (simple and slow) * simpler admin interface * better reponsiveness * menu can now be on the side * permissions are now more extensible and support groups * debian-friendly icons * lbase64 no longer needed -- Enrico Tassi Thu, 30 Apr 2009 17:30:01 +0200 sputnik (8.10.05+dfsg-1) unstable; urgency=low * Initial release. (Closes: #475760) -- Enrico Tassi Fri, 25 Jul 2008 23:04:19 +0200 debian/sputnik.1.txt0000644000000000000000000000130111763644155011572 0ustar NAME sputnik - utility to create sputnik cgi and wsapi files or to start Xavante SYNOPSIS sputnik make-cgi [data-dir] [--without-luarocks] sputnik start-xavante ws-file DESCRIPTION The make-cgi action creates in the current working directory two files: sputnik.cgi suitable for the CGI and Fast CGI protocols (see README.Debian for more details) sputnik.ws suitable for wsapi protocol, supported for example by the Xavante web server The start-xavante ws-file action runs a new instance of the Xavante web server running the wiki configured in ws-file. SEE ALSO /usr/share/doc/sputnik/README.Debian AUTHOR Enrico Tassi debian/patches/0000755000000000000000000000000011773401325010620 5ustar debian/patches/series0000644000000000000000000000001511763634474012045 0ustar #sputnik-bin debian/patches/sputnik-bin0000644000000000000000000000716511761222257013021 0ustar Index: sputnik-12.05.29/sputnik/bin/sputnik.lua =================================================================== --- sputnik-12.05.29.orig/sputnik/bin/sputnik.lua 2012-05-29 18:37:36.000000000 +0200 +++ sputnik-12.05.29/sputnik/bin/sputnik.lua 2012-05-29 21:33:47.000000000 +0200 @@ -1,8 +1,13 @@ +#!/usr/bin/env lua5.1 -pcall(require, "luarocks.require") +-- pcall(require, "luarocks.require") local function parse_args(arg) - local parsed = {} + local parsed = { + lua = '/usr/bin/env lua5.1', + datadir = '/var/www', + use_luarocks = '--', + } for i,v in ipairs(arg) do local flag, val = v:match('^%-%-(%w+)=(.*)') if flag then Index: sputnik-12.05.29/sputnik/lua/sputnik/cli/make-cgi.lua =================================================================== --- sputnik-12.05.29.orig/sputnik/lua/sputnik/cli/make-cgi.lua 2012-05-29 18:37:36.000000000 +0200 +++ sputnik-12.05.29/sputnik/lua/sputnik/cli/make-cgi.lua 2012-05-29 21:33:47.000000000 +0200 @@ -6,6 +6,6 @@ local without_luarocks = WITHOUT_LUAROCKS or args['without-luarocks'] installer.reset_salts() - installer.make_wsapi_script(dir, "sputnik.ws", {without_luarocks=without_luarocks}) - installer.make_cgi_file(dir, "sputnik.cgi", {without_luarocks=without_luarocks}) + installer.make_wsapi_script(args, "sputnik.ws", {without_luarocks=without_luarocks}) + installer.make_cgi_file(args, "sputnik.cgi", {without_luarocks=without_luarocks}) end Index: sputnik-12.05.29/sputnik/lua/sputnik/installer.lua =================================================================== --- sputnik-12.05.29.orig/sputnik/lua/sputnik/installer.lua 2012-05-29 18:37:36.000000000 +0200 +++ sputnik-12.05.29/sputnik/lua/sputnik/installer.lua 2012-05-29 21:33:47.000000000 +0200 @@ -8,18 +8,18 @@ WS_SCRIPT_TEMPLATE = [=[ require('sputnik.wsapi_app') return sputnik.wsapi_app.new{ - VERSIUM_PARAMS = { [[$dir/wiki-data/]] }, + VERSIUM_PARAMS = { [[$datadir/wiki-data/]] }, BASE_URL = '/', PASSWORD_SALT = '$password_salt', TOKEN_SALT = '$token_salt', } ]=] -CGI_TEMPLATE = [=[#! $dir/bin/lua -$require_luarocks +CGI_TEMPLATE = [=[#! $lua +$use_luarocks $require_luarocks require('sputnik.wsapi_app') local my_app = sputnik.wsapi_app.new{ - VERSIUM_PARAMS = { [[$dir/wiki-data/]] }, + VERSIUM_PARAMS = { [[$datadir/wiki-data/]] }, BASE_URL = '/cgi-bin/sputnik.cgi', PASSWORD_SALT = '$password_salt', TOKEN_SALT = '$token_salt', @@ -52,11 +52,11 @@ end -function make_script(dir, subpath, template, options) +function make_script(args, subpath, template, options) options = options or {} - dir = dir or lfs.currentdir() + dir =args. dir or lfs.currentdir() local path = dir.."/"..subpath if lfs.attributes(path) then @@ -81,15 +81,18 @@ password_salt = password_salt, token_salt = token_salt, require_luarocks = require_luarocks, + lua = args.lua or dir .. '/bin/lua', + datadir = args.datadir or dir, + use_luarocks = args.use_luarocks or '', } out:write(content) out:close() end -function make_wsapi_script(dir, subpath, options) - make_script(dir, subpath, WS_SCRIPT_TEMPLATE, options) +function make_wsapi_script(args, subpath, options) + make_script(args, subpath, WS_SCRIPT_TEMPLATE, options) end -function make_cgi_file(dir, subpath, options) - make_script(dir, subpath, CGI_TEMPLATE, options) +function make_cgi_file(args, subpath, options) + make_script(args, subpath, CGI_TEMPLATE, options) end