Ticket #5042: patch-prefix.diff

File patch-prefix.diff, 1.2 KB (added by n3npq@…, 19 years ago)

files/patch-prefix.diff

  • ./Makefile

    old new  
    55DESTDIR=/
    66PYTHON=python
    77
    8 prefix=/usr
     8prefix=@@PREFIX@@
    99bindir=$(prefix)/bin
    1010
    1111all:
  • ./smart/const.py

    old new  
    6464
    6565BLOCKSIZE = 16384
    6666
    67 DISTROFILE  = "/usr/lib/smart/distro.py"
    68 PLUGINSDIR  = "/usr/lib/smart/plugins/"
    69 DATADIR     = "/var/lib/smart/"
     67DISTROFILE  = "@@PREFIX@@/lib/smart/distro.py"
     68PLUGINSDIR  = "@@PREFIX@@/lib/smart/plugins/"
     69DATADIR     = "@@PREFIX@@/var/lib/smart/"
    7070USERDATADIR = "~/.smart/"
    7171CONFFILE    = "config"
    7272
  • ./smart/util/filetools.py

    old new  
    6565        pass
    6666
    6767def setCloseOnExecAll():
    68     for fd in range(3,resource.getrlimit(resource.RLIMIT_NOFILE)[1]):
     68    nfmax = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
     69    if nfmax > 4096:
     70        nfmax = 4096
     71    for fd in range(3,nfmax):
    6972        try:
    7073            flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0)
    7174            flags |= fcntl.FD_CLOEXEC