X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fsource%2Fdeveloper-manual.sgml;h=fc59c50894769bea1a1efc35cf897d089324963d;hp=1d82805c3e55d37a293175f032cef1e16e49f6a0;hb=5201d451da531cc0997d70bc0b85569771605129;hpb=aa1b69c44dad581f0756a5e95571df3afc644869 diff --git a/doc/source/developer-manual.sgml b/doc/source/developer-manual.sgml index 1d82805c..fc59c508 100644 --- a/doc/source/developer-manual.sgml +++ b/doc/source/developer-manual.sgml @@ -5,25 +5,21 @@ - - - - + + + + ]> Copyright - &my-copy; 2001-2016 by + &my-copy; 2001-2020 by Privoxy Developers - - $Id: developer-manual.sgml,v 2.83 2017/06/08 13:08:39 fabiankeil Exp $ - - The CVS Repository + The Git Repository If you become part of the active development team, you will eventually - need write access to our holy grail, the CVS repository. One of the + need write access to our holy grail, the Git repository. One of the team members will need to set this up for you. Please read - this chapter completely before accessing via CVS. + this chapter completely before accessing via Git. - Access to CVS + Access to Git + + The project's Git repository is hosted at the + Privoxy website. + For Privoxy team members with push privileges the Git repository URL is + ssh://git@git.privoxy.org:23/git/privoxy.git. + + + Contributors without push privileges can + git clone https://www.privoxy.org/git/privoxy.git. + - The project's CVS repository is hosted on - 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. + The central repository is called privoxy, and the + source branch is called master. Subfolders exist + within the project for target-dependent build and packaging tools, each + including the name of the target operating system in their name (e.g. + Windows, OSXPackageBuilder, debian). There is a webview of the Git + hierarchy at + + https://www.privoxy.org/gitweb/?p=privoxy.git;a=tree, + which might help with visualizing how these pieces fit together. - + Branches - Within the CVS repository, there are modules and branches. As - mentioned, the sources are in the current - module. Other modules are present for platform specific - issues. There is a webview of the CVS hierarchy at http://ijbswa.cvs.sourceforge.net/viewvc/ijbswa/, - which might help with visualizing how these pieces fit together. + Whilst the central repository contains only the master branch, developers + are of course free to create branches in their local repositories as they + develop features, fixes, or update the target-dependent tools. Only once + such changes are fully tested ought they be pushed back to the central + repository master branch. - CVS Commit Guidelines + Git Commit Guidelines The source tree is the heart of every software project. Every effort must be made to ensure that it is readable, compilable and consistent at all times. We expect anyone with CVS access to strictly + main development trunk, and --> We expect anyone with Git access to strictly adhere to the following guidelines: Basic Guidelines, for all branches: - Please don't commit even @@ -255,19 +258,18 @@ Hal. If necessary, prepare the commit messages in advance. - Before changing things on CVS, make sure that your changes are in line + Before changing things on Git, make sure that your changes are in line with the team's general consensus on what should be done. Note that near a major public release, we get more cautious. There is always the possibility to submit a patch to the patch + url="https://sourceforge.net/p/ijbswa/patches/">patch tracker instead. - d$"; /********************************************************************* * - * File : $S<!-- Break CVS Substitution -->ource$ + * File : $Source * * Purpose : (Fill me in with a good description!) * @@ -1851,10 +1840,9 @@ const char FILENAME_h_rcs[] = FILENAME_H_VERSION; #ifndef _FILENAME_H #define _FILENAME_H -#define FILENAME_H_VERSION "$I<!-- Break CVS Substitution -->d$" /********************************************************************* * - * File : $S<!-- Break CVS Substitution -->ource$ + * File : $Source * * Purpose : (Fill me in with a good description!) * @@ -1950,13 +1938,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 @@ -1964,7 +1953,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? @@ -1974,7 +1963,6 @@ Install the rpm. Any error messages? Start browsing. Does Privoxy work? Logfile written? Remove the rpm. Any error messages? All files removed? - @@ -2060,8 +2048,9 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. The following programs are required to follow this process: - ncftpput (ncftp), scp, ssh (ssh), - gmake (GNU's version of make), autoconf, cvs. + ssh, + gmake (GNU's version of make), autoconf, git, + a web browser. @@ -2071,18 +2060,20 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. 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: + X, the version major, is rarely ever changed. It is increased by one if turning a development branch into stable substantially changes the functionality, user interface or configuration syntax. Majors 1 and 2 were - Junkbuster, and 3 will be the first stable + Junkbuster, and 3 is the first stable Privoxy release. + Y, the version minor, represents the branch within the major version. At any point in time, there are two branches being maintained: The stable branch, with an even minor, say, 2N, in which no functionality is @@ -2100,13 +2091,15 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. Z, the point or sub version, represents a release of the software within a branch. - It is therefore incremented immediately before each code freeze. + It is therefore incremented immediately after each software release. + The point version is reset to zero when the minor changes. @@ -2122,9 +2115,8 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. - - In summary, the main CVS trunk is the development branch where new + In summary, the main Git trunk is the development branch where new features are being worked on for the next stable series. This should almost always be where the most activity takes place. There is always at least one stable branch from the trunk, e.g now it is @@ -2141,7 +2133,7 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. Developers should remember too that if they commit a bugfix to the stable branch, this will more than likely require a separate submission to the - main trunk, since these are separate development trees within CVS. If you + main trunk, since these are separate development trees within Git. If you are working on both, then this would require at least two separate check outs (i.e main trunk, and the stable release branch, which is v_3_0_branch at the moment). @@ -2150,33 +2142,39 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. - Before the Release: Freeze + Before the Release The following must be done by one of the developers prior to each new release. - - - - + + + Make sure that everybody who has worked on the code in the last couple of days has had a chance to yell no! in case they have pending changes/fixes in their pipelines. Announce the freeze so that nobody will interfere with last minute changes. - + + + + + Update the code status (CODE_STATUS="xxx") in configure.in to one of + "alpha", "beta" or "stable". + - Increment the version number (point from odd to even in development - 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. + Rebuild configure and GNUMakefile to make sure the updated values are being used. + + +$ autoheader && autoconf # rebuild configure +$ ./configure # rebuild GNUmakefile + - Use the dok-release target to update the sgml documentation source files. + make dok-release to update the sgml documentation source files. @@ -2184,25 +2182,80 @@ $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla. 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: + {{settings}} ############################################################################# #MASTER# COMMENT: The minimum Privoxy version: for-privoxy-version=3.0.11 + + + + Create the change log: + + + $ git tag + # to see the tags + $ git log [last release tag]..HEAD > /tmp/log + # get the commit log since the last release + $ utils/makeChangeLog /tmp/log > /tmp/change.log + # reformat the commit log + + + Edit /tmp/change.log to remove trivial + changes and group the changes under general headings like: + +- Bug fixes: +- Action file improvements: +- Filter file improvements: +- General improvements: +- Documentation improvements: +- Build system improvements: +- Code cleanups: +- Privoxy-Log-Parser: +- Privoxy-Regression-Test: + + + Add the contents of /tmp/change.log to the + start of ChangeLog and re-create + doc/source/changelog.sgml: + + + $ utils/changelog2doc.pl /tmp/change.log >| doc/source/changelog.sgml + - All documentation should be rebuild after the version bump. - Finished docs should be then be committed to CVS (for those + All developers should look at the ChangeLog and + make sure noteworthy changes are referenced. + + + + + All documentation should be rebuilt: + + $ make man + $ make dok + $ make dok-man + $ make dok-tidy + $ make config-file + + Finished docs should be then be committed to Git (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) 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. + should all also be committed to Git for other packagers. The + formal docs should be uploaded to the webserver. See the section + "Updating the webserver" + in this manual for details. + + + + + Commit all files that were changed in the above steps! @@ -2214,36 +2267,18 @@ for-privoxy-version=3.0.11 (this is in addition to the main User Manual link from the main page since we need to keep manuals for various versions available). The CGI pages will link to something like - http://privoxy.org/$(VERSION)/user-manual/. This + https://www.privoxy.org/$(VERSION)/user-manual/. This will need to be updated for each new release. There is no Makefile target for this at this time!!! It needs to be done manually. - All developers should look at the ChangeLog and - make sure noteworthy changes are referenced. - - - - - Commit all files that were changed in the above steps! - - - - - Tag all files in CVS with the version number with - cvs tag v_X_Y_Z. + Tag all files in Git with the version number with + git tag v_X_Y_Z. Don't use vX_Y_Z, ver_X_Y_Z, v_X.Y.Z (won't work) etc. - - - If the release was in a development branch, increase the point version - from even to odd (X.Y.(Z+1)) again in configure.in and - commit your change. - - On the webserver, copy the user manual to a new top-level directory @@ -2255,7 +2290,6 @@ for-privoxy-version=3.0.11 - @@ -2268,22 +2302,21 @@ for-privoxy-version=3.0.11 For all types of packages, including the source tarball, you must make sure that you build from clean sources by exporting - the right version from CVS into an empty directory (just press return when + the right version from Git into an empty directory (just press return when 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 + git clone https://www.privoxy.org/git/privoxy.git + cd privoxy + git checkout v_X_Y_Z - Do NOT change a single bit, including, but not limited to - version information after export from CVS. This is to make sure that + version information after export from Git. This is to make sure that all release packages, and with them, all future bug reports, are based on exactly the same code. @@ -2311,7 +2344,6 @@ for-privoxy-version=3.0.11 Please keep these general guidelines in mind when putting together your package. These apply to all platforms! - @@ -2372,7 +2404,7 @@ for-privoxy-version=3.0.11 interest (and possibly renamed to index.html). This should be one level up from the manuals. There is a link also on this page to an HTMLized version of the man page. To avoid 404 for - this, it is in CVS as + this, it is in Git as doc/webserver/man-page/privoxy-man-page.html, and should be included along with the manuals. There is also a css stylesheets that can be included for better presentation: @@ -2420,7 +2452,6 @@ for-privoxy-version=3.0.11 - @@ -2430,28 +2461,22 @@ for-privoxy-version=3.0.11 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 @@ -2470,42 +2495,36 @@ for-privoxy-version=3.0.11 packages" above). - As the only exception to not changing anything after export from CVS, + As the only exception to not changing anything after export from Git, now examine the file privoxy-dist.spec and make sure that the version information and the RPM release number are correct. The RPM release numbers for each version start at one. Hence it must 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. @@ -2514,92 +2533,29 @@ for-privoxy-version=3.0.11 - OS/2 - - First, make sure that you have freshly exported the right - 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++. - Some ancillary work takes place with GNU tools, available from - various sources like hobbes.nmsu.edu. - Specificially, you will need autoheader, - autoconf and sh tools. - The packaging takes place with WarpIN, available from various sources, including - its home page: xworkplace. - - - Change directory to the os2setup directory. - 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 - uploads.sourceforge.net/incoming, create a release - for it, and you're done. Use the release notes and Change Log from the - source tarball package. - - - Solaris 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 @@ -2609,37 +2565,50 @@ for-privoxy-version=3.0.11 - Windows + Windows + - 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. + Note that the docbook generated files might need some hand editing, + so the Windows build makefile does not rebuild the docs. + 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 - + packages" above). + Then you can build the package. This is fully automated, and is - controlled by winsetup/GNUmakefile. + controlled by windows/GNUmakefile. All you need to do is: - - cd winsetup + cd windows make - Now you can manually rename privoxy_setup.exe to - privoxy_setup_X_Y_Z.exe, and upload it to - SourceForge. When releasing the package on SourceForge, use the release notes + privoxy_setup_X.Y.Z.exe, and the build + directory to privoxy_X.Y.Z. + Create a .zip file of the newly renamed privoxy_X.Y.Z directory, + GPG sign the installer and zip file, + + + $ gpg --armor --detach --sign privoxy_setup_X.Y.Z.exe + $ gpg --armor --detach --sign privoxy_X.Y.Z.zip + + + and upload the files to SourceForge. + + + + When releasing the package on SourceForge, use the release notes and Change Log from the source tarball package. @@ -2652,30 +2621,24 @@ for-privoxy-version=3.0.11 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 @@ -2685,20 +2648,20 @@ for-privoxy-version=3.0.11 packages" above). - There are three modules available in the CVS repository for use on Mac + There are three modules available in the CVS repository backups for use on Mac OS X, though technically only two of them generate a release (the other can be used to install from source). - OSXPackageBuilder module + OSXPackageBuilder module (Documentation out of date) 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. @@ -2713,7 +2676,7 @@ for-privoxy-version=3.0.11 - osxsetup module (DEPRECATED) + osxsetup module (DEPRECATED) (Documentation out of date) This module is deprecated since the installer it generates places all Privoxy files in one folder in a non-standard location, and @@ -2722,19 +2685,17 @@ for-privoxy-version=3.0.11 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. @@ -2747,11 +2708,9 @@ for-privoxy-version=3.0.11 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 @@ -2762,7 +2721,7 @@ for-privoxy-version=3.0.11 - macsetup module + macsetup module (Documentation out of date) The macsetup module is ideal if you wish to build and install Privoxy from source on a single machine. @@ -2770,10 +2729,10 @@ for-privoxy-version=3.0.11 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 @@ -2797,32 +2756,30 @@ for-privoxy-version=3.0.11 to SourceForge, and go through the release steps. The upload is done via FTP: - - - - - Upload to: ftp://upload.sourceforge.net/incoming - - - - - user: anonymous - - - - - password: ijbswa-developers@lists.sourceforge.net - - - - + + + + Upload to: ftp://upload.sourceforge.net/incoming + + + + + user: anonymous + + + + + password: ijbswa-developers@lists.sourceforge.net + + + Or use the make targets as described above. - Once this done go to https://sourceforge.net/project/admin/editpackages.php?group_id=11118, + Once this done go to + + https://sourceforge.net/project/admin/editpackages.php?group_id=11118, making sure you are logged in. Find your target platform in the second column, and click Add Release. You will then need to create a new release for your package, using the format @@ -2852,15 +2809,44 @@ for-privoxy-version=3.0.11 After the Release When all (or: most of the) packages have been uploaded and made available, - send an email to the announce - mailing list, Subject: "Version X.Y.Z available for download". Be sure to + send an email to the + announce mailing + list, Subject: "Version X.Y.Z available for download". Be sure to include the - download - location, the release notes and the Changelog. Also, post an + + download location, the release notes and the Changelog. Also, post an updated News item on the project page Sourceforge, and update the Home page and docs linked from the Home page (see below). Other news sites and release oriented sites, such as Freshmeat, should also be notified. + + Then update the source code for the next version to be released: + + + + + Increment the version number and change the code status to "UNRELEASED" + in configure.in + + + + + Rebuild configure (autoheader && autoconf) + and GNUMakefile (./configure) + + + + + make dok-release to update the sgml documentation source files. + + + + + Commit all your changes. + + + + @@ -2877,11 +2863,9 @@ for-privoxy-version=3.0.11 If you have changed anything in the stable-branch documentation source SGML files, do: - make dok - That will generate doc/webserver/user-manual, doc/webserver/developer-manual, @@ -2893,7 +2877,7 @@ for-privoxy-version=3.0.11 doc/webserver/man-page/privoxy-man-page.html by running make man. (This is a separate target due to dependencies on some obscure perl scripts - [now in CVS, but not well tested]. See comments in GNUmakefile.) + [now in Git, but not well tested]. See comments in GNUmakefile.) If you want to add new files to the webserver, create them locally in @@ -2901,18 +2885,16 @@ for-privoxy-version=3.0.11 create new directories under doc/webserver). - Next, commit any changes from the above steps to CVS. All set? + Next, commit any changes from the above steps to Git. All set? If these are docs in the stable branch, then do: - make webserver - - This will do the upload to the - webserver (www.privoxy.org) and ensure all files and directories - there are group writable. + This will do the upload to the SourceForge webserver (which is manually + syncronized with www.privoxy.org) + and ensure all files and directories there are group writable. Please do NOT use any other means of transferring