code:
--- panda.py~	2013-09-11 23:01:06.715664263 +0200
+++ panda.py	2013-09-11 23:39:47.000000000 +0200
@@ -48,6 +48,11 @@
                                          "module-nvidia173-userspace",
                                          "xorg-video-nvidia173",
                                          "nvidia-xconfig",
+                                         "nvidia-settings"],
+                           "nvidia304": ["module-nvidia304",
+                                         "module-nvidia304-userspace",
+                                         "xorg-video-nvidia304",
+                                         "nvidia-xconfig",
                                          "nvidia-settings"]}

     def __get_primary_driver(self):
@@ -120,7 +125,7 @@
         if self.driver_name == "fglrx":
             self.os_driver = "radeon"
             return self.os_driver
-        elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173"]:
+        elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
             self.os_driver = "nouveau"
             return self.os_driver
         else:
@@ -169,10 +174,10 @@
         status, modified = self.update_grub_default_entries(arg)
         if status in ["os", "generic", "vendor"] and modified:
             self.update_grub_cfg()
-            self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "fglrx"] and status == "vendor" else "mesa")
-            if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173"] and status == "vendor":
+            self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "fglrx"] and status == "vendor" else "mesa")
+            if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and status == "vendor":
                 open(nvidia_blacklist_file, "w").write("blacklist nouveau\n")
-            elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173"] and os.path.isfile(nvidia_blacklist_file):
+            elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and os.path.isfile(nvidia_blacklist_file):
                 os.remove(nvidia_blacklist_file)

@@ -221,7 +226,7 @@
         if self.driver_name is None:
             self.__get_primary_driver()

-        if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173"]:
+        if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
             return ["vendor", "os", "generic"]
         elif "Not defined" == self.driver_name:
             return ["os", "generic"]


code:
--- panda-0.2.orig/panda.py	2014-11-14 02:12:02.000000000 +0200
+++ panda-0.2/panda.py	2014-11-14 02:20:47.921188120 +0200
@@ -46,6 +46,10 @@
                                          "xorg-video-nvidia173",
                                          "nvidia-xconfig",
                                          "nvidia-settings"],
+                           "nvidia340": ["module-nvidia340",
+                                         "xorg-video-nvidia340",
+                                         "nvidia-xconfig",
+                                         "nvidia-settings"],
                            "nvidia304": ["module-nvidia304",
                                          "xorg-video-nvidia304",
                                          "nvidia-xconfig",
@@ -53,6 +58,7 @@
         if util.get_platform() == "linux-x86_64":
             self.driver_packages["fglrx"].append("xorg-video-fglrx-32bit")
             self.driver_packages["nvidia-current"].append("xorg-video-nvidia-current-32bit")
+            self.driver_packages["nvidia340"].append("xorg-video-nvidia340-32bit")

     def __get_primary_driver(self):
         '''Get driver name for the working primary device'''
@@ -124,7 +130,7 @@
         if self.driver_name == "fglrx":
             self.os_driver = "radeon"
             return self.os_driver
-        elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
+        elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304" ,"nvidia340"]:
             self.os_driver = "nouveau"
             return self.os_driver
         else:
@@ -173,10 +179,10 @@
         status, modified = self.update_grub_default_entries(arg)
         if status in ["os", "generic", "vendor"] and modified:
             self.update_grub_cfg()
-            self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "fglrx"] and status == "vendor" else "mesa")
-            if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and status == "vendor":
+            self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340", "fglrx"] and status == "vendor" else "mesa")
+            if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"] and status == "vendor":
                 open(nvidia_blacklist_file, "w").write("blacklist nouveau\n")
-            elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and os.path.isfile(nvidia_blacklist_file):
+            elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"] and os.path.isfile(nvidia_blacklist_file):
                 os.remove(nvidia_blacklist_file)

         return status
@@ -224,7 +230,7 @@
         if self.driver_name is None:
             self.__get_primary_driver()

-        if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
+        if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"]:
             return ["vendor", "os", "generic"]
         elif "Not defined" == self.driver_name:
             return ["os", "generic"]

repo_name: ayhanyalcinsoy/main


code:
--- panda.py~	2013-06-26 23:14:48.709209877 +0200
+++ panda.py	2013-06-26 23:15:23.467208607 +0200
@@ -269,10 +269,10 @@

         with open(grub_default_file) as grub_default:
             for line in grub_default:
-                if "GRUB_CMDLINE_LINUX=" in line:
+                if "GRUB_CMDLINE_LINUX_DEFAULT=" in line:
                     params = {} if line.startswith("#") else dict((k, v.split(','))
                                                                   for k,v in (item.split('=') if "=" in item else (item, '')
-                                                                              for item in line.replace('"', '').split("LINUX=")[1].split()))
+                                                                              for item in line.replace('"', '').replace("'", "").split("DEFAULT=")[1].split()))
                     old_line = " ".join(["%s%s%s" % (k, "=" if l[0] else "", ",".join([v for v in l])) for k, l in sorted(params.items())])
                     if arg == "os":
                         try :
@@ -285,10 +285,6 @@
                             if not params["xorg"] or not params["xorg"][0]: del params["xorg"]
                         except KeyError:
                             pass
-                        try :
-                            del params["vga"]
-                        except KeyError:
-                            pass
                         status = "os"

                     elif arg == "vendor":
@@ -302,7 +298,6 @@
                             if not params["xorg"] or not params["xorg"][0]: del params["xorg"]
                         except KeyError:
                             pass
-                        if self.driver_name in ["nvidia-current"]: params["vga"] = ["794"]
                         status = "vendor"

                     elif arg == "generic":
@@ -430,4 +425,3 @@
 #    print p.update_grub_entries("vendor")
     print p.update_system_files("vendor")
     print p.get_needed_driver_packages(installable=False)
-
--- panda.py~	2013-07-12 12:33:05.029649344 +0200
+++ panda.py	2013-07-12 12:33:09.728649172 +0200
@@ -309,7 +309,7 @@

                     new_line = " ".join(["%s%s" % ("%s=" % k if l[0] else k, ",".join([v for v in l])) for k, l in sorted(params.items())])
                     configured = old_line != new_line
-                    new_line = 'GRUB_CMDLINE_LINUX="%s"\n' % new_line
+                    new_line = 'GRUB_CMDLINE_LINUX_DEFAULT="%s"\n' % new_line
                     grub_tmp.write(new_line)
                 else:
                     grub_tmp.write(line)


code:
--- panda.py~	2014-04-12 20:47:04.213380223 +0200
+++ panda.py	2014-04-12 20:51:07.980049491 +0200
@@ -30,7 +30,6 @@
         self.os_driver = None
         self.driver_packages = {"fglrx": ["module-fglrx",
                                      "module-pae-fglrx",
-                                     "module-fglrx-userspace",
                                      "xorg-video-fglrx"],
                            "nvidia-current": ["module-nvidia-current",
                                               "module-pae-nvidia-current",
@@ -179,7 +178,6 @@
                 open(nvidia_blacklist_file, "w").write("blacklist nouveau\n")
             elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and os.path.isfile(nvidia_blacklist_file):
                 os.remove(nvidia_blacklist_file)
-

         return status


code:
--- panda.py~	2014-03-10 21:18:48.173319857 +0100
+++ panda.py	2014-03-10 21:19:43.726653009 +0100
@@ -34,24 +34,20 @@
                                      "xorg-video-fglrx"],
                            "nvidia-current": ["module-nvidia-current",
                                               "module-pae-nvidia-current",
-                                              "module-nvidia-current-userspace",
                                               "xorg-video-nvidia-current",
                                               "nvidia-xconfig",
                                               "nvidia-settings"],
                            "nvidia96": ["module-nvidia96",
                                         "module-pae-nvidia96",
-                                        "module-nvidia96-userspace",
                                         "xorg-video-nvidia96",
                                         "nvidia-xconfig",
                                         "nvidia-settings"],
                            "nvidia173": ["module-nvidia173",
                                          "module-pae-nvidia173",
-                                         "module-nvidia173-userspace",
                                          "xorg-video-nvidia173",
                                          "nvidia-xconfig",
                                          "nvidia-settings"],
                            "nvidia304": ["module-nvidia304",
-                                         "module-nvidia304-userspace",
                                          "xorg-video-nvidia304",
                                          "nvidia-xconfig",
                                          "nvidia-settings"]}


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>panda</Name>
        <Homepage>http://www.pisilinux.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>app:console</IsA>
        <Summary>PisiLinux Alternative Driver Administration</Summary>
        <Description>PANDA is an alternative driver administration for PisiLinux.</Description>
        <Archive sha1sum="7a7ca0036c04b4a4204725268add191ded5a564a" type="targz">https://github.com/forYali/panda/archive/0.2.tar.gz</Archive>
        <Patches>
            <!--Patch>fix_editing_grub_default.patch</Patch>
            <Patch>add_nvidia340.patch</Patch>
            <Patch>add_nvidia304.patch</Patch-->
            <Patch>add-32bit_packages.diff</Patch>
            <Patch>remove_module-nvidia-userspace.patch</Patch>
            <Patch>remove_module-fglrx-userspace.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>panda</Name>
        <Files>
            <Path fileType="executable">/usr/libexec</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <History>
        <Update release="1">
            <Date>2017-03-05</Date>
            <Version>0.2</Version>
            <Comment>First release</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>panda</Name>
        <Summary xml:lang="tr">PisiLinux Alternatif Sürücü Yönetimi</Summary>
        <Description xml:lang="tr">Panda, PisiLinux için alternatif sürücü yönetim modülüdür.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/copyleft/gpl.txt.

