summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-analyzer/net-snmp/Manifest80
-rw-r--r--net-analyzer/net-snmp/files/multi-tun-segv.patch153
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.2.1-conf-elf-rpm-bz2.patch147
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.2.1-fix-64bit-interface-counters.diff29
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.2.1-fix-insecure-fixproc.diff52
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.2.2-asneeded.patch70
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.2.2-conf-elf-rpm-bz2.patch144
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.3.1-retrans-time.patch93
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch233
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch20
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.4.1-clientaddr-fix.patch63
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-lm_sensors.patch475
-rwxr-xr-xnet-analyzer/net-snmp/files/net-snmp-maxreps.patch122
-rw-r--r--net-analyzer/net-snmp/files/snmpd-5.1.conf17
-rwxr-xr-xnet-analyzer/net-snmp/files/snmpd-5.1.rc630
-rw-r--r--net-analyzer/net-snmp/files/snmpd.conf17
-rw-r--r--net-analyzer/net-snmp/files/snmpd.rc730
-rw-r--r--net-analyzer/net-snmp/files/snmptrapd.conf16
-rw-r--r--net-analyzer/net-snmp/files/snmptrapd.rc722
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.4.1-r1.ebuild202
-rw-r--r--sys-apps/net-tools/Manifest9
-rw-r--r--sys-apps/net-tools/net-tools-1.60-r13.ebuild99
-rw-r--r--sys-process/fcron/Manifest14
-rw-r--r--sys-process/fcron/fcron-3.0.4.ebuild249
-rw-r--r--www-servers/lighttpd/Manifest68
-rw-r--r--www-servers/lighttpd/files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff179
-rw-r--r--www-servers/lighttpd/files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff10
-rw-r--r--www-servers/lighttpd/files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff91
-rw-r--r--www-servers/lighttpd/files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff54
-rw-r--r--www-servers/lighttpd/files/conf/lighttpd.conf321
-rw-r--r--www-servers/lighttpd/files/conf/mime-types.conf76
-rw-r--r--www-servers/lighttpd/files/conf/mod_cgi.conf33
-rw-r--r--www-servers/lighttpd/files/conf/mod_fastcgi.conf18
-rw-r--r--www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r217
-rw-r--r--www-servers/lighttpd/files/lighttpd.confd12
-rw-r--r--www-servers/lighttpd/files/lighttpd.initd55
-rw-r--r--www-servers/lighttpd/files/lighttpd.initd-1.4.13-r367
-rw-r--r--www-servers/lighttpd/files/lighttpd.logrotate17
-rw-r--r--www-servers/lighttpd/files/spawn-fcgi.confd35
-rw-r--r--www-servers/lighttpd/files/spawn-fcgi.initd51
-rw-r--r--www-servers/lighttpd/lighttpd-1.4.18.ebuild210
41 files changed, 2383 insertions, 1317 deletions
diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest
new file mode 100644
index 00000000..11059e06
--- /dev/null
+++ b/net-analyzer/net-snmp/Manifest
@@ -0,0 +1,80 @@
+AUX multi-tun-segv.patch 7231 RMD160 d02666572b7691d9e279f2586820992b8394a2ef SHA1 c250eebb22385be994d9e7b67fbb67a0dec295ce SHA256 929cc61484fbf69134273acc3416f2644251d9a490850c901d8746b1d2f7c47a
+MD5 c6eb08e45ad70e529aa3383f5d73156a files/multi-tun-segv.patch 7231
+RMD160 d02666572b7691d9e279f2586820992b8394a2ef files/multi-tun-segv.patch 7231
+SHA256 929cc61484fbf69134273acc3416f2644251d9a490850c901d8746b1d2f7c47a files/multi-tun-segv.patch 7231
+AUX net-snmp-5.2.1-conf-elf-rpm-bz2.patch 4734 RMD160 904d195cafa4334f9d8116a3d13eff4181e06d3b SHA1 0101a446e217a95f621e634544b19490fa01c072 SHA256 893180ba84ef69381d270286f042852a200c35b7792f55fe23920a0bcb1d8fb9
+MD5 82d14deda5805e21a60de03e0a69659c files/net-snmp-5.2.1-conf-elf-rpm-bz2.patch 4734
+RMD160 904d195cafa4334f9d8116a3d13eff4181e06d3b files/net-snmp-5.2.1-conf-elf-rpm-bz2.patch 4734
+SHA256 893180ba84ef69381d270286f042852a200c35b7792f55fe23920a0bcb1d8fb9 files/net-snmp-5.2.1-conf-elf-rpm-bz2.patch 4734
+AUX net-snmp-5.2.1-fix-64bit-interface-counters.diff 1195 RMD160 c11898fcfe7964f2263c64a164b5010741be3e8b SHA1 670a0d4c5de33d79fc026cb4190f8c7f55ac9d10 SHA256 0304fe236b335eab2a42c9009e66310c03c82b9ead9886d6f558fc245f83581c
+MD5 bce531dc2d093d0659e02707c28a7b95 files/net-snmp-5.2.1-fix-64bit-interface-counters.diff 1195
+RMD160 c11898fcfe7964f2263c64a164b5010741be3e8b files/net-snmp-5.2.1-fix-64bit-interface-counters.diff 1195
+SHA256 0304fe236b335eab2a42c9009e66310c03c82b9ead9886d6f558fc245f83581c files/net-snmp-5.2.1-fix-64bit-interface-counters.diff 1195
+AUX net-snmp-5.2.1-fix-insecure-fixproc.diff 1639 RMD160 05b1099c32c2091e9606f167288a21503510cc20 SHA1 278b48283e536bc76935865ec227c402019e7df6 SHA256 100f18794f11c0d0fe43e9f50cec755158906268b4c2b560f45f8d7ff797422e
+MD5 a63107c1d81a8aeb10e84be0658e2794 files/net-snmp-5.2.1-fix-insecure-fixproc.diff 1639
+RMD160 05b1099c32c2091e9606f167288a21503510cc20 files/net-snmp-5.2.1-fix-insecure-fixproc.diff 1639
+SHA256 100f18794f11c0d0fe43e9f50cec755158906268b4c2b560f45f8d7ff797422e files/net-snmp-5.2.1-fix-insecure-fixproc.diff 1639
+AUX net-snmp-5.2.2-asneeded.patch 3014 RMD160 4394ac08e2ab0a4c57036b61b554e1bdc7c29ff2 SHA1 9c2f1e4ac9ffab8f604740b47dce9914dd0200f6 SHA256 2caa3beb56a0087e1800d875988ceaf11da0ba1eb5121804f2827d4b53a682b7
+MD5 55644512ad20558e95bedce0d6476278 files/net-snmp-5.2.2-asneeded.patch 3014
+RMD160 4394ac08e2ab0a4c57036b61b554e1bdc7c29ff2 files/net-snmp-5.2.2-asneeded.patch 3014
+SHA256 2caa3beb56a0087e1800d875988ceaf11da0ba1eb5121804f2827d4b53a682b7 files/net-snmp-5.2.2-asneeded.patch 3014
+AUX net-snmp-5.2.2-conf-elf-rpm-bz2.patch 4815 RMD160 3b716cac3df53db19b2c4eb295a5fb8045f96125 SHA1 e23506ea9f27e82d796e5896158632cb93f0f8ac SHA256 7186744012f9afe8834366c96784d9088fd6f0c306c0fc65eb0e8bbdc8cdf338
+MD5 ca3a2ba5a12a796d29087038828f2c21 files/net-snmp-5.2.2-conf-elf-rpm-bz2.patch 4815
+RMD160 3b716cac3df53db19b2c4eb295a5fb8045f96125 files/net-snmp-5.2.2-conf-elf-rpm-bz2.patch 4815
+SHA256 7186744012f9afe8834366c96784d9088fd6f0c306c0fc65eb0e8bbdc8cdf338 files/net-snmp-5.2.2-conf-elf-rpm-bz2.patch 4815
+AUX net-snmp-5.3.1-retrans-time.patch 3240 RMD160 54e63d1cc4fe9791d0889480f57cf5f651fa9a60 SHA1 8ca179d5620a1a0b38f45c04d3f790099a426828 SHA256 4ccd692d796833fba418af6653cbc33f7d24c04f6093d5e504d5c6c18cff1f6b
+MD5 5a9189510527a178f92b3b9751d20b6c files/net-snmp-5.3.1-retrans-time.patch 3240
+RMD160 54e63d1cc4fe9791d0889480f57cf5f651fa9a60 files/net-snmp-5.3.1-retrans-time.patch 3240
+SHA256 4ccd692d796833fba418af6653cbc33f7d24c04f6093d5e504d5c6c18cff1f6b files/net-snmp-5.3.1-retrans-time.patch 3240
+AUX net-snmp-5.3.1-tcp-udp-mib-byteorder.patch 9037 RMD160 4c2d25a50375f950642a49d79678532f89b36ede SHA1 adea9cce4b81e1d66757194257e9d8d489c32d96 SHA256 a806f3208729c5b3f8946d4bdf3e97c3540e99adf91b363b308adcc96b6c051b
+MD5 3f888bb1a96a76d1a54af4f0a50fceff files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch 9037
+RMD160 4c2d25a50375f950642a49d79678532f89b36ede files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch 9037
+SHA256 a806f3208729c5b3f8946d4bdf3e97c3540e99adf91b363b308adcc96b6c051b files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch 9037
+AUX net-snmp-5.4-makefile.patch 597 RMD160 90f8e6db0a05fd21c06e98b65b4bbd377f931fe9 SHA1 2ff51b2ab2df2224dd34ca1af16430fbf0b97927 SHA256 fd8c6ceda9c5d99cd92f81a7977d2134960ee14fac3ab9f1f8c6d03c6a69edb1
+MD5 d61d49e044489f4b4549cda0b7cbc336 files/net-snmp-5.4-makefile.patch 597
+RMD160 90f8e6db0a05fd21c06e98b65b4bbd377f931fe9 files/net-snmp-5.4-makefile.patch 597
+SHA256 fd8c6ceda9c5d99cd92f81a7977d2134960ee14fac3ab9f1f8c6d03c6a69edb1 files/net-snmp-5.4-makefile.patch 597
+AUX net-snmp-5.4.1-clientaddr-fix.patch 2942 RMD160 02893663d464cce39f6b54c3e27776d27fe5fe67 SHA1 fee0d795797f73de463aceaad13ebc24311763b9 SHA256 355b5661d1ecc066a8094969269b8af35e63e406a32547d6b0f8c3c57b1a4685
+MD5 68ccb8d180ff38847ed5e8d2561cbaee files/net-snmp-5.4.1-clientaddr-fix.patch 2942
+RMD160 02893663d464cce39f6b54c3e27776d27fe5fe67 files/net-snmp-5.4.1-clientaddr-fix.patch 2942
+SHA256 355b5661d1ecc066a8094969269b8af35e63e406a32547d6b0f8c3c57b1a4685 files/net-snmp-5.4.1-clientaddr-fix.patch 2942
+AUX net-snmp-lm_sensors.patch 13686 RMD160 b2e67c6f5a5347442fbaa97c9ce209f1d9bed194 SHA1 3e795339fc93306a4d662feeaa16faca2509a058 SHA256 51dc2363a687d9f4e65b0a59e767b33129d07623a0b4da07b685e406d2576b86
+MD5 25d92c9a7adcbb80240a914a8f6bbfe5 files/net-snmp-lm_sensors.patch 13686
+RMD160 b2e67c6f5a5347442fbaa97c9ce209f1d9bed194 files/net-snmp-lm_sensors.patch 13686
+SHA256 51dc2363a687d9f4e65b0a59e767b33129d07623a0b4da07b685e406d2576b86 files/net-snmp-lm_sensors.patch 13686
+AUX net-snmp-maxreps.patch 5495 RMD160 a1a958f292f780f5c4f8ec66a4ec350f261d3214 SHA1 2ed58bb7c1136452532909154a1cb2c2f322467d SHA256 5e37133da687d84cb06eea7899e1be23d9613be1d24f43e8e8555577f3d47da7
+MD5 d12c1aa77ee79717e2dba9ecc058f67c files/net-snmp-maxreps.patch 5495
+RMD160 a1a958f292f780f5c4f8ec66a4ec350f261d3214 files/net-snmp-maxreps.patch 5495
+SHA256 5e37133da687d84cb06eea7899e1be23d9613be1d24f43e8e8555577f3d47da7 files/net-snmp-maxreps.patch 5495
+AUX snmpd-5.1.conf 606 RMD160 a243da5c9dfde4a5cfb16bd7d4491cedb7879620 SHA1 5c7c45a434cb566cfec678050384f9ab6af912a9 SHA256 f569766eb6ca203a0c9549b2592d6f36ae4999cfaabc423cad5a864201a86ac9
+MD5 ed2e953a9a923caec45eeca95bec2efc files/snmpd-5.1.conf 606
+RMD160 a243da5c9dfde4a5cfb16bd7d4491cedb7879620 files/snmpd-5.1.conf 606
+SHA256 f569766eb6ca203a0c9549b2592d6f36ae4999cfaabc423cad5a864201a86ac9 files/snmpd-5.1.conf 606
+AUX snmpd-5.1.rc6 714 RMD160 1f7cef43888500044be0b0d4938574922b48bcfd SHA1 7468069b6e12b527f5a6a8026b67125f3545d243 SHA256 8f02a26a794a5c37e4cb4092ab61f82a6d7ec5876146738d4630ed147cc9ccf6
+MD5 0dbde7b1bdd9c9dc988039e676800337 files/snmpd-5.1.rc6 714
+RMD160 1f7cef43888500044be0b0d4938574922b48bcfd files/snmpd-5.1.rc6 714
+SHA256 8f02a26a794a5c37e4cb4092ab61f82a6d7ec5876146738d4630ed147cc9ccf6 files/snmpd-5.1.rc6 714
+AUX snmpd.conf 598 RMD160 c72a20fe6d4682ceea533587762782d62906b630 SHA1 51ebdca93c68ca04b7f402fad4f504422ec2c6cf SHA256 1f4f07b831c3227588fd546423137ed5c60a602fbee13b0d66edd801e4e7d598
+MD5 cc6b95963357eab99f7f2d55398d5acb files/snmpd.conf 598
+RMD160 c72a20fe6d4682ceea533587762782d62906b630 files/snmpd.conf 598
+SHA256 1f4f07b831c3227588fd546423137ed5c60a602fbee13b0d66edd801e4e7d598 files/snmpd.conf 598
+AUX snmpd.rc7 706 RMD160 137d85e5f2b7cae62e214141aabcec495777007e SHA1 8d94d3bb2d3b43e20604030dc585c735685cf99b SHA256 93337ebeac92ec0073c896db0a4384beebf84ee17365bdc2594285fd33ac7dfe
+MD5 7f66808dbbe407d788d9bd9676f5d07a files/snmpd.rc7 706
+RMD160 137d85e5f2b7cae62e214141aabcec495777007e files/snmpd.rc7 706
+SHA256 93337ebeac92ec0073c896db0a4384beebf84ee17365bdc2594285fd33ac7dfe files/snmpd.rc7 706
+AUX snmptrapd.conf 635 RMD160 aba7b7196835bd359174156a527e13188f76e248 SHA1 0d296caa01c789455c3cd4c67cd81aca5547681d SHA256 902d73cb44446df060bf20e0c8ef0f8815d5b846f96d93894913d3309a3841b3
+MD5 791cd8d81154f2c1d01e3f87b86faa44 files/snmptrapd.conf 635
+RMD160 aba7b7196835bd359174156a527e13188f76e248 files/snmptrapd.conf 635
+SHA256 902d73cb44446df060bf20e0c8ef0f8815d5b846f96d93894913d3309a3841b3 files/snmptrapd.conf 635
+AUX snmptrapd.rc7 557 RMD160 e67117fbcb0a6f8668cb1abbc8fcfcb548ebfdb5 SHA1 dcaac6c0f9e086e49f653f100e0c3f9a7f65db1d SHA256 3594345cdf3c9a5a04073ec11a54e4a19881b27288cdbf22874cca5d0a0f624c
+MD5 f12dedff94a6a3359f76a012fad7ec79 files/snmptrapd.rc7 557
+RMD160 e67117fbcb0a6f8668cb1abbc8fcfcb548ebfdb5 files/snmptrapd.rc7 557
+SHA256 3594345cdf3c9a5a04073ec11a54e4a19881b27288cdbf22874cca5d0a0f624c files/snmptrapd.rc7 557
+DIST net-snmp-5.4.1.tar.gz 5122455 RMD160 3723488dab8d164702a7d55c9c72eeaec07dd50c SHA1 ac5ba033c10d53d3057415121f8c4936c643c208 SHA256 0ea976722c993c87dede8eb6348e6feb059e3851bbef2de824bf18ac97cdb565
+EBUILD net-snmp-5.4.1-r1.ebuild 5715 RMD160 e4c073bcbcea5977fbd9789498ce956851cb50b6 SHA1 44c350833b0dd7d0ec586f40dfd46fb930a4f2da SHA256 687b4c47bf4e5e37fa284e7a1aa9f3cf7a057b61e152098aa39bd9a348a273e5
+MD5 8fc95b29e4983db685bc640d98c5d400 net-snmp-5.4.1-r1.ebuild 5715
+RMD160 e4c073bcbcea5977fbd9789498ce956851cb50b6 net-snmp-5.4.1-r1.ebuild 5715
+SHA256 687b4c47bf4e5e37fa284e7a1aa9f3cf7a057b61e152098aa39bd9a348a273e5 net-snmp-5.4.1-r1.ebuild 5715
+MD5 2e34b0d7a577176cbcf6ef8d902718fb files/digest-net-snmp-5.4.1-r1 247
+RMD160 eea7a4c51416de3c43bcf3c2404be5affd3f6118 files/digest-net-snmp-5.4.1-r1 247
+SHA256 2f2084a65a62043ef1cb434c7ed0717ed22310fa0bd3225946c19b7fb6864ecb files/digest-net-snmp-5.4.1-r1 247
diff --git a/net-analyzer/net-snmp/files/multi-tun-segv.patch b/net-analyzer/net-snmp/files/multi-tun-segv.patch
new file mode 100644
index 00000000..e47f5b79
--- /dev/null
+++ b/net-analyzer/net-snmp/files/multi-tun-segv.patch
@@ -0,0 +1,153 @@
+Index: agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c
+===================================================================
+--- agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c (revision 16711)
++++ agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c (working copy)
+@@ -258,9 +258,10 @@
+ if ((NULL != rowreq_ctx) &&
+ (MFD_SUCCESS ==
+ ipAddressTable_indexes_set(rowreq_ctx,
++ ipaddress_entry->ia_address_len + 1,
++ ipaddress_entry->ia_address,
+ ipaddress_entry->ia_address_len,
+- ipaddress_entry->ia_address,
+- ipaddress_entry->ia_address_len))) {
++ ipaddress_entry->if_index))) {
+ if (CONTAINER_INSERT(container, rowreq_ctx) < 0) {
+ DEBUGMSGTL (("ipAddressTable:access","container insert failed for new entry\n"));
+ ipAddressTable_release_rowreq_ctx(rowreq_ctx);
+Index: agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c
+===================================================================
+--- agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c (revision 16711)
++++ agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.c (working copy)
+@@ -348,10 +348,18 @@
+ *mib_ipAddressAddrType_val_ptr = INETADDRESSTYPE_IPV4;
+ break;
+
++ case INTERNAL_IPADDRESSTABLE_IPADDRESSADDRTYPE_IPV4Z:
++ *mib_ipAddressAddrType_val_ptr = INETADDRESSTYPE_IPV4Z;
++ break;
++
+ case INTERNAL_IPADDRESSTABLE_IPADDRESSADDRTYPE_IPV6:
+ *mib_ipAddressAddrType_val_ptr = INETADDRESSTYPE_IPV6;
+ break;
+
++ case INTERNAL_IPADDRESSTABLE_IPADDRESSADDRTYPE_IPV6Z:
++ *mib_ipAddressAddrType_val_ptr = INETADDRESSTYPE_IPV6Z;
++ break;
++
+ default:
+ snmp_log(LOG_ERR, "couldn't map value %ld for ipAddressAddrType\n",
+ raw_ipAddressAddrType_val);
+@@ -382,8 +390,11 @@
+ ipAddressTable_indexes_set_tbl_idx(ipAddressTable_mib_index * tbl_idx,
+ u_long ipAddressAddrType_val,
+ char *ipAddressAddr_val_ptr,
+- size_t ipAddressAddr_val_ptr_len)
++ size_t ipAddressAddr_val_ptr_len,
++ u_long ipAddressAddr_ifIndex)
+ {
++ uint32_t zone = htonl(ipAddressAddr_ifIndex);
++
+ DEBUGMSGTL(("verbose:ipAddressTable:ipAddressTable_indexes_set_tbl_idx", "called\n"));
+
+ /*
+@@ -409,6 +420,11 @@
+ memcpy(tbl_idx->ipAddressAddr, ipAddressAddr_val_ptr,
+ ipAddressAddr_val_ptr_len * sizeof(ipAddressAddr_val_ptr[0]));
+
++ /** zone */
++ tbl_idx->ipAddressAddr_len += sizeof(zone);
++ memcpy(&tbl_idx->ipAddressAddr[ipAddressAddr_val_ptr_len *
++ sizeof(ipAddressAddr_val_ptr[0])],
++ &zone, sizeof(zone));
+
+ return MFD_SUCCESS;
+ } /* ipAddressTable_indexes_set_tbl_idx */
+@@ -430,7 +446,8 @@
+ ipAddressTable_indexes_set(ipAddressTable_rowreq_ctx * rowreq_ctx,
+ u_long ipAddressAddrType_val,
+ char *ipAddressAddr_val_ptr,
+- size_t ipAddressAddr_val_ptr_len)
++ size_t ipAddressAddr_val_ptr_len,
++ u_long ipAddressAddr_ifIndex)
+ {
+ DEBUGMSGTL(("verbose:ipAddressTable:ipAddressTable_indexes_set",
+ "called\n"));
+@@ -439,7 +456,8 @@
+ ipAddressTable_indexes_set_tbl_idx(&rowreq_ctx->tbl_idx,
+ ipAddressAddrType_val,
+ ipAddressAddr_val_ptr,
+- ipAddressAddr_val_ptr_len))
++ ipAddressAddr_val_ptr_len,
++ ipAddressAddr_ifIndex))
+ return MFD_ERROR;
+
+ /*
+Index: agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_constants.h
+===================================================================
+--- agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_constants.h (revision 16711)
++++ agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_constants.h (working copy)
+@@ -106,7 +106,9 @@
+ * simplistic map of address length to type
+ */
+ #define INTERNAL_IPADDRESSTABLE_IPADDRESSADDRTYPE_IPV4 4
++#define INTERNAL_IPADDRESSTABLE_IPADDRESSADDRTYPE_IPV4Z 5
+ #define INTERNAL_IPADDRESSTABLE_IPADDRESSADDRTYPE_IPV6 16
++#define INTERNAL_IPADDRESSTABLE_IPADDRESSADDRTYPE_IPV6Z 17
+
+
+ /*************************************************************
+Index: agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h
+===================================================================
+--- agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h (revision 16711)
++++ agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h (working copy)
+@@ -273,14 +273,16 @@
+ u_long ipAddressAddrType_val,
+ char *ipAddressAddr_val_ptr,
+ size_t
+- ipAddressAddr_val_ptr_len);
++ ipAddressAddr_val_ptr_len,
++ u_long ipAddressAddr_ifIndex);
+ int ipAddressTable_indexes_set(ipAddressTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long
+ ipAddressAddrType_val,
+ char *ipAddressAddr_val_ptr,
+ size_t
+- ipAddressAddr_val_ptr_len);
++ ipAddressAddr_val_ptr_len,
++ u_long ipAddressAddr_ifIndex);
+
+
+
+Index: agent/mibgroup/ip-mib/data_access/ipaddress_common.c
+===================================================================
+--- agent/mibgroup/ip-mib/data_access/ipaddress_common.c (revision 16711)
++++ agent/mibgroup/ip-mib/data_access/ipaddress_common.c (working copy)
+@@ -411,6 +415,7 @@
+ {
+ const netsnmp_ipaddress_entry *lh = (const netsnmp_ipaddress_entry *)lhs;
+ const netsnmp_ipaddress_entry *rh = (const netsnmp_ipaddress_entry *)rhs;
++ int rc;
+
+ netsnmp_assert(NULL != lhs);
+ netsnmp_assert(NULL != rhs);
+@@ -426,5 +431,17 @@
+ /*
+ * length equal, compare address
+ */
+- return memcmp(lh->ia_address, rh->ia_address, lh->ia_address_len);
++ rc = memcmp(lh->ia_address, rh->ia_address, lh->ia_address_len);
++ if (rc)
++ return rc;
++
++ /*
++ * address same, compare ifIndex
++ */
++ if (lh->if_index < rh->if_index)
++ return -1;
++ else if (lh->if_index > rh->if_index)
++ return 1;
++
++ return 0;
+ }
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.2.1-conf-elf-rpm-bz2.patch b/net-analyzer/net-snmp/files/net-snmp-5.2.1-conf-elf-rpm-bz2.patch
new file mode 100644
index 00000000..9ba30336
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.2.1-conf-elf-rpm-bz2.patch
@@ -0,0 +1,147 @@
+--- configure.orig 2005-02-17 20:20:50.735101408 +0930
++++ configure 2005-02-17 20:36:35.883389400 +0930
+@@ -1253,7 +1253,9 @@
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-pic try to use only PIC/non-PIC objects default=use both
+ --with-libwrap=LIBPATH Compile in libwrap (tcp_wrappers) support.
++ --without-elf use elf libraries
+ --with-zlib=DIR use libz in DIR
++ --with-bzip2=DIR use libbzip2 in DIR
+
+ Some influential environment variables:
+ CC C compiler command
+@@ -5911,7 +5913,7 @@
+ case $host in
+ *-*-irix6*)
+ # Find out which ABI we are using.
+- echo '#line 5914 "configure"' > conftest.$ac_ext
++ echo '#line 5916 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+@@ -6483,7 +6485,7 @@
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
+ compiler_c_o=no
+-if { (eval echo configure:6486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
++if { (eval echo configure:6488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s out/conftest.err; then
+@@ -8447,7 +8449,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<EOF
+-#line 8450 "configure"
++#line 8452 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -8545,7 +8547,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<EOF
+-#line 8548 "configure"
++#line 8550 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -14405,6 +14407,12 @@
+
+ # nlist is needed for uptime on some sytems in the generic library
+
++# Check whether --with-elf or --without-elf was given.
++if test "${with_elf+set}" = set; then
++ withval="$with_elf"
++
++ if test "x$with_elf" != "xno"; then
++
+ echo "$as_me:$LINENO: checking for nlist in -lelf" >&5
+ echo $ECHO_N "checking for nlist in -lelf... $ECHO_C" >&6
+ if test "${ac_cv_lib_elf_nlist+set}" = set; then
+@@ -14478,6 +14486,11 @@
+
+ fi
+
++ fi
++
++fi;
++
++
+
+ # On some platforms (Irix) libnsl and libsocket should not be used.
+ echo "$as_me:$LINENO: checking for gethostbyname" >&5
+@@ -15250,7 +15263,17 @@
+
+
+ # two variants of bzip2 need checking.
+- echo "$as_me:$LINENO: checking for bzread in -lbz2" >&5
++
++# Check whether --with-bzip2 or --without-bzip2 was given.
++if test "${with_bzip2+set}" = set; then
++ withval="$with_bzip2"
++
++ if test -d "$withval"; then
++ CPPFLAGS="${CPPFLAGS} -I$withval/include"
++ LDFLAGS="${LDFLAGS} -L$withval/lib"
++ fi
++ if test "x$with_bzip2" != "xno"; then
++ echo "$as_me:$LINENO: checking for bzread in -lbz2" >&5
+ echo $ECHO_N "checking for bzread in -lbz2... $ECHO_C" >&6
+ if test "${ac_cv_lib_bz2_bzread+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -15387,6 +15410,10 @@
+
+ fi
+
++ fi
++
++fi;
++
+
+ # two variants of db1 need checking.
+ echo "$as_me:$LINENO: checking for dbopen in -ldb1" >&5
+--- configure.in.orig 2005-02-17 19:14:14.000000000 +0930
++++ configure.in 2005-02-17 20:36:18.450039672 +0930
+@@ -1,3 +1,4 @@
++Wrpm
+ # Portions of this file are subject to the following copyright. See
+ # the Net-SNMP's COPYING file for more details and other copyrights
+ # that may apply:
+@@ -2172,7 +2173,14 @@
+ # AC_CHECK_LIB(des, main)
+ AC_CHECK_LIB(m, asin)
+ # nlist is needed for uptime on some sytems in the generic library
+-AC_CHECK_LIB(elf, nlist)
++ AC_ARG_WITH(elf,
++ [ --without-elf use elf libraries],[
++ if test "x$with_elf" != "xno"; then
++ AC_CHECK_LIB(elf, nlist)
++ fi
++ ])
++
++
+
+ # On some platforms (Irix) libnsl and libsocket should not be used.
+ AC_CHECK_FUNC(gethostbyname, AC_DEFINE(HAVE_GETHOSTBYNAME),
+@@ -2219,8 +2227,18 @@
+ CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
+
+ # two variants of bzip2 need checking.
+- AC_CHECK_LIB(bz2, bzread, [_rpmlibs="$_rpmlibs -lbz2"],
+- AC_CHECK_LIB(bz2, BZ2_bzread, [_rpmlibs="$_rpmlibs -lbz2"],))
++ AC_ARG_WITH(bzip2,
++ [ --with-bzip2[=DIR] use libbzip2 in DIR],[
++ if test -d "$withval"; then
++ CPPFLAGS="${CPPFLAGS} -I$withval/include"
++ LDFLAGS="${LDFLAGS} -L$withval/lib"
++ fi
++ if test "x$with_bzip2" != "xno"; then
++ AC_CHECK_LIB(bz2, bzread, [_rpmlibs="$_rpmlibs -lbz2"],
++ AC_CHECK_LIB(bz2, BZ2_bzread, [_rpmlibs="$_rpmlibs -lbz2"],))
++ fi
++ ])
++
+
+ # two variants of db1 need checking.
+ AC_CHECK_LIB(db1, dbopen, [_rpmlibs="-ldb1 $_rpmlibs"],
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.2.1-fix-64bit-interface-counters.diff b/net-analyzer/net-snmp/files/net-snmp-5.2.1-fix-64bit-interface-counters.diff
new file mode 100644
index 00000000..18515d44
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.2.1-fix-64bit-interface-counters.diff
@@ -0,0 +1,29 @@
+diff -u -p -r5.33 interfaces.c
+--- agent/mibgroup/mibII/interfaces.c 9 May 2005 20:06:02 -0000 5.33
++++ agent/mibgroup/mibII/interfaces.c 9 Jun 2005 20:08:04 -0000
+@@ -1552,19 +1552,19 @@ Interface_Scan_Init(void)
+ if (!strcmp(ifname_buf, "lo") && rec_pkt > 0 && !snd_pkt)
+ snd_pkt = rec_pkt;
+
+- nnew->if_ipackets = rec_pkt;
++ nnew->if_ipackets = rec_pkt & 0xffffffff;
+ nnew->if_ierrors = rec_err;
+- nnew->if_opackets = snd_pkt;
++ nnew->if_opackets = snd_pkt & 0xffffffff;
+ nnew->if_oerrors = snd_err;
+ nnew->if_collisions = coll;
+ if (scan_line_to_use == scan_line_2_2) {
+- nnew->if_ibytes = rec_oct;
+- nnew->if_obytes = snd_oct;
++ nnew->if_ibytes = rec_oct & 0xffffffff;
++ nnew->if_obytes = snd_oct & 0xffffffff;
+ nnew->if_iqdrops = rec_drop;
+ nnew->if_snd.ifq_drops = snd_drop;
+ } else {
+- nnew->if_ibytes = rec_pkt * 308;
+- nnew->if_obytes = snd_pkt * 308;
++ nnew->if_ibytes = (rec_pkt * 308) & 0xffffffff;
++ nnew->if_obytes = (snd_pkt * 308) & 0xffffffff;
+ }
+
+ /*
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.2.1-fix-insecure-fixproc.diff b/net-analyzer/net-snmp/files/net-snmp-5.2.1-fix-insecure-fixproc.diff
new file mode 100644
index 00000000..cad67929
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.2.1-fix-insecure-fixproc.diff
@@ -0,0 +1,52 @@
+--- local/fixproc.orig 2005-05-18 09:57:16.000000000 -0400
++++ local/fixproc 2005-05-18 11:00:38.000000000 -0400
+@@ -129,6 +129,9 @@
+ #
+ # Timothy Kong 3/1995
+
++require File::Temp;
++use File::Temp();
++
+ $database_file = '/local/etc/fixproc.conf';
+
+ $debug = 0; # specify debug level using -dN
+@@ -196,7 +199,6 @@
+ printf (stderr "create_sh_script\n") if ($debug > 0);
+
+ $! = $fixproc_error;
+- open (file, ">"."$file") || die "$0: cannot open $file\n";
+ while ( $shell_lines[$i] ne $shell_end_marker )
+ {
+ printf (file "%s", $shell_lines[$i]);
+@@ -231,13 +233,13 @@
+ {
+ # it must be "shell", so execute the shell script defined in database
+
+- local ($tmpfile) = "/tmp/fix_$$";
++ local ($tmpfile) = new File::Temp(TEMPLATE => 'fix_XXXXX',
++ DIR => '/tmp');
+
+ &create_sh_script ($fix{$proc}, $tmpfile);
+
+ # return code is number divided by 256
+ $error_code = (system "$tmpfile") / 256;
+- system "rm $tmpfile";
+ return ($fix_failed_error) if ($error_code != 0);
+ # sleep needed here?
+ return &do_exist ($proc);
+@@ -262,13 +264,13 @@
+ # if not "exist", then it must be "shell", so execute the shell script
+ # defined in database
+
+- local ($tmpfile) = "/tmp/check_$$";
++ local ($tmpfile) = new File::Temp(TEMPLATE => 'check_XXXXXX',
++ DIR => '/tmp');
+
+ &create_sh_script ($check{$proc}, $tmpfile);
+
+ # return code is number divided by 256
+ $error_code = (system "$tmpfile") / 256;
+- system "rm $tmpfile";
+ return ($check_failed_error) if ($error_code != 0);
+
+ # check passed, continue
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.2.2-asneeded.patch b/net-analyzer/net-snmp/files/net-snmp-5.2.2-asneeded.patch
new file mode 100644
index 00000000..12af501d
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.2.2-asneeded.patch
@@ -0,0 +1,70 @@
+Index: net-snmp-5.2.2/snmplib/Makefile.in
+===================================================================
+--- net-snmp-5.2.2.orig/snmplib/Makefile.in
++++ net-snmp-5.2.2/snmplib/Makefile.in
+@@ -185,11 +185,11 @@ all: standardall
+
+ # how to build the libraries.
+ libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION): ${TOBJS}
+- $(LIB_LD_CMD) libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) ${TOBJS}
++ $(LIB_LD_CMD) libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) ${TOBJS} @LIBCRYPTO@
+ $(RANLIB) libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION)
+
+ libsnmp.$(LIB_EXTENSION)$(LIB_VERSION): ${TOBJS}
+- $(LIB_LD_CMD) libsnmp.$(LIB_EXTENSION)$(LIB_VERSION) ${TOBJS}
++ $(LIB_LD_CMD) libsnmp.$(LIB_EXTENSION)$(LIB_VERSION) ${TOBJS} @LIBCRYPTO@
+ $(RANLIB) libsnmp.$(LIB_EXTENSION)$(LIB_VERSION)
+
+ #
+Index: net-snmp-5.2.2/configure.in
+===================================================================
+--- net-snmp-5.2.2.orig/configure.in
++++ net-snmp-5.2.2/configure.in
+@@ -2362,11 +2362,12 @@ if test $? -eq 0 ; then
+ *)
+ AC_CHECK_HEADER(sensors/sensors.h,,
+ [AC_MSG_ERROR([asked to use lm_sensors but I couldn't find sensors/sensors.h])])
+- AC_CHECK_LIB(sensors, sensors_get_detected_chips, LIBS="${LIBS} -lsensors",
++ AC_CHECK_LIB(sensors, sensors_get_detected_chips, SENSORLIBS="-lsensors",
+ [AC_MSG_ERROR([asked to use lm_sensors but I couldn't find -lsensors])])
+ ;;
+ esac
+ fi
++AC_SUBST(SENSORLIBS)
+
+ #
+ # Install the various perl modules
+@@ -2691,6 +2692,7 @@ if test "x$useopenssl" != "xno" ; then
+ encrmodes="[disabled]"
+ fi
+ AC_DEFINE(USE_OPENSSL)
++ LIBCRYPTO="-lcrypto"
+ AC_MSG_RESULT(OpenSSL Support)
+ elif test "x$usepkcs" != "xno" ; then
+ authmodes="MD5 SHA1"
+@@ -2710,6 +2712,7 @@ fi
+ if test "x$enable_md5" = "xno"; then
+ authmodes=`echo $authmodes | sed 's/MD5 *//;'`
+ fi
++AC_SUBST(LIBCRYPTO)
+
+ AC_MSG_CACHE_ADD(Authentication support: $authmodes)
+ AC_MSG_CACHE_ADD(Encryption support: $encrmodes)
+Index: net-snmp-5.2.2/agent/Makefile.in
+===================================================================
+--- net-snmp-5.2.2.orig/agent/Makefile.in
++++ net-snmp-5.2.2/agent/Makefile.in
+@@ -130,11 +130,11 @@ snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS)
+
+
+ libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
+- $(LIB_LD_CMD) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS} $(LIB_LD_LIBS)
++ $(LIB_LD_CMD) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS} $(LIB_LD_LIBS) helpers/libnetsnmphelpers.la
+ $(RANLIB) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION)
+
+ libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS}
+- $(LIB_LD_CMD) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS} $(LIB_LD_LIBS)
++ $(LIB_LD_CMD) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS} $(LIB_LD_LIBS) @SENSORLIBS@
+ $(RANLIB) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
+
+ embedperlinstall:
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.2.2-conf-elf-rpm-bz2.patch b/net-analyzer/net-snmp/files/net-snmp-5.2.2-conf-elf-rpm-bz2.patch
new file mode 100644
index 00000000..362fcbcc
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.2.2-conf-elf-rpm-bz2.patch
@@ -0,0 +1,144 @@
+diff --exclude='*~' -Naur net-snmp-5.2.2.orig/configure net-snmp-5.2.2/configure
+--- net-snmp-5.2.2.orig/configure 2005-12-26 19:05:44.000000000 -0200
++++ net-snmp-5.2.2/configure 2005-12-26 19:10:47.000000000 -0200
+@@ -1254,7 +1254,9 @@
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-pic try to use only PIC/non-PIC objects default=use both
+ --with-libwrap=LIBPATH Compile in libwrap (tcp_wrappers) support.
++ --without-elf use elf libraries
+ --with-zlib=DIR use libz in DIR
++ --with-bzip2=DIR use libbzip2 in DIR
+
+ Some influential environment variables:
+ CC C compiler command
+@@ -5935,7 +5937,7 @@
+ case $host in
+ *-*-irix6*)
+ # Find out which ABI we are using.
+- echo '#line 5938 "configure"' > conftest.$ac_ext
++ echo '#line 5940 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+@@ -6507,7 +6509,7 @@
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
+ compiler_c_o=no
+-if { (eval echo configure:6510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
++if { (eval echo configure:6512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s out/conftest.err; then
+@@ -8471,7 +8473,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<EOF
+-#line 8474 "configure"
++#line 8476 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -13996,6 +13998,12 @@
+
+ # nlist is needed for uptime on some sytems in the generic library
+ # add hosts which don't use nlist to the blank first line
++# Check whether --with-elf or --without-elf was given.
++if test "${with_elf+set}" = set; then
++ withval="$with_elf"
++
++ if test "x$with_elf" != "xno"; then
++
+ case $target_os in
+ linux*) ;;
+ irix*) # Check for nlist in mld (irix)
+@@ -14226,6 +14234,10 @@
+ ;;
+ esac
+
++ fi
++
++fi;
++
+ # On some platforms (Irix) libnsl and libsocket should not be used.
+ echo "$as_me:$LINENO: checking for gethostbyname" >&5
+ echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+@@ -16020,7 +16032,16 @@
+
+
+ # two variants of bzip2 need checking.
+- echo "$as_me:$LINENO: checking for bzread in -lbz2" >&5
++# Check whether --with-bzip2 or --without-bzip2 was given.
++if test "${with_bzip2+set}" = set; then
++ withval="$with_bzip2"
++
++ if test -d "$withval"; then
++ CPPFLAGS="${CPPFLAGS} -I$withval/include"
++ LDFLAGS="${LDFLAGS} -L$withval/lib"
++ fi
++ if test "x$with_bzip2" != "xno"; then
++ echo "$as_me:$LINENO: checking for bzread in -lbz2" >&5
+ echo $ECHO_N "checking for bzread in -lbz2... $ECHO_C" >&6
+ if test "${ac_cv_lib_bz2_bzread+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -16157,6 +16178,9 @@
+
+ fi
+
++ fi
++
++fi;
+
+ # two variants of db1 need checking.
+ echo "$as_me:$LINENO: checking for dbopen in -ldb1" >&5
+diff --exclude='*~' -Naur net-snmp-5.2.2.orig/configure.in net-snmp-5.2.2/configure.in
+--- net-snmp-5.2.2.orig/configure.in 2005-12-26 19:05:44.000000000 -0200
++++ net-snmp-5.2.2/configure.in 2005-12-26 19:23:50.000000000 -0200
+@@ -1,3 +1,4 @@
++Wrpm
+ # Portions of this file are subject to the following copyright. See
+ # the Net-SNMP's COPYING file for more details and other copyrights
+ # that may apply:
+@@ -2152,11 +2153,21 @@
+ case $target_os in
+ linux*) ;;
+ irix*) # Check for nlist in mld (irix)
+- AC_CHECK_LIB(elf, nlist)
++ AC_ARG_WITH(elf,
++ [ --without-elf use elf libraries],[
++ if test "x$with_elf" != "xno"; then
++ AC_CHECK_LIB(elf, nlist)
++ fi
++ ])
+ AC_CHECK_LIB(mld, nlist)
+ ;;
+ *) # default
+- AC_CHECK_LIB(elf, nlist)
++ AC_ARG_WITH(elf,
++ [ --without-elf use elf libraries],[
++ if test "x$with_elf" != "xno"; then
++ AC_CHECK_LIB(elf, nlist)
++ fi
++ ])
+ ;;
+ esac
+
+@@ -2280,8 +2291,17 @@
+ CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
+
+ # two variants of bzip2 need checking.
+- AC_CHECK_LIB(bz2, bzread, [_rpmlibs="$_rpmlibs -lbz2"],
+- AC_CHECK_LIB(bz2, BZ2_bzread, [_rpmlibs="$_rpmlibs -lbz2"],))
++ AC_ARG_WITH(bzip2,
++ [ --with-bzip2[=DIR] use libbzip2 in DIR],[
++ if test -d "$withval"; then
++ CPPFLAGS="${CPPFLAGS} -I$withval/include"
++ LDFLAGS="${LDFLAGS} -L$withval/lib"
++ fi
++ if test "x$with_bzip2" != "xno"; then
++ AC_CHECK_LIB(bz2, bzread, [_rpmlibs="$_rpmlibs -lbz2"],
++ AC_CHECK_LIB(bz2, BZ2_bzread, [_rpmlibs="$_rpmlibs -lbz2"],))
++ fi
++ ])
+
+ # two variants of db1 need checking.
+ AC_CHECK_LIB(db1, dbopen, [_rpmlibs="-ldb1 $_rpmlibs"],
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.3.1-retrans-time.patch b/net-analyzer/net-snmp/files/net-snmp-5.3.1-retrans-time.patch
new file mode 100644
index 00000000..45eb35cf
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.3.1-retrans-time.patch
@@ -0,0 +1,93 @@
+Index: agent/mibgroup/if-mib/data_access/interface_linux.c
+===================================================================
+--- agent/mibgroup/if-mib/data_access/interface_linux.c.orig
++++ agent/mibgroup/if-mib/data_access/interface_linux.c
+@@ -22,6 +22,8 @@
+ #include "interface_ioctl.h"
+
+ #include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
+
+ #ifdef HAVE_LINUX_ETHTOOL_H
+ #include <sys/types.h>
+@@ -40,6 +42,10 @@ unsigned int
+ netsnmp_linux_interface_get_if_speed_mii(int fd, const char *name);
+ #endif
+
++#define PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS "/proc/sys/net/ipv%d/neigh/%s/retrans_time_ms"
++#define PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME "/proc/sys/net/ipv%d/neigh/%s/retrans_time"
++static char *proc_sys_retrans_time;
++static unsigned short retrans_time_factor = 0;
+
+ void
+ netsnmp_arch_interface_init(void)
+@@ -47,6 +53,20 @@ netsnmp_arch_interface_init(void)
+ /*
+ * nothing to do
+ */
++ char proc_path[64+IF_NAMESIZE];
++ char proc_path2[64+IF_NAMESIZE];
++ struct stat st;
++
++ snprintf(proc_path, sizeof(proc_path), PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS, 6, "default");
++ snprintf(proc_path2, sizeof(proc_path2), PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS, 4, "default");
++
++ if ((stat(proc_path, &st) == 0) || (stat(proc_path2, &st) == 0)) {
++ proc_sys_retrans_time = PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME_MS;
++ }
++ else {
++ proc_sys_retrans_time = PROC_SYS_NET_IPVx_NEIGH_RETRANS_TIME;
++ retrans_time_factor = 10;
++ }
+ }
+
+ /*
+@@ -161,7 +181,7 @@ _arch_interface_flags_v4_get(netsnmp_int
+ /*
+ * get the retransmit time
+ */
+- snprintf(line,sizeof(line),"/proc/sys/net/ipv4/neigh/%s/retrans_time",
++ snprintf(line,sizeof(line),proc_sys_retrans_time, 4,
+ entry->name);
+ if (!(fin = fopen(line, "r"))) {
+ DEBUGMSGTL(("access:interface",
+@@ -169,7 +189,12 @@ _arch_interface_flags_v4_get(netsnmp_int
+ }
+ else {
+ if (fgets(line, sizeof(line), fin)) {
+- entry->retransmit_v4 = atoi(line) * 100;
++ if (retrans_time_factor) {
++ entry->retransmit_v4 = atoi(line) * retrans_time_factor;
++ }
++ else {
++ entry->retransmit_v4 = atoi(line);
++ };
+ entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_V4_RETRANSMIT;
+ }
+ fclose(fin);
+@@ -191,7 +216,7 @@ _arch_interface_flags_v6_get(netsnmp_int
+ /*
+ * get the retransmit time
+ */
+- snprintf(line,sizeof(line),"/proc/sys/net/ipv6/neigh/%s/retrans_time",
++ snprintf(line,sizeof(line),proc_sys_retrans_time, 6,
+ entry->name);
+ if (!(fin = fopen(line, "r"))) {
+ DEBUGMSGTL(("access:interface",
+@@ -199,7 +224,12 @@ _arch_interface_flags_v6_get(netsnmp_int
+ }
+ else {
+ if (fgets(line, sizeof(line), fin)) {
+- entry->retransmit_v6 = atoi(line);
++ if (retrans_time_factor) {
++ entry->retransmit_v6 = atoi(line) * retrans_time_factor;
++ }
++ else {
++ entry->retransmit_v6 = atoi(line);
++ };
+ entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_V6_RETRANSMIT;
+ }
+ fclose(fin);
+
+
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch b/net-analyzer/net-snmp/files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch
new file mode 100644
index 00000000..389cd2bf
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.3.1-tcp-udp-mib-byteorder.patch
@@ -0,0 +1,233 @@
+Index: agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c
+===================================================================
+RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c,v
+retrieving revision 1.5.2.1
+diff -u -p -u -r1.5.2.1 tcpConn_linux.c
+--- agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c 17 Aug 2006 08:52:15 -0000 1.5.2.1
++++ agent/mibgroup/tcp-mib/data_access/tcpConn_linux.c 1 Sep 2006 17:15:23 -0000
+@@ -169,11 +169,20 @@ _load4(netsnmp_container *container, u_i
+ break;
+ }
+
+- entry->loc_port = htons((unsigned short) local_port);
+- entry->rmt_port = htons((unsigned short) remote_port);
++ /** oddly enough, these appear to already be in network order */
++ entry->loc_port = (unsigned short) local_port;
++ entry->rmt_port = (unsigned short) remote_port;
+ entry->tcpConnState = state;
++
++ /** the addr string may need work */
+ buf_len = strlen(local_addr);
+- netsnmp_assert(8 == buf_len);
++ if ((8 != buf_len) ||
++ (-1 == netsnmp_addrstr_hton(local_addr, 8))) {
++ DEBUGMSGT(("verbose:access:tcpconn:container",
++ " error processing local address\n"));
++ netsnmp_access_tcpconn_entry_free(entry);
++ continue;
++ }
+ offset = 0;
+ tmp_ptr = entry->loc_addr;
+ rc = netsnmp_hex_to_binary(&tmp_ptr, &buf_len,
+@@ -188,8 +197,15 @@ _load4(netsnmp_container *container, u_i
+ continue;
+ }
+
+- buf_len = strlen(remote_addr);
+- netsnmp_assert(8 == buf_len);
++ /** the addr string may need work */
++ buf_len = strlen((char*)remote_addr);
++ if ((8 != buf_len) ||
++ (-1 == netsnmp_addrstr_hton(remote_addr, 8))) {
++ DEBUGMSGT(("verbose:access:tcpconn:container",
++ " error processing remote address\n"));
++ netsnmp_access_tcpconn_entry_free(entry);
++ continue;
++ }
+ offset = 0;
+ tmp_ptr = entry->rmt_addr;
+ rc = netsnmp_hex_to_binary(&tmp_ptr, &buf_len,
+@@ -244,6 +260,8 @@ _load6(netsnmp_container *container, u_i
+ fgets(line, sizeof(line), in); /* skip header */
+
+ /*
++ * Note: PPC (big endian)
++ *
+ * sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode
+ * 0: 00000000000000000000000000000001:1466 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000 500 0 326699 1 efb81580 3000 0 0 2 -1
+ */
+@@ -291,11 +309,20 @@ _load6(netsnmp_container *container, u_i
+ break;
+ }
+
+- entry->loc_port = htons((unsigned short) local_port);
+- entry->rmt_port = htons((unsigned short) remote_port);
++ /** oddly enough, these appear to already be in network order */
++ entry->loc_port = (unsigned short) local_port;
++ entry->rmt_port = (unsigned short) remote_port;
+ entry->tcpConnState = state;
+
+- buf_len = strlen(local_addr);
++ /** the addr string may need work */
++ buf_len = strlen((char*)local_addr);
++ if ((32 != buf_len) ||
++ (-1 == netsnmp_addrstr_hton(local_addr, 32))) {
++ DEBUGMSGT(("verbose:access:tcpconn:container",
++ " error processing local address\n"));
++ netsnmp_access_tcpconn_entry_free(entry);
++ continue;
++ }
+ offset = 0;
+ tmp_ptr = entry->loc_addr;
+ rc = netsnmp_hex_to_binary(&tmp_ptr, &buf_len,
+@@ -310,7 +337,14 @@ _load6(netsnmp_container *container, u_i
+ continue;
+ }
+
+- buf_len = strlen(remote_addr);
++ buf_len = strlen((char*)remote_addr);
++ if ((32 != buf_len) ||
++ (-1 == netsnmp_addrstr_hton(remote_addr, 32))) {
++ DEBUGMSGT(("verbose:access:tcpconn:container",
++ " error processing remote address\n"));
++ netsnmp_access_tcpconn_entry_free(entry);
++ continue;
++ }
+ offset = 0;
+ tmp_ptr = entry->rmt_addr;
+ rc = netsnmp_hex_to_binary(&tmp_ptr, &buf_len,
+Index: agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c
+===================================================================
+RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c,v
+retrieving revision 1.2.2.1
+diff -u -p -u -r1.2.2.1 udp_endpoint_linux.c
+--- agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c 25 Jan 2006 16:27:40 -0000 1.2.2.1
++++ agent/mibgroup/udp-mib/data_access/udp_endpoint_linux.c 1 Sep 2006 17:15:23 -0000
+@@ -112,9 +112,9 @@ _process_line_udp_ep(netsnmp_line_info *
+ struct netsnmp_line_process_info_s* lpi)
+ {
+ netsnmp_udp_endpoint_entry *ep = (netsnmp_udp_endpoint_entry *)mem;
+- char *ptr;
++ char *ptr, *sep;
+ u_char *u_ptr;
+- size_t u_ptr_len, offset;
++ size_t u_ptr_len, offset, len;
+
+ /*
+ * skip 'sl'
+@@ -135,10 +135,22 @@ _process_line_udp_ep(netsnmp_line_info *
+ /*
+ * get local address. ignore error on hex conversion, since that
+ * function doesn't like the ':' between address and port. check the
+- * offset to see if it worked.
++ * offset to see if it worked. May need to flip string too.
+ */
+ u_ptr = ep->loc_addr;
+ u_ptr_len = sizeof(ep->loc_addr);
++ sep = strchr(ptr, ':');
++ if (NULL == sep) {
++ DEBUGMSGTL(("text:util:tvi", "no ':' '%s'\n",
++ line_info->start));
++ return PMLP_RC_MEMORY_UNUSED;
++ }
++ len = (sep - ptr);
++ if (-1 == netsnmp_addrstr_hton(ptr, len)) {
++ DEBUGMSGTL(("text:util:tvi", "bad length %d for loc addr '%s'\n",
++ u_ptr_len, line_info->start));
++ return PMLP_RC_MEMORY_UNUSED;
++ }
+ offset = 0;
+ netsnmp_hex_to_binary(&u_ptr, &u_ptr_len, &offset, 0, ptr, NULL);
+ if ((4 != offset) && (16 != offset)) {
+@@ -159,14 +171,26 @@ _process_line_udp_ep(netsnmp_line_info *
+ /*
+ * get remote address. ignore error on hex conversion, since that
+ * function doesn't like the ':' between address and port. check the
+- * offset to see if it worked.
++ * offset to see if it worked. May need to flip string too.
+ */
+ u_ptr = ep->rmt_addr;
+ u_ptr_len = sizeof(ep->rmt_addr);
++ sep = strchr(ptr, ':');
++ if (NULL == sep) {
++ DEBUGMSGTL(("text:util:tvi", "no ':' '%s'\n",
++ line_info->start));
++ return PMLP_RC_MEMORY_UNUSED;
++ }
++ len = (sep - ptr);
++ if (-1 == netsnmp_addrstr_hton(ptr, len)) {
++ DEBUGMSGTL(("text:util:tvi", "bad length %d for rmt addr '%s'\n",
++ u_ptr_len, line_info->start));
++ return PMLP_RC_MEMORY_UNUSED;
++ }
+ offset = 0;
+ netsnmp_hex_to_binary(&u_ptr, &u_ptr_len, &offset, 0, ptr, NULL);
+ if ((4 != offset) && (16 != offset)) {
+- DEBUGMSGTL(("text:util:tvi", "bad offset %d for loc addr '%s'\n",
++ DEBUGMSGTL(("text:util:tvi", "bad offset %d for rmt addr '%s'\n",
+ offset, line_info->start));
+ return PMLP_RC_MEMORY_UNUSED;
+ }
+Index: include/net-snmp/library/tools.h
+===================================================================
+RCS file: /cvsroot/net-snmp/net-snmp/include/net-snmp/library/tools.h,v
+retrieving revision 5.8.2.2
+diff -u -p -u -r5.8.2.2 tools.h
+--- include/net-snmp/library/tools.h 13 Jun 2006 12:50:36 -0000 5.8.2.2
++++ include/net-snmp/library/tools.h 1 Sep 2006 17:15:24 -0000
+@@ -198,7 +198,9 @@ extern "C" {
+ int marker_tticks(marker_t pm);
+ int timeval_tticks(struct timeval *tv);
+ char *netsnmp_getenv(const char *name);
+-
++
++ int netsnmp_addrstr_hton(char *ptr, size_t len);
++
+ #ifdef __cplusplus
+ }
+ #endif
+Index: snmplib/tools.c
+===================================================================
+RCS file: /cvsroot/net-snmp/net-snmp/snmplib/tools.c,v
+retrieving revision 5.10.2.2
+diff -u -p -u -r5.10.2.2 tools.c
+--- snmplib/tools.c 25 Jul 2006 08:04:35 -0000 5.10.2.2
++++ snmplib/tools.c 1 Sep 2006 17:15:26 -0000
+@@ -1042,3 +1042,35 @@ char *netsnmp_getenv(const char *name)
+ #endif
+ }
+
++/*
++ * swap the order of an inet addr string
++ */
++int
++netsnmp_addrstr_hton(char *ptr, size_t len)
++{
++#ifndef WORDS_BIGENDIAN
++ char tmp[8];
++
++ if (8 == len) {
++ tmp[0] = ptr[6];
++ tmp[1] = ptr[7];
++ tmp[2] = ptr[4];
++ tmp[3] = ptr[5];
++ tmp[4] = ptr[2];
++ tmp[5] = ptr[3];
++ tmp[6] = ptr[0];
++ tmp[7] = ptr[1];
++ memcpy (ptr, &tmp, 8);
++ }
++ else if (32 == len) {
++ netsnmp_addrstr_hton(ptr , 8);
++ netsnmp_addrstr_hton(ptr+8 , 8);
++ netsnmp_addrstr_hton(ptr+16, 8);
++ netsnmp_addrstr_hton(ptr+24, 8);
++ }
++ else
++ return -1;
++#endif
++
++ return 0;
++}
+
+
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch b/net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch
new file mode 100644
index 00000000..7b7ba127
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch
@@ -0,0 +1,20 @@
+diff -ru net-snmp-5.4~/agent/mibgroup/Makefile.in net-snmp-5.4/agent/mibgroup/Makefile.in
+--- net-snmp-5.4~/agent/mibgroup/Makefile.in 2006-11-26 16:43:18.000000000 +0100
++++ net-snmp-5.4/agent/mibgroup/Makefile.in 2006-11-26 16:44:49.000000000 +0100
+@@ -22,9 +22,13 @@
+ .c.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
+-OBJS = @mib_module_list_o@
+-LOBJS = @mib_module_list_lo@
+-SRCS = @mib_module_list_c@
++@mib_module_list_o@
++@mib_module_list_lo@
++@mib_module_list_c@
++
++OBJS = $(mib_module_list_o)
++LOBJS = $(mib_module_list_lo)
++SRCS = $(mib_module_list_c)
+
+ all: standardall $(LOBJS)
+
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.4.1-clientaddr-fix.patch b/net-analyzer/net-snmp/files/net-snmp-5.4.1-clientaddr-fix.patch
new file mode 100644
index 00000000..116e524f
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.4.1-clientaddr-fix.patch
@@ -0,0 +1,63 @@
+Fix clientaddr functionality.
+
+Previously, the clientaddr option in snmp.conf was parsed, but the actual
+clientaddr was used to bind(), yet sendmsg() was still called with 0.0.0.0.
+
+This patch alters:
+- netsnmp_udp_fmtaddr: include both sides of addr_pair for debugging.
+- netsnmp_udp_transport: Set addr_pair->local_addr in the remote && client_socket path.
+- netsnmp_udp_transport: Print a debugging error on failure to bind()
+- netsnmp_udp_transport: Print out the full client open addr_pair data.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+Status: Merged in upstream r16654
+Tracking-URL: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=1775124&group_id=12694
+
+diff -NuwbBar --exclude docs --exclude '*.o' --exclude 'config.*' --exclude perl --exclude '*~' net-snmp-5.4.old/snmplib/snmpUDPDomain.c net-snmp-5.4/snmplib/snmpUDPDomain.c
+--- net-snmp-5.4.old/snmplib/snmpUDPDomain.c 2006-09-19 16:42:17.000000000 -0700
++++ net-snmp-5.4/snmplib/snmpUDPDomain.c 2007-08-15 19:17:27.000000000 -0700
+@@ -100,12 +100,15 @@ netsnmp_udp_fmtaddr(netsnmp_transport *t
+ struct sockaddr_in *to = NULL;
+ char tmp[64];
+ to = (struct sockaddr_in *) &(addr_pair->remote_addr);
++ /* Using strdup on the output of inet_ntoa is important! */
+ if (to == NULL) {
+- return strdup("UDP: unknown");
++ sprintf(tmp, "UDP: [%s]->unknown",
++ strdup(inet_ntoa(addr_pair->local_addr)));
++ } else {
++ sprintf(tmp, "UDP: [%s]->[%s]:%hu",
++ strdup(inet_ntoa(addr_pair->local_addr)),
++ strdup(inet_ntoa(to->sin_addr)), ntohs(to->sin_port));
+ }
+-
+- sprintf(tmp, "UDP: [%s]:%hu",
+- inet_ntoa(to->sin_addr), ntohs(to->sin_port));
+ return strdup(tmp);
+ }
+ }
+@@ -670,11 +673,23 @@ netsnmp_udp_transport(struct sockaddr_in
+ NETSNMP_DS_LIB_CLIENT_ADDR);
+ if (client_socket) {
+ struct sockaddr_in client_addr;
++ int ret;
+ netsnmp_sockaddr_in2(&client_addr, client_socket, NULL);
++ addr_pair.local_addr = client_addr.sin_addr;
+ client_addr.sin_port = 0;
+- bind(t->sock, (struct sockaddr *)&client_addr,
++ ret = bind(t->sock, (struct sockaddr *)&client_addr,
+ sizeof(struct sockaddr));
++ if(ret)
++ DEBUGMSGTL(("netsnmp_udp", "failed to bind for clientaddr: %d %s\n",
++ errno,strerror(errno)));
++ /* TODO: should we exit here? */
+ }
++
++ str = netsnmp_udp_fmtaddr(NULL, (void *)&addr_pair,
++ sizeof(netsnmp_udp_addr_pair));
++ DEBUGMSGTL(("netsnmp_udp", "client open %s\n", str));
++ free(str);
++
+ /*
+ * Save the (remote) address in the
+ * transport-specific data pointer for later use by netsnmp_udp_send.
diff --git a/net-analyzer/net-snmp/files/net-snmp-lm_sensors.patch b/net-analyzer/net-snmp/files/net-snmp-lm_sensors.patch
new file mode 100644
index 00000000..29ba1ea8
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-lm_sensors.patch
@@ -0,0 +1,475 @@
+diff -Naur net-snmp-5.1.1.old/agent/mibgroup/host/hr_sensor.c net-snmp-5.1.1/agent/mibgroup/host/hr_sensor.c
+--- net-snmp-5.1.1.old/agent/mibgroup/host/hr_sensor.c 1970-01-01 02:00:00.000000000 +0200
++++ net-snmp-5.1.1/agent/mibgroup/host/hr_sensor.c 2003-10-21 12:49:57.000000000 +0300
+@@ -0,0 +1,322 @@
++/* This file was generated by mib2c and is intended for use as a mib module
++ for the ucd-snmp snmpd agent. */
++
++#include <net-snmp/net-snmp-config.h>
++
++#include <stdio.h>
++#if HAVE_STDLIB_H
++#include <stdlib.h>
++#endif
++#if HAVE_STRING_H
++#include <string.h>
++#else
++#include <strings.h>
++#endif
++
++#include <getopt.h>
++#include <errno.h>
++#include <dlfcn.h>
++
++#include "sensors/sensors.h"
++#include "sensors/error.h"
++
++#include "host_res.h"
++#include "hr_sensor.h"
++
++
++/*
++ * hr_sensor_variables_oid:
++ * this is the top level oid that we want to register under. This
++ * is essentially a prefix, with the suffix appearing in the
++ * variable below.
++ */
++
++
++oid hr_sensor_variables_oid[] = { 1,3,6,1,2,1,25,8 };
++
++
++/*
++ * variable2 hr_sensor_variables:
++ * this variable defines function callbacks and type return information
++ * for the hr_sensor mib section
++ */
++
++
++struct variable2 hr_sensor_variables[] = {
++ /* magic number , variable type , ro/rw , callback fn , L, oidsuffix */
++#define HRSENSORMAPPING 2
++ { HRSENSORMAPPING, ASN_INTEGER , RONLY , var_hr_sensor, 2, { 1,1 } },
++#define HRSENSORNUMBER 3
++ { HRSENSORNUMBER, ASN_INTEGER , RONLY , var_hr_sensor, 2, { 1,2 } },
++#define HRSENSORNAME 4
++ { HRSENSORNAME , ASN_OCTET_STR , RONLY , var_hr_sensor, 2, { 1,3 } },
++#define HRSENSORLABEL 5
++ { HRSENSORLABEL , ASN_OCTET_STR , RONLY , var_hr_sensor, 2, { 1,4 } },
++#define HRSENSORVALUE 6
++ { HRSENSORVALUE , ASN_OCTET_STR , RONLY , var_hr_sensor, 2, { 1,5 } },
++
++};
++/* (L = length of the oidsuffix) */
++
++
++#define DEFAULT_CONFIG_FILE_NAME "sensors.conf"
++
++static char *config_file_name;
++FILE *config_file;
++static const char *config_file_path[] =
++{ "/etc", "/usr/lib/sensors", "/usr/local/lib/sensors", "/usr/lib",
++ "/usr/local/lib", ".", 0 };
++
++static void open_config_file(void);
++static int open_this_config_file(char *filename);
++
++
++/*
++ * functions that are dynamically loaded if the lm_sensors library is
++ * installed.
++ */
++static int (*sensors_get_label_dl)(sensors_chip_name name, int feature,
++ char **result);
++static int (*sensors_init_dl)(FILE *input);
++static int (*sensors_get_feature_dl)(sensors_chip_name name, int feature,
++ double *result);
++static const sensors_feature_data *(*sensors_get_all_features_dl)
++ (sensors_chip_name name, int *nr1,int *nr2);
++static const sensors_chip_name *(*sensors_get_detected_chips_dl)(int *nr);
++
++#define CHIPS_MAX 20
++static sensors_chip_name chips[CHIPS_MAX];
++static int chips_count=0;
++static int do_sets;
++
++/* This examines global var config_file, and leaves the name there too.
++ It also opens config_file. */
++static void open_config_file(void)
++{
++#define MAX_FILENAME_LEN 1024
++ char *filename;
++ char buffer[MAX_FILENAME_LEN];
++ int res,i;
++
++ if (config_file_name && !strcmp(config_file_name,"-")) {
++ config_file = stdin;
++ return;
++ } else if (config_file_name && index(config_file_name,'/')) {
++ if ((res = open_this_config_file(config_file_name))) {
++ fprintf(stderr,"Could not locate or open config file\n");
++ fprintf(stderr,"%s: %s\n",config_file_name,strerror(res));
++ exit(1);
++ }
++ }
++ else {
++ if (config_file_name)
++ filename = config_file_name;
++ else
++ filename = strdup(DEFAULT_CONFIG_FILE_NAME);
++ for (i = 0; config_file_path[i]; i++) {
++ if ((snprintf(buffer,MAX_FILENAME_LEN,
++ "%s/%s",config_file_path[i],filename)) < 1) {
++ fprintf(stderr,
++ "open_config_file: ridiculous long config file name!\n");
++ exit(1);
++ }
++ if (!open_this_config_file(buffer)) {
++ free(config_file_name);
++ config_file_name = strdup(buffer);
++ return;
++ }
++ }
++ fprintf(stderr,"Could not locate or open config file!\n");
++ exit(1);
++ }
++}
++
++static int open_this_config_file(char *filename)
++{
++ config_file = fopen(filename,"r");
++ if (! config_file)
++ return -errno;
++ return 0;
++}
++
++static long *sensor_tbl = 0;
++sensors_chip_name *chip_tbl = 0;
++static int sensor_maxnum = 0;
++
++static void do_register(sensors_chip_name name)
++{
++ const char *algo,*adap;
++
++ {
++ const sensors_feature_data *sensor;
++ const char *map=0;
++ int index0 = 0, index1 = 0;
++
++ printf("%s\n", name);
++
++ while ((sensor = sensors_get_all_features_dl (name, &index0, &index1))
++ != NULL) {
++ if(sensor_tbl = realloc(sensor_tbl, sizeof(long) * (sensor_maxnum+2)))
++ sensor_tbl[sensor_maxnum] = sensor->number;
++ if (chip_tbl = realloc(chip_tbl, sizeof(sensors_chip_name) * (sensor_maxnum+2)))
++ chip_tbl[sensor_maxnum] = name;
++ sensor_maxnum++;
++ }
++ }
++}
++
++/*
++ * init_hr_sensor():
++ * Initialization routine. This is called when the agent starts up.
++ * At a minimum, registration of your variables should take place here.
++ */
++void init_hr_sensor(void) {
++
++ const sensors_chip_name *chip;
++ int chip_nr,i;
++ int c,res;
++ void *sensors_library;
++
++ /* This could probably due with a bit more error reporting. */
++ sensors_library=dlopen("libsensors.so",RTLD_LAZY);
++ if(sensors_library==NULL)
++ return; // return before anything is registered
++
++ sensors_get_label_dl=dlsym(sensors_library,"sensors_get_label");
++ sensors_init_dl=dlsym(sensors_library,"sensors_init");
++ sensors_get_feature_dl=dlsym(sensors_library,"sensors_get_feature");
++ sensors_get_all_features_dl=dlsym(sensors_library,
++ "sensors_get_all_features");
++ sensors_get_detected_chips_dl=dlsym(sensors_library,
++ "sensors_get_detected_chips");
++ if(sensors_get_label_dl==NULL || sensors_init_dl==NULL ||
++ sensors_get_feature_dl==NULL || sensors_get_all_features_dl==NULL ||
++ sensors_get_detected_chips_dl==NULL)
++ return; // return before anything is registered
++
++ /* register ourselves with the agent to handle our mib tree */
++ REGISTER_MIB("hr_sensor", hr_sensor_variables, variable2,
++ hr_sensor_variables_oid);
++
++
++ /* place any other initialization junk you need here */
++
++
++ chips[0].prefix = SENSORS_CHIP_NAME_PREFIX_ANY;
++ chips[0].bus = SENSORS_CHIP_NAME_BUS_ANY;
++ chips[0].addr = SENSORS_CHIP_NAME_ADDR_ANY;
++ chips_count = 1;
++
++ open_config_file();
++
++ if ((res = sensors_init_dl(config_file))) {
++ return;
++ }
++
++ for (chip_nr = 0; (chip = sensors_get_detected_chips_dl(&chip_nr));)
++ do_register (*chip);
++}
++
++
++/*
++ * var_hr_sensor():
++ * This function is called every time the agent gets a request for
++ * a scalar variable that might be found within your mib section
++ * registered above. It is up to you to do the right thing and
++ * return the correct value.
++ * You should also correct the value of "var_len" if necessary.
++ *
++ * Please see the documentation for more information about writing
++ * module extensions, and check out the examples in the examples
++ * and mibII directories.
++ */
++unsigned char *
++var_hr_sensor(struct variable *vp,
++ oid *name,
++ size_t *length,
++ int exact,
++ size_t *var_len,
++ WriteMethod **write_method)
++{
++ /* variables we may use later */
++ static long long_ret;
++ static char *string = 0;
++ static oid objid[MAX_OID_LEN];
++ static struct counter64 c64;
++
++ const sensors_feature_data *sensor;
++ const char *map=0;
++ int index0 = 0, index1 = 0;
++ int sensor_idx = 0, sensor_num = 0;
++ sensors_chip_name chip_name;
++ double value;
++
++
++ if (header_simple_table(vp,name,length,exact,var_len,write_method,sensor_maxnum)
++ == MATCH_FAILED )
++ return NULL;
++
++ sensor_idx = name[*length - 1] - 1;
++ sensor_num = sensor_tbl[sensor_idx];
++ chip_name = chip_tbl[sensor_idx];
++
++ while ((sensor = sensors_get_all_features_dl (chip_name, &index0, &index1))
++ != NULL) {
++ if(sensor_num == sensor->number) {
++ /*
++ * this is where we do the value assignments for the mib results.
++ */
++ switch(vp->magic) {
++
++
++ case HRSENSORMAPPING:
++
++ long_ret = sensor->mapping;
++ return (unsigned char *) &long_ret;
++
++ case HRSENSORNUMBER:
++
++ long_ret = sensor_num;
++ return (unsigned char *) &long_ret;
++
++ case HRSENSORNAME:
++
++ string = malloc(SPRINT_MAX_LEN);
++ strncpy(string, sensor->name, SPRINT_MAX_LEN);
++ *var_len = strlen(string);
++ return (unsigned char *) string;
++
++ case HRSENSORLABEL:
++
++ string = malloc(SPRINT_MAX_LEN);
++
++ if (sensors_get_label_dl (chip_name, sensor->number, &string)) {
++ return 0;
++ }
++
++ *var_len = strlen(string);
++ return (unsigned char *) string;
++
++ case HRSENSORVALUE:
++
++ if (!(sensor->mode & SENSORS_MODE_R)) {
++ return 0;
++ } else if (!(sensor->mode & SENSORS_MODE_R)) {
++ return 0;
++ } else if (sensors_get_feature_dl (chip_name, sensor->number, &value)){
++ return 0;
++ }
++ string = malloc(SPRINT_MAX_LEN);
++ snprintf(string, SPRINT_MAX_LEN, "%f", value);
++ *var_len = strlen(string);
++ return (unsigned char *) string;
++
++ default:
++ ERROR_MSG("");
++ return NULL;
++ }
++ }
++ }
++ return NULL;
++}
++
+diff -Naur net-snmp-5.1.1.old/agent/mibgroup/host/hr_sensor.h net-snmp-5.1.1/agent/mibgroup/host/hr_sensor.h
+--- net-snmp-5.1.1.old/agent/mibgroup/host/hr_sensor.h 1970-01-01 02:00:00.000000000 +0200
++++ net-snmp-5.1.1/agent/mibgroup/host/hr_sensor.h 2003-10-21 12:47:04.000000000 +0300
+@@ -0,0 +1,24 @@
++/* This file was generated by mib2c and is intended for use as a mib module
++ for the ucd-snmp snmpd agent. */
++
++
++#ifndef _MIBGROUP_HRSENSOR_H
++#define _MIBGROUP_HRSENSOR_H
++
++
++/* we may use header_generic and header_simple_table from the util_funcs module */
++
++
++config_require(util_funcs)
++
++
++/* function prototypes */
++
++
++extern void init_hr_sensor(void);
++extern FindVarMethod var_hr_sensor;
++
++
++
++
++#endif /* _MIBGROUP_HRSENSOR_H */
+diff -Naur net-snmp-5.1.1.old/agent/mibgroup/host.h net-snmp-5.1.1/agent/mibgroup/host.h
+--- net-snmp-5.1.1.old/agent/mibgroup/host.h 2002-04-20 10:30:00.000000000 +0300
++++ net-snmp-5.1.1/agent/mibgroup/host.h 2003-10-21 12:47:04.000000000 +0300
+@@ -15,6 +15,7 @@
+ config_require(host/hr_filesys)
+ config_require(host/hr_swrun)
+ config_require(host/hr_swinst)
++ config_require(host/hr_sensor)
+
+ /* add the host resources mib to the default mibs to load */
+ config_add_mib(HOST-RESOURCES-MIB)
+diff -Naur net-snmp-5.1.1.old/mibs/HOST-RESOURCES-MIB.txt net-snmp-5.1.1/mibs/HOST-RESOURCES-MIB.txt
+--- net-snmp-5.1.1.old/mibs/HOST-RESOURCES-MIB.txt 2002-04-20 10:30:15.000000000 +0300
++++ net-snmp-5.1.1/mibs/HOST-RESOURCES-MIB.txt 2003-10-21 12:47:04.000000000 +0300
+@@ -106,6 +106,7 @@
+ hrSWRunPerf OBJECT IDENTIFIER ::= { host 5 }
+ hrSWInstalled OBJECT IDENTIFIER ::= { host 6 }
+ hrMIBAdminInfo OBJECT IDENTIFIER ::= { host 7 }
++hrSensor OBJECT IDENTIFIER ::= { host 8 }
+
+ -- textual conventions
+
+@@ -1390,6 +1391,66 @@
+ (hex)'00 00 01 01 00 00 00 00'."
+ ::= { hrSWInstalledEntry 5 }
+
++
++hrSensorEntry OBJECT-TYPE
++ SYNTAX hrSensorEntry
++ MAX-ACCESS not-accessible
++ STATUS current
++ DESCRIPTION
++ "The CPU temperature sensor settings."
++ INDEX { hrSensor }
++ ::= { hrSensor 1 }
++
++hrSensorEntry ::= SEQUENCE {
++ hrSensorNumber Integer32,
++ hrSensorMapping Integer32,
++ hrSensorName DisplayString,
++ hrSensorLabel DisplayString,
++ hrSensorValue DisplayString
++ }
++
++
++
++hrSensorMapping OBJECT-TYPE
++ SYNTAX Integer32 (1..2147483647)
++ MAX-ACCESS read-only
++ STATUS current
++ DESCRIPTION
++ "The mapping"
++ ::= { hrSensorEntry 1 }
++
++hrSensorNumber OBJECT-TYPE
++ SYNTAX Integer32 (1..2147483647)
++ MAX-ACCESS read-only
++ STATUS current
++ DESCRIPTION
++ "The Number"
++ ::= { hrSensorEntry 2 }
++
++hrSensorName OBJECT-TYPE
++ SYNTAX DisplayString
++ MAX-ACCESS read-only
++ STATUS current
++ DESCRIPTION
++ "The name of the sensor."
++ ::= { hrSensorEntry 3 }
++
++hrSensorLabel OBJECT-TYPE
++ SYNTAX DisplayString
++ MAX-ACCESS read-only
++ STATUS current
++ DESCRIPTION
++ "The label of the sensor."
++ ::= { hrSensorEntry 4 }
++
++hrSensorValue OBJECT-TYPE
++ SYNTAX DisplayString
++ MAX-ACCESS read-only
++ STATUS current
++ DESCRIPTION
++ "The value of the sensor"
++ ::= { hrSensorEntry 5 }
++
+ -- Conformance information
+
+ hrMIBCompliances OBJECT IDENTIFIER ::= { hrMIBAdminInfo 2 }
+@@ -1456,6 +1517,13 @@
+ "The Installed Software Group.
+ Implementation of this group is at the discretion
+ of the implementor."
++
++ GROUP hrSensorGroup
++ DESCRIPTION
++ "The Sensors Group.
++ Implementation of this group is at the discretion
++ of the implementor."
++
+ ::= { hrMIBCompliances 1 }
+
+ hrSystemGroup OBJECT-GROUP
+@@ -1537,4 +1605,17 @@
+ "The Host Resources Installed Software Group."
+ ::= { hrMIBGroups 6 }
+
++ hrSensorGroup OBJECT-GROUP
++ OBJECTS {
++ hrSensorEntry,
++ hrSensorNumber,
++ hrSensorMapping,
++ hrSensorName,
++ hrSensorLabel,
++ hrSensorValue
++ }
++ STATUS current
++ DESCRIPTION
++ "The Sensor Resources Group."
++ ::= { hrMIBGroups 7 }
+ END
diff --git a/net-analyzer/net-snmp/files/net-snmp-maxreps.patch b/net-analyzer/net-snmp/files/net-snmp-maxreps.patch
new file mode 100755
index 00000000..7d9627de
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-maxreps.patch
@@ -0,0 +1,122 @@
+Index: man/snmpd.conf.5.def
+===================================================================
+--- man/snmpd.conf.5.def (revision 16338)
++++ man/snmpd.conf.5.def (working copy)
+@@ -71,6 +71,28 @@
+ .IP "leave_pidfile yes"
+ instructs the agent to not remove its pid file on shutdown. Equivalent to
+ specifying "-U" on the command line.
++.IP "maxGetbulkRepeats NUM"
++Sets the maximum number of responses allowed for a single variable in
++a getbulk request. Set to 0 to enable the default and set it to -1 to
++enable unlimited. Because memory is allocated ahead of time, sitting
++this to unlimited is not considered safe if your user population can
++not be trusted. A repeat number greater than this will be truncated
++to this value.
++.IP
++This is set by default to -1.
++.IP "maxGetbulkResponses NUM"
++Sets the maximum number of responses allowed for a getbulk request.
++This is set by default to 100. Set to 0 to enable the default and set
++it to -1 to enable unlimited. Because memory is allocated ahead of
++time, sitting this to unlimited is not considered safe if your user
++population can not be trusted.
++.IP
++In general, the total number of responses will not be allowed to
++exceed the maxGetbulkResponses number and the total number returned
++will be an integer multiple of the number of variables requested times
++the calculated number of repeats allow to fit below this number.
++.IP
++Also not that processing of maxGetbulkRepeats is handled first.
+ .SS SNMPv3 Configuration
+ SNMPv3 requires an SNMP agent to define a unique "engine ID"
+ in order to respond to SNMPv3 requests.
+Index: include/net-snmp/agent/ds_agent.h
+===================================================================
+--- include/net-snmp/agent/ds_agent.h (revision 16338)
++++ include/net-snmp/agent/ds_agent.h (working copy)
+@@ -59,5 +59,7 @@
+ #define NETSNMP_DS_AGENT_CACHE_TIMEOUT 10 /* default cache timeout */
+ #define NETSNMP_DS_AGENT_INTERNAL_VERSION 11 /* used by internal queries */
+ #define NETSNMP_DS_AGENT_INTERNAL_SECLEVEL 12 /* used by internal queries */
++#define NETSNMP_DS_AGENT_MAX_GETBULKREPEATS 13 /* max getbulk repeats */
++#define NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES 14 /* max getbulk respones */
+
+ #endif
+Index: agent/agent_read_config.c
+===================================================================
+--- agent/agent_read_config.c (revision 16338)
++++ agent/agent_read_config.c (working copy)
+@@ -258,6 +258,12 @@
+ netsnmp_ds_register_config(ASN_BOOLEAN, app, "dontLogTCPWrappersConnects",
+ NETSNMP_DS_APPLICATION_ID,
+ NETSNMP_DS_AGENT_DONT_LOG_TCPWRAPPERS_CONNECTS);
++ netsnmp_ds_register_config(ASN_INTEGER, app, "maxGetbulkRepeats",
++ NETSNMP_DS_APPLICATION_ID,
++ NETSNMP_DS_AGENT_MAX_GETBULKREPEATS);
++ netsnmp_ds_register_config(ASN_INTEGER, app, "maxGetbulkResponses",
++ NETSNMP_DS_APPLICATION_ID,
++ NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES);
+ netsnmp_init_handler_conf();
+
+ #include "agent_module_dot_conf.h"
+Index: agent/snmp_agent.c
+===================================================================
+--- agent/snmp_agent.c (revision 16338)
++++ agent/snmp_agent.c (working copy)
+@@ -2156,7 +2156,6 @@
+ * getbulk prep
+ */
+ int count = count_varbinds(asp->pdu->variables);
+-
+ if (asp->pdu->errstat < 0) {
+ asp->pdu->errstat = 0;
+ }
+@@ -2173,8 +2172,37 @@
+ r = 0;
+ asp->bulkcache = NULL;
+ } else {
++ int numresponses;
++ int maxbulk =
++ netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID,
++ NETSNMP_DS_AGENT_MAX_GETBULKREPEATS);
++ int maxresponses =
++ netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID,
++ NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES);
++
++ if (maxresponses == 0)
++ maxresponses = 100; /* more than reasonable default */
++
++ if (maxbulk == 0)
++ maxbulk = -1;
++
++ /* limit getbulk number of repeats to a configured size */
++ if (asp->pdu->errindex > maxbulk && maxbulk != -1) {
++ asp->pdu->errindex = maxbulk;
++ }
++
++ numresponses = asp->pdu->errindex * r;
++
++ /* limit getbulk number of getbulk responses to a configured size */
++ if (maxresponses != -1 && numresponses > maxresponses) {
++ /* attempt to truncate this */
++ asp->pdu->errindex = maxresponses/r;
++ numresponses = asp->pdu->errindex * r;
++ DEBUGMSGTL(("snmp_agent", "truncating number of getbulk repeats to %d\n", asp->pdu->errindex));
++ }
++
+ asp->bulkcache =
+- (netsnmp_variable_list **) malloc(asp->pdu->errindex * r *
++ (netsnmp_variable_list **) malloc(numresponses *
+ sizeof(struct
+ varbind_list *));
+ if (!asp->bulkcache) {
+@@ -2184,6 +2212,8 @@
+ }
+ DEBUGMSGTL(("snmp_agent", "GETBULK N = %d, M = %d, R = %d\n",
+ n, asp->pdu->errindex, r));
++ fprintf(stderr, "GETBULK N = %d, M = %d, R = %d\n",
++ n, asp->pdu->errindex, r);
+ }
+
+ /*
diff --git a/net-analyzer/net-snmp/files/snmpd-5.1.conf b/net-analyzer/net-snmp/files/snmpd-5.1.conf
new file mode 100644
index 00000000..60e8a77e
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmpd-5.1.conf
@@ -0,0 +1,17 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd-5.1.conf,v 1.3 2004/07/14 23:06:06 agriffis Exp $
+
+# Initial (empty) options.
+SNMPD_FLAGS=""
+
+# Enable connection logging.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -a"
+
+# Enable syslog and disable file log.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -Lsd -Lf /dev/null"
+
+# Enable agentx socket as /var/agentx/master
+# *NOTE* Before uncommenting this, make sure
+# the /var/agentx directory exists.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -x /var/agentx/master"
diff --git a/net-analyzer/net-snmp/files/snmpd-5.1.rc6 b/net-analyzer/net-snmp/files/snmpd-5.1.rc6
new file mode 100755
index 00000000..d4cd2306
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmpd-5.1.rc6
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd-5.1.rc6,v 1.3 2004/07/14 23:06:06 agriffis Exp $
+
+depend() {
+ use logger
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/snmp/snmpd.conf ] ; then
+ eerror "You need an /etc/snmp/snmpd.conf config file to run snmpd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting net-snmpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/snmpd \
+ -- -p /var/run/snmpd.pid ${SNMPD_FLAGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping net-snmpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/snmpd.pid
+ eend $?
+}
diff --git a/net-analyzer/net-snmp/files/snmpd.conf b/net-analyzer/net-snmp/files/snmpd.conf
new file mode 100644
index 00000000..97a1d705
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmpd.conf
@@ -0,0 +1,17 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.conf,v 1.8 2006/11/26 21:37:22 cedk Exp $
+
+# Initial (empty) options.
+SNMPD_FLAGS=""
+
+# Enable connection logging.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -a"
+
+# Enable syslog and disable file log.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -Lsd -Lf /dev/null"
+
+# Enable agentx socket as /var/agentx/master
+# *NOTE* Before uncommenting this, make sure
+# the /var/agentx directory exists.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -x /var/agentx/master"
diff --git a/net-analyzer/net-snmp/files/snmpd.rc7 b/net-analyzer/net-snmp/files/snmpd.rc7
new file mode 100644
index 00000000..11329bd7
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmpd.rc7
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.rc7,v 1.1 2006/11/26 21:37:22 cedk Exp $
+
+depend() {
+ use logger
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/snmp/snmpd.conf ] ; then
+ eerror "You need an /etc/snmp/snmpd.conf config file to run snmpd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting net-snmpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/snmpd \
+ -- -p /var/run/snmpd.pid ${SNMPD_FLAGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping net-snmpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/snmpd.pid
+ eend $?
+}
diff --git a/net-analyzer/net-snmp/files/snmptrapd.conf b/net-analyzer/net-snmp/files/snmptrapd.conf
new file mode 100644
index 00000000..b6259fcf
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmptrapd.conf
@@ -0,0 +1,16 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmptrapd.conf,v 1.1 2005/01/28 11:19:25 ka0ttic Exp $
+
+# extra flags to pass to snmptrapd
+SNMPTRAPD_FLAGS=""
+
+# ignore authentication failure traps
+#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -a"
+
+# log messages to specified file
+#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Lf /var/log/snmptrapd.log"
+
+# log messages to syslog with the specified facility
+# where facility is: 'd' = LOG_DAEMON, 'u' = LOG_USER, [0-7] = LOG_LOCAL[0-7]
+#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Ls d"
diff --git a/net-analyzer/net-snmp/files/snmptrapd.rc7 b/net-analyzer/net-snmp/files/snmptrapd.rc7
new file mode 100644
index 00000000..585675b4
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmptrapd.rc7
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmptrapd.rc7,v 1.1 2006/11/26 21:37:22 cedk Exp $
+
+depend() {
+ use logger
+ need net
+}
+
+start() {
+ ebegin "Starting snmptrapd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/snmptrapd \
+ -- -p /var/run/snmptrapd.pid ${SNMPTRAPD_FLAGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping snmptrapd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/snmptrapd.pid
+ eend $?
+}
diff --git a/net-analyzer/net-snmp/net-snmp-5.4.1-r1.ebuild b/net-analyzer/net-snmp/net-snmp-5.4.1-r1.ebuild
new file mode 100644
index 00000000..8b190b40
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.4.1-r1.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.1-r1.ebuild,v 1.9 2007/11/19 06:16:52 kumba Exp $
+
+inherit fixheadtails flag-o-matic perl-module python
+
+DESCRIPTION="Software for generating and retrieving SNMP data"
+HOMEPAGE="http://net-snmp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="as-is BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+IUSE="diskio doc elf ipv6 lm_sensors mfd-rewrites minimal perl python rpm selinux smux ssl tcpd X sendmail"
+
+DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ rpm? (
+ app-arch/rpm
+ dev-libs/popt
+ app-arch/bzip2
+ >=sys-libs/zlib-1.1.4
+ )
+ elf? ( dev-libs/elfutils )
+ lm_sensors? ( sys-apps/lm_sensors )
+ python? ( dev-python/setuptools )"
+
+RDEPEND="${DEPEND}
+ perl? (
+ X? ( dev-perl/perl-tk )
+ !minimal? ( dev-perl/TermReadKey )
+ )
+ selinux? ( sec-policy/selinux-snmpd )"
+
+DEPEND="${DEPEND}
+ >=sys-apps/sed-4
+ doc? ( app-doc/doxygen )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+# The lm_sensors patch has a memory leak
+# If you can help, please attach a patch to bug 109785
+
+# if use lm_sensors; then
+# if use x86 || use amd64; then
+# epatch "${FILESDIR}"/${PN}-lm_sensors.patch
+# else
+# eerror "Unfortunatly you are trying to enable lm_sensors support for an unsupported arch."
+# eerror "please check the availability of sys-apps/lm_sensors - if it is available on"
+# eerror "your arch, please file a bug about this."
+# die "lm_sensors patch error: unsupported arch."
+# fi
+# fi
+
+ # fix access violation in make check
+ sed -i -e 's/\(snmpd.*\)-Lf/\1-l/' testing/eval_tools.sh || \
+ die "sed eval_tools.sh failed"
+ # fix path in fixproc
+ sed -i -e 's|\(database_file =.*\)/local\(.*\)$|\1\2|' local/fixproc || \
+ die "sed fixproc failed"
+
+ if use python ; then
+ python_version
+ PYTHON_MODNAME="netsnmp"
+ PYTHON_DIR=/usr/$(get_libdir)/python${PYVER}/site-packages
+ sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${D}':" Makefile.in || die "sed python failed"
+ fi
+
+ # Fix usage of clientaddr
+ EPATCH_OPTS="-p1" epatch "${FILESDIR}"/${PN}-5.4.1-clientaddr-fix.patch
+
+ epatch "${FILESDIR}/multi-tun-segv.patch"
+
+ ht_fix_all
+}
+
+src_compile() {
+ local mibs
+
+ strip-flags
+
+ # filter for bug #145960
+ # as it seems that the option is not enough
+ filter-ldflags -Wl,--as-needed
+
+ mibs="host ucd-snmp/dlmod"
+ use smux && mibs="${mibs} smux"
+ use sendmail && mibs="${mibs} mibII/mta_sendmail"
+ use lm_sensors && mibs="${mibs} ucd-snmp/lmSensors"
+ use diskio && mibs="${mibs} ucd-snmp/diskio"
+
+ econf \
+ --with-install-prefix="${D}" \
+ --with-sys-location="Unknown" \
+ --with-sys-contact="root@Unknown" \
+ --with-default-snmp-version="3" \
+ --with-mib-modules="${mibs}" \
+ --with-logfile="/var/log/net-snmpd.log" \
+ --with-persistent-directory="/var/lib/net-snmp" \
+ --enable-ucd-snmp-compatibility \
+ --enable-shared \
+ --enable-as-needed \
+ $(use_enable mfd-rewrites) \
+ $(use_enable perl embedded-perl) \
+ $(use_enable ipv6) \
+ $(use_enable !ssl internal-md5) \
+ $(use_with ssl openssl) \
+ $(use_with tcpd libwrap) \
+ $(use_with rpm) \
+ $(use_with rpm bzip2) \
+ $(use_with rpm zlib) \
+ $(use_with elf) \
+ $(use_with python python-modules) \
+ || die "econf failed"
+
+ emake -j1 || die "emake failed"
+
+ if use perl ; then
+ emake perlmodules || die "compile perl modules problem"
+ fi
+
+ if use python ; then
+ emake pythonmodules || die "compile python modules problem"
+ fi
+
+ if use doc ; then
+ einfo "Building HTML Documentation"
+ make docsdox || die "failed to build docs"
+ fi
+}
+
+src_test() {
+ cd testing
+ if ! make test ; then
+ echo
+ einfo "Don't be alarmed if a few tests FAIL."
+ einfo "This could happen for several reasons:"
+ einfo " - You don't already have a working configuration."
+ einfo " - Your ethernet interface isn't properly configured."
+ echo
+ fi
+}
+
+src_install () {
+
+ make DESTDIR="${D}" install || die "make install failed"
+
+ if use perl ; then
+ make DESTDIR="${D}" perlinstall || die "make perlinstall failed"
+ fixlocalpod
+
+ use X || rm -f "${D}/usr/bin/tkmib"
+ else
+ rm -f "${D}/usr/bin/mib2c" "${D}/usr/bin/tkmib" "${D}/usr/bin/snmpcheck"
+ fi
+
+ if use python ; then
+ mkdir -p "${D}/${PYTHON_DIR}" || die "Couldn't make $PYTHON_DIR"
+ make pythoninstall || die "make pythoninstall failed"
+ fi
+
+ dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
+ newdoc EXAMPLE.conf.def EXAMPLE.conf
+
+ use doc && dohtml docs/html/*
+
+ keepdir /etc/snmp /var/lib/net-snmp
+
+ newinitd "${FILESDIR}"/snmpd.rc7 snmpd
+ newconfd "${FILESDIR}"/snmpd.conf snmpd
+
+ newinitd "${FILESDIR}"/snmptrapd.rc7 snmptrapd
+ newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
+
+ # Remove everything, keeping only the snmpd, snmptrapd, MIBs, libs, and includes.
+ if use minimal; then
+ elog "USE=minimal is set. Cleaning up excess cruft for a embedded/minimal/server only install."
+ rm -rf
+ "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,snmpcheck}}
+ rm -rf "${D}"/usr/share/snmp/snmpconf-data "${D}"/usr/share/snmp/*.conf
+ rm -rf "${D}"/usr/bin/{fixproc,traptoemail} "${D}"/usr/bin/snmpc{heck,onf}
+ find "${D}" -name '*.pl' -exec rm -f '{}' \;
+ use ipv6 || rm -rf "${D}"/usr/share/snmp/mibs/IPV6*
+ fi
+
+ # bug 113788, install example config
+ insinto /etc/snmp
+ newins "${S}"/EXAMPLE.conf snmpd.conf.example
+}
+
+pkg_postrm() {
+ if use python ; then
+ python_mod_cleanup
+ fi
+}
+
+pkg_postinst() {
+ elog "An example configuration file has been installed in"
+ elog "/etc/snmp/snmpd.conf.example."
+}
diff --git a/sys-apps/net-tools/Manifest b/sys-apps/net-tools/Manifest
new file mode 100644
index 00000000..4aad2bea
--- /dev/null
+++ b/sys-apps/net-tools/Manifest
@@ -0,0 +1,9 @@
+DIST net-tools-1.60-patches-1.6.tar.bz2 106557 RMD160 1dce9fecbbab849bfdb8b832ee4baf5cead983d9 SHA1 709d1c8f611225f851ec6227b4928ae9f97edbb5 SHA256 61df3fca2bd30a752231285bd714edcadc0c5206a09954eb1861a68a0ef4bba9
+DIST net-tools-1.60.tar.bz2 198520 RMD160 58376371a9383842640d2c4215cf771d522ee43e SHA1 944fb70641505d5d1139dba3aeb81ba124574b83 SHA256 7ae4dd6d44d6715f18e10559ffd270511b6e55a8900ca54fbebafe0ae6cf7d7b
+EBUILD net-tools-1.60-r13.ebuild 2670 RMD160 cab040546c464cbb82a371940056a39e22908df1 SHA1 a973e3328e4d014bc3a34c8a7c3c61d321f158cc SHA256 ab6796fcd84509d32a81bad1ec45a8e23ab516510f70d00ae8fe45e0d41e78b6
+MD5 2957c34a92dffc46987a3fe3e9bcbe5d net-tools-1.60-r13.ebuild 2670
+RMD160 cab040546c464cbb82a371940056a39e22908df1 net-tools-1.60-r13.ebuild 2670
+SHA256 ab6796fcd84509d32a81bad1ec45a8e23ab516510f70d00ae8fe45e0d41e78b6 net-tools-1.60-r13.ebuild 2670
+MD5 a9f54037512f4a4903a338081b3cfe23 files/digest-net-tools-1.60-r13 530
+RMD160 f142abc362ec3dc4b90e03db62591281be7d9a74 files/digest-net-tools-1.60-r13 530
+SHA256 e822364b727e44ce5037dfdca04bfc303c0bfafa3a819480c81ca69cfbbe9c86 files/digest-net-tools-1.60-r13 530
diff --git a/sys-apps/net-tools/net-tools-1.60-r13.ebuild b/sys-apps/net-tools/net-tools-1.60-r13.ebuild
new file mode 100644
index 00000000..bf522ba7
--- /dev/null
+++ b/sys-apps/net-tools/net-tools-1.60-r13.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/net-tools/net-tools-1.60-r13.ebuild,v 1.11 2007/11/01 15:43:39 solar Exp $
+
+inherit flag-o-matic toolchain-funcs eutils
+
+PVER="1.6"
+DESCRIPTION="Standard Linux networking tools"
+HOMEPAGE="http://sites.inka.de/lina/linux/NetTools/"
+SRC_URI="http://www.tazenda.demon.co.uk/phil/net-tools/${P}.tar.bz2
+ mirror://gentoo/${P}-patches-${PVER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
+IUSE="nls static minimal"
+
+RDEPEND="!sys-apps/mii-diag
+ !net-misc/etherwake
+ !sys-apps/nictools"
+DEPEND="nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/patch/*.patch
+ cp "${WORKDIR}"/extra/config.{h,make} . || die
+ mkdir include/linux
+ cp "${WORKDIR}"/extra/*.h include/linux/
+ mv "${WORKDIR}"/extra/ethercard-diag/ "${S}"/ || die
+
+ if use static ; then
+ append-flags -static
+ append-ldflags -static
+ fi
+
+ sed -i \
+ -e "/^COPTS =/s:=:=${CFLAGS}:" \
+ -e "/^LOPTS =/s:=:=${LDFLAGS}:" \
+ Makefile || die "sed FLAGS Makefile failed"
+
+ sed -i \
+ -e s/CFLAGS=/CFLAGS?=/ ethercard-diag/pub/diag/Makefile \
+ || die "I like turtles"
+
+ if ! use nls ; then
+ sed -i \
+ -e '/define I18N/s:1$:0:' config.h \
+ || die "sed config.h failed"
+ sed -i \
+ -e '/^I18N=/s:1$:0:' config.make \
+ || die "sed config.make failed"
+ fi
+}
+
+src_compile() {
+ tc-export CC
+ emake libdir || die "emake libdir failed"
+ emake || die "emake failed"
+ emake -C ethercard-diag || die "emake ethercard-diag failed"
+
+ if use nls ; then
+ emake i18ndir || die "emake i18ndir failed"
+ fi
+}
+
+src_install() {
+ make BASEDIR="${D}" install || die "make install failed"
+ make -C ethercard-diag DESTDIR="${D}" install || die "make install ethercard-diag failed"
+ mv "${D}"/usr/share/man/man8/ether{,-}wake.8
+ mv "${D}"/usr/sbin/mii-diag "${D}"/sbin/ || die "mv mii-diag failed"
+ mv "${D}"/bin/* "${D}"/sbin/ || die "mv bin to sbin failed"
+ mv "${D}"/sbin/{hostname,domainname,netstat,dnsdomainname,ypdomainname,nisdomainname} "${D}"/bin/ \
+ || die "mv sbin to bin failed"
+ dodir /usr/bin
+ dosym /bin/hostname /usr/bin/hostname
+
+ if use minimal ; then
+ rm ${D}/sbin/arp
+ rm ${D}/usr/share/man/man8/arp.8*
+
+ rm ${D}/sbin/ifconfig
+ rm ${D}/usr/share/man/man8/ifconfig.8*
+
+ rm ${D}/sbin/route
+ rm ${D}/usr/share/man/man8/route.8*
+
+ rm ${D}/sbin/nameif
+ rm ${D}/usr/share/man/man8/nameif.8*
+
+ rm ${D}/sbin/iptunnel
+ rm ${D}/usr/share/man/man8/iptunnel.8*
+
+ rm ${D}/sbin/ipmaddr
+ rm ${D}/usr/share/man/man8/ipmaddr.8*
+ fi
+
+ dodoc README README.ipv6 TODO
+}
diff --git a/sys-process/fcron/Manifest b/sys-process/fcron/Manifest
index 04d0545a..7ca86c71 100644
--- a/sys-process/fcron/Manifest
+++ b/sys-process/fcron/Manifest
@@ -24,6 +24,7 @@ RMD160 062faddf0551bebbf9834b796f9957cf49dbc967 files/fcrontab 332
SHA256 ab5c104248c51471d61e3312f52bf738d74ab3319b8c01cd0cc5c74458fb8fcc files/fcrontab 332
DIST fcron-3.0.2.src.tar.gz 540559 RMD160 822f559550780c61c5822f4034fe99dd47577847 SHA1 76df8bdfb874df78e81885eca90f1b9c91b0bd24 SHA256 ea25f4e9a78f6872c65cc97aa18c018b548e9fcd73b06d77c312e635ecf9ad48
DIST fcron-3.0.3.src.tar.gz 549501 RMD160 4f6b8b425392f91fb3d3d32dac90ab9e480aa4ee SHA1 8f57be59c32c884d7cbeed4e9997a93285bea11c SHA256 5ba9605ce49446c18ed49c7d16602aef760169f29fbcc34dc09b6177388dce00
+DIST fcron-3.0.4.src.tar.gz 553609 RMD160 2bb8eb489251eaa1380b4e37b6526d2040291313 SHA1 daaa5287be026a425ea5bb56959ad38b1b6d030a SHA256 c8766c7f347f2146f84449401f8994d477d10f49df778f9a7cd802e534bc6f96
EBUILD fcron-3.0.2-r1.ebuild 8068 RMD160 e878d20e320e6c741262e42347100dac80c82e7a SHA1 c378d4fdae44a51d80cb0b8a1a9cfd8953f6f063 SHA256 34b0ffb31d4436bdedfbd7c065fd7f8b3bc1012f62260e11664c89c2899580cb
MD5 02d02792842045c43ce4d033479bcb62 fcron-3.0.2-r1.ebuild 8068
RMD160 e878d20e320e6c741262e42347100dac80c82e7a fcron-3.0.2-r1.ebuild 8068
@@ -32,9 +33,16 @@ EBUILD fcron-3.0.3.ebuild 8477 RMD160 d7033cdebd07c83d2e01382311b9cac947774bc5 S
MD5 4d4ac415c5cfca8e12ff25663c870f4f fcron-3.0.3.ebuild 8477
RMD160 d7033cdebd07c83d2e01382311b9cac947774bc5 fcron-3.0.3.ebuild 8477
SHA256 95297cc22bf8945fa54c02d98c4682cb0473a6dc32a8dd1da945cc0b895f154c fcron-3.0.3.ebuild 8477
-MD5 24d2ff586b2fb5d7014a19619d6e34d5 files/digest-fcron-3.0.2-r1 247
-RMD160 a80a8667bc13f224ee3c332f4a53af41d533a83b files/digest-fcron-3.0.2-r1 247
-SHA256 30748f48c2fe7ff5126a09e4791b186aee9cddc4b85d7c785b786ffbe5a3be9f files/digest-fcron-3.0.2-r1 247
+EBUILD fcron-3.0.4.ebuild 8767 RMD160 888aec1a537d40a6c68d7f97ad7b7a76025abb0d SHA1 69d021379fc4d48b26bae7d384d84885265e6102 SHA256 cd9d15de6427c3e424ed9d8602f8b4e86651b9691e17a2ade91b0c806e9f3bec
+MD5 049caf9fd9b7bf442a6a4ea9d8c70429 fcron-3.0.4.ebuild 8767
+RMD160 888aec1a537d40a6c68d7f97ad7b7a76025abb0d fcron-3.0.4.ebuild 8767
+SHA256 cd9d15de6427c3e424ed9d8602f8b4e86651b9691e17a2ade91b0c806e9f3bec fcron-3.0.4.ebuild 8767
+MD5 dd05e81c1f1c043fadfb77d8336ae9bd files/digest-fcron-3.0.2-r1 180
+RMD160 9f08247cbe486ce197bc1754742f656dd4a2f8a1 files/digest-fcron-3.0.2-r1 180
+SHA256 a657e6ea5074f17615f8c52c338ea9c1f88240036dde467d9b3983882645c3e6 files/digest-fcron-3.0.2-r1 180
MD5 2b61f4a7c653b772c445d3d01f19bc79 files/digest-fcron-3.0.3 247
RMD160 599ce366d1e3c495cb21e089047df610742d759f files/digest-fcron-3.0.3 247
SHA256 2850010bd54db7fdeffc9d82fdbdade03c15f545a5b6925591542b07d28f227c files/digest-fcron-3.0.3 247
+MD5 4220286c3665fda553ea50503031bdd5 files/digest-fcron-3.0.4 180
+RMD160 4668c8c4eb3f53f125f80396181aa230964b4cde files/digest-fcron-3.0.4 180
+SHA256 c8fac70fdf646838d662290895d049fa05cab0cc26fdb56f9483888722b3e22b files/digest-fcron-3.0.4 180
diff --git a/sys-process/fcron/fcron-3.0.4.ebuild b/sys-process/fcron/fcron-3.0.4.ebuild
new file mode 100644
index 00000000..6f3ec208
--- /dev/null
+++ b/sys-process/fcron/fcron-3.0.4.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/fcron-3.0.4.ebuild,v 1.5 2008/01/24 19:14:27 cla Exp $
+
+inherit cron pam eutils
+
+MY_P=${P/_/-}
+DESCRIPTION="A command scheduler with extended capabilities over cron and anacron"
+HOMEPAGE="http://fcron.free.fr/"
+SRC_URI="http://fcron.free.fr/archives/${MY_P}.src.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~hppa ~mips ppc ~sparc x86 ~x86-fbsd"
+IUSE="debug doc pam selinux"
+
+DEPEND="doc? ( >=app-text/docbook-dsssl-stylesheets-1.77 )
+ selinux? ( sys-libs/libselinux )
+ pam? ( virtual/pam )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup fcron
+ enewuser fcron -1 -1 -1 fcron,cron
+ rootuser=$(egetent passwd 0 | cut -d ':' -f 1)
+ rootgroup=$(egetent group 0 | cut -d ':' -f 1)
+ if useq debug; then
+ ewarn
+ ewarn "WARNING: debug USE flag active!"
+ ewarn "The debug USE flag makes fcron start in debug mode"
+ ewarn "by default, thus not detaching into background."
+ ewarn "This will make your system HANG on bootup if"
+ ewarn "fcron is to be started automatically by the"
+ ewarn "init system!"
+ ewarn
+ ebeep 10
+ epause 60
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # respect LDFLAGS
+ sed -i "s:\(@LIBS@\):\$(LDFLAGS) \1:" Makefile.in || die "sed failed"
+}
+
+src_compile() {
+ local myconf
+
+ autoconf || die "autoconf failed"
+
+ use doc \
+ && myconf="${myconf} --with-dsssl-dir=/usr/share/sgml/stylesheets/dsssl/docbook"
+
+ [[ -n "${rootuser}" ]] && myconf="${myconf} --with-rootname=${rootuser}"
+ [[ -n "${rootgroup}" ]] && myconf="${myconf} --with-rootgroup=${rootgroup}"
+
+ # QA security notice fix; see "[gentoo-core] Heads up changes in suid
+ # handing with portage >=51_pre21" for more details.
+ append-ldflags $(bindnow-flags)
+
+ econf \
+ "$(useq debug || echo --with-cflags=${CFLAGS})" \
+ $(use_with debug '' yes) \
+ $(use_with pam) \
+ $(use_with selinux) \
+ --sysconfdir=/etc/fcron \
+ --with-username=cron \
+ --with-groupname=cron \
+ --with-piddir=/var/run \
+ --with-etcdir=/etc/fcron \
+ --with-spooldir=/var/spool/fcron \
+ --with-fifodir=/var/run \
+ --with-fcrondyn=yes \
+ --disable-checks \
+ --with-editor=/usr/bin/vi \
+ --with-sendmail=/usr/sbin/sendmail \
+ --with-shell=/bin/bash \
+ ${myconf} \
+ || die "configure failed"
+
+ emake || die "make failed"
+}
+
+src_install() {
+ # cron eclass stuff
+ docron fcron -m0755 -o ${rootuser:-root} -g ${rootgroup:-root}
+ docrondir /var/spool/fcron -m6770 -o fcron -g fcron
+ docrontab fcrontab -m6755 -o fcron -g fcron
+
+ # install fcron tools
+ insinto /usr/bin
+ # fcronsighup needs to be suid root, because it sends a HUP
+ # to the running fcron daemon
+ insopts -m6755 -o ${rootuser:-root} -g fcron
+ doins fcronsighup
+ insopts -m6755 -o fcron -g fcron
+ doins fcrondyn
+
+ # /etc stuff
+ diropts -m0750 -o ${rootuser:-root} -g fcron
+ dodir /etc/fcron
+ insinto /etc/fcron
+ insopts -m0640 -o ${rootuser:-root} -g fcron
+ doins files/fcron.{allow,deny,conf}
+
+ # install PAM files
+ newpamd files/fcron.pam fcron
+ newpamd files/fcrontab.pam fcrontab
+
+ # install /etc/crontab and /etc/fcrontab
+ insopts -m0640 -o ${rootuser:-root} -g ${rootgroup:-root}
+ insinto /etc
+ doins "${FILESDIR}"/crontab "${FILESDIR}"/fcrontab
+
+ # install init script
+ newinitd "${FILESDIR}"/fcron.init fcron
+
+ # install the very handy check_system_crontabs script
+ dosbin script/check_system_crontabs
+
+ # doc stuff
+ dodoc MANIFEST VERSION
+ newdoc files/fcron.conf fcron.conf.sample
+ dodoc "${FILESDIR}"/crontab
+ dodoc doc/en/txt/{readme,thanks,faq,todo,relnotes,changes}.txt
+ rm -f doc/en/man/*.3 # ugly hack for bitstring.3 manpage
+ doman doc/en/man/*.[0-9]
+ use doc && dohtml doc/en/HTML/*.html
+
+ # localized docs
+ local LANGUAGES=$(sed -n 's:LANGUAGES =::p' doc/Makefile)
+ LANGUAGES="${LANGUAGES/en/}"
+ local lang
+ for lang in ${LANGUAGES}; do
+ hasq ${lang} ${LINGUAS} || continue
+ rm -f doc/${lang}/man/*.3 # ugly hack for bitstring.3 manpage
+ doman -i18n=${lang} doc/${lang}/man/*.[0-9]
+ use doc && docinto html/${lang} && dohtml doc/${lang}/HTML/*.html
+ done
+}
+
+pkg_postinst() {
+ einfo
+ einfo "fcron has some important differences compared to vixie-cron:"
+ einfo
+ einfo "1. fcron stores the crontabs in ${ROOT}var/spool/fcron"
+ einfo " instead of ${ROOT}var/spool/cron/crontabs"
+ einfo
+ einfo "2. fcron uses a special binary file format for storing the"
+ einfo " crontabs in ${ROOT}var/spool/fcron/USERNAME,"
+ einfo " but the original plain text version is saved as"
+ einfo " ${ROOT}var/spool/fcron/USERNAME.orig for your"
+ einfo " reference (and for being edited with fcrontab)."
+ einfo
+ einfo "3. fcron does not feature a system crontab in exactly the"
+ einfo " same way as vixie-cron does. This version of fcron"
+ einfo " features a crontab for a pseudo-user 'systab' for use"
+ einfo " as the system crontab. Running a command like"
+ einfo
+ einfo " fcrontab -u systab ${ROOT}etc/crontab"
+ einfo
+ einfo " will write ${ROOT}etc/crontab to the fcron crontabs directory as"
+ einfo
+ einfo " ${ROOT}var/spool/fcron/systab"
+ einfo
+ einfo " Please note that changes to ${ROOT}etc/crontab will not become"
+ einfo " active automatically! fcron also does not use the directory"
+ einfo " ${ROOT}etc/cron.d by default like vixie-cron does."
+ einfo " Fortunately, it's possible to emulate vixie-cron's behavior"
+ einfo " with regards to ${ROOT}etc/crontab and ${ROOT}etc/cron.d by using a"
+ einfo " little helper script called 'check_system_crontabs'."
+ einfo " The file ${ROOT}etc/fcrontab (not ${ROOT}etc/crontab!) has been set up"
+ einfo " to run the script once a while to check whether"
+ einfo " ${ROOT}etc/fcrontab, ${ROOT}etc/crontab or files in ${ROOT}etc/cron.d/ have"
+ einfo " changed since the last generation of the systab and"
+ einfo " regenerate it from those three locations as necessary."
+ einfo " You should now run 'check_system_crontabs' once to properly"
+ einfo " generate an initial systab:"
+ einfo
+ einfo " check_system_crontabs -v -i -f"
+ einfo
+ einfo " The file ${ROOT}etc/fcrontab should only be used to run that"
+ einfo " script in order to ensure independence from the standard"
+ einfo " system crontab file ${ROOT}etc/crontab."
+ einfo " You may of course adjust the schedule for the script"
+ einfo " 'check_system_crontabs' or any other setting in"
+ einfo " ${ROOT}etc/fcrontab as you desire."
+ einfo
+ einfo "If you do NOT want to use 'check_system_crontabs', you"
+ einfo "might still want to activate the use of the well known"
+ einfo "directories ${ROOT}etc/cron.{hourly|daily|weekly|monthly} by"
+ einfo "just generating a systab once from ${ROOT}etc/crontab:"
+ einfo
+ einfo " fcrontab -u systab ${ROOT}etc/crontab"
+ einfo
+ einfo "Happy fcron'ing!"
+ einfo
+
+ ewarn
+ ewarn "Fixing permissions and ownership of ${ROOT}usr/bin/fcron{tab,dyn,sighup}"
+ chown fcron:fcron ${ROOT}usr/bin/fcron{tab,dyn} >&/dev/null
+ chown ${rootuser:-root}:fcron ${ROOT}usr/bin/fcronsighup >&/dev/null
+ chmod 6755 ${ROOT}usr/bin/fcron{tab,dyn,sighup} >&/dev/null
+ ewarn "Fixing permissions and ownership of ${ROOT}etc/{fcron,fcrontab,crontab}"
+ chown -R ${rootuser:-root}:fcron ${ROOT}etc/{fcron,fcrontab,crontab} >&/dev/null
+ chmod -R g+rX,o= ${ROOT}etc/fcron ${ROOT}etc/{fcron,fcrontab,crontab} >&/dev/null
+ ewarn
+
+ ewarn
+ ewarn "WARNING: fcron now uses a dedicated user and group"
+ ewarn "'fcron' for the suid/sgid programs/files instead of"
+ ewarn "the user and group 'cron' that were previously used."
+ ewarn
+ ewarn "fcron usage can now only be restricted by adding users"
+ ewarn "to the following files instead of to the group 'cron':"
+ ewarn
+ ewarn " ${ROOT}etc/fcron/fcron.allow"
+ ewarn " ${ROOT}etc/fcron/fcron.deny"
+ ewarn
+ ebeep 10
+ epause 10
+
+ if ls -1 "${ROOT}"var/spool/cron/fcrontabs/* >&/dev/null; then
+ ewarn
+ ewarn "WARNING: fcron now uses a dedicated fcron-specific"
+ ewarn "spooldir ${ROOT}var/spool/fcron instead of the commonly"
+ ewarn "used ${ROOT}var/spool/cron for several reasons."
+ ewarn
+ ewarn "Copying over existing crontabs from ${ROOT}var/spool/cron/fcrontabs"
+ cp "${ROOT}"var/spool/cron/fcrontabs/* "${ROOT}"var/spool/fcron/ >&/dev/null \
+ || die "failed to migrate existing crontabs"
+ ewarn "You should now remove ${ROOT}var/spool/cron/fcrontabs!"
+ ewarn
+ ewarn "Fixing permissions and ownership of ${ROOT}var/spool/fcron"
+ chown root:root "${ROOT}"var/spool/fcron/* >&/dev/null
+ chmod 0600 "${ROOT}"var/spool/fcron/* >&/dev/null
+ chown fcron:fcron "${ROOT}"var/spool/fcron/*.orig >&/dev/null
+ chmod 0640 "${ROOT}"var/spool/fcron/*.orig >&/dev/null
+ ewarn
+ ewarn "*** YOU SHOULD IMMEDIATELY UPDATE THE"
+ ewarn "*** fcrontabs ENTRY IN ${ROOT}etc/fcron/fcron.conf"
+ ewarn "*** AND RESTART YOUR FCRON DAEMON!"
+ ebeep 20
+ epause 10
+ fi
+}
diff --git a/www-servers/lighttpd/Manifest b/www-servers/lighttpd/Manifest
deleted file mode 100644
index 741668c6..00000000
--- a/www-servers/lighttpd/Manifest
+++ /dev/null
@@ -1,68 +0,0 @@
-AUX 1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff 5267 RMD160 c23c816fcddbc99758a0426fc11f70677dbc06e9 SHA1 22e0d05d49cecb652d1250ac66de13fdf228cce4 SHA256 b37042549247ca2d83581aa3bcd1a5356c37015000711cecafda05aa6d6a15c4
-MD5 34d6720749f96327d311661a02886a65 files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff 5267
-RMD160 c23c816fcddbc99758a0426fc11f70677dbc06e9 files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff 5267
-SHA256 b37042549247ca2d83581aa3bcd1a5356c37015000711cecafda05aa6d6a15c4 files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff 5267
-AUX 1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502 RMD160 a10372a6cdfce349c6221f5038f2fda699f5f74e SHA1 12c39cd4ca731509256e271daf4aaac8a62e82c4 SHA256 0a7f3626e23291b3859e953bcc1762117a1585c2717adc065ccbb0ccf2f3577a
-MD5 87cf789e1f6866b9ece50a4af418b5b8 files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502
-RMD160 a10372a6cdfce349c6221f5038f2fda699f5f74e files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502
-SHA256 0a7f3626e23291b3859e953bcc1762117a1585c2717adc065ccbb0ccf2f3577a files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502
-AUX 1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff 3482 RMD160 def2d4cb50973a0a4c62a68e2455ea97273ec514 SHA1 54281eb0405bb73edf9a11e606f1099b94df7bb5 SHA256 5c5cc0976d99b73bc949b10ffd6343d0a9de7aa0a4a03bf92fe071a5c3f67e80
-MD5 4c2b9a07c63c4a34bc7f157c8f9dfeb9 files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff 3482
-RMD160 def2d4cb50973a0a4c62a68e2455ea97273ec514 files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff 3482
-SHA256 5c5cc0976d99b73bc949b10ffd6343d0a9de7aa0a4a03bf92fe071a5c3f67e80 files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff 3482
-AUX 1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff 2960 RMD160 ef621718a87b32790514b639c2f5c7fd2d5e1ca9 SHA1 cf1e9eb509d150387708b76086adfc32c72d9078 SHA256 2620e3ae8bae994c3e9adfff062338f5c9482272c8ba5737216b48619c5cc743
-MD5 a5a1b44fd61b79dd9069349e4714c5f4 files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff 2960
-RMD160 ef621718a87b32790514b639c2f5c7fd2d5e1ca9 files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff 2960
-SHA256 2620e3ae8bae994c3e9adfff062338f5c9482272c8ba5737216b48619c5cc743 files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff 2960
-AUX conf/lighttpd.conf 8182 RMD160 450cf40f4ec517331f8932618a3c492cb566e4f3 SHA1 16922786a79807fa3233d1af105a99582d3486a5 SHA256 c0f6951e00d4e8c928f1799a84976ab8bb536bd59a104c13ca9d1d3661d8cebd
-MD5 df5b2360ea380d988bf16905ab214286 files/conf/lighttpd.conf 8182
-RMD160 450cf40f4ec517331f8932618a3c492cb566e4f3 files/conf/lighttpd.conf 8182
-SHA256 c0f6951e00d4e8c928f1799a84976ab8bb536bd59a104c13ca9d1d3661d8cebd files/conf/lighttpd.conf 8182
-AUX conf/mime-types.conf 3291 RMD160 157c9a6f7d00e52c7d4118edcce8d1eb1e0a3c20 SHA1 3eec39060014e1498d3254919b10a64ca1e6ff00 SHA256 575231104d51fa1882c47021ab0aa00d615401059a6748d64453cb39aafba537
-MD5 fef397e7bcf1b741dea211a555e1803c files/conf/mime-types.conf 3291
-RMD160 157c9a6f7d00e52c7d4118edcce8d1eb1e0a3c20 files/conf/mime-types.conf 3291
-SHA256 575231104d51fa1882c47021ab0aa00d615401059a6748d64453cb39aafba537 files/conf/mime-types.conf 3291
-AUX conf/mod_cgi.conf 869 RMD160 1d447bad36822657d014990128891cbdb6169468 SHA1 30066f52e469339cc8a5df8864b4cc2d9c558c3d SHA256 322656b4cfd22ca9f1f8ab160e0b932f1646622422fd49c6fc82ab416223eecf
-MD5 9c1407e95f62ed22da66c4ef5f69c3b5 files/conf/mod_cgi.conf 869
-RMD160 1d447bad36822657d014990128891cbdb6169468 files/conf/mod_cgi.conf 869
-SHA256 322656b4cfd22ca9f1f8ab160e0b932f1646622422fd49c6fc82ab416223eecf files/conf/mod_cgi.conf 869
-AUX conf/mod_fastcgi.conf 661 RMD160 83b4126a4b0537fcd04db607a53e4742ceae039b SHA1 853a54799e9cd42ab9ff92bf0c07a0515ebe2d2a SHA256 61daa2ffac9e948d9d5130cc43f560a18c8dfb052cb7e3d4c6bd1decb6c9fd06
-MD5 b4c80dba9c626d5f89d3c3797ac6670c files/conf/mod_fastcgi.conf 661
-RMD160 83b4126a4b0537fcd04db607a53e4742ceae039b files/conf/mod_fastcgi.conf 661
-SHA256 61daa2ffac9e948d9d5130cc43f560a18c8dfb052cb7e3d4c6bd1decb6c9fd06 files/conf/mod_fastcgi.conf 661
-AUX conf/mod_fastcgi.conf-1.4.13-r2 687 RMD160 f165f27a08f35c4792bd332be3a04370b69152e3 SHA1 ebb469944098a91772424a825fdd5a0464cef158 SHA256 d1adc1358b5d9e85353caa2e706bfa231d145dd59c075cdcb3f818b3cb5d722e
-MD5 f3363e39832f1b6678468b482d121afb files/conf/mod_fastcgi.conf-1.4.13-r2 687
-RMD160 f165f27a08f35c4792bd332be3a04370b69152e3 files/conf/mod_fastcgi.conf-1.4.13-r2 687
-SHA256 d1adc1358b5d9e85353caa2e706bfa231d145dd59c075cdcb3f818b3cb5d722e files/conf/mod_fastcgi.conf-1.4.13-r2 687
-AUX lighttpd.confd 315 RMD160 c2d9c166a1209b853b400b5d21627f5d3f2d5216 SHA1 a09597a0d38d0b4d36a8f16f5d6fd5c4b7462b26 SHA256 94f69a173dc26610a43532474230537b9bc31ec846fb9f94cb72765f125edf87
-MD5 0dede109282bfe685bdec6b35f0e4b6b files/lighttpd.confd 315
-RMD160 c2d9c166a1209b853b400b5d21627f5d3f2d5216 files/lighttpd.confd 315
-SHA256 94f69a173dc26610a43532474230537b9bc31ec846fb9f94cb72765f125edf87 files/lighttpd.confd 315
-AUX lighttpd.initd 1162 RMD160 9a1afa2777428a27857e9e587c1e94457b95c6eb SHA1 e1208f1906cf089e8bac00d0271b4691e9922f60 SHA256 8bbe703055f65742158ceeed7725a914d2fa4059e720b9983fa5e647626111aa
-MD5 8ff031d9ffcbbcdc040a6f212a611cc9 files/lighttpd.initd 1162
-RMD160 9a1afa2777428a27857e9e587c1e94457b95c6eb files/lighttpd.initd 1162
-SHA256 8bbe703055f65742158ceeed7725a914d2fa4059e720b9983fa5e647626111aa files/lighttpd.initd 1162
-AUX lighttpd.initd-1.4.13-r3 1442 RMD160 17ce31a67f06f22b351ba6abfd868925eb5ad85f SHA1 58678d19bb60fd4e52a55381d9277ca472cbe805 SHA256 a4865824084d952050a1edc93bdffcbca33532d69268e13e96bb86c1a9a4bae6
-MD5 6910842e8ba496e8aa984ab30a46eb72 files/lighttpd.initd-1.4.13-r3 1442
-RMD160 17ce31a67f06f22b351ba6abfd868925eb5ad85f files/lighttpd.initd-1.4.13-r3 1442
-SHA256 a4865824084d952050a1edc93bdffcbca33532d69268e13e96bb86c1a9a4bae6 files/lighttpd.initd-1.4.13-r3 1442
-AUX lighttpd.logrotate 487 RMD160 2edb8b4abf75031af0a3b4182efb5b589dfa0d3c SHA1 24e1b048d7be5520ca5ef8ce31b55df13cc8d72b SHA256 503ee1cd454e2c0f9a212ef60dc8321893eda06ccf721ecbe94d189a09e0bc6c
-MD5 ad091c9157134890499f26d170352c9f files/lighttpd.logrotate 487
-RMD160 2edb8b4abf75031af0a3b4182efb5b589dfa0d3c files/lighttpd.logrotate 487
-SHA256 503ee1cd454e2c0f9a212ef60dc8321893eda06ccf721ecbe94d189a09e0bc6c files/lighttpd.logrotate 487
-AUX spawn-fcgi.confd 1076 RMD160 9468249fdedc39fa762a569622bae93f8b3481f9 SHA1 81bad945fc016275873e01e5f69838f73b275a3a SHA256 bfa452a849165f921a2febf0b06879db18c4c921f156b1452d06bb821063f768
-MD5 1d925aed297ec4541fb230dd19e11bc1 files/spawn-fcgi.confd 1076
-RMD160 9468249fdedc39fa762a569622bae93f8b3481f9 files/spawn-fcgi.confd 1076
-SHA256 bfa452a849165f921a2febf0b06879db18c4c921f156b1452d06bb821063f768 files/spawn-fcgi.confd 1076
-AUX spawn-fcgi.initd 1398 RMD160 3fd0fa41d100629e85960034237abc0866ec3d38 SHA1 9c07c9fd59ec73d5f37df109b188b8a7d691f949 SHA256 ae10c764e2bde9bfc483c57ca94a63d87c24cba00b4c06917885c533d2d245b1
-MD5 78bc6ceac57ecaa47abf4d5df857fe57 files/spawn-fcgi.initd 1398
-RMD160 3fd0fa41d100629e85960034237abc0866ec3d38 files/spawn-fcgi.initd 1398
-SHA256 ae10c764e2bde9bfc483c57ca94a63d87c24cba00b4c06917885c533d2d245b1 files/spawn-fcgi.initd 1398
-DIST lighttpd-1.4.18.tar.bz2 600227 RMD160 9fcd5e09ee2b1b517868d8843883228cd8b4145f SHA1 a53a8f8ae8d42d036f0b5129764b822e943cc778 SHA256 d59123850f3dd4a10f067d9a0c527324a70203cd3f82f70f0e44b8cb8068db43
-EBUILD lighttpd-1.4.18.ebuild 5805 RMD160 01e9138c52205b0a0406ef41b650c0a97c7cb9f1 SHA1 1894cd578f1b1d0f76ff8306f3a1da58555e2872 SHA256 df6c3771fba0da7aff39d6d9336df6a86961ae50f82d1d259d7a8c93f3ba8553
-MD5 3a2187a4caea72d09285c6e55ce429c3 lighttpd-1.4.18.ebuild 5805
-RMD160 01e9138c52205b0a0406ef41b650c0a97c7cb9f1 lighttpd-1.4.18.ebuild 5805
-SHA256 df6c3771fba0da7aff39d6d9336df6a86961ae50f82d1d259d7a8c93f3ba8553 lighttpd-1.4.18.ebuild 5805
-MD5 5a83e2ede2ef46ec8480a2a7e13e5cd2 files/digest-lighttpd-1.4.18 250
-RMD160 77cf7429b639aaf1b1b7fa14bf7ff29a3c69a062 files/digest-lighttpd-1.4.18 250
-SHA256 f3d4f1fcb4d07b2aecf7d9c3c5e7e4d58eaa8f0f9e227b32c27f774828e06578 files/digest-lighttpd-1.4.18 250
diff --git a/www-servers/lighttpd/files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff b/www-servers/lighttpd/files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff
deleted file mode 100644
index c168eba7..00000000
--- a/www-servers/lighttpd/files/1.4.18/03_all_lighttpd-1.4.11-errorlog-pipe.diff
+++ /dev/null
@@ -1,179 +0,0 @@
-diff -ur lighttpd-1.4.11.orig/src/base.h lighttpd-1.4.11/src/base.h
---- lighttpd-1.4.11.orig/src/base.h 2006-01-13 06:51:04.000000000 -0800
-+++ lighttpd-1.4.11/src/base.h 2006-12-17 18:01:39.000000000 -0800
-@@ -505,7 +505,7 @@
-
- /* the errorlog */
- int errorlog_fd;
-- enum { ERRORLOG_STDERR, ERRORLOG_FILE, ERRORLOG_SYSLOG } errorlog_mode;
-+ enum { ERRORLOG_STDERR, ERRORLOG_FILE, ERRORLOG_SYSLOG, ERRORLOG_PIPE } errorlog_mode;
- buffer *errorlog_buf;
-
- fdevents *ev, *ev_ins;
-diff -ur lighttpd-1.4.11.orig/src/log.c lighttpd-1.4.11/src/log.c
---- lighttpd-1.4.11.orig/src/log.c 2005-13-07 05:01:35.000000000 -0800
-+++ lighttpd-1.4.11/src/log.c 2006-12-17 18:09:43.000000000 -0800
-@@ -34,10 +34,11 @@
- /**
- * open the errorlog
- *
-- * we have 3 possibilities:
-+ * we have 4 possibilities:
- * - stderr (default)
- * - syslog
- * - logfile
-+ * - pipe
- *
- * if the open failed, report to the user and die
- *
-@@ -57,21 +58,81 @@
- srv->errorlog_mode = ERRORLOG_SYSLOG;
- } else if (!buffer_is_empty(srv->srvconf.errorlog_file)) {
- const char *logfile = srv->srvconf.errorlog_file->ptr;
--
-- if (-1 == (srv->errorlog_fd = open(logfile, O_APPEND | O_WRONLY | O_CREAT | O_LARGEFILE, 0644))) {
-- log_error_write(srv, __FILE__, __LINE__, "SSSS",
-- "opening errorlog '", logfile,
-- "' failed: ", strerror(errno));
--
-+
-+ if (logfile[0] == '|') {
-+#ifdef HAVE_FORK
-+ /* create write pipe and spawn process */
-+
-+ int to_log_fds[2];
-+ pid_t pid;
-+
-+ if (pipe(to_log_fds)) {
-+ log_error_write(srv, __FILE__, __LINE__, "ss",
-+ "pipe failed: ", strerror(errno));
-+ return -1;
-+ }
-+
-+ /* fork, execve */
-+ switch (pid = fork()) {
-+ case 0:
-+ /* child */
-+
-+ close(STDIN_FILENO);
-+ dup2(to_log_fds[0], STDIN_FILENO);
-+ close(to_log_fds[0]);
-+ /* not needed */
-+ close(to_log_fds[1]);
-+
-+ /* we don't need the client socket */
-+ for (fd = 3; fd < 256; fd++) {
-+ close(fd);
-+ }
-+
-+ /* exec the log-process (skip the | )
-+ *
-+ */
-+
-+ execl("/bin/sh", "sh", "-c", logfile + 1, NULL);
-+
-+ log_error_write(srv, __FILE__, __LINE__, "sss",
-+ "spawning log-process failed: ",
-+ strerror(errno), logfile + 1);
-+
-+ exit(-1);
-+ break;
-+ case -1:
-+ /* error */
-+ log_error_write(srv, __FILE__, __LINE__, "ss", "fork failed:", strerror(errno));
-+ break;
-+ default:
-+ close(to_log_fds[0]);
-+
-+ srv->errorlog_fd = to_log_fds[1];
-+
-+ break;
-+ }
-+ srv->errorlog_mode = ERRORLOG_PIPE;
-+#else
-+ log_error_write(srv, __FILE__, __LINE__, "SSS",
-+ "opening errorlog '", logfile,"' impossible");
- return -1;
-- }
-+#endif
-+ } else {
-+ if (-1 == (srv->errorlog_fd = open(logfile, O_APPEND | O_WRONLY | O_CREAT | O_LARGEFILE, 0644))) {
-+ log_error_write(srv, __FILE__, __LINE__, "SSSS",
-+ "opening errorlog '", logfile,
-+ "' failed: ", strerror(errno));
-+
-+ return -1;
-+ }
-+ srv->errorlog_mode = ERRORLOG_FILE;
-+ }
- #ifdef FD_CLOEXEC
-- /* close fd on exec (cgi) */
-- fcntl(srv->errorlog_fd, F_SETFD, FD_CLOEXEC);
-+ /* close fd on exec (cgi) */
-+ fcntl(srv->errorlog_fd, F_SETFD, FD_CLOEXEC);
- #endif
-- srv->errorlog_mode = ERRORLOG_FILE;
-- }
--
-+ }
-+
- log_error_write(srv, __FILE__, __LINE__, "s", "server started");
-
- #ifdef HAVE_VALGRIND_VALGRIND_H
-@@ -99,7 +160,7 @@
- */
-
- int log_error_cycle(server *srv) {
-- /* only cycle if we are not in syslog-mode */
-+ /* only cycle if the error log is a file */
-
- if (srv->errorlog_mode == ERRORLOG_FILE) {
- const char *logfile = srv->srvconf.errorlog_file->ptr;
-@@ -135,6 +196,7 @@
- log_error_write(srv, __FILE__, __LINE__, "s", "server stopped");
-
- switch(srv->errorlog_mode) {
-+ case ERRORLOG_PIPE: /* fall through */
- case ERRORLOG_FILE:
- close(srv->errorlog_fd);
- break;
-@@ -154,6 +216,7 @@
- va_list ap;
-
- switch(srv->errorlog_mode) {
-+ case ERRORLOG_PIPE:
- case ERRORLOG_FILE:
- case ERRORLOG_STDERR:
- /* cache the generated timestamp */
-@@ -238,6 +301,7 @@
- va_end(ap);
-
- switch(srv->errorlog_mode) {
-+ case ERRORLOG_PIPE: /* fall through */
- case ERRORLOG_FILE:
- BUFFER_APPEND_STRING_CONST(srv->errorlog_buf, "\n");
- write(srv->errorlog_fd, srv->errorlog_buf->ptr, srv->errorlog_buf->used - 1);
-diff -ur lighttpd-1.4.11.orig/src/mod_cgi.c lighttpd-1.4.11/src/mod_cgi.c
---- lighttpd-1.4.11.orig/src/mod_cgi.c 2006-02-22 05:15:10.000000000 -0800
-+++ lighttpd-1.4.11/src/mod_cgi.c 2006-12-17 18:01:39.000000000 -0800
-@@ -750,7 +750,7 @@
- *
- * we feed the stderr of the CGI to our errorlog, if possible
- */
-- if (srv->errorlog_mode == ERRORLOG_FILE) {
-+ if ((srv->errorlog_mode == ERRORLOG_FILE) || (srv->errorlog_mode == ERRORLOG_PIPE)) {
- close(STDERR_FILENO);
- dup2(srv->errorlog_fd, STDERR_FILENO);
- }
-diff -ur lighttpd-1.4.11.orig/src/mod_rrdtool.c lighttpd-1.4.11/src/mod_rrdtool.c
---- lighttpd-1.4.11.orig/src/mod_rrdtool.c 2005-08-21 15:52:24.000000000 -0700
-+++ lighttpd-1.4.11/src/mod_rrdtool.c 2006-12-17 18:01:39.000000000 -0800
-@@ -134,7 +134,7 @@
-
- close(STDERR_FILENO);
-
-- if (srv->errorlog_mode == ERRORLOG_FILE) {
-+ if ((srv->errorlog_mode == ERRORLOG_FILE) || (srv->errorlog_mode == ERRORLOG_PIPE)) {
- dup2(srv->errorlog_fd, STDERR_FILENO);
- close(srv->errorlog_fd);
- }
diff --git a/www-servers/lighttpd/files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff b/www-servers/lighttpd/files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff
deleted file mode 100644
index 259ad4b2..00000000
--- a/www-servers/lighttpd/files/1.4.18/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- lighttpd-1.4.13.old/src/Makefile.am 2006-10-09 12:19:34.000000000 -0400
-+++ lighttpd-1.4.13/src/Makefile.am 2007-03-26 10:10:26.000000000 -0400
-@@ -213,6 +213,7 @@
- mod_auth_la_SOURCES = mod_auth.c http_auth_digest.c http_auth.c
- mod_auth_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
- mod_auth_la_LIBADD = $(CRYPT_LIB) $(LDAP_LIB) $(LBER_LIB) $(common_libadd)
-+mod_auth_la_CFLAGS = -DLDAP_DEPRECATED
-
- lib_LTLIBRARIES += mod_rewrite.la
- mod_rewrite_la_SOURCES = mod_rewrite.c
diff --git a/www-servers/lighttpd/files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff b/www-servers/lighttpd/files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff
deleted file mode 100644
index f4bb6a5d..00000000
--- a/www-servers/lighttpd/files/1.4.18/05_all_lighttpd-1.4.18-dirlisting-sort.diff
+++ /dev/null
@@ -1,91 +0,0 @@
---- src/mod_dirlisting.c.old 2007-10-01 14:57:24.000000000 +0200
-+++ src/mod_dirlisting.c 2007-10-01 15:36:12.000000000 +0200
-@@ -503,6 +503,73 @@
- "}\n"
- "</style>\n"
- );
-+
-+ BUFFER_APPEND_STRING_CONST(out,
-+ "<script type=\"text/javascript\">\n"
-+ "// <!--\n"
-+ "var sort_column;\n"
-+ "var prev_span = null;\n");
-+
-+ BUFFER_APPEND_STRING_CONST(out,
-+ "function get_inner_text(el) {\n"
-+ " if((typeof el == 'string')||(typeof el == 'undefined'))\n"
-+ " return el;\n"
-+ " if(el.innerText)\n"
-+ " return el.innerText;\n"
-+ " else {\n"
-+ " var str = \"\";\n"
-+ " var cs = el.childNodes;\n"
-+ " var l = cs.length;\n"
-+ " for (i=0;i<l;i++) {\n"
-+ " if (cs[i].nodeType==1) str += get_inner_text(cs[i]);\n"
-+ " else if (cs[i].nodeType==3) str += cs[i].nodeValue;\n"
-+ " }\n"
-+ " }\n"
-+ " return str;\n"
-+ "}\n");
-+
-+ BUFFER_APPEND_STRING_CONST(out,
-+ "function sortfn(a,b) {\n"
-+ " var at = get_inner_text(a.cells[sort_column]);\n"
-+ " var bt = get_inner_text(b.cells[sort_column]);\n"
-+ " if (a.cells[sort_column].className == 'int') {\n"
-+ " return parseInt(at)-parseInt(bt);\n"
-+ " } else {\n"
-+ " aa = at.toLowerCase();\n"
-+ " bb = bt.toLowerCase();\n"
-+ " if (aa==bb) return 0;\n"
-+ " else if (aa<bb) return -1;\n"
-+ " else return 1;\n"
-+ " }\n"
-+ "}\n");
-+
-+ BUFFER_APPEND_STRING_CONST(out,
-+ "function resort(lnk) {\n"
-+ " var span = lnk.childNodes[1];\n"
-+ " var table = lnk.parentNode.parentNode.parentNode.parentNode;\n"
-+ " var rows = new Array();\n"
-+ " for (j=1;j<table.rows.length;j++)\n"
-+ " rows[j-1] = table.rows[j];\n"
-+ " sort_column = lnk.parentNode.cellIndex;\n"
-+ " rows.sort(sortfn);\n");
-+
-+ BUFFER_APPEND_STRING_CONST(out,
-+ " if (prev_span != null) prev_span.innerHTML = '';\n"
-+ " if (span.getAttribute('sortdir')=='down') {\n"
-+ " span.innerHTML = '&uarr;';\n"
-+ " span.setAttribute('sortdir','up');\n"
-+ " rows.reverse();\n"
-+ " } else {\n"
-+ " span.innerHTML = '&darr;';\n"
-+ " span.setAttribute('sortdir','down');\n"
-+ " }\n"
-+ " for (i=0;i<rows.length;i++)\n"
-+ " table.tBodies[0].appendChild(rows[i]);\n"
-+ " prev_span = span;\n"
-+ "}\n"
-+ "// -->\n"
-+ "</script>\n");
-+
- }
-
- BUFFER_APPEND_STRING_CONST(out, "</head>\n<body>\n");
-@@ -532,10 +599,10 @@
- "<table summary=\"Directory Listing\" cellpadding=\"0\" cellspacing=\"0\">\n"
- "<thead>"
- "<tr>"
-- "<th class=\"n\">Name</th>"
-- "<th class=\"m\">Last Modified</th>"
-- "<th class=\"s\">Size</th>"
-- "<th class=\"t\">Type</th>"
-+ "<th class=\"n\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Name <span class=\"sortarrow\"></span></a></th>"
-+ "<th class=\"m\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Last Modified <span class=\"sortarrow\"></span></a></th>"
-+ "<th class=\"s\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Size <span class=\"sortarrow\"></span></a></th>"
-+ "<th class=\"t\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Type <span class=\"sortarrow\"></span></a></th>"
- "</tr>"
- "</thead>\n"
- "<tbody>\n"
diff --git a/www-servers/lighttpd/files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff b/www-servers/lighttpd/files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff
deleted file mode 100644
index aa81da57..00000000
--- a/www-servers/lighttpd/files/1.4.18/06_all_lighttpd-1.4.18-dirlisting-brezhoneg-on-sort.diff
+++ /dev/null
@@ -1,54 +0,0 @@
---- src/mod_dirlisting.c.ori 2007-11-06 19:22:03.456537443 +0100
-+++ src/mod_dirlisting.c 2007-11-06 19:22:56.430836948 +0100
-@@ -458,7 +458,7 @@
- "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n"
- "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n"
- "<head>\n"
-- "<title>Index of "
-+ "<title>Taolenn verr "
- );
- buffer_append_string_encoded(out, CONST_BUF_LEN(con->uri.path), ENCODING_MINIMAL_XML);
- BUFFER_APPEND_STRING_CONST(out, "</title>\n");
-@@ -591,7 +591,7 @@
- stream_close(&s);
- }
-
-- BUFFER_APPEND_STRING_CONST(out, "<h2>Index of ");
-+ BUFFER_APPEND_STRING_CONST(out, "<h2>Taolenn verr ");
- buffer_append_string_encoded(out, CONST_BUF_LEN(con->uri.path), ENCODING_MINIMAL_XML);
- BUFFER_APPEND_STRING_CONST(out,
- "</h2>\n"
-@@ -599,18 +599,18 @@
- "<table summary=\"Directory Listing\" cellpadding=\"0\" cellspacing=\"0\">\n"
- "<thead>"
- "<tr>"
-- "<th class=\"n\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Name <span class=\"sortarrow\"></span></a></th>"
-- "<th class=\"m\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Last Modified <span class=\"sortarrow\"></span></a></th>"
-- "<th class=\"s\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Size <span class=\"sortarrow\"></span></a></th>"
-- "<th class=\"t\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Type <span class=\"sortarrow\"></span></a></th>"
-+ "<th class=\"n\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Anv <span class=\"sortarrow\"></span></a></th>"
-+ "<th class=\"m\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Kemm da ziwezhañ <span class=\"sortarrow\"></span></a></th>"
-+ "<th class=\"s\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Brasentez <span class=\"sortarrow\"></span></a></th>"
-+ "<th class=\"t\"><a href=\"#\" class=\"sortheader\" onclick=\"resort(this);return false;\">Benaos <span class=\"sortarrow\"></span></a></th>"
- "</tr>"
- "</thead>\n"
- "<tbody>\n"
- "<tr>"
-- "<td class=\"n\"><a href=\"../\">Parent Directory</a>/</td>"
-+ "<td class=\"n\"><a href=\"../\">Dreist</a>/</td>"
- "<td class=\"m\">&nbsp;</td>"
- "<td class=\"s\">- &nbsp;</td>"
-- "<td class=\"t\">Directory</td>"
-+ "<td class=\"t\">Roll Skridoù</td>"
- "</tr>\n"
- );
- }
-@@ -835,7 +835,7 @@
- buffer_append_string_encoded(out, DIRLIST_ENT_NAME(tmp), tmp->namelen, ENCODING_MINIMAL_XML);
- BUFFER_APPEND_STRING_CONST(out, "</a>/</td><td class=\"m\">");
- buffer_append_string_len(out, datebuf, sizeof(datebuf) - 1);
-- BUFFER_APPEND_STRING_CONST(out, "</td><td class=\"s\">- &nbsp;</td><td class=\"t\">Directory</td></tr>\n");
-+ BUFFER_APPEND_STRING_CONST(out, "</td><td class=\"s\">- &nbsp;</td><td class=\"t\">Roll Skridoù</td></tr>\n");
-
- free(tmp);
- }
diff --git a/www-servers/lighttpd/files/conf/lighttpd.conf b/www-servers/lighttpd/files/conf/lighttpd.conf
deleted file mode 100644
index 778a4062..00000000
--- a/www-servers/lighttpd/files/conf/lighttpd.conf
+++ /dev/null
@@ -1,321 +0,0 @@
-###############################################################################
-# Default lighttpd.conf for Gentoo.
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/lighttpd.conf,v 1.3 2005/09/01 14:22:35 ka0ttic Exp $
-###############################################################################
-
-# {{{ variables
-var.basedir = "/var/www/localhost"
-var.logdir = "/var/log/lighttpd"
-var.statedir = "/var/lib/lighttpd"
-# }}}
-
-# {{{ modules
-# At the very least, mod_access and mod_accesslog should be enabled.
-# All other modules should only be loaded if necessary.
-# NOTE: the order of modules is important.
-server.modules = (
-# "mod_rewrite",
-# "mod_redirect",
-# "mod_alias",
- "mod_access",
-# "mod_cml",
-# "mod_trigger_b4_dl",
-# "mod_auth",
-# "mod_status",
-# "mod_setenv",
-# "mod_proxy",
-# "mod_simple_vhost",
-# "mod_evhost",
-# "mod_userdir",
-# "mod_compress",
-# "mod_ssi",
-# "mod_usertrack",
-# "mod_expire",
-# "mod_secdownload",
-# "mod_rrdtool",
-# "mod_webdav",
- "mod_accesslog"
-)
-# }}}
-
-# {{{ includes
-include "mime-types.conf"
-# uncomment for cgi support
-# include "mod_cgi.conf"
-# uncomment for php/fastcgi support
-# include "mod_fastcgi.conf"
-# }}}
-
-# {{{ server settings
-server.username = "lighttpd"
-server.groupname = "lighttpd"
-
-server.document-root = var.basedir + "/htdocs"
-server.pid-file = "/var/run/lighttpd.pid"
-
-server.errorlog = var.logdir + "/error.log"
-# log errors to syslog instead
-# server.errorlog-use-syslog = "enable"
-
-server.indexfiles = ("index.php", "index.html",
- "index.htm", "default.htm")
-
-# server.tag = "lighttpd"
-
-server.follow-symlink = "enable"
-
-# event handler (defaults to "poll")
-# see performance.txt
-#
-# for >= linux-2.4
-# server.event-handler = "linux-rtsig"
-# for >= linux-2.6
-# server.event-handler = "linux-sysepoll"
-# for FreeBSD
-# server.event-handler = "freebsd-kqueue"
-
-# chroot to directory (defaults to no chroot)
-# server.chroot = "/"
-
-# bind to port (defaults to 80)
-# server.port = 81
-
-# bind to name (defaults to all interfaces)
-# server.bind = "grisu.home.kneschke.de"
-
-# error-handler for status 404
-# server.error-handler-404 = "/error-handler.html"
-# server.error-handler-404 = "/error-handler.php"
-
-# Format: <errorfile-prefix><status-code>.html
-# -> ..../status-404.html for 'File not found'
-# server.errorfile-prefix = var.basedir + "/error/status-"
-
-# FAM support for caching stat() calls
-# requires that lighttpd be built with USE=fam
-# server.stat-cache-engine = "fam"
-# }}}
-
-# {{{ mod_staticfile
-
-# which extensions should not be handled via static-file transfer
-# (extensions that are usually handled by mod_cgi, mod_fastcgi, etc).
-static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi")
-# }}}
-
-# {{{ mod_accesslog
-accesslog.filename = var.logdir + "/access.log"
-# }}}
-
-# {{{ mod_dirlisting
-# enable directory listings
-# dir-listing.activate = "enable"
-#
-# don't list hidden files/directories
-# dir-listing.hide-dotfiles = "enable"
-#
-# use a different css for directory listings
-# dir-listing.external-css = "/path/to/dir-listing.css"
-#
-# list of regular expressions. files that match any of the
-# specified regular expressions will be excluded from directory
-# listings.
-# dir-listing.exclude = ("^\.", "~$")
-# }}}
-
-# {{{ mod_access
-# see access.txt
-
-url.access-deny = ("~", ".inc")
-# }}}
-
-# {{{ mod_userdir
-# see userdir.txt
-#
-# userdir.path = "public_html"
-# userdir.exclude-user = ("root")
-# }}}
-
-# {{{ mod_ssi
-# see ssi.txt
-#
-# ssi.extension = (".shtml")
-# }}}
-
-# {{{ mod_ssl
-# see ssl.txt
-#
-# ssl.engine = "enable"
-# ssl.pemfile = "server.pem"
-# }}}
-
-# {{{ mod_status
-# see status.txt
-#
-# status.status-url = "/server-status"
-# status.config-url = "/server-config"
-# }}}
-
-# {{{ mod_simple_vhost
-# see simple-vhost.txt
-#
-# If you want name-based virtual hosting add the next three settings and load
-# mod_simple_vhost
-#
-# document-root =
-# virtual-server-root + virtual-server-default-host + virtual-server-docroot
-# or
-# virtual-server-root + http-host + virtual-server-docroot
-#
-# simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
-# simple-vhost.default-host = "grisu.home.kneschke.de"
-# simple-vhost.document-root = "/pages/"
-# }}}
-
-# {{{ mod_compress
-# see compress.txt
-#
-# compress.cache-dir = var.statedir + "/cache/compress"
-# compress.filetype = ("text/plain", "text/html")
-# }}}
-
-# {{{ mod_proxy
-# see proxy.txt
-#
-# proxy.server = ( ".php" =>
-# ( "localhost" =>
-# (
-# "host" => "192.168.0.101",
-# "port" => 80
-# )
-# )
-# )
-# }}}
-
-# {{{ mod_auth
-# see authentication.txt
-#
-# auth.backend = "plain"
-# auth.backend.plain.userfile = "lighttpd.user"
-# auth.backend.plain.groupfile = "lighttpd.group"
-
-# auth.backend.ldap.hostname = "localhost"
-# auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
-# auth.backend.ldap.filter = "(uid=$)"
-
-# auth.require = ( "/server-status" =>
-# (
-# "method" => "digest",
-# "realm" => "download archiv",
-# "require" => "user=jan"
-# ),
-# "/server-info" =>
-# (
-# "method" => "digest",
-# "realm" => "download archiv",
-# "require" => "valid-user"
-# )
-# )
-# }}}
-
-# {{{ mod_rewrite
-# see rewrite.txt
-#
-# url.rewrite = (
-# "^/$" => "/server-status"
-# )
-# }}}
-
-# {{{ mod_redirect
-# see redirect.txt
-#
-# url.redirect = (
-# "^/wishlist/(.+)" => "http://www.123.org/$1"
-# )
-# }}}
-
-# {{{ mod_evhost
-# define a pattern for the host url finding
-# %% => % sign
-# %0 => domain name + tld
-# %1 => tld
-# %2 => domain name without tld
-# %3 => subdomain 1 name
-# %4 => subdomain 2 name
-#
-# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
-# }}}
-
-# {{{ mod_expire
-# expire.url = (
-# "/buggy/" => "access 2 hours",
-# "/asdhas/" => "access plus 1 seconds 2 minutes"
-# )
-# }}}
-
-# {{{ mod_rrdtool
-# see rrdtool.txt
-#
-# rrdtool.binary = "/usr/bin/rrdtool"
-# rrdtool.db-name = var.statedir + "/lighttpd.rrd"
-# }}}
-
-# {{{ mod_setenv
-# see setenv.txt
-#
-# setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
-# setenv.add-response-header = ( "X-Secret-Message" => "42" )
-# }}}
-
-# {{{ mod_trigger_b4_dl
-# see trigger_b4_dl.txt
-#
-# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
-# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
-# trigger-before-download.trigger-url = "^/trigger/"
-# trigger-before-download.download-url = "^/download/"
-# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
-# trigger-before-download.trigger-timeout = 10
-# }}}
-
-# {{{ mod_cml
-# see cml.txt
-#
-# don't forget to add index.cml to server.indexfiles
-# cml.extension = ".cml"
-# cml.memcache-hosts = ( "127.0.0.1:11211" )
-# }}}
-
-# {{{ mod_webdav
-# see webdav.txt
-#
-# $HTTP["url"] =~ "^/dav($|/)" {
-# webdav.activate = "enable"
-# webdav.is-readonly = "enable"
-# }
-# }}}
-
-# {{{ extra rules
-#
-# set Content-Encoding and reset Content-Type for browsers that
-# support decompressing on-thy-fly (requires mod_setenv)
-# $HTTP["url"] =~ "\.gz$" {
-# setenv.add-response-header = ("Content-Encoding" => "x-gzip")
-# mimetype.assign = (".gz" => "text/plain")
-# }
-
-# $HTTP["url"] =~ "\.bz2$" {
-# setenv.add-response-header = ("Content-Encoding" => "x-bzip2")
-# mimetype.assign = (".bz2" => "text/plain")
-# }
-#
-# }}}
-
-# {{{ debug
-# debug.log-request-header = "enable"
-# debug.log-response-header = "enable"
-# debug.log-request-handling = "enable"
-# debug.log-file-not-found = "enable"
-# }}}
-
-# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/conf/mime-types.conf b/www-servers/lighttpd/files/conf/mime-types.conf
deleted file mode 100644
index 3c365777..00000000
--- a/www-servers/lighttpd/files/conf/mime-types.conf
+++ /dev/null
@@ -1,76 +0,0 @@
-###############################################################################
-# Default mime-types.conf for Gentoo.
-# include'd from lighttpd.conf.
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mime-types.conf,v 1.2 2005/08/27 12:36:13 ka0ttic Exp $
-###############################################################################
-
-# {{{ mime types
-mimetype.assign = (
- ".pdf" => "application/pdf",
- ".sig" => "application/pgp-signature",
- ".spl" => "application/futuresplash",
- ".class" => "application/octet-stream",
- ".ps" => "application/postscript",
- ".torrent" => "application/x-bittorrent",
- ".dvi" => "application/x-dvi",
- ".gz" => "application/x-gzip",
- ".pac" => "application/x-ns-proxy-autoconfig",
- ".swf" => "application/x-shockwave-flash",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".tar" => "application/x-tar",
- ".zip" => "application/zip",
- ".mp3" => "audio/mpeg",
- ".m3u" => "audio/x-mpegurl",
- ".wma" => "audio/x-ms-wma",
- ".wax" => "audio/x-ms-wax",
- ".ogg" => "application/ogg",
- ".wav" => "audio/x-wav",
- ".gif" => "image/gif",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".png" => "image/png",
- ".xbm" => "image/x-xbitmap",
- ".xpm" => "image/x-xpixmap",
- ".xwd" => "image/x-xwindowdump",
- ".css" => "text/css",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".js" => "text/javascript",
- ".asc" => "text/plain",
- ".c" => "text/plain",
- ".h" => "text/plain",
- ".cc" => "text/plain",
- ".cpp" => "text/plain",
- ".hh" => "text/plain",
- ".hpp" => "text/plain",
- ".conf" => "text/plain",
- ".log" => "text/plain",
- ".text" => "text/plain",
- ".txt" => "text/plain",
- ".diff" => "text/plain",
- ".patch" => "text/plain",
- ".ebuild" => "text/plain",
- ".eclass" => "text/plain",
- ".rtf" => "application/rtf",
- ".bmp" => "image/bmp",
- ".tif" => "image/tiff",
- ".tiff" => "image/tiff",
- ".ico" => "image/x-icon",
- ".dtd" => "text/xml",
- ".xml" => "text/xml",
- ".mpeg" => "video/mpeg",
- ".mpg" => "video/mpeg",
- ".mov" => "video/quicktime",
- ".qt" => "video/quicktime",
- ".avi" => "video/x-msvideo",
- ".asf" => "video/x-ms-asf",
- ".asx" => "video/x-ms-asf",
- ".wmv" => "video/x-ms-wmv",
- ".bz2" => "application/x-bzip",
- ".tbz" => "application/x-bzip-compressed-tar",
- ".tar.bz2" => "application/x-bzip-compressed-tar"
- )
-# }}}
-
-# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/conf/mod_cgi.conf b/www-servers/lighttpd/files/conf/mod_cgi.conf
deleted file mode 100644
index 1cb3770f..00000000
--- a/www-servers/lighttpd/files/conf/mod_cgi.conf
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# mod_cgi.conf
-# include'd by lighttpd.conf.
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mod_cgi.conf,v 1.1 2005/08/27 12:36:13 ka0ttic Exp $
-###############################################################################
-
-#
-# see cgi.txt for more information on using mod_cgi
-#
-
-server.modules += ("mod_cgi")
-
-# NOTE: this requires mod_alias
-alias.url = (
- "/cgi-bin/" => var.basedir + "/cgi-bin/"
-)
-
-#
-# Note that you'll also want to enable the
-# cgi-bin alias via mod_alias (above).
-#
-
-$HTTP["url"] =~ "^/cgi-bin/" {
- # disable directory listings
- dir-listing.activate = "disable"
- # only allow cgi's in this directory
- cgi.assign = (
- ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl"
- )
-}
-
-# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/conf/mod_fastcgi.conf b/www-servers/lighttpd/files/conf/mod_fastcgi.conf
deleted file mode 100644
index 452e1749..00000000
--- a/www-servers/lighttpd/files/conf/mod_fastcgi.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# mod_fastcgi.conf
-# include'd by lighttpd.conf.
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mod_fastcgi.conf,v 1.2 2005/08/27 12:36:13 ka0ttic Exp $
-###############################################################################
-
-server.modules += ("mod_fastcgi")
-fastcgi.server = ( ".php" =>
- ( "localhost" =>
- (
- "host" => "127.0.0.1",
- "port" => 1026,
- "bin-path" => "/usr/bin/php-cgi"
- )
- )
- )
-
-# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2 b/www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2
deleted file mode 100644
index ca1369af..00000000
--- a/www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# mod_fastcgi.conf
-# include'd by lighttpd.conf.
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mod_fastcgi.conf-1.4.13-r2,v 1.1 2007/04/01 23:22:00 robbat2 Exp $
-###############################################################################
-
-server.modules += ("mod_fastcgi")
-fastcgi.server = ( ".php" =>
- ( "localhost" =>
- (
- "socket" => "/var/run/lighttpd/lighttpd-fastcgi-php-" + PID + ".socket",
- "bin-path" => "/usr/bin/php-cgi"
- )
- )
- )
-
-# vim: set ft=conf foldmethod=marker et :
diff --git a/www-servers/lighttpd/files/lighttpd.confd b/www-servers/lighttpd/files/lighttpd.confd
deleted file mode 100644
index 70d41705..00000000
--- a/www-servers/lighttpd/files/lighttpd.confd
+++ /dev/null
@@ -1,12 +0,0 @@
-# /etc/conf.d/lighttpd
-
-# Location of a shell used by the 'include_shell' directive
-# in the lighttpd's configuration file
-#export SHELL="/bin/bash"
-
-# Location of the lighttpd configuration file
-LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf"
-
-# Location of the lighttpd pid file
-LIGHTTPD_PID="/var/run/lighttpd.pid"
-
diff --git a/www-servers/lighttpd/files/lighttpd.initd b/www-servers/lighttpd/files/lighttpd.initd
deleted file mode 100644
index 1ce30659..00000000
--- a/www-servers/lighttpd/files/lighttpd.initd
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd.initd,v 1.12 2007/10/12 20:54:46 swegener Exp $
-
-opts="depend checkconfig start stop reload"
-
-depend() {
- need net
- use mysql logger spawn-fcgi ldap slapd
- after famd
- after sshd
-}
-
-checkconfig() {
- if [[ ! -f ${LIGHTTPD_CONF} ]] ; then
- ewarn "${LIGHTTPD_CONF} does not exist."
- return 1
- fi
-
- /usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null
-}
-
-start() {
- checkconfig || return 1
-
- ebegin "Starting lighttpd"
- start-stop-daemon --start --quiet \
- --background --pidfile ${LIGHTTPD_PID} \
- --exec /usr/sbin/lighttpd -- -f ${LIGHTTPD_CONF}
- eend $?
-}
-
-stop() {
- local rv=0
- ebegin "Stopping lighttpd"
- if start-stop-daemon --stop --quiet --pidfile ${LIGHTTPD_PID} \
- --signal 2 ; then
- rm -f ${LIGHTTPD_PID}
- else
- rv=1
- fi
- eend $rv
-}
-
-reload() {
- if [ ! -f ${LIGHTTPD_PID} ]; then
- eerror "lighttpd isn't running"
- return 1
- fi
- checkconfig || return 1
- ebegin "Re-opening lighttpd log files"
- kill -HUP `cat ${LIGHTTPD_PID}` &>/dev/null
- eend $?
-}
diff --git a/www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3 b/www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3
deleted file mode 100644
index 80aaacc5..00000000
--- a/www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd.initd-1.4.13-r3,v 1.2 2007/10/12 20:54:46 swegener Exp $
-
-opts="reload graceful"
-
-depend() {
- need net
- use mysql logger spawn-fcgi ldap slapd
- after famd
- after sshd
-}
-
-checkconfig() {
- if [ ! -f "${LIGHTTPD_CONF}" ] ; then
- ewarn "${LIGHTTPD_CONF} does not exist."
- return 1
- fi
-
- /usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null
-}
-
-start() {
- checkconfig || return 1
-
- ebegin "Starting lighttpd"
- start-stop-daemon --start --quiet --exec /usr/sbin/lighttpd \
- --pidfile "${LIGHTTPD_PID}" -- -f "${LIGHTTPD_CONF}"
- eend $?
-}
-
-stop() {
- local rv=0
- ebegin "Stopping lighttpd"
- start-stop-daemon --stop --quiet --pidfile "${LIGHTTPD_PID}"
- eend $?
-}
-
-reload() {
- if ! service_started "${SVCNAME}" ; then
- eerror "${SVCNAME} isn't running"
- return 1
- fi
- checkconfig || return 1
-
- ebegin "Re-opening lighttpd log files"
- start-stop-daemon --stop --oknodo --quiet --pidfile "${LIGHTTPD_PID}" \
- --signal HUP
- eend $?
-}
-
-graceful() {
- if ! service_started "${SVCNAME}" ; then
- eerror "${SVCNAME} isn't running"
- return 1
- fi
- checkconfig || return 1
-
- ebegin "Gracefully stopping lighttpd"
- start-stop-daemon --stop --oknodo --quiet --pidfile "${LIGHTTPD_PID}" \
- --signal INT
- if eend $? ; then
- rm -f "${LIGHTTPD_PID}"
- start
- fi
-}
diff --git a/www-servers/lighttpd/files/lighttpd.logrotate b/www-servers/lighttpd/files/lighttpd.logrotate
deleted file mode 100644
index 76f0ef3f..00000000
--- a/www-servers/lighttpd/files/lighttpd.logrotate
+++ /dev/null
@@ -1,17 +0,0 @@
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd.logrotate,v 1.2 2006/05/30 19:49:29 bangert Exp $
-# lighttpd logrotate script for Gentoo
-
-/var/log/lighttpd/*.log {
- daily
- missingok
- copytruncate
- rotate 7
- compress
- notifempty
- sharedscripts
- postrotate
- if [ -f /var/run/lighttpd.pid ]; then \
- /etc/init.d/lighttpd reload > /dev/null 2>&1 || true ; \
- fi;
- endscript
-}
diff --git a/www-servers/lighttpd/files/spawn-fcgi.confd b/www-servers/lighttpd/files/spawn-fcgi.confd
deleted file mode 100644
index 2a88806a..00000000
--- a/www-servers/lighttpd/files/spawn-fcgi.confd
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/spawn-fcgi.confd,v 1.1 2005/02/14 11:39:01 ka0ttic Exp $
-
-# Configuration file for the FCGI-Part of /etc/init.d/lighttpd
-
-## Set this to "yes" to enable SPAWNFCGI
-ENABLE_SPAWNFCGI="yes"
-
-## ABSOLUTE path to the spawn-fcgi binary
-SPAWNFCGI="/usr/bin/spawn-fcgi"
-
-## ABSOLUTE path to the PHP binary
-FCGIPROGRAM="/usr/bin/php-cgi"
-
-## bind to tcp-port on localhost
-FCGIPORT="1026"
-
-## number of PHP childs to spawn
-PHP_FCGI_CHILDREN=5
-
-## number of request server by a single php-process until is will be restarted
-PHP_FCGI_MAX_REQUESTS=1000
-
-## IP adresses where PHP should access server connections from
-FCGI_WEB_SERVER_ADDRS="127.0.0.1"
-
-# allowed environment variables sperated by spaces
-ALLOWED_ENV="PATH USER"
-# do NOT change line below
-ALLOWED_ENV="$ALLOWED_ENV PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS"
-
-## if this script is run as root switch to the following user
-USERID=lighttpd
-GROUPID=lighttpd
diff --git a/www-servers/lighttpd/files/spawn-fcgi.initd b/www-servers/lighttpd/files/spawn-fcgi.initd
deleted file mode 100644
index 63daa750..00000000
--- a/www-servers/lighttpd/files/spawn-fcgi.initd
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/spawn-fcgi.initd,v 1.2 2007/04/02 12:46:08 uberlord Exp $
-
-SPAWNFCGI_PID="/var/run/spawn-fcgi.pid"
-
-depend() {
- need net
-}
-
-start() {
- local my_end
-
- ebegin "Starting spawn-fcgi"
- export PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS
-
- EX="${SPAWNFCGI} -p ${FCGIPORT} -f ${FCGIPROGRAM} -u ${USERID} \
- -g ${GROUPID} -C ${PHP_FCGI_CHILDREN}"
-
- # copy the allowed environment variables
- unset E
- for i in ${ALLOWED_ENV}; do
- E="${E} ${i}=${!i}"
- done
-
- # clean environment and set up a new one
- env - ${E} ${EX} 2>${SPAWNFCGI_PID}
- my_end=$?
- if [ "$my_end" != "0" ]; then
- [ -f ${SPAWNFCGI_PID} ] && rm -f ${SPAWNFCGI_PID}
- eend $my_end
- fi
-
- #extract parent-process-id and write it back to the file
- FCGI_PPID=`cat ${SPAWNFCGI_PID} | cut -d':' -f4`
- echo ${FCGI_PPID} > ${SPAWNFCGI_PID}
- eend 0
-}
-
-stop() {
- ebegin "Stopping spawn-fcgi"
- if ! kill `cat ${SPAWNFCGI_PID}` ; then
- eend $?
- return 1
- fi
- if [ -w ${SPAWNFCGI_PID} ]; then
- rm ${SPAWNFCGI_PID}
- fi
- eend 0
-}
diff --git a/www-servers/lighttpd/lighttpd-1.4.18.ebuild b/www-servers/lighttpd/lighttpd-1.4.18.ebuild
deleted file mode 100644
index db153d8a..00000000
--- a/www-servers/lighttpd/lighttpd-1.4.18.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.18.ebuild,v 1.6 2007/09/13 15:14:56 jer Exp $
-
-WANT_AUTOCONF=latest
-WANT_AUTOMAKE=latest
-inherit eutils autotools depend.php
-
-DESCRIPTION="Lightweight high-performance web server"
-HOMEPAGE="http://www.lighttpd.net/"
-SRC_URI="http://www.lighttpd.net/download/${P}.tar.bz2"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~sh sparc ~sparc-fbsd x86 ~x86-fbsd"
-IUSE="bzip2 doc fam fastcgi gdbm ipv6 ldap lua minimal memcache mysql pcre php rrdtool ssl test webdav xattr"
-
-RDEPEND=">=sys-libs/zlib-1.1
- bzip2? ( app-arch/bzip2 )
- fam? ( virtual/fam )
- gdbm? ( sys-libs/gdbm )
- ldap? ( >=net-nds/openldap-2.1.26 )
- lua? ( >=dev-lang/lua-5.1 )
- memcache? ( dev-libs/libmemcache )
- mysql? ( >=virtual/mysql-4.0 )
- pcre? ( >=dev-libs/libpcre-3.1 )
- php? ( virtual/httpd-php )
- rrdtool? ( net-analyzer/rrdtool )
- ssl? ( >=dev-libs/openssl-0.9.7 )
- webdav? (
- dev-libs/libxml2
- >=dev-db/sqlite-3
- sys-fs/e2fsprogs
- )
- xattr? ( kernel_linux? ( sys-apps/attr ) )"
-
-DEPEND="${RDEPEND}
- doc? ( dev-python/docutils )
- test? (
- virtual/perl-Test-Harness
- dev-libs/fcgi
- )"
-
-# update certain parts of lighttpd.conf based on conditionals
-update_config() {
- local config="/etc/lighttpd/lighttpd.conf"
-
- # enable php/mod_fastcgi settings
- use php && \
- dosed 's|#.*\(include.*fastcgi.*$\)|\1|' ${config}
-
- # enable stat() caching
- use fam && \
- dosed 's|#\(.*stat-cache.*$\)|\1|' ${config}
-}
-
-# remove non-essential stuff (for USE=minimal)
-remove_non_essential() {
- local libdir="${D}/usr/$(get_libdir)/${PN}"
-
- # text docs
- use doc || rm -fr ${D}/usr/share/doc/${PF}/txt
-
- # non-essential modules
- rm -f \
- ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.*
-
- # allow users to keep some based on USE flags
- use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.*
- use webdav || rm -f ${libdir}/mod_webdav.*
- use mysql || rm -f ${libdir}/mod_mysql_vhost.*
- use lua || rm -f ${libdir}/mod_{cml,magnet}.*
- use rrdtool || rm -f ${libdir}/mod_rrdtool.*
-
- if ! use fastcgi ; then
- rm -f ${libdir}/mod_fastcgi.* ${D}/usr/bin/spawn-fcgi \
- ${D}/usr/share/man/man1/spawn-fcgi.*
- fi
-}
-
-pkg_setup() {
- if ! use pcre ; then
- ewarn "It is highly recommended that you build ${PN}"
- ewarn "with perl regular expressions support via USE=pcre."
- ewarn "Otherwise you lose support for some core options such"
- ewarn "as conditionals and modules such as mod_re{write,direct}"
- ewarn "and mod_ssi."
- ebeep 5
- fi
-
- use php && require_php_with_use cgi
-
- enewgroup lighttpd
- enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
-
- EPATCH_SUFFIX="diff" EPATCH_OPTS="-l" epatch ${FILESDIR}/${PVR} || die "Patching failed!"
-
- eautoreconf || die
-
- # dev-python/docutils installs rst2html.py not rst2html
- sed -i -e 's|\(rst2html\)|\1.py|g' doc/Makefile.in || \
- die "sed doc/Makefile.in failed"
-
- # fix typo
- sed -i -e 's|\(output_content\)_\(type\)|\1\2|' doc/cml.txt || \
- die "sed doc/cml.txt failed"
-}
-
-src_compile() {
- econf --libdir=/usr/$(get_libdir)/${PN} \
- --enable-lfs \
- $(use_enable ipv6) \
- $(use_with bzip2) \
- $(use_with fam) \
- $(use_with gdbm) \
- $(use_with lua) \
- $(use_with ldap) \
- $(use_with memcache) \
- $(use_with mysql) \
- $(use_with pcre) \
- $(use_with ssl openssl) \
- $(use_with webdav webdav-props) \
- $(use_with webdav webdav-locks) \
- $(use_with xattr attr) \
- || die "econf failed"
-
- emake || die "emake failed"
-
- if use doc ; then
- einfo "Building HTML documentation"
- cd doc
- emake html || die "failed to build HTML documentation"
- fi
-}
-
-src_install() {
- make DESTDIR="${D}" install || die "make install failed"
-
- # init script stuff
- newinitd ${FILESDIR}/lighttpd.initd-1.4.13-r3 lighttpd || die
- newconfd ${FILESDIR}/lighttpd.confd lighttpd || die
- use fam && has_version app-admin/fam && \
- sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd
-
- if use php || use fastcgi ; then
- newinitd ${FILESDIR}/spawn-fcgi.initd spawn-fcgi || die
- newconfd ${FILESDIR}/spawn-fcgi.confd spawn-fcgi || die
- fi
-
- # configs
- insinto /etc/lighttpd
- doins ${FILESDIR}/conf/lighttpd.conf
- doins ${FILESDIR}/conf/mime-types.conf
- doins ${FILESDIR}/conf/mod_cgi.conf
- newins ${FILESDIR}/conf/mod_fastcgi.conf-1.4.13-r2 mod_fastcgi.conf
- # Secure directory for fastcgi sockets
- keepdir /var/run/lighttpd/
- fperms 0750 /var/run/lighttpd/
- fowners lighttpd:lighttpd /var/run/lighttpd/
-
- # update lighttpd.conf directives based on conditionals
- update_config
-
- # docs
- dodoc AUTHORS README NEWS ChangeLog doc/*.sh
- newdoc doc/lighttpd.conf lighttpd.conf.distrib
-
- use doc && dohtml -r doc/*
-
- docinto txt
- dodoc doc/*.txt
-
- # logrotate
- insinto /etc/logrotate.d
- newins ${FILESDIR}/lighttpd.logrotate lighttpd || die
-
- keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs
- fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd
- fperms 0750 /var/l{ib,og}/lighttpd
-
- use minimal && remove_non_essential
-}
-
-pkg_postinst () {
- echo
- if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then
- einfo "spawn-fcgi is now included with lighttpd"
- einfo "spawn-fcgi's init script configuration is now located"
- einfo "at /etc/conf.d/spawn-fcgi."
- echo
- fi
-
- if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then
- ewarn "As of lighttpd-1.4.1, Gentoo has a customized configuration,"
- ewarn "which is now located in /etc/lighttpd. Please migrate your"
- ewarn "existing configuration."
- ebeep 5
- fi
-
- if use fam ; then
- einfo "Remember to re-emerge lighttpd should you switch from"
- einfo "app-admin/famd to app-admin/gamin or vice versa."
- fi
- echo
-}