Changes between Version 16 and Version 17 of RpmHowToPackagers


Ignore:
Timestamp:
Sep 9, 2011, 3:54:35 PM (13 years ago)
Author:
dmik
Comment:

Added Repacking old software

Legend:

Unmodified
Added
Removed
Modified
  • RpmHowToPackagers

    v16 v17  
    128128}}}
    129129
     130=== Repacking old software ===
     131When you create RPM packages for software that you don't build from sources (like some old OS/2 programs that are only available in the binary form), you need to follow a special procedure in order to preserve the sizes and timestamps of the original files (which may be important for their identification in case if someone needs that).
     132
     133 1. Add the following to the .spec file (somewhere before the %install section):
     134{{{
     135# disable lxlite compression
     136%define __os_install_post       %{nil}
     137}}}
     138 2. Use
     139{{{
     140cp -Rdp <src> <dst>
     141}}}
     142  in the %install section when you copy files from BUILD to BUILDROOT for getting packed by rpmbuild; the naked cp command will kill the original timestamp (the <dst> file will get the current time).
     143
    130144=== CONFIG.SYS changes ===
    131145It is sometimes necessary to modify the CONFIG.SYS file during installation, even when using RPM. One of the examples is when your package installs a device driver that needs to be loaded at boot time or when a global environment variable needs to be set. This can be done from the {{{%post}}} section using the special macro {{{%cube}}} which is based on the CUBE tool.