from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import qt5

def setup():
    #qt5.configure("pgmodeler.pro")
    shelltools.system("qmake-qt5 -r pgmodeler.pro PREFIX+=/usr BINDIR+=/usr/bin LIBDIR+=/usr/lib RESDIR+=/usr/share")

def build():
    qt5.make()

def install():
    qt5.install()

    pisitools.domove("/usr/lib/pgmodeler/lib*", "/usr/lib")

    pisitools.insinto("usr/share/icons/hicolor/64x64/apps", "conf/pgmodeler_logo.png")
    pisitools.dosym("/usr/share/pgmodeler/schemas", "/etc/pgmodeler/schemas")

    pisitools.dodir("/usr/lib/pgmodeler/plugins")

    pisitools.dodoc("LICENSE", "CHANGELOG.md", "README*")


code:
[Desktop Entry]
Name=pgmodeler
GenericName=PostgreSQL ER Database Modeler
Comment=Program with nice Qt interface for visual modeling PostgreSQL database in terms on entity relationship model
Exec=pgmodeler
Icon=pgmodeler_logo.png
Terminal=false
Type=Application
Categories=KDE;Qt;Database;Development;


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pardus.org.tr/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>pgModeler</Name>
        <Homepage>http://www.pgmodeler.com.br/</Homepage>
        <Packager>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.comAR</Email>
        </Packager>
        <License>GPLv3</License>
        <IsA>app:gui</IsA>
        <Summary>PostgreSQL Database Modeler</Summary>
        <Description>PostgreSQL Database Modeler: an open source CASE tool for modeling PostgreSQL databases</Description>
        <Archive sha1sum="e4f2bd2ec4a4457997a7f752dd81279eedd89ce6" type="targz">https://github.com/pgmodeler/pgmodeler/archive/v0.9.0.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>libxml2-devel</Dependency>
            <Dependency>mesa-devel</Dependency>
            <Dependency>shared-mime-info</Dependency>
            <Dependency>doxygen</Dependency>
            <Dependency>mesa-devel</Dependency>
            <Dependency>qt5-base-devel</Dependency>
            <Dependency>qt5-svg-devel</Dependency>
            <Dependency>qt5-sql-postgresql</Dependency>
            <Dependency>postgresql-server</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>pgModeler</Name>
        <RuntimeDependencies>
            <Dependency>libgcc</Dependency>
            <Dependency>libxml2</Dependency>
            <Dependency>qt5-svg</Dependency>
            <Dependency>qt5-base</Dependency>
            <Dependency>postgresql-lib</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc/pgmodeler</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="data">/usr/share</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/applications/pgModeler.desktop">pgModeler.desktop</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <History>
        <Update release="2">
            <Date>2017-11-26</Date>
            <Version>0.9.0</Version>
            <Comment>Version bump.</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
        <Update release="1">
            <Date>2015-10-13</Date>
            <Version>0.8.2_p1</Version>
            <Comment>First release</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.

from pisi.actionsapi import autotools
from pisi.actionsapi import shelltools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    shelltools.system("sed -i -e 's/wx-config/wx-config-2.8/' configure")
    shelltools.system("sed -i 's/wxrc/wxrc-2.8/g' stringextract pgadmin/ui/embed-xrc")

    shelltools.export("WX_CONFIG", "/usr/bin/wx-config-2.8 ")
    shelltools.export("WXDIR", "/usr ")

    autotools.configure("--disable-static \
                         --disable-debug \
                         --with-wx=/usr \
                         --disable-dependency-tracking \
                         --with-wx-config=/usr/bin/wx-config-2.8 \
                         --with-wx-version=2.8")

def build():
    autotools.make()

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

    pisitools.insinto("/usr/share/pixmaps", "pkg/debian/pgadmin3.xpm")


code:
From d17a268572648b8e45ba6dc5854549a1dbf81c0a Mon Sep 17 00:00:00 2001
From: Wander Nauta <info@wandernauta.nl>
Date: Sun, 19 Apr 2015 16:37:41 +0200
Subject: [PATCH] Move misplaced unlock of s_currentObjectMutex

The current implementation would unlock the mutex, even if it didn't own
it.
---
 pgadmin/frm/events.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pgadmin/frm/events.cpp b/pgadmin/frm/events.cpp
index 4baaf42..f2ad570 100644
--- a/pgadmin/frm/events.cpp
+++ b/pgadmin/frm/events.cpp
@@ -750,11 +750,11 @@ void frmMain::OnSelRightClick(wxTreeEvent &event)
 		//
 		s_currentObjectMutex.Lock();
 		currentObject = browser->GetObject(item);
+		s_currentObjectMutex.Unlock();
 	}

 	if (currentObject)
 		doPopup(browser, event.GetPoint(), currentObject);
-	s_currentObjectMutex.Unlock();
 }

--
2.3.5


code:
[Desktop Entry]
Encoding=UTF-8
Name=pgadmin3
Comment=Graphical client for PostgreSQL
Comment[tr]=PostgreSQL için grafiksel istemci
GenericName=PostgreSQL Tools
GenericName[tr]=PostgreSQL Yönetim Aracı
Exec=pgadmin3
Icon=pgadmin3
Type=Application
Categories=Application;Development;


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>pgadmin3</Name>
        <Homepage>http://www.pgadmin.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>BSD</License>
        <IsA>app:gui</IsA>
        <Summary>Graphical client for PostgreSQL</Summary>
        <Description>pgadmin3 is a powerful administration and development platform for the PostgreSQL database, free for any use.</Description>
        <Archive sha1sum="2b62630d3ee90b44c440d673ca8bb3dcfe010e18" type="targz">https://ftp.postgresql.org/pub/pgadmin3/release/v1.22.2/src/pgadmin3-1.22.2.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>postgresql-lib</Dependency>
            <Dependency>libxslt-devel</Dependency>
            <Dependency>openssl-devel</Dependency>
            <Dependency>wxGTK2.8-devel</Dependency>
	    <!--Dependency>wxMaxima</Dependency-->
        </BuildDependencies>
        <!--Patches>
            <Patch level="2">0001-Move-misplaced-unlock-of-s_currentObjectMutex.patch</Patch>
        </Patches-->
    </Source>

    <Package>
        <Name>pgadmin3</Name>
        <RuntimeDependencies>
            <Dependency>postgresql-lib</Dependency>
            <Dependency>libxslt</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>zlib</Dependency>
            <Dependency>libxml2</Dependency>
            <Dependency>openssl</Dependency>
            <Dependency>wxGTK2.8</Dependency>
            <Dependency>wxBase</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="data">/usr/share/pgadmin3</Path>
            <Path fileType="data">/usr/share/applications</Path>
            <Path fileType="data">/usr/share/pixmaps</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/applications/pgadmin3.desktop">pgadmin3.desktop</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-01-25</Date>
            <Version>1.22.2</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>1.22</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-02-26</Date>
            <Version>1.22</Version>
            <Comment>First release</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>pgadmin3</Name>
        <Summary xml:lang="tr">PostgreSQL grafik arabirimi</Summary>
        <Description xml:lang="tr">wxGTK temelli PostgreSQL grafik arabirimi</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import get
from pisi.actionsapi import pisitools

def install():
    pisitools.insinto("/usr/share/phpldapadmin","*")

    pisitools.dohtml("*")
    pisitools.dodoc("INSTALL","VERSION","LICENSE")


