# Maintainer: Natanael Copa global pkgname := 'rpcbind' global pkgver := '0.2.4' global pkgrel := '0' global pkgdesc := '"portmap replacement which supports RPC over various protocols'" global url := '"http://rpcbind.sourceforge.net'" global arch := '"all'" global license := '"custom'" global depends := '' global install := ""$pkgname.pre-install $pkgname.pre-upgrade"" global makedepends := '"libtirpc-dev autoconf automake bsd-compat-headers'" global subpackages := ""$pkgname-dbg $pkgname-doc"" global source := ""http://downloads.sourceforge.net/project/rpcbind/rpcbind/$pkgver/rpcbind-$pkgver.tar.bz2 CVE-2017-8779.patch pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch rpcbind.initd rpcbind.confd "" # secfixes: # 0.2.4-r0: # - CVE-2017-8779 global builddir := ""$srcdir"/rpcbind-$pkgver" proc prepare { cd $builddir for i in [$source] { matchstr $i { *.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1} } } sh autogen.sh || return 1 } proc build { cd $builddir unset CC unset CFLAGS ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --bindir=/sbin \ --enable-warmstarts \ --with-statedir=/var/lib/rpcbind \ --with-rpcuser=rpc \ --enable-debug \ --with-systemdsystemunitdir='no' \ || return 1 make -j1 || return 1 } proc package { cd $builddir make DESTDIR="$pkgdir" install || return 1 install -Dm755 "$srcdir"/rpcbind.initd "$pkgdir"/etc/init.d/rpcbind install -Dm644 "$srcdir"/rpcbind.confd "$pkgdir"/etc/conf.d/rpcbind install -D -m644 COPYING "$pkgdir"/usr/share/licenses/rpcbind/COPYING } global sha512sums := '"f3966a7284e94bdf120a9b3f0dd66efa1fe8761df2313545a031f77b7c06e27d7955d2780469943deb537d34f95c4cf3f30de523ec9fab9f571322d7224b210c rpcbind-0.2.4.tar.bz2 cc3b7d72299279f6c7e7ce0329d29a8bc0c44a9e99c241cbbe8f34eba71ca16da7e87683a66e36565422dde9a3b03be8d6e345264495c6e2070f97116da32244 CVE-2017-8779.patch 1ecce48807b276381ff3199916e0b85880b948086e7891aa35df8a10f9188641253572c330e5fee35afa69c5ce3965ebead14fbe8ef20c49a4e9047345e63c5e pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch a0125bd24a533366d7fcaed68e6671df65e3e39a4b18be2265f987602944d358666edef954f8707d24453331f7e96341739e5346bc1b233380c618b34a4014e2 rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch 1cd655d86226a45fa3e927f8ac2bb580537644d2fb3684e0f4a956bf3721c95d95b8b8c1d9a2a742fb714eeba9277e0400a7493bf1bf676466d70adb2b35a88e rpcbind.initd 0641087162ebc8fb10c5cb329105261d77cad073daed3f9a6c92574177298cd8a19a87b62dde14161cc554b5e68680cfd870b5334f3cfd8d6074ec8a43f4dfe3 rpcbind.confd'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(rpcbind)} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(0.2.4)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("portmap replacement which supports RPC over various protocols"))} spids: [12] ) ] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://rpcbind.sourceforge.net"))} spids: [17] ) ] spids: [17] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[22])] spids: [22] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (custom))} spids:[27])] spids: [27] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[32])] spids: [32] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:install) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (".pre-install ") ($ VSub_Name "$pkgname") (.pre-upgrade))} spids: [34] ) ] spids: [34] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("libtirpc-dev autoconf automake bsd-compat-headers"))} spids: [42] ) ] spids: [42] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") ("-dbg ") ($ VSub_Name "$pkgname") (-doc))} spids: [47] ) ] spids: [47] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("http://downloads.sourceforge.net/project/rpcbind/rpcbind/") ($ VSub_Name "$pkgver") (/rpcbind-) ($ VSub_Name "$pkgver") (".tar.bz2\n") ("\tCVE-2017-8779.patch\n") ("\tpmapproc_dump-Fixed-typo-in-memory-leak-patch.patch\n") ("\trpcbproc_callit_com-Stop-freeing-a-static-pointer.patch\n") ("\trpcbind.initd\n") ("\trpcbind.confd\n") ("\t") ) } spids: [55] ) ] spids: [55] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir")) (/rpcbind-) ($ VSub_Name "$pkgver")} spids: [81] ) ] spids: [81] ) (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: [121 123 147 -1] ) ] spids: [114 118 150] ) ] spids: [111 153] ) spids: [107 109] ) (AndOr children: [ (C {(sh)} {(autogen.sh)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [92] ) spids: [88 91] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(unset)} {(CC)}) (C {(unset)} {(CFLAGS)}) (AndOr children: [ (C {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--prefix) (Lit_Other "=") (/usr)} {(--bindir) (Lit_Other "=") (/sbin)} {(--enable-warmstarts)} {(--with-statedir) (Lit_Other "=") (/var/lib/rpcbind)} {(--with-rpcuser) (Lit_Other "=") (rpc)} {(--enable-debug)} {(--with-systemdsystemunitdir) (Lit_Other "=") (SQ )} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(make)} {(-j1)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [173] ) spids: [169 172] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (AndOr children: [ (C {(make)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(install)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(install)} {(-Dm755)} {(DQ ($ VSub_Name "$srcdir")) (/rpcbind.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/rpcbind)} ) (C {(install)} {(-Dm644)} {(DQ ($ VSub_Name "$srcdir")) (/rpcbind.confd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/conf.d/rpcbind)} ) (C {(install)} {(-D)} {(-m644)} {(COPYING)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/licenses/rpcbind/COPYING)} ) ] spids: [273] ) spids: [269 272] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "f3966a7284e94bdf120a9b3f0dd66efa1fe8761df2313545a031f77b7c06e27d7955d2780469943deb537d34f95c4cf3f30de523ec9fab9f571322d7224b210c rpcbind-0.2.4.tar.bz2\n" ) ( "cc3b7d72299279f6c7e7ce0329d29a8bc0c44a9e99c241cbbe8f34eba71ca16da7e87683a66e36565422dde9a3b03be8d6e345264495c6e2070f97116da32244 CVE-2017-8779.patch\n" ) ( "1ecce48807b276381ff3199916e0b85880b948086e7891aa35df8a10f9188641253572c330e5fee35afa69c5ce3965ebead14fbe8ef20c49a4e9047345e63c5e pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch\n" ) ( "a0125bd24a533366d7fcaed68e6671df65e3e39a4b18be2265f987602944d358666edef954f8707d24453331f7e96341739e5346bc1b233380c618b34a4014e2 rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch\n" ) ( "1cd655d86226a45fa3e927f8ac2bb580537644d2fb3684e0f4a956bf3721c95d95b8b8c1d9a2a742fb714eeba9277e0400a7493bf1bf676466d70adb2b35a88e rpcbind.initd\n" ) ( "0641087162ebc8fb10c5cb329105261d77cad073daed3f9a6c92574177298cd8a19a87b62dde14161cc554b5e68680cfd870b5334f3cfd8d6074ec8a43f4dfe3 rpcbind.confd" ) ) } spids: [344] ) ] spids: [344] ) ] )