integrit.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ##
  2. ## integrit.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package version
  26. %define V_major 3.02
  27. %define V_minor 00
  28. # package information
  29. Name: integrit
  30. Summary: Filesystem Integrity Scanner
  31. URL: http://integrit.sourceforge.net/
  32. Vendor: Ed L Cashin
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [EVAL]
  35. Group: System
  36. License: GPL
  37. Version: %{V_major}.%{V_minor}
  38. Release: 20020927
  39. # list of sources
  40. Source0: http://osdn.dl.sourceforge.net/sourceforge/integrit/integrit-%{version}.tar.gz
  41. Source1: integrit.conf
  42. Patch0: integrit.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20020206, texinfo
  47. PreReq: OpenPKG, openpkg >= 20020206
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Integrit is an alternative to file integrity verification programs
  52. like tripwire and aide. It helps you determine whether an intruder
  53. has modified a computer system. Without a system like integrit, a
  54. sysadmin can't know whether the tools he/she uses to investigate a
  55. potential break in are trojan horses or not. e.g., If the machine
  56. has a "/tmp/. " directory containing a shell that's setuid root,
  57. and you want to investigate to determine how badly the cracker has
  58. compromised the machine, how do you know that the attacker hasn't
  59. replaced your "find" and "ls" commands with tampered versions that
  60. fail to report the cracker's files? A system like integrit works
  61. by creating a database that is a snapshot of the most essential
  62. parts of your computer system. You put the database somewhere safe,
  63. and then later you can use it to make sure that no one has made
  64. any illicit modifications to the computer system. In the case of a
  65. break in, you know exactly which files have been modified, added, or
  66. removed. integrit is a robust, stable piece of software designed for
  67. professional use.
  68. %prep
  69. %setup -q -n integrit-%{V_major}
  70. %patch -p1
  71. %build
  72. CC="%{l_cc}" \
  73. CFLAGS="%{l_cflags -O}" \
  74. ./configure \
  75. --prefix=%{l_prefix}
  76. %{l_make} %{l_mflags -O}
  77. %{l_make} %{l_mflags -O} utils
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. cd ./doc/
  81. %{l_make} %{l_mflags} install \
  82. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  83. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  84. cd ../utils/
  85. %{l_make} %{l_mflags} install \
  86. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  87. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  88. cd ../
  89. %{l_shtool} install -c -m 655 \
  90. integrit $RPM_BUILD_ROOT%{l_prefix}/sbin/
  91. # install a default configuration
  92. %{l_shtool} mkdir -f -p -m 755 \
  93. $RPM_BUILD_ROOT%{l_prefix}/etc/integrit \
  94. $RPM_BUILD_ROOT%{l_prefix}/share/integrit
  95. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  96. %{SOURCE integrit.conf} \
  97. $RPM_BUILD_ROOT%{l_prefix}/etc/integrit/
  98. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  99. # strip binaries
  100. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  101. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  102. # determine files
  103. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  104. %{l_files_std} \
  105. '%config %{l_prefix}/etc/integrit/*'
  106. %files -f files
  107. %clean
  108. rm -rf $RPM_BUILD_ROOT