code:
<?php
/** NOTE **
 ** Make sure that <?php is the FIRST line of this file!
 ** IE: There should NOT be any blank lines or spaces BEFORE <?php
 **/

/**
 * The phpLDAPadmin config file
 * See: http://phpldapadmin.sourceforge.net/wiki/index.php/Config.php
 *
 * This is where you can customise some of the phpLDAPadmin defaults
 * that are defined in config_default.php.
 *
 * To override a default, use the $config->custom variable to do so.
 * For example, the default for defining the language in config_default.php
 *
 * $this->default->appearance['language'] = array(
 *  'desc'=>'Language',
 *  'default'=>'auto');
 *
 * to override this, use $config->custom->appearance['language'] = 'en_EN';
 *
 * This file is also used to configure your LDAP server connections.
 *
 * You must specify at least one LDAP server there. You may add
 * as many as you like. You can also specify your language, and
 * many other options.
 *
 * NOTE: Commented out values in this file prefixed by //, represent the
 * defaults that have been defined in config_default.php.
 * Commented out values prefixed by #, dont reflect their default value, you can
 * check config_default.php if you want to see what the default is.
 *
 * DONT change config_default.php, you changes will be lost by the next release
 * of PLA. Instead change this file - as it will NOT be replaced by a new
 * version of phpLDAPadmin.
 */

/*********************************************
 * Useful important configuration overrides  *
 *********************************************/

/* If you are asked to put PLA in debug mode, this is how you do it: */
#  $config->custom->debug['level'] = 255;
#  $config->custom->debug['syslog'] = true;
#  $config->custom->debug['file'] = '/tmp/pla_debug.log';

/* phpLDAPadmin can encrypt the content of sensitive cookies if you set this
   to a big random string. */
// $config->custom->session['blowfish'] = null;

/* If your auth_type is http, you can override your HTTP Authentication Realm. */
// $config->custom->session['http_realm'] = sprintf('%s %s',app_name(),'login');

/* The language setting. If you set this to 'auto', phpLDAPadmin will attempt
   to determine your language automatically.
   If PLA doesnt show (all) strings in your language, then you can do some
   translation at http://translations.launchpad.net/phpldapadmin and download
   the translation files, replacing those provided with PLA.
   (We'll pick up the translations before making the next release too!) */
// $config->custom->appearance['language'] = 'auto';

/* The temporary storage directory where we will put jpegPhoto data
   This directory must be readable and writable by your web server. */
// $config->custom->jpeg['tmpdir'] = '/tmp';     // Example for Unix systems
#  $config->custom->jpeg['tmpdir'] = 'c:\\temp'; // Example for Windows systems

/* Set this to (bool)true if you do NOT want a random salt used when
   calling crypt().  Instead, use the first two letters of the user's
   password.  This is insecure but unfortunately needed for some older
   environments. */
#  $config->custom->password['no_random_crypt_salt'] = true;

/* PHP script timeout control. If php runs longer than this many seconds then
   PHP will stop with an Maximum Execution time error. Increase this value from
   the default if queries to your LDAP server are slow. The default is either
   30 seconds or the setting of max_exection_time if this is null. */
// $config->custom->session['timelimit'] = 30;

/* Our local timezone
   This is to make sure that when we ask the system for the current time, we
   get the right local time. If this is not set, all time() calculations will
   assume UTC if you have not set PHP date.timezone. */
// $config->custom->appearance['timezone'] = null;
#  $config->custom->appearance['timezone'] = 'Europe/Istanbul';

/*********************************************
 * Commands                                  *
 *********************************************/

/* Command availability ; if you don't authorize a command the command
   links will not be shown and the command action will not be permitted.
   For better security, set also ACL in your ldap directory. */
/*
$config->custom->commands['cmd'] = array(
	'entry_internal_attributes_show' => true,
	'entry_refresh' => true,
	'oslinks' => true,
	'switch_template' => true
);

$config->custom->commands['script'] = array(
	'add_attr_form' => true,
	'add_oclass_form' => true,
	'add_value_form' => true,
	'collapse' => true,
	'compare' => true,
	'compare_form' => true,
	'copy' => true,
	'copy_form' => true,
	'create' => true,
	'create_confirm' => true,
	'delete' => true,
	'delete_attr' => true,
	'delete_form' => true,
	'draw_tree_node' => true,
	'expand' => true,
	'export' => true,
	'export_form' => true,
	'import' => true,
	'import_form' => true,
	'login' => true,
	'logout' => true,
	'login_form' => true,
	'mass_delete' => true,
	'mass_edit' => true,
	'mass_update' => true,
	'modify_member_form' => true,
	'monitor' => true,
	'purge_cache' => true,
	'query_engine' => true,
	'rename' => true,
	'rename_form' => true,
	'rdelete' => true,
	'refresh' => true,
	'schema' => true,
	'server_info' => true,
	'show_cache' => true,
	'template_engine' => true,
	'update_confirm' => true,
	'update' => true
);
*/

/*********************************************
 * Appearance                                *
 *********************************************/

/* If you want to choose the appearance of the tree, specify a class name which
   inherits from the Tree class. */
// $config->custom->appearance['tree'] = 'AJAXTree';
#  $config->custom->appearance['tree'] = 'HTMLTree';

/* Just show your custom templates. */
// $config->custom->appearance['custom_templates_only'] = false;

/* Disable the default template. */
// $config->custom->appearance['disable_default_template'] = false;

/* Hide the warnings for invalid objectClasses/attributes in templates. */
// $config->custom->appearance['hide_template_warning'] = false;

/* Set to true if you would like to hide header and footer parts. */
// $config->custom->appearance['minimalMode'] = false;

/* Configure what objects are shown in left hand tree */
// $config->custom->appearance['tree_filter'] = '(objectclass=*)';

/* The height and width of the tree. If these values are not set, then
   no tree scroll bars are provided. */
// $config->custom->appearance['tree_height'] = null;
#  $config->custom->appearance['tree_height'] = 600;
// $config->custom->appearance['tree_width'] = null;
#  $config->custom->appearance['tree_width'] = 250;

/* Confirm create and update operations, allowing you to review the changes
   and optionally skip attributes during the create/update operation. */
// $config->custom->confirm['create'] = true;
// $config->custom->confirm['update'] = true;

/* Confirm copy operations, and treat them like create operations. This allows
   you to edit the attributes (thus changing any that might conflict with
   uniqueness) before creating the new entry. */
// $config->custom->confirm['copy'] = true;

/*********************************************
 * User-friendly attribute translation       *
 *********************************************/

/* Use this array to map attribute names to user friendly names. For example, if
   you don't want to see "facsimileTelephoneNumber" but rather "Fax". */
// $config->custom->appearance['friendly_attrs'] = array();
$config->custom->appearance['friendly_attrs'] = array(
	'facsimileTelephoneNumber' => 'Fax',
	'gid'                      => 'Group',
	'mail'                     => 'Email',
	'telephoneNumber'          => 'Telephone',
	'uid'                      => 'User Name',
	'userPassword'             => 'Password'
);

/*********************************************
 * Hidden attributes                         *
 *********************************************/

/* You may want to hide certain attributes from being edited. If you want to
   hide attributes from the user, you should use your LDAP servers ACLs.
   NOTE: The user must be able to read the hide_attrs_exempt entry to be
   excluded. */
// $config->custom->appearance['hide_attrs'] = array();
#  $config->custom->appearance['hide_attrs'] = array('objectClass');

/* Members of this list will be exempt from the hidden attributes. */
// $config->custom->appearance['hide_attrs_exempt'] = null;
#  $config->custom->appearance['hide_attrs_exempt'] = 'cn=PLA UnHide,ou=Groups,c=AU';

/*********************************************
 * Read-only attributes                      *
 *********************************************/

/* You may want to phpLDAPadmin to display certain attributes as read only,
   meaning that users will not be presented a form for modifying those
   attributes, and they will not be allowed to be modified on the "back-end"
   either. You may configure this list here:
   NOTE: The user must be able to read the readonly_attrs_exempt entry to be
   excluded. */
// $config->custom->appearance['readonly_attrs'] = array();

/* Members of this list will be exempt from the readonly attributes. */
// $config->custom->appearance['readonly_attrs_exempt'] = null;
#  $config->custom->appearance['readonly_attrs_exempt'] = 'cn=PLA ReadWrite,ou=Groups,c=AU';

