예제 #1
0
def install():
    # original script in eagle-lin-x.y.z.run is inefficient
    # so just open the file and find line
    # __DATA__
    #just after that line there starts tar.bz2 file
    runfile = file('eagle-lin-%s.run' % get.srcVERSION(), 'rb')
    line = ''
    while line != '__DATA__\n':
        line = runfile.readline()
    tf = tarfile.open(fileobj=runfile, mode='r|bz2', bufsize=65536)
    tf.extractall(path="%s/opt/" % get.installDIR())
    tf.close()
    runfile.close()
    #now the eagle is unpacked
    eagledir = "%s/opt/eagle" % get.installDIR()
    #rename /opt/eagle-x.y.z to /opt/eagle
    os.rename("%s-%s" % (eagledir, get.srcVERSION()), eagledir)
    #users have to have writable bin directory,
    #because license file is written here on first run
    shelltools.chown(eagledir, gid="users")
    shelltools.chmod("%s/bin" % eagledir, 0775)
    #make symlinks
    pisitools.dosym("/opt/eagle/bin/eagle", "/usr/bin/eagle")
    pisitools.dosym("/opt/eagle/bin/eagleicon50.png",
                    "/usr/share/pixmaps/eagle.png")
예제 #2
0
파일: actions.py 프로젝트: DeepakBachu/2013
def install():
    autotools.rawInstall('DESTDIR="%s"' % get.installDIR())

    pisitools.dodir("/var/run/memcached")
    shelltools.chown("%s/var/run/memcached" % get.installDIR(), "memcached", "memcached")
    shelltools.chmod("%s/var/run/memcached" % get.installDIR())

    pisitools.dodoc("AUTHORS", "README", "doc/*.txt")
예제 #3
0
def install():
    autotools.rawInstall('DESTDIR="%s"' % get.installDIR())

    pisitools.dodir("/run/memcached")
    shelltools.chown("%s/run/memcached" % get.installDIR(), "memcached",
                     "memcached")
    shelltools.chmod("%s/run/memcached" % get.installDIR())

    pisitools.dodoc("AUTHORS", "README.md", "NEWS", "COPYING", "doc/*.txt")
예제 #4
0
def install():
    pisitools.dodir("/usr/sbin")
    
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    shelltools.chown("%s/usr/sbin/traceroute" % get.installDIR(), "root", "wheel")
    shelltools.chmod("%s/usr/sbin/traceroute" % get.installDIR(), 04710)
    
    pisitools.doman("traceroute.8")
    pisitools.dodoc("CHANGES", "INSTALL")
예제 #5
0
파일: actions.py 프로젝트: waroi/main
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodir("/run/clamav")
    pisitools.dodir("/var/lib/clamav")
    shelltools.chmod(get.installDIR() + "/var/lib/clamav", 0777)
    pisitools.dodir("/var/log/clamav")
    shelltools.touch(get.installDIR() + "/var/log/clamav/freshclam.log")
    shelltools.chmod(get.installDIR() + "/var/log/clamav/freshclam.log", 0660)
    shelltools.chown("%s/var/log/clamav/freshclam.log" % get.installDIR(), "clamav", "clamav")
예제 #6
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodir("/run/clamav")
    pisitools.dodir("/var/lib/clamav")
    pisitools.dodir("/var/log/clamav")
    shelltools.touch(get.installDIR() + "/var/log/clamav/freshclam.log")
    shelltools.chmod(get.installDIR() + "/var/log/clamav/freshclam.log", 0600)
    shelltools.chown("%s/var/log/clamav/freshclam.log" % get.installDIR(), "clamav", "clamav")

    pisitools.dodoc("AUTHORS", "BUGS", "COPYING*", "NEWS", "README", "ChangeLog", "FAQ")
예제 #7
0
def install():
    pisitools.dodir("/usr/sbin")

    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    shelltools.chown("%s/usr/sbin/traceroute" % get.installDIR(), "root",
                     "wheel")
    shelltools.chmod("%s/usr/sbin/traceroute" % get.installDIR(), 04710)

    pisitools.doman("traceroute.8")
    pisitools.dodoc("CHANGES", "INSTALL")
