# Contributor: Leonardo Arena # Maintainer: Natanael Copa global pkgname := 'cyrus-sasl' global pkgver := '2.1.26' global pkgrel := '10' global pkgdesc := '"Cyrus Simple Authentication Service Layer (SASL)'" global url := '"https://cyrusimap.org/'" global arch := '"all'" global license := '"custom'" global options := '"!check'" # No test suite. global subpackages := ""$pkgname-dev $pkgname-doc $pkgname-gssapi $pkgname-gs2 $pkgname-scram $pkgname-ntlm $pkgname-crammd5 $pkgname-digestmd5 libsasl"" global depends := '' global makedepends := '"db-dev libressl-dev heimdal-dev autoconf automake libtool'" global source := ""ftp://ftp.cyrusimap.org/$pkgname/$pkgname-$pkgver.tar.gz saslauthd.initd cyrus-sasl-2.1.25-avoid_pic_overwrite.patch cyrus-sasl-2.1.26-size_t.patch CVE-2013-4122.patch "" global _builddir := ""$srcdir"/$pkgname-$pkgver" proc prepare { cd $_builddir for i in [$source] { matchstr $i { *.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1} } } # the libtool they ship is broken sed 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' -i configure.in || return 1 rm -rf config/config.guess config/config.sub config/ltconfig \ config/ltmain.sh config/libtool.m4 autom4te.cache libtoolize -c && aclocal -I config -I cmulocal \ && automake -a -c && autoheader && autoconf } proc build { cd $_builddir ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-anon \ --enable-cram \ --enable-digest \ --enable-login \ --enable-ntlm \ --disable-otp \ --enable-plain \ --with-gss_impl=heimdal \ --with-devrandom=/dev/urandom \ --without-ldap \ --with-saslauthd=/var/run/saslauthd \ --mandir=/usr/share/man \ || return 1 # parallell builds is broken make -j1 || return 1 } proc package { cd "$srcdir"/cyrus-sasl-$pkgver make -j1 DESTDIR="$pkgdir" install || return 1 install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING install -Dm755 ../saslauthd.initd "$pkgdir"/etc/init.d/saslauthd install -d "$pkgdir"/var/run/saslauthd } global _plugindir := 'usr/lib/sasl2' proc _plugin { global depends := '' global replaces := '"libsasl'" global pkgdesc := ""Cyrus SASL plugin for $1"" mkdir -p "$subpkgdir"/$_plugindir || return 1 mv "$pkgdir"/$_plugindir/lib$(1).so* "$subpkgdir"/$_plugindir/ } proc gssapi { _plugin gssapiv2; } proc gs2 { _plugin gs2; } proc scram { _plugin scram; } proc ntlm { _plugin ntlm; } proc crammd5 { _plugin crammd5; } proc digestmd5 { _plugin digestmd5; } proc libsasl { global depends := '' global pkgdesc := '"Cyrus Simple Authentication and Security Layer (SASL) library'" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ } global md5sums := '"a7f4e5e559a0e37b3ffc438c9456e425 cyrus-sasl-2.1.26.tar.gz 6e7cbe301015777bf53d5f08ac4362f0 saslauthd.initd 085acdc345bcce896f3eea8956cc0892 cyrus-sasl-2.1.25-avoid_pic_overwrite.patch bcaafcbc79054e8356217213d6eda16d cyrus-sasl-2.1.26-size_t.patch 8b3f65a7c8fbcbd7b7da2865f71b8aa7 CVE-2013-4122.patch'" global sha256sums := '"8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3 cyrus-sasl-2.1.26.tar.gz d6d23c360d52cf35bf266ce32b7c0eccafd79f55daa3e97733a899c97211a90c saslauthd.initd 80cb9cf22b0507b503ff0cf6c5946a44eb5c3808e0a77e66d56d5a53e5e76fa7 cyrus-sasl-2.1.25-avoid_pic_overwrite.patch b85b20bdd25b42098e07a8ba7e435f02b5cd882dcf69572c4d32de4a5e4f41bb cyrus-sasl-2.1.26-size_t.patch e32013e7ba1d9a80c18524a413f3b3c4bfc325e1c07b1552908b631edb803346 CVE-2013-4122.patch'" global sha512sums := '"78819cb9bb38bea4537d6770d309deeeef09ff44a67526177609d3e1257ff4334d2b5e5131d5a1e4dea7430d8db1918ea9d171f0dee38b5e8337f4b72ed068f0 cyrus-sasl-2.1.26.tar.gz 71a00a22f91f0fb6ba2796acede321a0f071b1d7a99616f0e36c354213777f30575c340b6df392dcbfc103ba7640d046144882f6a7b505f59709bb5c429b44d8 saslauthd.initd 033e3634116e1d3b316052dbe0b671cca0fcfb6063fca1a97d990c422c2ce05109a1e424e84ed9928dc0312a325a7248f2d2e3f9547f84453b36331c01f63be5 cyrus-sasl-2.1.25-avoid_pic_overwrite.patch fe4c3e6d5230eb50b9e6885129760a12e7bce316b41a3e58b2c550fa83526b91205cd827f7d1367751313559875d32982b95b024b1a22300ac5b35214e7c2b78 cyrus-sasl-2.1.26-size_t.patch 08964bc3ad713e137b8f05f9bac345d79676d14784bc37525f195e8e2a3e6740428237b64f7eeeacc0c71ed6cf1664c6e9c2267ac6df327761d92174a1853744 CVE-2013-4122.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(cyrus-sasl)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(2.1.26)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(10)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Cyrus Simple Authentication Service Layer (SASL)"))} spids: [15] ) ] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("https://cyrusimap.org/"))} spids: [20] ) ] spids: [20] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[25])] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (custom))} spids:[30])] spids: [30] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:options) op:Equal rhs:{(DQ ("!check"))} spids:[35])] spids: [35] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") ("-dev ") ($ VSub_Name "$pkgname") ("-doc ") ($ VSub_Name "$pkgname") ("-gssapi ") ($ VSub_Name "$pkgname") ("-gs2\n") ("\t") ($ VSub_Name "$pkgname") ("-scram ") ($ VSub_Name "$pkgname") ("-ntlm ") ($ VSub_Name "$pkgname") ("-crammd5 ") ($ VSub_Name "$pkgname") ("-digestmd5\n") ("\tlibsasl") ) } spids: [43] ) ] spids: [43] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[65])] spids: [65] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("db-dev libressl-dev heimdal-dev\n") ("\tautoconf automake libtool"))} spids: [67] ) ] spids: [67] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("ftp://ftp.cyrusimap.org/") ($ VSub_Name "$pkgname") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz\n") ("\tsaslauthd.initd\n") ("\tcyrus-sasl-2.1.25-avoid_pic_overwrite.patch\n") ("\tcyrus-sasl-2.1.26-size_t.patch\n") ("\tCVE-2013-4122.patch\n") ("\t") ) } spids: [73] ) ] spids: [73] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver")} spids: [90] ) ] spids: [90] ) (FuncDef name: prepare body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (ForEach iter_name: i iter_words: [{($ VSub_Name "$source")}] do_arg_iter: False body: (DoGroup children: [ (Case to_match: {($ VSub_Name "$i")} arms: [ (case_arm pat_list: [{(Lit_Other "*") (.patch)}] action: [ (Sentence child: (C {(msg)} {($ VSub_Name "$i")}) terminator: ) (AndOr children: [ (C {(patch)} {(-p1)} {(-i)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$i")} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [132 134 158 -1] ) ] spids: [125 129 161] ) ] spids: [122 164] ) spids: [118 120] ) (AndOr children: [ (C {(sed)} {(SQ )} {(-i)} {(configure.in)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(rm)} {(-rf)} {(config/config.guess)} {(config/config.sub)} {(config/ltconfig)} {(config/ltmain.sh)} {(config/libtool.m4)} {(autom4te.cache)} ) (AndOr children: [ (C {(libtoolize)} {(-c)}) (AndOr children: [ (C {(aclocal)} {(-I)} {(config)} {(-I)} {(cmulocal)}) (AndOr children: [ (C {(automake)} {(-a)} {(-c)}) (AndOr children: [(C {(autoheader)}) (C {(autoconf)})] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [103] ) spids: [99 102] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (AndOr children: [ (C {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--prefix) (Lit_Other "=") (/usr)} {(--sysconfdir) (Lit_Other "=") (/etc)} {(--localstatedir) (Lit_Other "=") (/var)} {(--disable-anon)} {(--enable-cram)} {(--enable-digest)} {(--enable-login)} {(--enable-ntlm)} {(--disable-otp)} {(--enable-plain)} {(--with-gss_impl) (Lit_Other "=") (heimdal)} {(--with-devrandom) (Lit_Other "=") (/dev/urandom)} {(--without-ldap)} {(--with-saslauthd) (Lit_Other "=") (/var/run/saslauthd)} {(--mandir) (Lit_Other "=") (/usr/share/man)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(make)} {(-j1)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [249] ) spids: [245 248] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$srcdir")) (/cyrus-sasl-) ($ VSub_Name "$pkgver")}) (AndOr children: [ (C {(make)} {(-j1)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(install)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(install)} {(-D)} {(-m644)} {(COPYING)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/licenses/) ($ VSub_Name "$pkgname") (/COPYING)} ) (C {(install)} {(-Dm755)} {(../saslauthd.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/saslauthd)} ) (C {(install)} {(-d)} {(DQ ($ VSub_Name "$pkgdir")) (/var/run/saslauthd)}) ] spids: [377] ) spids: [373 376] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:_plugindir) op:Equal rhs:{(usr/lib/sasl2)} spids:[448])] spids: [448] ) (FuncDef name: _plugin body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[458])] spids: [458] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:replaces) op: Equal rhs: {(DQ (libsasl))} spids: [461] ) ] spids: [461] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Cyrus SASL plugin for ") ($ VSub_Number "$1"))} spids: [467] ) ] spids: [467] ) (AndOr children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/) ($ VSub_Name "$_plugindir")}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/) ($ VSub_Name "$_plugindir") (/lib) (${ VSub_Number 1) (.so) (Lit_Other "*") } {(DQ ($ VSub_Name "$subpkgdir")) (/) ($ VSub_Name "$_plugindir") (/)} ) ] spids: [455] ) spids: [451 454] ) (FuncDef name: gssapi body: (BraceGroup children: [(Sentence child:(C {(_plugin)} {(gssapiv2)}) terminator:)] spids: [519] ) spids: [515 518] ) (FuncDef name: gs2 body: (BraceGroup children: [(Sentence child:(C {(_plugin)} {(gs2)}) terminator:)] spids: [532] ) spids: [528 531] ) (FuncDef name: scram body: (BraceGroup children: [(Sentence child:(C {(_plugin)} {(scram)}) terminator:)] spids: [545] ) spids: [541 544] ) (FuncDef name: ntlm body: (BraceGroup children: [(Sentence child:(C {(_plugin)} {(ntlm)}) terminator:)] spids: [558] ) spids: [554 557] ) (FuncDef name: crammd5 body: (BraceGroup children: [(Sentence child:(C {(_plugin)} {(crammd5)}) terminator:)] spids: [571] ) spids: [567 570] ) (FuncDef name: digestmd5 body: (BraceGroup children: [(Sentence child:(C {(_plugin)} {(digestmd5)}) terminator:)] spids: [584] ) spids: [580 583] ) (FuncDef name: libsasl body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[601])] spids: [601] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Cyrus Simple Authentication and Security Layer (SASL) library"))} spids: [604] ) ] spids: [604] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/)} ) ] spids: [598] ) spids: [594 597] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:md5sums) op: Equal rhs: { (DQ ("a7f4e5e559a0e37b3ffc438c9456e425 cyrus-sasl-2.1.26.tar.gz\n") ("6e7cbe301015777bf53d5f08ac4362f0 saslauthd.initd\n") ("085acdc345bcce896f3eea8956cc0892 cyrus-sasl-2.1.25-avoid_pic_overwrite.patch\n") ("bcaafcbc79054e8356217213d6eda16d cyrus-sasl-2.1.26-size_t.patch\n") ("8b3f65a7c8fbcbd7b7da2865f71b8aa7 CVE-2013-4122.patch") ) } spids: [635] ) ] spids: [635] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha256sums) op: Equal rhs: { (DQ ( "8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3 cyrus-sasl-2.1.26.tar.gz\n" ) ("d6d23c360d52cf35bf266ce32b7c0eccafd79f55daa3e97733a899c97211a90c saslauthd.initd\n") ( "80cb9cf22b0507b503ff0cf6c5946a44eb5c3808e0a77e66d56d5a53e5e76fa7 cyrus-sasl-2.1.25-avoid_pic_overwrite.patch\n" ) ( "b85b20bdd25b42098e07a8ba7e435f02b5cd882dcf69572c4d32de4a5e4f41bb cyrus-sasl-2.1.26-size_t.patch\n" ) ("e32013e7ba1d9a80c18524a413f3b3c4bfc325e1c07b1552908b631edb803346 CVE-2013-4122.patch") ) } spids: [644] ) ] spids: [644] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "78819cb9bb38bea4537d6770d309deeeef09ff44a67526177609d3e1257ff4334d2b5e5131d5a1e4dea7430d8db1918ea9d171f0dee38b5e8337f4b72ed068f0 cyrus-sasl-2.1.26.tar.gz\n" ) ( "71a00a22f91f0fb6ba2796acede321a0f071b1d7a99616f0e36c354213777f30575c340b6df392dcbfc103ba7640d046144882f6a7b505f59709bb5c429b44d8 saslauthd.initd\n" ) ( "033e3634116e1d3b316052dbe0b671cca0fcfb6063fca1a97d990c422c2ce05109a1e424e84ed9928dc0312a325a7248f2d2e3f9547f84453b36331c01f63be5 cyrus-sasl-2.1.25-avoid_pic_overwrite.patch\n" ) ( "fe4c3e6d5230eb50b9e6885129760a12e7bce316b41a3e58b2c550fa83526b91205cd827f7d1367751313559875d32982b95b024b1a22300ac5b35214e7c2b78 cyrus-sasl-2.1.26-size_t.patch\n" ) ( "08964bc3ad713e137b8f05f9bac345d79676d14784bc37525f195e8e2a3e6740428237b64f7eeeacc0c71ed6cf1664c6e9c2267ac6df327761d92174a1853744 CVE-2013-4122.patch" ) ) } spids: [653] ) ] spids: [653] ) ] )