/*********************************************
 * Group attributes                          *
 *********************************************/

/* Add "modify group members" link to the attribute. */
// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid');

/* Configure filter for member search. This only applies to "modify group members" feature */
// $config->custom->modify_member['filter'] = '(objectclass=Person)';

/* Attribute that is added to the group member attribute. */
// $config->custom->modify_member['attr'] = 'dn';

/* For Posix attributes */
// $config->custom->modify_member['posixattr'] = 'uid';
// $config->custom->modify_member['posixfilter'] = '(uid=*)';
// $config->custom->modify_member['posixgroupattr'] = 'memberUid';

/*********************************************
 * Support for attrs display order           *
 *********************************************/

/* Use this array if you want to have your attributes displayed in a specific
   order. You can use default attribute names or their fridenly names.
   For example, "sn" will be displayed right after "givenName". All the other
   attributes that are not specified in this array will be displayed after in
   alphabetical order. */
// $config->custom->appearance['attr_display_order'] = array();
#  $config->custom->appearance['attr_display_order'] = array(
#   'givenName',
#   'sn',
#   'cn',
#   'displayName',
#   'uid',
#   'uidNumber',
#   'gidNumber',
#   'homeDirectory',
#   'mail',
#   'userPassword'
#  );

/*********************************************
 * Define your LDAP servers in this section  *
 *********************************************/

$servers = new Datastore();

/* $servers->NewServer('ldap_pla') must be called before each new LDAP server
   declaration. */
$servers->newServer('ldap_pla');

/* A convenient name that will appear in the tree viewer and throughout
   phpLDAPadmin to identify this LDAP server to users. */
$servers->setValue('server','name','My LDAP Server');

/* Examples:
   'ldap.example.com',
   'ldaps://ldap.example.com/',
   'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
           (Unix socket at /usr/local/var/run/ldap) */
// $servers->setValue('server','host','127.0.0.1');

/* The port your LDAP server listens on (no quotes). 389 is standard. */
// $servers->setValue('server','port',389);

/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
   auto-detect it for you. */
// $servers->setValue('server','base',array(''));

/* Five options for auth_type:
   1. 'cookie': you will login via a web form, and a client-side cookie will
      store your login dn and password.
   2. 'session': same as cookie but your login dn and password are stored on the
      web server in a persistent session variable.
   3. 'http': same as session but your login dn and password are retrieved via
      HTTP authentication.
   4. 'config': specify your login dn and password here in this config file. No
      login will be required to use phpLDAPadmin for this server.
   5. 'sasl': login will be taken from the webserver's kerberos authentication.
      Currently only GSSAPI has been tested (using mod_auth_kerb).

   Choose wisely to protect your authentication information appropriately for
   your situation. If you choose 'cookie', your cookie contents will be
   encrypted using blowfish and the secret your specify above as
   session['blowfish']. */
// $servers->setValue('login','auth_type','session');