예제 #8
0
def install():
    pisitools.dosbin("vsftpd")
    
    pisitools.dodoc("AUDIT", "BENCHMARKS", "BUGS", "Changelog", "FAQ", "INSTALL", "LICENSE", "README", "README.security", "REWARD", "SIZE", "SPEED", "TODO", "TUNING")
    pisitools.newdoc("vsftpd.conf", "vsftpd.conf.example")
    pisitools.doman("vsftpd.conf.5", "vsftpd.8")

    pisitools.dodir("/home/ftp")
    pisitools.dodir("/home/ftp/incoming")
    shelltools.chown("%s/home/ftp/incoming" % get.installDIR( ), "ftp", "ftp")

    pisitools.dodir("/usr/share/vsftpd/empty")
예제 #9
0
    def testShelltoolsChown(self):
        from pisi.actionsapi.shelltools import chown

        f = open("tests/actionsapitests/chowntest", "w")
        f.close()
        chown("tests/actionsapitests/chowntest")
        self.assertEqual(os.stat("tests/actionsapitests/chowntest").st_uid, pwd.getpwnam("root")[2])
        self.assertEqual(os.stat("tests/actionsapitests/chowntest").st_gid, grp.getgrnam("root")[2])
        chown("tests/actionsapitests/chowntest", "daemon", "wheel")
        self.assertEqual(os.stat("tests/actionsapitests/chowntest").st_uid, pwd.getpwnam("daemon")[2])
        self.assertEqual(os.stat("tests/actionsapitests/chowntest").st_gid, grp.getgrnam("wheel")[2])
        os.remove("tests/actionsapitests/chowntest")
예제 #10
0
파일: actions.py 프로젝트: mrust1/PisiLinux
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodir("/run/clamav")
    pisitools.dodir("/var/lib/clamav")
    pisitools.dodir("/var/log/clamav")
    shelltools.touch(get.installDIR() + "/var/log/clamav/freshclam.log")
    shelltools.chmod(get.installDIR() + "/var/log/clamav/freshclam.log", 0600)
    shelltools.chown("%s/var/log/clamav/freshclam.log" % get.installDIR(),
                     "clamav", "clamav")

    pisitools.dodoc("AUTHORS", "BUGS", "COPYING*", "NEWS", "README",
                    "ChangeLog", "FAQ")
예제 #11
0
def install():
    autotools.rawInstall('basedir="%s/usr"' % get.installDIR())

    pisitools.remove("/usr/lib/*.a")

    pisitools.dosym("liblockdev.so.1.0.3", "/usr/lib/liblockdev.so.1")
    shelltools.chmod("%s/usr/lib/liblockdev.so.1.0.3" % get.installDIR(), 0755)

    pisitools.dodir("/run/lock/lockdev")
    shelltools.chmod("%s/run/lock/lockdev" % get.installDIR(), 0775)
    shelltools.chown("%s/run/lock/lockdev" % get.installDIR(), "root", "lock")

    pisitools.dodoc("ChangeLog", "AUTHORS", "LICENSE")
예제 #12
0
def install():
    pisitools.dodir("/lib/udev/rules.d")
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    # udev support
    pisitools.insinto("/lib/udev/rules.d/", "etc/openct.udev", "95-openct.rules")

    pisitools.dodir("/var/run/openct")
    shelltools.chmod("%s/var/run/openct" % get.installDIR(), 0755)
    shelltools.chown("%s/var/run/openct" % get.installDIR(), gid="pnp")

    pisitools.remove("/usr/lib/openct-ifd.so")

    pisitools.dodoc("NEWS", "TODO", "doc/README")
예제 #13
0
def install():
    pisitools.dodir("/lib/udev/rules.d")
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    # udev support
    pisitools.insinto("/lib/udev/rules.d/", "etc/openct.udev", "95-openct.rules")

    pisitools.dodir("/var/run/openct")
    shelltools.chmod("%s/var/run/openct" % get.installDIR(), 0755)
    shelltools.chown("%s/var/run/openct" % get.installDIR(), gid="pnp")

    pisitools.remove("/usr/lib/openct-ifd.so")

    pisitools.dodoc("NEWS", "TODO", "doc/README")
