code:
diff -Nuar libindi-0.7.2.orig//CMakeLists.txt libindi-0.7.2/CMakeLists.txt
--- libindi-0.7.2.orig//CMakeLists.txt	2010-11-20 13:38:03.000000000 +0200
+++ libindi-0.7.2/CMakeLists.txt	2010-11-25 14:01:46.938033274 +0200
@@ -148,24 +148,32 @@
 set_target_properties(indi PROPERTIES VERSION ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})

-##################################################
-######## INDI Base Driver Static Library #########
-##################################################
-add_library(indibasedriver STATIC ${indimain_SRCS})
-install(TARGETS indibasedriver ARCHIVE DESTINATION lib${LIB_POSTFIX})
-
-##################################################
-###### INDI Default Driver Static Library ########
-##################################################
-add_library(indidefaultdriver STATIC ${indimain_SRCS} ${indidefaultdevice_SRCS})
-install(TARGETS indidefaultdriver ARCHIVE DESTINATION lib${LIB_POSTFIX})
+###########################################
+######## INDI Base Driver Library #########
+###########################################
+add_library(indibasedriver SHARED ${indimain_SRCS})
+target_link_libraries(indibasedriver indi m)
+install(TARGETS indibasedriver LIBRARY DESTINATION lib${LIB_POSTFIX})
+set_target_properties(indibasedriver PROPERTIES VERSION
+    ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
+
+###########################################
+###### INDI Default Driver Library ########
+###########################################
+add_library(indidefaultdriver SHARED ${indidefaultdevice_SRCS})
+target_link_libraries(indidefaultdriver indibasedriver m)
+install(TARGETS indidefaultdriver LIBRARY DESTINATION lib${LIB_POSTFIX})
+set_target_properties(indidefaultdriver PROPERTIES VERSION
+    ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})

 ##################################################
 ############# INDI Client Library ################
 ##################################################
-add_library(indiclient STATIC ${indibase_SRCS})
-target_link_libraries(indiclient indi)
-install(TARGETS indiclient ARCHIVE DESTINATION lib${LIB_POSTFIX})
+add_library(indiclient SHARED ${indibase_SRCS})
+target_link_libraries(indiclient indi pthread)
+install(TARGETS indiclient LIBRARY DESTINATION lib${LIB_POSTFIX})
+set_target_properties(indiclient PROPERTIES VERSION
+    ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})

 #####################################
 ########## TELESCOPE GROUP ##########
