integrit.spec 4.6 KB

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