예제 #14
0
def install():
    pisitools.dosbin("vsftpd")

    pisitools.dodoc("AUDIT", "BENCHMARKS", "BUGS", "Changelog", "FAQ",
                    "INSTALL", "LICENSE", "README", "README.security",
                    "REWARD", "SIZE", "SPEED", "TODO", "TUNING")
    pisitools.newdoc("vsftpd.conf", "vsftpd.conf.example")
    pisitools.doman("vsftpd.conf.5", "vsftpd.8")

    pisitools.dodir("/home/ftp")
    pisitools.dodir("/home/ftp/incoming")
    shelltools.chown("%s/home/ftp/incoming" % get.installDIR(), "ftp", "ftp")

    pisitools.dodir("/usr/share/vsftpd/empty")
예제 #15
0
def install():
    autotools.rawInstall("PREFIX=%s" % get.installDIR())
    
    pisitools.dosym("man", "/usr/bin/manpath")

    pisitools.dodoc("LSM", "README*", "TODO")

    pisitools.dodir("/var/cache/man")

    list = (coreutils.cat(get.installDIR() + "/etc/man.conf") | coreutils.grep("^MANSECT") | coreutils.join).split()[1]
    
    for index in list.split(":"):
        pisitools.dodir("/var/cache/man/cat%s" % index)
        shelltools.chmod("%s/var/cache/man/cat%s" % (get.installDIR(),index), 0775)
        shelltools.chown("%s/var/cache/man/cat%s" % (get.installDIR(),index), "root", "man")
예제 #16
0
def install():
    autotools.rawInstall("PREFIX=%s" % get.installDIR())

    pisitools.dosym("man", "/usr/bin/manpath")

    pisitools.dodoc("LSM", "README*", "TODO")

    pisitools.dodir("/var/cache/man")

    list = (coreutils.cat(get.installDIR() + "/etc/man.conf") | coreutils.grep("^MANSECT") | coreutils.join).split()[1]

    for index in list.split(":"):
        pisitools.dodir("/var/cache/man/cat%s" % index)
        shelltools.chmod("%s/var/cache/man/cat%s" % (get.installDIR(),index), 0775)
        shelltools.chown("%s/var/cache/man/cat%s" % (get.installDIR(),index), "root", "man")

    pisitools.dosed("%s/etc/man.conf" % get.installDIR(),"^TROFF.*","TROFF\t groff-utf8 -Tutf8 -mandoc")
    pisitools.dosed("%s/etc/man.conf" % get.installDIR(),"^NROFF.*","NROFF\t groff-utf8 -Tutf8 -mandoc")
예제 #17
0
def install():
    pisitools.dobin("src/slocate")
    shelltools.chmod("%s/usr/bin/slocate" % get.installDIR(), 02700)
    shelltools.chown("%s/usr/bin/slocate" % get.installDIR(), "root", "locate")

    pisitools.dobin("debian/cron.daily", "/etc/cron.daily")
    pisitools.rename("/etc/cron.daily/cron.daily", "slocate")

    pisitools.dodir("/var/lib/slocate")
    shelltools.chown("%s/var/lib/slocate" % get.installDIR(), "root", "locate")
    shelltools.chmod("%s/var/lib/slocate" % get.installDIR(), 0750)
    #shelltools.touch("%s/var/lib/slocate/slocate.db" % get.installDIR())

    pisitools.dosym("slocate", "/usr/bin/locate")
    pisitools.dosym("slocate", "/usr/bin/updatedb")

    pisitools.dodoc("WISHLIST", "README", "Changelog", "notes")
    pisitools.doman("doc/*.1")
예제 #18
0
파일: actions.py 프로젝트: suvari/core
def install():
    autotools.rawInstall('DESTDIR=%s' % get.installDIR())

    for dir in ["archive", "backup", "cache"]:
        pisitools.dodir("/etc/lvm/%s" % dir)
        shelltools.chmod(get.installDIR() + "/etc/lvm/%s" % dir, 0755)
        shelltools.chown(get.installDIR() + "/etc/lvm/%s" % dir,
                         uid='root',
                         gid='root')

    shelltools.system(
        "sed -i 's,use_lvmetad = 1,use_lvmetad = 1,' %s/etc/lvm/lvm.conf" %
        get.installDIR())

    #pisitools.move("/sbin/lvmconf","scripts/lvmconf.sh")

    pisitools.dodoc("COPYING", "COPYING.LIB", "README", "VERSION",
                    "WHATS_NEW")  # "VERSION_DM", "WHATS_NEW_DM"
예제 #19
0
def install():
    autotools.rawInstall("sbindir=%s/sbin \
                          libdir=%s/usr/lib \
                          incdir=%s/usr/include \
                          mandir=%s/usr/share/man" % ((get.installDIR(),)*4))

    pisitools.remove("/usr/lib/*.a")

    pisitools.dosym("liblockdev.so.1.0.3", "/usr/lib/liblockdev.so.1")

    pisitools.dodir("/var/lock/lockdev")
    shelltools.chmod("%s/var/lock/lockdev" % get.installDIR(), 0775)
    shelltools.chown("%s/var/lock/lockdev" % get.installDIR(), "root", "lock")

    # FIXME: This doesnt work
    #shelltools.chmod("%s/sbin/lockdev" % get.installDIR(), mode=02711)
    shelltools.chown("%s/sbin/lockdev" % get.installDIR(), "root", "lock")

    pisitools.dodoc("ChangeLog", "AUTHORS", "LICENSE")
예제 #20
0
파일: actions.py 프로젝트: DeepakBachu/2013
def install():
    autotools.rawInstall("sbindir=%s/sbin \
                          libdir=%s/usr/lib \
                          incdir=%s/usr/include \
                          mandir=%s/usr/share/man" % ((get.installDIR(),)*4))

    pisitools.remove("/usr/lib/*.a")

    pisitools.dosym("liblockdev.so.1.0.3", "/usr/lib/liblockdev.so.1")

    pisitools.dodir("/var/lock/lockdev")
    shelltools.chmod("%s/var/lock/lockdev" % get.installDIR(), 0775)
    shelltools.chown("%s/var/lock/lockdev" % get.installDIR(), "root", "lock")

    # FIXME: This doesnt work
    #shelltools.chmod("%s/sbin/lockdev" % get.installDIR(), mode=02711)
    shelltools.chown("%s/sbin/lockdev" % get.installDIR(), "root", "lock")

    pisitools.dodoc("ChangeLog", "AUTHORS", "LICENSE")
예제 #21
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    # udev support
    """
    pisitools.insinto("/etc/udev/rules.d/", "etc/openct.udev", "95-openct-rules")
    pisitools.doexe("etc/openct_pcmcia", "/lib/udev")
    pisitools.doexe("etc/openct_serial", "/lib/udev")
    pisitools.doexe("etc/openct_usb", "/lib/udev")
    """

    # hal support

    pisitools.insinto("/usr/share/hal/fdi/information/10freedesktop/", "etc/openct.fdi", "10-usb-openct.fdi")
    pisitools.insinto("/usr/libexec/", "etc/openct.hald", "hald-addon-openct")
    shelltools.chmod("%s/usr/libexec/hald-addon-openct" % get.installDIR())

    pisitools.dodir("/var/run/openct")
    shelltools.chmod("%s/var/run/openct" % get.installDIR(), 0750)
    shelltools.chown("%s/var/run/openct" % get.installDIR(), gid="pnp")

    pisitools.dodoc("NEWS", "TODO", "doc/README")
예제 #22
0
def install():
    # original script in eagle-lin-x.y.z.run is inefficient
    # so just open the file and find line
    # __DATA__
    #just after that line there starts tar.bz2 file
    runfile = file('eagle-lin-%s.run' % get.srcVERSION(), 'rb')
    line  = ''
    while line != '__DATA__\n':
        line = runfile.readline()
    tf = tarfile.open(fileobj=runfile, mode='r|bz2', bufsize=65536)
    tf.extractall(path="%s/opt/" % get.installDIR())
    tf.close()
    runfile.close()
    #now the eagle is unpacked
    eagledir = "%s/opt/eagle" % get.installDIR()
    #rename /opt/eagle-x.y.z to /opt/eagle
    os.rename("%s-%s" % (eagledir, get.srcVERSION()), eagledir)
    #users have to have writable bin directory,
    #because license file is written here on first run
    shelltools.chown(eagledir, gid="users")
    shelltools.chmod("%s/bin" % eagledir, 0775)
    #make symlinks
    pisitools.dosym("/opt/eagle/bin/eagle", "/usr/bin/eagle")
    pisitools.dosym("/opt/eagle/bin/eagleicon50.png", "/usr/share/pixmaps/eagle.png")
예제 #23
0
def install():
    autotools.rawInstall("DESTDIR=%s/" % get.installDIR())

    pisitools.dodir("/var/lib/polkit-1")
    shelltools.chmod("%s/var/lib/polkit-1" % get.installDIR(), mode=00700)
    shelltools.chmod("%s/etc/polkit-1/rules.d" % get.installDIR(), mode=00700)
    shelltools.chown("%s/etc/polkit-1/rules.d" % get.installDIR(),"polkitd","root") #yada? "polkitd","root"
    shelltools.chown("%s/var/lib/polkit-1" % get.installDIR(),"polkitd","polkitd")  
    shelltools.chown("%s/usr/share/polkit-1" % get.installDIR(),"polkitd","root") #yada? "polkitd","root"
    pisitools.dodoc("AUTHORS", "NEWS", "README", "HACKING", "COPYING")
예제 #24
0
def install():
    autotools.rawInstall("DESTDIR=%s/" % get.installDIR())

    pisitools.dodir("/var/lib/polkit-1")
    shelltools.chmod("%s/var/lib/polkit-1" % get.installDIR(), mode=00700)
    shelltools.chmod("%s/etc/polkit-1/rules.d" % get.installDIR(), mode=00700)
    shelltools.chown("%s/etc/polkit-1/rules.d" % get.installDIR(),"polkitd","root") #yada? "polkitd","root"
    shelltools.chown("%s/var/lib/polkit-1" % get.installDIR(),"polkitd","polkitd")  
    shelltools.chown("%s/usr/share/polkit-1" % get.installDIR(),"polkitd","root") #yada? "polkitd","root"
    pisitools.dodoc("AUTHORS", "NEWS", "README", "HACKING", "COPYING")
예제 #25
0
파일: actions.py 프로젝트: Rmys/core
def install():
    mesontools.install()

    pisitools.dodir("/var/lib/polkit-1")
    shelltools.chmod("%s/var/lib/polkit-1" % get.installDIR(), mode=00700)
    shelltools.chmod("%s/etc/polkit-1/rules.d" % get.installDIR(), mode=00700)
    shelltools.chown("%s/etc/polkit-1/rules.d" % get.installDIR(), "polkitd",
                     "root")  #yada? "polkitd","root"
    shelltools.chown("%s/var/lib/polkit-1" % get.installDIR(), "polkitd",
                     "polkitd")
    shelltools.chown("%s/usr/share/polkit-1" % get.installDIR(), "polkitd",
                     "root")  #yada? "polkitd","root"

    pisitools.removeDir("/tmp")

    pisitools.dodoc("AUTHORS", "NEWS*", "README*", "HACKING*", "COPYING*")
예제 #26
0
def install():  
    pisitools.insinto("/usr/bin/", "obmenu-generator")
    shelltools.chmod("%s/usr/bin/obmenu-generator" % get.installDIR(), 0755)
    shelltools.chown("%s/usr/bin/obmenu-generator" % get.installDIR(), gid="users")
예제 #27
0
def install():  
    pisitools.insinto("/opt/desura/", "desura", "desura")
    shelltools.chmod("%s/opt/desura/desura" % get.installDIR(), 0755)
    shelltools.chown("%s/opt/desura/desura" % get.installDIR(), gid="users")