@@ -173,14 +181,13 @@

 ########### LX200 Basic #############
 set(lx200basic_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200basic.cpp )

 add_executable(indi_lx200basic ${lx200basic_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

 if (NOVA_FOUND)
-  target_link_libraries(indi_lx200basic ${NOVA_LIBRARIES})
+  target_link_libraries(indi_lx200basic indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)

 install(TARGETS indi_lx200basic RUNTIME DESTINATION bin )
@@ -189,7 +196,6 @@

 ########### LX200 Generic ###########
 set(lx200generic_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200autostar.cpp
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200_16.cpp
@@ -201,7 +207,7 @@

 add_executable(indi_lx200generic ${lx200generic_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_lx200generic  m )
+target_link_libraries(indi_lx200generic indibasedriver m )

 if (NOVA_FOUND)
   target_link_libraries(indi_lx200generic ${NOVA_LIBRARIES})
@@ -221,13 +227,12 @@

 ########### Celestron GPS ############
 set(celestrongps_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/celestronprotocol.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/celestrongps.cpp )

 add_executable(indi_celestron_gps ${celestrongps_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_celestron_gps m )
+target_link_libraries(indi_celestron_gps indibasedriver m )

 if (NOVA_FOUND)
@@ -240,7 +245,6 @@

 ########### Orion Atlas #############
 set(orionatlas_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/orionatlas.cpp )

 add_executable(indi_orion_atlas ${orionatlas_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
@@ -248,7 +252,7 @@
 #target_link_libraries(indi_orion_atlas ${KDE4_KDECORE_LIBS})

 if (NOVA_FOUND)
-  target_link_libraries(indi_orion_atlas ${NOVA_LIBRARIES})
+  target_link_libraries(indi_orion_atlas indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)

 install(TARGETS indi_orion_atlas RUNTIME DESTINATION bin )
@@ -259,12 +263,11 @@
 if (NOVA_FOUND)

 set(temma_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/temmadriver.c )

 add_executable(indi_temma ${temma_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_temma  ${NOVA_LIBRARIES} m )
+target_link_libraries(indi_temma indibasedriver  ${NOVA_LIBRARIES} m )

 install(TARGETS indi_temma RUNTIME DESTINATION bin )

@@ -273,16 +276,15 @@

 ########### Sky Commander #############
 set(skycommander_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/skycommander.c )

 add_executable(indi_skycommander ${skycommander_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_skycommander  m )
+target_link_libraries(indi_skycommander indibasedriver m )

 if (NOVA_FOUND)
-  target_link_libraries(indi_skycommander ${NOVA_LIBRARIES})
+  target_link_libraries(indi_skycommander indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)

 install(TARGETS indi_skycommander  RUNTIME DESTINATION bin )
@@ -291,13 +293,12 @@

 ########### Intelliscope ###############
 set(intelliscope_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/intelliscope.c )

 add_executable(indi_intelliscope ${intelliscope_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_intelliscope  m )
+target_link_libraries(indi_intelliscope indibasedriver m )

 if (NOVA_FOUND)
   target_link_libraries(indi_intelliscope ${NOVA_LIBRARIES})
@@ -312,13 +313,12 @@
 ###### FLI Precision Digital Focuser ######
 if (FLI_FOUND)
 set(flipdf_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/focuser/fli_pdf.c
 )

 add_executable(indi_fli_pdf ${flipdf_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_fli_pdf m ${FLI_LIBRARIES})
+target_link_libraries(indi_fli_pdf m indibasedriver ${FLI_LIBRARIES})

 if (NOVA_FOUND)
   target_link_libraries(indi_fli_pdf ${NOVA_LIBRARIES})
@@ -331,17 +331,16 @@
 ################ Robo Focuser ################

 set(robofocus_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/focuser/robofocus.c
 	${CMAKE_SOURCE_DIR}/drivers/focuser/robofocusdriver.c
    )

 add_executable(indi_robofocus ${robofocus_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_robofocus m)
+target_link_libraries(indi_robofocus indibasedriver m)

 if (NOVA_FOUND)
-  target_link_libraries(indi_robofocus ${NOVA_LIBRARIES})
+  target_link_libraries(indi_robofocus indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)

 install(TARGETS indi_robofocus RUNTIME DESTINATION bin )
@@ -354,16 +353,15 @@

 ########## True Technology Wheel ############
 set(trutechwheel_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/filter_wheel/trutech_wheel.c
    )

 add_executable(indi_trutech_wheel ${trutechwheel_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_trutech_wheel  m)
+target_link_libraries(indi_trutech_wheel indibasedriver  m)

 if (NOVA_FOUND)
-  target_link_libraries(indi_trutech_wheel ${NOVA_LIBRARIES})
+  target_link_libraries(indi_trutech_wheel indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)

 install(TARGETS indi_trutech_wheel RUNTIME DESTINATION bin )
@@ -373,16 +371,15 @@
 ########## FLI Filter Wheel ############
 if (FLI_FOUND)
 set(fliwheel_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/filter_wheel/fli_wheel.c
    )

 add_executable(indi_fli_wheel ${fliwheel_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_fli_wheel ${FLI_LIBRARIES} m)
+target_link_libraries(indi_fli_wheel indibasedriver ${FLI_LIBRARIES} m)

 if (NOVA_FOUND)
-  target_link_libraries(indi_fli_wheel ${NOVA_LIBRARIES})
+  target_link_libraries(indi_fli_wheel indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)

 install(TARGETS indi_fli_wheel RUNTIME DESTINATION bin )
@@ -397,16 +394,15 @@
 if (CFITSIO_FOUND AND FLI_FOUND)

 set(fliccd_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/ccd/fli_ccd.c
 )

 add_executable(indi_fli_ccd ${fliccd_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_fli_ccd ${FLI_LIBRARIES} ${CFITSIO_LIBRARIES} m z)
+target_link_libraries(indi_fli_ccd indibasedriver ${FLI_LIBRARIES} ${CFITSIO_LIBRARIES} m z)

 if (NOVA_FOUND)
-  target_link_libraries(indi_fli_ccd ${NOVA_LIBRARIES})
+  target_link_libraries(indi_fli_ccd indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)

 install(TARGETS indi_fli_ccd RUNTIME DESTINATION bin )
@@ -423,13 +419,12 @@
 if (NOVA_FOUND)

 set(stv_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/video/stvdriver.c
    ${CMAKE_SOURCE_DIR}/drivers/video/stv.c )

 add_executable(indi_sbig_stv ${stv_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_sbig_stv z m ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES})
+target_link_libraries(indi_sbig_stv indibasedriver z m ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES})

 install(TARGETS indi_sbig_stv RUNTIME DESTINATION bin )

@@ -444,7 +439,6 @@
 ADD_DEFINITIONS(-DHAVE_LINUX_VIDEODEV2_H)

 set(meade_lpi_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
 	${CMAKE_SOURCE_DIR}/drivers/video/indi_lpi.cpp
    )
@@ -454,7 +448,7 @@
 target_link_libraries(indi_meade_lpi z ${CFITSIO_LIBRARIES})

 if (NOVA_FOUND)
-  target_link_libraries(indi_meade_lpi ${NOVA_LIBRARIES})
+  target_link_libraries(indi_meade_lpi indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)

 install(TARGETS indi_meade_lpi RUNTIME DESTINATION bin )
@@ -467,7 +461,6 @@
 if (CFITSIO_FOUND)

 set(v4lphilips_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
 	${CMAKE_SOURCE_DIR}/drivers/video/v4lphilips.cpp
 	${CMAKE_SOURCE_DIR}/drivers/video/indi_philips.cpp
@@ -475,7 +468,7 @@

 add_executable(indi_v4l_philips ${v4lphilips_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_v4l_philips m z ${CFITSIO_LIBRARIES})
+target_link_libraries(indi_v4l_philips indibasedriver m z ${CFITSIO_LIBRARIES})

 if (NOVA_FOUND)
   target_link_libraries(indi_v4l_philips ${NOVA_LIBRARIES})
@@ -491,14 +484,13 @@
 if (CFITSIO_FOUND)

 set(v4ldriver_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
 	${CMAKE_SOURCE_DIR}/drivers/video/indi_v4l.cpp
    )

 add_executable(indi_v4l_generic ${v4ldriver_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(indi_v4l_generic m z ${CFITSIO_LIBRARIES})
+target_link_libraries(indi_v4l_generic indibasedriver m z ${CFITSIO_LIBRARIES})

 if (NOVA_FOUND)
   target_link_libraries(indi_v4l_generic ${NOVA_LIBRARIES})
@@ -570,13 +562,12 @@
 ## Build Examples. Not installation
 ########### Tutorial one ##############
 set(tutorialone_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_one.c
    )

 add_executable(tutorial_one ${tutorialone_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(tutorial_one  m)
+target_link_libraries(tutorial_one indibasedriver m)

 if (NOVA_FOUND)
   target_link_libraries(tutorial_one ${NOVA_LIBRARIES})
@@ -584,13 +575,12 @@

 ########### Tutorial two ##############
 set(tutorialtwo_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_two.c
    )

 add_executable(tutorial_two ${tutorialtwo_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(tutorial_two  m)
+target_link_libraries(tutorial_two indibasedriver m)

 if (NOVA_FOUND)
   target_link_libraries(tutorial_two ${NOVA_LIBRARIES})
@@ -598,13 +588,12 @@

 ########### Tutorial three ##############
 set(tutorialthree_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_three.c
    )

 add_executable(tutorial_three ${tutorialthree_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(tutorial_three m z)
+target_link_libraries(tutorial_three indibasedriver m z)

 if (NOVA_FOUND)
   target_link_libraries(tutorial_three ${NOVA_LIBRARIES})
@@ -612,13 +601,12 @@

 ########### Tutorial four ##############
 set(tutorialfour_SRCS
-        ${indimain_SRCS}
         ${CMAKE_SOURCE_DIR}/examples/tutorial_four.cpp
    )

 add_executable(tutorial_four ${tutorialfour_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(tutorial_four indidefaultdriver m z pthread)
+target_link_libraries(tutorial_four indidefaultdriver indibasedriver m z pthread)

 if (NOVA_FOUND)
   target_link_libraries(tutorial_four ${NOVA_LIBRARIES})
@@ -627,13 +615,12 @@

 ########### Tutorial dome ##############
 set(tutorialdome_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_dome.c
    )

 add_executable(tutorial_dome ${tutorialdome_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(tutorial_dome  m)
+target_link_libraries(tutorial_dome indibasedriver  m)

 if (NOVA_FOUND)
   target_link_libraries(tutorial_dome ${NOVA_LIBRARIES})
@@ -641,13 +628,12 @@

 ########### Tutorial rain ##############
 set(tutorialrain_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_rain.c
    )

 add_executable(tutorial_rain ${tutorialrain_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})

-target_link_libraries(tutorial_rain  m)
+target_link_libraries(tutorial_rain indibasedriver m)

 if (NOVA_FOUND)
   target_link_libraries(tutorial_rain ${NOVA_LIBRARIES})


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libindi</Name>
        <Homepage>http://www.indilib.org/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>LGPLv2</License>
        <IsA>app:console</IsA>
        <IsA>library</IsA>
        Astronomical control protocol library
        <Description>indilib is a distributed control protocol designed to operate astronomical instrumentation. indilib is small, flexible, easy to parse, and scalable.</Description>
        <Archive sha1sum="31752b0c43fea95501035f1c033bc89433eb91ff" type="targz">http://downloads.sourceforge.net/project/indi/libindi_1.4.1.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>libnova-devel</Dependency>
            <Dependency>cfitsio-devel</Dependency>
            <Dependency>gsl-devel</Dependency>
             <Dependency>curl-devel</Dependency>
            <Dependency>libjpeg-turbo-devel</Dependency>
            <Dependency>libusb-devel</Dependency>
             <Dependency>boost-devel</Dependency>
             <Dependency>zlib-devel</Dependency>
             <Dependency>pkgconfig</Dependency>
            <Dependency>cmake</Dependency>
        </BuildDependencies>
        <Patches>

        </Patches>
    </Source>

    <Package>
        <Name>libindi</Name>
        <RuntimeDependencies>
            <Dependency>libnova</Dependency>
            <Dependency>cfitsio</Dependency>
            <Dependency>gsl</Dependency>
            <Dependency>curl</Dependency>
            <Dependency>libjpeg-turbo</Dependency>
            <Dependency>libusb</Dependency>
            <Dependency>gsl</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>zlib</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="rules">/lib/udev/rules.d</Path>
            <Path fileType="data">/usr/share/indi</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>libindi-devel</Name>
        Development files for libindi
        <RuntimeDependencies>
            <Dependency release="current">libindi</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-05-18</Date>
            <Version>1.4.1</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>1.2.0</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-11-18</Date>
            <Version>1.2.0</Version>
            <Comment>First release</Comment>
            <Name>Stefan Gronewold (groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
    </History>
</PISI>

repo_name: ayhanyalcinsoy/main


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>indilib</Name>
        Astronomik denetim protokolü kütüphanesi
        <Description xml:lang="tr">indilib, astronomik cihazları yönetmek için tasarlanmış bir dağıtık denetim protokolüdür.</Description>
    </Source>

    <Package>
        <Name>indilib-devel</Name>
        indilib için geliştirme dosyaları
    </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 shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.configure("--disable-static")

def build():
    autotools.make()

def check():
    autotools.make("check")

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

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


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libnova</Name>
        <Homepage>http://libnova.sourceforge.net</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>LGPLv2</License>
        <IsA>library</IsA>
        Celestial Mechanics and Astronomical Calculation Library
        <Description>libnova is a general purpose, double precision, celestial mechanics, astrometry and astrodynamics library.</Description>
        <Archive sha1sum="4ea7034a907d0578646b0d12fc4a095de8b23f51" type="targz">mirrors://sourceforge/libnova/libnova/v%200.14.0/libnova-0.14.0.tar.gz</Archive>
    </Source>

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

    <Package>
        <Name>libnova-devel</Name>
        Development files for libnova
        <RuntimeDependencies>
            <Dependency release="current">libnova</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="executable">/usr/bin/libnovaconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-04-18</Date>
            <Version>0.14.0</Version>
            <Comment>Rebuild with new toolchain</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>0.14.0</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-06-14</Date>
            <Version>0.14.0</Version>
            <Comment>First release</Comment>
            <Name>Osman Erkan</Name>
            <Email>osman.erkan@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>libnova</Name>
        Gökyüzü mekaniği ve astronomik hesaplama kütüphanesi
        <Description xml:lang="tr">libnova genel amaçlı, çift hassasiyetli, gökyüzü mekaniği, astrometri ve astrodinamik kütüphanesidir.</Description>
    </Source>

    <Package>
        <Name>libnova-devel</Name>
        libnova için geliştirme dosyaları
    </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 autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.configure("--enable-shared=yes \
                         --enable-debug=no \
                         --enable-samples=no")

def build():
    autotools.make()

def install():
    autotools.install()

    pisitools.dodoc("Changes.txt", "License.txt")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>muparser</Name>
        <Homepage>http://muparser.beltoforion.de/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <IsA>library</IsA>
        Mathematical expressions parser library
        <Description>muparser is a mathematical expressions parser library. It is based on transforming an expression into a bytecode and precalculating constant parts of it.</Description>
        <Archive sha1sum="d86946f8bc5f5d74063313a00c16798a418e308b" type="targz">https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz</Archive>
    </Source>

    <Package>
        <Name>muparser</Name>
        <RuntimeDependencies>
            <Dependency>libgcc</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>
    <Package>
        <Name>muparser-devel</Name>
        Development files for muparser
        <RuntimeDependencies>
            <Dependency release="current">muparser</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-04-15</Date>
            <Version>2.2.5</Version>
            <Comment>Release Bump</Comment>
            <Name>Rebuild with new toolchain</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>2.2.5</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-03-08</Date>
            <Version>2.2.5</Version>
            <Comment>First release</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>muparser</Name>
        Matematiksel ifade ayrıştırma kitaplığı
        <Description xml:lang="tr">muparser, matematiksel ifadelerin ayrıştırılmasında kullanılan bir kitaplıktır.</Description>
    </Source>

    <Package>
        <Name>muparser-devel</Name>
        muparser için geliştirme dosyaları
    </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 autotools
from pisi.actionsapi import shelltools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.configure("--prefix=/usr \
                                         --without-pgplot")

def build():
    autotools.make()

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

    pisitools.dodoc("COPYING", "COPYING.LESSER", "CHANGES", "README", "VALIDATION", )


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>wcslib</Name>
        <Homepage>http://www.atnf.csiro.au/people/Mark.Calabretta/WCS/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv3</License>
        <IsA>library</IsA>
        A C library that implements the 'World Coordinate System' (WCS) standard in FITS
        <Description>The FITS "World Coordinate System" (WCS) standard defines keywords and usage that provide for the description of astronomical coordinate systems in a FITS image header.</Description>
        <Archive sha1sum="b7bcb6426405cb15e13fb8b217c954ebe869a522" type="tarbz2">ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-5.16.tar.bz2</Archive>
      <BuildDependencies>
            <Dependency>gcc</Dependency>
            <Dependency>flex</Dependency>
            <Dependency>libgfortran</Dependency>
            <Dependency>cfitsio-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>wcslib</Name>
        <RuntimeDependencies>
            <Dependency>cfitsio</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man/man1</Path>
        </Files>
    </Package>

    <Package>
        <Name>wcslib-devel</Name>
        Development files for wcslib
        <RuntimeDependencies>
            <Dependency release="current">wcslib</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-04-15</Date>
            <Version>5.16</Version>
            <Comment>Rebuild with new toolchain</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>5.12</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-11-18</Date>
            <Version>5.12</Version>
            <Comment>First release</Comment>
            <Name>Stefan Gronewold (groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<PISI>
    <Name>science.robotics</Name>
</PISI>


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

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

shelltools.export("PYTHONDONTWRITEBYTECODE", "")

def setup():

    #temporary workaround for error: "'UINT64_C' was not declared in this scope"
    shelltools.export("CXXFLAGS", "%s -D__STDC_CONSTANT_MACROS" % get.CXXFLAGS())

    cmaketools.configure("-D CMAKE_BUILD_TYPE=Release \
                          -D CMAKE_INSTALL_PREFIX=/usr \
                          -D CMAKE_SKIP_RPATH=ON \
                           DESTDIR=%s  \
                          -DBUILD_EXAMPLES=1 \
                          -DBUILD_SWIG_PYTHON_SUPPORT=1 \
                          -DINSTALL_C_EXAMPLES=1 \
                          -DINSTALL_PYTHON_EXAMPLES=1 \
                          -DINSTALL_OCTAVE_EXAMPLES=1 \
                          -DWITH_FFMPEG=0 \
                          -DWITH_UNICAP=0 \
                          -DENABLE_OPENMP=0 \
                          -DNEW_PYTHON_SUPPORT=1 \
                          -DOCTAVE_SUPPORT=0 \
                          -DUSE_MMX=1 \
                          -DUSE_SSE2=1 \
                          -DUSE_SSE3=0 \
                          -DUSE_SSE=1 \
                          -DWITH_TBB=ON \
                          -DWITH_EIGEN=ON \
                          -DWITH_1394=1 \
                          -DWITH_GSTREAMER=1 \
                          -DWITH_GTK=1 \
                          -DWITH_JASPER=1 \
                          -DWITH_JPEG=1 \
                          -DWITH_PNG=1 \
                          -DWITH_TIFF=1 \
                          -DWITH_V4L=1 \
                          -DWITH_XINE=1 \
                          -DCMAKE_SKIP_RPATH=1" % get.installDIR())
                          #  -DUSE_O3=OFF
                          #  -DUSE_OMIT_FRAME_POINTER=OFF

def build():
    cmaketools.make("VERBOSE=1")

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

    # Move other docs and samples under standart doc dir
    #doc_dir = "usr/share/doc/" + get.srcNAME()

    #pisitools.domove("usr/share/opencv/doc", doc_dir)
    #pisitools.domove("usr/share/opencv/samples", doc_dir)

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


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>opencv</Name>
        <Homepage>http://opencv.willowgarage.com/wiki</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>BSD</License>
        <IsA>library</IsA>
        Computer vision library
        <Description>opencv is a programming library mainly aimed at the real time computer vision. Example applications are human-computer interaction, object identification, face recognition, motion tracking, mobile robotics.</Description>
        <Archive sha1sum="ed6ba1a2fbb4868343495757079cd60f3a6096d5" type="targz">https://github.com/opencv/opencv/archive/3.2.0.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>cmake</Dependency>
            <Dependency>gtk2-devel</Dependency>
            <Dependency>cairo-devel</Dependency>
            <Dependency>libv4l-devel</Dependency>
            <Dependency>openexr-libs</Dependency>
            <Dependency>jasper-devel</Dependency>
            <Dependency>ilmbase-devel</Dependency>
            <Dependency>openexr-devel</Dependency>
            <Dependency>lapack-devel</Dependency>
            <Dependency>python-numpy</Dependency>
            <Dependency>python-devel</Dependency>
            <Dependency>xine-lib-devel</Dependency>
            <Dependency>libdc1394-devel</Dependency>
            <Dependency>gstreamer-devel</Dependency>
            <Dependency>gdk-pixbuf-devel</Dependency>
            <Dependency>libjpeg-turbo-devel</Dependency>
            <Dependency>gst-plugins-base-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>opencv</Name>
        <RuntimeDependencies>
            <Dependency>gtk2</Dependency>
            <Dependency>cairo</Dependency>
            <Dependency>zlib</Dependency>
            <Dependency>glib2</Dependency>
            <Dependency>jasper</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>libpng</Dependency>
            <Dependency>libv4l</Dependency>
            <Dependency>ilmbase</Dependency>
            <Dependency>openexr-libs</Dependency>
            <Dependency>xine-lib</Dependency>
            <Dependency>libdc1394</Dependency>
            <Dependency>gstreamer</Dependency>
            <Dependency>gdk-pixbuf</Dependency>
            <Dependency>gst-plugins-base</Dependency>
            <Dependency>libjpeg-turbo</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="doc">/usr/share/OpenCV</Path>
            <Path fileType="data">/usr/share/opencv</Path>
        </Files>
    </Package>

    <Package>
        <Name>opencv-docs</Name>
        Computer vision library documents and examples
        <Files>
            <Path fileType="doc">/usr/share/doc/opencv</Path>
            <Path fileType="doc">/usr/share/doc/opencv/samples</Path>
        </Files>
    </Package>

    <Package>
        <Name>opencv-devel</Name>
        Development files for opencv
        <RuntimeDependencies>
            <Dependency release="current">opencv</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="library">/usr/lib/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="6">
            <Date>2017-09-22</Date>
            <Version>3.2.0</Version>
            <Comment>Release bump.</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="5">
            <Date>2017-07-07</Date>
            <Version>3.2.0</Version>
            <Comment>Release bump</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
        <Update release="4">
            <Date>2017-04-17</Date>
            <Version>3.2.0</Version>
            <Comment>Version bump</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-11-06</Date>
            <Version>2.4.13</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>2.4.11</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-09-15</Date>
            <Version>2.4.11</Version>
            <Comment>First release</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>opencv</Name>
        Bilgisayarla görme kütüphanesi
        Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
        <Description xml:lang="tr">opencv gerçek zamanlı bilgisayarla görme işlemleri için tasarlanmış bir kütüphanedir. İnsan-bilgisayar etkileşimi, nesne tanımlama, yüz tanıma, hareket izleme, mobil robotik, opencv'nin kullanıldığı bazı uygulama alanlarıdır.</Description>
        <Description xml:lang="pl">OpenCV (Open Source Computer Vision) to biblioteka funkcji przeznaczonych głównie do grafiki komputerowej w czasie rzeczywistym.</Description>
    </Source>

    <Package>
        <Name>opencv-devel</Name>
        opencv için geliştirme dosyaları
        Pliki naglowkowe do opencv
    </Package>
</PISI>


code:
<PISI>
    <Name>server.auth</Name>
</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
from pisi.actionsapi import shelltools

def setup():
    pisitools.dosed("libsasl2.pc.in", "libdir = @libdir@", "prefix=/usr\nexec_prefix=${prefix}\nlibdir = @libdir@")
    def cleanup():
        for p in ("config.*", "ltconfig", "ltmain.sh", "libtool.m4"):
            shelltools.unlink("config/%s" % p)

    cleanup()
    autotools.autoreconf("-vfi --no-recursive -I config -I cmulocal")
    shelltools.cd("saslauthd")
    cleanup()
    autotools.autoreconf("-vi --no-recursive -I config -I ../cmulocal -I ../config")
    shelltools.cd("..")

    pisitools.cflags.add("-fPIC")

    # Don't disable ldap support to break circular dep. with openldap
    # As workaround, we remove openldap-client runtime dep. in pspec
    autotools.configure("--with-saslauthd=/run/saslauthd \
                         --with-pwcheck=/var/lib/sasl2 \
                         --with-configdir=/etc/sasl2 \
                         --with-plugindir=/usr/lib/sasl2 \
                         --with-dbpath=/etc/sasl2/sasldb2 \
                         --with-pam \
                         --without-ldap \
                         --with-openssl \
                         --with-dblib=gdbm \
                         --with-gss_impl=mit \
                         --with-devrandom=/dev/urandom \
                         --without-pgsql \
                         --without-mysql \
                         --enable-anon \
                         --enable-cram \
                         --enable-digest \
                         --enable-gssapi \
                         --enable-login \
                         --enable-ntlm \
                         --enable-plain \
                         --disable-ldapdb \
                         --enable-checkapop \
                         --enable-alwaystrue \
                         --disable-java \
                         --disable-krb4 \
                         --disable-otp \
                         --disable-srp \
                         --disable-sql \
                         --disable-passdss \
                         --disable-macos-framework \
                         --disable-static")

    # for remove unused
    pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")

def build():
    autotools.make("-j1")
    autotools.make("-C saslauthd testsaslauthd")

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

    pisitools.dodir("/etc/sasl2")
    pisitools.dodir("/run/saslauthd")

    for doc in ["AUTHORS", "COPYING", "ChangeLog", "LDAP_SASLAUTHD", "NEWS", "README"]:
        pisitools.newdoc("saslauthd/%s" % doc, "saslauthd/%s" % doc)

    pisitools.dohtml("doc/*.html")
    pisitools.dodoc("AUTHORS", "COPYING", "ChangeLog", "NEWS", "README", "doc/TODO", "doc/*.txt")


code:
#!/usr/bin/python

import os

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    if not os.path.exists("/etc/sasl2/sasldb2"):
        os.system("/usr/sbin/saslpasswd2 -f /etc/sasl2/sasldb2 -p login")
        os.system("/usr/sbin/saslpasswd2 -f /etc/sasl2/sasldb2 -d login")

    os.system("/bin/chown root:mail /etc/sasl2/sasldb2")
    os.system("/bin/chmod 0640 /etc/sasl2/sasldb2")


code:
# -*- coding: utf-8 -*-

from comar.service import *

serviceType = "server"
serviceDesc = _({"en": "Cyrus-SASL Daemon",
                 "tr": "Cyrus-SASL Servisi"})
serviceConf = "saslauthd"

SOCKETDIR = "/run/saslauthd"
PIDFILE = "/run/saslauthd/saslauthd.pid"

@synchronized
def start():
    startService(command="/usr/sbin/saslauthd",
                 args="-m %s %s" % (SOCKETDIR, config.get("SASLAUTHD_OPTS", "")),
                 pidfile=PIDFILE,
                 donotify=True)

@synchronized
def stop():
    stopService(pidfile=PIDFILE,
                donotify=True)

def status():
    return isServiceRunning(PIDFILE)


code:
0011_saslauthd_ac_prog_libtool.dpatch by  <fabbe@debian.org>

Enable libtool use.

diff -urNad trunk~/saslauthd/configure.in trunk/saslauthd/configure.in
--- trunk~/saslauthd/configure.in	2006-05-29 22:52:42.000000000 +0300
+++ trunk/saslauthd/configure.in	2006-11-01 23:41:51.000000000 +0200
@@ -25,6 +25,7 @@
 AC_PROG_MAKE_SET
 AC_PROG_LN_S
 AC_PROG_INSTALL
+AC_PROG_LIBTOOL

 dnl Checks for build foo
 CMU_C___ATTRIBUTE__


code:
Author: Matthias Klose <doko@ubuntu.com>
Desription: Fix FTBFS, add $(SASL_DB_LIB) as dependency to libsasldb, and use
it.
--- a/saslauthd/Makefile.am
+++ b/saslauthd/Makefile.am
@@ -16,7 +16,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c
 saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@
 saslauthd_LDADD	= @SASL_KRB_LIB@ \
 		  @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
-		  @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
+		  @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@

 testsaslauthd_SOURCES = testsaslauthd.c utils.c
 testsaslauthd_LDADD = @LIB_SOCKET@
--- a/sasldb/Makefile.am
+++ b/sasldb/Makefile.am
@@ -55,8 +55,8 @@ noinst_LIBRARIES = libsasldb.a

 libsasldb_la_SOURCES = allockey.c sasldb.h
 EXTRA_libsasldb_la_SOURCES = $(extra_common_sources)
-libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND)
-libsasldb_la_LIBADD = $(SASL_DB_BACKEND)
+libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND) $(SASL_DB_LIB)
+libsasldb_la_LIBADD = $(SASL_DB_BACKEND) $(SASL_DB_LIB)

 # Prevent make dist stupidity
 libsasldb_a_SOURCES =


code:
Author: Roberto C. Sanchez <roberto@connexer.com>
Description: Drop gratuitous dependency on krb5support
--- a/cmulocal/sasl2.m4
+++ b/cmulocal/sasl2.m4
@@ -112,9 +112,6 @@ if test "$gssapi" != no; then
   fi

   if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
-    # check for libkrb5support first
-    AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET})
-
     gss_failed=0
     AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1,
                  ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET})


code:
--- a/lib/dlopen.c
+++ b/lib/dlopen.c
@@ -247,105 +247,6 @@ static int _sasl_plugin_load(char *plugi
     return result;
 }

-/* this returns the file to actually open.
- *  out should be a buffer of size PATH_MAX
- *  and may be the same as in. */
-
-/* We'll use a static buffer for speed unless someone complains */
-#define MAX_LINE 2048
-
-static int _parse_la(const char *prefix, const char *in, char *out)
-{
-    FILE *file;
-    size_t length;
-    char line[MAX_LINE];
-    char *ntmp = NULL;
-
-    if(!in || !out || !prefix || out == in) return SASL_BADPARAM;
-
-    /* Set this so we can detect failure */
-    *out = '\0';
-
-    length = strlen(in);
-
-    if (strcmp(in + (length - strlen(LA_SUFFIX)), LA_SUFFIX)) {
-	if(!strcmp(in + (length - strlen(SO_SUFFIX)),SO_SUFFIX)) {
-	    /* check for a .la file */
-	    strcpy(line, prefix);
-	    strcat(line, in);
-	    length = strlen(line);
-	    *(line + (length - strlen(SO_SUFFIX))) = '\0';
-	    strcat(line, LA_SUFFIX);
-	    file = fopen(line, "r");
-	    if(file) {
-		/* We'll get it on the .la open */
-		fclose(file);
-		return SASL_FAIL;
-	    }
-	}
-	strcpy(out, prefix);
-	strcat(out, in);
-	return SASL_OK;
-    }
-
-    strcpy(line, prefix);
-    strcat(line, in);
-
-    file = fopen(line, "r");
-    if(!file) {
-	_sasl_log(NULL, SASL_LOG_WARN,
-		  "unable to open LA file: %s", line);
-	return SASL_FAIL;
-    }
-
-    while(!feof(file)) {
-	if(!fgets(line, MAX_LINE, file)) break;
-	if(line[strlen(line) - 1] != '\n') {
-	    _sasl_log(NULL, SASL_LOG_WARN,
-		      "LA file has too long of a line: %s", in);
-	    return SASL_BUFOVER;
-	}
-	if(line[0] == '\n' || line[0] == '#') continue;
-	if(!strncmp(line, "dlname=", sizeof("dlname=") - 1)) {
-	    /* We found the line with the name in it */
-	    char *end;
-	    char *start;
-	    size_t len;
-	    end = strrchr(line, '\'');
-	    if(!end) continue;
-	    start = &line[sizeof("dlname=")-1];
-	    len = strlen(start);
-	    if(len > 3 && start[0] == '\'') {
-		ntmp=&start[1];
-		*end='\0';
-		/* Do we have dlname="" ? */
-		if(ntmp == end) {
-		    _sasl_log(NULL, SASL_LOG_DEBUG,
-			      "dlname is empty in .la file: %s", in);
-		    return SASL_FAIL;
-		}
-		strcpy(out, prefix);
-		strcat(out, ntmp);
-	    }
-	    break;
-	}
-    }
-    if(ferror(file) || feof(file)) {
-	_sasl_log(NULL, SASL_LOG_WARN,
-		  "Error reading .la: %s\n", in);
-	fclose(file);
-	return SASL_FAIL;
-    }
-    fclose(file);
-
-    if(!(*out)) {
-	_sasl_log(NULL, SASL_LOG_WARN,
-		  "Could not find a dlname line in .la file: %s", in);
-	return SASL_FAIL;
-    }
-
-    return SASL_OK;
-}
 #endif /* DO_DLOPEN */

 /* loads a plugin library */
@@ -499,18 +400,18 @@ int _sasl_load_plugins(const add_plugin_
 		if (length + pos>=PATH_MAX) continue; /* too big */

 		if (strcmp(dir->d_name + (length - strlen(SO_SUFFIX)),
-			   SO_SUFFIX)
-		    && strcmp(dir->d_name + (length - strlen(LA_SUFFIX)),
-			   LA_SUFFIX))
+			   SO_SUFFIX))
 		    continue;

+		/* We only use .so files for loading plugins */
+
 		memcpy(name,dir->d_name,length);
 		name[length]='\0';

-		result = _parse_la(prefix, name, tmp);
-		if(result != SASL_OK)
-		    continue;
-
+		/* Create full name with path */
+		strncpy(tmp, prefix, PATH_MAX);
+		strncat(tmp, name, PATH_MAX);
+
 		/* skip "lib" and cut off suffix --
 		   this only need be approximate */
 		strcpy(plugname, name + 3);


code:
From dedad73e5e7a75d01a5f3d5a6702ab8ccd2ff40d Mon Sep 17 00:00:00 2001
From: mancha <mancha1@hush.com>
Date: Thu, 11 Jul 2013 09:08:07 +0000
Subject: Handle NULL returns from glibc 2.17+ crypt()

Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL
(w/ NULL return) if the salt violates specifications. Additionally,
on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords
passed to crypt() fail with EPERM (w/ NULL return).

When using glibc's crypt(), check return value to avoid a possible
NULL pointer dereference.

Patch by mancha1@hush.com.
---
diff --git a/pwcheck/pwcheck_getpwnam.c b/pwcheck/pwcheck_getpwnam.c
index 4b34222..400289c 100644
--- a/pwcheck/pwcheck_getpwnam.c
+++ b/pwcheck/pwcheck_getpwnam.c
@@ -32,6 +32,7 @@ char *userid;
 char *password;
 {
     char* r;
+    char* crpt_passwd;
     struct passwd *pwd;

     pwd = getpwnam(userid);
@@ -41,7 +42,7 @@ char *password;
     else if (pwd->pw_passwd[0] == '*') {
 	r = "Account disabled";
     }
-    else if (strcmp(pwd->pw_passwd, crypt(password, pwd->pw_passwd)) != 0) {
+    else if (!(crpt_passwd = crypt(password, pwd->pw_passwd)) || strcmp(pwd->pw_passwd, (const char *)crpt_passwd) != 0) {
 	r = "Incorrect password";
     }
     else {
diff --git a/pwcheck/pwcheck_getspnam.c b/pwcheck/pwcheck_getspnam.c
index 2b11286..6d607bb 100644
--- a/pwcheck/pwcheck_getspnam.c
+++ b/pwcheck/pwcheck_getspnam.c
@@ -32,13 +32,15 @@ char *userid;
 char *password;
 {
     struct spwd *pwd;
+    char *crpt_passwd;

     pwd = getspnam(userid);
     if (!pwd) {
 	return "Userid not found";
     }

-    if (strcmp(pwd->sp_pwdp, crypt(password, pwd->sp_pwdp)) != 0) {
+    crpt_passwd = crypt(password, pwd->sp_pwdp);
+    if (!crpt_passwd || strcmp(pwd->sp_pwdp, (const char *)crpt_passwd) != 0) {
 	return "Incorrect password";
     }
     else {
diff --git a/saslauthd/auth_getpwent.c b/saslauthd/auth_getpwent.c
index fc8029d..d4ebe54 100644
--- a/saslauthd/auth_getpwent.c
+++ b/saslauthd/auth_getpwent.c
@@ -77,6 +77,7 @@ auth_getpwent (
 {
     /* VARIABLES */
     struct passwd *pw;			/* pointer to passwd file entry */
+    char *crpt_passwd;			/* encrypted password */
     int errnum;
     /* END VARIABLES */

@@ -105,7 +106,8 @@ auth_getpwent (
 	}
     }

-    if (strcmp(pw->pw_passwd, (const char *)crypt(password, pw->pw_passwd))) {
+    crpt_passwd = crypt(password, pw->pw_passwd);
+    if (!crpt_passwd || strcmp(pw->pw_passwd, (const char *)crpt_passwd)) {
 	if (flags & VERBOSE) {
 	    syslog(LOG_DEBUG, "DEBUG: auth_getpwent: %s: invalid password", login);
 	}
diff --git a/saslauthd/auth_shadow.c b/saslauthd/auth_shadow.c
index 677131b..1988afd 100644
--- a/saslauthd/auth_shadow.c
+++ b/saslauthd/auth_shadow.c
@@ -210,8 +210,8 @@ auth_shadow (
 	RETURN("NO Insufficient permission to access NIS authentication database (saslauthd)");
     }

-    cpw = strdup((const char *)crypt(password, sp->sp_pwdp));
-    if (strcmp(sp->sp_pwdp, cpw)) {
+    cpw = crypt(password, sp->sp_pwdp);
+    if (!cpw || strcmp(sp->sp_pwdp, (const char *)cpw)) {
 	if (flags & VERBOSE) {
 	    /*
 	     * This _should_ reveal the SHADOW_PW_LOCKED prefix to an
@@ -221,10 +221,8 @@ auth_shadow (
 	    syslog(LOG_DEBUG, "DEBUG: auth_shadow: pw mismatch: '%s' != '%s'",
 		   sp->sp_pwdp, cpw);
 	}
-	free(cpw);
 	RETURN("NO Incorrect password");
     }
-    free(cpw);

     /*
      * The following fields will be set to -1 if:
@@ -286,7 +284,7 @@ auth_shadow (
 	RETURN("NO Invalid username");
     }

-    if (strcmp(upw->upw_passwd, crypt(password, upw->upw_passwd)) != 0) {
+    if (!(cpw = crypt(password, upw->upw_passwd)) || (strcmp(upw->upw_passwd, (const char *)cpw) != 0)) {
 	if (flags & VERBOSE) {
 	    syslog(LOG_DEBUG, "auth_shadow: pw mismatch: %s != %s",
 		   password, upw->upw_passwd);
--
cgit v0.9.2


code:
--- cyrus-sasl-2.1.20/saslauthd/saslauthd.mdoc	2005-05-06 16:05:44.000000000 -0400
+++ cyrus-sasl-2.1.20/saslauthd/saslauthd.mdoc	2005-05-06 16:05:39.000000000 -0400
@@ -216,7 +216,7 @@
 .Em (All platforms that support OpenLDAP 2.0 or higher)
 .Pp
 Authenticate against an ldap server.  The ldap configuration parameters are
-read from /usr/local/etc/saslauthd.conf.  The location of this file can be
+read from /etc/saslauthd.conf.  The location of this file can be
 changed with the -O parameter. See the LDAP_SASLAUTHD file included with the
 distribution for the list of available parameters.
 .It Li sia
@@ -249,7 +249,7 @@
 .Bl -tag -width "/run/saslauthd/mux"
 .It Pa /run/saslauthd/mux
 The default communications socket.
-.It Pa /usr/local/etc/saslauthd.conf
+.It Pa /etc/saslauthd.conf
 The default configuration file for ldap support.
 .El
 .Sh SEE ALSO


code:
Prefer types in <inttypes.h> to our own, because it removes file content
conflicts between 32- and 64-bit architectures.  RFEd as #2829.

--- cyrus-sasl-2.1.21/configure.in	2006-05-16 07:37:52.000000000 -0400
+++ cyrus-sasl-2.1.21/configure.in	2006-05-16 07:37:52.000000000 -0400
@@ -1083,6 +1083,10 @@
 AC_HEADER_DIRENT
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h)
+AC_CHECK_TYPES([long long, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t],,,[
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif])

 IPv6_CHECK_SS_FAMILY()
 IPv6_CHECK_SA_LEN()
--- cyrus-sasl-2.1.21/include/makemd5.c	2003-02-13 14:55:52.000000000 -0500
+++ cyrus-sasl-2.1.21/include/makemd5.c	2006-05-16 07:45:08.000000000 -0400
@@ -82,12 +82,19 @@
  */

+#ifdef HAVE_CONFIG_H
+#include "../config.h"
+#endif

 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>

+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+

 static void
 my_strupr(char *s)
@@ -122,6 +129,18 @@
 static void
 try_signed(FILE *f, int len)
 {
+#ifdef HAVE_INT8_T
+    BITSIZE(int8_t);
+#endif
+#ifdef HAVE_INT16_T
+    BITSIZE(int16_t);
+#endif
+#ifdef HAVE_INT32_T
+    BITSIZE(int32_t);
+#endif
+#ifdef HAVE_INT64_T
+    BITSIZE(int64_t);
+#endif
     BITSIZE(signed char);
     BITSIZE(short);
     BITSIZE(int);
@@ -135,6 +154,18 @@
 static void
 try_unsigned(FILE *f, int len)
 {
+#ifdef HAVE_UINT8_T
+    BITSIZE(uint8_t);
+#endif
+#ifdef HAVE_UINT16_T
+    BITSIZE(uint16_t);
+#endif
+#ifdef HAVE_UINT32_T
+    BITSIZE(uint32_t);
+#endif
+#ifdef HAVE_UINT64_T
+    BITSIZE(uint64_t);
+#endif
     BITSIZE(unsigned char);
     BITSIZE(unsigned short);
     BITSIZE(unsigned int);
@@ -165,6 +196,11 @@
 	  "/* POINTER defines a generic pointer type */\n"
 	  "typedef unsigned char *POINTER;\n"
 	  "\n"
+#ifdef HAVE_INTTYPES_H
+	  "/* We try to define integer types for our use */\n"
+	  "#include <inttypes.h>\n"
+	  "\n"
+#endif
 	  );
   return 1;
 }
@@ -212,31 +248,15 @@

   print_pre(f);

-#ifndef HAVE_INT8_T
     try_signed (f, 8);
-#endif /* HAVE_INT8_T */
-#ifndef HAVE_INT16_T
     try_signed (f, 16);
-#endif /* HAVE_INT16_T */
-#ifndef HAVE_INT32_T
     try_signed (f, 32);
-#endif /* HAVE_INT32_T */
-#ifndef HAVE_INT64_T
     try_signed (f, 64);
-#endif /* HAVE_INT64_T */

-#ifndef HAVE_U_INT8_T
     try_unsigned (f, 8);
-#endif /* HAVE_INT8_T */
-#ifndef HAVE_U_INT16_T
     try_unsigned (f, 16);
-#endif /* HAVE_U_INT16_T */
-#ifndef HAVE_U_INT32_T
     try_unsigned (f, 32);
-#endif /* HAVE_U_INT32_T */
-#ifndef HAVE_U_INT64_T
     try_unsigned (f, 64);
-#endif /* HAVE_U_INT64_T */

     print_post(f);


code:
--- saslauthd/configure.in.orig	2006-05-23 15:53:17.000000000 -0700
+++ saslauthd/configure.in	2006-05-23 15:53:33.000000000 -0700
@@ -77,7 +77,7 @@
   AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
   SASL_DB_PATH_CHECK()
   SASL_DB_CHECK()
-  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
+  SASL_DB_LIB="../sasldb/.libs/libsasldb.a $SASL_DB_LIB"
 fi

 AC_ARG_ENABLE(httpform, [  --enable-httpform       enable HTTP form authentication [[no]] ],


code:
diff -up cyrus-sasl-2.1.22/config/kerberos_v4.m4.krb4 cyrus-sasl-2.1.22/config/kerberos_v4.m4
--- cyrus-sasl-2.1.22/config/kerberos_v4.m4.krb4	2005-05-07 06:14:55.000000000 +0200
+++ cyrus-sasl-2.1.22/config/kerberos_v4.m4	2008-08-14 23:41:26.000000000 +0200
@@ -102,7 +102,6 @@ AC_DEFUN([SASL_KERBEROS_V4_CHK], [
        if test -n "${cyrus_krbinclude}"; then
          CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
        fi
-       LDFLAGS="$LDFLAGS -L$krb4/lib"
     fi

     if test "$with_des" != no; then
diff -up cyrus-sasl-2.1.22/plugins/kerberos4.c.krb4 cyrus-sasl-2.1.22/plugins/kerberos4.c
--- cyrus-sasl-2.1.22/plugins/kerberos4.c.krb4	2005-01-10 08:08:53.000000000 +0100
+++ cyrus-sasl-2.1.22/plugins/kerberos4.c	2008-08-14 23:36:33.000000000 +0200
@@ -49,11 +49,7 @@
 #include <krb.h>

 #ifdef WITH_DES
-# ifdef WITH_SSL_DES
-#  include <openssl/des.h>
-# else
 #  include <des.h>
-# endif /* WITH_SSL_DES */
 #endif /* WITH_DES */

 #ifdef WIN32


code:
commit c9447e1c3ffba88783e5d9396b832be82d3c78fc
Author: Kazuo Ito <ito.kazuo@oss.ntt.co.jp>
Date:   Wed Dec 10 12:03:29 2008 +0900

    support for LDAP_OPT_TIMEOUT

    OpenLDAP since 2.4 implements support for this option in ldap_result(),
    among other things.

diff --git a/saslauthd/lak.c b/saslauthd/lak.c
index 803d51f..8714265 100644
--- a/saslauthd/lak.c
+++ b/saslauthd/lak.c
@@ -833,6 +833,11 @@ static int lak_connect(
 		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_NETWORK_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
 	}

+	rc = ldap_set_option(lak->ld, LDAP_OPT_TIMEOUT, &(lak->conf->timeout));
+	if (rc != LDAP_OPT_SUCCESS) {
+		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
+	}
+
 	rc = ldap_set_option(lak->ld, LDAP_OPT_TIMELIMIT, &(lak->conf->time_limit));
 	if (rc != LDAP_OPT_SUCCESS) {
 		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMELIMIT %d.", lak->conf->time_limit);


code:
fix missing prototype warnings

--- cyrus-sasl-2.1.22/lib/auxprop.c
+++ cyrus-sasl-2.1.22/lib/auxprop.c
@@ -43,6 +43,7 @@
  */

 #include <config.h>
+#include <stdio.h>
 #include <sasl.h>
 #include <prop.h>
 #include <ctype.h>
--- cyrus-sasl-2.1.22/pwcheck/pwcheck_getspnam.c
+++ cyrus-sasl-2.1.22/pwcheck/pwcheck_getspnam.c
@@ -24,6 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERF
 ******************************************************************/

 #include <shadow.h>
+#include <string.h>

 extern char *crypt();


code:
diff -up cyrus-sasl-2.1.23/mac/libdes/src/des_crypt.man cyrus-sasl-2.1.23/mac/libdes/src/des_crypt
diff -up cyrus-sasl-2.1.23/mac/libdes/src/des.man cyrus-sasl-2.1.23/mac/libdes/src/des
diff -up cyrus-sasl-2.1.23/man/Makefile.am.man cyrus-sasl-2.1.23/man/Makefile.am
--- cyrus-sasl-2.1.23/man/Makefile.am.man	2010-02-05 10:40:17.000000000 +0100
+++ cyrus-sasl-2.1.23/man/Makefile.am	2010-02-05 10:40:47.000000000 +0100
@@ -54,6 +54,6 @@ man_MANS = sasl_authorize_t.3 sasl_done.
 	   sasl_auxprop_getctx.3 sasl_auxprop.3 sasl_idle.3 \
 	   sasl_errdetail.3 sasl_user_exists.3 sasl_setpass.3 \
 	   sasl_server_userdb_checkpass_t.3 sasl_server_userdb_setpass_t.3 \
-	   sasl_global_listmech.3 sasl_getconfpath_t.3
+	   sasl_global_listmech.3 sasl_getconfpath_t.3 testsaslauthd.8

 EXTRA_DIST = $(man_MANS)
diff -up cyrus-sasl-2.1.23/man/testsaslauthd.8.man cyrus-sasl-2.1.23/man/testsaslauthd.8
--- cyrus-sasl-2.1.23/man/testsaslauthd.8.man	2010-02-05 10:40:07.000000000 +0100
+++ cyrus-sasl-2.1.23/man/testsaslauthd.8	2010-02-05 09:48:43.000000000 +0100
@@ -0,0 +1,20 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.TH TESTSASLAUTHD 8 "14 October 2006"
+.SH NAME
+testsaslauthd \- test utility for the SASL authentication server
+.SH SYNOPSIS
+.B testsaslauthd
+.RI "[ " \(hyr " " realm " ] [ " \(hys " " servicename " ] [ " \(hyf " " socket " " path " ] [ " \(hyR " " repeatnum " ]"
+.SH DESCRIPTION
+This manual page documents briefly the
+.B testsaslauthd
+command.
+.PP
+.SH SEE ALSO
+.BR saslauthd (8).
+.br
+.SH AUTHOR
+testsaslauthd was written by Carnegie Mellon University.
+.PP
+This manual page was written by Roberto C. Sanchez <roberto@connexer.com>,
+for the Debian project (but may be used by others).


code:
diff --git a/cmulocal/sasl2.m4 b/cmulocal/sasl2.m4
index 3c2841a..b086b8f 100644
--- a/cmulocal/sasl2.m4
+++ b/cmulocal/sasl2.m4
@@ -269,6 +269,18 @@ if test "$gssapi" != no; then
   cmu_save_LIBS="$LIBS"
   LIBS="$LIBS $GSSAPIBASE_LIBS"
   AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
+  if test "$ac_cv_func_gsskrb5_register_acceptor_identity" = no ; then
+    AC_CHECK_HEADERS(gssapi/gssapi_krb5.h)
+    if test "$ac_cv_header_gssapi_gssapi_krb5_h" = "yes"; then
+      AC_CHECK_DECL(gsskrb5_register_acceptor_identity,
+                    [AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY,1,
+                               [Define if your GSSAPI implementation defines gsskrb5_register_acceptor_identity])],,
+                    [
+                    AC_INCLUDES_DEFAULT
+                    #include <gssapi/gssapi_krb5.h>
+                    ])
+    fi
+  fi
   AC_CHECK_FUNCS(gss_decapsulate_token)
   AC_CHECK_FUNCS(gss_encapsulate_token)
   AC_CHECK_FUNCS(gss_oid_equal)
diff --git a/plugins/gssapi.c b/plugins/gssapi.c
index 6be9d23..e6fcf46 100644
--- a/plugins/gssapi.c
+++ b/plugins/gssapi.c
@@ -51,6 +51,8 @@
 #include <gssapi/gssapi.h>
 #endif

+#include <gssapi/gssapi_krb5.h>
+
 #ifdef WIN32
 #  include <winsock2.h>


code:
--- cmulocal/cyrus.m4~	2014-01-09 11:31:10.423302394 +0100
+++ cmulocal/cyrus.m4	2014-01-09 11:31:56.823302243 +0100
@@ -32,14 +32,5 @@
 dnl runpath initialization
 AC_DEFUN([CMU_GUESS_RUNPATH_SWITCH], [
    # CMU GUESS RUNPATH SWITCH
-  AC_CACHE_CHECK(for runpath switch, andrew_cv_runpath_switch, [
-    # first, try -R
-    SAVE_LDFLAGS="${LDFLAGS}"
-    LDFLAGS="-R /usr/lib"
-    AC_TRY_LINK([],[],[andrew_cv_runpath_switch="-R"], [
-  	LDFLAGS="-Wl,-rpath,/usr/lib"
-    AC_TRY_LINK([],[],[andrew_cv_runpath_switch="-Wl,-rpath,"],
-    [andrew_cv_runpath_switch="none"])
-    ])
-  LDFLAGS="${SAVE_LDFLAGS}"
-  ])])
+    andrew_runpath_switch="none"
+  ])


code:
diff --git a/configure.in b/configure.in
index e70c99a..60f366c 100644
--- a/configure.in
+++ b/configure.in
@@ -1416,7 +1416,7 @@ inline static unsigned int sleep(unsigned int seconds) {
 #endif /* CONFIG_H */
 ])

-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)

 AC_OUTPUT(Makefile
 libsasl2.pc


code:
commit 26dcfb2d7176b78e70757aa5d01951a28ca217c7
Author: Alexey Melnikov <alexey.melnikov@isode.com>
Date:   Fri Jul 5 16:37:59 2013 +0100

    Treat SCRAM-SHA-1/DIGEST-MD5 as more secure than PLAIN when selecting the best client side SASL mechanism

    Both SCRAM-SHA-1 & DIGEST-MD5 are lacking SASL_SEC_PASS_CREDENTIALS security
    flag, which prevented them from being chosen over PLAIN when PLAIN is selected
    as the best mechanism first. For example the problem can be observed when
    the server advertises "PLAIN DIGEST-MD5 SCRAM-SHA-1" (PLAIN just has to be
    returned before SCRAM/DIGEST.)

    Cyrus SASL bug # 3793

diff --git a/lib/client.c b/lib/client.c
index 62dfb0b..31fe346 100644
--- a/lib/client.c
+++ b/lib/client.c
@@ -658,6 +658,20 @@ _sasl_cbinding_disp(sasl_client_params_t *cparams,
     return SASL_OK;
 }

+static int
+_sasl_are_current_security_flags_worse_then_best(unsigned best_security_flags,
+						 unsigned current_security_flags)
+{
+    /* We don't qualify SASL_SEC_PASS_CREDENTIALS as "secure" flag */
+    best_security_flags &= ~SASL_SEC_PASS_CREDENTIALS;
+
+    if ((current_security_flags ^ best_security_flags) & best_security_flags) {
+	return 1;
+    } else {
+	return 0;
+    }
+}
+
 /* select a mechanism for a connection
  *  mechlist      -- mechanisms server has available (punctuation ignored)
  *  secret        -- optional secret from previous session
@@ -823,8 +837,9 @@ int sasl_client_start(sasl_conn_t *conn,
 	     */

 	    if (bestm &&
-		((m->m.plug->security_flags ^ bestm->m.plug->security_flags) &
-		 bestm->m.plug->security_flags)) {
+		_sasl_are_current_security_flags_worse_then_best(
+		    bestm->m.plug->security_flags,
+		    m->m.plug->security_flags)) {
 		break;
 	    }


code:
diff -up cyrus-sasl-2.1.26/lib/Makefile.am.relro cyrus-sasl-2.1.26/lib/Makefile.am
--- cyrus-sasl-2.1.26/lib/Makefile.am.relro	2012-10-12 16:05:48.000000000 +0200
+++ cyrus-sasl-2.1.26/lib/Makefile.am	2013-02-11 14:18:01.749053772 +0100
@@ -64,7 +64,7 @@ LIB_DOOR= @LIB_DOOR@
 lib_LTLIBRARIES = libsasl2.la

 libsasl2_la_SOURCES = $(common_sources) $(common_headers)
-libsasl2_la_LDFLAGS = -version-info $(sasl_version)
+libsasl2_la_LDFLAGS = -Wl,-z,relro -version-info $(sasl_version)
 libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
 libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)

diff -up cyrus-sasl-2.1.26/lib/Makefile.in.relro cyrus-sasl-2.1.26/lib/Makefile.in
--- cyrus-sasl-2.1.26/lib/Makefile.in.relro	2013-11-13 16:55:09.606555125 +0100
+++ cyrus-sasl-2.1.26/lib/Makefile.in	2013-11-13 16:56:43.331096795 +0100
@@ -330,7 +330,7 @@ common_headers = saslint.h
 common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c dlopen.c ../plugins/plugin_common.c
 lib_LTLIBRARIES = libsasl2.la
 libsasl2_la_SOURCES = $(common_sources) $(common_headers)
-libsasl2_la_LDFLAGS = -version-info $(sasl_version)
+libsasl2_la_LDFLAGS = -Wl,-z,relro -version-info $(sasl_version)
 libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
 libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
 @MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
diff -up cyrus-sasl-2.1.26/plugins/Makefile.am.relro cyrus-sasl-2.1.26/plugins/Makefile.am
--- cyrus-sasl-2.1.26/plugins/Makefile.am.relro	2012-10-12 16:05:48.000000000 +0200
+++ cyrus-sasl-2.1.26/plugins/Makefile.am	2013-02-11 14:18:01.749053772 +0100
@@ -50,7 +50,7 @@
 plugin_version = 3:0:0

 INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
-AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
+AM_LDFLAGS = -Wl,-z,relro -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)

 COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@

diff -up cyrus-sasl-2.1.26/plugins/Makefile.in.relro cyrus-sasl-2.1.26/plugins/Makefile.in
--- cyrus-sasl-2.1.26/plugins/Makefile.in.relro	2013-11-13 16:57:08.430974081 +0100
+++ cyrus-sasl-2.1.26/plugins/Makefile.in	2013-11-13 16:57:58.911727846 +0100
@@ -364,7 +364,7 @@ top_srcdir = @top_srcdir@
 # CURRENT:REVISION:AGE
 plugin_version = 3:0:0
 INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
-AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
+AM_LDFLAGS = -Wl,-z,relro -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
 COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
 EXTRA_DIST = makeinit.sh NTMakefile
 noinst_SCRIPTS = makeinit.sh
diff -up cyrus-sasl-2.1.26/saslauthd/Makefile.am.relro cyrus-sasl-2.1.26/saslauthd/Makefile.am
--- cyrus-sasl-2.1.26/saslauthd/Makefile.am.relro	2013-02-11 14:18:36.910900647 +0100
+++ cyrus-sasl-2.1.26/saslauthd/Makefile.am	2013-02-11 14:20:17.336463915 +0100
@@ -17,6 +17,7 @@ saslauthd_DEPENDENCIES = saslauthd-main.
 saslauthd_LDADD	= @SASL_KRB_LIB@ \
 		  @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
 		  @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
+saslauthd_LDFLAGS = -pie -Wl,-z,now

 testsaslauthd_SOURCES = testsaslauthd.c utils.c
 testsaslauthd_LDADD = @LIB_SOCKET@


code:
diff -up cyrus-sasl-2.1.26/include/sasl.h.size_t cyrus-sasl-2.1.26/include/sasl.h
--- cyrus-sasl-2.1.26/include/sasl.h.size_t	2012-10-12 09:05:48.000000000 -0500
+++ cyrus-sasl-2.1.26/include/sasl.h	2013-01-31 13:21:04.007739327 -0600
@@ -223,6 +223,8 @@ extern "C" {
  * they must be called before all other SASL functions:
  */

+#include <sys/types.h>
+
 /* memory allocation functions which may optionally be replaced:
  */
 typedef void *sasl_malloc_t(size_t);


code:
diff -up cyrus-sasl-2.1.26/lib/server.c.warnings cyrus-sasl-2.1.26/lib/server.c
--- cyrus-sasl-2.1.26/lib/server.c.warnings	2012-10-12 16:05:48.000000000 +0200
+++ cyrus-sasl-2.1.26/lib/server.c	2012-12-20 17:49:39.620254792 +0100
@@ -650,7 +650,7 @@ static int load_config(const sasl_callba
             goto done;
         }

-        snprintf(config_filename, len, "%.*s%c%s.conf", path_len, path_to_config,
+        snprintf(config_filename, len, "%.*s%c%s.conf", (int)path_len, path_to_config,
 	        HIER_DELIMITER, global_callbacks.appname);

         /* Ask the application if it's safe to use this file */
diff -up cyrus-sasl-2.1.26/plugins/gssapi.c.warnings cyrus-sasl-2.1.26/plugins/gssapi.c
--- cyrus-sasl-2.1.26/plugins/gssapi.c.warnings	2012-01-28 00:31:36.000000000 +0100
+++ cyrus-sasl-2.1.26/plugins/gssapi.c	2012-12-20 17:49:39.620254792 +0100
@@ -202,7 +202,8 @@ sasl_gss_seterror_(const sasl_utils_t *u
     OM_uint32 msg_ctx;
     int ret;
     char *out = NULL;
-    size_t len, curlen = 0;
+    size_t len;
+    unsigned curlen = 0;
     const char prefix[] = "GSSAPI Error: ";

     if (!utils) return SASL_OK;
diff -up cyrus-sasl-2.1.26/plugins/ldapdb.c.warnings cyrus-sasl-2.1.26/plugins/ldapdb.c
--- cyrus-sasl-2.1.26/plugins/ldapdb.c.warnings	2012-01-28 00:31:36.000000000 +0100
+++ cyrus-sasl-2.1.26/plugins/ldapdb.c	2012-12-20 17:49:39.621254788 +0100
@@ -22,6 +22,7 @@

 #include "plugin_common.h"

+#define LDAP_DEPRECATED 1
 #include <ldap.h>

 static char ldapdb[] = "ldapdb";
diff -up cyrus-sasl-2.1.26/plugins/plugin_common.c.warnings cyrus-sasl-2.1.26/plugins/plugin_common.c
--- cyrus-sasl-2.1.26/plugins/plugin_common.c.warnings	2013-09-03 14:40:35.181455452 +0200
+++ cyrus-sasl-2.1.26/plugins/plugin_common.c	2013-09-03 14:40:38.320441024 +0200
@@ -94,7 +94,7 @@ static void sockaddr_unmapped(
     if (!IN6_IS_ADDR_V4MAPPED((&sin6->sin6_addr)))
 	return;
     sin4 = (struct sockaddr_in *)sa;
-    addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
+    addr = *(uint32_t *)&sin6->sin6_addr.s6_addr32[3];
     port = sin6->sin6_port;
     memset(sin4, 0, sizeof(struct sockaddr_in));
     sin4->sin_addr.s_addr = addr;
diff -up cyrus-sasl-2.1.26/saslauthd/auth_httpform.c.warnings cyrus-sasl-2.1.26/saslauthd/auth_httpform.c
--- cyrus-sasl-2.1.26/saslauthd/auth_httpform.c.warnings	2012-10-12 16:05:48.000000000 +0200
+++ cyrus-sasl-2.1.26/saslauthd/auth_httpform.c	2013-09-03 14:39:25.411776109 +0200
@@ -574,7 +574,7 @@ auth_httpform (
               "Content-Type: application/x-www-form-urlencoded" CRLF
               "Content-Length: %d" TWO_CRLF
               "%s",
-              r_uri, r_host, r_port, strlen(req), req);
+              r_uri, r_host, r_port, (int)strlen(req), req);

     if (flags & VERBOSE) {
         syslog(LOG_DEBUG, "auth_httpform: sending %s %s %s",
diff -up cyrus-sasl-2.1.26/saslauthd/auth_shadow.c.warnings cyrus-sasl-2.1.26/saslauthd/auth_shadow.c
--- cyrus-sasl-2.1.26/saslauthd/auth_shadow.c.warnings	2012-10-12 16:05:48.000000000 +0200
+++ cyrus-sasl-2.1.26/saslauthd/auth_shadow.c	2012-12-20 17:49:39.621254788 +0100
@@ -70,6 +70,10 @@
 #  include <shadow.h>
 # endif /* ! HAVE_GETUSERPW */

+# ifdef HAVE_CRYPT_H
+#  include <crypt.h>
+# endif
+
 # include "auth_shadow.h"
 # include "globals.h"
 /* END PUBLIC DEPENDENCIES */


code:
# Specify the authentications mechanism.
# List: getpwent,kerberos5,pam,rimap,shadow,ldap
# *NOTE* For actual list see: saslauthd -v
SASLAUTHD_OPTS="-a pam"

# Specify the hostname for remote IMAP server.
# *NOTE* Only needed if rimap auth mech is used.
#SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -O localhost"

# Specify the number of worker processes to create.
#SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -n 5"

# Enable credential cache, cache size, and timeout.
# *NOTE* Size is measured in kilobytes
#        Timeout is measured in seconds
#SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -c -s 128 -t 30"


code:
#%PAM-1.0

auth       required     pam_nologin.so
auth       include      system-auth
account    include      system-auth
session    include      system-auth


code: d /run/saslauthd 0755 root root - -


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>cyrus-sasl</Name>
        <Homepage>http://asg.web.cmu.edu/sasl/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>as-is</License>
        <IsA>library</IsA>
        <IsA>service</IsA>
        The Cyrus SASL (Simple Authentication and Security Layer)
        <Description>cyrus-sasl is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols. To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating protection of subsequent protocol interactions.</Description>
        <Archive sha1sum="d6669fb91434192529bd13ee95737a8a5040241c" type="targz">http://cyrusimap.org/releases/cyrus-sasl-2.1.26.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>mit-kerberos</Dependency>
            <Dependency>pam-devel</Dependency>
            <Dependency>gdbm-devel</Dependency>
            <Dependency>e2fsprogs-devel</Dependency>
            <Dependency>openssl-devel</Dependency>
            <Dependency>groff</Dependency>
        </BuildDependencies>
        <Patches>

            <Patch level="1">CVE-2013-4122.patch</Patch>
            <Patch level="1">0011_saslauthd_ac_prog_libtool.patch</Patch>
            <Patch level="1">0025_ld_as_needed.patch</Patch>
            <Patch level="1">0026_drop_krb5support_dependency.patch</Patch>
            <Patch level="1">0030-dont_use_la_files_for_opening_plugins.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.20-saslauthd.conf-path.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.21-sizes.patch</Patch>
            <Patch level="0">cyrus-sasl-2.1.22-as-needed.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.22-qa.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.22-kerberos4.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.22-ldap-timeout.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.23-man.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.26-keytab.patch</Patch>
            <Patch level="0">cyrus-sasl-2.1.26-no_rpath.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.26-obsolete-macro.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.26-prefer-SCRAM-SHA-1-over-PLAIN.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.26-relro.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.26-size_t.patch</Patch>
            <Patch level="1">cyrus-sasl-2.1.26-warnings.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>cyrus-sasl</Name>
        <RuntimeDependencies>

            <Dependency>mit-kerberos</Dependency>
            <Dependency>pam</Dependency>
            <Dependency>gdbm</Dependency>
            <Dependency>e2fsprogs</Dependency>
            <Dependency>openssl</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="config">/usr/lib/tmpfiles.d/cyrus-sasl.conf</Path>
            <Path fileType="executable">/usr/sbin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="data">/usr/share/cyrus-sasl-2</Path>
            <Path fileType="data">/run</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile target="/etc/conf.d/saslauthd" permission="0644" owner="root">saslauthd.confd</AdditionalFile>
            <AdditionalFile target="/etc/pam.d/saslauthd" permission="0644" owner="root">saslauthd.pam</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/cyrus-sasl.conf">tmpfiles.conf</AdditionalFile>
        </AdditionalFiles>
        <Provides>
            <COMAR script="service.py">System.Service</COMAR>
            <COMAR script="package.py">System.Package</COMAR>
        </Provides>
    </Package>

    <Package>
        <Name>cyrus-sasl-devel</Name>
        Development files for cyrus-sasl
        <RuntimeDependencies>
            <Dependency release="current">cyrus-sasl</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
            <Path fileType="doc">/usr/share/doc/cyrus-sasl/*.txt</Path>
            <Path fileType="man">/usr/share/man/man3</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-19</Date>
            <Version>2.1.26</Version>
            <Comment>Rebuild.</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>2.1.26</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-07-05</Date>
            <Version>2.1.26</Version>
            <Comment>First release</Comment>
            <Name>Marcin Bojara</Name>
            <Email>marcin@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>cyrus-sasl</Name>
        Cyrus basit kimlik tanımlama ve güvenlik katmanı
        <Description xml:lang="tr">Cyrus-sasl, bağlantı tabanlı protokoller için kullanılan bir kimlik doğrulama uygulamasıdır. Çoğunlukla Smtp doğrulaması için kullanılır.</Description>
    </Source>

    <Package>
        <Name>cyrus-sasl-devel</Name>
        cyrus-sasl için geliştirme dosyaları
    </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/copyleft/gpl.txt

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

def setup():
    autotools.configure("--prefix=/usr \
                         --sysconfdir=/etc \
                         --with-securedir=/lib/security \
                         --disable-python-bindings \
                         --disable-static")

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

def build():
    autotools.make()

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

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


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libpwquality</Name>
        <Homepage>https://fedorahosted.org/libpwquality/</Homepage>
        <Packager>
            <Name>Osman Erkan</Name>
            <Email>osman.erkan@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>library</IsA>
        Password quality checking
        <Description>The libpwquality package contains a library used for password quality checking and generation of random passwords that pass the checks</Description>
        <Archive sha1sum="a9f2eec48b9a04a836785e18c8b1f5a69d5920f7" type="tarbz2">https://fedorahosted.org/releases/l/i/libpwquality/libpwquality-1.3.0.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>cracklib-devel</Dependency>
            <Dependency>pam-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>libpwquality</Name>
        <RuntimeDependencies>
            <Dependency>cracklib</Dependency>
            <Dependency>pam</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/lib</Path>
            <Path fileType="config">/etc/security</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="man">/usr/share/man/man1</Path>
            <Path fileType="man">/usr/share/man/man3</Path>
            <Path fileType="man">/usr/share/man/man5</Path>
            <Path fileType="man">/usr/share/man/man8</Path>
            <Path fileType="doc">/usr/share/doc/libpwquality</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
            <Path fileType="executable">/usr/bin</Path>
        </Files>
    </Package>

    <Package>
        <Name>libpwquality-devel</Name>
        libpwquality için geliştirme dosyaları
        <RuntimeDependencies>
            <Dependency release="current">libpwquality</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="library">/usr/lib/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-01-26</Date>
            <Version>1.3.0</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.2.4</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-01-23</Date>
            <Version>1.2.4</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>libpwquality</Name>
        Password quality checking
        <Description xml:lang="en">The libpwquality package contains a library used for password quality checking and generation of random passwords that pass the checks.</Description>
    </Source>

    <Package>
        <Name>libpwquality-devel</Name>
        libpwquality için geliştirme dosyaları
    </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
from pisi.actionsapi import shelltools

pisitools.flags.add("-fPIC -fno-strict-aliasing -fno-strict-overflow -fstack-protector-all")
pisitools.cxxflags.add("-I/usr/include/et")

def rename_man_pages():
    manpages = ["appl/bsd/klogind.M",
                "appl/bsd/kshd.M",
                "appl/sample/sserver/sserver.M",
                "appl/telnet/telnetd/telnetd.8",
                "appl/gssftp/ftpd/ftpd.M",
                "config-files/kdc.conf.M",
                "config-files/krb5.conf.M",
                "kadmin/cli/kadmin.M",
                "slave/kpropd.M",
                "slave/kprop.M"]
    for manpage in manpages:
        shelltools.move(manpage, "%s.in" % manpage)

def setup():
    shelltools.cd("src")
    shelltools.system("sed -i -e 's/^YYSTYPE yylval/&={0}/' lib/krb5/krb/deltat.c")
    pisitools.dosed("util/ac_check_krb5.m4", "(KRB5ROOT=\/usr)\/local", r"\1")

    autotools.autoreconf("-fi")

    # Fix pthread linking
    #pisitools.dosed("configure", "-lthread", "-lpthread")
    #pisitools.dosed("configure", "-pthread", "-lpthread")

    autotools.configure("--localstatedir=/var/lib \
                         --without-tcl \
                         --without-hesiod \
                         --enable-shared \
                         --enable-kdc-lookaside-cache \
                         --without-system-verto \
                         --disable-rpath \
                         --with-system-et \
                         --with-system-ss \
                         --enable-dns-for-realm")

    # Fix krb5-config script to remove rpaths and CFLAGS
    #pisitools.dosed("krb5-config", "^CC_LINK=.*", "CC_LINK='$(CC) $(PROG_LIBPATH)'")
    # Fix unused dependency
    pisitools.dosed("config/shlib.conf"," -shared ", " -Wl,--as-needed -shared ")

def build():
    autotools.make("-C src/")

# def check():
   # check failed
   # autotools.make("-C src/ -j1 check")
   # import tempfile
   # import shutil
   # tmpdir = tempfile.mkdtemp(prefix='pisitest')
   # autotools.make("-C src/ check TMPDIR=%s -j1" % tmpdir)
   # shutil.rmtree("rm -rf %s" % tmpdir)

def install():
    pisitools.dodoc("NOTICE", "README")
    shelltools.cd("src")
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    # Install additional headers
    for d in ("kadm5", "krb5"):
        pisitools.insinto("/usr/include/%s" % d, "include/%s/*.h" % d)

    # Add "k" prefix to some apps and manpages to resolve conflicts
    #for app in ["telnetd", "ftpd"]:
     #   pisitools.rename("/usr/share/man/man8/%s.8" % app, "k%s.8" % app)
      #  pisitools.rename("/usr/sbin/%s" % app, "k%s" % app)

    #for app in ["rcp", "rsh", "telnet", "ftp", "rlogin"]:
     #   pisitools.rename("/usr/share/man/man1/%s.1" % app, "k%s.1" % app)
      #  pisitools.rename("/usr/bin/%s" % app, "k%s" % app)

    # Remove examples
    pisitools.removeDir("/usr/share/examples")


code:
--- configure.in.orig	2014-01-16 02:44:15.000000000 +0200
+++ src/configure.in	2014-05-17 17:05:05.317924895 +0300
@@ -1206,9 +1206,9 @@
 # default, so it's not a big deal that it isn't very good.  We should
 # use python-config instead.
 PYTHON_LIB=
-AC_CHECK_HEADERS(Python.h python2.3/Python.h python2.5/Python.h)
-AC_CHECK_LIB(python2.3,main,[PYTHON_LIB=-lpython2.3],
-  AC_CHECK_LIB(python2.5,main,[PYTHON_LIB=-lpython2.5]))
+AC_CHECK_HEADERS(Python.h python2.5/Python.h python2.7/Python.h)
+AC_CHECK_LIB(python2.5,main,[PYTHON_LIB=-lpython2.5],
+  AC_CHECK_LIB(python2.7,main,[PYTHON_LIB=-lpython2.7]))
 AC_SUBST(PYTHON_LIB)


code:
[kdcdefaults]
	kdc_ports = 88,750

[realms]
	EXAMPLE.COM = {
	database_name = /etc/krb5kdc/principal
	admin_keytab = /etc/krb5kdc/kadm5.keytab
	acl_file = /etc/krb5kdc/kadm5.acl
	dict_file = /etc/krb5kdc/kadm5.dict
	key_stash_file = /etc/krb5kdc/.k5.EXAMPLE.COM
	kadmind_port = 749
	max_life = 10h 0m 0s
	max_renewable_life = 7d 0h 0m 0s
	master_key_type = des3-hmac-sha1
	supported_enctypes = des3-hmac-sha1:normal des-cbc-crc:normal
	}


code:
[libdefaults]
	ticket_lifetime = 600
	default_realm = EXAMPLE.COM
	default_tkt_enctypes = des3-hmac-sha1 des-cbc-crc
	default_tgs_enctypes = des3-hmac-sha1 des-cbc-crc

[realms]
	EXAMPLE.COM = {
	kdc = kerberos.example.com:88
	kdc = kerberos2.example.com:88
	admin_server = kerberos.example.com:749
	}

[domain_realm]
	.example.com = EXAMPLE.COM
	example.com = EXAMPLE.COM

[kdc]
	profile = /etc/krb5kdc/kdc.conf

[logging]
	kdc = FILE:/var/log/krb5kdc.log
	admin_server = FILE:/var/log/kadmin.log
	default = FILE:/var/log/krb5lib.log


code:
--- a/src/slave/kprop.c
+++ b/src/slave/kprop.c
@@ -91,7 +91,7 @@ main(argc, argv)
     int     argc;
     char    **argv;
 {
-    int     fd, database_fd, database_size;
+    int     fd = -1, database_fd, database_size;
     krb5_error_code retval;
     krb5_context context;
     krb5_creds *my_creds;
--- a/src/kadmin/ktutil/ktutil_funcs.c
+++ b/src/kadmin/ktutil/ktutil_funcs.c
@@ -64,7 +64,7 @@
     krb5_kt_list *list;
     int idx;
 {
-    krb5_kt_list lp, prev;
+    krb5_kt_list lp, prev = NULL;
     int i;

     for (lp = *list, i = 1; lp; prev = lp, lp = lp->next, i++) {
--- a/src/lib/kadm5/alt_prof.c
+++ b/src/lib/kadm5/alt_prof.c
@@ -164,7 +164,7 @@
     char **values;
     char *valp;
     int idx;
-    krb5_boolean val;
+    krb5_boolean val = 0;

     kret = krb5_aprof_getvals (acontext, hierarchy, &values);
     if (kret)

--- a/src/util/profile/prof_init.c
+++ b/src/util/profile/prof_init.c
@@ -255,7 +255,7 @@ copy_vtable_profile(profile_t profile, profile_t *ret_new_profile)
 {
     errcode_t err;
     void *cbdata;
-    profile_t new_profile;
+    profile_t new_profile = NULL;

     *ret_new_profile = NULL;

--- a/src/tests/asn.1/trval.c   2013-04-12 12:51:36.000000000 -0500
+++ b/src/tests/asn.1/trval.c   2013-05-24 04:31:14.077036380 -0500
@@ -404,7 +404,7 @@
 {
     int n;
     int r = 0;
-    int rlen2;
+    int rlen2 = 0;
     int rlent;
     int save_appl;


code:
--- /dev/null	2009-10-20 19:31:44.183325514 +0300
+++ src/rebuild-configure-scripts.sh	2009-10-22 10:37:14.583117034 +0300
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+top=`pwd`
+for configurein in `find -name configure.in -type f` ; do
+    pushd `dirname $configurein`
+    grep -q A._CONFIG_HEADER configure.in && autoheader -I "$top"
+    autoconf -I "$top"
+    popd
+done


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>mit-kerberos</Name>
        <Homepage>http://web.mit.edu/kerberos/www/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>as-is</License>
        <IsA>library</IsA>
        <IsA>app:console</IsA>
        <Summary>MIT Kerberos Library</Summary>
        <Description>Kerberos is a network authentication protocol. It is designed to provide strong authentication for client/server applications by using secret-key cryptography.</Description>
        <Archive sha1sum="07fb763082c21e9e597b39aac6413302e3aa7c97" type="targz">http://web.mit.edu/kerberos/dist/krb5/1.15/krb5-1.15.tar.gz</Archive>

        <BuildDependencies>
            <Dependency>keyutils</Dependency>
            <Dependency>openssl-devel</Dependency>
            <Dependency>e2fsprogs-devel</Dependency>
            <!-- FIXME: openldap-client requires mit-kerberos too -->
            <!-- disable for now for the circular dep
            <Dependency>openldap-client</Dependency>
            -->
        </BuildDependencies>
        <Patches>
            <Patch level="0">krb5-config_LDFLAGS.patch</Patch>
            <!--<Patch level="1">mit-krb5-1.12_uninitialized.patch</Patch> -->
            <Patch level="0">rebuild-configure-scripts.patch</Patch>
<!--             <Patch level="0">fix-python-detection.patch</Patch> -->
        </Patches>
    </Source>

    <Package>
        <Name>mit-kerberos</Name>
        <RuntimeDependencies>
            <Dependency>keyutils</Dependency>
            <Dependency>openssl</Dependency>
            <Dependency>e2fsprogs</Dependency>
            <!-- FIXME: This introduces a circular dep
            <Dependency>openldap-client</Dependency>
            -->
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/sbin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="data">/usr/share</Path>
            <Path fileType="data">/var/lib</Path>
            <Path fileType="info">/usr/share/info</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/etc/krb5.conf">krb5.conf</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/etc/kdc.conf">kdc.conf</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-17</Date>
            <Version>1.15</Version>
            <Comment>Version Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>1.13.1</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
         <Update release="1">
            <Date>2015-04-23</Date>
            <Version>1.13.1</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>mit-kerberos</Name>
        <Summary xml:lang="tr">MIT Kerberos kütüphanesi</Summary>
        <Description xml:lang="tr">Kerberos bir ağ doğrulama protokolüdür. Sunucu/istemci uygulamalarında, gizli anahtar kriptoloji teknolojisini kullanarak, güçlü bir doğrulama sağlar.</Description>
    </Source>
</PISI>


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

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

#~ WorkDir="%s-%s" % (get.srcNAME(), get.srcVERSION().replace("_", "-").upper())

BINDDIR="/var/named"
CHROOT="%s/chroot" % BINDDIR

shelltools.export("CPPFLAGS", "%s -DDIG_SIGCHASE" % get.CXXFLAGS())

def setup():
    shelltools.makedirs("m4")
    # Fix PATHs in manpages
    pisitools.dosed("bin/named/named.8", "/etc/named.conf", "/etc/bind/named.conf")
    pisitools.dosed("bin/check/named-checkconf.8", "/etc/named.conf", "/etc/bind/named.conf")
    pisitools.dosed("bin/rndc/rndc.8", "/etc/rndc.conf", "/etc/bind/rndc.conf")
    pisitools.dosed("bin/rndc/rndc.8", "/etc/rndc.key", "/etc/bind/rndc.key")

    # Adjust version
    pisitools.dosed("version", "^RELEASEVER=.*$", "RELEASEVER=Pisi Linux-1.0")

    libtools.libtoolize("-cf")
    autotools.aclocal("-I m4")
    autotools.autoreconf("-vfi")

    autotools.configure("--localstatedir=/var \
                         --sysconfdir=/etc/bind \
                         --with-openssl \
                         --with-libtool \
                         --with-pic \
                         --with-randomdev=/dev/urandom \
                         --enable-linux-caps \
                         --enable-threads \
                         --includedir=/usr/include/bind9 \
                         --enable-ipv6 \
                         --enable-largefile \
                         --disable-static")

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

def build():
    autotools.make("-j1")

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

    # Prepare chroot jail
    for d in ("dev", "etc/bind", "etc/pki/dnssec-keys", "lib/bind", "var/tmp", "var/log", "var/run/named", "var/named"):
        pisitools.dodir("%s/%s" % (CHROOT, d))

    # At least drop a file in it
    shelltools.echo("%s%s/README" % (get.installDIR(), CHROOT), "Chroot jail for named")

    # Create directories
    pisitools.dodir("/var/run/named")
    for d in ("pri", "sec", "slaves", "data", "dynamic"):
        pisitools.dodir("%s/%s" % (BINDDIR, d))

    # Create symlinks
    for src, dest in [("named.ca", "%s/root.cache" % BINDDIR),
                      ("%s/pri" % BINDDIR, "/etc/bind/pri"),
                      ("%s/sec" % BINDDIR, "/etc/bind/sec")]:
        pisitools.dosym(src, dest)

    # Documentation
    pisitools.dodoc("CHANGES", "COPYRIGHT", "FAQ", "README")
    pisitools.dodoc("doc/misc/*", "contrib/scripts/named-bootconf.sh", "contrib/scripts/nanny.pl")
    pisitools.dohtml("doc/arm/*")
    pisitools.remove("/usr/share/doc/%s/Makefile*" % get.srcNAME())


code:
#!/usr/bin/python

import os

UID = "named"
GID = "named"

directories = ("/var/named", \
               "/var/named/data", \
               "/var/named/dynamic", \
               "/var/named/pri", \
               "/var/named/sec", \
               "/var/named/slaves", \
               "/var/named/named.ca", \
               "/var/run/named")

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    if not os.path.exists("/etc/bind/rndc.key"):
        os.system("/usr/sbin/rndc-confgen -r /dev/urandom -a -u named")

    # Ownerships
    for d in directories:
        os.system("chown %s:%s %s" % (UID, GID, d))


code:
#!/usr/bin/python

import os
import stat
import shutil

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    CHROOT  = "/var/named/chroot"
    NODES   = {
                "/dev/random"    : [stat.S_IFCHR | 0666, 1, 8],
                "/dev/zero"      : [stat.S_IFCHR | 0666, 1, 5],
                "/dev/null"      : [stat.S_IFCHR | 0666, 1, 3],
                "/dev/urandom"   : [stat.S_IFCHR | 0666, 1, 9],
                "/dev/log"       : [stat.S_IFSOCK | 0666, 1, 1],
              }

    # Create device NODES in chroot
    for node, values in NODES.items():
        if not os.path.exists("%s%s" % (CHROOT, node)):
            os.mknod("%s%s" % (CHROOT, node), values[0], os.makedev(values[1], values[2]))

    try:
        os.unlink("%s/etc/localtime" % CHROOT)
    except:
        pass

    # Copy config files to run under chroot
    shutil.copy("/etc/localtime", "%s/etc/localtime" % CHROOT)

    for files in ["/etc/bind/bind.keys", "/etc/bind/named.conf", "/etc/bind/rndc.key", "/var/named/named.ca"]:
        shutil.copy("%s" % files, "%s%s" % (CHROOT, files))

    try:
        shutil.copytree("/var/named/pri", "%s/var/named/pri" % CHROOT)
    except OSError:
        pass

    try:
        shutil.copytree("/var/named/sec", "%s/var/named/sec" % CHROOT)
    except OSError:
        pass

    os.system("ln -s ../../var/named/pri /var/named/chroot/etc/bind/")
    os.system("ln -s ../../var/named/sec /var/named/chroot/etc/bind/")

    # Fix permissions
    os.system("chmod 0700 %s" % CHROOT)
    os.system("chown named:named %s" % CHROOT)
    os.system("chown -R named:named %s/var/named" % CHROOT)
    os.system("chown -R named:named %s/etc/bind" % CHROOT)
    os.system("chown -R named:named %s/var/run/named" % CHROOT)
    os.system("chown -R named:named %s/var/log" % CHROOT)


code:
# -*- coding: utf-8 -*-
import os
from comar.service import *

serviceType = "server"
serviceDesc = _({"en": "BIND Daemon (chroot)",
                 "tr": "BIND Servisi (chroot)"})
serviceConf = "named"

chrootDir = "/var/named/chroot"
PIDFILE = "%s/var/run/named/named.pid" % chrootDir

@synchronized
def start():
    startService(command="/usr/sbin/named",
                 args="-u named -n %s %s -t %s" % (config.get("CPU", "1"),
                                                   config.get("OPTIONS", ""),
                                                   chrootDir),
                 makepid=True,
                 pidfile=PIDFILE,
                 donotify=True)

@synchronized
def stop():
    stopService(pidfile=PIDFILE,
                donotify=True)

def status():
    return isServiceRunning(PIDFILE)


code:
# -*- coding: utf-8 -*-
import os
from comar.service import *

serviceType = "server"
serviceDesc = _({"en": "BIND Daemon",
                 "tr": "BIND Servisi"})
serviceConf = "named"

PIDFILE = "/run/named/named.pid"

@synchronized
def start():
    startService(command="/usr/sbin/named",
                 args="-u named -n %s %s" % (config.get("CPU", "1"), config.get("OPTIONS", "")),
                 pidfile=PIDFILE,
                 donotify=True)

@synchronized
def stop():
    stopService(pidfile=PIDFILE,
                donotify=True)

def status():
    return isServiceRunning(PIDFILE)


code:
--- bind-9.5.0b2/bin/named/Makefile.in.pie	2008-02-11 17:21:47.000000000 +0100
+++ bind-9.5.0b2/bin/named/Makefile.in	2008-02-11 17:22:10.000000000 +0100
@@ -100,8 +100,12 @@ HTMLPAGES =	named.html lwresd.html named

 MANOBJS =	${MANPAGES} ${HTMLPAGES}

+EXT_CFLAGS = -fpie
+
 @BIND9_MAKE_RULES@

+LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
+
 main.@O@: main.c
 	${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
 		-DVERSION=\"${VERSION}\" \
diff -up bind-9.5.0b2/bin/named/unix/Makefile.in.pie bind-9.5.0b2/bin/named/unix/Makefile.in
--- bind-9.5.0b2/bin/named/unix/Makefile.in.pie	2008-02-11 17:22:21.000000000 +0100
+++ bind-9.5.0b2/bin/named/unix/Makefile.in	2008-02-11 17:23:00.000000000 +0100
@@ -19,6 +19,8 @@ srcdir =	@srcdir@
 VPATH =		@srcdir@
 top_srcdir =	@top_srcdir@

+EXT_CFLAGS = -fpie
+
 @BIND9_MAKE_INCLUDES@

 CINCLUDES =	-I${srcdir}/include -I${srcdir}/../include \


code:
diff -up bind-9.5.0b1/lib/dns/Makefile.in.parallel bind-9.5.0b1/lib/dns/Makefile.in
--- bind-9.5.0b1/lib/dns/Makefile.in.parallel	2008-01-17 18:27:38.000000000 +0100
+++ bind-9.5.0b1/lib/dns/Makefile.in	2008-01-17 18:27:45.000000000 +0100
@@ -19,10 +19,6 @@ srcdir =	@srcdir@
 VPATH =		@srcdir@
 top_srcdir =	@top_srcdir@

-# Attempt to disable parallel processing.
-.NOTPARALLEL:
-.NO_PARALLEL:
-
 @BIND9_VERSION@

 @LIBDNS_API@