# Contributor: Ɓukasz Jendrysik # Contributor: Jeff Bilyk # Contributor: Leonardo Arena # Maintainer: Natanael Copa global pkgname := 'zabbix' global pkgver := '3.4.2' global pkgrel := '1' global pkgdesc := '"Enterprise-class open source distributed monitoring'" global url := '"http://www.zabbix.com'" global arch := '"all'" global license := '"GPL'" global depends := '"fping'" global _php := 'php7' global _php_depends := ""$_php $(_php)-gd $(_php)-curl $(_php)-bcmath $(_php)-sockets $(_php)-iconv $(_php)-xmlreader $(_php)-xmlwriter $(_php)-ctype $(_php)-gettext $(_php)-session $(_php)-simplexml $(_php)-json"" global makedepends := ""postgresql-dev curl-dev net-snmp-dev libevent-dev pcre-dev sqlite-dev mariadb-dev curl-dev openipmi-dev unixodbc-dev libxml2-dev autoconf automake libssh2-dev gnutls-dev $_php_depends"" global install := ""$pkgname.pre-install"" global pkgusers := '"zabbix'" global pkggroups := '"zabbix'" global subpackages := ""$pkgname-doc $pkgname-agent $pkgname-pgsql $pkgname-mysql $pkgname-sqlite $pkgname-webif::noarch $pkgname-utils $pkgname-setup::noarch"" global source := ""http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz zabbix-server.initd zabbix-server.confd zabbix-agentd.initd zabbix-proxy.initd zabbix-getloadavg.patch automake.patch musl-fix-includes.patch zabbix_server.conf.patch "" global _builddir := ""$srcdir"/$pkgname-$pkgver" # security fixes: # 3.0.4-r0: # - CVE N/A ZBX-11023 proc prepare { cd $_builddir # update_config_sub || return 1 for i in [$source] { matchstr $i { *eglibc*.patch { if test $CLIBC == "eglibc" { msg "Applying $i" patch -p1 -i "$srcdir"/$i || return 1 } } *.patch { msg "Applying $i" patch -p1 -i "$srcdir"/$i || return 1 } } } aclocal -I m4 && autoconf && autoheader \ && automake --add-missing || return 1 # update_config_sub # Fix config file locations for file in [server agentd proxy] { sed -i "$_builddir"/conf/zabbix_$(file).conf \ -e 's|SNMPTrapperFile=/tmp|SNMPTrapperFile=/var/log/zabbix|' \ -e 's|PidFile=/tmp|PidFile=/var/run/zabbix|' \ -e 's|LogFile=/tmp|LogFile=/var/log/zabbix|' || return 1 } } proc build { # set default configure flags global _configure := '"--prefix=/usr \ --sysconfdir=/etc/zabbix \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --enable-agent \ --enable-proxy \ --enable-ipv6 \ --with-net-snmp \ --with-libcurl \ --with-libxml2 \ --with-openipmi \ --with-unixodbc \ --with-ssh2 \ --with-gnutls '" # we run build for each db type # make sure prepare is same for each db for db in [postgresql mysql sqlite3] { cd $srcdir msg "Building for $db" cp -r "$pkgname-$pkgver" "$pkgname-$pkgver-$db" cd "$_builddir-$db" matchstr $db { sqlite3 { ./configure \ --build=$CBUILD \ --host=$CHOST \ --with-$db \ $_configure \ } * { ./configure \ --build=$CBUILD \ --host=$CHOST \ --enable-server \ --with-$db \ $_configure \ || return 1 } } make || return 1 } } proc package { # doing manual install for i in [agentd proxy server] { install -D -m755 "$_builddir"/man/zabbix_$i.man \ "$pkgdir"/usr/share/man/man8/zabbix_$i.8 } for i in [get sender] { install -D -m755 "$_builddir"/man/zabbix_$i.man \ "$pkgdir"/usr/share/man/man1/zabbix_$i.1 } install -d -m0750 -o zabbix -g zabbix \ "$pkgdir"/var/run/zabbix "$pkgdir"/var/log/zabbix install -D -m0644 "$_builddir"/conf/zabbix_server.conf \ "$pkgdir"/etc/zabbix/zabbix_server.conf for i in [server proxy] { install -D -m0755 "$srcdir"/zabbix-$i.initd \ "$pkgdir"/etc/init.d/zabbix-$i || return 1 } install -D -m0644 "$srcdir"/zabbix-server.confd \ "$pkgdir"/etc/conf.d/zabbix-server || return 1 } proc setup { global pkgdesc := '"Zabbix images and sql files'" global depends := '' mkdir -p "$subpkgdir"/usr/share/zabbix/ || return 1 mv "$_builddir"/database "$subpkgdir"/usr/share/zabbix/ } proc _do_db { global pkgdesc := ""Zabbix server with $1 database support"" global depends := ""$pkgname $2"" var i = '' mkdir -p "$subpkgdir"/usr/sbin if test $1 != "sqlite3" { mv "$_builddir-$1"/src/zabbix_server/zabbix_server \ "$subpkgdir"/usr/sbin/ || return 1 } mv "$_builddir-$1"/src/zabbix_proxy/zabbix_proxy \ "$subpkgdir"/usr/sbin/ || return 1 install -D -m0644 "$_builddir"/conf/zabbix_proxy.conf \ "$pkgdir"/etc/zabbix/zabbix_proxy.conf || return 1 cd $_builddir for i in [upgrades/dbpatches/*/$1] { test -e $i || continue mkdir -p "$subpkgdir"/usr/share/zabbix/$(i%/*) mv $i "$subpkgdir"/usr/share/zabbix/$i } return 0 } proc pgsql { _do_db postgresql "!$pkgname-mysql !$pkgname-sqlite";} proc mysql { _do_db mysql "!$pkgname-pgsql !$pkgname-sqlite";} proc sqlite{ _do_db sqlite3 "!$pkgname-pgsql !$pkgname-mysql";} proc utils { global pkgdesc := '"Zabbix client utilities'" global depends := '' mkdir -p "$subpkgdir"/usr/bin mv "$_builddir-postgresql"/src/zabbix_get/zabbix_get \ "$subpkgdir"/usr/bin mv "$_builddir-postgresql"/src/zabbix_sender/zabbix_sender \ "$subpkgdir"/usr/bin } proc webif { global pkgdesc := '"Zabbix web-interface'" global depends := $_php_depends global _wwwdir := ""$subpkgdir"/usr/share/webapps/zabbix" mkdir -p $_wwwdir mv "$_builddir"/frontends/php/* $_wwwdir } proc agent { global pkgdesc := '"Zabbix Network Monitoring Agent'" global depends := '' global install := ""$subpkgname.pre-install"" install -d -m0750 -o zabbix -g zabbix \ "$subpkgdir"/var/run/zabbix "$subpkgdir"/var/log/zabbix install -D -m0644 "$_builddir"/conf/zabbix_agentd.conf \ "$subpkgdir"/etc/zabbix/zabbix_agentd.conf install -D -m0755 "$srcdir"/zabbix-agentd.initd \ "$subpkgdir"/etc/init.d/zabbix-agentd mkdir -p "$subpkgdir"/usr/sbin mv "$_builddir-postgresql"/src/zabbix_agent/zabbix_agentd \ "$subpkgdir"/usr/sbin/ } global sha512sums := '"42feff59e1e1dd5d69a66cc857e9076b9a6f1410b5796a719cb660ea97ccd2544fe87f3cfabc27590cc53a321d24a7977daa320be1fdff31653b3650602dd385 zabbix-3.4.2.tar.gz 9998ee172a28002d98bacc3f76038ff52b8cf2b206e101418d76b4ca3de94afaf92cb4f7a6235ecf177f74beb9dd3ea1f3983c4f164b4f60bb601acba65aa175 zabbix-server.initd 9c06527bf653c40585fa7eeb3f7a0b2fc454031d24cd0d1633aed87b78a681c5227a193c5b9fcfcea0839135874e27ba7dd9b198573f905f680a2856f79e9512 zabbix-server.confd 523013cab3ba79cbc00db92f09d4c5d514fd6aa9cbebf8f29227dc91fbc19d2f8375af74c21d2037e4f3380a818f808194dbc94e69709ef2cf90f66e715895c4 zabbix-agentd.initd a26e7ac422ff60a4b8eed3603022c3a1bde640870bb9286ab061c3cb5c2fd7e91ddb317cb3d1cf61034adda0a080fc212ad416c9e2853a1deb03c5279753f4e2 zabbix-proxy.initd 9fc413b11a01c8202c7ee1c7950d6ca3de2d2d6cd01bea994cd4bc412533b53c4e4b1f58fc3c8df16ea70902053e278e2c5dcc936ce3e0a686a6eac62310ef53 zabbix-getloadavg.patch 7f70dfd602aa164ec8cc65ebb7e8274c685975f6aea9051933928051b8d9b6e368e5a673a07e7084a2105468c5085d72fa7b9f934460f10648d594f28f031a91 automake.patch 72709df7624d99b2eaab8d91d95167580e80da10b3ac65b7f27f12d858f0d051d4f9143bcabceae2bfd51aeb7c4ca93e2b74670637ec0925b026e3c52475d52b musl-fix-includes.patch 183e2d99800d8eebb932cb31c5a3e8742ce6a15e87aec50dc49d9c20b35840eb7ede9920aa62d2c7a5e3f584f5c3df398aa08e93f98fa537a3ba6db63b472a1f zabbix_server.conf.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(zabbix)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(3.4.2)} spids:[15])] spids: [15] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(1)} spids:[18])] spids: [18] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Enterprise-class open source distributed monitoring"))} spids: [21] ) ] spids: [21] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://www.zabbix.com"))} spids: [26] ) ] spids: [26] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[31])] spids: [31] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (GPL))} spids:[36])] spids: [36] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(DQ (fping))} spids:[41])] spids: [41] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:_php) op:Equal rhs:{(php7)} spids:[46])] spids: [46] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_php_depends) op: Equal rhs: { (DQ ($ VSub_Name "$_php") (" ") (${ VSub_Name _php) ("-gd ") (${ VSub_Name _php) ("-curl ") (${ VSub_Name _php) ("-bcmath ") (${ VSub_Name _php) ("-sockets\n") ("\t") (${ VSub_Name _php) ("-iconv ") (${ VSub_Name _php) ("-xmlreader ") (${ VSub_Name _php) ("-xmlwriter ") (${ VSub_Name _php) ("-ctype\n") ("\t") (${ VSub_Name _php) ("-gettext ") (${ VSub_Name _php) ("-session ") (${ VSub_Name _php) ("-simplexml ") (${ VSub_Name _php) (-json) ) } spids: [49] ) ] spids: [49] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: { (DQ ("postgresql-dev curl-dev net-snmp-dev libevent-dev pcre-dev\n") ("\tsqlite-dev mariadb-dev curl-dev openipmi-dev unixodbc-dev\n") ("\tlibxml2-dev autoconf automake libssh2-dev gnutls-dev\n") ("\t") ($ VSub_Name "$_php_depends") ) } spids: [105] ) ] spids: [105] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:install) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (.pre-install))} spids: [114] ) ] spids: [114] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgusers) op:Equal rhs:{(DQ (zabbix))} spids:[120])] spids: [120] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkggroups) op:Equal rhs:{(DQ (zabbix))} spids:[125])] spids: [125] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") ("-doc ") ($ VSub_Name "$pkgname") ("-agent ") ($ VSub_Name "$pkgname") ("-pgsql ") ($ VSub_Name "$pkgname") ("-mysql ") ($ VSub_Name "$pkgname") ("-sqlite\n") ("\t") ($ VSub_Name "$pkgname") ("-webif::noarch ") ($ VSub_Name "$pkgname") ("-utils ") ($ VSub_Name "$pkgname") ("-setup::noarch") ) } spids: [130] ) ] spids: [130] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("http://downloads.sourceforge.net/") ($ VSub_Name "$pkgname") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz\n") ("\tzabbix-server.initd\n") ("\tzabbix-server.confd\n") ("\tzabbix-agentd.initd\n") ("\tzabbix-proxy.initd\n") ("\n") ("\tzabbix-getloadavg.patch\n") ("\tautomake.patch\n") ("\tmusl-fix-includes.patch\n") ("\tzabbix_server.conf.patch\n") ("\t") ) } spids: [151] ) ] spids: [151] ) (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: [173] ) ] spids: [173] ) (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 "*") (eglibc) (Lit_Other "*") (.patch)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$CLIBC"))} {(Lit_Other "=") (Lit_Other "=")} {(DQ (eglibc))} {(Lit_Other "]")} ) terminator: ) ] action: [ (C {(msg)} {(DQ ("Applying ") ($ VSub_Name "$i"))}) (AndOr children: [ (C {(patch)} {(-p1)} {(-i)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$i")} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [-1 255] ) ] spids: [-1 285] ) ] spids: [230 234 288 -1] ) (case_arm pat_list: [{(Lit_Other "*") (.patch)}] action: [ (C {(msg)} {(DQ ("Applying ") ($ VSub_Name "$i"))}) (AndOr children: [ (C {(patch)} {(-p1)} {(-i)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$i")} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [291 293 323 -1] ) ] spids: [223 227 326] ) ] spids: [220 329] ) spids: [216 218] ) (AndOr children: [ (C {(aclocal)} {(-I)} {(m4)}) (AndOr children: [ (C {(autoconf)}) (AndOr children: [ (C {(autoheader)}) (AndOr children: [ (C {(automake)} {(--add-missing)}) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (ForEach iter_name: file iter_words: [{(server)} {(agentd)} {(proxy)}] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [ (C {(sed)} {(-i)} {(DQ ($ VSub_Name "$_builddir")) (/conf/zabbix_) (${ VSub_Name file) (.conf)} {(-e)} {(SQ <"s|SNMPTrapperFile=/tmp|SNMPTrapperFile=/var/log/zabbix|">)} {(-e)} {(SQ <"s|PidFile=/tmp|PidFile=/var/run/zabbix|">)} {(-e)} {(SQ <"s|LogFile=/tmp|LogFile=/var/log/zabbix|">)} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [382 429] ) spids: [374 380] ) ] spids: [197] ) spids: [193 196] ) (FuncDef name: build body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_configure) op: Equal rhs: { (DQ ("--prefix=/usr ") ("\t\t\t--sysconfdir=/etc/zabbix ") ("\t\t\t--mandir=/usr/share/man ") ("\t\t\t--infodir=/usr/share/info ") ("\t\t\t--enable-agent ") ("\t\t\t--enable-proxy ") ("\t\t\t--enable-ipv6 ") ("\t\t\t--with-net-snmp ") ("\t\t\t--with-libcurl ") ("\t\t\t--with-libxml2 ") ("\t\t\t--with-openipmi ") ("\t\t\t--with-unixodbc ") ("\t\t\t--with-ssh2 ") ("\t\t\t--with-gnutls\n") ("\t\t\t") ) } spids: [445] ) ] spids: [445] ) (ForEach iter_name: db iter_words: [{(postgresql)} {(mysql)} {(sqlite3)}] do_arg_iter: False body: (DoGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$srcdir"))}) (C {(msg)} {(DQ ("Building for ") ($ VSub_Name "$db"))}) (C {(cp)} {(-r)} {(DQ ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver"))} { (DQ ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (-) ($ VSub_Name "$db")) } ) (C {(cd)} {(DQ ($ VSub_Name "$_builddir") (-) ($ VSub_Name "$db"))}) (Case to_match: {($ VSub_Name "$db")} arms: [ (case_arm pat_list: [{(sqlite3)}] action: [ (C {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--with-) ($ VSub_Name "$db")} {($ VSub_Name "$_configure")} ) ] spids: [552 553 581 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (AndOr children: [ (C {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--enable-server)} {(--with-) ($ VSub_Name "$db")} {($ VSub_Name "$_configure")} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [584 585 -1 624] ) ] spids: [545 549 624] ) (AndOr children: [ (C {(make)}) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [499 636] ) spids: [491 497] ) ] spids: [438] ) spids: [434 437] ) (FuncDef name: package body: (BraceGroup children: [ (ForEach iter_name: i iter_words: [{(agentd)} {(proxy)} {(server)}] do_arg_iter: False body: (DoGroup children: [ (C {(install)} {(-D)} {(-m755)} {(DQ ($ VSub_Name "$_builddir")) (/man/zabbix_) ($ VSub_Name "$i") (.man)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/man/man8/zabbix_) ($ VSub_Name "$i") (.8)} ) ] spids: [665 691] ) spids: [657 663] ) (ForEach iter_name: i iter_words: [{(get)} {(sender)}] do_arg_iter: False body: (DoGroup children: [ (C {(install)} {(-D)} {(-m755)} {(DQ ($ VSub_Name "$_builddir")) (/man/zabbix_) ($ VSub_Name "$i") (.man)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/man/man1/zabbix_) ($ VSub_Name "$i") (.1)} ) ] spids: [705 731] ) spids: [699 703] ) (C {(install)} {(-d)} {(-m0750)} {(-o)} {(zabbix)} {(-g)} {(zabbix)} {(DQ ($ VSub_Name "$pkgdir")) (/var/run/zabbix)} {(DQ ($ VSub_Name "$pkgdir")) (/var/log/zabbix)} ) (C {(install)} {(-D)} {(-m0644)} {(DQ ($ VSub_Name "$_builddir")) (/conf/zabbix_server.conf)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/zabbix/zabbix_server.conf)} ) (ForEach iter_name: i iter_words: [{(server)} {(proxy)}] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [ (C {(install)} {(-D)} {(-m0755)} {(DQ ($ VSub_Name "$srcdir")) (/zabbix-) ($ VSub_Name "$i") (.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/zabbix-) ($ VSub_Name "$i")} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [791 822] ) spids: [785 789] ) (AndOr children: [ (C {(install)} {(-D)} {(-m0644)} {(DQ ($ VSub_Name "$srcdir")) (/zabbix-server.confd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/conf.d/zabbix-server)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [645] ) spids: [641 644] ) (FuncDef name: setup body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Zabbix images and sql files"))} spids: [859] ) ] spids: [859] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[865])] spids: [865] ) (AndOr children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/share/zabbix/)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(mv)} {(DQ ($ VSub_Name "$_builddir")) (/database)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/share/zabbix/)} ) ] spids: [856] ) spids: [852 855] ) (FuncDef name: _do_db body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Zabbix server with ") ($ VSub_Number "$1") (" database support"))} spids: [906] ) ] spids: [906] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (" ") ($ VSub_Number "$2"))} spids: [914] ) ] spids: [914] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(SQ )} spids:[924])] spids: [922] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/sbin)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Number "$1"))} {(KW_Bang "!") (Lit_Other "=")} {(DQ (sqlite3))} {(Lit_Other "]")} ) terminator: ) ] action: [ (AndOr children: [ (C {(mv)} {(DQ ($ VSub_Name "$_builddir") (-) ($ VSub_Number "$1")) (/src/zabbix_server/zabbix_server) } {(DQ ($ VSub_Name "$subpkgdir")) (/usr/sbin/)} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [-1 955] ) ] spids: [-1 981] ) (AndOr children: [ (C {(mv)} {(DQ ($ VSub_Name "$_builddir") (-) ($ VSub_Number "$1")) (/src/zabbix_proxy/zabbix_proxy) } {(DQ ($ VSub_Name "$subpkgdir")) (/usr/sbin/)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(install)} {(-D)} {(-m0644)} {(DQ ($ VSub_Name "$_builddir")) (/conf/zabbix_proxy.conf)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/zabbix/zabbix_proxy.conf)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (ForEach iter_name: i iter_words: [{(upgrades/dbpatches/) (Lit_Other "*") (/) ($ VSub_Number "$1")}] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {($ VSub_Name "$i")} {(Lit_Other "]")}) (ControlFlow token:) ] op_id: Op_DPipe ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/share/zabbix/) (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ("*")}) spids: [1075 1080] ) } ) (C {(mv)} {(DQ ($ VSub_Name "$i"))} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/share/zabbix/) ($ VSub_Name "$i")} ) ] spids: [1051 1096] ) spids: [1044 1049] ) (ControlFlow token: arg_word:{(0)}) ] spids: [903] ) spids: [899 902] ) (FuncDef name: pgsql body: (BraceGroup children: [ (Sentence child: (C {(_do_db)} {(postgresql)} { (DQ ("!") ($ VSub_Name "$pkgname") ("-mysql !") ($ VSub_Name "$pkgname") (-sqlite)) } ) terminator: ) ] spids: [1110] ) spids: [1106 1109] ) (FuncDef name: mysql body: (BraceGroup children: [ (Sentence child: (C {(_do_db)} {(mysql)} { (DQ ("!") ($ VSub_Name "$pkgname") ("-pgsql !") ($ VSub_Name "$pkgname") (-sqlite)) } ) terminator: ) ] spids: [1130] ) spids: [1126 1129] ) (FuncDef name: sqlite body: (BraceGroup children: [ (Sentence child: (C {(_do_db)} {(sqlite3)} { (DQ ("!") ($ VSub_Name "$pkgname") ("-pgsql !") ($ VSub_Name "$pkgname") (-mysql)) } ) terminator: ) ] spids: [1149] ) spids: [1146 1149] ) (FuncDef name: utils body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Zabbix client utilities"))} spids: [1173] ) ] spids: [1173] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[1179])] spids: [1179] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (C {(mv)} {(DQ ($ VSub_Name "$_builddir") (-postgresql)) (/src/zabbix_get/zabbix_get)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)} ) (C {(mv)} {(DQ ($ VSub_Name "$_builddir") (-postgresql)) (/src/zabbix_sender/zabbix_sender)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)} ) ] spids: [1170] ) spids: [1166 1169] ) (FuncDef name: webif body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Zabbix web-interface"))} spids: [1233] ) ] spids: [1233] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends) op: Equal rhs: {(DQ ($ VSub_Name "$_php_depends"))} spids: [1239] ) ] spids: [1239] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_wwwdir) op: Equal rhs: {(DQ ($ VSub_Name "$subpkgdir")) (/usr/share/webapps/zabbix)} spids: [1245] ) ] spids: [1245] ) (C {(mkdir)} {(-p)} {($ VSub_Name "$_wwwdir")}) (C {(mv)} {(DQ ($ VSub_Name "$_builddir")) (/frontends/php/) (Lit_Other "*")} {(DQ ($ VSub_Name "$_wwwdir"))} ) ] spids: [1230] ) spids: [1226 1229] ) (FuncDef name: agent body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Zabbix Network Monitoring Agent"))} spids: [1281] ) ] spids: [1281] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[1287])] spids: [1287] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:install) op: Equal rhs: {(DQ ($ VSub_Name "$subpkgname") (.pre-install))} spids: [1290] ) ] spids: [1290] ) (C {(install)} {(-d)} {(-m0750)} {(-o)} {(zabbix)} {(-g)} {(zabbix)} {(DQ ($ VSub_Name "$subpkgdir")) (/var/run/zabbix)} {(DQ ($ VSub_Name "$subpkgdir")) (/var/log/zabbix)} ) (C {(install)} {(-D)} {(-m0644)} {(DQ ($ VSub_Name "$_builddir")) (/conf/zabbix_agentd.conf)} {(DQ ($ VSub_Name "$subpkgdir")) (/etc/zabbix/zabbix_agentd.conf)} ) (C {(install)} {(-D)} {(-m0755)} {(DQ ($ VSub_Name "$srcdir")) (/zabbix-agentd.initd)} {(DQ ($ VSub_Name "$subpkgdir")) (/etc/init.d/zabbix-agentd)} ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/sbin)}) (C {(mv)} {(DQ ($ VSub_Name "$_builddir") (-postgresql)) (/src/zabbix_agent/zabbix_agentd)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/sbin/)} ) ] spids: [1278] ) spids: [1274 1277] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "42feff59e1e1dd5d69a66cc857e9076b9a6f1410b5796a719cb660ea97ccd2544fe87f3cfabc27590cc53a321d24a7977daa320be1fdff31653b3650602dd385 zabbix-3.4.2.tar.gz\n" ) ( "9998ee172a28002d98bacc3f76038ff52b8cf2b206e101418d76b4ca3de94afaf92cb4f7a6235ecf177f74beb9dd3ea1f3983c4f164b4f60bb601acba65aa175 zabbix-server.initd\n" ) ( "9c06527bf653c40585fa7eeb3f7a0b2fc454031d24cd0d1633aed87b78a681c5227a193c5b9fcfcea0839135874e27ba7dd9b198573f905f680a2856f79e9512 zabbix-server.confd\n" ) ( "523013cab3ba79cbc00db92f09d4c5d514fd6aa9cbebf8f29227dc91fbc19d2f8375af74c21d2037e4f3380a818f808194dbc94e69709ef2cf90f66e715895c4 zabbix-agentd.initd\n" ) ( "a26e7ac422ff60a4b8eed3603022c3a1bde640870bb9286ab061c3cb5c2fd7e91ddb317cb3d1cf61034adda0a080fc212ad416c9e2853a1deb03c5279753f4e2 zabbix-proxy.initd\n" ) ( "9fc413b11a01c8202c7ee1c7950d6ca3de2d2d6cd01bea994cd4bc412533b53c4e4b1f58fc3c8df16ea70902053e278e2c5dcc936ce3e0a686a6eac62310ef53 zabbix-getloadavg.patch\n" ) ( "7f70dfd602aa164ec8cc65ebb7e8274c685975f6aea9051933928051b8d9b6e368e5a673a07e7084a2105468c5085d72fa7b9f934460f10648d594f28f031a91 automake.patch\n" ) ( "72709df7624d99b2eaab8d91d95167580e80da10b3ac65b7f27f12d858f0d051d4f9143bcabceae2bfd51aeb7c4ca93e2b74670637ec0925b026e3c52475d52b musl-fix-includes.patch\n" ) ( "183e2d99800d8eebb932cb31c5a3e8742ce6a15e87aec50dc49d9c20b35840eb7ede9920aa62d2c7a5e3f584f5c3df398aa08e93f98fa537a3ba6db63b472a1f zabbix_server.conf.patch" ) ) } spids: [1391] ) ] spids: [1391] ) ] )