/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
   'cookie','session' or 'sasl' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS
   BLANK. If you specify a login_attr in conjunction with a cookie or session
   auth_type, then you can also specify the bind_id/bind_pass here for searching
   the directory for users (ie, if your LDAP server does not allow anonymous
   binds. */
// $servers->setValue('login','bind_id','');
#  $servers->setValue('login','bind_id','cn=Manager,dc=example,dc=com');

/* Your LDAP password. If you specified an empty bind_id above, this MUST also
   be blank. */
// $servers->setValue('login','bind_pass','');
#  $servers->setValue('login','bind_pass','secret');

/* Use TLS (Transport Layer Security) to connect to the LDAP server. */
// $servers->setValue('server','tls',false);

/************************************
 *      SASL Authentication         *
 ************************************/

/* Enable SASL authentication LDAP SASL authentication requires PHP 5.x
   configured with --with-ldap-sasl=DIR. If this option is disabled (ie, set to
   false), then all other sasl options are ignored. */
// $servers->setValue('login','auth_type','sasl');

/* SASL auth mechanism */
// $servers->setValue('sasl','mech','GSSAPI');

/* SASL authentication realm name */
// $servers->setValue('sasl','realm','');
#  $servers->setValue('sasl','realm','EXAMPLE.COM');

/* SASL authorization ID name
   If this option is undefined, authorization id will be computed from bind DN,
   using authz_id_regex and authz_id_replacement. */
// $servers->setValue('sasl','authz_id', null);

/* SASL authorization id regex and replacement
   When authz_id property is not set (default), phpLDAPAdmin will try to
   figure out authorization id by itself from bind distinguished name (DN).

   This procedure is done by calling preg_replace() php function in the
   following way:

   $authz_id = preg_replace($sasl_authz_id_regex,$sasl_authz_id_replacement,
    $bind_dn);

   For info about pcre regexes, see:
   - pcre(3), perlre(3)
   - http://www.php.net/preg_replace */
// $servers->setValue('sasl','authz_id_regex',null);
// $servers->setValue('sasl','authz_id_replacement',null);
#  $servers->setValue('sasl','authz_id_regex','/^uid=([^,]+)(.+)/i');
#  $servers->setValue('sasl','authz_id_replacement','$1');

/* SASL auth security props.
   See http://beepcore-tcl.sourceforge.net/tclsasl.html#anchor5 for explanation. */
// $servers->setValue('sasl','props',null);

/* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5,
   blowfish, crypt or leave blank for now default algorithm. */
// $servers->setValue('appearance','password_hash','md5');

/* If you specified 'cookie' or 'session' as the auth_type above, you can
   optionally specify here an attribute to use when logging in. If you enter
   'uid' and login as 'dsmith', phpLDAPadmin will search for (uid=dsmith)
   and log in as that user.
   Leave blank or specify 'dn' to use full DN for logging in. Note also that if
   your LDAP server requires you to login to perform searches, you can enter the
   DN to use when searching in 'bind_id' and 'bind_pass' above. */
// $servers->setValue('login','attr','dn');

/* Base DNs to used for logins. If this value is not set, then the LDAP server
   Base DNs are used. */
// $servers->setValue('login','base',array());

/* If 'login,attr' is used above such that phpLDAPadmin will search for your DN
   at login, you may restrict the search to a specific objectClasses. EG, set this
   to array('posixAccount') or array('inetOrgPerson',..), depending upon your
   setup. */
// $servers->setValue('login','class',array());

/* If you specified something different from 'dn', for example 'uid', as the
   login_attr above, you can optionally specify here to fall back to
   authentication with dn.
   This is useful, when users should be able to log in with their uid, but
   the ldap administrator wants to log in with his root-dn, that does not
   necessarily have the uid attribute.
   When using this feature, login_class is ignored. */
// $servers->setValue('login','fallback_dn',false);

/* Specify true If you want phpLDAPadmin to not display or permit any
   modification to the LDAP server. */
// $servers->setValue('server','read_only',false);

/* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links
   in the tree viewer. */
// $servers->setValue('appearance','show_create',true);

/* Set to true if you would like to initially open the first level of each tree. */
// $servers->setValue('appearance','open_tree',false);

/* This feature allows phpLDAPadmin to automatically determine the next
   available uidNumber for a new entry. */
// $servers->setValue('auto_number','enable',true);

/* The mechanism to use when finding the next available uidNumber. Two possible
   values: 'uidpool' or 'search'.
   The 'uidpool' mechanism uses an existing uidPool entry in your LDAP server to
   blindly lookup the next available uidNumber. The 'search' mechanism searches
   for entries with a uidNumber value and finds the first available uidNumber
   (slower). */
// $servers->setValue('auto_number','mechanism','search');

/* The DN of the search base when the 'search' mechanism is used above. */
#  $servers->setValue('auto_number','search_base','ou=People,dc=example,dc=com');

/* The minimum number to use when searching for the next available number
   (only when 'search' is used for auto_number. */
// $servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500));

/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
   searching for the uidnumber. The idea is, this user id would have full
   (readonly) access to uidnumber in your ldap directory (the logged in user
   may not), so that you can be guaranteed to get a unique uidnumber for your
   directory. */
// $servers->setValue('auto_number','dn',null);

/* The password for the dn above. */
// $servers->setValue('auto_number','pass',null);

/* Enable anonymous bind login. */
// $servers->setValue('login','anon_bind',true);

/* Use customized page with prefix when available. */
#  $servers->setValue('custom','pages_prefix','custom_');

/* If you set this, then only these DNs are allowed to log in. This array can
   contain individual users, groups or ldap search filter(s). Keep in mind that
   the user has not authenticated yet, so this will be an anonymous search to
   the LDAP server, so make your ACLs allow these searches to return results! */
#  $servers->setValue('login','allowed_dns',array(
#   'uid=stran,ou=People,dc=example,dc=com',
#   '(&(gidNumber=811)(objectClass=groupOfNames))',
#   '(|(uidNumber=200)(uidNumber=201))',
#   'cn=callcenter,ou=Group,dc=example,dc=com'));

/* Set this if you dont want this LDAP server to show in the tree */
// $servers->setValue('server','visible',true);

/* Set this if you want to hide the base DNs that dont exist instead of
   displaying the message "The base entry doesnt exist, create it?"
// $servers->setValue('server','hide_noaccess_base',false);
#  $servers->setValue('server','hide_noaccess_base',true);

/* This is the time out value in minutes for the server. After as many minutes
   of inactivity you will be automatically logged out. If not set, the default
   value will be ( session_cache_expire()-1 ) */
#  $servers->setValue('login','timeout',30);

/* Set this if you want phpldapadmin to perform rename operation on entry which
   has children. Certain servers are known to allow it, certain are not. */
// $servers->setValue('server','branch_rename',false);

/* If you set this, then phpldapadmin will show these attributes as
   internal attributes, even if they are not defined in your schema. */
// $servers->setValue('server','custom_sys_attrs',array(''));
#  $servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));

/* If you set this, then phpldapadmin will show these attributes on
   objects, even if they are not defined in your schema. */
// $servers->setValue('server','custom_attrs',array(''));
#  $servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));

/* These attributes will be forced to MAY attributes and become option in the
   templates. If they are not defined in the templates, then they wont appear
   as per normal template processing. You may want to do this because your LDAP
   server may automatically calculate a default value.
   In Fedora Directory Server using the DNA Plugin one could ignore uidNumber,
   gidNumber and sambaSID. */
// $servers->setValue('server','force_may',array(''));
#  $servers->setValue('server','force_may',array('uidNumber','gidNumber','sambaSID'));

/*********************************************
 * Unique attributes                         *
 *********************************************/

/* You may want phpLDAPadmin to enforce some attributes to have unique values
   (ie: not belong to other entries in your tree. This (together with
   'unique','dn' and 'unique','pass' option will not let updates to
   occur with other attributes have the same value. */
#  $servers->setValue('unique','attrs',array('mail','uid','uidNumber'));

/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
   searching for attribute uniqueness. The idea is, this user id would have full
   (readonly) access to your ldap directory (the logged in user may not), so
   that you can be guaranteed to get a unique uidnumber for your directory. */
// $servers->setValue('unique','dn',null);

/* The password for the dn above. */
// $servers->setValue('unique','pass',null);

/**************************************************************************
 * If you want to configure additional LDAP servers, do so below.         *
 * Remove the commented lines and use this section as a template for all  *
 * your other LDAP servers.                                               *
 **************************************************************************/

/*
$servers->newServer('ldap_pla');
$servers->setValue('server','name','LDAP Server');
$servers->setValue('server','host','127.0.0.1');
$servers->setValue('server','port',389);
$servers->setValue('server','base',array(''));
$servers->setValue('login','auth_type','cookie');
$servers->setValue('login','bind_id','');
$servers->setValue('login','bind_pass','');
$servers->setValue('server','tls',false);

# SASL auth
$servers->setValue('login','auth_type','sasl');
$servers->setValue('sasl','mech','GSSAPI');
$servers->setValue('sasl','realm','EXAMPLE.COM');
$servers->setValue('sasl','authz_id',null);
$servers->setValue('sasl','authz_id_regex','/^uid=([^,]+)(.+)/i');
$servers->setValue('sasl','authz_id_replacement','$1');
$servers->setValue('sasl','props',null);

$servers->setValue('appearance','password_hash','md5');
$servers->setValue('login','attr','dn');
$servers->setValue('login','fallback_dn',false);
$servers->setValue('login','class',null);
$servers->setValue('server','read_only',false);
$servers->setValue('appearance','show_create',true);

$servers->setValue('auto_number','enable',true);
$servers->setValue('auto_number','mechanism','search');
$servers->setValue('auto_number','search_base',null);
$servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500));
$servers->setValue('auto_number','dn',null);
$servers->setValue('auto_number','pass',null);

$servers->setValue('login','anon_bind',true);
$servers->setValue('custom','pages_prefix','custom_');
$servers->setValue('unique','attrs',array('mail','uid','uidNumber'));
$servers->setValue('unique','dn',null);
$servers->setValue('unique','pass',null);

$servers->setValue('server','visible',true);
$servers->setValue('login','timeout',30);
$servers->setValue('server','branch_rename',false);
$servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));
$servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));
$servers->setValue('server','force_may',array('uidNumber','gidNumber','sambaSID'));
*/
?>


code:
# phpldapadmin - Web based OpenLDAP browser written in php
#
# Allows only localhost by default
#
# But allowing phpmyadmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpldapadmin /usr/share/phpldapadmin

<Directory /usr/share/phpldapadmin/>
   Order Deny,Allow
   Deny from All
   Allow from 127.0.0.1
   Allow from ::1
</Directory>

# These directories do not require access over HTTP - taken from the original
# phpmyadmin upstream tarball
#
<Directory /usr/share/phpldapadmin/lib/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>phpldapadmin</Name>
        <Homepage>http://phpldapadmin.sourceforge.net</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>app:gui</IsA>
        <Summary>phpLDAPadmin (also known as PLA) is a web-based LDAP client</Summary>
        <Description>phpLDAPadmin (also known as PLA) is a web-based LDAP client. It provides easy, anywhere-accessible, multi-language administration for your LDAP server. </Description>
        <Archive sha1sum="669fca66c75e24137e106fdd02e3832f81146e23" type="targz">mirrors://sourceforge/phpldapadmin/phpldapadmin-php5/1.2.3/phpldapadmin-1.2.3.tgz</Archive>
    </Source>

    <Package>
        <Name>phpldapadmin</Name>
        <RuntimeDependencies>
            <Dependency>mod_php</Dependency>
            <Dependency>openldap-server</Dependency>
            <Dependency>openldap-client</Dependency>
            <Dependency>apache</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="data">/usr/share/phpldapadmin</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="config">/usr/share/phpldapadmin/config/config.php</Path>
            <Path fileType="config">/etc/apache2/conf.d/phpldapadmin.conf</Path>
        </Files>
    </Package>

    <History>
        <Update release="2">
            <Date>2017-01-30</Date>
            <Version>1.2.3</Version>
            <Comment>Rebuild</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-06-10</Date>
            <Version>1.2.3</Version>
            <Comment>First release</Comment>
            <Name>Aydın Demirel</Name>
            <Email>aydin@demirel.web.tr</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>phpldapadmin</Name>
        <Summary xml:lang="tr">Phpldapadmin aynı zamanda PLA olarak bilinen web tabanlı bir LDAP istemcisidir.</Summary>
        <Description xml:lang="tr">Phpldapadmin aynı zamanda PLA olarak bilinen web tabanlı bir LDAP istemcisidir. LDAP sunucunuz için çoklu dil desteği yönetimi, herhangi bir yerden erişilebilirlik ve kolaylık sağlar.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import get
from pisi.actionsapi import pisitools

WorkDir="phpMyAdmin-%s-all-languages" % get.srcVERSION()

def install():
    pisitools.insinto("/usr/share/phpmyadmin", "*")

    pisitools.dohtml("*")
    pisitools.dodoc("ChangeLog","LICENSE","README")

    #for phpmyadmin import sql max size
    pisitools.dodir("/usr/share/phpmyadmin/upload")


code:
#!/usr/bin/python
import random
import string

def postInstall(fromVersion, fromRelease, toVersion, toRelease):

    # Provide different blowfish cookie key for each computer
    generated_key = ''.join(random.sample(string.letters + string.digits, 32))
    config_path   = '/usr/share/phpmyadmin/config.inc.php'
    new_config    = open(config_path).read().replace('BLOWFISHSECRET', generated_key)
    open(config_path, 'w').write(new_config)

def preRemove():
    pass


code:
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * phpMyAdmin sample configuration, you can use it as base for
 * manual configuration. For easier setup you can use setup/
 *
 * All directives are explained in Documentation.html and on phpMyAdmin
 * wiki <http://wiki.phpmyadmin.net>.
 *
 * @version $Id$
 * @package phpMyAdmin
 */

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'BLOWFISHSECRET'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';

/* User for advanced features */
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';

/* Advanced phpMyAdmin features */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma_relation';
// $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
// $cfg['Servers'][$i]['history'] = 'pma_history';
// $cfg['Servers'][$i]['tracking'] = 'pma_tracking';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */

/*
 *for phpmyadmin import sql max size
 */
$cfg['UploadDir'] = 'upload';
$cfg['SaveDir'] = '';

?>


code:
# phpmyadmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpmyadmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin/>
   Order Deny,Allow
   Deny from All
   Allow from 127.0.0.1
   Allow from ::1
</Directory>

<Directory /usr/share/phpmyadmin/setup/>
   Order Deny,Allow
   Deny from All
   Allow from 127.0.0.1
   Allow from ::1
</Directory>

# These directories do not require access over HTTP - taken from the original
# phpmyadmin upstream tarball
#
<Directory /usr/share/phpmyadmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpmyadmin/setup/lib/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

# This configuration prevents mod_security at phpmyadmin directories from
# filtering SQL etc.  This may break your mod_security implementation.
#
#<IfModule mod_security.c>
#    <Directory /usr/share/phpmyadmin/>
#        SecRuleInheritance Off
#    </Directory>
#</IfModule>


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>phpmyadmin</Name>
        <Homepage>http://www.phpmyadmin.net/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>app:gui</IsA>
        <Summary>Browser based MySQL Admin Tool</Summary>
        <Description>A populer application for managing MySQL Server; add/update data etc. with PHP5 support.</Description>
        <Archive sha1sum="5314655baf12ad47bdc42a2ebcfc2b10995ce7a5" type="tarxz">https://files.phpmyadmin.net/phpMyAdmin/4.6.6/phpMyAdmin-4.6.6-all-languages.tar.xz</Archive>
    </Source>

    <Package>
        <Name>phpmyadmin</Name>
        <RuntimeDependencies>
            <Dependency>mod_php</Dependency>
            <Dependency>mariadb-lib</Dependency>
            <Dependency>mariadb-client</Dependency>
            <Dependency>mariadb-server</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="data">/usr/share/phpmyadmin</Path>
            <Path fileType="config">/usr/share/phpmyadmin/config.inc.php</Path>
            <Path fileType="config">/etc/apache2/conf.d/phpmyadmin.conf</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0655" target="/usr/share/phpmyadmin/config.inc.php">config.inc.php</AdditionalFile>
            <AdditionalFile target="/etc/apache2/conf.d/phpmyadmin.conf" owner="root" group="root" permission="0644">phpmyadmin.conf</AdditionalFile>
        </AdditionalFiles>
        <Provides>
            <COMAR script="package.py">System.Package</COMAR>
        </Provides>
    </Package>

    <History>
        <Update release="2" type="security">
            <Date>2017-01-30</Date>
            <Version>4.6.6</Version>
            <Comment>Version bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="1" type="security">
            <Date>2016-06-10</Date>
            <Version>4.6.2</Version>
            <Comment>First release</Comment>
            <Name>Pisi Linux Admins</Name>
            <Email>admins@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>phpmyadmin</Name>
        <Summary xml:lang="tr">Tarayıcı tabanlı MySQL Yönetim Aracı</Summary>
        <Description xml:lang="tr">MySQL Sunucusunu yönetmek için PHP5 desteği ile birlikte gelen popüler bir uygulama.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt

from pisi.actionsapi import pisitools
from pisi.actionsapi import qt5

def setup():
    qt5.configure()

def build():
    pisitools.dosed("pisido.pro", "-lqscintilla2", "-lqt5scintilla2")
    qt5.make()

def install():
    qt5.install()

    pisitools.dodoc("LICENSE", "LISANS", "OKUBUNU", "README")


code:
<PISI>
    <Source>
        <Name>pisido</Name>
        <Homepage>http://www.pisilinux.org</Homepage>
        <Packager>
            <Name>Harun Gültekin</Name>
            <Email>hrngultekin@gmail.com</Email>
        </Packager>
        <License>GPLv3+</License>
        <PartOf>util.admin</PartOf>
        <IsA>app:gui</IsA>
        A pisi packager from GUI
        <Description>You can make pisi packages with a GUI. Also, you can import your existing build files.Warning:Alfa version. Ported Qt5.</Description>
        <Archive type="targz" sha1sum="ff3d7adad1a7bc9a318d1e343174d7a2af5d8cde">https://github.com/hrngultekin/pisido/archive/pisido-v2.3.5.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>qscintilla2-devel</Dependency>
            <Dependency>qtermwidget5-devel</Dependency>
        </BuildDependencies>
    </Source>
    <Package>
        <Name>pisido</Name>
        A pisi packager with GUI
        <RuntimeDependencies>
            <Dependency>libgcc</Dependency>
            <Dependency>qt5-base</Dependency>
            <Dependency>qscintilla2</Dependency>
            <Dependency>qtermwidget5</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="data">/usr/share</Path>
        </Files>
    </Package>
    <History>
        <Update release="6">
            <Date>2018-02-06</Date>
            <Version>2.3.5</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="5">
            <Date>2017-06-02</Date>
            <Version>2.3.5</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="4">
            <Date>2017-05-16</Date>
            <Version>2.3.5</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-06-08</Date>
            <Version>2.3.5</Version>
            <Comment>Version Bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>2.3.3</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
         <Update release="1">
            <Date>2015-10-26</Date>
            <Version>2.3.3</Version>
            <Comment>First release</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<PISI>
    <Source>
        <Name>pisido</Name>
        <Summary xml:lang="tr">Grafik arayüzde çalışan pisi paketçisi. </Summary>
        <Description xml:lang="tr">Grafik arayüzde pisi paketleri yapabilirsiniz. Ayrıca var olan inşa dosyalarınızı içe aktarıp inşa edebilirsiniz.Çoklu paket yapısı eklenmiştir. Hala geliştirilme aşamasındasır. Alfa sürümdür. Qt5 ile hazırlanmıştır.</Description>
    </Source>
</PISI>

<!-- By PiSiDo 2.3.1 -->


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import pisitools

def install():
    pisitools.dobin("scripts/*")

    pisitools.dodoc("COPYING", "README", "TODO")


code:
--- scripts/checkelf.old	2014-04-25 17:57:56.000000000 +0200
+++ scripts/checkelf	2014-06-15 15:29:21.932687493 +0200
@@ -150,7 +150,11 @@
     for elf_files, paths_and_deps in result_dependencies.items():
         for data in paths_and_deps:
             if not data[1] == "broken" and not data[1] == package_name and not data[1] == "glibc":
-                result_deps.append(data[1])
+                if (data[1].startswith("xorg-video-nvidia") or data[1].startswith("xorg-video-fglrx")) \
+                    and not (package_name.startswith("xorg-video-nvidia") or package_name.startswith("xorg-video-fglrx")):
+                    result_deps.append("mesa")
+                else:
+                    result_deps.append(data[1])

     # remove packages that belong to system.base component
     # when -s is used, systembase is set to true


code:
--- scripts/checkelf~	2014-09-21 16:43:07.997559352 +0200
+++ scripts/checkelf	2014-09-21 16:43:31.069558509 +0200
@@ -157,7 +157,7 @@
     result_deps = []
     for elf_files, paths_and_deps in result_dependencies.items():
         for data in paths_and_deps:
-            if not data[1] == "broken" and not data[1] == package_name and not data[1] == "glibc":
+            if not data[1] == "broken" and not data[1] == package_name and not data[1].replace("32-bit", "") == "glibc":
                 if (data[1].startswith("xorg-video-nvidia") or data[1].startswith("xorg-video-fglrx")) \
                     and not (package_name.startswith("xorg-video-nvidia") or package_name.startswith("xorg-video-fglrx")):
                     result_deps.append("mesa")


code:
--- scripts/checkelf.old	2014-06-19 18:50:10.499728066 +0200
+++ scripts/checkelf	2014-06-19 18:47:59.408732856 +0200
@@ -26,6 +26,7 @@
 import itertools
 import subprocess

+FILESDB = pisi.db.filesldb.FilesLDB()
 INSTALLDB = pisi.db.installdb.InstallDB()
 CONSTANTS = pisi.constants.Constants()
 CMPFILTR = re.compile("(.*?)(\s*\((base|devel)\)\s*)$")
@@ -73,6 +74,7 @@
     # result_undefined = undefined symbol errors
     return (result_needed, result_broken, result_unused, result_undefined)

+found_objdump = []
 def check_objdump(processed_needed, package_elf_files, package_name):
     '''check the objdump needed libraries with the ldd libraries
        the libraries that are needed can be used for dependencies'''
@@ -86,14 +88,18 @@
         else:
             # search for the package name (i.e: pisi sf /usr/lib/*.so )
             # the library may not exist, thus adding an exception is welcome
+            if objdump_needed.startswith("/"): objdump_needed = objdump_needed[1:]
+            if objdump_needed in found_objdump: continue
             try:
-                dependency_name = pisi.api.search_file(objdump_needed)[0][0]
+                dependency_name = FILESDB.search_file(objdump_needed)[0][0]
+                found_objdump.extend([x.path for x in INSTALLDB.get_files(dependency_name).list])
             except IndexError:
                 dependency_name = "broken"
                 #print "%s (probably broken dependency)" % needed
         result_needed.append((objdump_needed, dependency_name))
     return result_needed

+found_pc_files = []
 def check_pc_files(pc_file):
     '''check for .pc files created by pkgconfig and shipped with the package
        these .pc files have requirements tags that can be used for dependencies'''
@@ -102,12 +108,14 @@
             os.path.basename(pc_file).replace(".pc", "")).read().split("\n")[:-1])

     for require in requires:
-        require_file = "/usr/share/pkgconfig/%s.pc" % require
+        require_file = "usr/share/pkgconfig/%s.pc" % require

-        if not os.path.exists(require_file):
-            require_file = "/usr/lib/pkgconfig/%s.pc" % require
+        if not os.path.exists("/%s" % require_file):
+            require_file = "usr/lib/pkgconfig/%s.pc" % require
+        if require_file in found_pc_files: continue
         try:
-            dependency_name = pisi.api.search_file(require_file)[0][0]
+            dependency_name = FILESDB.search_file(require_file)[0][0]
+            found_pc_files.extend([x.path for x in INSTALLDB.get_files(dependency_name).list])
         except IndexError:
             dependency_name = "broken"


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>pisilinux-dev-tools</Name>
        <Homepage>http://www.pisilinux.org</Homepage>
        <Packager>
            <Name>Marcin Bojara</Name>
            <Email>marcin@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>app:console</IsA>
        <Summary>A collection of useful tools that Pisi Linux developers use to make their developing work a lot easier</Summary>
        <Description>Pisilinux-dev-tools is a collection of useful tools that Pisilinux developers use to make their developing work a lot easier. Such tools can include packaging preparation, package analysis, etc.</Description>
        <Archive sha1sum="202e8ba50f95c150fa6049f42780c6b97ed45cd9" type="tarxz">http://source.pisilinux.org/1.0/pisilinux-dev-tools-0.0.2.tar.xz</Archive>
        <Patches>
            <Patch>fix_detect_mesa.patch</Patch>
            <Patch>spped_up.patch</Patch>
            <Patch>ignore_glibc-32bit.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>pisilinux-dev-tools</Name>
        <RuntimeDependencies>
            <Dependency>chrpath</Dependency>
            <Dependency>binutils</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-01-30</Date>
            <Version>0.0.2</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>0.0.2</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-06-28</Date>
            <Version>0.0.2</Version>
            <Comment>First release</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>Pisilinux-dev-tools</Name>
        <Summary xml:lang="tr">Pisilinux geliştiricilerinin geliştirme yaparken işlerini kolaylaştıran araçların bazılarını içeren bir paket</Summary>
        <Description xml:lang="tr">Pisilinux-dev-tools, Pisilinux geliştiricilerinin geliştirme yaparken işlerini kolaylaştıran araçların bazılarını içeren bir pakettir. Paket yapımı, paket analizi, ELF dosyalarının analizi gibi araçlar bulunmaktadır.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import pythonmodules
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def build():
    pythonmodules.compile()

