diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog index 34182ce..a9ab0e8 100644 --- a/net-misc/dhcp/ChangeLog +++ b/net-misc/dhcp/ChangeLog @@ -1,7 +1,19 @@ # ChangeLog for net-misc/dhcp -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.154 2009/05/29 23:30:28 vapier Exp $ + 14 Feb 2010; Mario Fetka + +files/dhcp-3.0.3-dhclient-stdin-conf.patch, +files/dhcp-3.0.3-tr.patch, + +files/dhcp-3.0.3-x-option.patch, +files/dhcp-3.0-ddns-example.patch, + +files/dhcp-3.1.1-CVE-2009-0692.patch, + +files/dhcp-3.1.2_p1-CVE-2009-1892.patch, files/dhcp-3.1.2.ebuild.patch, + +dhcp-3.1.3.ebuild, dhcp-4.0.1.ebuild, -dhcp-4.0.1_p1.ebuild, + +files/dhcp-4.0-dhclient-stdin-conf.patch, dhcp-4.1.0.ebuild, + -dhcp-4.1.0_p1.ebuild, -dhcp-4.1.0_p1-r1.ebuild, + files/dhcp-4.1-dhclient-metric.patch, files/dhcp-4.1-no_isc_blurb.patch, + files/dhcpd.init, +files/dhcpd.init2: + Bump + *dhcp-4.1.0_p1-r1 (18 Aug 2009) 18 Aug 2009; Mario Fetka +dhcp-4.1.0_p1-r1.ebuild: diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest index 6e8ef17..73b0d67 100644 --- a/net-misc/dhcp/Manifest +++ b/net-misc/dhcp/Manifest @@ -1,3 +1,4 @@ +AUX dhcp-3.0-ddns-example.patch 401 RMD160 0188ae91fb58fc6f8c0d1b5bcbed58582dfed099 SHA1 c9e0f4c9ccbf1ff89076ff1bec37fb6d1276b7f0 SHA256 cf136ce92ea8f3337b9ded9c6f4f019db9782a68c63a3e8b712d26a04c2c9584 AUX dhcp-3.0-fix-perms.patch 485 RMD160 3857270dffed5feee95609aeb37d0c9ef8844945 SHA1 1217265a8a7f1416b781e9f79e8dfb8304268e6c SHA256 a805a60b36e148886887aebb797e80f642386b3e55ef4a0b5132f96a2877e018 AUX dhcp-3.0-paranoia.patch 5366 RMD160 7c64e3dac5b07ff3859fcaa7a8b0e52a0c50446c SHA1 a30103c138e480766f84644fffb1d0897709c27d SHA256 a8db9eb98397a9c1b3a0de07fc107c39dc4f6a4a331d404fc6fcc4a8dbc7aeae AUX dhcp-3.0.2-gmake.patch 1872 RMD160 d2d41c0a7e002103d68605d2492bfe716bb2889e SHA1 f60c89233f06ca8554cd5cc9ed0301b597a724f7 SHA256 b2bbfc1d1f5b4d03ff3f53b3974ec32731e5f626de8f8d127328591e4c721215 @@ -8,43 +9,47 @@ AUX dhcp-3.0.3-dhclient-mtu.patch 6413 RMD160 2517c7fe58d7dca95bdbdc80e96b6260cc AUX dhcp-3.0.3-dhclient-no-down.patch 2332 RMD160 26d0c88534b71070e81c86c12b76a2b4ec7c9c2c SHA1 b2a00d46754414e937dc6c3d63a28b63b3b57ac9 SHA256 a5a67de79f6435d9bc4eeea416aff7a904ab567e5e8d75ecf34495bc9f2c5a44 AUX dhcp-3.0.3-dhclient-ntp.patch 5862 RMD160 73d001b7b2df36cf84aba9db76a1753c8d423a7d SHA1 cc3db6430f07f956c2ad25ed00e47d468eef2600 SHA256 80ab30eee75fb03c099416c25f031d03744011a582e8940c73077d5ee587c1ee AUX dhcp-3.0.3-dhclient-resolvconf.patch 6659 RMD160 27e6d97ca0ca52fc85abeb4f21f4cea526cbffcb SHA1 d4808b4ba195a2fe1232136c2e36fb534a4c07c3 SHA256 3e2ec3758f6a56658aa1ef9c8ab29f655716015f0c75eba022fa6e1a5e28b1ac +AUX dhcp-3.0.3-dhclient-stdin-conf.patch 1948 RMD160 42f32a5bbfe2a937827c2972ef84cfa78c2c401c SHA1 ac7afd5ecbde5348e9acea532dab1e01e3a58e8b SHA256 e1bfd26b7da10acc4bd718e35aae4235308abcacde78dedf39533b11ab18b3ae AUX dhcp-3.0.3-libdst.patch 322 RMD160 5216c754a912cfcfc65683afcf44dbe1a7871212 SHA1 804bab67ae06269336c51183d5ff1e8ba45c20b5 SHA256 68e9a081739736980c0ad834dfa6197f940982f53d4d16054715c0346b5b9eca AUX dhcp-3.0.3-no_isc_blurb.patch 3002 RMD160 d70f89e1763bfeb23ce8f09399426983df01f7c8 SHA1 99a9fe69988226d29ccc6c2dc745ffab9b66817c SHA256 09c451cd9667fc8effcecd640f4cbe8629d41f6abacf9d1f2f923aab1f6e0bbb +AUX dhcp-3.0.3-tr.patch 377 RMD160 fe81fefb55796b4e06fa73ec180026dceef5599d SHA1 947a4002e7e2b21cd80fe0a3d0f6f044d5c6faff SHA256 05f81ad7c0e8cd2d2f3e81c0cd1aecc0f2a2787672037eca87e66a814150f5c8 +AUX dhcp-3.0.3-x-option.patch 6478 RMD160 a0fa5b3c7caf2d303a76c3d6fc135783cfa2bbc6 SHA1 4c77474307f9e657e45618f93ba9120eafd83a9e SHA256 6628629a95ee7e711f9dbce6b7d527b15f98eaf7592a1d0855d7bf65961bc3f7 AUX dhcp-3.0.4-dhclient-stdin-conf.patch 2176 RMD160 fae08899f6b57da3ec7ab0068e288bbdf2fbf2ae SHA1 c10c35dcf4a94f45f4bc98147a70e9dcf3f01dd5 SHA256 80141fe71e52774f1c7b1a02f2cbd49bc646f19753ceefc1c3605104df0cae5f AUX dhcp-3.0.5-bpf-nofallback.patch 1473 RMD160 1a5ece77cb481416935b0d2eea53e85dc4c4ee93 SHA1 d4cad638075a98606e07c633551c8a1d2f78f2e7 SHA256 b215c5ff4a282b475f28168250c05bbbc85e7c37e7af92616571d499b8c14da6 AUX dhcp-3.1.0a1-dhclient-resolvconf.patch 10316 RMD160 183bedd1660bf5a5f9dc7d002199e76aec12341c SHA1 1e0332ea31cfdbe92f3053405587f08117de8f8b SHA256 112b2ed44aab92592eb3810c61ada7f30d9d01fe43b647667326972a37b412a1 -AUX dhcp-3.1.2.ebuild.patch 3117 RMD160 7554c09de35d67cce5c261e8ea09ca4a3d9eb40c SHA1 6f7f4cdc2aeb018565210c3aa6c71e8006cfc34c SHA256 d0aa621fb1cd15fecdd2201fe50eedb3dc6c1403adba1949c19d81ff1a80c43c +AUX dhcp-3.1.1-CVE-2009-0692.patch 494 RMD160 42d3490a34b9559a9c0f335c2a3b8c8a2105d55f SHA1 e1c6da730672194b1771f0729c7d9f08073dfa6e SHA256 df77ad202d11e21355ed92bf015286fcd2f28ae21302283ab570ea4d9b9632af +AUX dhcp-3.1.2.ebuild.patch 3115 RMD160 f4fe966cabb398ee07dbf3c5ea1770ae4c440293 SHA1 d3f52f648b7a26a1c399f2cebde133e03e5a110e SHA256 54213b839cbf549358763caec1edf433343e8a39073d8e335fa87d9cabf375cd +AUX dhcp-3.1.2_p1-CVE-2009-1892.patch 427 RMD160 fe7daa6834faa0f6078ef125525f6a2db0c05f37 SHA1 eb6dcedecef536f743e97e7d0b5eea0a08f5e55a SHA256 55bb136138b76d6fa9c9165b348fb2c6975b935b3bba72ea551fc8bcae4fcc9b AUX dhcp-4.0-dhclient-metric.patch 8100 RMD160 cd599d5523be30809024b8e0f81cd84e4d932317 SHA1 ba9ff19cc5274b0e3e8408eba4725e0546413954 SHA256 a1c5589ac1c57ba7fe66336646f4286ebd7112f05abf5ae59b69ff26e7409afc AUX dhcp-4.0-dhclient-ntp.patch 7966 RMD160 d6dd1c3363f06712a82231eae1eb559f5a45bbb5 SHA1 3c1b373c6649c1ccb44f205fbee116c134514f4e SHA256 e93bda7f2baae9163f96ab0408bfbe885caa96a8698f9e566b8a9dc04de9359b AUX dhcp-4.0-dhclient-resolvconf.patch 14516 RMD160 0a53cbb795c4d4989f5632b6314b69be5bd94611 SHA1 e1db8ecca4de1c45fcec7e93fb13d186931d74f6 SHA256 1cdbb9ed297426b2d44063ffb8642c9c5cdf54dc2f9c3c8f59100f4ab2c40986 AUX dhcp-4.0-dhclient-script-correct-operators.patch 1382 RMD160 3a37a68c5e9ab44b6f885e1e644f6138557ba45c SHA1 c5459430398b9c92ce9585672860abc6d247c451 SHA256 f5f1a75e9873b141d4b0a0f4fde911e6dfdddf13985e28e1789029ef7a072dfb +AUX dhcp-4.0-dhclient-stdin-conf.patch 3009 RMD160 749a3768dd709b54ad0ce6fc53828e8e777f32c7 SHA1 49d2a5db802431d894c0c790addd7c6752be7070 SHA256 b3136285b6a9099ac1018d768b072c03bd136c1b5bffa58e48c5101dfe79cd83 AUX dhcp-4.0-linux-ipv6-header.patch 817 RMD160 cd395ba33c6e729862af7a3c869d412e91ad5b41 SHA1 1e268892009a58caa8b6030be192a25583a96dd5 SHA256 dbb6f22c99dcf31fd91f89061398dea194476d37a1e328736adaff6fe2f00c6d AUX dhcp-4.0-no_isc_blurb.patch 2748 RMD160 f29d8705fab63320c18c6319dd5703a51acc1687 SHA1 d8af8f4567e4bdbfac5d8e5455dede87a188ad40 SHA256 603e9a6f28264e35513f40f987d10e4fdce6d5e4f8d48aa46f83b8687d57dff0 AUX dhcp-4.0-paranoia.patch 4996 RMD160 2f8339e3d8af9164c91cc5a3bab7605ecd728295 SHA1 94db8a07b82b69d0a05645b08ef5d0ec0b99bd19 SHA256 14d328d400cdc1b4d7d6329d9c8e997b2c5e76e8f21330e267a75d6240799058 AUX dhcp-4.0.1-dhclient-stdin-conf.patch 2965 RMD160 2c3dd3994f0a7f15f3fe51972dd04a2e6055613a SHA1 f4a9d51126ea489f75fcf29053ab432b68e5055d SHA256 0b25bc74ae258656dd1f0e6f4ffd6b4ef8b4ad56956624c0b6070941a180e57c AUX dhcp-4.0.1.ebuild.patch 2594 RMD160 2a07162a5a9b9c3373d409a9bf0a05e9ae97d23f SHA1 edd8ab5fb8f0af1082395df492397485883a22e1 SHA256 95b4847217b05389ae245eb95d059431e7e4ba068f2911e1c6e531912c03a48b -AUX dhcp-4.1-dhclient-metric.patch 8332 RMD160 9ac1d0588d911700e4f86a10275010bb60f98b42 SHA1 a27db920020de86c42c54d073cf34ba0f8d17af8 SHA256 93b7072aa10868755db60cbcc631017a516cfa617345eaa1f2774791c9e4c3ab -AUX dhcp-4.1-no_isc_blurb.patch 2711 RMD160 72de8521fcb1c5876770d8fda8a5e88f6199d58d SHA1 a27b11f0e1bb1cbc41b4676a3ff2fa6c0a6c113c SHA256 d8e96e99c2ca68aab5f4194fac6b7d3dcb35adf1a697a4696b06ee950759bf2f +AUX dhcp-4.1-dhclient-metric.patch 7493 RMD160 59131eb3645b80e666b0741324992f10545213e4 SHA1 ec7fedbc46efe882c172eb07613711cccc0bce73 SHA256 405027d4ed4aa4cf8df8e0972c543885f1a2c077483eac6771a58b84bee2a343 +AUX dhcp-4.1-no_isc_blurb.patch 2711 RMD160 6b6816756fc899a1bb108281faa4765fcf1d09f7 SHA1 5f010721ee2fd39232fc15ef18faccce6d15e3fe SHA256 c9a17ac6695fa29b016f9dc024b648641b3958ffb2c9740671a9f9c5e8b8e52e AUX dhcpd.conf 1092 RMD160 936bb112c7cdf8e669b695599252d1f6626be2f3 SHA1 cbabbcea73a0cbc9692462683b983c96d6f18b0c SHA256 b86d27e0560689057b01a352474582fceb3a398eaf3b17f901378ec56284c4d5 -AUX dhcpd.init 2502 RMD160 145e70595121d83596e5eea07b0397023ee37b7f SHA1 27289d207b933619a70f811ae25b10045433e4ca SHA256 6be02f3e948762760a8c83acbffe6f77fd3463acd8bed1194e96234e6897fbea +AUX dhcpd.init 1989 RMD160 7f6b6858020100e47efa5d6a0809b2959e551249 SHA1 2c611adc6425fd095740aa56d09d8aafb4fea58a SHA256 916bfeb81dcb3423fd4239270ac2dce2e6dc105b28a06e03b352f6bf6b30ed1e +AUX dhcpd.init2 2421 RMD160 baa01ae97b227edba7653cd51735613be2dac652 SHA1 f2068ceb2d79d7992f46b31e6a6e3277a0167dce SHA256 fef93e5a7264780044a977ade27e9cc70de824063791bcd07d3db81c11c16df5 AUX dhcrelay.conf 421 RMD160 456edbc9bcc8d3a44db5bb6dbf0c3003c3e7419c SHA1 78ecdb000382893fb49d0052ced063955b0ad9cf SHA256 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730 AUX dhcrelay.init 736 RMD160 04566b87bd6dbb8bb754b26409ca30b878ef3ca3 SHA1 72742b308314b2e1476b27e94212fbf4d179adc4 SHA256 cfdaff3a723be3935d06c14e171d4008f2ad3329bd05ac2e49c19bc0e14bc59c DIST dhcp-3.1.2.tar.gz 799626 RMD160 026ac48b176ec273397fafa8a834a21fd6331681 SHA1 a60cccec2402a35025ddaafc8ac896595188560e SHA256 80daba1e4ac220a0945778aa3c1c9eb7860c4426645660bebb8ed35a3231a2fb DIST dhcp-3.1.2p1.tar.gz 792355 RMD160 53434f8404c69e8e113cad030ec975cf13b467cc SHA1 730214fa6e70d187f1492aa3d4f1c2868ffcc8de SHA256 e0cb405e0fef0ecebec7aaed294032a06178ff28be87498596e6069ccda4341e +DIST dhcp-3.1.3.tar.gz 804097 RMD160 2337d1cc29e7be8ac973d8bfec633367dd37c12a SHA1 92fea5036c38a840f2f944b6cd1d90b18f950b7c SHA256 cb363247a897beaf5708c98d3a80dba8edd8f639d6bd1f4ada6c5a64ba51e2d4 DIST dhcp-4.0.1.tar.gz 1050570 RMD160 a9764a76d105778362fe4b58e77783331ee3448a SHA1 7d813740ab4a64e474f1c01b1395617987532ed1 SHA256 965d09a7759250eff7d6d06d37425ea085c14edb5b405f8357ef5ec72ded28ef -DIST dhcp-4.0.1p1.tar.gz 1033534 RMD160 a05d66cc689560b6624cdde23e50627ab3f4f42d SHA1 4bcb01c72f3e9ee18e202f0b69bbce8da8ffb6ff SHA256 da57542a6bfb54a2f7fcfa07d275a04c5ca6bdd6fe4e5e6c0e60512bc6ab8bd2 DIST dhcp-4.1.0.tar.gz 1086815 RMD160 bf96fa9d135a65b4d9b27f8caf4f3744f0636c80 SHA1 46e161892140a3b60cd56e62b442f48f51bc605f SHA256 688741e970410efdb177513550f8cd1ee52032eb109313ab316a852f40310914 -DIST dhcp-4.1.0p1.tar.gz 1073227 RMD160 ac8472946615e2a45a8e8a64474d437f328d5439 SHA1 71cd106f518283f6af55d3a6006b7e8f34ffe0e0 SHA256 ffcc98bd3b756d1ba8a565cc7bf604755e25da7e193b3c5273f668ca96318946 DIST ldap-for-dhcp-3.1.2-2.tar.gz 39752 RMD160 96d2f469b1349485c0202012697222911b81abe8 SHA1 023d12eeb148ad493e252edbfd112d19c9d0cecd SHA256 afd30a30d72a17a4d8ae1a27c247711f03b30b5e270bdcf9f521695b55b28db7 +DIST ldap-for-dhcp-3.1.3-1.tar.gz 41029 RMD160 8b3793f6f6db956fd9c2d6b1ea94e8bd040d188b SHA1 e8053dac00e04fa27ebe90260e78a7d37da21ec7 SHA256 4df0daf50ddc31eb3cfd7c31226ac3d766fb37884f80fc6b96f3c3ee4a94baab DIST ldap-for-dhcp-4.0.1-3.tar.gz 39117 RMD160 977ec08ec0213e1a53d0dd5b3b08a234172dbd22 SHA1 8bc692bb2017c1b5ff35d73c10e5a2e4ed44e559 SHA256 161f5cd479ba0789d139ef59d101244fa7c880c3d1c13cbbbbae978004a30a18 -DIST ldap-for-dhcp-4.1.0-4.tar.gz 39175 RMD160 a9e31099bb971bdba0e78b80130f539ccc5eed0b SHA1 1c37ebf531b6a0bc358edc6f3e31b57bfe88dd8e SHA256 1088f0c0b2c7d8cc543eb0d34e655690a6efaec7eca85df3e28c06a2c456780b DIST ldap-for-dhcp-4.1.0-5.tar.gz 39281 RMD160 bfcfd98542b4e3616f1008fda30495e853e91c09 SHA1 bc2dc8c0215d3abac346c05db0b6327d34d2132c SHA256 e99977de60b5fc03ef30b035ab15c90896296909cde1c76886c1361a714b90cc EBUILD dhcp-3.1.2.ebuild 8466 RMD160 3a49e7318d635a5ef940d2765832cfa133fe77d3 SHA1 9895117cd684d340ef9cdf8a7a924b77ffcfdb64 SHA256 5b2a6adc4c5ba199ba4bf57b2edf98b6788396c5c99587d0607cd4cccb28ca10 EBUILD dhcp-3.1.2_p1.ebuild 8489 RMD160 659d3f81fb9c920d47e65f2870e02eba93577d69 SHA1 fdb52c4412a22a8abb3c622664c58c7282e6db31 SHA256 d4a86105aa84c816c70ee85491131270560073b5f79bbeae8dd15e657075a65b -EBUILD dhcp-4.0.1.ebuild 7618 RMD160 004c49cda2fe8bc65f715748fe6b91d6ef27d9ef SHA1 5119917732b3c9be442085cc757914bb2b7b5f42 SHA256 d44301b743ecfa8edd846bc8ceba53571063c6293dcd188552bc912d4c627687 -EBUILD dhcp-4.0.1_p1.ebuild 7641 RMD160 5e18f9ce9e2ea046d5a4075add0451ee6db11337 SHA1 13200a619a95efaf423bb4b31525b78e63f94bdb SHA256 60c5367c063edf9bd2608faa4dd2ffc8b3e916dfeb2eac695d036303596d84be -EBUILD dhcp-4.1.0.ebuild 7546 RMD160 866e84089e01e0af7e3c786eff03a610cf4f0e77 SHA1 747648419e1ba0ce3b9746ee7171209df09be541 SHA256 e253fae73db8f3ecd0530820b97442b5cfee6bc148a297aa36df5f93f8bc6a6d -EBUILD dhcp-4.1.0_p1-r1.ebuild 7569 RMD160 6ce2efb66d30d13f46625bffb62a02a639cdd0db SHA1 f1556fa68a3522d356977f1b74cacbb5888bdf27 SHA256 218498789e9a098984313ee61cb6676568a73d7807b7029eadcc722e2c71b080 -EBUILD dhcp-4.1.0_p1.ebuild 7569 RMD160 a70df04a204179849393d09af0794be9864adfac SHA1 293974e0b82c0c49d5b7d2c79b29bf065a95018f SHA256 478d16d63f5bc01d42497666f2d8211dd3af65384353760a62798afaf099dc9d -MISC ChangeLog 28976 RMD160 6679ac9b6a5883132076f21413283ffae2c74c60 SHA1 9cbe6ff43a616b9f1797627f2c1d40e283d85747 SHA256 19217a420c9db5e50ac547a42c338562d70a1ac67f1b7b3b6f7716f43e7a8b53 +EBUILD dhcp-3.1.3.ebuild 8582 RMD160 ff557fd78cf7f9603f5bc2d8089da0cab478ddf3 SHA1 7aa0e60b290afba91eee2dde9ac4d7ed5c9bf353 SHA256 c6d652a1f6eaac1b0dcfae7fa0565b10e8bde04d747a6561415f3b9ec782f1f2 +EBUILD dhcp-4.0.1.ebuild 7518 RMD160 b67abe9cbe58a82ee136336e5945aaad203226c2 SHA1 ffffa20129703a1f98b30764d243d3033fc8ea0c SHA256 bfd9c9a7f62d2f6bffb230112a3951ad53dfcdee1978431d393255191f2625c8 +EBUILD dhcp-4.1.0.ebuild 7477 RMD160 088bf5e5ef19ade51b419e0749204facaef14cc5 SHA1 5c1caa8751fb82b444c79fce43a253e1d5fa426f SHA256 1da58a544cf20d2680888ab78a0c6e7ce3c5b17c00287d5396b07046567ee1ea +MISC ChangeLog 29592 RMD160 1f192478db173ccfd700d5062dd25dac97ac0816 SHA1 0ca6bb7c8aaaf4aab9827459eadca48e41a42f72 SHA256 896b40614c372dc0d66d8e542ca37d012f5599c31dd10cf2db8a23bc4e67c8c8 MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415 diff --git a/net-misc/dhcp/dhcp-4.0.1_p1.ebuild b/net-misc/dhcp/dhcp-3.1.3.ebuild similarity index 57% rename from net-misc/dhcp/dhcp-4.0.1_p1.ebuild rename to net-misc/dhcp/dhcp-3.1.3.ebuild index 5e28744..ab6f8b4 100644 --- a/net-misc/dhcp/dhcp-4.0.1_p1.ebuild +++ b/net-misc/dhcp/dhcp-3.1.3.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.1 2009/03/30 13:13:28 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.2_p1.ebuild,v 1.9 2010/01/15 19:00:22 ulm Exp $ -inherit eutils flag-o-matic autotools +inherit eutils flag-o-matic multilib toolchain-funcs -LDAP_PV="4.0.1-3" +LDAP_PV="3.1.3-1" MY_PV="${PV//_alpha/a}" MY_PV="${MY_PV//_beta/b}" @@ -16,17 +16,16 @@ MY_LDAP_PV="${LDAP_PV//-*/}" DESCRIPTION="ISC Dynamic Host Configuration Protocol" HOMEPAGE="http://www.isc.org/products/DHCP" SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz - http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz" + ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz + http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )" -LICENSE="isc-dhcp" +LICENSE="as-is BSD" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" -IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl" +KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" +IUSE="doc minimal static selinux kernel_linux ldap ssl" DEPEND="selinux? ( sec-policy/selinux-dhcp ) kernel_linux? ( sys-apps/net-tools ) - vim-syntax? ( app-vim/dhcpd-syntax ) ldap? ( net-nds/openldap ssl? ( dev-libs/openssl ) )" @@ -40,50 +39,53 @@ src_unpack() { # Gentoo patches - these will probably never be accepted upstream # Enable chroot support - epatch "${FILESDIR}/${PN}"-4.0-paranoia.patch + epatch "${FILESDIR}/${PN}"-3.0-paranoia.patch # Fix some permission issues epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch # Enable dhclient to equery NTP servers - epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-ntp.patch # resolvconf support in dhclient-script - epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch + epatch "${FILESDIR}/${PN}"-3.1.0a1-dhclient-resolvconf.patch # Fix setting hostnames on Linux epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch # Allow mtu settings epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch # Allow dhclient to use IF_METRIC to set route metrics - epatch "${FILESDIR}/${PN}"-4.0-dhclient-metric.patch - # Stop downing the interface on Linux as that breaks link daemons + epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-metric.patch + # Stop downing the interface on Linux as that breaks link dameons # such as wpa_supplicant and netplug epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch # Quiet the isc blurb - epatch "${FILESDIR}/${PN}"-4.0-no_isc_blurb.patch + epatch "${FILESDIR}/${PN}"-3.0.3-no_isc_blurb.patch # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch + epatch "${FILESDIR}/${PN}"-3.0.4-dhclient-stdin-conf.patch # Disable fallback interfaces when using BPF # This allows more than one dhclient instance on the BSD's epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch - # This allows the software to actually compile on linux - epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch - # Consistent style for the if statements, also resolves - # unary operator expected warnings (new style is wrong). - epatch "${FILESDIR}/${PN}"-4.0-dhclient-script-correct-operators.patch + + # General fixes which will probably be accepted upstream eventually + # Install libdst, #75544 + epatch "${FILESDIR}/${PN}"-3.0.3-libdst.patch + # Fix building on Gentoo/FreeBSD + epatch "${FILESDIR}/${PN}"-3.0.2-gmake.patch # NetworkManager support patches # If they fail to apply to future versions they will be dropped # Add dbus support to dhclient epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch + # Denial of service through mixed identifier/ethernet host definitions + epatch "${FILESDIR}/${P}"-CVE-2009-1892.patch + # Ldap patch for dhcp epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch # Brand the version with Gentoo # include revision if >0 - local newver="Gentoo" + local newver="${MY_PV}-Gentoo" [[ ${PR} != "r0" ]] && newver="${newver}-${PR}" - - sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \ - configure.ac || die + sed -i '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \ + includes/version.h || die # Change the hook script locations of the scripts sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ @@ -100,6 +102,12 @@ src_unpack() { sed -i -e "/\(script\|host-name\|domain-name\) / d" \ client/dhclient.conf || die + # Build sed man pages as we don't ever support BSD 4.4 and older, #130251. + local x= + for x in Makefile.dist $(ls */Makefile.dist) ; do + sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}" || die + done + # Only install different man pages if we don't have en if [[ " ${LINGUAS} " != *" en "* ]]; then # Install Japanese man pages @@ -112,66 +120,79 @@ src_unpack() { # Now remove the non-english docs so there are no errors later [[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP - - eautoreconf } src_compile() { - myconf="" - if use ldap; then - myconf="${myconf} --with-ldap" - use ssl && myconf="${myconf} --with-ldapcrypto" - fi - econf \ - --enable-paranoia \ - --sysconfdir /etc/dhcp \ - --with-cli-pid-file=/var/run/dhcp/dhclient.pid \ - --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ - --with-srv-pid-file=/var/run/dhcp/dhcpd.pid \ - --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ - --with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ - $(use_enable ipv6 dhcpv6) \ - ${myconf} \ - || die + use static && append-ldflags -static + cat <<-END >> includes/site.h + #define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf" + #define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid" + #define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases" + #define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf" + #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases" + #define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid" + #define DHCPD_LOG_FACILITY LOG_LOCAL1 + END + if use ldap ; then + echo "#define LDAP_CONFIGURATION" >> includes/site.h + use ssl && echo "#define USE_SSL" >> includes/site.h + fi + + cat <<-END > site.conf + CC = $(tc-getCC) + LFLAGS = ${LDFLAGS} + LIBDIR = /usr/$(get_libdir) + INCDIR = /usr/include + ETC = /etc/dhcp + VARDB = /var/lib/dhcp + VARRUN = /var/run/dhcp + ADMMANDIR = /usr/share/man/man8 + ADMMANEXT = .8 + FFMANDIR = /usr/share/man/man5 + FFMANEXT = .5 + LIBMANDIR = /usr/share/man/man3 + LIBMANEXT = .3 + USRMANDIR = /usr/share/man/man1 + USRMANEXT = .1 + MANCAT = man + END + if use ldap ; then + echo "LDAPLIB = -lldap" >> site.conf + use ssl && echo "SSLLIB = -lcrypto -lssl" >> site.conf + fi + + ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \ + || die "configure failed" + + # Remove server support from the Makefile + # We still install some extra crud though + if use minimal ; then + sed -i -e 's/\(server\|relay\|dhcpctl\)/ /g' work.*/Makefile || die + fi emake || die "compile problem" } src_install() { - for installdir in includes tests common minires dst omapip client dhcpctl relay server; do - cd "${S}/${installdir}" - if [ "${installdir}" == client ]; then - make install DESTDIR="${D}" exec_prefix="" || die - else - make install DESTDIR="${D}" exec_prefix="/usr" || die - fi - done - - cd "${S}" - - exeinto /sbin - if use kernel_linux; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - + make install DESTDIR="${D}" || die if use doc; then dodoc README RELNOTES doc/* use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt fi + insinto /etc/dhcp newins client/dhclient.conf dhclient.conf.sample keepdir /var/{lib,run}/dhcp keepdir /var/lib/dhclient # Install our server files - insinto /etc/dhcp - newins server/dhcpd.conf dhcpd.conf.sample - newinitd "${FILESDIR}"/dhcpd.init dhcpd - newinitd "${FILESDIR}"/dhcrelay.init dhcrelay - newconfd "${FILESDIR}"/dhcpd.conf dhcpd - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay + if ! use minimal ; then + insinto /etc/dhcp + newins server/dhcpd.conf dhcpd.conf.sample + newinitd "${FILESDIR}"/dhcpd.init2 dhcpd + newinitd "${FILESDIR}"/dhcrelay.init dhcrelay + newconfd "${FILESDIR}"/dhcpd.conf dhcpd + newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay # install ldap files if use ldap; then @@ -180,18 +201,22 @@ src_install() { dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap fi - - # We never want portage to own this file - rm -f "${D}"/var/lib/dhcp/dhcpd.leases + # We never want portage to own this file + rm -f "${D}"/var/lib/dhcp/dhcpd.leases + fi } pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp + if ! use minimal ; then + enewgroup dhcp + enewuser dhcp -1 -1 /var/lib/dhcp dhcp + fi } pkg_postinst() { - chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp + use minimal && return + + chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then ewarn @@ -209,6 +234,12 @@ pkg_postinst() { } pkg_config() { + if use minimal ; then + eerror "${PN} has not been compiled for server support" + eerror "emerge ${PN} without the minimal USE flag to use dhcp sever" + return 1 + fi + local CHROOT="$( sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ "${ROOT}"/etc/conf.d/dhcpd diff --git a/net-misc/dhcp/dhcp-4.0.1.ebuild b/net-misc/dhcp/dhcp-4.0.1.ebuild index 500dfd7..a9a3cdf 100644 --- a/net-misc/dhcp/dhcp-4.0.1.ebuild +++ b/net-misc/dhcp/dhcp-4.0.1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.1 2009/03/30 13:13:28 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $ inherit eutils flag-o-matic autotools @@ -15,10 +15,10 @@ MY_LDAP_PV="${LDAP_PV//-*/}" DESCRIPTION="ISC Dynamic Host Configuration Protocol" HOMEPAGE="http://www.isc.org/products/DHCP" SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz - http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz" + ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz + http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )" -LICENSE="isc-dhcp" +LICENSE="as-is BSD" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl" @@ -116,11 +116,6 @@ src_unpack() { } src_compile() { - myconf="" - if use ldap; then - myconf="${myconf} --with-ldap" - use ssl && myconf="${myconf} --with-ldapcrypto" - fi econf \ --enable-paranoia \ --sysconfdir /etc/dhcp \ @@ -130,7 +125,8 @@ src_compile() { --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ --with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ $(use_enable ipv6 dhcpv6) \ - ${myconf} \ + $(use_with ldap) \ + $(use_with ssl ldapcrypto) \ || die emake || die "compile problem" @@ -162,7 +158,6 @@ src_install() { insinto /etc/dhcp newins client/dhclient.conf dhclient.conf.sample keepdir /var/{lib,run}/dhcp - keepdir /var/lib/dhclient # Install our server files insinto /etc/dhcp diff --git a/net-misc/dhcp/dhcp-4.1.0.ebuild b/net-misc/dhcp/dhcp-4.1.0.ebuild index bac27fe..50b6fb1 100644 --- a/net-misc/dhcp/dhcp-4.1.0.ebuild +++ b/net-misc/dhcp/dhcp-4.1.0.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.1 2009/03/30 13:13:28 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $ inherit eutils flag-o-matic autotools -LDAP_PV="4.1.0-4" +LDAP_PV="4.1.0-5" MY_PV="${PV//_alpha/a}" MY_PV="${MY_PV//_beta/b}" @@ -15,10 +15,10 @@ MY_LDAP_PV="${LDAP_PV//-*/}" DESCRIPTION="ISC Dynamic Host Configuration Protocol" HOMEPAGE="http://www.isc.org/products/DHCP" SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz - http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz" + ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz + http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )" -LICENSE="isc-dhcp" +LICENSE="as-is BSD" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl" @@ -114,11 +114,6 @@ src_unpack() { } src_compile() { - myconf="" - if use ldap; then - myconf="${myconf} --with-ldap" - use ssl && myconf="${myconf} --with-ldapcrypto" - fi econf \ --enable-paranoia \ --sysconfdir /etc/dhcp \ @@ -128,7 +123,8 @@ src_compile() { --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ --with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ $(use_enable ipv6 dhcpv6) \ - ${myconf} \ + $(use_with ldap) \ + $(use_with ssl ldapcrypto) \ || die emake || die "compile problem" @@ -165,7 +161,7 @@ src_install() { # Install our server files insinto /etc/dhcp newins server/dhcpd.conf dhcpd.conf.sample - newinitd "${FILESDIR}"/dhcpd.init dhcpd + newinitd "${FILESDIR}"/dhcpd.init2 dhcpd newinitd "${FILESDIR}"/dhcrelay.init dhcrelay newconfd "${FILESDIR}"/dhcpd.conf dhcpd newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay @@ -188,7 +184,7 @@ pkg_preinst() { } pkg_postinst() { - chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp + chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then ewarn diff --git a/net-misc/dhcp/dhcp-4.1.0_p1-r1.ebuild b/net-misc/dhcp/dhcp-4.1.0_p1-r1.ebuild deleted file mode 100644 index 21c036b..0000000 --- a/net-misc/dhcp/dhcp-4.1.0_p1-r1.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.1 2009/03/30 13:13:28 chainsaw Exp $ - -inherit eutils flag-o-matic autotools - -LDAP_PV="4.1.0-5" - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/p}" -MY_P="${PN}-${MY_PV}" -MY_LDAP_PV="${LDAP_PV//-*/}" - -DESCRIPTION="ISC Dynamic Host Configuration Protocol" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz - http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz" - -LICENSE="isc-dhcp" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" -IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools ) - vim-syntax? ( app-vim/dhcpd-syntax ) - ldap? ( net-nds/openldap - ssl? ( dev-libs/openssl ) )" - -PROVIDE="virtual/dhcpc" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - cd "${S}" - - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch - # Fix setting hostnames on Linux - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch - # Allow mtu settings - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch - # Allow dhclient to use IF_METRIC to set route metrics - epatch "${FILESDIR}/${PN}"-4.1-dhclient-metric.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch - # Quiet the isc blurb - epatch "${FILESDIR}/${PN}"-4.1-no_isc_blurb.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch - # Disable fallback interfaces when using BPF - # This allows more than one dhclient instance on the BSD's - epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch - # This allows the software to actually compile on linux - epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch - # Consistent style for the if statements, also resolves - # unary operator expected warnings (new style is wrong). - epatch "${FILESDIR}/${PN}"-4.0-dhclient-script-correct-operators.patch - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch - - # Ldap patch for dhcp - epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch - - # Brand the version with Gentoo - # include revision if >0 - local newver="Gentoo" - [[ ${PR} != "r0" ]] && newver="${newver}-${PR}" - - sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \ - configure.ac || die - - # Change the hook script locations of the scripts - sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash, #158540. - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - # Only install different man pages if we don't have en - if [[ " ${LINGUAS} " != *" en "* ]]; then - # Install Japanese man pages - if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then - einfo "Installing Japanese documention" - cp doc/ja_JP.eucJP/dhclient* client - cp doc/ja_JP.eucJP/dhcp* common - fi - fi - - # Now remove the non-english docs so there are no errors later - [[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP - - eautoreconf -} - -src_compile() { - myconf="" - if use ldap; then - myconf="${myconf} --with-ldap" - use ssl && myconf="${myconf} --with-ldapcrypto" - fi - econf \ - --enable-paranoia \ - --sysconfdir /etc/dhcp \ - --with-cli-pid-file=/var/run/dhcp/dhclient.pid \ - --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ - --with-srv-pid-file=/var/run/dhcp/dhcpd.pid \ - --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ - --with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ - $(use_enable ipv6 dhcpv6) \ - ${myconf} \ - || die - - emake || die "compile problem" -} - -src_install() { - for installdir in includes tests common minires dst omapip client dhcpctl relay server; do - cd "${S}/${installdir}" - if [ "${installdir}" == client ]; then - make install DESTDIR="${D}" exec_prefix="" || die - else - make install DESTDIR="${D}" exec_prefix="/usr" || die - fi - done - - cd "${S}" - - exeinto /sbin - if use kernel_linux; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - - if use doc; then - dodoc README RELNOTES doc/* - use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt - fi - insinto /etc/dhcp - newins client/dhclient.conf dhclient.conf.sample - keepdir /var/{lib,run}/dhcp - keepdir /var/lib/dhclient - - # Install our server files - insinto /etc/dhcp - newins server/dhcpd.conf dhcpd.conf.sample - newinitd "${FILESDIR}"/dhcpd.init dhcpd - newinitd "${FILESDIR}"/dhcrelay.init dhcrelay - newconfd "${FILESDIR}"/dhcpd.conf dhcpd - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - - # install ldap files - if use ldap; then - insinto /etc/openldap/schema - doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.* - dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap - fi - - - # We never want portage to own this file - rm -f "${D}"/var/lib/dhcp/dhcpd.leases -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp -} - -pkg_postinst() { - chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp - - if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then - ewarn - ewarn "WARNING: The dhcp init script has been renamed to dhcpd" - ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" - ewarn "and dhcp should be removed from the default runlevel" - ewarn - fi - - einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings." - einfo - einfo "If you would like to run dhcpd in a chroot, simply configure the" - einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:" - einfo " emerge --config =${PF}" -} - -pkg_config() { - local CHROOT="$( - sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ - "${ROOT}"/etc/conf.d/dhcpd - )" - - if [[ -z ${CHROOT} ]]; then - eerror "CHROOT not defined in /etc/conf.d/dhcpd" - return 1 - fi - - CHROOT="${ROOT}/${CHROOT}" - - if [[ -d ${CHROOT} ]] ; then - ewarn "${CHROOT} already exists - aborting" - return 0 - fi - - ebegin "Setting up the chroot directory" - mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp} - cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc - cp -R /etc/dhcp "${CHROOT}"/etc - cp -R /var/lib/dhcp "${CHROOT}"/var/lib - ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib - chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp - eend 0 - - local logger="$(best_version virtual/logger)" - einfo "To enable logging from the dhcpd server, configure your" - einfo "logger (${logger}) to listen on ${CHROOT}/dev/log" -} diff --git a/net-misc/dhcp/dhcp-4.1.0_p1.ebuild b/net-misc/dhcp/dhcp-4.1.0_p1.ebuild deleted file mode 100644 index 32fd6c5..0000000 --- a/net-misc/dhcp/dhcp-4.1.0_p1.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.1 2009/03/30 13:13:28 chainsaw Exp $ - -inherit eutils flag-o-matic autotools - -LDAP_PV="4.1.0-4" - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/p}" -MY_P="${PN}-${MY_PV}" -MY_LDAP_PV="${LDAP_PV//-*/}" - -DESCRIPTION="ISC Dynamic Host Configuration Protocol" -HOMEPAGE="http://www.isc.org/products/DHCP" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz - http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz" - -LICENSE="isc-dhcp" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" -IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl" - -DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools ) - vim-syntax? ( app-vim/dhcpd-syntax ) - ldap? ( net-nds/openldap - ssl? ( dev-libs/openssl ) )" - -PROVIDE="virtual/dhcpc" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - cd "${S}" - - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch - # Enable dhclient to equery NTP servers - epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch - # resolvconf support in dhclient-script - epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch - # Fix setting hostnames on Linux - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch - # Allow mtu settings - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch - # Allow dhclient to use IF_METRIC to set route metrics - epatch "${FILESDIR}/${PN}"-4.1-dhclient-metric.patch - # Stop downing the interface on Linux as that breaks link daemons - # such as wpa_supplicant and netplug - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch - # Quiet the isc blurb - epatch "${FILESDIR}/${PN}"-4.1-no_isc_blurb.patch - # Enable dhclient to get extra configuration from stdin - epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch - # Disable fallback interfaces when using BPF - # This allows more than one dhclient instance on the BSD's - epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch - # This allows the software to actually compile on linux - epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch - # Consistent style for the if statements, also resolves - # unary operator expected warnings (new style is wrong). - epatch "${FILESDIR}/${PN}"-4.0-dhclient-script-correct-operators.patch - - # NetworkManager support patches - # If they fail to apply to future versions they will be dropped - # Add dbus support to dhclient - epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch - - # Ldap patch for dhcp - epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch - - # Brand the version with Gentoo - # include revision if >0 - local newver="Gentoo" - [[ ${PR} != "r0" ]] && newver="${newver}-${PR}" - - sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \ - configure.ac || die - - # Change the hook script locations of the scripts - sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash, #158540. - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i -e "/\(script\|host-name\|domain-name\) / d" \ - client/dhclient.conf || die - - # Only install different man pages if we don't have en - if [[ " ${LINGUAS} " != *" en "* ]]; then - # Install Japanese man pages - if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then - einfo "Installing Japanese documention" - cp doc/ja_JP.eucJP/dhclient* client - cp doc/ja_JP.eucJP/dhcp* common - fi - fi - - # Now remove the non-english docs so there are no errors later - [[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP - - eautoreconf -} - -src_compile() { - myconf="" - if use ldap; then - myconf="${myconf} --with-ldap" - use ssl && myconf="${myconf} --with-ldapcrypto" - fi - econf \ - --enable-paranoia \ - --sysconfdir /etc/dhcp \ - --with-cli-pid-file=/var/run/dhcp/dhclient.pid \ - --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ - --with-srv-pid-file=/var/run/dhcp/dhcpd.pid \ - --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ - --with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ - $(use_enable ipv6 dhcpv6) \ - ${myconf} \ - || die - - emake || die "compile problem" -} - -src_install() { - for installdir in includes tests common minires dst omapip client dhcpctl relay server; do - cd "${S}/${installdir}" - if [ "${installdir}" == client ]; then - make install DESTDIR="${D}" exec_prefix="" || die - else - make install DESTDIR="${D}" exec_prefix="/usr" || die - fi - done - - cd "${S}" - - exeinto /sbin - if use kernel_linux; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - - if use doc; then - dodoc README RELNOTES doc/* - use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt - fi - insinto /etc/dhcp - newins client/dhclient.conf dhclient.conf.sample - keepdir /var/{lib,run}/dhcp - keepdir /var/lib/dhclient - - # Install our server files - insinto /etc/dhcp - newins server/dhcpd.conf dhcpd.conf.sample - newinitd "${FILESDIR}"/dhcpd.init dhcpd - newinitd "${FILESDIR}"/dhcrelay.init dhcrelay - newconfd "${FILESDIR}"/dhcpd.conf dhcpd - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - - # install ldap files - if use ldap; then - insinto /etc/openldap/schema - doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.* - dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap - fi - - - # We never want portage to own this file - rm -f "${D}"/var/lib/dhcp/dhcpd.leases -} - -pkg_preinst() { - enewgroup dhcp - enewuser dhcp -1 -1 /var/lib/dhcp dhcp -} - -pkg_postinst() { - chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp - - if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then - ewarn - ewarn "WARNING: The dhcp init script has been renamed to dhcpd" - ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" - ewarn "and dhcp should be removed from the default runlevel" - ewarn - fi - - einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings." - einfo - einfo "If you would like to run dhcpd in a chroot, simply configure the" - einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:" - einfo " emerge --config =${PF}" -} - -pkg_config() { - local CHROOT="$( - sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ - "${ROOT}"/etc/conf.d/dhcpd - )" - - if [[ -z ${CHROOT} ]]; then - eerror "CHROOT not defined in /etc/conf.d/dhcpd" - return 1 - fi - - CHROOT="${ROOT}/${CHROOT}" - - if [[ -d ${CHROOT} ]] ; then - ewarn "${CHROOT} already exists - aborting" - return 0 - fi - - ebegin "Setting up the chroot directory" - mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp} - cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc - cp -R /etc/dhcp "${CHROOT}"/etc - cp -R /var/lib/dhcp "${CHROOT}"/var/lib - ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib - chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp - eend 0 - - local logger="$(best_version virtual/logger)" - einfo "To enable logging from the dhcpd server, configure your" - einfo "logger (${logger}) to listen on ${CHROOT}/dev/log" -} diff --git a/net-misc/dhcp/files/dhcp-3.0-ddns-example.patch b/net-misc/dhcp/files/dhcp-3.0-ddns-example.patch new file mode 100644 index 0000000..8e69ddb --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0-ddns-example.patch @@ -0,0 +1,13 @@ +diff -ur a/server/dhcpd.conf b/server/dhcpd.conf +--- a/server/dhcpd.conf 2001-01-25 08:33:11 +0000 ++++ b/server/dhcpd.conf 2007-07-19 10:29:43 +0100 +@@ -21,6 +21,9 @@ + # No service will be given on this subnet, but declaring it helps the + # DHCP server to understand the network topology. + ++# Disable dynamic DNS updates. ++ddns-update-style none; ++ + subnet 10.152.187.0 netmask 255.255.255.0 { + } + diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-stdin-conf.patch new file mode 100644 index 0000000..fb46134 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-stdin-conf.patch @@ -0,0 +1,77 @@ +--- client/clparse.c.orig 2006-02-22 09:37:12.000000000 +0000 ++++ client/clparse.c 2006-02-22 09:38:26.000000000 +0000 +@@ -97,6 +97,11 @@ + status = read_client_conf_file (path_dhclient_conf, + (struct interface_info *)0, + &top_level_config); ++ ++ /* Read any extra configuration from stdin */ ++ read_client_conf_stdin ((struct interface_info *)0, ++ &top_level_config); ++ + if (status != ISC_R_SUCCESS) { + ; + #ifdef LATER +@@ -148,20 +153,17 @@ + return status; + } + +-int read_client_conf_file (const char *name, struct interface_info *ip, +- struct client_config *client) ++int read_client_conf_actual (int file, const char *name, ++ struct interface_info *ip, ++ struct client_config *client) + { +- int file; + struct parse *cfile; + const char *val; + int token; + isc_result_t status; + +- if ((file = open (name, O_RDONLY)) < 0) +- return uerr2isc (errno); +- + cfile = (struct parse *)0; +- new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); ++ new_parse (&cfile, file, (char *)0, 0, name , 0); + + do { + token = peek_token (&val, (unsigned *)0, cfile); +@@ -174,11 +174,36 @@ + status = (cfile -> warnings_occurred + ? ISC_R_BADPARSE + : ISC_R_SUCCESS); +- close (file); + end_parse (&cfile); + return status; + } + ++int read_client_conf_file (const char *name, struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file; ++ isc_result_t status; ++ ++ if ((file = open (name, O_RDONLY)) < 0) ++ return uerr2isc (errno); ++ ++ status = read_client_conf_actual(file, name, ip, client); ++ ++ return status; ++} ++ ++ ++int read_client_conf_stdin (struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file = fileno(stdin); ++ isc_result_t status; ++ ++ if (isatty(file)) return ISC_R_NOTFOUND; ++ status = read_client_conf_actual(file, "stdin", ip, client); ++ ++ return status; ++} + + /* lease-file :== client-lease-statements END_OF_FILE + client-lease-statements :== diff --git a/net-misc/dhcp/files/dhcp-3.0.3-tr.patch b/net-misc/dhcp/files/dhcp-3.0.3-tr.patch new file mode 100644 index 0000000..2a2957b --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-tr.patch @@ -0,0 +1,12 @@ +--- work.linux-2.2/common/tr.c 2005/08/14 11:34:24 1.1 ++++ work.linux-2.2/common/tr.c 2005/08/14 11:35:16 +@@ -40,6 +40,9 @@ static char copyright[] = + #include "includes/netinet/if_ether.h" + #include "netinet/if_tr.h" + #include ++#ifdef __linux__ ++#include ++#endif + + /* + * token ring device handling subroutines. These are required as token-ring diff --git a/net-misc/dhcp/files/dhcp-3.0.3-x-option.patch b/net-misc/dhcp/files/dhcp-3.0.3-x-option.patch new file mode 100644 index 0000000..5f5c1a8 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.3-x-option.patch @@ -0,0 +1,216 @@ +--- dhcp-3.0.2/common/parse.c.extended_option_environment 2005-04-05 17:49:36.513062562 -0400 ++++ dhcp-3.0.2/common/parse.c 2005-04-05 17:49:36.580052656 -0400 +@@ -1270,6 +1270,10 @@ + option_hash_add (option -> universe -> hash, + (const char *)option -> name, + 0, option, MDL); ++#ifdef EXTENDED_NEW_OPTION_INFO ++ if ( new_option_info_tree != 0L ) ++ add_new_option_info( option ); ++#endif + return 1; + } + +--- dhcp-3.0.2/common/tables.c.extended_option_environment 2004-09-01 13:06:35.000000000 -0400 ++++ dhcp-3.0.2/common/tables.c 2005-04-05 18:04:23.915838623 -0400 +@@ -1238,3 +1238,40 @@ + fqdn_universe.name, 0, + &fqdn_universe, MDL); + } ++ ++#ifdef EXTENDED_NEW_OPTION_INFO ++#include ++ ++void *new_option_info_tree = 0L; ++ ++static int new_option_info_comparator( const void* p1, const void *p2 ) ++{ ++ uint32_t ocode1 = (((const struct option*)p1)->universe->index << 8) ++ |(((const struct option*)p1)->code), ++ ocode2 = (((const struct option*)p2)->universe->index << 8) ++ |(((const struct option*)p2)->code); ++ return( (ocode1 == ocode2) ++ ? 0 ++ :( ( ocode1 > ocode2 ) ++ ? 1 ++ : -1 ++ ) ++ ); ++} ++ ++void *add_new_option_info( struct option *option ) ++{ ++ if ( option->universe->index >= fqdn_universe.index ) ++ return 0L; ++ if ( new_option_info_tree == GENERATE_NEW_OPTION_INFO ) ++ new_option_info_tree = (void*)0L; ++ return tsearch( option, &(new_option_info_tree), new_option_info_comparator ); ++} ++ ++void *lookup_new_option_info( struct option *option ) ++{ ++ if ( new_option_info_tree == GENERATE_NEW_OPTION_INFO ) ++ return 0L; ++ return tfind( option, &(new_option_info_tree), new_option_info_comparator ); ++} ++#endif +--- dhcp-3.0.2/includes/dhcpd.h.extended_option_environment 2004-11-24 12:39:16.000000000 -0500 ++++ dhcp-3.0.2/includes/dhcpd.h 2005-04-05 17:49:36.613047777 -0400 +@@ -1800,6 +1800,13 @@ + void initialize_common_option_spaces PROTO ((void)); + struct universe *config_universe; + ++#ifdef EXTENDED_NEW_OPTION_INFO ++#define GENERATE_NEW_OPTION_INFO ((void*)1) ++extern void *new_option_info_tree; ++extern void *add_new_option_info( struct option*); ++extern void *lookup_new_option_info( struct option *); ++#endif ++ + /* stables.c */ + #if defined (FAILOVER_PROTOCOL) + extern failover_option_t null_failover_option; +--- dhcp-3.0.2/client/dhclient.c.extended_option_environment 2005-04-05 17:49:36.566054726 -0400 ++++ dhcp-3.0.2/client/dhclient.c 2005-04-05 17:49:36.617047185 -0400 +@@ -74,7 +74,9 @@ + int onetry=0; + int quiet=0; + int nowait=0; +- ++#ifdef EXTENDED_NEW_OPTION_INFO ++int extended_option_environment = 0; ++#endif + static void usage PROTO ((void)); + + void do_release(struct client_state *); +@@ -204,6 +206,11 @@ + } else if (!strcmp (argv [i], "--version")) { + log_info ("isc-dhclient-%s", DHCP_VERSION); + exit (0); ++#ifdef EXTENDED_NEW_OPTION_INFO ++ } else if (!strcmp (argv [i], "-x")) { ++ extended_option_environment = 1; ++ new_option_info_tree = GENERATE_NEW_OPTION_INFO; ++#endif + } else if (argv [i][0] == '-') { + usage (); + } else { +@@ -572,7 +579,11 @@ + log_info (arr); + log_info (url); + ++#ifdef EXTENDED_NEW_OPTION_INFO ++ log_error ("Usage: dhclient [-1dqr] [-nwx] [-p ] %s", ++#else + log_error ("Usage: dhclient [-1dqr] [-nw] [-p ] %s", ++#endif + "[-s server]"); + log_error (" [-cf config-file] [-lf lease-file]%s", + "[-pf pid-file] [-e VAR=val]"); +@@ -2529,8 +2540,28 @@ + struct envadd_state { + struct client_state *client; + const char *prefix; ++ struct universe *universe; + }; + ++#ifdef EXTENDED_NEW_OPTION_INFO ++static ++void build_universe_info_envvar ++( struct option_cache *oc, ++ struct packet *p, struct lease *l, ++ struct client_state *client, ++ struct option_state *in_o, ++ struct option_state *cf_o, ++ struct binding_scope **scope, ++ struct universe *u, void *es ++) ++{ ++ char info_name[512], info_data[512]; ++ snprintf(info_name, 512, "%s._universe_.", oc->option->universe->name); ++ snprintf(info_data, 512, "%u:%s", oc->option->code,oc->option->format); ++ client_envadd( client, info_name, oc->option->name, info_data ); ++} ++#endif ++ + void client_option_envadd (struct option_cache *oc, + struct packet *packet, struct lease *lease, + struct client_state *client_state, +@@ -2547,6 +2578,31 @@ + in_options, cfg_options, scope, oc, MDL)) { + if (data.len) { + char name [256]; ++#ifdef EXTENDED_NEW_OPTION_INFO ++ if ( extended_option_environment ) ++ { ++ if( ( oc->option->universe != &dhcp_universe ) ++ &&( oc->option->universe->index > fqdn_universe.index ) ++ &&( es->universe != oc->option->universe ) ++ ) ++ { ++ es->universe = oc->option->universe; ++ (*(es->universe->foreach)) ++ ( (struct packet *)0, (struct lease *)0, ++ client_state, ++ in_options, cfg_options, ++ scope, es->universe, es, ++ build_universe_info_envvar ++ ); ++ }else ++ if ( lookup_new_option_info(oc->option) != 0L ) ++ build_universe_info_envvar ++ ( oc, packet, lease, client_state, ++ in_options, cfg_options, scope, ++ oc->option->universe, es ++ ); ++ } ++#endif + if (dhcp_option_ev_name (name, sizeof name, + oc -> option)) { + client_envadd (es -> client, es -> prefix, +@@ -2575,6 +2631,7 @@ + + es.client = client; + es.prefix = prefix; ++ es.universe = 0L; + + client_envadd (client, + prefix, "ip_address", "%s", piaddr (lease -> address)); +@@ -2788,7 +2845,14 @@ + s = option -> name; + if (j + 1 == buflen) + return 0; ++#ifdef EXTENDED_NEW_OPTION_INFO ++ if ( ! extended_option_environment ) ++ buf [j++] = '_'; ++ else ++ buf [j++] = '.'; ++#else + buf [j++] = '_'; ++#endif + } + ++i; + } while (i != 2); +--- dhcp-3.0.2/client/dhclient.8.extended_option_environment 2004-09-29 19:01:46.000000000 -0400 ++++ dhcp-3.0.2/client/dhclient.8 2005-04-05 17:49:36.619046889 -0400 +@@ -78,6 +78,9 @@ + .B -w + ] + [ ++.B -x ++] ++[ + .I if0 + [ + .I ...ifN +@@ -252,6 +255,10 @@ + supplying the + .B -nw + flag. ++.PP ++The -x argument enables eXtended option information to be created in the ++-s dhclient-script environment, which would allow applications running ++in that environment to handle options they do not know about in advance. + .SH CONFIGURATION + The syntax of the dhclient.conf(5) file is discussed separately. + .SH OMAPI diff --git a/net-misc/dhcp/files/dhcp-3.1.1-CVE-2009-0692.patch b/net-misc/dhcp/files/dhcp-3.1.1-CVE-2009-0692.patch new file mode 100644 index 0000000..b12a616 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.1.1-CVE-2009-0692.patch @@ -0,0 +1,14 @@ +--- dhcp-3.1.1.orig/client/dhclient.c ++++ dhcp-3.1.1/client/dhclient.c +@@ -2547,8 +2547,9 @@ void script_write_params (client, prefix + (struct option_state *)0, + lease -> options, + &global_scope, oc, MDL)) { +- if (data.len > 3) { +- struct iaddr netmask, subnet, broadcast; ++ struct iaddr netmask; ++ if (data.len > 3 && data.len <= sizeof(netmask.iabuf)) { ++ struct iaddr subnet, broadcast; + + memcpy (netmask.iabuf, data.data, data.len); + netmask.len = data.len; diff --git a/net-misc/dhcp/files/dhcp-3.1.2.ebuild.patch b/net-misc/dhcp/files/dhcp-3.1.2.ebuild.patch index 05e523a..76b7a87 100644 --- a/net-misc/dhcp/files/dhcp-3.1.2.ebuild.patch +++ b/net-misc/dhcp/files/dhcp-3.1.2.ebuild.patch @@ -1,14 +1,14 @@ --- /usr/portage/net-misc/dhcp/dhcp-3.1.1.ebuild 2009-04-05 12:37:41.000000000 +0200 -+++ dhcp-3.1.2.ebuild 2009-07-08 19:11:03.383208313 +0200 ++++ dhcp-3.1.3.ebuild 2009-07-08 19:11:03.383208313 +0200 @@ -1,24 +1,31 @@ --# Copyright 1999-2008 Gentoo Foundation -+# Copyright 1999-2009 Gentoo Foundation +-# Copyright 1999-2010 Gentoo Foundation ++# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.1.ebuild,v 1.9 2008/11/05 00:41:46 vapier Exp $ inherit eutils flag-o-matic multilib toolchain-funcs -+LDAP_PV="3.1.2-1.1" ++LDAP_PV="3.1.3-1" + MY_PV="${PV//_alpha/a}" MY_PV="${MY_PV//_beta/b}" diff --git a/net-misc/dhcp/files/dhcp-3.1.2_p1-CVE-2009-1892.patch b/net-misc/dhcp/files/dhcp-3.1.2_p1-CVE-2009-1892.patch new file mode 100644 index 0000000..ae1b92a --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.1.2_p1-CVE-2009-1892.patch @@ -0,0 +1,12 @@ +diff -uNr dhcp-3.1.2.ORIG/server/dhcp.c dhcp-3.1.2/server/dhcp.c +--- dhcp-3.1.2.ORIG/server/dhcp.c 2009-07-13 14:26:15.000000000 +0100 ++++ dhcp-3.1.2/server/dhcp.c 2009-07-13 14:26:33.000000000 +0100 +@@ -1747,6 +1747,8 @@ + host_reference (&host, h, MDL); + } + if (!host) { ++ if (hp) ++ host_dereference (&hp, MDL); + find_hosts_by_haddr (&hp, + packet -> raw -> htype, + packet -> raw -> chaddr, diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-stdin-conf.patch new file mode 100644 index 0000000..c5bfb15 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.0-dhclient-stdin-conf.patch @@ -0,0 +1,115 @@ +diff -ur a/client/clparse.c b/client/clparse.c +--- a/client/clparse.c 2008-09-03 21:39:30.000000000 +0100 ++++ b/client/clparse.c 2008-09-03 23:10:48.000000000 +0100 +@@ -172,6 +172,10 @@ + #endif + } + ++ /* Read any extra configuration from stdin */ ++ read_client_conf_stdin ((struct interface_info *)0, ++ &top_level_config); ++ + /* Set up state and config structures for clients that don't + have per-interface configuration statements. */ + config = (struct client_config *)0; +@@ -201,21 +205,13 @@ + return status; + } + +-int read_client_conf_file (const char *name, struct interface_info *ip, +- struct client_config *client) ++int read_client_conf_actual (struct parse *cfile, struct interface_info *ip, ++ struct client_config *client) + { +- int file; +- struct parse *cfile; + const char *val; + int token; + isc_result_t status; + +- if ((file = open (name, O_RDONLY)) < 0) +- return uerr2isc (errno); +- +- cfile = (struct parse *)0; +- new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); +- + do { + token = peek_token (&val, (unsigned *)0, cfile); + if (token == END_OF_FILE) +@@ -226,10 +222,74 @@ + status = (cfile -> warnings_occurred + ? ISC_R_BADPARSE + : ISC_R_SUCCESS); ++ return status; ++} ++ ++int read_client_conf_file (const char *name, struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file; ++ struct parse *cfile; ++ isc_result_t status; ++ ++ if ((file = open (name, O_RDONLY)) < 0) ++ return uerr2isc (errno); ++ ++ cfile = (struct parse *)0; ++ new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); ++ status = read_client_conf_actual(cfile, ip, client); + end_parse (&cfile); + return status; + } + ++int read_client_conf_stdin (struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file; ++ char *buffer = NULL, *p; ++ unsigned buflen, len = 0; ++ struct parse *cfile; ++ size_t bytes; ++ isc_result_t status; ++ ++ file = fileno(stdin); ++ if (isatty (file)) ++ return ISC_R_NOTFOUND; ++ if (fcntl (file, F_SETFL, O_NONBLOCK) < 0) ++ log_fatal ("could not set stdin to non blocking!"); ++ ++ buflen = BUFSIZ; ++ buffer = malloc (BUFSIZ + 1); ++ p = buffer; ++ do { ++ bytes = read (file, p, BUFSIZ); ++ if (bytes == 0) ++ break; ++ if (bytes == -1) ++ log_fatal ("failed to read stdin!"); ++ if (bytes >= BUFSIZ) { ++ buflen += BUFSIZ; ++ len += BUFSIZ; ++ buffer = realloc (buffer, buflen + 1); ++ if (!buffer) ++ log_fatal ("not enough buffer to read stdin!"); ++ p = buffer + len; ++ } else { ++ len += bytes; ++ break; ++ } ++ } while(1); ++ buffer[len] = '\0'; ++ ++ cfile = (struct parse *)0; ++ status = new_parse (&cfile, -1, buffer, len, "stdin", 0); ++ if (status == ISC_R_SUCCESS) { ++ status = read_client_conf_actual (cfile, ip, client); ++ end_parse (&cfile); ++ } ++ free(buffer); ++ return status; ++} + + /* lease-file :== client-lease-statements END_OF_FILE + client-lease-statements :== +Files a/client/clparse.o and b/client/clparse.o differ +Files a/client/dhclient and b/client/dhclient differ diff --git a/net-misc/dhcp/files/dhcp-4.1-dhclient-metric.patch b/net-misc/dhcp/files/dhcp-4.1-dhclient-metric.patch index 2f98af8..3556d97 100644 --- a/net-misc/dhcp/files/dhcp-4.1-dhclient-metric.patch +++ b/net-misc/dhcp/files/dhcp-4.1-dhclient-metric.patch @@ -1,6 +1,6 @@ -diff -uNr dhcp-4.1.0.orig/client/scripts/bsdos dhcp-4.1.0/client/scripts/bsdos ---- dhcp-4.1.0.orig/client/scripts/bsdos 2009-07-08 20:47:32.631747061 +0200 -+++ dhcp-4.1.0/client/scripts/bsdos 2009-07-08 20:48:21.198858540 +0200 +diff -uNr dhcp-4.1.0.ORIG/client/scripts/bsdos dhcp-4.1.0/client/scripts/bsdos +--- dhcp-4.1.0.ORIG/client/scripts/bsdos 2009-07-09 15:16:11.000000000 +0100 ++++ dhcp-4.1.0/client/scripts/bsdos 2009-07-09 15:17:41.000000000 +0100 @@ -102,6 +102,9 @@ if [ x$new_interface_mtu != x ]; then mtu_arg="mtu $new_interface_mtu" @@ -29,9 +29,9 @@ diff -uNr dhcp-4.1.0.orig/client/scripts/bsdos dhcp-4.1.0/client/scripts/bsdos sleep 1 if [ "$new_routers" != "" ]; then set $new_routers -diff -uNr dhcp-4.1.0.orig/client/scripts/freebsd dhcp-4.1.0/client/scripts/freebsd ---- dhcp-4.1.0.orig/client/scripts/freebsd 2009-07-08 20:47:32.631747061 +0200 -+++ dhcp-4.1.0/client/scripts/freebsd 2009-07-08 20:48:21.198858540 +0200 +diff -uNr dhcp-4.1.0.ORIG/client/scripts/freebsd dhcp-4.1.0/client/scripts/freebsd +--- dhcp-4.1.0.ORIG/client/scripts/freebsd 2009-07-09 15:16:11.000000000 +0100 ++++ dhcp-4.1.0/client/scripts/freebsd 2009-07-09 15:17:41.000000000 +0100 @@ -112,6 +112,9 @@ if [ x$new_interface_mtu != x ]; then mtu_arg="mtu $new_interface_mtu" @@ -60,9 +60,9 @@ diff -uNr dhcp-4.1.0.orig/client/scripts/freebsd dhcp-4.1.0/client/scripts/freeb $LOGGER "New IP Address ($interface): $new_ip_address" $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" -diff -uNr dhcp-4.1.0.orig/client/scripts/linux dhcp-4.1.0/client/scripts/linux ---- dhcp-4.1.0.orig/client/scripts/linux 2009-07-08 20:47:32.631747061 +0200 -+++ dhcp-4.1.0/client/scripts/linux 2009-07-08 20:48:53.235881547 +0200 +diff -uNr dhcp-4.1.0.ORIG/client/scripts/linux dhcp-4.1.0/client/scripts/linux +--- dhcp-4.1.0.ORIG/client/scripts/linux 2009-07-09 15:16:11.000000000 +0100 ++++ dhcp-4.1.0/client/scripts/linux 2009-07-09 15:20:50.000000000 +0100 @@ -104,11 +104,6 @@ fi fi @@ -113,43 +113,21 @@ diff -uNr dhcp-4.1.0.orig/client/scripts/linux dhcp-4.1.0/client/scripts/linux + route del -net $new_network_number $new_subnet_arg \ + dev $interface + route add -net $new_network_number $new_subnet_arg $metric_arg \ -+ dev $interface ++ dev $interface fi for router in $new_routers; do if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then - route add -host $router dev $interface +- route add -host $router dev $interface ++ route add -host $router $metric_arg dev $interface fi - route add default gw $router + route add default gw $router $metric_arg dev $interface done fi if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; -@@ -243,15 +235,18 @@ - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg - route add -host $alias_ip_address dev $interface:0 - fi -- if [ $relmajor -lt 2 ] || \ -- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then -- route add -net $new_network_number -+ # Add a network route to the computed network address. -+ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then -+ route del -net $new_network_number $new_subnet_arg \ -+ dev $interface -+ route add -net $new_network_number $new_subnet_arg $metric_arg \ -+ dev $interface - fi - for router in $new_routers; do - if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then - route add -host $router dev $interface - fi -- route add default gw $router -+ route add default gw $router $metric_arg dev $interface - done - make_resolv_conf - exit_with_hooks 0 -diff -uNr dhcp-4.1.0.orig/client/scripts/netbsd dhcp-4.1.0/client/scripts/netbsd ---- dhcp-4.1.0.orig/client/scripts/netbsd 2009-07-08 20:47:32.631747061 +0200 -+++ dhcp-4.1.0/client/scripts/netbsd 2009-07-08 20:48:21.201176019 +0200 +diff -uNr dhcp-4.1.0.ORIG/client/scripts/netbsd dhcp-4.1.0/client/scripts/netbsd +--- dhcp-4.1.0.ORIG/client/scripts/netbsd 2009-07-09 15:16:11.000000000 +0100 ++++ dhcp-4.1.0/client/scripts/netbsd 2009-07-09 15:17:41.000000000 +0100 @@ -102,6 +102,9 @@ if [ x$new_interface_mtu != x ]; then mtu_arg="mtu $new_interface_mtu" @@ -178,9 +156,9 @@ diff -uNr dhcp-4.1.0.orig/client/scripts/netbsd dhcp-4.1.0/client/scripts/netbsd sleep 1 if [ "$new_routers" != "" ]; then set $new_routers -diff -uNr dhcp-4.1.0.orig/client/scripts/solaris dhcp-4.1.0/client/scripts/solaris ---- dhcp-4.1.0.orig/client/scripts/solaris 2009-07-08 20:47:32.631747061 +0200 -+++ dhcp-4.1.0/client/scripts/solaris 2009-07-08 20:48:21.203487631 +0200 +diff -uNr dhcp-4.1.0.ORIG/client/scripts/solaris dhcp-4.1.0/client/scripts/solaris +--- dhcp-4.1.0.ORIG/client/scripts/solaris 2009-07-09 15:16:11.000000000 +0100 ++++ dhcp-4.1.0/client/scripts/solaris 2009-07-09 15:17:41.000000000 +0100 @@ -97,6 +97,9 @@ if [ x$new_interface_mtu != x ]; then mtu_arg="mtu $new_interface_mtu" diff --git a/net-misc/dhcp/files/dhcp-4.1-no_isc_blurb.patch b/net-misc/dhcp/files/dhcp-4.1-no_isc_blurb.patch index a7aeba1..1afdf21 100644 --- a/net-misc/dhcp/files/dhcp-4.1-no_isc_blurb.patch +++ b/net-misc/dhcp/files/dhcp-4.1-no_isc_blurb.patch @@ -1,6 +1,6 @@ -diff -uNr dhcp-4.1.0.orig/client/dhclient.c dhcp-4.1.0/client/dhclient.c ---- dhcp-4.1.0.orig/client/dhclient.c 2009-07-08 20:53:54.570853169 +0200 -+++ dhcp-4.1.0/client/dhclient.c 2009-07-08 20:55:59.448693983 +0200 +diff -uNr dhcp-4.1.0.ORIG/client/dhclient.c dhcp-4.1.0/client/dhclient.c +--- dhcp-4.1.0.ORIG/client/dhclient.c 2009-07-09 15:29:40.000000000 +0100 ++++ dhcp-4.1.0/client/dhclient.c 2009-07-09 15:30:19.000000000 +0100 @@ -87,6 +87,8 @@ static isc_result_t write_duid(struct data_string *duid); @@ -18,9 +18,9 @@ diff -uNr dhcp-4.1.0.orig/client/dhclient.c dhcp-4.1.0/client/dhclient.c quiet_interface_discovery = 1; } -diff -uNr dhcp-4.1.0.orig/omapip/errwarn.c dhcp-4.1.0/omapip/errwarn.c ---- dhcp-4.1.0.orig/omapip/errwarn.c 2009-07-08 20:53:54.573168693 +0200 -+++ dhcp-4.1.0/omapip/errwarn.c 2009-07-08 20:54:52.318516628 +0200 +diff -uNr dhcp-4.1.0.ORIG/omapip/errwarn.c dhcp-4.1.0/omapip/errwarn.c +--- dhcp-4.1.0.ORIG/omapip/errwarn.c 2009-07-09 15:29:40.000000000 +0100 ++++ dhcp-4.1.0/omapip/errwarn.c 2009-07-09 15:29:52.000000000 +0100 @@ -43,6 +43,8 @@ int log_perror = 1; #endif @@ -54,9 +54,9 @@ diff -uNr dhcp-4.1.0.orig/omapip/errwarn.c dhcp-4.1.0/omapip/errwarn.c if (log_cleanup) (*log_cleanup) (); exit (1); -diff -uNr dhcp-4.1.0.orig/relay/dhcrelay.c dhcp-4.1.0/relay/dhcrelay.c ---- dhcp-4.1.0.orig/relay/dhcrelay.c 2009-07-08 20:53:54.543072262 +0200 -+++ dhcp-4.1.0/relay/dhcrelay.c 2009-07-08 20:56:46.552266455 +0200 +diff -uNr dhcp-4.1.0.ORIG/relay/dhcrelay.c dhcp-4.1.0/relay/dhcrelay.c +--- dhcp-4.1.0.ORIG/relay/dhcrelay.c 2009-07-09 15:29:40.000000000 +0100 ++++ dhcp-4.1.0/relay/dhcrelay.c 2009-07-09 15:31:53.000000000 +0100 @@ -130,6 +130,7 @@ static char arr[] = "All rights reserved."; static char message[] = "Internet Systems Consortium DHCP Relay Agent"; @@ -73,9 +73,9 @@ diff -uNr dhcp-4.1.0.orig/relay/dhcrelay.c dhcp-4.1.0/relay/dhcrelay.c } else if (!strcmp(argv[i], "-p")) { if (++i == argc) usage(); -diff -uNr dhcp-4.1.0.orig/server/dhcpd.c dhcp-4.1.0/server/dhcpd.c ---- dhcp-4.1.0.orig/server/dhcpd.c 2009-07-08 20:53:54.518186738 +0200 -+++ dhcp-4.1.0/server/dhcpd.c 2009-07-08 20:54:52.323721178 +0200 +diff -uNr dhcp-4.1.0.ORIG/server/dhcpd.c dhcp-4.1.0/server/dhcpd.c +--- dhcp-4.1.0.ORIG/server/dhcpd.c 2009-07-09 15:29:40.000000000 +0100 ++++ dhcp-4.1.0/server/dhcpd.c 2009-07-09 15:29:52.000000000 +0100 @@ -62,6 +62,9 @@ struct iaddr server_identifier; int server_identifier_matched; diff --git a/net-misc/dhcp/files/dhcpd.init b/net-misc/dhcp/files/dhcpd.init index f4b9dd9..6c980fe 100644 --- a/net-misc/dhcp/files/dhcpd.init +++ b/net-misc/dhcp/files/dhcpd.init @@ -3,8 +3,6 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.5 2007/04/02 12:34:01 uberlord Exp $ -opts="configtest" - DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/dhcpd.conf} depend() { @@ -17,23 +15,6 @@ get_var() { "${DHCPD_CHROOT}/${DHCPD_CONF}" } -checkconfig() { - /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t 1>/dev/null 2>&1 - ret=$? - if [ $ret -ne 0 ]; then - eerror "${SVCNAME} has detected a syntax error in your configuration files:" - /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t - fi - - return $ret -} - -configtest() { - ebegin "Checking ${SVCNAME} configuration" - checkconfig - eend $? -} - start() { # Work out our cffile if it's on our DHCPD_OPTS case " ${DHCPD_OPTS} " in @@ -51,8 +32,6 @@ start() { return 1 fi - checkconfig || return 1 - local leasefile="$(get_var lease-file-name)" leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}" if [ ! -f "${leasefile}" ] ; then @@ -70,8 +49,6 @@ start() { local pidfile="$(get_var pid-file-name)" pidfile="${pidfile:-/var/run/dhcp/dhcpd.pid}" - touch "${DHCPD_CHROOT}/${pidfile}" - chown dhcp:dhcp "${DHCPD_CHROOT}/${pidfile}" ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" start-stop-daemon --start --exec /usr/sbin/dhcpd \ @@ -86,8 +63,6 @@ start() { stop() { local chroot="$(get_options chroot)" - - checkconfig || return 1 ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" start-stop-daemon --stop --exec /usr/sbin/dhcpd \ diff --git a/net-misc/dhcp/files/dhcpd.init2 b/net-misc/dhcp/files/dhcpd.init2 new file mode 100644 index 0000000..82cb26e --- /dev/null +++ b/net-misc/dhcp/files/dhcpd.init2 @@ -0,0 +1,94 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init2,v 1.1 2009/07/09 14:45:22 chainsaw Exp $ + +opts="configtest" + +DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/dhcpd.conf} + +depend() { + need net + use logger dns +} + +get_var() { + sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \ + "${DHCPD_CHROOT}/${DHCPD_CONF}" +} + +checkconfig() { + /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t 1>/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} has detected a syntax error in your configuration files:" + /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t + fi + + return $ret +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +start() { + # Work out our cffile if it's on our DHCPD_OPTS + case " ${DHCPD_OPTS} " in + *" -cf "*) + DHCPD_CONF=" ${DHCPD_OPTS} " + DHCPD_CONF="${DHCPD_CONF##* -cf }" + DHCPD_CONF="${DHCPD_CONF%% *}" + ;; + *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" + ;; + esac + + if [ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ] ; then + eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist" + return 1 + fi + + checkconfig || return 1 + + local leasefile="$(get_var lease-file-name)" + leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}" + if [ ! -f "${leasefile}" ] ; then + ebegin "Creating ${leasefile}" + touch "${leasefile}" + chown dhcp:dhcp "${leasefile}" + eend $? || return 1 + fi + + # Setup LD_PRELOAD so name resolution works in our chroot. + if [ -n "${DHCPD_CHROOT}" ] ; then + LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so" + export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so" + fi + + local pidfile="$(get_var pid-file-name)" + pidfile="${pidfile:-/var/run/dhcp/dhcpd.pid}" + + ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" + start-stop-daemon --start --exec /usr/sbin/dhcpd \ + --pidfile "${DHCPD_CHROOT}/${pidfile}" \ + -- ${DHCPD_OPTS} -q -pf "${pidfile}" \ + -user dhcp -group dhcp \ + ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE} + eend $? \ + && save_options chroot "${DHCPD_CHROOT}" \ + && save_options pidfile "${pidfile}" +} + +stop() { + local chroot="$(get_options chroot)" + + checkconfig || return 1 + + ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" + start-stop-daemon --stop --exec /usr/sbin/dhcpd \ + --pidfile "${chroot}/$(get_options pidfile)" + eend $? +}