X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=doc%2Fsource%2Fdeveloper-manual.sgml;h=bed6592ac75b71df7e3e796b6e7c49652b99d57d;hb=7ecdaff4e6e989eaa70d1ffec88c0e5dfbeb19bb;hp=fba281f153a204823f11cf9ac1b319f990abb5a2;hpb=f26ad1e47ece410dd2923932a51f368de6d5d9cc;p=privoxy.git
diff --git a/doc/source/developer-manual.sgml b/doc/source/developer-manual.sgml
index fba281f1..bed6592a 100644
--- a/doc/source/developer-manual.sgml
+++ b/doc/source/developer-manual.sgml
@@ -5,10 +5,7 @@
-
-
-
-
+
@@ -18,15 +15,11 @@
]>
- Copyright &my-copy; 2001-2009 by
- Privoxy Developers
+ Copyright
+ &my-copy; 2001-2018 by
+ Privoxy Developers
-
- $Id: developer-manual.sgml,v 2.50 2012/05/27 15:31:24 fabiankeil Exp $
-
-
-
@@ -138,7 +127,7 @@ Hal.
Quickstart to Privoxy Development
The first step is to join the developer's mailing list.
+ url="https://lists.privoxy.org/mailman/listinfo/privoxy-devel">privoxy-devel mailing list.
You can submit your ideas, or even better patches. Patches are best
submitted to the Sourceforge tracker set up for this purpose, but
can be sent to the list for review too.
@@ -169,11 +158,8 @@ Hal.
Access to CVS
The project's CVS repository is hosted on
- SourceForge.
- Please refer to the chapters 6 and 7 in
- SF's site
- documentation for the technical access details for your
- operating system. For historical reasons, the CVS server is
+ SourceForge.
+ For historical reasons, the CVS server is
called ijbswa.cvs.sourceforge.net, the repository is
called ijbswa, and the source tree module is called
current.
@@ -187,7 +173,8 @@ Hal.
mentioned, the sources are in the currentmodule. Other modules are present for platform specific
issues. There is a webview of the CVS hierarchy at http://ijbswa.cvs.sourceforge.net/ijbswa/,
+ url="http://ijbswa.cvs.sourceforge.net/viewvc/ijbswa/"
+ >http://ijbswa.cvs.sourceforge.net/viewvc/ijbswa/,
which might help with visualizing how these pieces fit together.
+
+ Writing Documentation Using DocBook - A Crash Course useful.
@@ -511,7 +496,6 @@ Hal.
Here it is:
-
@@ -522,21 +506,24 @@ Hal.
Tags delimiting a block of text (even small
blocks) should be on their own line. Like:
+
<para>
Some text goes here.
</para>
+
Tags marking individual words, or few words, should be in-line:
+
Just to <emphasis>emphasize</emphasis>, some text goes here.
-
Tags should be nested and step indented for block text like: (except
in-line tags)
+
<para>
<itemizedlist>
@@ -548,6 +535,7 @@ Hal.
</itemizedlist>
</para>
+
This makes it easier to find the text amongst the tags ;-)
@@ -608,7 +596,6 @@ Hal.
-
@@ -640,7 +627,6 @@ Hal.
custom entities are listed below. See any of the main docs for examples.
-
@@ -684,7 +670,6 @@ Hal.
-
There are others in various places that are defined for a specific
purpose. Read the source!
@@ -952,11 +937,9 @@ int ms_iis5_hack = 0;
Instead of:
-
int msiis5hack = 0; int msIis5Hack = 0;
-
@@ -979,12 +962,10 @@ int load_some_file(struct client_state *csp)
Instead of:
-
int loadsomefile(struct client_state *csp)
int loadSomeFile(struct client_state *csp)
-
@@ -1003,13 +984,12 @@ int loadSomeFile(struct client_state *csp)
(.h) extern int load_aclfile(struct client_state *csp);
(.c) int load_aclfile(struct client_state *csp)
- Instead of:
+ Instead of:
(.h) extern int load_aclfile(struct client_state *); or
(.h) extern int load_aclfile();
(.c) int load_aclfile(struct client_state *csp)
-
@@ -1061,7 +1041,6 @@ int loadSomeFile(struct client_state *csp)
Instead of:
-
#define USE_IMG_LST 1 or
#define _USE_IMAGE_LIST 1 or
@@ -1069,7 +1048,6 @@ int loadSomeFile(struct client_state *csp)
#define use_image_list 1 or
#define UseImageList 1
-
@@ -1470,12 +1448,10 @@ for (size_t cnt = 0; cnt < len; cnt++)
Exception:
-
/* This is not a local include, but requires a path element. */
#include <sys/fileName.h>
-Note: Please! do not add "-I." to the Makefile
without a _very_ good reason. This duplicates the #include
@@ -1809,7 +1785,7 @@ const char FILENAME_rcs[] = "$I<!-- Break CVS Substitution -->d$";
* Purpose : (Fill me in with a good description!)
*
* Copyright : Written by and Copyright (C) 2001-2009
- * the Privoxy team. http://www.privoxy.org/
+ * the Privoxy team. https://www.privoxy.org/
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
@@ -1841,7 +1817,7 @@ const char FILENAME_h_rcs[] = FILENAME_H_VERSION;
Note: This declares the rcs variables that should be
- added to the "show-proxy-args" page. If this is a brand new
+ added to the "show-version" page. If this is a brand new
creation by you, you are free to change the "Copyright" section
to represent the rights you wish to maintain.
@@ -1863,7 +1839,7 @@ const char FILENAME_h_rcs[] = FILENAME_H_VERSION;
* Purpose : (Fill me in with a good description!)
*
* Copyright : Written by and Copyright (C) 2001-2009
- * the Privoxy team. http://www.privoxy.org/
+ * the Privoxy team. https://www.privoxy.org/
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
@@ -1954,13 +1930,14 @@ int FUNCTION_NAME(void *param1, const char *x)
Testplan for releases
Explain release numbers. major, minor. developer releases. etc.
-
+
Remove any existing rpm with rpm -e
Remove any file that was left over. This includes (but is not limited to)
+ /var/log/privoxy/etc/privoxy
@@ -1968,7 +1945,7 @@ Remove any file that was left over. This includes (but is not limited to)
/etc/init.d/privoxy/usr/doc/privoxy*
-
+
Install the rpm. Any error messages?
@@ -1978,26 +1955,72 @@ Install the rpm. Any error messages?
Start browsing. Does Privoxy work? Logfile written?Remove the rpm. Any error messages? All files removed?
-
+
- Test reports
-
-Please submit test reports only with the test form
-at sourceforge. Three simple steps:
-
-
- Select category: the distribution you test on.
- Select group: the version of Privoxy that we are about to release.
- Fill the Summary and Detailed Description with something
- intelligent (keep it short and precise).
-
-
- Do not mail to the mailing list (we cannot keep track on issues there).
-
+ Fuzzing Privoxy
+
+ To make fuzzing more convenient, Privoxy can be configured
+ with --enable-fuzz which will result in the --fuzz option
+ becoming available.
+
+
+ Example (tested on ElectroBSD):
+
+
+# Compile Privoxy with instrumentation for afl
+$ export CC=afl-clang
+$ export CFLAGS="-fsanitize=address -ggdb"
+$ export CPPFLAGS=-I/usr/local/include/
+$ export LDFLAGS="-fsanitize=address -L/usr/local/lib"
+$ export AFL_USE_ASAN=1
+$ export AFL_HARDEN=1
+$ ./configure --with-debug --enable-extended-host-patterns --enable-accept-filter --enable-no-gifs --enable-compression --enable-strptime-sanity-checks --enable-external-filters --enable-fuzz
+
+$ ./privoxy --fuzz
+Privoxy version 3.0.24 (http://www.privoxy.org/)
+Usage: ./privoxy [--config-test] [--chroot] [--help] [--no-daemon] [--pidfile pidfile] [--pre-chroot-nslookup hostname] [--user user[.group]] [--version] [configfile]
+ ./privoxy --fuzz fuzz-mode ./path/to/fuzzed/input [--stfu]
+
+Supported fuzz modes and the expected input:
+ action: Text to parse as action file.
+ client-request: Client request to parse. Currently incomplete
+ client-header: Client header to parse.
+ chunked-transfer-encoding: Chunk-encoded data to dechunk.
+ deflate: deflate-compressed data to decompress.
+ filter: Text to parse as filter file.
+ gif: gif to deanimate.
+ gzip: gzip-compressed data to decompress.
+ pcrs-substitute: A pcrs-substitute to compile. Not a whole pcrs job! Example: Bla $1 bla C $3 blah.
+ server-header: Server header to parse.
+ server-response: Server response to parse.
+
+The following fuzz modes read data from stdin if the 'file' is '-'
+ client-request
+ client-header
+ chunked-transfer-encoding
+ deflate
+ gif
+ gzip
+ pcrs-substitute
+ server-header
+ server-response
+
+Aborting
+
+$ export ASAN_OPTIONS='abort_on_error=1'
+$ mkdir input output
+$ echo '$1 bla fasel $2' > input/pcrs
+$ afl-fuzz -i input -o output -m none ~/git/privoxy/privoxy --fuzz pcrs-substitute - --stfu
+
+$ cat >input/pcrs.txt
+FILTER: bla fasel
+s@(.{1})[432](\d+)@$1$2$hostname@UgisT
+
+$ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla.filter --stfu
+
-
@@ -2028,6 +2051,7 @@ at sourceforge. Three simple steps:
First you need to determine which version number the release will have.
Privoxy version numbers consist of three numbers,
separated by dots, like in X.Y.Z (e.g. 3.0.0), where:
+
@@ -2079,7 +2103,6 @@ at sourceforge. Three simple steps:
-
In summary, the main CVS trunk is the development branch where new
features are being worked on for the next stable series. This should
@@ -2112,7 +2135,6 @@ at sourceforge. Three simple steps:
The following must be done by one of the
developers prior to each new release.
-
@@ -2125,25 +2147,29 @@ at sourceforge. Three simple steps:
Increment the version number (point from odd to even in development
- branches!) in configure.in. (RPM spec files
- will need to be incremented as well.)
+ branches!) in configure.in and update the code
+ status (CODE_STATUS="xxx") to one of "alpha", "beta" or "stable".
+ Rebuild configure and GNUMakefile to make sure the updated values are
+ being used.
- If default.action has changed since last
- release (i.e. software release or standalone actions file release),
- bump up its version info to A.B in this line:
+ Use the dok-release target to update the sgml documentation source files.
+
+
+ If action file processing has changed and is not backward-compatible,
+ make sure the "for-privoxy-version=x.y.z" minimum version number in
+ default.action.master has been updated:
+
- {+add-header{X-Actions-File-Version: A.B} -filter -no-popups}
+{{settings}}
+#############################################################################
+#MASTER# COMMENT: The minimum Privoxy version:
+for-privoxy-version=3.0.11
-
-
- Then change the version info in doc/webserver/actions/index.php,
- line: '$required_actions_file_version = "A.B";'
-
@@ -2151,8 +2177,8 @@ at sourceforge. Three simple steps:
Finished docs should be then be committed to CVS (for those
without the ability to build these). Some docs may require
rather obscure processing tools. config,
- the man page (and the html version of the man page), and the PDF docs
- fall in this category. REAMDE, the man page, AUTHORS, and config
+ the man page (and the html version of the man page)
+ fall in this category. README, the man page, AUTHORS, and config
should all also be committed to CVS for other packagers. The
formal docs should be uploaded to the webserver. See the
Section "Updating the webserver" in this manual for details.
@@ -2208,7 +2234,6 @@ at sourceforge. Three simple steps:
-
@@ -2225,14 +2250,12 @@ at sourceforge. Three simple steps:
asked for a password):
-
mkdir dist # delete or choose different name if it already exists
cd dist
cvs -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa login
cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
- Do NOT change a single bit, including, but not limited to
@@ -2264,7 +2287,6 @@ at sourceforge. Three simple steps:
Please keep these general guidelines in mind when putting together
your package. These apply to all platforms!
-
@@ -2373,7 +2395,6 @@ at sourceforge. Three simple steps:
-
@@ -2383,28 +2404,22 @@ at sourceforge. Three simple steps:
version into an empty directory. (See "Building and releasing
packages" above). Then run:
-
cd current
autoheader && autoconf && ./configure
-
Then do:
-
make tarball-dist
-
To upload the package to Sourceforge, simply issue
-
make tarball-upload
-
Go to the displayed URL and release the file publicly on Sourceforge.
For the change log field, use the relevant section of the
@@ -2430,35 +2445,29 @@ at sourceforge. Three simple steps:
be reset to one if this is the first RPM for
dist which is built from version
X.Y.Z. Check the
- file
+ file
list if unsure. Else, it must be set to the highest already available RPM
release number for that version plus one.
Then run:
-
cd current
autoheader && autoconf && ./configure
-
Then do
-
make dist-dist
-
To upload the package to Sourceforge, simply issue
-
make dist-upload rpm_packagerev
-
where rpm_packagerev is the
RPM release number as determined above.
@@ -2473,11 +2482,9 @@ at sourceforge. Three simple steps:
version into an empty directory. (See "Building and releasing
packages" above). Then get the OS/2 Setup module:
-
cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co os2setup
-
You will need a mix of development tools.
The main compilation takes place with IBM Visual Age C++.
@@ -2493,28 +2500,22 @@ at sourceforge. Three simple steps:
Edit the os2build.cmd file to set the final executable filename.
For example,
-
installExeName='privoxyos2_setup_X.Y.Z.exe'
-
Next, edit the IJB.wis file so the release number matches
in the PACKAGEID section:
-
PACKAGEID="Privoxy Team\Privoxy\Privoxy Package\X\Y\Z"
-
You're now ready to build. Run:
-
os2build
-
You will find the WarpIN-installable executable in the
./files directory. Upload this anonymously to
@@ -2528,31 +2529,25 @@ at sourceforge. Three simple steps:
Login to Sourceforge's compilefarm via ssh:
-
ssh cf.sourceforge.net
-
Choose the right operating system (not the Debian one).
When logged in, make sure that you have freshly exported the right
version into an empty directory. (See "Building and releasing
packages" above). Then run:
-
cd current
autoheader && autoconf && ./configure
-
Then run
-
gmake solaris-dist
-
which creates a gzip'ed tar archive. Sadly, you cannot use make
solaris-upload on the Sourceforge machine (no ncftpput). You now have
@@ -2564,31 +2559,27 @@ at sourceforge. Three simple steps:
Windows
- You should ensure you have the latest version of Cygwin (from
- http://www.cygwin.com/).
- Run the following commands from within a Cygwin bash shell.
+ Use the
+ Cygwin Time Machine to install the last 1.5 version of Cygwin.
+ Run the following commands from within the Cygwin 1.5 bash shell.
First, make sure that you have freshly exported the right
version into an empty directory. (See "Building and releasing
packages" above). Then get the Windows setup module:
-
cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co winsetup
-
Then you can build the package. This is fully automated, and is
controlled by winsetup/GNUmakefile.
All you need to do is:
-
cd winsetup
make
-
Now you can manually rename privoxy_setup.exe to
privoxy_setup_X_Y_Z.exe, and upload it to
@@ -2605,30 +2596,24 @@ at sourceforge. Three simple steps:
entry to debian/changelog, if it is not
already there, for example by running:
-
debchange -v &p-version;-&p-status;-1 "New upstream version"
-
Then, run:
-
dpkg-buildpackage -rfakeroot -us -uc -b
-
This will create
../privoxy_&p-version;-&p-status;-1_i386.deb
which can be uploaded. To upload the package to Sourceforge, simply
issue
-
make debian-upload
- Mac OS X
@@ -2648,10 +2633,10 @@ at sourceforge. Three simple steps:
The OSXPackageBuilder module generates OS X installer packages
supporting all Macs running OS X 10.4 and above. Obtain it from CVS as
follows into a folder parallel to the exported privoxy source:
+
cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co OSXPackageBuilder
-
The module contains complete instructions on its usage in the file
OS X Package Builder HOWTO.txt.
@@ -2675,19 +2660,17 @@ at sourceforge. Three simple steps:
Check out the module from CVS as follows into a folder parallel to the
exported privoxy source:
+
cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co osxsetup
-
Then run:
-
cd osxsetup
build
-
This will run autoheader, autoconf
and configure as well as make.
@@ -2700,11 +2683,9 @@ at sourceforge. Three simple steps:
package" button. If you specify ./Privoxy.pkg as the output package
name, you can then create the distributable zip file with the command:
-
zip -r privoxyosx_setup_x.y.z.zip Privoxy.pkg
-
You can then upload this file directly to the Files section of the
Sourceforge project in the Macintosh (OS X) folder. Each new version
@@ -2723,10 +2704,10 @@ at sourceforge. Three simple steps:
Check out the module from CVS as follows into a folder parallel to the
exported privoxy source:
+
cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa co macsetup
-
The module contains complete instructions on its usage in its
README file. The end result will be the
@@ -2737,111 +2718,8 @@ at sourceforge. Three simple steps:
FreeBSD
- Login to Sourceforge's compile-farm via ssh:
-
-
-
- ssh cf.sourceforge.net
-
-
-
- Choose the right operating system.
- When logged in, make sure that you have freshly exported the right
- version into an empty directory. (See "Building and releasing
- packages" above). Then run:
-
-
-
- cd current
- autoheader && autoconf && ./configure
-
-
-
- Then run:
-
-
-
- gmake freebsd-dist
-
-
-
- which creates a gzip'ed tar archive. Sadly, you cannot use make
- freebsd-upload on the Sourceforge machine (no ncftpput). You now have
- to manually upload the archive to Sourceforge's ftp server and release
- the file publicly. Use the release notes and Change Log from the
- source tarball package.
-
-
-
- HP-UX 11
-
- First, make sure that you have freshly exported the right
- version into an empty directory. (See "Building and releasing
- packages" above). Then run:
-
-
-
- cd current
- autoheader && autoconf && ./configure
-
-
-
- Then do FIXME.
-
-
-
- Amiga OS
-
- First, make sure that you have freshly exported the right
- version into an empty directory. (See "Building and releasing
- packages" above). Then run:
-
-
-
- cd current
- autoheader && autoconf && ./configure
-
-
-
- Then do FIXME.
-
-
-
- AIX
-
- Login to Sourceforge's compilefarm via ssh:
-
-
-
- ssh cf.sourceforge.net
-
-
-
- Choose the right operating system.
- When logged in, make sure that you have freshly exported the right
- version into an empty directory. (See "Building and releasing
- packages" above). Then run:
-
-
-
- cd current
- autoheader && autoconf && ./configure
-
-
-
- Then run:
-
-
-
- make aix-dist
-
-
-
- which creates a gzip'ed tar archive. Sadly, you cannot use make
- aix-upload on the Sourceforge machine (no ncftpput). You now have
- to manually upload the archive to Sourceforge's ftp server and release
- the file publicly. Use the release notes and Change Log from the
- source tarball package.
+ Update the www/privoxy port and submit a diff upstream.
+ For details see the FreeBSD Porter's Handbook.
@@ -2853,7 +2731,6 @@ at sourceforge. Three simple steps:
to SourceForge, and go through the release steps. The upload
is done via FTP:
-
@@ -2871,7 +2748,6 @@ at sourceforge. Three simple steps:
-
Or use the make targets as described above.
@@ -2908,10 +2784,10 @@ at sourceforge. Three simple steps: