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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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"
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")
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")
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")
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")
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")
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")
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*")
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")
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")