def install():
    pythonmodules.install()

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "README")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>pisiyap</Name>
        <Homepage>http://code.google.com/p/pisiyap</Homepage>
        <Packager>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Packager>
        <License>GPLv3+</License>
        <License>CCPL-Attribution-NonCommercial-NoDerivs-3.0</License>
        <Icon>pisiyap</Icon>
        <IsA>app:gui</IsA>
        A Simple PiSi source file creator
        <Description>PisiYap is a simple graphical user interface for easily creating PiSi source files.</Description>
        <Archive sha1sum="86b6bb057d410008c1d436c94bf5bb4ed2e63e1e" type="targz">https://sourceforge.net/projects/pisilinux/files/source/pisiyap-pisiyap-beta2.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>qt5-base-devel</Dependency>
            <Dependency>python-qt5-devel</Dependency>
            <Dependency>python-setuptools</Dependency>
            <Dependency>qt5-linguist</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>pisiyap</Name>
        <RuntimeDependencies>
            <Dependency>python-qt5</Dependency>
            <Dependency>python-sip</Dependency>
            <Dependency>xdg-utils</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="data">/usr/share/applications</Path>
            <Path fileType="data">/usr/share/pisiyap</Path>
            <Path fileType="data">/usr/share/icons</Path>
            <Path fileType="data">/usr/share/pixmaps</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>kde-servicemenu-pisiyap</Name>
        PiSi related service menus
        <Description>PiSiYap servicemenus provides some useful service menus for lazy packagers.</Description>
        <RuntimeDependencies>
            <Dependency>pisiyap</Dependency>
            <Dependency>plasma-workspace</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="data">/usr/share/kservices5/ServiceMenus</Path>
        </Files>
    </Package>

    <History>
        <Update release="2">
            <Date>2017-06-21</Date>
            <Version>0.7b</Version>
            <Comment>Rebuild</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="1">
            <Date>2016-05-13</Date>
            <Version>0.7b</Version>
            <Comment>First release</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>pisiyap</Name>
        Basit bir PiSi kaynak dosyası üreticisi
        <Description xml:lang="tr">PisiYap, PiSi kaynak dosyaları üretmek için basit bir kullanıcı arayüzüdür.</Description>
    </Source>

    <Package>
        <Name>kde-servicemenu-pisiyap</Name>
        Paketlemeyle ilgili servis menüleri
        <Description xml:lang="tr">PiSiYap ile gelen servis menüleri, konsol açmaya erinen paketçiler için çeşitli servis menüleri sunar.</Description>
    </Package>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools

def setup():
    pisitools.cflags.add("-fpie")
    pisitools.ldflags.add("-pie -Wl,-z,relro -Wl,-z,now")

    autotools.autoreconf("-fi")

    autotools.configure("--libexecdir=/usr/libexec/sudo \
                         --with-rundir=/run/sudo \
                         --with-noexec=/usr/libexec/sudo/sudo_noexec.so \
                         --with-logging=syslog \
                         --with-logfac=authpriv \
                         --with-pam \
                         --with-pam-login \
                         --with-linux-audit \
                         --with-env-editor \
                         --with-ignore-dot \
                         --with-tty-tickets \
                         --with-ldap \
                         --enable-shell-sets-home \
                         --without-selinux \
                         --without-rpath")

    pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")

def build():
    autotools.make()

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

    pisitools.dodoc("README.LDAP", "README")


code:
#/usr/bin/python

import os

permissions = {
                "/etc/sudoers"          :   ["0440", "root:root"],
                "/etc/sudoers.d"        :   ["0750", "root:root"],
                "/var/db/sudo"          :   ["0700", "root:root"],
                "/usr/bin/sudo"         :   ["4111", "root:root"],
                "/usr/bin/sudoedit"     :   ["4111", "root:root"],
                "/usr/bin/sudoreplay"   :   ["0111", "root:root"],
            }

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    for _file, perms in permissions.items():
        # The list above is general, some paths may not exist depending on the configuration
        if os.path.exists(_file):
            os.system("/bin/chown -R %s %s" % (perms[1], _file))
            os.system("/bin/chmod %s %s" % (perms[0], _file))


code:
#%PAM-1.0
auth       include      sudo
account    include      sudo
password   include      sudo
session    optional     pam_keyinit.so force revoke
session    required     pam_limits.so


code:
#%PAM-1.0
auth       include      system-auth
account    include      system-auth
password   include      system-auth
session    optional     pam_keyinit.so revoke
session    required     pam_limits.so


code: d /run/sudo 0711 root root -


code:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Prevent environment variables from influencing programs in an
# unexpected or harmful way (CVE-2005-2959, CVE-2005-4158, CVE-2006-0151)
Defaults always_set_home
Defaults env_reset

