01234567890123456789012345678901234567890123456789012345678901234567890123456789 HOWTO Package Apache TODO: Reflect more details in step 18 about exactly how directories are added to specific targets, as well as details under steps 19 & 20. Describe Apache 1.3 as well. Prerequisites; * the unxutils package (unxutils.sourceforge.org) for the usual utilities, as the cygwin variants have unusual side effects. * Visual C++ 6.0 (with service pack 5!) When users build modules with 6.0, there may or may not be issues with a 7.0 build of Apache's core. Better safe than sorry till we validate. * The current Microsoft Platform SDK, at least March 2001 which seems to build our ldap modules correctly. * Patch your Common\msdev98\bin\sysincl.dat file to include newer include files that will show up in your .dep'endency files; basetsd.h guiddef.h reason.h stralign.h tvout.h * Prebuild 0.9.7. You can follow the directions given at http://httpd.apache.org/docs-2.0/platform/win_compiling.html which will ensure we create the openssl package with the correct dependencies, even as we don't ship the mod_ssl.so binary. Skip the debug lines of those instructions if you like. Preferences; * the junction utility from www.sysinternals.com * either a pgp or gpg utility for signing and validation Details; 1. Grab, validate and untar the current unix tarball, e.g. wget http://www.apache.org/dist/httpd/httpd-2.0.47.tar.gz wget http://www.apache.org/dist/httpd/httpd-2.0.47.tar.gz.asc md5sum httpd-2.0.47.tar.gz [compare to .md5 file] pgp httpd-2.0.47.tar.gz gzip -dc httpd-2.0.47.tar.gz | tar -xvf - 2. Convert unix -> dos text with srclib/apr/build/lineends.pl cd httpd-2.0.47 perl srclib\apr\build\lineends.pl expect that testinput and testoutput files won't convert. 3. Checkout the apr-iconv implementation we haven't shipped on Unix, then blast the cvs tree (alternately, export the thing, my cvs is buggy in that respect.) cd srclib cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic \ co -r APACHE_2_0_47 apr-iconv for /r /d %d in (CVS?) do rd /s/q %d del STATUS .cvsignore /s cd ..\.. 4. Now make a copy for building (to preserve the source tree), e.g. xcopy httpd-2.0.47 build-2.0.47 /s/v/e 5. Add the zlib sources under srclib/zlib, and the openssl sources under srclib/openssl. My preference is to keep the current distros unpacked (and built, in the case of openssl, we compile in zlib sources ourselves), and use the junction tool; cd build-2.0.47\srclib junction zlib \pkg\zlib-1.1.4 junction openssl \pkg\openssl-0.9.7b cd ..\.. 6. Now a clean build, first, so that all of the intermediate files exist (without this step, dependencies are not correctly generated.) cd build-2.0.47 nmake -f makefile.win _apacher cd .. 7. Enter the IDE in order to generate the .mak/.dep files for VC5 command line builders; msdev /useenv Apache.dsw Choose the menu item 'Project' - 'Export Makefile', check the 'Write Dependencies' checkbox and ensure all projects are checked; click OK. Then quit the IDE. 8. As we don't yet distribute SSL, first remove srclib\openssl, which will tell the installer we won't actually install mod_ssl/abs to the target. For the junction utility, simply junction /d srclib\openssl 9. Now build the install target nmake -f makefile.win INSTDIR=c:\dist-path\target-2.0.47 installr 10. With the install package built, now remove srclib\zlib so that the recursive copies below don't try to copy the junction and overwrite the same file, e.g. junction /d srclib\zlib 11. Correct the generated .mak/.dep files' timestamps to conincide with their .dsp origins, and force absolute paths to relative paths; perl srclib\apr\build\fixwin32mak.pl 12. Now copy all of the .mak, .dep, and .rc files from the temporary build tree to the distribution tree, e.g. xcopy *.mak ..\httpd-2.0.47 /s/v xcopy *.dep ..\httpd-2.0.47 /s/v xcopy *.rc ..\httpd-2.0.47 /s/v cd .. note that one .rc file, support\win32\ApacheMonitor.rc already exists, it shouldn't matter one way or the other if you overwrite it. 13. With the addition of the generated sources, now pkzip up the files using your favorite tool, e.g. pkzip25 httpd-2.0.47-win32-src.zip -add -path -rec -lev=9 httpd-2.0.47/* 14. Your build-2.0.47 and installation tree, e.g. target-2.0.47 tree are ready to create the installation package. In general, I've always replaced s/2.0.46/2.0.47/ directly within the apache_2.0-win32.isv source file and then loaded that package using InstallShield... note that the two path names must be fully rooted, my root path is c:\asf-build. cvs co httpd-win32-msi cd httpd-win32-msi notepad apache_2.0-win32.isv apache_2.0-win32.isv There are two 'Releases' to be built, the msi-no_ssl-2.0 and the exe-no_ssl-2.0. There may be errors (files not found). This is usually due to a new key file, e.g. index.html became index.html.en. Remove the now missing file, remove it from the exclusions for the file pattern and readd a new key file, which will exclude it as a new exclusion pattern. For good measure I reexport the .isv file so the guid's are consistent. 15. Duplicate the generated installer packages. Because .msi's are opened for r/w access, I've never trusted releasing a previously 'installed' .msi package; I have always tested a 'duplicate'. The names are also goofy, so; copy win32\exe-no_ssl-2.0\DiskImages\DISK1\setup.exe \ ..\apache_2.0.47-win32-x86-no_ssl.exe copy "win32\msi-no_ssl-2.0\DiskImages\DISK1\Apache HTTP Server 2.0.47.msi" \ ..\apache_2.0.47-win32-x86-no_ssl.msi cd .. 16. Now create the .pdb database for this release. This is a simple as... cd target-2.0.47 pkzip25 ..\apache_2.0.47-win32-x86-symbols.zip \ -add -path -rec -lev=9 *.pdb cd .. 17. Finally test install, using a copy of the .msi. After installing, change to the apache2 directory and unpack the -symbols.zip package you just created. The target-2.0.47 and installed Apache2 trees should be nearly identical, except for a few readmes that don't belong in images & error docs trees, and of course the cgi search tool which doesn't work for any typical user. 18. If something has been added (frequent in the htdocs tree) then just add it up in the step 14 above and repeat the builds of the install packages. 19. Sign the packages. 20. Post them.