home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / txinf403.zip / readme.rpm next >
Text File  |  2000-05-10  |  29KB  |  846 lines

  1. /*---------- README-rpm-3.0.3.os2  ----------------------------------------*/
  2.                                                               
  3.      ******   ****  ****** ******     ***** ****  *****       
  4.      ****** ***********************   ******************      
  5.      *******************************  *******************     
  6.         *******  ***   *****     ****   ****   ****   ***     
  7.         *****          ****       ***   ***    ***    ***     
  8.         ****           ***        ****  ***    ***    ***     
  9.         ***            ***         ***  ***    ***    ***     
  10.         ***            ***         ***  ***    ***    ***     
  11.         ***            ***         ***  ***    ***    ***     
  12.         ***            ****       ****  ***    ***    ***     
  13.         ***            *****     ****   ***    ***    ***     
  14.     *************      *************  *******  *****  *****   
  15.     *************      *** ********   *******  *****  *****   
  16.     *************      ***  *****     *******  *****  *****   
  17.                        ***                                    
  18.                        ***                                    
  19.                        ***                                    
  20.                     **********                                
  21.                     **********                   version 3.0.3
  22.                     **********              OS/2 patch level 5
  23.                                                     1999.10.20
  24.                                                               
  25. Table of contents
  26. =================
  27.  
  28. Introduction                         @int
  29. History of OS/2 port                 Read `CHANGES.os2'
  30. Problems of OS/2 ported rpm          Read `PROBLEMS.os2'
  31. Required Executables and DLLs        @req
  32. OS/2 Note                            @os2
  33. Installation                         @ins
  34. IMPORTANT NOTICE                     @imp
  35. Setup Language                       @lan
  36. Initialize database                  @ini
  37. Check installed rpm system           @che
  38. Documentations                       @doc
  39. Manpages                             @man
  40. Sample Usage of RPM                  Read `EXAMPLE.os2'
  41. Sample Usage of Tools                Read `EXAMPLE.os2'
  42. Compile from Source                  @com
  43. Make rpm package for rpm             @mak
  44. What I want to do                    See  `TODO.os2'
  45. Supplemental scripts                 @sup
  46.  
  47.  
  48.  
  49.  
  50. Introduction    @int
  51. ============
  52.  
  53.   Quite a lot of OS/2 users may use Linux. But they might not be able to treat 
  54. RedHat's RPM package as they do with "tar + gzip" archives. 
  55.   I ported RPM version 2.5.5 for OS/2, later version 3.0.3. 
  56.   First I intended to extract source files from RPM package. Later, I realized 
  57. that RPM is very useful to make OS/2 distribution. Someday, I will put RPM 
  58. package for OS/2 in my web page. 
  59.   Not all of RPM features are available and some bugs do exist, but this copy
  60. is suffice to unpack or make RPM package. 
  61.   If you have questions and suggestions, please mail me. 
  62.  
  63.  
  64.  
  65.                                              SAWATAISHI Jun, YOKOHAMA JAPAN
  66.                                                       <jsawa@attglobal.net>
  67.                            http://www2s.biglobe.ne.jp/~vtgf3mpr/indxos2.htm
  68.  
  69.  
  70. Required Executables and DLLs    @req
  71. =============================
  72.  
  73. DLL files of zlib, gdbm, bzip2 : Included in this package
  74.  
  75. GNU cpio version 2.4.1 or later : `cpio.exe' is included (2.4.2)
  76.      I used a patch file of OS/2 ported cpio:
  77.         ftp://hobbes.nmsu.edu/pub/os2/util/archiver/
  78.                gnucpio.zip  243656 1996/01/07  GNU cpio v2.4.1 archiver 
  79.      I made a patch for 2.4.2 and included it:
  80.                `emx\src\redhat\SOURCES\cpio-2.4.2-OS2.diff.gz'
  81.  
  82.  
  83. emx runtime version 0.9d (or later): Not included
  84.      ftp://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/
  85.        emxrt.zip        549675 1998/12/22  emx runtime package
  86.  
  87.  
  88. OS/2 Note @os2
  89. =========
  90.  
  91. Changes made for OS/2 file system are as follows:
  92.  
  93. 1. Rpm depends on three configration file, `.rpmrc', `.rpmmacros', and
  94.   `.popt' in the HOME directory. Original rpm reads other files too. 
  95.  
  96. 2. You can set a drive to install files from RPM binary package with
  97.    environmental variable `RPMDRV'. If RPMDRV is not set, binary rpm 
  98.    is installed in the current drive. 
  99.  
  100. 3. Rpm can handle file names with drive letters. 
  101.  
  102. 4. When we install RPM binary packages, compatibility check for platform, 
  103.    for OS, or for shared libraries are omitted. 
  104.  
  105.  
  106. Installation @ins
  107. ============
  108.  
  109. 1. Unzip `rpm303.zip' in some HPFS drive
  110.     `README-rpm-3.0.3.os2'(this file) and `emx-rpm.zip' will be extracted in 
  111.   the current directory. 
  112.  
  113. 2-a. Simple installation
  114.     If you have installed emx in drive X and your environment variable HOME 
  115.   is "X:\emx", installation can be simple. If you'd like to install this pa-
  116.   ckage as your own plan, read the next section "2-b". 
  117.     
  118.        > unzip emx-rpm -d X:\
  119.  
  120.  
  121.     Now, configration files are installed in `X:\emx';
  122.              .rpmrc
  123.              .rpmmacros
  124.              .popt
  125.  
  126.          executables      in `X:\emx\bin';
  127.          DLLs             in `X:\emx\dll';
  128.          documents        in `X:\emx\doc\rpm-3.0.3';
  129.          C include files  in `X:\emx\include';
  130.          C library files  in `X:\emx\lib';
  131.          manpages         in `X:\emx\man';
  132.          message files    in `X:\emx\share\locale';
  133.          patch files      in `X:\emx\src\redhat\SOURCES';
  134.              rpm-3.0.3-OS2.diff.gz ------- for rpm version 3.0.3
  135.              bzip2-0.9.0c.OS2.diff.gz ---- for bzip2 version 0.9.0c
  136.              cpio-2.4.2-OS2.diff.gz ------ for GNU cpio version 2.4.2
  137.          spec file        in `X:\emx\src\redhat\SOURCES';
  138.              rpm-3.0.3-os2.spec ---------- spec file for OS/2 ported rpm
  139.              hello.spec ------------------ spec file for test
  140.  
  141.          RPM binary file  in `X:\emx\src\redhat\RPMS\i386';
  142.              hello-1.0-1.i386-OS2.rpm ---- test program
  143.          RPM source file  in `X:\emx\src\redhat\SRPMS';
  144.              hello-1.0-1.src.rpm --------- test program
  145.  
  146.  
  147.     Be sure that `X:\emx\dll' is specifiled by LIBPATH and `X:\emx\bin' by 
  148.   environment variable PATH in your `config.sys'. If not, add these diretories
  149.   to LIBPATH and/or PATH. 
  150.  
  151.  
  152.     Add a line in your `config.sys':
  153.     
  154.          set GNULOCALEDIR=X:/emx/share/locale   # Do not use '\'
  155.  
  156.  
  157.     If you have manpage system,  "X:\emx\man" should be included in 
  158.   environment variable MANPATH. 
  159.  
  160.  
  161.     If you don't have emx/gcc, you can delete `X:\emx\lib' and 
  162.   `X:\emx\include'. 
  163.  
  164.  
  165.     If you have installed emx/gcc, `X:\emx\lib' and `X:\emx\include' may 
  166.    not be suitable directories. If needed, move C include files and library
  167.    files to proper directories. 
  168.  
  169.  
  170.     Edit `X:\emx\.rpmmacros':
  171.     
  172.        line  20:  %_usr                   g:/emx
  173.        line  21:  %_usrsrc                %{_usr}/src
  174.        line  22:  %_var                   g:/emx
  175.        line  66:  %__find_provides        g:/emx/lib/rpm/find-provides
  176.        line  67:  %__find_requires        g:/emx/lib/rpm/find-requires
  177.        line  84:  %_signature             none
  178.        line  88:  %_tmppath               %{_var}/tmp
  179.        line 157:  %_prefix                g:/emx
  180.        line 109:  #%packager
  181.  
  182.     Change "g:" to "X:". 
  183.  
  184.     If you'd like to sign rpm package using GNU gpg:
  185.  
  186.        line  84:  %_signature             gpg
  187.                             ( Because of my poor C language ability, 
  188.                                                 PGP cannot be used. )
  189.  
  190.     If you don't like `X:\emx\tmp' as temporary directory for rpm, 
  191.   freely change "%_tmppath" like this. 
  192.  
  193.        line  88:  %_tmppath               c:/tmp
  194.  
  195.     You should define ``packager'' as your name and email address like this. 
  196.  
  197.        line 109:  %packager  SAWAIAISHI Jun <jsawa@attglobal.net>
  198.  
  199.  
  200. NOW GOTO section 3, "Set environmental variable RPMDRV"
  201.  
  202.  
  203.  
  204. 2-b. Custom installation
  205.  
  206.     If a drive specifiled by environment variable HOME doesn't have enough 
  207.   space, you can install files for rpm in other places. 
  208.   
  209.     Note that `.rpmrc', `.rpmmacros' and `popt' MUST BE INSTALLED in HOME 
  210.   directory. 
  211.   
  212.     First of all, unzip `emx-rpm.zip' somewhere.
  213.   
  214.            y:\tmp> unzip emx-rpm.zip
  215.            y:\tmp> cd emx
  216.            y:\tmp\emx>
  217.   
  218.     Executables, DLLs, C include files, C library files, message files, 
  219.   manpages, and other documents can be freely installed anywhere.  
  220.   
  221.     @ According to your definitions of LIPATH, PATH, MANPATH, and LIBPATH in 
  222.        `conifig.sys' install *.exe, *.dll, *.h, *.a, *.lib, and *.8 in right 
  223.        directories. 
  224.     
  225.     @ Decide where to install message files, and do like this. 
  226.  
  227.            y:\tmp\emx> xcopy /e /s share\locale\* X:\FOO\BAR
  228.     
  229.        Add a line "set GNULOCALEDIR=X:/FOO/BAR" to `config.sys'
  230.  
  231.  
  232.     Finally, you must specify directories for rpm by editing `.rpmmacros' 
  233.   in HOME directory. 
  234.  
  235.          A - Top directory : Parent directory of BUILD, RPMS, SOURCES, 
  236.                              SPECS, and SRPMS
  237.                             
  238.          B - Database directory : Where rpm database is created 
  239.  
  240.          C - Directory for `find-provides' and other library files
  241.  
  242.          D - Directory for temporary files
  243.          
  244.          E - "prefix" for Makefile
  245.          
  246.          F - ``packager'': Your name and address
  247.  
  248.  
  249.      Open `y:\tmp\emx\.rpmmacros' by your editor. You will see following 
  250.    lines. 
  251.      
  252.        line  20:  %_usr                   g:/emx
  253.        line  21:  %_usrsrc                %{_usr}/src
  254.        line  22:  %_var                   g:/emx
  255.        line  63:  %_dbpath                %{_var}/lib/rpm ---------------- B
  256.        line  64:  %_defaultdocdir         %{_usr}/doc
  257.        line  66:  %__find_provides        g:/emx/lib/rpm/find-provides --- C
  258.        line  67:  %__find_requires        g:/emx/lib/rpm/find-requires --- C
  259.        line  89:  %_topdir                %{_usrsrc}/redhat  ------------- A
  260.        line  60:  %_builddir              %{_topdir}/BUILD
  261.        line  85:  %_sourcedir             %{_topdir}/SOURCES
  262.        line  84:  %_signature             none
  263.        line  86:  %_specdir               %{_topdir}/SPECS
  264.        line  87:  %_srcrpmdir             %{_topdir}/SRPMS
  265.        line  89:  %_topdir                %{_usrsrc}/redhat
  266.        line  88:  %_tmppath               %{_var}/tmp -------------------- D
  267.        line 157:  %_prefix                g:/emx ------------------------- E
  268.        line 109:  #%packager                                               F
  269.  
  270.         
  271.     @ Top directory
  272.       If you prefer `g:\RedHat', change a line 89
  273.  
  274.        line  89:  %_topdir                g:/RedHat
  275.  
  276.       And copy a directory tree to `g:/RedHat'
  277.       
  278.          y:\tmp\emx> mkdir g:\RedHat
  279.          y:\tmp\emx> xcopy /e /s src\redhat\* g:\RedHat
  280.  
  281.  
  282.     @ Rpm database directory and library directory
  283.       If you'd like `c:\etc\rpm':
  284.  
  285.        line  63:  %_dbpath                c:/etc/rpm
  286.        line  66:  %__find_provides        c:/etc/rpm
  287.        line  67:  %__find_requires        c:/etc/rpm
  288.        line 109:  #
  289.        
  290.            y:\tmp\emx> mkdir c:\etc
  291.            y:\tmp\emx> mkdir c:\etc\rpm
  292.          y:\tmp\emx> copy lib\rpm\* c:\etc\rpm
  293.          
  294.  
  295.     @ Temporary directory
  296.       To define it as `c:\tmp'   
  297.        line  88:  %_tmppath               c:/tmp
  298.     
  299.     @ "prefix" for Makefile
  300.       If your emx/gcc in installed in `d:/emx'
  301.        line 157:  %_prefix                d:/emx
  302.  
  303.  
  304.     @ Signature
  305.      If you'd like to sign rpm package using GNU gpg:
  306.        line  84:  %_signature             gpg
  307.  
  308.      Because of my poor C language ability, PGP cannot be used. 
  309.  
  310.     You should define ``packager'' as your name and email address like this. 
  311.  
  312.        line 109:  %packager  SAWAIAISHI Jun <jsawa@attglobal.net>
  313.  
  314.  
  315. NOW go to the next section
  316.  
  317.  
  318. 3. Set environmental variable `RPMDRV'
  319.  
  320.     RPM binary packages (binaries, etc...) are extracted in a drive
  321.   specified by `RPMDRV'.
  322.    
  323.     Add a line "set RPMDRV=Y" to `config.sys' 
  324.                  ( `Y' is your  preffered drive to install)
  325.  
  326. NOW enter the next section
  327.  
  328.  
  329. IMPORTANT NOTICE  @not
  330. ================
  331.  
  332.  `.rpmrc', `.rpmmacros' and `.popt' must be DOS way text files.
  333.   If you make rpm from source, newline of `rpmpopt' may be UNIX way. To convert
  334. newline into DOS way, open `rpmpopt' by E editor (e.exe) and make meaningless
  335. change (c.f. add one SPACE ) and save the file. Now, `rpmpopt' has DOS way 
  336. newline. Then, copy `rpmpopt' in your HOME directory as the name `popt'. 
  337.   
  338.  
  339.   You can get newline code converter from hobbes ftp site.
  340.  
  341.          ftp://hobbes.nmsu.edu/pub/os2/apps/wp/
  342.  
  343.               ux_dos.zip  32985 1996/01/14  
  344.                       Unix<->DOS, convert text files between Unix and DOS
  345.          
  346.          ftp://hobbes.nmsu.edu/pub/os2/util/file/
  347.               flip1os2.zip 34194 1995/01/30  
  348.                       Convert Unix text files to OS/2 & vice-versera
  349.  
  350.  
  351. Setup Language    @lan
  352. ==============
  353.    
  354.     Installation of message files have finished and `config.sys' has 
  355.   a line "set GNULOCALEDIR=...." ? 
  356.  
  357.     Then, specify an environmental variable `LANGUAGE'.
  358.  
  359.          To know what kind of languages are prepared, do like this;
  360.  
  361.             \emx> dir /s share\locale\rpm.mo
  362.          
  363.          You will see 13 MO files are installed; de, es, fr, .....
  364.  
  365.                            cs    Czech
  366.                            de    German
  367.                            es    Spanish
  368.                            fi    Finnish
  369.                            fr    French
  370.                            ja    Japanese (SJIS)
  371.                            pl    Polish
  372.                            pt_Br Portuguese
  373.                            ru    Russian
  374.                            sk    Slovak
  375.                            sr    Serbian
  376.                            sv    Swedish
  377.                            tr    Turkish
  378.  
  379.          
  380.          Add a line in your `config.sys'
  381.  
  382.                 set LANGUAGE=LANG
  383.          
  384.                            "LANG" represents an abbreviation of language name
  385.  
  386.          If you are an Swedish: 
  387.  
  388.                 set LANGUAGE=sv
  389.  
  390.  
  391.        Good way to test many kinds of language is to use one of GNU shell 
  392.      utilities `env.exe'. 
  393.        In OS/2 command shell
  394.        
  395.            > set GNULOCALEDIR=X:/emx/share/locale  
  396.            > env LANGUAGE=it rpm --help            #  If you have done cus-
  397.            > env LANGUAGE=ja rpm --help            #  tom installaion, GNU
  398.            > env LANGUAGE=fr rpm --help            #  LOCALEDIR may be di-
  399.                                                    #  fferent. 
  400.          
  401.  
  402.       If you cannot use `env.exe', test messages like this.
  403.                   (Be sure that *.exe and *.dll has been installed)
  404.     
  405.            > set GNULOCALEDIR=X:/emx/share/locale
  406.            > set LANGUAGE=fr
  407.            > rpm --help
  408.         
  409.                        You will see French messages
  410.         
  411.            > set LANGUAGE=es
  412.            > rpm --help
  413.     
  414.                        Now Spanish messages will appear
  415.  
  416.  
  417.  
  418.     Now you had better confirm that environment variables, RPMDRV, 
  419.   GNULOCALEDIR, LANGUAGE, HOME, PATH, and LIBPATH in `config.sys'
  420.   are properly set. 
  421.     Did you use '\' as directory separator in your `.rpmmacros' at HOME 
  422.   directory? If so, change all '\' to '/'. 
  423.   
  424.     
  425.     
  426. REBOOT YOUR MACHINE, and read the next chapter ! 
  427. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  428.  
  429.  
  430. Initializing database    @ini
  431. =====================
  432.  
  433.    If you installed RPM for the first time, setup database. 
  434.  
  435.            > rpm --initdb
  436.  
  437.    If you already have installed old verstion (2.5.5 or 2.5.6), you have to
  438.   reformat database. 
  439.  
  440.            > rpm --rebuilddb
  441.  
  442.  
  443.    Confirm initial database is created or rebuilt in database directory.
  444.  
  445.            > dir X:\emx\lib\rpm\*.rpm   # If you have done simple installation
  446.            > dir X:\FOO\BAR\rpm\*.rpm   # If you have done custom installation
  447.  
  448. [I:\src]dir j:\RedHat\rpm\*.rpm         # This my case
  449.  
  450. Directory of J:\RedHat\rpm
  451.  
  452. 99-10-25  11:47       2048           0  conflictsindex.rpm
  453. 99-10-25  11:47      42496           0  fileindex.rpm
  454. 99-10-25  11:47       2048           0  groupindex.rpm
  455. 99-10-25  11:47       2048           0  nameindex.rpm
  456. 99-10-25  11:47     113480           0  packages.rpm
  457. 99-10-25  11:47       2048           0  providesindex.rpm
  458. 99-10-25  11:47       2048           0  requiredby.rpm
  459. 99-10-25  11:47       2048           0  triggerindex.rpm
  460.         8 file(s)     168264 bytes used
  461.                             34697728 bytes free
  462.                             
  463.      If you see an output like this, installation can be okay. 
  464.  
  465.  
  466. Check installed rpm system @che
  467. ==========================
  468.  
  469.   If you installed this package properly, both RPM binary file,
  470. `hello-1.0-1.i386-OS2.rpm', and RPM source fle, hello-1.0-1.src.rpm, should 
  471. have been installed. These two files are for testing. 
  472.  
  473.   I assume these files are installed like this. 
  474.  
  475.        X:/emx/src/redhat/RPMS/i386/hello-1.0-1.i386-OS2.rpm
  476.        X:/emx/src/redhat/SRPMS/hello-1.0-1.src.rpm
  477.  
  478.   If you have done custum installation, interprete ``X:/emx/src/redhat'' 
  479. as rpm top directory of yours. 
  480.  
  481.  
  482. Test 1: Querying
  483.  
  484.       > rpm -qip X:/emx/src/redhat/RPMS/i386/hello-1.0-1.i386-OS2.rpm
  485.                                 # ``-qip'' is equivalent to ``-p -i -p''
  486. # begining of output
  487.  
  488. Name        : hello                        Relocations: /usr
  489. Version     : 1.0                               Vendor: Red Hat Software
  490. Release     : 1                             Build Date: Sun Oct 24 16:53:30
  491. 1999
  492.  
  493. Install date: (not installed)               Build Host: localhost
  494. Group       : Utilities                     Source RPM: hello-1.0-1.src.rpm
  495. Size        : 14069                            License: GPL
  496. Packager    : Red Hat Software <bugs@redhat.com>
  497. URL         : http://www.redhat.com
  498. Summary     : hello -- hello, world rpm
  499. Description :
  500. Simple rpm demonstration.
  501.  
  502. # end of output
  503.  
  504.       > rpm -qip X:/emx/src/redhat/RPMS/i386/hello-1.0-1.i386-OS2.rpm
  505.                                                       # Query package list
  506. # begin
  507.  
  508. /emx/doc/hello-1.0
  509. /emx/doc/hello-1.0/FAQ
  510. /usr/local/bin/hello.exe
  511.  
  512. #end
  513.  
  514.    If you are not able to get these outputs, installation is not successful. 
  515.  
  516.  
  517. Test 2: Install binary package
  518.  
  519.       > rpm -i X:/emx/src/redhat/RPMS/i386/hello-1.0-1.i386-OS2.rpm
  520.  
  521.    If an environment variable RPMDRV is 'c', files are installed like this. 
  522.  
  523.               c:/emx/doc/hello-1.0
  524.               c:/emx/doc/hello-1.0/FAQ
  525.               c:/usr/local/bin/hello.exe
  526.  
  527. IF you are ready to use emx/gcc system, do the next test, or step to the next
  528. chapter. 
  529.  
  530.  
  531. Test3: Make rpm package (NOTE: for this test you have emx/gcc )
  532.  
  533.    First of all, install source package for testing. 
  534.    
  535.       > rpm -i X:/emx/src/redhat/SRPMS/hello-1.0-1.src.rpm
  536.    
  537.    Confirm spec file and "tar + gzipped" source are installed. 
  538.  
  539.       > dir X:\emx\src\redhat\SPECS\hello*.*
  540.  
  541.         99-10-22   2:25        819           0  hello.spec
  542.                 1 file(s)        819 bytes used
  543.  
  544.  
  545.  
  546.       > dir X:\emx\src\redhat\SOURCES\hello*.*
  547.  
  548.         99-10-22   2:32      10240           0  hello-1.0.tar.gz
  549.                 1 file(s)      10240 bytes used
  550.  
  551.  
  552.    Now, make binary and source package. 
  553.    
  554.    
  555.       > rpm -ba X:/emx/src/redhat/SPECS/hello.spec
  556.    Or  
  557.       > rpm -ba X:/emx/src/redhat/SPECS/hello.spec 2>&1 | tee rpm.log
  558.                                                # If you have `tee.exe'
  559.  
  560.     If successful, tail of an output read like this.
  561.   
  562.               Conflicts: goodbye
  563.               Obsoletes: howdy
  564.               Wrote: x:/emx/src/redhat/SRPMS/hello-1.0-1.src.rpm
  565.               Wrote: x:/emx/src/redhat/RPMS/i386/hello-1.0-1.i386.rpm
  566.               Executing: %clean
  567.               + umask 022
  568.               + cd x:/emx/src/RedHat/BUILD
  569.               + cd hello-1.0
  570.               + rm -rf /var/tmp/hello-root
  571.               + exit 0
  572.   
  573. If some tests failed, read this manual again and recheck your installation. 
  574.  
  575.  
  576.  
  577. Mannuals    @doc
  578. ========
  579.  
  580. Documentations are in `doc\rpm-3.0.3'. 
  581.  
  582. OS/2 specific docs
  583.       README-rpm-3.0.3.os2
  584.       CHANGES.os2
  585.       PROBLEMES.os2
  586.       EXAMPLE.os2
  587.       TODO.os2
  588.  
  589. Basic docs
  590.     63177 Oct  5 05:18 CHANGES
  591.       656 Mar 17  1999 GROUPS
  592.      2751 Feb 25  1997 RPM-PGP-KEY
  593.      3589 Sep  8 01:24 buildroot
  594.      8051 Sep  8 01:24 dependencies
  595.      9911 Jul 20 07:13 format
  596.      7988 Sep  8 00:46 macros
  597.      1793 Sep  8 00:46 multiplebuilds
  598.      5253 Jul 20 07:13 queryformat
  599.      1957 Jul 20 07:13 relocatable
  600.      2435 Aug 19 03:28 signatures
  601.      3416 Sep  8 00:46 spec
  602.      5295 Aug 21 04:11 triggers
  603.  
  604.                                                                                                 5295 Aug 21 04:11 triggers
  605. Linux HOWTOs (in `doc\rpm-3.0.3\LinuxDoc')
  606.     RPM-HOWTO.txt.gz
  607.     RPM-HOWTO.euc.gz
  608.  
  609.  
  610.  
  611. Manpages    @man
  612. ========
  613.  
  614. Manpages are in `man'
  615.     rpm.8
  616.     rpm2cpio.8
  617.     popt.3
  618.  
  619.  
  620.   If you have not installed manpage system, you can get OS/2 ported copy 
  621. from following URLs. 
  622.   
  623.     English only version
  624.  
  625.       ftp://hobbes,hobbes.nmsu.edu/pub/os2/dev/help/
  626.          gnuman.zip        44610 1995/01/31  GNU man 1.0 (for use with groff)
  627.  
  628.       ftp://hobbes,hobbes.nmsu.edu/pub/os2/tex/
  629.          gnugroff.zip    2153647 1996/05/07  GNU groff v1.10
  630.  
  631.     Japanized version ( in my web page)
  632.  
  633.        http://www2s.biglobe.ne.jp/~vtgf3mpr/manpage/groff-man.tar.bz2
  634.           
  635.  
  636.  
  637. Compile from source    @com
  638. ===================
  639.  
  640.     RPM source can be retrieved from ftp site. 
  641.  
  642.         ftp://ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/rpm-3.0.3.tar.gz
  643.     ftp://ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/rpm-3.0.3-6x.src.rpm
  644.  
  645.                                          # Release number ``6x'' may not be
  646.                                # always valid
  647.  
  648.     Via ftp client, simplly get one of them.
  649.     Direct installaion using rpm can be easily done like this.
  650.  
  651.          x:/foo> rpm -i ftp://ftp.rpm.org/pub/rpm/dist/\ # Do not misunder-
  652.                      rpm-3.0.x/rpm-3.0.3-6x.src.rpm  # stand line is
  653.                                      # braking
  654.  
  655.     If you `rpm-3.0.3-6x.src.rpm':
  656.           
  657.          x:/foo> rpm -i SOMEWHERE/rpm-3.0.3-6x.src.rpm
  658.           
  659.     If `rpm-3.0.3.tar.gz':
  660.           
  661.          x:/foo> copy SOMEWHERE/rpm-3.0.3.tar.gz X:\emx\src\redhat\SOURCES
  662.  
  663.      
  664. To run shell script in `Makefile', `sh.exe' must be available. 
  665.      You can get it from ftp sites:
  666.         ftp.leo.org/pub/comp/os/os2/leo/shells/pdksh-5.2.13-emx.zip
  667.  
  668. Use GNU patch, `patch.exe' or `gpatch.exe': OS/2 default `patch.exe' can't
  669. be used. 
  670.  
  671.  
  672. GNU gcc and GNU file utilities must be available. 
  673.  
  674.  
  675. Libraries and utilities that I used to compile RPM are as follows:
  676.  
  677.        Zlib library version 1.13
  678.          XFree86 for OS/2 distribution contains this library, but
  679.          for convenience I included headers and library in this package.
  680.  
  681.        Bzip2 version 0.9.0c
  682.            http://www.muraroa.demon.co.uk/
  683.          I included OS/2 patch in this package:
  684.                `emx\src\redhat\SOURCES\bzip2-0.9.0c.OS2.diff.gz'
  685.          For convenience I included headers and library in this package.
  686.  
  687.      
  688.        GNU gettext 0.10.35 with Japanese Shift JIS availability
  689.            http://www.netpassport.or.jp/~wjsawa/os2_gettext-0.10.35.zip
  690.            You need `msgfmt.exe' and `xgettext.exe'.
  691.            If you need only English message, you do not have to get 
  692.        GNU gettext. 
  693.  
  694.        Multi-thread version "db.a" or "db.lib"
  695.            I forgot the URL of "db_mt.zip" which contains db library 
  696.          with GCC option "-Zmtd".
  697.            So I included them in this package. 
  698.  
  699.        GNU gdbm-1.7.3 for OS/2 which is ported by Hung-Chi Chu 
  700.                                                   <hcchu@r350.ee.ntu.edu.tw>
  701.            `gdbm173.a' is included in this package
  702.  
  703.  
  704.  
  705.  
  706. 1. Uncompress source and apply a patch
  707.  
  708.        x:\> mkdir src
  709.        x:\> cd src
  710.        x:\src> tar zxvf SOMEWHERE/rpm-3.0.3.tar.gz
  711.        x:\src> cd rpm-3.0.3
  712.        x:\src\rpm-3.0.3> gzip -d < ANYWHERE/rpm-3.0.3-OS2.diff.gz | patch -p1
  713.  
  714.  
  715. 2. Edit `config.status' in both current and popt directory 
  716.  
  717.   For the former
  718.     
  719.         line  57:    s%@prefix@%g:/emx%g
  720.         line  55:    s%@LIBS@%-lintl_d -L$(prefix)/lib -lsocket -ldb \
  721.                    -lz113 -llibbzip2%g
  722.         line 141         s%@INTLDEPS@%$(top_builddir)/intl/intl_d.a%g
  723.     line 142         s%@INTLLIBS@%$(top_builddir)/intl/intl_d.a%g
  724.  
  725.   For the latter
  726.  
  727.         line  47         s%@prefix@%g:/emx%g
  728.         line 109         s%@INTLDEPS@%$(top_builddir)/intl/intl_d.a%g
  729.     line 110         s%@INTLLIBS@%$(top_builddir)/intl/intl_d.a%g
  730.  
  731.     
  732.     Change ``g:/emx'' according to your environment. ``prefix'' should be
  733.   your HOME directory.
  734.     If you do not link zlib library included in my package, ``-lz113''
  735.   and/or ``-llibbzip2'' may be wrong. 
  736.     If you do not link "db.a" or "db.lib" included in this package, 
  737.   remove "-Zmtd" from `CFLAGS' and 'LDFLAGS'. In this case, all other
  738.   C library must be compiled without ``-Zmtd''. 
  739.  
  740.  
  741. 3. Make `Makefile's and configration files 
  742.  
  743.    DO
  744.        x:\src\rpm-3.0.3> sh Config.os2
  745.  
  746.    Or manualy do it
  747.    
  748.        x:\src\rpm-3.0.3> touch config.cache
  749.        x:\src\rpm-3.0.3> touch config.status
  750.        x:\src\rpm-3.0.3> sh config.status
  751.        x:\src\rpm-3.0.3> cd popt
  752.        x:\src\rpm-3.0.3\popt> sh config.status
  753.        x:\src\rpm-3.0.3\popt> cd ..
  754.        x:\src\rpm-3.0.3> 
  755.  
  756. 4. Compile and link
  757.  
  758.        x:\src\rpm-3.0.3> make 
  759.          
  760. 5. Install
  761.  
  762.        x:\src\rpm-3.0.3> make
  763.    Or
  764.        x:\src\rpm-3.0.3> make install prefix=SOMEWHERE
  765.  
  766.  
  767. 6. Setup environmental variables and edit `~/.rpmmacros' 
  768.    as described in earlier chapters. 
  769.    
  770.   
  771.  
  772.  
  773. Make rpm package for rpm version 3.0.3    @mak
  774. ======================================
  775.  
  776.   Using OS/2 ported RPM, you can easily make binary or source RPM package. 
  777.  
  778.   I included a sample spec file, `rpm-OS2-3.0.3-5.2.spec', which is to make 
  779. OS/2 ported RPM package. If you have already installed RPM, you can make 
  780. packages in the following way. 
  781.  
  782.  
  783.   Be sure that both `rpm-3.0.3.tar.gz' and `rpm-3.0.3-OS2.diff.gz' exists
  784. in `SOURCES' directory, and `rpm-3.0.3-os2.spec' in SPECS directory.
  785.  
  786.         
  787.   Do like this
  788.  
  789.  
  790.         x:\foo> rpm -ba X:/emx/src/redhat/SPECS/rpm-3.0.3-OS2.diff.gz
  791.  
  792.  
  793.   A binary package, `rpm-3.0.3-1.0.i386-OS2.rpm' will be created in 
  794. `X:/emx/src/redhat/RPMS/i386' and a source package, `rpm-3.0.3-1.0.src.rpm',
  795. in `X:/emx/src/redhat/SRPMS'. 
  796.  
  797.   To confirm newly created rpm packages are flawless, do some tests:
  798.  
  799.   Show information
  800.      x:\foo> rpm -qip X:/emx/src/redhat/RPMS/i386/rpm-3.0.3-1.0.i386-OS2.rpm
  801.              
  802.   List files
  803.      x:\foo> rpm -qlp  X:/emx/src/redhat/RPMS/i386/rpm-3.0.3-1.0.i386-OS2.rpm
  804.           
  805.   Install
  806.      x:\foo> rpm -i  X:/emx/src/redhat/RPMS/i386/rpm-3.0.3-1.0.i386-OS2.rpm
  807.  
  808.  
  809.  
  810. Supplemental Scripts  @sup
  811. ====================
  812.  
  813. /emx/bin/unrpm.cmd  : Extact files from rpm package 
  814.                       using `rpm.exe' and `cpio.exe'
  815.  
  816.      x:\foo> rpm -i  X:/emx/src/redhat/RPMS/i386/rpm-3.0.3-1.0.i386-OS2.rpm
  817.  
  818.   In this way, all files in `rpm-3.0.3-1.0.i386-OS2.rpm' are extracted in 
  819.   current directory with subdirectories. 
  820.  
  821. /emx/bin/os2conf.cmd : Sed script to modify `configure'
  822.  
  823.      x:\foo\src\bar> cp configure configure.orig
  824.      x:\foo\src\bar> os2conf configure.orig > configure
  825.      x:\foo\src\bar> ksh
  826.      x:/foo/src/bar> configure 
  827.      x:\foo\src\bar> make
  828.  
  829.   Almost always, you can run modified `configure' successfully. 
  830.   Prior to using `os2conf.cmd', you must modify it according to
  831.   instruction described in it. 
  832.  
  833.  
  834. That' all. 
  835.  
  836.  
  837.  
  838.  
  839.                                              SAWATAISHI JUN, YOKOHAMA JAPAN
  840.                                                        <jsawa@attblobal.net>
  841.                            http://www2s.biglobe.ne.jp/~vtgf3mpr/indxos2.htm
  842.  
  843.  
  844. /*----- end of document --------------------------------------------------*/
  845.  
  846.