Defaults env_keep =  "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
#Defaults env_keep += "XDG_SESSION_COOKIE"

# Comment out the preceding line and uncomment the following one if you need
# to use special input methods. This may allow users to compromise  the root
# account if they are allowed to run commands without authentication.
#Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"

# User privilege specification
root	ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
%wheel	ALL=(ALL)	ALL

# Same thing without a password
#%wheel	ALL=(ALL)	NOPASSWD: ALL

path: util/admin/sudo/files/sudoers


code:
# sudo.
# Copyright (C) 1993-1996,1998-2004 Todd C. Miller <Todd.Miller@courtesan.com>
# This file is distributed under the same license as the sudo package.
# Bahadır Kandemir <bahadir@pardus.org.tr>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: sudo\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-12-06 17:24+0200\n"
"PO-Revision-Date: 2011-01-07 10:11+0200\n"
"Last-Translator: Bahadır Kandemir <bahadir@pardus.org.tr>\n"
"Language-Team: Bahadır Kandemir <bahadir@pardus.org.tr>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: check.c:138
msgid ""
"\n"
"We trust you have received the usual lecture from the local System\n"
"Administrator. It usually boils down to these three things:\n"
"\n"
"    #1) Respect the privacy of others.\n"
"    #2) Think before you type.\n"
"    #3) With great power comes great responsibility.\n"
"\n"
msgstr ""
"\n"
"Sistem yöneticinizin gerekli bilgilendirmeyi yaptığını varsayıyoruz.\n"
"Bilgilendirme, genellikle aşağıdaki maddelerle ilgilidir:\n"
"\n"
"    #1) Diğerlerinin mahremiyetine saygı gösterin.\n"
"    #2) Yazmadan önce düşünün.\n"
"    #3) Büyük güç büyük sorumluluk getirir.\n"
"\n"


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>sudo</Name>
        <Homepage>http://www.sudo.ws/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>Sudo</License>
        <IsA>app:console</IsA>
        <Summary>Allows restricted root access for specified users</Summary>
        <Description>sudo allows certain users/groups to run commands with root user privileges.</Description>
        <Archive sha1sum="1a3eea53e256fa0f43c0f986ce2bae016709e761" type="targz">https://www.sudo.ws/sudo/dist/sudo-1.8.19.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>nss-devel</Dependency>
            <Dependency>audit-devel</Dependency>
            <Dependency>pam-devel</Dependency>
            <Dependency>zlib-devel</Dependency>
            <Dependency versionFrom="2.1.26">cyrus-sasl-devel</Dependency>
            <Dependency versionFrom="2.4.41">openldap-client</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>sudo</Name>
        <RuntimeDependencies>
            <Dependency>nss</Dependency>
            <Dependency>audit</Dependency>
            <Dependency>pam</Dependency>
            <Dependency>zlib</Dependency>
            <Dependency versionFrom="2.1.26">cyrus-sasl</Dependency>
            <Dependency versionFrom="2.4.41">openldap-client</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="config">/usr/lib/tmpfiles.d/sudo.conf</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/sbin</Path>
            <Path fileType="library">/usr/libexec</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="data">/run/sudo</Path>
            <Path fileType="data">/var/db/sudo</Path>
            <Path fileType="header">/usr/include</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0440" target="/etc/sudoers">sudoers</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/etc/sudoers.orig">sudoers</AdditionalFile>
            <AdditionalFile owner="root" permission="0600" target="/etc/pam.d/sudo">sudo.pamd</AdditionalFile>
            <AdditionalFile owner="root" permission="0600" target="/etc/pam.d/sudo-i">sudo-i.pamd</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/sudo.conf">sudo.tmpfiles.conf</AdditionalFile>
        </AdditionalFiles>
        <Provides>
            <COMAR script="package.py">System.Package</COMAR>
        </Provides>
    </Package>

    <History>
        <Update release="5">
            <Date>2017-01-25</Date>
            <Version>1.8.19</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="4">
            <Date>2016-09-26</Date>
            <Version>1.8.18</Version>
            <Comment>Version bump.</Comment>
            <Name>Yusuf Aydemir</Name>
            <Email>yusuf.aydemir@pisilnux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-06-15</Date>
            <Version>1.8.16</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-16</Date>
            <Version>1.8.16</Version>
            <Comment>Version bump. Add sudoers.orig for live user privileges</Comment>
            <Name>Yusuf Aydemir</Name>
            <Email>yusuf.aydemir@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-01-10</Date>
            <Version>1.8.13</Version>
            <Comment>First release</Comment>
            <Name>Yusuf Aydemir</Name>
            <Email>yusuf.aydemir@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>sudo</Name>
        <Summary xml:lang="tr">Yönetici haklarıyla komut çalıştırma uygulaması</Summary>
        <Description xml:lang="tr">sudo, belirli kullanıcıların ya da kullanıcı gruplarının komut ve uygulamaları yönetici kullanıcı (root) haklarıyla çalıştırmasına izin veren bir konsol uygulamasıdır.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import shelltools
from pisi.actionsapi import pisitools
from pisi.actionsapi import autotools
from pisi.actionsapi import get

def setup():
    pisitools.dosed("configure.ac", "-Werror")
    pisitools.dosed("Makefile.am", "-Werror")
    autotools.autoreconf("-vfi")

    autotools.configure("--enable-sqlite \
                         --enable-pie \
                         --disable-docs \
                         --disable-publican \
                         --disable-crash \
                         --disable-silent-rules \
                         --docdir=/%s/%s \
                         --without-rpm" % (get.docDIR(), get.srcNAME()))

def build():
    autotools.make()

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

    pisitools.dodir("/var/cache/systemtap")
    pisitools.dodir("/run/systemtap")
    pisitools.dodir("/var/log/stap-server")
    pisitools.dodir("/etc/logrotate.d")
    pisitools.dodir("/etc/stap-server/conf.d")
    pisitools.dodir("/etc/systemtap/conf.d")
    pisitools.dodir("/etc/systemtap/script.d")

    pisitools.dobin("stap-prep")

    pisitools.domove("/var/run/stap-server", "/run/")
    pisitools.removeDir("var/run")

    shelltools.copytree("testsuite", "%s/usr/share/systemtap" % get.installDIR())

    pisitools.insinto("/etc/logrotate.d", "initscript/logrotate.stap-server", "stap-server")
    pisitools.insinto("/etc/conf.d", "initscript/config.stap-server", "stap-server")
    pisitools.insinto("/etc/systemtap", "initscript/config.systemtap", "config")

    # Clean uprobes directory
    #autotools.make("-C %s/usr/share/systemtap/runtime/uprobes clean" % get.installDIR())

    pisitools.dodoc("COPYING", "HACKING", "INTERNALS", "README.*")


code:
#/usr/bin/python

import os

LOGFILE = "/var/log/stap-server/log"

permissions = {
                "/usr/share/systemtap/runtime/uprobes"  :   ["0775", "root:stap-server"],
                LOGFILE                                 :   ["0664", "stap-server:stap-server"],
            }

# TODO
# If it does not already exist, as stap-server, generate the certificate
# used for signing and for ssl.
#if test ! -e ~stap-server/.systemtap/ssl/server/stap.cert; then
#   runuser -s /bin/sh - stap-server -c %{_libexecdir}/%{name}/stap-gen-cert >/dev/null
   # Authorize the certificate as a trusted ssl peer and as a trusted signer
   # on the local host.
#   %{_libexecdir}/%{name}/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/ssl/client >/dev/null
#   %{_libexecdir}/%{name}/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/staprun >/dev/null
#fi

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    if not os.path.exists(LOGFILE):
        open(LOGFILE, "w").write("")

    for _file, perms in permissions.items():
        # The list above is general, some paths may not exist depending on the configuration
        if os.path.exists(_file):
            os.system("/bin/chown -R %s %s" % (perms[1], _file))
            os.system("/bin/chmod %s %s" % (perms[0], _file))


code:
#!/bin/bash
#
# stap-server	init.d script for the systemtap compile server
#
# chkconfig: - 00 99
# description: The systemtap compile server provides a centralized and secure \
#              environment for compiling systemtap scripts.
# config: /etc/sysconfig/stap-server
# config: /etc/stap-server/conf.d

# Call the installed stap-server script.
STAP_USER=stap-server ${exec_prefix}/bin/stap-server "$@"

path: util/admin/systemtap/comar/stap-server