This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via d52f669049883f3e85df5168f50ff59cd86d444c (commit) via a536149c333b1248cf7cef560d24ca78a9d5de54 (commit) via 537c24d7c0910024751e306fbc7571feff091865 (commit) via 7127c4b42914c317b34cbbf3bd5ef082a93440b6 (commit) via 9449c3387dee41cce3ed6345549e47d6a6def6dd (commit) via 7546c24cf28bad23cb3bf7154864d2524ea8bf69 (commit) via 4bed7c4c5355d461b42d710c58137a4d9fe535d6 (commit) via deb9eb04d9e75ad08e734e001183b5c0cd93d093 (commit) via 7c546fada778689e814444e0084520a994b42498 (commit) via b1c0e3a15c16b19340ab728ac95e372f822583d7 (commit) via b1eef4c58d256fa217bc460157c50da5582cf3ee (commit) via 26bf25a4393e0b0775383894a62dfc0ec339c4a4 (commit) via 8d3bc57a64b685b2ead3d3299aa11bc12001b2d0 (commit) via daf7e47eb02dd065c83b705d922e0bbbedd9c446 (commit) via c46fa5d0d277d751cfefdcfecaf3890339c37a1a (commit) via c74e2a40c74f58484f88410ae3b41f0feae3cf93 (commit) via 68e3d04a3d8b38ed7f12746a66379486d1013a12 (commit) via 2e2a3ff3f74099e00a6f81082399fc39179ec53f (commit) via bee18d4d916e61c47d3395750d4a235bc4b9a280 (commit) via 9417de6144764895df033b40a613cb75edef5f7d (commit) via 4c86491a726529aad723d94a04455551aa4b6046 (commit) via 68886c54dad5bba98544ddc98910121fe94a9038 (commit) via 826cf7145e84907ded568d7b8b4790060aa20417 (commit) via 246d1051d51a71fd6bc003c667946ecdf08cf9ae (commit) via 1b1d5f8044e92ee9c51101f5499f93e9db19f33b (commit) via daf53f4f50518cfe4a10a997203f5c778af8e8d4 (commit) via e66d24a53666c33d993a646cc7c9cb195b3ed19c (commit) via 550f57fc7f767384a2365c9ea6754da18405f281 (commit) via b3600699043712c1e9221f2cc93c0ef308fcb1fa (commit) via 74ab47c4ea63c348a229c0badad6d92375e8110e (commit) via 937ffaf02ce6a7d6f3413b3584597e095ae1f532 (commit) via b03db2a8a07e03e52563c3398a26df880c3e05ce (commit) via 7d9331ddbba2efe3e632b8375be19dd4a911a0cb (commit) via 4b95d0ad7547f27637c6901d4056514b10b114d6 (commit) via 58980d2d423b099c1e024d30ce46b68a0f30f408 (commit) via 26beee3016baec3f93e956a6b7e937d55ce5c513 (commit) via f5828a871624df1848c920133e946e3d189b58ab (commit) via 5a18c38b5388149dade9a485c1a01b335e80c1e6 (commit) via 9a3a0d99788183ebb4567309ebf351d81c0f141d (commit) via 17a930fef9f95c071fe5f3a4236d0a9f949f98f0 (commit) via b4ef7be1aadf5ce1d11372657b43916950df62d3 (commit) via 5e794730a65a05ea53852a8bd9e600f1bc65de4a (commit) via 25301904557dd021399b81ae6eb0444240c0b18d (commit) via b64993b46f5a1b23b2d905d3e532b2edaf33d601 (commit) via f12f88980a33c31ec247cd8e7154c924bf44de2b (commit) via c6e90457f96b027c8fd4cb3c67b8997ca37b365b (commit) via 6d8410ca5eacb12051fd8e5fef94bfb3b15c0bf4 (commit) via 97a12df209d031d40ebeec9bc0dc0ed151d2ff54 (commit) via 3f802328799c5f981733027551e3068e8d7c5edd (commit) via b40f5f6304a475565d4e21b7c4dece07a8ff185d (commit) via 113576bd6c637988d0252187581d110d071b2560 (commit) via 918fa1a1178fd7d06551d7ee92eb6331e3ad8338 (commit) via 6a5ffb32a0d8c3ce6a82204cc72d3dbde2b49fe7 (commit) via dc5ff2fd9116973259c1c8a1b27f30dc2c442759 (commit) via c9828a956dbb53744a4fb05a8bf7ffd05bf5c3c1 (commit) via dbd24715e9df86d8ed29ba6d0c15fd6b3574e95d (commit) via 7268d9f569a0cac1ab8f420a5f0f5211a48bdcf0 (commit) via 711aef188643e4377257b51c8e0afdabadb97c5a (commit) via cc3ca6b4fc5b7ac56d9d26709dbc7836f1a8bfc0 (commit) via 55d85e4ff8f0fbed369ad44a1e144d8ed1292080 (commit) via d9ad5e0539bf22fa38c140b0955f4c9f69ca61c9 (commit) via 4b41895bea1a036372f7ae670fdc7d944f35c226 (commit) via cb391ce96a57b25c4f32b283b2ee3a86cb805f6a (commit) via 4f0995159d2ad7dcf0d3c172957e0e584896a9db (commit) via f75b0e0ca212e69a6ab43f11165f8967ea6f6b58 (commit) via 0588771b18c5e162a45da9a86a0bb993fe71692b (commit) via 722f0f78adb9be093601e93c9cc7878f6a029fa7 (commit) via bcf28dbea91f9ca63f6a4cb65407fa09aae85ba6 (commit) via 729b4521d5d6add4f93d6bf27e949b75ddf1b77d (commit) via 3816270fb3d6c3a6843721be5a1b527af28ce1c4 (commit) via b4daec5aec2b240fff0a7242c9988052f0fa6756 (commit) via de74edc858afd17fd500427d1e39dde6b5af5fd3 (commit) via 1b7ab7abcd70523b827a9eaabe3e1986016cb533 (commit) via 189fb11a93dc4ccf8b7aa09b21928b5be6be5a6a (commit) via 3c1f81749aee440c671ab1a4307765ceb9a63b00 (commit) via 355c246d90b4ee0bc4fa56f0c8b6463264870b96 (commit) via acc4346ec8abf04953657303563e8146c9b99b1b (commit) via 5aa55f9fcf95a319f59006503c912ab0d5ed7459 (commit) via d1e907733c11c9bce5ea80c7b1d06ddebc1bbdc4 (commit) via 0123789cd6dbd7445b7332807ffe3f0587e01a5b (commit) via 6a28bc18f70fd29d6234898c8ee4314bffb5275d (commit) via 846c9302ac7a3a6fd43a3cb44a55e5cf4874b164 (commit) via cdb9873c23e579b218c4a1eff8f197c86d300c4c (commit) via b138e23b5efeb42dacf15ced2030cb92ae9a2b48 (commit) via 71bdc4f5674c7db09fa89743e3f3c18d9f581cd0 (commit) via 0f18997e1a5fe69f92b4d9b43ae94541ac7605c9 (commit) via 85e2de92cbc5be690d158f5beab470b3d2610daf (commit) via 164f85f87dfe1cbf545b3e3a34fd87c5eb44d512 (commit) via b321d973a2730411a74c4a9e30b39081632e8ba3 (commit) via 5adbc73db0359cbe2a4f152a1034fe30abc9db41 (commit) via 7032af614a63feee52ac5956120c0f127f94507b (commit) via 6e3d390c3b04c230dbd780fab236f0fc85e0532c (commit) via a3ea1159950a2d579a3311087e8367fa1347ffff (commit) via af22be293734bb5de0cd11fd51bef4c7b543d78c (commit) via 5ba6da93c989c7da97ff2a3e344bf44479f531cb (commit) via a8824d1a79a1a4e6598472c0c9744bce58bc0c7d (commit) via e04e061a6f3d12fe08e0bc6e3694a606bc991dfc (commit) via 23dbe6d7fc4e730c31a2a57d9f40a615f2b2b01d (commit) via 5146efdcea825fafd01a21cc11db90f417a16a55 (commit) via b66161e6d20f19601ef012da3933cc6df7ce5c61 (commit) via 516d702ac29b815e0ce4535a144c63dc35ef1598 (commit) via 1d8e38e585df7f81605563f93cf5bb9956802389 (commit) via f23b0b6ece3b77a7be9f3182b603d2ded3be808f (commit) via 3ebde8ed33031165674658424abd26f1c59d77a7 (commit) via 6580a72d90eecd8323fc845bc278f14f75ab75d5 (commit) via 9e0e8468b5da9cf8fe580193797b47146cb30cef (commit) via e2880daea1fbc0a4a564cd3be3fe0ebd8bd90fc7 (commit) via 9d1ca3338d7fdbe97d3567e7def7b27d16fa96fc (commit) via e0a62c28bd868bfaeec9a08f08e67b02b7ed0c0d (commit) via 646e91b62278fe3da495dc16d06d1ce967d37094 (commit) via 79a45a84badc330c358e37cdfd340e07841b1824 (commit) via 9c9be30036a6aec277ab00576c39f7f5e97d6c15 (commit) via 1d3c45f2e132a35a8b1bee249344e0e80c15ee6e (commit) via 694c3871e473e71dbf163a79cc888ae0b0b9eac6 (commit) via 57b7cb2da680033072e0f8df6d0c3300447a3674 (commit) via 5ff96f69a528a3d18d03a19fa0d2a52244ffe9e1 (commit) via baab6528badfa61b9e76ad157f40fd1a7d4201d8 (commit) via 8b416b19ddf3039e1441d1f3b05c30a9213c3fe8 (commit) via cfcc4059f0536b9628562fdb8dd65d729cdbf4dd (commit) via 6732b6ee221f262b8ae22b4e2f78301523d0a737 (commit) via 9e95f0cda618c7d72ce86a3f30baabcdb6afdf10 (commit) via 4680a048d1c6f88b0a0a3517f2d62dad538dc122 (commit) via d7ca0e564957d83423dc39f4d55170ddfa67d816 (commit) via f74ebd171c1218bbc64f9ac1b25d8d49e6f47e86 (commit) via 0ffba062c85d2298fd3351a764438f9bcd4b2a83 (commit) via 2f1b2615509f5437780be0ab59881a42ab775fdd (commit) via 46f3720157ba88cb041e0453905f26814fd10114 (commit) via 108913058eb86a1a8b75c084cd666cb4a3c87fd6 (commit) via a154f66fb9f3a2bf793aa4068a6bf1e6327f1202 (commit) via 0f8efc3eef80e64637c8ce59ff8a8523b381f98e (commit) via 7c9ba3709a762710b1a43b2724e969cf2a1ac4bd (commit) via c3ca606149ec2cb7b11c0391a68fa027f0bf2e1c (commit) via 7a218b809571ae00155da8646ad93212ad34c369 (commit) via 16f95a44e6711cae4db1e946dc039e94e4e43c58 (commit) via 983743c3f90734f28bece8248fd9bd6486a573c6 (commit) via e02a83b5271519dbdfc3cbf4bc4d820c559724ab (commit) via d34c652341480f13ed19ecc1d45f18063c4807c9 (commit) via d604bfdf2eb2a1f594446efb1962ab03f120a37d (commit) via 168a9e216f9ce3a31b361051a453c335a23511da (commit) via 83dd3963a8848547b295d4462819f1860946f7f5 (commit) via 328e28f877e425b607040a7849fa9ec255b5d09b (commit) via 35d2772fe16906dbf4e4600a013c9f731b3a6270 (commit) via aafe807f0a3b8979925f95a5c11aeaf96f8a6d5e (commit) via 43d3c003170ad5995a908ccee6e4cd5b4a5027f3 (commit) via f401a9eb0713bdea6095e83957f8d7b08b40d154 (commit) via 3cd0a63275e18e43bbfa53065673b8976aee270e (commit) via 0581045e250001e89eb0416427fbf63fd71c012d (commit) via 5dc54506450679b64bc647396017d5bfbc36f97d (commit) via 21eaf09e68ddcbdec3e4fccf3e97f3fb7f6c87fd (commit) via 2f51fa605d439ab2d98b0e3654cdbf76a3b09826 (commit) via 27452271bb4977506b0d522c667367ecc33d9ef3 (commit) via c114edc330101fa0ea55b3fd7d5d2ad7a9ad4c76 (commit) via 2abe7c7980ab0d42f1d0e51f3f2e57d19886a341 (commit) via 277a7792b2701f5efb0901120956989bdcf2f423 (commit) via 1e3fdc655fc757a0deae056603b3528d12f35440 (commit) via 32316eab23de07889e348986bac82234bcaa7ad8 (commit) via 2bf90089ed0cecbf0dd823e5105c9b915a2ad665 (commit) via e59aa94a32dc9c211001734855d5bf874408f089 (commit) via 42e91640a2cdc229caf23aa887f28d5c6ffdd8dd (commit) via 117b3b0c78b92b3677502fded684cf6a4f265a49 (commit) via 157d8b2cfacf3e5d28c87bcaed164fb52d2e784d (commit) via fcd202ada18b24d4c3bdef73b80bb15fe84881e2 (commit) via 75b8f4c2113e94d392e65973968c2743886cfe1d (commit) via cf84d7435d91eb4b8d6280e8a6ea326950bbd433 (commit) via c3e1df2f0605ab24f722872f1975c97cef1ff131 (commit) via a5ecb5522474a0f2acb0fbc512c21c3b4699e894 (commit) via 1dc82e58e9eafdc4a823287f625dd7d1d7747d79 (commit) via a60298228fd6144c8d662543d4ce7764eb844deb (commit) via e1fb924289a73c8b8142b1e039edebaed38f78d7 (commit) via c247208b15c9acd90a90ba4541ee5830ac3badcb (commit) via 1f66e0429326e427b66d285e57ea878349ce7d5f (commit) via 36b9b292a2ca63c18405a1ba08f2bc227615b3d9 (commit) via c8f77b0fbf39aebfad1f2d5ad58ec87834472b29 (commit) via f21fb2531c5fea58eba4d51e348c9360da2842fe (commit) via 7fef22b2c854925bcea6989a2918fbcdbd637a8a (commit) via 1d7177fa158cfe6c5d3f5f3fcb9c101ccf774a7e (commit) via 5a4f5aa7eb9d2aa06171154a0aac61d0093c03f6 (commit) via d7a0243ba0d820df8b6508f571d96dd2c333feb7 (commit) via e55af06cf6284ad952c1e1f4c394b320cee32f16 (commit) via b38097bbe1e8bf8cc18bca540c7e09efb9983060 (commit) via 02bfec67580b44cea2de8e25c30771053fec4851 (commit) via 762816dd7e4f0461932ab827c820ff79104b0eef (commit) via 15076d465e3a37669ae056b117943e050be9e961 (commit) via eec964292954f7e377d4ebd657c8fa167b31b45a (commit) via d5bf3907fe6b99710bbf8e462dbd70e10cc14cfe (commit) via 2b87326c90b57f64fecfb431223f8f09117ed122 (commit) via 7b9cd37b6a181d33606493b13872ec2b14e69856 (commit) via e07f41ea3c419524f5de14975423ee45d7565aa2 (commit) via 128a348fc4355c69e6d8e17241dc79fdb3a481d9 (commit) via 67a1b310a2c0d30040bd1bac120467a06fca3bc0 (commit) via f0991ac6ae4600709f3c658491899ac700666b9e (commit) via ee2d432ccfff47e84ae2f102c74730b66aaa6e20 (commit) via ef8cacc6fcc98a55566da20ed4a40fdb3a87ba01 (commit) via dff2be6b9e20a7a2b291f7bdff5c6583e55c2d95 (commit) via 8a5f60cd7f1e2daed2ed12093a641dd3ca4bab44 (commit) via f2a117d583ca584b34b20ae1e2a3cf508ee40ba4 (commit) via 06350a2cf22019d9e034d1336c823e122ca77e9c (commit) via d0130a99deabca0c23483c55aab8fbd9c4549601 (commit) via b2069ca6daba9508d1582af3e056bb8286aa0a0e (commit) via 838a7a0bb7b81120e81fbb2895ae610d19817bd3 (commit) via c60c0896ad0504e199ccea7de16a595fb82d5734 (commit) via e2ed5a81ad8fa93dc18758728fbc6b2d9807f2bf (commit) via 8ac7d5bf99066f8a9082434fa626a124b7ed046f (commit) via 6866c8c71f6c8e51e7464be88ba5c5fc44c73c32 (commit) via d323422f132d907ef4c6e2a34a148dd4e7ef495f (commit) via 3bc6fc50b37bb96b4ada52dbf66b6910593d1942 (commit) via 97ec13622267b5bd69dccbf552e85ffa239aa144 (commit) via 35f2a0e9d30fc5749eaba07e2f5c91a7bde02f12 (commit) via 735a4ecffbb532607098306dfddcadbf9778a5a7 (commit) via 2b4392b21e95ca742ec33914facea6c1095d3de9 (commit) via 53b8556e33bf0b1f4f35ad42f2b2429d1fb0b3f0 (commit) via b9b9e3ea64399f3381fc88fd2e3be284c4e07388 (commit) via 621a7baeb8b75a5e15827cc7fbfcaa1b9646ceb5 (commit) via 6343726cbfed94d019332b8f69b41d340a4e16dd (commit) via 67ea67dfd459941bd4b45216eafa89f6ba57cb5c (commit) via 5a876fbcd32bf908f144efaceefd8d193f90dfcd (commit) via b0028340521d6d714646de2e197f0579260b7488 (commit) via cde88b69de9a73faca034a278a4b679b5972e461 (commit) via 7b24475ec34d0cd4193304f42b13324dfa72e5c3 (commit) via 7eecf17819dd4c8da2d959581124a7337c4724c7 (commit) via faf15a47ef0f65bbd48a4a2199e91334941eb4a4 (commit) via 69c1506df2d4627c08200e89b416710aa40f4fe7 (commit) via 7ff7d271d603b97d5e170a3ce18cc6270478a4c5 (commit) via f718dadc99fa3fc4cdece1e72f814e63aa6fe21e (commit) via 5131a1f758289660083f0d319429f52a04616006 (commit) via ca02cde1c0b800863e206503490bce656652812b (commit) via e44cac695504d7260384e1f3ffd66253ec4f6e3c (commit) via 8ca5cc73567ec86a6d367eb8e3601e9326c9fb5a (commit) via eb75cd5626975b6e42b20da9faa9244d9fe0e16b (commit) via d9f95236951a75778f16b5b0fd055c71744ac298 (commit) via d74dbf9aa4181d76cd4a76a96b5a8c46b671ff31 (commit) via ef678eaf56d22f8d835472a4811f93dec2ccea92 (commit) via 1bd580c86b8697dd02a6bae293728fcd37ac344c (commit) via 35a246bed8846e6884d59760b6e63317e02786e9 (commit) via 97fc529e53eae28f44701ed5222816b5e0afafe3 (commit) via 50ad44710002127de84d5ead1f8d9d7ea3eefd34 (commit) via 8a6b572fe2348fb3c901cab7445bf84820b16ce4 (commit) via 6a9b18d1d186f6648d35eaa5c979c5fb880f1329 (commit) via 4d40215ba5f6856ac358700d838e7bab8912615e (commit) via a4f5362aedccd539b214c5d97344a41c6e315fc6 (commit) via c655101a3ead3d721762edaccb4eb26292dc37ff (commit) via 9201765520fc0cab79f069223e098487ce6e40ff (commit) via 388295789196ee45d4db96b1fd0dbfd463d1217f (commit) via e698b32134d7ff94fcdb1ee1524c0ecf5373ebf8 (commit) via be86bab5a1b66f007c324279a36a0e5f58b686fa (commit) via a6b7af6fb19a2c8789abcac6ff799bcad38cb7ba (commit) via 4a3264ace318c87405d49cb3cc250da47d6c7e82 (commit) via 3c80045805086c0c86db22d397675b3114c47df4 (commit) via 9b2b0b927542aab29486a03fe30b30dd626c626d (commit) via f8647db29f62b5dab7be6d9628d1db92508a4f75 (commit) via 473efb69fa2a612cd48f3152b453007bff5935c4 (commit) via ba55c5c9830c4fb4a28f6d7582276653e0d37d52 (commit) via 605cd393e83954fc23989eaddcb50f2ddb9d2a7b (commit) via d2667524a7466c4645970e30343ad407db01fbbc (commit) via cd2a91fb65629260ec66e0700058e7386ee4d834 (commit) via b5d465cf10730b961f7f8aa3b769b2fde09861ae (commit) via f1a50e4e3d7fef88700a7b2f515d80ef3a71d0a3 (commit) via 1638c2ce621ab9a10d5f7b5340ebf8e511a7dac0 (commit) via 8c893619395b367f4a7fb64a1822d13b780b9c81 (commit) via 5c526f2f2741888cf9e555e7a2ec8dd91e37723e (commit) via 63a1a7b9135f56f1647ec1f415b4c13f81cdbac8 (commit) via 26f43b15c407ed0982b57e4b587bf4a3fc1f32af (commit) via 27ce337b7980b61b78d95a7d60371690c3e1f77d (commit) via dc4059c268b2993e99dadbc1757a2c210b7e06b0 (commit) via a5cfc571f6bc33555709e57907f40ef11ab98b86 (commit) via 0b55b624736245c28413ed8bb2ce183a4f7af419 (commit) via 3fa34c996f1fc68d46bb689310b953e71ea74043 (commit) via b06fbae10ed1c745a02c83ca54248aef9b70cffc (commit) via 7108af4bb097007840d06cb4ebb9df22099495f5 (commit) via 6210e76498415807c226a66f88a9796659b4dc9b (commit) via 4d9ce265c58151a39f419ec7ce6b690160ea23c1 (commit) via fadea6a3cff608bba0f018311335aa2383b8c31c (commit) via 920bbeb692f1d1670a2ac3fff8f6006ff644db8f (commit) via 4e901774fab5c9d6d6c054276c66d61855080096 (commit) via fff31d5912b2d807ea3b8347bb73721bc802c2f7 (commit) via 8b1f15821cb0ed0f64ea3664ebcb80fd5b2e7902 (commit) via 452efbe7b56636b4a81b42d36c557d4d8201b020 (commit) via 81d3fa51ce38e28756a50a454d1e7de71176d4cc (commit) via 25d7447760b543ae7305c02e701a72ef0df652f7 (commit) via 4793126c1f82b008a01220897d096c3fc22d6545 (commit) via d60d94e33f18227f5a4f0b5073d6c426d5ae8f7e (commit) via 52d652a9fdb546a6651855dc5a1a9b81a0aa0f57 (commit) via fbff7f530e7e52d31075fe06bce1707555c41c42 (commit) via 5b955778ce5958b5c3709352fee91f57cc3399d0 (commit) via 8e7d7595d9c944a9804ca1fbb0a6119e35a7a680 (commit) via 7093f90df165e3956111d202b967f35322c18cbf (commit) via d6eb00f6cd5af5cb089b392121ec024827640855 (commit) via f5f7ab22601c8045ed79a3e1b70147482fe8fa1e (commit) via 036fcb127d3491c221b0efe1d1e8b24bdcb8ca59 (commit) via 7fa44e6ff4769cf9b3eb14f849277909252c6d38 (commit) via c2c8f52f96ba09d490464059533a67a49a19b993 (commit) via 9caf420ce3c03f7cd6f9294c6ff82a7975b8cb0d (commit) via afe5f5bb7b16178e9a676e0e4ac31ec96072de6d (commit) via 614bd5c949098b2fa11a1d6d6eddbb46fd72eb31 (commit) via 50774484e6f5db40e1d3859df8fcc8344b693813 (commit) via ce294b2bddad19e546a727232ac92901e3b46d48 (commit) via 521fefd9f899b8147953500b61e28bd41e5155ae (commit) via ff8b166d3bd94b499ddecfe94930ca993e2f8b2b (commit) via f644ed4b0e8d7044f655fe2002d0e6cdeadead2d (commit) via e4ce96603d723dcb3013f50ba3ce8f89be2ed179 (commit) via 64dc7375d8067771ae11067c05ad4a2bf85999fb (commit) via ef0e6205746e04e3248890a54f1cc1e665c78088 (commit) via 9cb67d4eef5fbc546f0fcc53791e737a2b63e402 (commit) via bdd882428aee61983a81e2cd3e9e315827baa3b9 (commit) via 40ba55977d00f7a98d984837dc4c562232a01a58 (commit) via 1c4b4911a97833393070f473f826b4085fbb6f0c (commit) via 7997b1d2ea1521522a01ffb182f21a47bbe1a53b (commit) via bf2de166c4b5a5be196a27ccf9e81fa6a28c2a45 (commit) via 484c71a5570367d5681055084cc7459f2917607e (commit) via 248311764ed765490d65846941e165e64f3ea37b (commit) via 6ecc8c006c135278eeb197dd05764be477a6a88c (commit) via d077d8aeb1d9383558c529e4038a1414a1414273 (commit) via bf56c13e3f851bf85529194fe9f45ecee57c44c6 (commit) via 9d9eb0163360d5e48009c78cff75f458b2485564 (commit) via d5f0ac1d0b15814dccd7bba3e42c81bf7a511ecb (commit) via 8a6b9d78973c4de84d99444b80a988f6970d6645 (commit) via 5e5c27e706e5ac47ccc22d003137a1f23ed7be4d (commit) via 13a85ae6c5b78f3841222c9626496d5dba2374d2 (commit) via 77dc89c0eda7b8b5ecac263ec52c6ec05e7bde8b (commit) via 087df360b8e67659f70ae76408f09a502f8f9664 (commit) via 7c1fc7a0d7a7f26dea8a6d096417e77edd1a72ea (commit) via 819979f7f5583668758f8aa09e42ce8811e48b82 (commit) via 6d8de23327f4411acbebaae6ef5510253bf8813e (commit) via 4dc576b144ba76269cf7d866331662c401f6f1b3 (commit) via c9e159fcd1d55f112eb88154ea6b1d37ec7ae3e5 (commit) via cb585b93a7fd91a704428bd70706d3a6f1c92fd5 (commit) via 272fe5894a1a8e125e01def310f32f6b49443fae (commit) via 7048c46b0eb2dc3b7b986873ad930d8b85432749 (commit) via bf8a210045d72b51fcff3129c8dc4ddfecd6e181 (commit) via 125b45099e8f8128a828ada9e35cbe628070c712 (commit) via a706d7c51866e93dbfde8992e05d9f3ccd84bca6 (commit) via 4a3c06ff85d69fd13c0b57b58bfd43f03d1d9cb7 (commit) via d00d3e9c307c0e331a5ed63ddd701ef860cbe810 (commit) via 8c4ed05406b8393a091485690b4d3cd2fafba387 (commit) via 4266166c454e4cfa80013a80ef7087adc70dc3c7 (commit) via 60266a4b90b40c2b0e6bcc7be34475cf0e847732 (commit) via 672832d8ad769ed9491d50d416f281ecd99f929a (commit) via 77a8aa155ff354118525e7d95d4d57d678682b82 (commit) via 1c6769b2258804892860bdf67a9c4a201ffb08fa (commit) via 4480cbd3209927793d40375757ac94a4714ca9ff (commit) via 207773a6ef03f44a64a748409f2d00d6d9e42fb8 (commit) via 32e46be1db0f6a54fa39301444eb890bf6539b4b (commit) via 7e5e9c907312ad5c88834908bb58bc101ad0d570 (commit) via f74b93fc888d1d167bc969fc4542c05b3b69de33 (commit) from 095d55fa78525fef77d2ba942b25c6c05f0cbe54 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit d52f669049883f3e85df5168f50ff59cd86d444c Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Sep 13 00:15:26 2010 +0200
qt: Update package to be built with the new version of the buildsystem.
commit a536149c333b1248cf7cef560d24ca78a9d5de54 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Sep 13 00:15:07 2010 +0200
gnupg2: Update package to be built with the new version of the buildsystem.
commit 537c24d7c0910024751e306fbc7571feff091865 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Sep 13 00:14:44 2010 +0200
libgpg-error: Update package to be built with the new version of the buildsystem.
commit 7127c4b42914c317b34cbbf3bd5ef082a93440b6 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Sep 13 00:14:32 2010 +0200
libassuan: Update package to be built with the new version of the buildsystem.
commit 9449c3387dee41cce3ed6345549e47d6a6def6dd Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Sep 13 00:00:56 2010 +0200
libgcrypt: Fix build with LTO.
commit 7546c24cf28bad23cb3bf7154864d2524ea8bf69 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 23:53:25 2010 +0200
naoki: Introduce PKG_PROVIDES.
A new variable PKG_PROVIDES which lets the maintainer decide what additional things a package should provide. Use with caution.
commit 4bed7c4c5355d461b42d710c58137a4d9fe535d6 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 23:39:27 2010 +0200
vsftpd: Fix build with LTO.
commit deb9eb04d9e75ad08e734e001183b5c0cd93d093 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 23:30:11 2010 +0200
naoki: Sort output of package lists.
commit 7c546fada778689e814444e0084520a994b42498 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 23:25:13 2010 +0200
pkg-config: Update package to be built with the new version of the buildsystem.
commit b1c0e3a15c16b19340ab728ac95e372f822583d7 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 23:18:13 2010 +0200
sip: Update package to be built with the new version of the buildsystem.
commit b1eef4c58d256fa217bc460157c50da5582cf3ee Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 23:15:03 2010 +0200
naoki: Add source download option.
commit 26bf25a4393e0b0775383894a62dfc0ec339c4a4 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 22:15:46 2010 +0200
glibc: Fix build dependencies.
There are way more than kernel-headers.
commit 8d3bc57a64b685b2ead3d3299aa11bc12001b2d0 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 22:15:15 2010 +0200
curl: Fix build with LTO.
commit daf7e47eb02dd065c83b705d922e0bbbedd9c446 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 19:30:57 2010 +0200
expect: Fix dependencies: tcl is required for build.
commit c46fa5d0d277d751cfefdcfecaf3890339c37a1a Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:55:30 2010 +0200
Revert "expect: Update to 5.44.1.15."
This reverts commit 6a4f7924abfb9d9b48f01e8b202abad56ddd597c.
commit c74e2a40c74f58484f88410ae3b41f0feae3cf93 Merge: 68e3d04 1b1d5f8 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:37:38 2010 +0200
Merge remote branch 'stevee/ms-no-toolchain' into no-toolchain
commit 68e3d04a3d8b38ed7f12746a66379486d1013a12 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:35:22 2010 +0200
pakfire: Remove non-existant dependency.
commit 2e2a3ff3f74099e00a6f81082399fc39179ec53f Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:35:13 2010 +0200
libvirt: Update package to be built with the new version of the buildsystem.
commit bee18d4d916e61c47d3395750d4a235bc4b9a280 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:34:50 2010 +0200
network: Fix runtime dependency: brctl -> bridge-utils.
commit 9417de6144764895df033b40a613cb75edef5f7d Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:34:28 2010 +0200
sane: Remove duplicate creation of the development package.
commit 4c86491a726529aad723d94a04455551aa4b6046 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:33:34 2010 +0200
hplip: Update package to be built with the new version of the buildsystem.
commit 68886c54dad5bba98544ddc98910121fe94a9038 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:33:09 2010 +0200
kernel: Create initrd in the build system.
commit 826cf7145e84907ded568d7b8b4790060aa20417 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:32:12 2010 +0200
dracut: Fix runtime dependencies.
commit 246d1051d51a71fd6bc003c667946ecdf08cf9ae Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 12 18:31:29 2010 +0200
naoki: A bigger refactoring to get things clean.
This references #53.
commit 1b1d5f8044e92ee9c51101f5499f93e9db19f33b Author: Schantl Stefan Stevee@ipfire.org Date: Sun Sep 12 00:05:06 2010 +0200
xorg-x11-server: Add more dependencies.
commit daf53f4f50518cfe4a10a997203f5c778af8e8d4 Author: Schantl Stefan Stevee@ipfire.org Date: Sun Sep 12 00:04:40 2010 +0200
xkeyboard-config: Update package to be built with the new version of the buildsystem.
commit e66d24a53666c33d993a646cc7c9cb195b3ed19c Author: Schantl Stefan Stevee@ipfire.org Date: Sun Sep 12 00:04:11 2010 +0200
xorg-x11-xkb-utils: Update package to be built with the new version of the buildsystem.
commit 550f57fc7f767384a2365c9ea6754da18405f281 Author: Schantl Stefan Stevee@ipfire.org Date: Sun Sep 12 00:03:42 2010 +0200
xorg-x11-drv-vmware: Update package to be built with the new version of the buildsystem.
commit b3600699043712c1e9221f2cc93c0ef308fcb1fa Author: Schantl Stefan Stevee@ipfire.org Date: Sun Sep 12 00:03:26 2010 +0200
xorg-x11-drv-vesa: Update package to be built with the new version of the buildsystem.
commit 74ab47c4ea63c348a229c0badad6d92375e8110e Author: Schantl Stefan Stevee@ipfire.org Date: Sun Sep 12 00:03:07 2010 +0200
xorg-x11-drv-mouse: Update package to be built with the new version of the buildsystem.
commit 937ffaf02ce6a7d6f3413b3584597e095ae1f532 Author: Schantl Stefan Stevee@ipfire.org Date: Sun Sep 12 00:02:51 2010 +0200
xorg-x11-drv-keyboard: Update package to be built with the new version of the buildsystem.
commit b03db2a8a07e03e52563c3398a26df880c3e05ce Author: Schantl Stefan Stevee@ipfire.org Date: Sun Sep 12 00:02:26 2010 +0200
xorg-x11-drv-evdev: Update package to be built with the new version of the buildsystem.
commit 7d9331ddbba2efe3e632b8375be19dd4a911a0cb Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 23:33:40 2010 +0200
xorg-x11-drv-ati: Update package to be built with the new version of the buildsystem.
commit 4b95d0ad7547f27637c6901d4056514b10b114d6 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 23:29:57 2010 +0200
xorg-x11-server: Fix double build of the development package.
commit 58980d2d423b099c1e024d30ce46b68a0f30f408 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 23:20:23 2010 +0200
QA: Fix BIND_NOW workaround for latest naoki changes.
commit 26beee3016baec3f93e956a6b7e937d55ce5c513 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 23:19:37 2010 +0200
xrandr: Update package to be built with the new version of the buildsystem.
commit f5828a871624df1848c920133e946e3d189b58ab Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 23:19:21 2010 +0200
xorg-x11-server:Update package to be built with the new version of the buildsystem.
commit 5a18c38b5388149dade9a485c1a01b335e80c1e6 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 23:18:52 2010 +0200
xorg-x11-font-utils: Update package to be built with the new version of the buildsystem.
commit 9a3a0d99788183ebb4567309ebf351d81c0f141d Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 23:17:38 2010 +0200
libXres: Update package to be built with the new version of the buildsystem.
commit 17a930fef9f95c071fe5f3a4236d0a9f949f98f0 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 23:17:12 2010 +0200
libXrandr: Update package to be built with the new version of the buildsystem.
commit b4ef7be1aadf5ce1d11372657b43916950df62d3 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 23:16:12 2010 +0200
libXrender: Update package to be built with the new version of the buildsystem.
commit 5e794730a65a05ea53852a8bd9e600f1bc65de4a Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:48:46 2010 +0200
libXmu: Update package to be built with the new version of the buildsystem.
commit 25301904557dd021399b81ae6eb0444240c0b18d Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:48:30 2010 +0200
libXdmcp: Update package to be built with the new version of the buildsystem.
commit b64993b46f5a1b23b2d905d3e532b2edaf33d601 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:47:58 2010 +0200
libXt: Update package to be built with the new version of the buildsystem.
commit f12f88980a33c31ec247cd8e7154c924bf44de2b Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:47:45 2010 +0200
libSM: Update package to be built with the new version of the buildsystem.
commit c6e90457f96b027c8fd4cb3c67b8997ca37b365b Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:47:15 2010 +0200
libICE: Update package to be built with the new version of the buildsystem.
commit 6d8410ca5eacb12051fd8e5fef94bfb3b15c0bf4 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:22:19 2010 +0200
mesa: Update package to be built with the new version of the buildsystem.
commit 97a12df209d031d40ebeec9bc0dc0ed151d2ff54 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:16:07 2010 +0200
libXxf86vm: Update package to be built with the new version of the buildsystem.
commit 3f802328799c5f981733027551e3068e8d7c5edd Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:13:47 2010 +0200
libXdamage: Update package to be built with the new version of the buildsystem.
commit b40f5f6304a475565d4e21b7c4dece07a8ff185d Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:12:43 2010 +0200
libXfixes: Update package to be built with the new version of the buildsystem.
commit 113576bd6c637988d0252187581d110d071b2560 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 21:10:01 2010 +0200
libXext: Update package to be built with the new version of the buildsystem.
commit 918fa1a1178fd7d06551d7ee92eb6331e3ad8338 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 20:39:33 2010 +0200
libdrm: Update package to be built with the new version of the buildsystem.
commit 6a5ffb32a0d8c3ce6a82204cc72d3dbde2b49fe7 Merge: dc5ff2f 722f0f7 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 20:09:17 2010 +0200
Merge branch 'x-fixes' into ms-no-toolchain
Conflicts: tools/quality-agent.d/050-relro
commit dc5ff2fd9116973259c1c8a1b27f30dc2c442759 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 20:03:46 2010 +0200
libXau: Also build a development package.
commit c9828a956dbb53744a4fb05a8bf7ffd05bf5c3c1 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 20:03:04 2010 +0200
libXfont: Update package to be built with the new version of the buildsystem.
commit dbd24715e9df86d8ed29ba6d0c15fd6b3574e95d Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 19:56:47 2010 +0200
libfontenc: Update package to be built with the new version of the buildsystem.
commit 7268d9f569a0cac1ab8f420a5f0f5211a48bdcf0 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 19:53:06 2010 +0200
libxkbfile: Update package to be built with the new version of the buildsystem.
commit 711aef188643e4377257b51c8e0afdabadb97c5a Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 19:47:53 2010 +0200
libX11: Update package to be built with the new version of the buildsystem.
commit cc3ca6b4fc5b7ac56d9d26709dbc7836f1a8bfc0 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 19:27:50 2010 +0200
libxcb: Resort dependencies, remove unneeded PKG_DEPS.
commit 55d85e4ff8f0fbed369ad44a1e144d8ed1292080 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 19:18:49 2010 +0200
libxcb: Update package to be built with the new version of the buildsystem.
commit d9ad5e0539bf22fa38c140b0955f4c9f69ca61c9 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 19:12:32 2010 +0200
xcb-proto: Add missing BUILD_DEP to python.
commit 4b41895bea1a036372f7ae670fdc7d944f35c226 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 19:04:17 2010 +0200
xcb-proto: Update package to be built with the new version of the buildsystem.
commit cb391ce96a57b25c4f32b283b2ee3a86cb805f6a Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 19:03:49 2010 +0200
libXau: Update package to be built with the new version of the buildsystem.
commit 4f0995159d2ad7dcf0d3c172957e0e584896a9db Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 15:27:11 2010 +0200
libxslt: Update package to be built with the new version of the buildsystem.
commit f75b0e0ca212e69a6ab43f11165f8967ea6f6b58 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 13:37:04 2010 +0200
libassuan: Fix after merging.
commit 0588771b18c5e162a45da9a86a0bb993fe71692b Merge: d1e9077 0123789 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 11 12:45:02 2010 +0200
Merge branch 'no-toolchain' of ssh://git.ipfire.org/pub/git/people/ms/ipfire-3.x into ms-no-toolchain
commit 722f0f78adb9be093601e93c9cc7878f6a029fa7 Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 21:38:46 2010 +0200
xorg-x11-drv-vmware: New package.
commit bcf28dbea91f9ca63f6a4cb65407fa09aae85ba6 Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 21:37:25 2010 +0200
Add exception to several X modules to pass QA with disabled BIND_NOW.
commit 729b4521d5d6add4f93d6bf27e949b75ddf1b77d Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 20:31:05 2010 +0200
QA: Add workaround for relo and disabled BIND_NOW at x packages.
commit 3816270fb3d6c3a6843721be5a1b527af28ce1c4 Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 19:25:18 2010 +0200
xorg-x11-server: Remove unneeded export LDFLAGS.
commit b4daec5aec2b240fff0a7242c9988052f0fa6756 Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 18:57:25 2010 +0200
xorg-x11-server: Remove unneeded xorg.conf.
commit de74edc858afd17fd500427d1e39dde6b5af5fd3 Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 18:55:14 2010 +0200
xorg-x11-drv-ati: New package.
commit 1b7ab7abcd70523b827a9eaabe3e1986016cb533 Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 18:54:39 2010 +0200
xorg-x11-drv-vesa: Remove BIND_NOW to autoload modules at X statup.
Fixes #49. Fixes #63.
commit 189fb11a93dc4ccf8b7aa09b21928b5be6be5a6a Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 18:54:02 2010 +0200
xorg-x11-drv-mouse: Remove BIND_NOW to autoload modules at X statup.
Fixes #49. Fixes #63.
commit 3c1f81749aee440c671ab1a4307765ceb9a63b00 Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 18:53:32 2010 +0200
xorg-x11-drv-keyboard: Remove BIND_NOW to autoload modules at X statup.
Fixes #49. Fixes #63.
commit 355c246d90b4ee0bc4fa56f0c8b6463264870b96 Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 18:52:27 2010 +0200
xorg-x11-drv-evdev: Remove BIND_NOW to autoload modules at X statup.
Fixes #49. Fixes #63.
commit acc4346ec8abf04953657303563e8146c9b99b1b Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 18:51:06 2010 +0200
mesa: Remove BIND_NOW to autoload modules at X statup.
commit 5aa55f9fcf95a319f59006503c912ab0d5ed7459 Author: Schantl Stefan Stevee@ipfire.org Date: Fri Sep 10 18:48:45 2010 +0200
xorg-x11-server: Fix module autoload, improve logging at build time.
Fixes #49 This also fixes #63
commit d1e907733c11c9bce5ea80c7b1d06ddebc1bbdc4 Merge: e2880da cdb9873 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 9 19:20:54 2010 +0200
Merge branch 'no-toolchain' of ssh://git.ipfire.org/pub/git/people/ms/ipfire-3.x into ms-no-toolchain
Conflicts: pkgs/core/gcc/gcc.nm
commit 0123789cd6dbd7445b7332807ffe3f0587e01a5b Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Sep 8 22:45:52 2010 +0200
naoki: Remove export of data to the wiki.
commit 6a28bc18f70fd29d6234898c8ee4314bffb5275d Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Sep 6 23:09:00 2010 +0200
naoki: Remove older toolchain code.
commit 846c9302ac7a3a6fd43a3cb44a55e5cf4874b164 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Sep 6 23:05:51 2010 +0200
naoki: Re-add shell function.
commit cdb9873c23e579b218c4a1eff8f197c86d300c4c Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 18:09:11 2010 +0200
naoki: Find "requires" and "provides" for python.
commit b138e23b5efeb42dacf15ced2030cb92ae9a2b48 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:29 2010 +0200
upower: Update package to be built with the new version of the buildsystem.
commit 71bdc4f5674c7db09fa89743e3f3c18d9f581cd0 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:29 2010 +0200
udisks: Update package to be built with the new version of the buildsystem.
commit 0f18997e1a5fe69f92b4d9b43ae94541ac7605c9 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:27 2010 +0200
sg3-utils: Update package to be built with the new version of the buildsystem.
commit 85e2de92cbc5be690d158f5beab470b3d2610daf Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:27 2010 +0200
sane: Update package to be built with the new version of the buildsystem.
commit 164f85f87dfe1cbf545b3e3a34fd87c5eb44d512 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:27 2010 +0200
rrdtool: Update package to be built with the new version of the buildsystem.
commit b321d973a2730411a74c4a9e30b39081632e8ba3 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:24 2010 +0200
polkit: Update package to be built with the new version of the buildsystem.
commit 5adbc73db0359cbe2a4f152a1034fe30abc9db41 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:23 2010 +0200
pango: Update package to be built with the new version of the buildsystem.
commit 7032af614a63feee52ac5956120c0f127f94507b Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:22 2010 +0200
net-snmp: Update package to be built with the new version of the buildsystem.
commit 6e3d390c3b04c230dbd780fab236f0fc85e0532c Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:20 2010 +0200
lighttpd: Update package to be built with the new version of the buildsystem.
commit a3ea1159950a2d579a3311087e8367fa1347ffff Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:16 2010 +0200
hplip: Update package to be built with the new version of the buildsystem.
commit af22be293734bb5de0cd11fd51bef4c7b543d78c Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:14 2010 +0200
freeradius: Update package to be built with the new version of the buildsystem.
commit 5ba6da93c989c7da97ff2a3e344bf44479f531cb Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:13 2010 +0200
eggdbus: Update package to be built with the new version of the buildsystem.
commit a8824d1a79a1a4e6598472c0c9744bce58bc0c7d Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:11 2010 +0200
cairo: Update package to be built with the new version of the buildsystem.
commit e04e061a6f3d12fe08e0bc6e3694a606bc991dfc Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:53:10 2010 +0200
avahi: Update package to be built with the new version of the buildsystem.
commit 23dbe6d7fc4e730c31a2a57d9f40a615f2b2b01d Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:52:29 2010 +0200
gcc: Add patch to always pass --no-add-needed to the linker.
commit 5146efdcea825fafd01a21cc11db90f417a16a55 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:44:32 2010 +0200
gcc: Package libgomp and libmudflap.
commit b66161e6d20f19601ef012da3933cc6df7ce5c61 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 17:42:20 2010 +0200
gobject-introspection: Reactivation of package.
commit 516d702ac29b815e0ce4535a144c63dc35ef1598 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 16:15:44 2010 +0200
intltool: Fix runtime dependencies.
commit 1d8e38e585df7f81605563f93cf5bb9956802389 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 15:51:03 2010 +0200
syslog-ng: Remove non working ids-block.
commit f23b0b6ece3b77a7be9f3182b603d2ded3be808f Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 15:45:29 2010 +0200
gcc: Enable bootstrap for gcc and clearify some switches.
commit 3ebde8ed33031165674658424abd26f1c59d77a7 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 15:41:27 2010 +0200
QA: Add a check for interpreters.
commit 6580a72d90eecd8323fc845bc278f14f75ab75d5 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Sep 5 15:40:49 2010 +0200
screen: Add a bunch of patches from fedora.
commit 9e0e8468b5da9cf8fe580193797b47146cb30cef Merge: 272fe58 f74b93f Author: Schantl Stefan Stevee@ipfire.org Date: Sun Sep 5 15:04:14 2010 +0200
Merge branch 'master' of ssh://git.ipfire.org/pub/git/people/ms/ipfire-3.x into x-fixes
commit e2880daea1fbc0a4a564cd3be3fe0ebd8bd90fc7 Merge: 646e91b 272fe58 Author: Schantl Stefan Stevee@ipfire.org Date: Sat Sep 4 16:26:32 2010 +0200
Merge branch 'x-fixes' into ms-no-toolchain
Conflicts: pkgs/core/gcc/gcc.nm pkgs/core/libassuan/libassuan.nm pkgs/toolchain/gcc-static/gcc-static.nm pkgs/toolchain/gcc/gcc.nm
commit 9d1ca3338d7fdbe97d3567e7def7b27d16fa96fc Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 14:51:17 2010 +0200
kernel: Add kernel-headers package.
commit e0a62c28bd868bfaeec9a08f08e67b02b7ed0c0d Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:46:32 2010 +0200
kernel-headers: Remove extra source package.
This one will be integrated to kernel.
commit 646e91b62278fe3da495dc16d06d1ce967d37094 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:27:24 2010 +0200
naoki: Files I forgot to commit several time ago.
commit 79a45a84badc330c358e37cdfd340e07841b1824 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:25:37 2010 +0200
naoki: Add vala files to development package by default.
commit 9c9be30036a6aec277ab00576c39f7f5e97d6c15 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:25:14 2010 +0200
naoki: Allow an underscore (_) in package names.
commit 1d3c45f2e132a35a8b1bee249344e0e80c15ee6e Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:01 2010 +0200
xfsprogs: Update package to be built with the new version of the buildsystem.
commit 694c3871e473e71dbf163a79cc888ae0b0b9eac6 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:00 2010 +0200
wireless-tools: Update package to be built with the new version of the buildsystem.
commit 57b7cb2da680033072e0f8df6d0c3300447a3674 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:00 2010 +0200
vsftpd: Update package to be built with the new version of the buildsystem.
commit 5ff96f69a528a3d18d03a19fa0d2a52244ffe9e1 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:00 2010 +0200
vlan: Update package to be built with the new version of the buildsystem.
commit baab6528badfa61b9e76ad157f40fd1a7d4201d8 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:00 2010 +0200
vim: Update package to be built with the new version of the buildsystem.
commit 8b416b19ddf3039e1441d1f3b05c30a9213c3fe8 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:00 2010 +0200
upstart: Update package to be built with the new version of the buildsystem.
commit cfcc4059f0536b9628562fdb8dd65d729cdbf4dd Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:00 2010 +0200
upower: Update package to be built with the new version of the buildsystem.
commit 6732b6ee221f262b8ae22b4e2f78301523d0a737 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:00 2010 +0200
ulogd2: Update package to be built with the new version of the buildsystem.
commit 9e95f0cda618c7d72ce86a3f30baabcdb6afdf10 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:00 2010 +0200
udisks: Update package to be built with the new version of the buildsystem.
commit 4680a048d1c6f88b0a0a3517f2d62dad538dc122 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:09:00 2010 +0200
traceroute: Update package to be built with the new version of the buildsystem.
commit d7ca0e564957d83423dc39f4d55170ddfa67d816 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
tcpdump: Update package to be built with the new version of the buildsystem.
commit f74ebd171c1218bbc64f9ac1b25d8d49e6f47e86 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
syslog-ng: Update package to be built with the new version of the buildsystem.
commit 0ffba062c85d2298fd3351a764438f9bcd4b2a83 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
syslinux: Update package to be built with the new version of the buildsystem.
commit 2f1b2615509f5437780be0ab59881a42ab775fdd Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
sysfsutils: Update package to be built with the new version of the buildsystem.
commit 46f3720157ba88cb041e0453905f26814fd10114 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
suricata: Update package to be built with the new version of the buildsystem.
commit 108913058eb86a1a8b75c084cd666cb4a3c87fd6 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
sudo: Update package to be built with the new version of the buildsystem.
commit a154f66fb9f3a2bf793aa4068a6bf1e6327f1202 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
strongswan: Update package to be built with the new version of the buildsystem.
commit 0f8efc3eef80e64637c8ce59ff8a8523b381f98e Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
strace: Update package to be built with the new version of the buildsystem.
commit 7c9ba3709a762710b1a43b2724e969cf2a1ac4bd Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
squid: Update package to be built with the new version of the buildsystem.
commit c3ca606149ec2cb7b11c0391a68fa027f0bf2e1c Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:59 2010 +0200
squashfs-tools: Update package to be built with the new version of the buildsystem.
commit 7a218b809571ae00155da8646ad93212ad34c369 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:58 2010 +0200
slang: Update package to be built with the new version of the buildsystem.
commit 16f95a44e6711cae4db1e946dc039e94e4e43c58 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:58 2010 +0200
shadow: Update package to be built with the new version of the buildsystem.
commit 983743c3f90734f28bece8248fd9bd6486a573c6 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:58 2010 +0200
sg3-utils: Update package to be built with the new version of the buildsystem.
commit e02a83b5271519dbdfc3cbf4bc4d820c559724ab Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:58 2010 +0200
sdl: Update package to be built with the new version of the buildsystem.
commit d34c652341480f13ed19ecc1d45f18063c4807c9 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:58 2010 +0200
screen: Update package to be built with the new version of the buildsystem.
commit d604bfdf2eb2a1f594446efb1962ab03f120a37d Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:58 2010 +0200
samba: Update package to be built with the new version of the buildsystem.
commit 168a9e216f9ce3a31b361051a453c335a23511da Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:58 2010 +0200
rrdtool: Update package to be built with the new version of the buildsystem.
commit 83dd3963a8848547b295d4462819f1860946f7f5 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:58 2010 +0200
reiser4progs: Update package to be built with the new version of the buildsystem.
commit 328e28f877e425b607040a7849fa9ec255b5d09b Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:58 2010 +0200
quagga: Update package to be built with the new version of the buildsystem.
commit 35d2772fe16906dbf4e4600a013c9f731b3a6270 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
qemu: Update package to be built with the new version of the buildsystem.
commit aafe807f0a3b8979925f95a5c11aeaf96f8a6d5e Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python-urlgrabber: Update package to be built with the new version of the buildsystem.
commit 43d3c003170ad5995a908ccee6e4cd5b4a5027f3 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python-tornado: Update package to be built with the new version of the buildsystem.
commit f401a9eb0713bdea6095e83957f8d7b08b40d154 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python-setuptools: Update package to be built with the new version of the buildsystem.
commit 3cd0a63275e18e43bbfa53065673b8976aee270e Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python-pyblock: Update package to be built with the new version of the buildsystem.
commit 0581045e250001e89eb0416427fbf63fd71c012d Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python-parted: Update package to be built with the new version of the buildsystem.
commit 5dc54506450679b64bc647396017d5bfbc36f97d Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python-netfilter_conntrack: Update package to be built with the new version of the buildsystem.
commit 21eaf09e68ddcbdec3e4fccf3e97f3fb7f6c87fd Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python-IPy: Update package to be built with the new version of the buildsystem.
commit 2f51fa605d439ab2d98b0e3654cdbf76a3b09826 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python-decorator: Update package to be built with the new version of the buildsystem.
commit 27452271bb4977506b0d522c667367ecc33d9ef3 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python-cryptsetup: Update package to be built with the new version of the buildsystem.
commit c114edc330101fa0ea55b3fd7d5d2ad7a9ad4c76 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
python: Update package to be built with the new version of the buildsystem.
commit 2abe7c7980ab0d42f1d0e51f3f2e57d19886a341 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
pyfire: Update package to be built with the new version of the buildsystem.
commit 277a7792b2701f5efb0901120956989bdcf2f423 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
pychecker: Update package to be built with the new version of the buildsystem.
commit 1e3fdc655fc757a0deae056603b3528d12f35440 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
psmisc: Update package to be built with the new version of the buildsystem.
commit 32316eab23de07889e348986bac82234bcaa7ad8 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
procps: Update package to be built with the new version of the buildsystem.
commit 2bf90089ed0cecbf0dd823e5105c9b915a2ad665 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:57 2010 +0200
pptp: Update package to be built with the new version of the buildsystem.
commit e59aa94a32dc9c211001734855d5bf874408f089 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:56 2010 +0200
ppp: Update package to be built with the new version of the buildsystem.
commit 42e91640a2cdc229caf23aa887f28d5c6ffdd8dd Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:56 2010 +0200
polkit: Update package to be built with the new version of the buildsystem.
commit 117b3b0c78b92b3677502fded684cf6a4f265a49 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:56 2010 +0200
pixman: Update package to be built with the new version of the buildsystem.
commit 157d8b2cfacf3e5d28c87bcaed164fb52d2e784d Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:56 2010 +0200
pinentry: Update package to be built with the new version of the buildsystem.
commit fcd202ada18b24d4c3bdef73b80bb15fe84881e2 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:56 2010 +0200
pdns: Update package to be built with the new version of the buildsystem.
commit 75b8f4c2113e94d392e65973968c2743886cfe1d Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:56 2010 +0200
pcapy: Update package to be built with the new version of the buildsystem.
commit cf84d7435d91eb4b8d6280e8a6ea326950bbd433 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:55 2010 +0200
pax-utils: Update package to be built with the new version of the buildsystem.
commit c3e1df2f0605ab24f722872f1975c97cef1ff131 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:55 2010 +0200
paxctl: Update package to be built with the new version of the buildsystem.
commit a5ecb5522474a0f2acb0fbc512c21c3b4699e894 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:55 2010 +0200
parted: Update package to be built with the new version of the buildsystem.
commit 1dc82e58e9eafdc4a823287f625dd7d1d7747d79 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:55 2010 +0200
pango: Update package to be built with the new version of the buildsystem.
commit a60298228fd6144c8d662543d4ce7764eb844deb Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:55 2010 +0200
pam_ldap: Update package to be built with the new version of the buildsystem.
commit e1fb924289a73c8b8142b1e039edebaed38f78d7 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:55 2010 +0200
os-prober: Update package to be built with the new version of the buildsystem.
commit c247208b15c9acd90a90ba4541ee5830ac3badcb Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:55 2010 +0200
openvpn: Update package to be built with the new version of the buildsystem.
commit 1f66e0429326e427b66d285e57ea878349ce7d5f Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:54 2010 +0200
openl2tp: Update package to be built with the new version of the buildsystem.
commit 36b9b292a2ca63c18405a1ba08f2bc227615b3d9 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:54 2010 +0200
ntp: Update package to be built with the new version of the buildsystem.
commit c8f77b0fbf39aebfad1f2d5ad58ec87834472b29 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:54 2010 +0200
nss_ldap: Update package to be built with the new version of the buildsystem.
commit f21fb2531c5fea58eba4d51e348c9360da2842fe Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:54 2010 +0200
nmap: Update package to be built with the new version of the buildsystem.
commit 7fef22b2c854925bcea6989a2918fbcdbd637a8a Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:54 2010 +0200
newt: Update package to be built with the new version of the buildsystem.
commit 1d7177fa158cfe6c5d3f5f3fcb9c101ccf774a7e Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:54 2010 +0200
net-snmp: Update package to be built with the new version of the buildsystem.
commit 5a4f5aa7eb9d2aa06171154a0aac61d0093c03f6 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:54 2010 +0200
nano: Update package to be built with the new version of the buildsystem.
commit d7a0243ba0d820df8b6508f571d96dd2c333feb7 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:54 2010 +0200
multipath-tools: Update package to be built with the new version of the buildsystem.
commit e55af06cf6284ad952c1e1f4c394b320cee32f16 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:53 2010 +0200
mdadm: Update package to be built with the new version of the buildsystem.
commit b38097bbe1e8bf8cc18bca540c7e09efb9983060 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:53 2010 +0200
mc: Update package to be built with the new version of the buildsystem.
commit 02bfec67580b44cea2de8e25c30771053fec4851 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:53 2010 +0200
man-pages: Update package to be built with the new version of the buildsystem.
commit 762816dd7e4f0461932ab827c820ff79104b0eef Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:53 2010 +0200
man-db: Update package to be built with the new version of the buildsystem.
commit 15076d465e3a37669ae056b117943e050be9e961 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:53 2010 +0200
lvm2: Update package to be built with the new version of the buildsystem.
commit eec964292954f7e377d4ebd657c8fa167b31b45a Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:53 2010 +0200
linux-atm: Update package to be built with the new version of the buildsystem.
commit d5bf3907fe6b99710bbf8e462dbd70e10cc14cfe Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:52 2010 +0200
libuser: Update package to be built with the new version of the buildsystem.
commit 2b87326c90b57f64fecfb431223f8f09117ed122 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:52 2010 +0200
libtiff: Update package to be built with the new version of the buildsystem.
commit 7b9cd37b6a181d33606493b13872ec2b14e69856 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:52 2010 +0200
libsoup: Update package to be built with the new version of the buildsystem.
commit e07f41ea3c419524f5de14975423ee45d7565aa2 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:52 2010 +0200
librpcsecgss: Update package to be built with the new version of the buildsystem.
commit 128a348fc4355c69e6d8e17241dc79fdb3a481d9 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:52 2010 +0200
libpng: Update package to be built with the new version of the buildsystem.
commit 67a1b310a2c0d30040bd1bac120467a06fca3bc0 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:52 2010 +0200
libpciaccess: Update package to be built with the new version of the buildsystem.
commit f0991ac6ae4600709f3c658491899ac700666b9e Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:52 2010 +0200
libpcap: Update package to be built with the new version of the buildsystem.
commit ee2d432ccfff47e84ae2f102c74730b66aaa6e20 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:52 2010 +0200
libnl: Update package to be built with the new version of the buildsystem.
commit ef8cacc6fcc98a55566da20ed4a40fdb3a87ba01 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:52 2010 +0200
libnih: Update package to be built with the new version of the buildsystem.
commit dff2be6b9e20a7a2b291f7bdff5c6583e55c2d95 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libnfnetlink: Update package to be built with the new version of the buildsystem.
commit 8a5f60cd7f1e2daed2ed12093a641dd3ca4bab44 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libnetfilter_queue: Update package to be built with the new version of the buildsystem.
commit f2a117d583ca584b34b20ae1e2a3cf508ee40ba4 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libnetfilter_log: Update package to be built with the new version of the buildsystem.
commit 06350a2cf22019d9e034d1336c823e122ca77e9c Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libnetfilter_conntrack: Update package to be built with the new version of the buildsystem.
commit d0130a99deabca0c23483c55aab8fbd9c4549601 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libksba: Update package to be built with the new version of the buildsystem.
commit b2069ca6daba9508d1582af3e056bb8286aa0a0e Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libjpeg: Update package to be built with the new version of the buildsystem.
commit 838a7a0bb7b81120e81fbb2895ae610d19817bd3 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libgssglue: Update package to be built with the new version of the buildsystem.
commit c60c0896ad0504e199ccea7de16a595fb82d5734 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libevent: Update package to be built with the new version of the buildsystem.
commit e2ed5a81ad8fa93dc18758728fbc6b2d9807f2bf Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libdnet: Update package to be built with the new version of the buildsystem.
commit 8ac7d5bf99066f8a9082434fa626a124b7ed046f Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:51 2010 +0200
libcap-ng: Update package to be built with the new version of the buildsystem.
commit 6866c8c71f6c8e51e7464be88ba5c5fc44c73c32 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
libatasmart: Update package to be built with the new version of the buildsystem.
commit d323422f132d907ef4c6e2a34a148dd4e7ef495f Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
libassuan: Update package to be built with the new version of the buildsystem.
commit 3bc6fc50b37bb96b4ada52dbf66b6910593d1942 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
libart: Update package to be built with the new version of the buildsystem.
commit 97ec13622267b5bd69dccbf552e85ffa239aa144 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
libaio: Update package to be built with the new version of the buildsystem.
commit 35f2a0e9d30fc5749eaba07e2f5c91a7bde02f12 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
libaal: Update package to be built with the new version of the buildsystem.
commit 735a4ecffbb532607098306dfddcadbf9778a5a7 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
less: Update package to be built with the new version of the buildsystem.
commit 2b4392b21e95ca742ec33914facea6c1095d3de9 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
ldapvi: Update package to be built with the new version of the buildsystem.
commit 53b8556e33bf0b1f4f35ad42f2b2429d1fb0b3f0 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
l7-protocols: Update package to be built with the new version of the buildsystem.
commit b9b9e3ea64399f3381fc88fd2e3be284c4e07388 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
jwhois: Update package to be built with the new version of the buildsystem.
commit 621a7baeb8b75a5e15827cc7fbfcaa1b9646ceb5 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
iw: Update package to be built with the new version of the buildsystem.
commit 6343726cbfed94d019332b8f69b41d340a4e16dd Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
iputils: Update package to be built with the new version of the buildsystem.
commit 67ea67dfd459941bd4b45216eafa89f6ba57cb5c Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:50 2010 +0200
iptables: Update package to be built with the new version of the buildsystem.
commit 5a876fbcd32bf908f144efaceefd8d193f90dfcd Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
iproute2: Update package to be built with the new version of the buildsystem.
commit b0028340521d6d714646de2e197f0579260b7488 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
htop: Update package to be built with the new version of the buildsystem.
commit cde88b69de9a73faca034a278a4b679b5972e461 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
hostapd: Update package to be built with the new version of the buildsystem.
commit 7b24475ec34d0cd4193304f42b13324dfa72e5c3 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
gzip: Update package to be built with the new version of the buildsystem.
commit 7eecf17819dd4c8da2d959581124a7337c4724c7 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
gupnp-av: Update package to be built with the new version of the buildsystem.
commit faf15a47ef0f65bbd48a4a2199e91334941eb4a4 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
gupnp: Update package to be built with the new version of the buildsystem.
commit 69c1506df2d4627c08200e89b416710aa40f4fe7 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
guile: Update package to be built with the new version of the buildsystem.
commit 7ff7d271d603b97d5e170a3ce18cc6270478a4c5 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
gssdp: Update package to be built with the new version of the buildsystem.
commit f718dadc99fa3fc4cdece1e72f814e63aa6fe21e Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
grub: Update package to be built with the new version of the buildsystem.
commit 5131a1f758289660083f0d319429f52a04616006 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:49 2010 +0200
groff: Update package to be built with the new version of the buildsystem.
commit ca02cde1c0b800863e206503490bce656652812b Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:48 2010 +0200
gdb: Update package to be built with the new version of the buildsystem.
commit e44cac695504d7260384e1f3ffd66253ec4f6e3c Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:48 2010 +0200
freetype: Update package to be built with the new version of the buildsystem.
commit 8ca5cc73567ec86a6d367eb8e3601e9326c9fb5a Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:47 2010 +0200
fontconfig: Update package to be built with the new version of the buildsystem.
commit eb75cd5626975b6e42b20da9faa9244d9fe0e16b Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:47 2010 +0200
firewall: Update package to be built with the new version of the buildsystem.
commit d9f95236951a75778f16b5b0fd055c71744ac298 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:47 2010 +0200
eventlog: Update package to be built with the new version of the buildsystem.
commit d74dbf9aa4181d76cd4a76a96b5a8c46b671ff31 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:47 2010 +0200
eggdbus: Update package to be built with the new version of the buildsystem.
commit ef678eaf56d22f8d835472a4811f93dec2ccea92 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:47 2010 +0200
e2fsprogs: Update package to be built with the new version of the buildsystem.
commit 1bd580c86b8697dd02a6bae293728fcd37ac344c Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:46 2010 +0200
dmraid: Update package to be built with the new version of the buildsystem.
commit 35a246bed8846e6884d59760b6e63317e02786e9 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:46 2010 +0200
directfb: Update package to be built with the new version of the buildsystem.
commit 97fc529e53eae28f44701ed5222816b5e0afafe3 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:46 2010 +0200
cups: Update package to be built with the new version of the buildsystem.
commit 50ad44710002127de84d5ead1f8d9d7ea3eefd34 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:46 2010 +0200
cryptsetup-luks: Update package to be built with the new version of the buildsystem.
commit 8a6b572fe2348fb3c901cab7445bf84820b16ce4 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:45 2010 +0200
cairo: Update package to be built with the new version of the buildsystem.
commit 6a9b18d1d186f6648d35eaa5c979c5fb880f1329 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:45 2010 +0200
bwm-ng: Update package to be built with the new version of the buildsystem.
commit 4d40215ba5f6856ac358700d838e7bab8912615e Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:45 2010 +0200
btrfs-progs: Update package to be built with the new version of the buildsystem.
commit a4f5362aedccd539b214c5d97344a41c6e315fc6 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:45 2010 +0200
bridge-utils: Update package to be built with the new version of the buildsystem.
commit c655101a3ead3d721762edaccb4eb26292dc37ff Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:45 2010 +0200
br2684ctl: Update package to be built with the new version of the buildsystem.
commit 9201765520fc0cab79f069223e098487ce6e40ff Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:45 2010 +0200
bison: Update package to be built with the new version of the buildsystem.
commit 388295789196ee45d4db96b1fd0dbfd463d1217f Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Sep 4 13:08:44 2010 +0200
avahi: Update package to be built with the new version of the buildsystem.
commit e698b32134d7ff94fcdb1ee1524c0ecf5373ebf8 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:03:54 2010 +0200
bind: Update package to be built with the new version of the buildsystem.
commit be86bab5a1b66f007c324279a36a0e5f58b686fa Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:03:34 2010 +0200
python: Make all *.py not executeable.
commit a6b7af6fb19a2c8789abcac6ff799bcad38cb7ba Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:03:08 2010 +0200
libtool: Re-pack of the development files.
commit 4a3264ace318c87405d49cb3cc250da47d6c7e82 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:02:57 2010 +0200
lua: Update package to be built with the new version of the buildsystem.
commit 3c80045805086c0c86db22d397675b3114c47df4 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:02:34 2010 +0200
module-init-tools: Update package to be built with the new version of the buildsystem.
commit 9b2b0b927542aab29486a03fe30b30dd626c626d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:02:22 2010 +0200
pdns-recursor: Update package to be built with the new version of the buildsystem.
commit f8647db29f62b5dab7be6d9628d1db92508a4f75 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:02:01 2010 +0200
perl-xml-parser: Update package to be built with the new version of the buildsystem.
commit 473efb69fa2a612cd48f3152b453007bff5935c4 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:01:44 2010 +0200
python-dbus: Update package to be built with the new version of the buildsystem.
commit ba55c5c9830c4fb4a28f6d7582276653e0d37d52 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:01:25 2010 +0200
udev: Update package to be built with the new version of the buildsystem.
commit 605cd393e83954fc23989eaddcb50f2ddb9d2a7b Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:01:12 2010 +0200
util-linux-ng: Update package to be built with the new version of the buildsystem.
commit d2667524a7466c4645970e30343ad407db01fbbc Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:00:53 2010 +0200
usbutils: Update package to be built with the new version of the buildsystem.
commit cd2a91fb65629260ec66e0700058e7386ee4d834 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:00:43 2010 +0200
pciutils: Update package to be built with the new version of the buildsystem.
commit b5d465cf10730b961f7f8aa3b769b2fde09861ae Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:00:31 2010 +0200
libdaemon: Update package to be built with the new version of the buildsystem.
commit f1a50e4e3d7fef88700a7b2f515d80ef3a71d0a3 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 20:00:11 2010 +0200
intltool: Update package to be built with the new version of the buildsystem.
commit 1638c2ce621ab9a10d5f7b5340ebf8e511a7dac0 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 19:59:56 2010 +0200
gperf: Update package to be built with the new version of the buildsystem.
commit 8c893619395b367f4a7fb64a1822d13b780b9c81 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 19:59:34 2010 +0200
boost: Update package to be built with the new version of the buildsystem.
commit 5c526f2f2741888cf9e555e7a2ec8dd91e37723e Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 19:59:02 2010 +0200
basesystem: Update package to be built with the new version of the buildsystem.
commit 63a1a7b9135f56f1647ec1f415b4c13f81cdbac8 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 19:58:46 2010 +0200
aiccu: Update package to be built with the new version of the buildsystem.
commit 26f43b15c407ed0982b57e4b587bf4a3fc1f32af Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 19:55:33 2010 +0200
naoki: Don't add interpreters for files that are not executeable.
commit 27ce337b7980b61b78d95a7d60371690c3e1f77d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 17:26:14 2010 +0200
naoki: Create a template for packages lib$(PKG_NAME) and lib$(PKG_NAME)-devel.
commit dc4059c268b2993e99dadbc1757a2c210b7e06b0 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 14:01:04 2010 +0200
dbus-glib: Update package to be built with the new version of the buildsystem.
commit a5cfc571f6bc33555709e57907f40ef11ab98b86 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 13:59:54 2010 +0200
dbus: Fix packaging of outer-place include files.
commit 0b55b624736245c28413ed8bb2ce183a4f7af419 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 13:59:35 2010 +0200
libusb-compat: Update package to be built with the new version of the buildsystem.
commit 3fa34c996f1fc68d46bb689310b953e71ea74043 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 13:59:24 2010 +0200
libusb: Update package to be built with the new version of the buildsystem.
commit b06fbae10ed1c745a02c83ca54248aef9b70cffc Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 13:59:11 2010 +0200
libxml2: Update package to be built with the new version of the buildsystem.
commit 7108af4bb097007840d06cb4ebb9df22099495f5 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 13:58:14 2010 +0200
popt: Update package to be built with the new version of the buildsystem.
commit 6210e76498415807c226a66f88a9796659b4dc9b Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 13:55:19 2010 +0200
packager: Fix automatic dependency lookups for needed libraries.
commit 4d9ce265c58151a39f419ec7ce6b690160ea23c1 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 02:21:52 2010 +0200
glib2: Fix name of development package.
commit fadea6a3cff608bba0f018311335aa2383b8c31c Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 02:11:22 2010 +0200
cmake: Update package to be built with the new version of the buildsystem.
commit 920bbeb692f1d1670a2ac3fff8f6006ff644db8f Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 02:10:42 2010 +0200
dbus: Update package to be built with the new version of the buildsystem.
commit 4e901774fab5c9d6d6c054276c66d61855080096 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 02:04:03 2010 +0200
Replace compressor by packager and create a common shell function library.
References #53.
commit fff31d5912b2d807ea3b8347bb73721bc802c2f7 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 02:02:17 2010 +0200
Remove any toolchain reference from the makefiles.
References #53.
commit 8b1f15821cb0ed0f64ea3664ebcb80fd5b2e7902 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:50:35 2010 +0200
openssh: Update package to be built with the new version of the buildsystem.
commit 452efbe7b56636b4a81b42d36c557d4d8201b020 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:50:24 2010 +0200
curl: Update package to be built with the new version of the buildsystem.
commit 81d3fa51ce38e28756a50a454d1e7de71176d4cc Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:45:55 2010 +0200
libssh2: Update package to be built with the new version of the buildsystem.
commit 25d7447760b543ae7305c02e701a72ef0df652f7 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:44:43 2010 +0200
openldap: Update package to be built with the new version of the buildsystem.
commit 4793126c1f82b008a01220897d096c3fc22d6545 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:34:59 2010 +0200
zlib: Update package to be built with the new version of the buildsystem.
commit d60d94e33f18227f5a4f0b5073d6c426d5ae8f7e Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:34:50 2010 +0200
tar: Update package to be built with the new version of the buildsystem.
commit 52d652a9fdb546a6651855dc5a1a9b81a0aa0f57 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:34:42 2010 +0200
sqlite: Update package to be built with the new version of the buildsystem.
commit fbff7f530e7e52d31075fe06bce1707555c41c42 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:34:30 2010 +0200
readline: Update package to be built with the new version of the buildsystem.
commit 5b955778ce5958b5c3709352fee91f57cc3399d0 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:34:22 2010 +0200
python: Update package to be built with the new version of the buildsystem.
commit 8e7d7595d9c944a9804ca1fbb0a6119e35a7a680 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:34:13 2010 +0200
pth: Update package to be built with the new version of the buildsystem.
commit 7093f90df165e3956111d202b967f35322c18cbf Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:34:04 2010 +0200
perl: Update package to be built with the new version of the buildsystem.
commit d6eb00f6cd5af5cb089b392121ec024827640855 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:33:55 2010 +0200
pcre: Update package to be built with the new version of the buildsystem.
commit f5f7ab22601c8045ed79a3e1b70147482fe8fa1e Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:33:44 2010 +0200
pam: Update package to be built with the new version of the buildsystem.
commit 036fcb127d3491c221b0efe1d1e8b24bdcb8ca59 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:33:34 2010 +0200
openssl: Update package to be built with the new version of the buildsystem.
commit 7fa44e6ff4769cf9b3eb14f849277909252c6d38 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:33:22 2010 +0200
mpfr: Update package to be built with the new version of the buildsystem.
commit c2c8f52f96ba09d490464059533a67a49a19b993 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:33:13 2010 +0200
mpc: Update package to be built with the new version of the buildsystem.
commit 9caf420ce3c03f7cd6f9294c6ff82a7975b8cb0d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:33:05 2010 +0200
libtool: Update package to be built with the new version of the buildsystem.
commit afe5f5bb7b16178e9a676e0e4ac31ec96072de6d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:32:46 2010 +0200
libnfsidmap: Update package to be built with the new version of the buildsystem.
commit 614bd5c949098b2fa11a1d6d6eddbb46fd72eb31 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:32:34 2010 +0200
libidn: Update package to be built with the new version of the buildsystem.
commit 50774484e6f5db40e1d3859df8fcc8344b693813 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:32:19 2010 +0200
libgpg-error: Update package to be built with the new version of the buildsystem.
commit ce294b2bddad19e546a727232ac92901e3b46d48 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:31:52 2010 +0200
Update package to be built with the new version of the buildsystem.
commit 521fefd9f899b8147953500b61e28bd41e5155ae Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:31:38 2010 +0200
libffi: Update package to be built with the new version of the buildsystem.
commit ff8b166d3bd94b499ddecfe94930ca993e2f8b2b Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:31:27 2010 +0200
libcap: Update package to be built with the new version of the buildsystem.
commit f644ed4b0e8d7044f655fe2002d0e6cdeadead2d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:31:16 2010 +0200
iana-etc: Update package to be built with the new version of the buildsystem.
commit e4ce96603d723dcb3013f50ba3ce8f89be2ed179 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:31:03 2010 +0200
gnutls: Update package to be built with the new version of the buildsystem.
commit 64dc7375d8067771ae11067c05ad4a2bf85999fb Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:30:52 2010 +0200
gmp: Update package to be built with the new version of the buildsystem.
commit ef0e6205746e04e3248890a54f1cc1e665c78088 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:30:41 2010 +0200
glib2: Update package to be built with the new version of the buildsystem.
commit 9cb67d4eef5fbc546f0fcc53791e737a2b63e402 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:30:29 2010 +0200
gdbm: Update package to be built with the new version of the buildsystem.
commit bdd882428aee61983a81e2cd3e9e315827baa3b9 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:30:18 2010 +0200
flex: Update package to be built with the new version of the buildsystem.
commit 40ba55977d00f7a98d984837dc4c562232a01a58 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:30:05 2010 +0200
lzo: Update package to be built with the new version of the buildsystem.
commit 1c4b4911a97833393070f473f826b4085fbb6f0c Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:29:53 2010 +0200
file: Update package to be built with the new version of the buildsystem.
commit 7997b1d2ea1521522a01ffb182f21a47bbe1a53b Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:29:44 2010 +0200
expat: Update package to be built with the new version of the buildsystem.
commit bf2de166c4b5a5be196a27ccf9e81fa6a28c2a45 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:29:33 2010 +0200
db: Update package to be built with the new version of the buildsystem.
commit 484c71a5570367d5681055084cc7459f2917607e Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:29:22 2010 +0200
cyrus-sasl: Update package to be built with the new version of the buildsystem.
commit 248311764ed765490d65846941e165e64f3ea37b Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:29:08 2010 +0200
bison: Update package to be built with the new version of the buildsystem.
commit 6ecc8c006c135278eeb197dd05764be477a6a88c Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:28:56 2010 +0200
cracklib: Update package to be built with the new version of the buildsystem.
commit d077d8aeb1d9383558c529e4038a1414a1414273 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:28:43 2010 +0200
coreutils: Update package to be built with the new version of the buildsystem.
commit bf56c13e3f851bf85529194fe9f45ecee57c44c6 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:28:32 2010 +0200
binutils: Update package to be built with the new version of the buildsystem.
commit 9d9eb0163360d5e48009c78cff75f458b2485564 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:28:22 2010 +0200
automake: Update package to be built with the new version of the buildsystem.
commit d5f0ac1d0b15814dccd7bba3e42c81bf7a511ecb Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:28:06 2010 +0200
bash: Update package to be built with the new version of the buildsystem.
commit 8a6b9d78973c4de84d99444b80a988f6970d6645 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:27:56 2010 +0200
Update package to be built with the new version of the buildsystem.
commit 5e5c27e706e5ac47ccc22d003137a1f23ed7be4d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:27:49 2010 +0200
acl: Update package to be built with the new version of the buildsystem.
commit 13a85ae6c5b78f3841222c9626496d5dba2374d2 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:27:33 2010 +0200
Update package to be built with the new version of the buildsystem.
commit 77dc89c0eda7b8b5ecac263ec52c6ec05e7bde8b Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:27:24 2010 +0200
ppl: Update package to be built with the new version of the buildsystem.
commit 087df360b8e67659f70ae76408f09a502f8f9664 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:27:12 2010 +0200
elfutils: Update package to be built with the new version of the buildsystem.
commit 7c1fc7a0d7a7f26dea8a6d096417e77edd1a72ea Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:26:52 2010 +0200
glibc: Update package to be built with the new version of the buildsystem.
commit 819979f7f5583668758f8aa09e42ce8811e48b82 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:26:37 2010 +0200
gcc: Update package to be built with the new version of the buildsystem.
commit 6d8de23327f4411acbebaae6ef5510253bf8813e Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 01:25:44 2010 +0200
autoconf: Update package to be built with the new version of the buildsystem.
commit 4dc576b144ba76269cf7d866331662c401f6f1b3 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Sep 3 00:07:05 2010 +0200
Remove all toolchain packages.
This commit references #53.
commit c9e159fcd1d55f112eb88154ea6b1d37ec7ae3e5 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Sep 2 23:59:27 2010 +0200
Add implicit dependencies for development packages.
If you are building a package which has headers that depend on other headers, they will be included here.
References #53.
commit cb585b93a7fd91a704428bd70706d3a6f1c92fd5 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Sep 2 23:58:55 2010 +0200
Remove toolchain options from command line interface.
References #53.
commit 272fe5894a1a8e125e01def310f32f6b49443fae Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:52:58 2010 +0200
libXxf86vm: New package.
commit 7048c46b0eb2dc3b7b986873ad930d8b85432749 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:52:37 2010 +0200
libXfixes: New package.
commit bf8a210045d72b51fcff3129c8dc4ddfecd6e181 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:52:04 2010 +0200
libdrm: New package.
commit 125b45099e8f8128a828ada9e35cbe628070c712 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:51:33 2010 +0200
libXdamage: New package.
commit a706d7c51866e93dbfde8992e05d9f3ccd84bca6 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:50:58 2010 +0200
mesa: New package.
commit 4a3c06ff85d69fd13c0b57b58bfd43f03d1d9cb7 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:48:30 2010 +0200
xorg-x11-server: Enable more features, add more dependecies.
commit d00d3e9c307c0e331a5ed63ddd701ef860cbe810 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:47:31 2010 +0200
xorg-x11-server: Remove unneeded patches.
commit 8c4ed05406b8393a091485690b4d3cd2fafba387 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:34:55 2010 +0200
libXmu: New package.
commit 4266166c454e4cfa80013a80ef7087adc70dc3c7 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:34:35 2010 +0200
libXt: New package.
commit 60266a4b90b40c2b0e6bcc7be34475cf0e847732 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:34:15 2010 +0200
libICE: New package.
commit 672832d8ad769ed9491d50d416f281ecd99f929a Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:33:46 2010 +0200
libSM: New package.
commit 77a8aa155ff354118525e7d95d4d57d678682b82 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:06:10 2010 +0200
libXdmcp: New package.
commit 1c6769b2258804892860bdf67a9c4a201ffb08fa Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 20:05:44 2010 +0200
libXres: New package.
commit 4480cbd3209927793d40375757ac94a4714ca9ff Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 19:27:14 2010 +0200
xrandr: New package.
commit 207773a6ef03f44a64a748409f2d00d6d9e42fb8 Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 19:26:52 2010 +0200
libXrender: New package.
commit 32e46be1db0f6a54fa39301444eb890bf6539b4b Author: Schantl Stefan Stevee@ipfire.org Date: Thu Sep 2 19:26:16 2010 +0200
libXrandr: New package.
commit 7e5e9c907312ad5c88834908bb58bc101ad0d570 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Aug 29 19:21:23 2010 +0200
naoki: Get rid of the toolchain.
Big changes in dependency resolution: Naoki does not resolve dependencies of source packages anymore. It instead goes on and checks out the available binary packages and tries to build a one-time customized toolchain.
The toolchain was always a thing that made development slow and caused lots of issues wo do not have anymore.
This references #53.
commit f74b93fc888d1d167bc969fc4542c05b3b69de33 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Aug 28 11:37:22 2010 +0200
Revert "naoki: Make won't sort anymore. So we do it on our own."
This reverts commit bd21b6d932681c4a7bebc6a3383ae4e9278e4356.
-----------------------------------------------------------------------
Summary of changes: config/architectures.conf | 4 + naoki/__init__.py | 298 +- naoki/architectures.py | 136 + naoki/backend.py | 676 ---- naoki/build.py | 107 + naoki/chroot.py | 544 --- naoki/constants.py | 71 +- naoki/decorators.py | 12 + naoki/dependencies.py | 192 + naoki/environ.py | 341 ++ naoki/exception.py | 4 + naoki/generators.py | 73 + {pkgs/core/pakfire/src/python => naoki}/io.py | 0 naoki/mail.py | 93 + naoki/packages.py | 227 ++ naoki/repositories.py | 215 ++ naoki/terminal.py | 50 +- pkgs/Constants | 20 +- pkgs/Functions | 21 +- pkgs/Include | 1 + pkgs/Targets | 12 +- pkgs/Templates | 49 + pkgs/core/acl/acl.nm | 10 +- pkgs/core/aiccu/aiccu.nm | 2 +- pkgs/core/attr/attr.nm | 11 +- pkgs/core/autoconf/autoconf.nm | 3 +- pkgs/core/automake/automake.nm | 3 +- pkgs/core/avahi/avahi.nm | 6 +- pkgs/core/basesystem/basesystem.nm | 10 +- pkgs/core/bash/bash.nm | 3 +- pkgs/core/bind/bind.nm | 4 +- pkgs/core/binutils/binutils.nm | 3 +- pkgs/core/bison/bison.nm | 3 + pkgs/core/boost/boost.nm | 11 +- pkgs/core/br2684ctl/br2684ctl.nm | 2 +- pkgs/core/bridge-utils/bridge-utils.nm | 4 + pkgs/core/btrfs-progs/btrfs-progs.nm | 2 +- pkgs/core/bwm-ng/bwm-ng.nm | 2 +- pkgs/core/cairo/cairo.nm | 8 +- pkgs/core/cloog/cloog.nm | 6 +- pkgs/core/cmake/cmake.nm | 2 +- pkgs/core/coreutils/coreutils.nm | 4 +- pkgs/core/cracklib/cracklib.nm | 15 +- pkgs/core/cryptsetup-luks/cryptsetup-luks.nm | 5 +- pkgs/core/cups/cups.nm | 6 +- pkgs/core/curl/curl.nm | 20 +- pkgs/core/curl/patches/curl-7.20.0-lrt.patch | 30 + pkgs/core/cyrus-sasl/cyrus-sasl.nm | 4 +- pkgs/core/db/db.nm | 15 +- pkgs/core/dbus-glib/dbus-glib.nm | 5 +- pkgs/core/dbus/dbus.nm | 6 +- pkgs/core/directfb/directfb.nm | 4 +- pkgs/core/dmraid/dmraid.nm | 4 +- pkgs/core/dracut/dracut.nm | 4 +- pkgs/core/e2fsprogs/e2fsprogs.nm | 3 +- pkgs/core/eggdbus/eggdbus.nm | 4 +- pkgs/core/elfutils/elfutils.nm | 6 +- pkgs/core/eventlog/eventlog.nm | 2 + pkgs/core/expat/expat.nm | 2 + pkgs/core/expect/expect.nm | 20 +- .../expect/patches/expect-5.38.0-lib-spec.patch | 12 + .../core/expect/patches/expect-5.39.0-libdir.patch | 12 + .../expect-5.43.0-override_default_prefix.patch | 12 + .../expect/patches/expect-5.43.0-spawn-1.patch | 217 ++ .../patches/expect-5.43.0-tcl_8.5.8_fix-1.patch | 125 + .../expect/patches/expect-5.44.1.15-no_tk-1.patch | 134 - pkgs/core/file/file.nm | 2 + pkgs/core/firewall/firewall.nm | 1 + pkgs/core/flex/flex.nm | 4 +- pkgs/core/fontconfig/fontconfig.nm | 5 +- pkgs/core/freeradius/freeradius.nm | 4 +- pkgs/core/freetype/freetype.nm | 4 +- pkgs/core/gcc/gcc.nm | 71 +- .../core/gcc/patches/gcc-4.5.0-no-add-needed.patch | 52 + pkgs/core/gdb/gdb.nm | 3 +- pkgs/core/gdbm/gdbm.nm | 2 + pkgs/core/glib2/glib2.nm | 5 +- pkgs/core/glibc/glibc.nm | 18 +- pkgs/core/gmp/gmp.nm | 8 +- pkgs/core/gnupg2/gnupg2.nm | 3 +- pkgs/core/gnutls/gnutls.nm | 4 +- .../gobject-introspection/gobject-introspection.nm | 55 + .../gobject-introspection.nm.off | 53 - pkgs/core/gperf/gperf.nm | 2 + pkgs/core/groff/groff.nm | 6 +- pkgs/core/grub/grub.nm | 5 +- pkgs/core/gssdp/gssdp.nm | 5 +- pkgs/core/guile/guile.nm | 4 +- pkgs/core/gupnp-av/gupnp-av.nm | 4 +- pkgs/core/gupnp/gupnp.nm | 6 +- pkgs/core/gzip/gzip.nm | 5 - pkgs/core/hostapd/hostapd.nm | 2 +- pkgs/core/hplip/hplip.nm | 5 +- pkgs/core/htop/htop.nm | 2 +- pkgs/core/iana-etc/iana-etc.nm | 7 +- pkgs/core/intltool/intltool.nm | 3 +- pkgs/core/iproute2/iproute2.nm | 3 +- pkgs/core/iptables/iptables.nm | 2 + pkgs/core/iputils/iputils.nm | 7 +- pkgs/core/iw/iw.nm | 3 +- pkgs/core/jwhois/jwhois.nm | 2 +- pkgs/core/kernel-headers/kernel-headers.nm | 24 - pkgs/core/kernel-headers/patches | 1 - pkgs/core/kernel/kernel.nm | 31 +- pkgs/core/l7-protocols/l7-protocols.nm | 2 - pkgs/core/ldapvi/ldapvi.nm | 5 +- pkgs/core/less/less.nm | 2 +- pkgs/core/libICE/libICE.nm | 48 + pkgs/core/libSM/libSM.nm | 48 + pkgs/core/libX11/libX11.nm | 5 +- pkgs/core/libXau/libXau.nm | 4 +- pkgs/core/libXdamage/libXdamage.nm | 48 + pkgs/core/libXdmcp/libXdmcp.nm | 48 + pkgs/core/libXext/libXext.nm | 5 +- pkgs/core/libXfixes/libXfixes.nm | 48 + pkgs/core/libXfont/libXfont.nm | 6 +- pkgs/core/libXmu/libXmu.nm | 48 + pkgs/core/libXrandr/libXrandr.nm | 49 + .../libXrandr/patches/libXrandr-1.3.0-fixes.patch | 102 + pkgs/core/libXrender/libXrender.nm | 48 + pkgs/core/libXres/libXres.nm | 52 + pkgs/core/libXt/libXt.nm | 51 + .../core/libXt/patches/libXt-1.0.7-libsm-fix.patch | 11 + pkgs/core/libXxf86vm/libXxf86vm.nm | 48 + pkgs/core/libaal/libaal.nm | 4 + pkgs/core/libaio/libaio.nm | 4 +- pkgs/core/libart/libart.nm | 4 +- pkgs/core/libassuan/libassuan.nm | 8 +- pkgs/core/libatasmart/libatasmart.nm | 5 +- pkgs/core/libcap-ng/libcap-ng.nm | 4 +- pkgs/core/libcap/libcap.nm | 2 +- pkgs/core/libdaemon/libdaemon.nm | 2 + pkgs/core/libdnet/libdnet.nm | 4 + pkgs/core/libdrm/91-drm-modeset.rules | 1 + pkgs/core/libdrm/libdrm.nm | 62 + pkgs/core/libdrm/patches/libdrm-2.4.0-no-bc.patch | 54 + .../libdrm/patches/libdrm-2.4.21-b803918f3f.patch | 506 +++ .../patches/libdrm-make-dri-perms-okay.patch | 12 + pkgs/core/libevent/libevent.nm | 2 + pkgs/core/libffi/libffi.nm | 4 + pkgs/core/libfontenc/libfontenc.nm | 4 +- pkgs/core/libgcrypt/libgcrypt.nm | 6 +- .../libgcrypt-1.4.5-ImplicitDSOLinking.patch | 24 + pkgs/core/libgpg-error/libgpg-error.nm | 6 +- pkgs/core/libgssglue/libgssglue.nm | 2 + pkgs/core/libidn/libidn.nm | 2 + pkgs/core/libjpeg/libjpeg.nm | 2 +- pkgs/core/libksba/libksba.nm | 4 +- .../libnetfilter_conntrack.nm | 5 +- pkgs/core/libnetfilter_log/libnetfilter_log.nm | 5 +- pkgs/core/libnetfilter_queue/libnetfilter_queue.nm | 5 +- pkgs/core/libnfnetlink/libnfnetlink.nm | 2 + pkgs/core/libnfsidmap/libnfsidmap.nm | 2 + pkgs/core/libnih/libnih.nm | 5 +- pkgs/core/libnl/libnl.nm | 2 + pkgs/core/libpcap/libpcap.nm | 4 +- pkgs/core/libpciaccess/libpciaccess.nm | 2 + pkgs/core/libpng/libpng.nm | 5 +- pkgs/core/librpcsecgss/librpcsecgss.nm | 5 +- pkgs/core/libsoup/libsoup.nm | 5 +- pkgs/core/libssh2/libssh2.nm | 2 +- pkgs/core/libtiff/libtiff.nm | 4 +- pkgs/core/libtool/libtool.nm | 9 + pkgs/core/libusb-compat/libusb-compat.nm | 4 +- pkgs/core/libusb/libusb.nm | 2 + pkgs/core/libuser/libuser.nm | 5 +- pkgs/core/libvirt/libvirt.nm | 6 +- pkgs/core/libxcb/libxcb.nm | 6 +- pkgs/core/libxkbfile/libxkbfile.nm | 5 +- pkgs/core/libxml2/libxml2.nm | 4 +- pkgs/core/libxslt/libxslt.nm | 5 +- pkgs/core/lighttpd/lighttpd.nm | 4 +- pkgs/core/linux-atm/linux-atm.nm | 4 +- pkgs/core/lua/lua.nm | 5 +- pkgs/core/lvm2/lvm2.nm | 8 +- pkgs/core/lzo/lzo.nm | 4 +- pkgs/core/man-db/man-db.nm | 3 +- pkgs/core/man-pages/man-pages.nm | 1 + pkgs/core/mc/mc.nm | 2 +- pkgs/core/mdadm/mdadm.nm | 2 + pkgs/core/mesa/mesa.nm | 68 + pkgs/core/module-init-tools/module-init-tools.nm | 2 +- pkgs/core/mpc/mpc.nm | 4 +- pkgs/core/mpfr/mpfr.nm | 6 +- pkgs/core/multipath-tools/multipath-tools.nm | 5 +- pkgs/core/nano/nano.nm | 9 +- pkgs/core/net-snmp/net-snmp.nm | 4 +- pkgs/core/network/network.nm | 3 +- pkgs/core/newt/newt.nm | 4 +- pkgs/core/nmap/nmap.nm | 3 +- pkgs/core/nss_ldap/nss_ldap.nm | 4 +- pkgs/core/ntp/ntp.nm | 2 +- pkgs/core/openl2tp/openl2tp.nm | 3 +- pkgs/core/openldap/openldap.nm | 6 +- pkgs/core/openssh/openssh.nm | 2 +- pkgs/core/openssl/openssl.nm | 5 +- pkgs/core/openvpn/openvpn.nm | 3 +- pkgs/core/os-prober/os-prober.nm | 3 +- pkgs/core/pakfire/pakfire.nm | 2 +- pkgs/core/pam/pam.nm | 7 +- pkgs/core/pam_ldap/pam_ldap.nm | 2 +- pkgs/core/pango/pango.nm | 6 +- pkgs/core/parted/parted.nm | 4 +- pkgs/core/pax-utils/pax-utils.nm | 6 +- pkgs/core/paxctl/paxctl.nm | 6 +- pkgs/core/pcapy/pcapy.nm | 2 +- pkgs/core/pciutils/pciutils.nm | 2 + pkgs/core/pcre/pcre.nm | 4 +- pkgs/core/pdns-recursor/pdns-recursor.nm | 2 +- pkgs/core/pdns/pdns.nm | 2 +- pkgs/core/perl-xml-parser/perl-xml-parser.nm | 3 +- pkgs/core/perl/perl.nm | 3 +- pkgs/core/pinentry/pinentry.nm | 2 +- pkgs/core/pixman/pixman.nm | 4 +- pkgs/core/pkg-config/pkg-config.nm | 3 +- pkgs/core/polkit/polkit.nm | 6 +- pkgs/core/popt/popt.nm | 2 + pkgs/core/ppl/ppl.nm | 5 +- pkgs/core/ppp/ppp.nm | 4 +- pkgs/core/pptp/pptp.nm | 3 +- pkgs/core/procps/procps.nm | 2 +- pkgs/core/psmisc/psmisc.nm | 2 +- pkgs/core/pth/pth.nm | 5 +- pkgs/core/pychecker/pychecker.nm | 2 +- pkgs/core/pyfire/pyfire.nm | 2 +- pkgs/core/python-IPy/python-IPy.nm | 2 +- pkgs/core/python-cryptsetup/python-cryptsetup.nm | 2 +- pkgs/core/python-dbus/python-dbus.nm | 2 +- pkgs/core/python-decorator/python-decorator.nm | 2 +- .../python-netfilter_conntrack.nm | 2 +- pkgs/core/python-parted/python-parted.nm | 3 +- pkgs/core/python-pyblock/python-pyblock.nm | 2 +- pkgs/core/python-setuptools/python-setuptools.nm | 2 +- pkgs/core/python-tornado/python-tornado.nm | 2 +- pkgs/core/python-urlgrabber/python-urlgrabber.nm | 2 +- pkgs/core/python/python.nm | 10 +- pkgs/core/qemu/qemu.nm | 3 +- pkgs/core/qt/qt.nm | 5 +- pkgs/core/quagga/quagga.nm | 4 +- pkgs/core/readline/readline.nm | 2 +- pkgs/core/reiser4progs/reiser4progs.nm | 6 +- pkgs/core/rrdtool/rrdtool.nm | 6 +- pkgs/core/samba/samba.nm | 6 +- pkgs/core/sane/sane.nm | 6 +- pkgs/core/screen/patches/screen-4.0.1-args.patch | 31 + pkgs/core/screen/patches/screen-4.0.2-maxstr.patch | 11 + .../core/screen/patches/screen-4.0.3-configh.patch | 20 + pkgs/core/screen/patches/screen-4.0.3-ipv6.patch | 323 ++ pkgs/core/screen/patches/screen-4.0.3-libs.patch | 50 + .../screen/patches/screen-4.0.3-screenrc.patch | 139 + .../core/screen/patches/screen-4.0.3-stropts.patch | 48 + pkgs/core/screen/screen.nm | 5 +- pkgs/core/sdl/sdl.nm | 5 +- pkgs/core/sg3-utils/sg3-utils.nm | 4 +- pkgs/core/shadow/shadow.nm | 4 - pkgs/core/sip/sip.nm | 4 +- pkgs/core/slang/slang.nm | 8 +- pkgs/core/sqlite/sqlite.nm | 4 +- pkgs/core/squashfs-tools/squashfs-tools.nm | 2 +- pkgs/core/squid/squid.nm | 2 +- pkgs/core/strace/strace.nm | 1 - pkgs/core/strongswan/strongswan.nm | 4 +- pkgs/core/sudo/sudo.nm | 3 +- pkgs/core/suricata/suricata.nm | 4 +- pkgs/core/sysfsutils/sysfsutils.nm | 2 + pkgs/core/syslinux/syslinux.nm | 2 +- pkgs/core/syslog-ng/ids-block | 62 - pkgs/core/syslog-ng/syslog-ng.conf | 3 - pkgs/core/syslog-ng/syslog-ng.nm | 11 +- pkgs/core/tar/tar.nm | 3 +- pkgs/core/tcpdump/tcpdump.nm | 2 +- pkgs/core/traceroute/traceroute.nm | 4 - pkgs/core/udev/udev.nm | 5 +- pkgs/core/udisks/udisks.nm | 7 +- pkgs/core/ulogd2/ulogd2.nm | 4 +- pkgs/core/upower/upower.nm | 8 +- pkgs/core/upstart/upstart.nm | 5 +- pkgs/core/usbutils/usbutils.nm | 3 +- pkgs/core/util-linux-ng/util-linux-ng.nm | 10 +- pkgs/core/vim/vim.nm | 6 +- pkgs/core/vlan/vlan.nm | 4 - pkgs/core/vsftpd/vsftpd.nm | 7 +- pkgs/core/wireless-tools/wireless-tools.nm | 2 + pkgs/core/xcb-proto/xcb-proto.nm | 2 +- pkgs/core/xfsprogs/xfsprogs.nm | 7 +- pkgs/core/xkeyboard-config/xkeyboard-config.nm | 4 +- pkgs/core/xorg-x11-drv-ati/xorg-x11-drv-ati.nm | 54 + pkgs/core/xorg-x11-drv-evdev/xorg-x11-drv-evdev.nm | 8 +- .../xorg-x11-drv-keyboard/xorg-x11-drv-keyboard.nm | 8 +- pkgs/core/xorg-x11-drv-mouse/xorg-x11-drv-mouse.nm | 8 +- pkgs/core/xorg-x11-drv-vesa/xorg-x11-drv-vesa.nm | 8 +- .../xorg-x11-drv-vmware/xorg-x11-drv-vmware.nm | 53 + .../xorg-x11-font-utils/xorg-x11-font-utils.nm | 6 +- .../patches/xserver-1.6.0-displayfd.patch | 172 - .../patches/xserver-1.6.1-nouveau.patch | 109 - pkgs/core/xorg-x11-server/xorg-x11-server.nm | 47 +- pkgs/core/xorg-x11-server/xorg.conf | 26 - pkgs/core/xorg-x11-xkb-utils/xorg-x11-xkb-utils.nm | 5 +- pkgs/core/xrandr/xrandr.nm | 49 + pkgs/core/zlib/zlib.nm | 2 - pkgs/toolchain/acl/acl.nm | 16 - pkgs/toolchain/attr/attr.nm | 24 - pkgs/toolchain/bash/bash.nm | 20 - pkgs/toolchain/binutils-static/binutils-static.nm | 19 - pkgs/toolchain/binutils-static/patches | 1 - pkgs/toolchain/binutils/binutils.nm | 28 - .../patches/binutils-2.19.1-asprintf_fix.patch | 16 - .../patches/binutils-2.19.1-ld_makefile.patch | 54 - .../patches/binutils-2.20-ipfire-ld-elf-1.patch | 15 - .../binutils/patches/binutils-2.20-objcopy.patch | 24 - .../binutils/patches/binutils-2.20-pt_pax-1.patch | 411 -- ...ls-2.20.1-all_dobumen-new-dtags-behaviour.patch | 16 - .../binutils-2.20.1-gentoo-flexible-tests.patch | 82 - ...binutils-2.20.1-gentoo-rpath_envvar-smack.patch | 13 - .../binutils-2.20.1-gentoo-use-new-ld-dtags.patch | 10 - .../patches/binutils-2.20.1-gentoo-use-relro.patch | 9 - .../binutils-2.20.1-gentoo-warn-textrel.patch | 85 - .../patches/binutils-2.20.51.0.2-build-id.patch | 51 - pkgs/toolchain/bzip2/bzip2.nm | 14 - pkgs/toolchain/ccache/ccache.nm | 20 - pkgs/toolchain/coreutils/coreutils.nm | 24 - .../coreutils/patches/coreutils-8.5-i18n.patch | 4048 -------------------- pkgs/toolchain/cpio/cpio.nm | 14 - pkgs/toolchain/diffutils/diffutils.nm | 12 - .../patches/diffutils-2.8.1-hardened_tmp-1.patch | 31 - .../diffutils/patches/diffutils-2.9-i18n-1.patch | 768 ---- pkgs/toolchain/file/file.nm | 17 - pkgs/toolchain/findutils/findutils.nm | 17 - pkgs/toolchain/gawk/gawk.nm | 14 - pkgs/toolchain/gcc-static/gcc-static.nm | 61 - .../patches/gcc-4.4-optimize_linking.patch | 24 - .../patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch | 26 - .../patches/gcc-4.5.0-piepatches-20100421.patch | 1056 ----- pkgs/toolchain/gcc/gcc.nm | 50 - pkgs/toolchain/gcc/include-append | 5 - .../gcc/patches/gcc-4.4-optimize_linking.patch | 24 - .../patches/gcc-4.4.1-branch-startfiles-1.patch | 26 - .../patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch | 26 - .../patches/gcc-4.5.0-piepatches-20100421.patch | 1056 ----- pkgs/toolchain/gettext/gettext.nm | 20 - pkgs/toolchain/glibc/glibc-stack_chk_fail.c | 1 - pkgs/toolchain/glibc/glibc.nm | 43 - pkgs/toolchain/glibc/patches | 1 - pkgs/toolchain/grep/grep.nm | 14 - pkgs/toolchain/gzip/gzip.nm | 19 - .../patches/gzip-1.3.13-cve-2006-4337_len.patch | 15 - .../gzip/patches/gzip-1.3.13-cve-2006-4338.patch | 33 - .../gzip/patches/gzip-1.3.13-openbsd-owl-tmp.patch | 47 - pkgs/toolchain/kernel-headers/kernel-headers.nm | 10 - pkgs/toolchain/m4/m4.nm | 14 - pkgs/toolchain/m4/patches | 1 - pkgs/toolchain/make/make.nm | 12 - pkgs/toolchain/make/patches | 1 - pkgs/toolchain/ncurses/ncurses.nm | 26 - pkgs/toolchain/patch/patch.nm | 16 - .../patch/patches/patch-2.5.4-sigsegv.patch | 42 - .../perl/patches/perl-5.10.1-libc-1.patch | 31 - .../perl/patches/perl-5.10.1-libresolv.patch | 12 - .../perl/patches/perl-5.10.1-rpath-make.patch | 32 - pkgs/toolchain/perl/perl.nm | 27 - pkgs/toolchain/sed/sed.nm | 13 - .../tar/patches/tar-1.22-vfatTruncate.patch | 29 - pkgs/toolchain/tar/patches/tar-1.23-xattrs.patch | 1574 -------- pkgs/toolchain/tar/tar.nm | 12 - pkgs/toolchain/texinfo/texinfo.nm | 12 - pkgs/toolchain/xz/xz.nm | 17 - src/bootloader/installer.conf | 8 +- tools/chroot-shell | 5 +- tools/common-functions | 167 +- tools/compressor | 231 -- tools/decompressor | 2 +- tools/functions-common | 14 + tools/functions-constants | 20 + tools/functions-directories | 24 + tools/functions-files | 195 + tools/functions-lists | 22 + tools/functions-logging | 12 + tools/functions-packager-find | 150 + tools/generator | 115 +- tools/packager | 229 ++ tools/patch | 4 +- tools/quality-agent.d/050-canary | 4 +- tools/quality-agent.d/050-execstacks | 4 +- tools/quality-agent.d/050-invalid-interpreters | 44 + tools/quality-agent.d/050-libs-needed | 8 +- tools/quality-agent.d/050-libs-soname | 8 +- tools/quality-agent.d/050-nx | 4 +- tools/quality-agent.d/050-relro | 12 +- tools/quality-agent.d/050-root-links-to-usr | 2 +- tools/quality-agent.d/050-rpaths | 4 +- tools/quality-agent.d/qa-functions | 1 - tools/quality-agent.d/qa-include | 18 +- 392 files changed, 5815 insertions(+), 13354 deletions(-) create mode 100644 naoki/architectures.py delete mode 100644 naoki/backend.py create mode 100644 naoki/build.py delete mode 100644 naoki/chroot.py create mode 100644 naoki/decorators.py create mode 100644 naoki/dependencies.py create mode 100644 naoki/environ.py create mode 100644 naoki/generators.py copy {pkgs/core/pakfire/src/python => naoki}/io.py (100%) create mode 100644 naoki/mail.py create mode 100644 naoki/packages.py create mode 100644 naoki/repositories.py create mode 100644 pkgs/Templates create mode 100644 pkgs/core/curl/patches/curl-7.20.0-lrt.patch create mode 100644 pkgs/core/expect/patches/expect-5.38.0-lib-spec.patch create mode 100644 pkgs/core/expect/patches/expect-5.39.0-libdir.patch create mode 100644 pkgs/core/expect/patches/expect-5.43.0-override_default_prefix.patch create mode 100644 pkgs/core/expect/patches/expect-5.43.0-spawn-1.patch create mode 100644 pkgs/core/expect/patches/expect-5.43.0-tcl_8.5.8_fix-1.patch delete mode 100644 pkgs/core/expect/patches/expect-5.44.1.15-no_tk-1.patch create mode 100644 pkgs/core/gcc/patches/gcc-4.5.0-no-add-needed.patch create mode 100644 pkgs/core/gobject-introspection/gobject-introspection.nm delete mode 100644 pkgs/core/gobject-introspection/gobject-introspection.nm.off delete mode 100644 pkgs/core/kernel-headers/kernel-headers.nm delete mode 120000 pkgs/core/kernel-headers/patches create mode 100644 pkgs/core/libICE/libICE.nm create mode 100644 pkgs/core/libSM/libSM.nm create mode 100644 pkgs/core/libXdamage/libXdamage.nm create mode 100644 pkgs/core/libXdmcp/libXdmcp.nm create mode 100644 pkgs/core/libXfixes/libXfixes.nm create mode 100644 pkgs/core/libXmu/libXmu.nm create mode 100644 pkgs/core/libXrandr/libXrandr.nm create mode 100644 pkgs/core/libXrandr/patches/libXrandr-1.3.0-fixes.patch create mode 100644 pkgs/core/libXrender/libXrender.nm create mode 100644 pkgs/core/libXres/libXres.nm create mode 100644 pkgs/core/libXt/libXt.nm create mode 100644 pkgs/core/libXt/patches/libXt-1.0.7-libsm-fix.patch create mode 100644 pkgs/core/libXxf86vm/libXxf86vm.nm create mode 100644 pkgs/core/libdrm/91-drm-modeset.rules create mode 100644 pkgs/core/libdrm/libdrm.nm create mode 100644 pkgs/core/libdrm/patches/libdrm-2.4.0-no-bc.patch create mode 100644 pkgs/core/libdrm/patches/libdrm-2.4.21-b803918f3f.patch create mode 100644 pkgs/core/libdrm/patches/libdrm-make-dri-perms-okay.patch create mode 100644 pkgs/core/libgcrypt/patches/libgcrypt-1.4.5-ImplicitDSOLinking.patch create mode 100644 pkgs/core/mesa/mesa.nm create mode 100644 pkgs/core/screen/patches/screen-4.0.1-args.patch create mode 100644 pkgs/core/screen/patches/screen-4.0.2-maxstr.patch create mode 100644 pkgs/core/screen/patches/screen-4.0.3-configh.patch create mode 100644 pkgs/core/screen/patches/screen-4.0.3-ipv6.patch create mode 100644 pkgs/core/screen/patches/screen-4.0.3-libs.patch create mode 100644 pkgs/core/screen/patches/screen-4.0.3-screenrc.patch create mode 100644 pkgs/core/screen/patches/screen-4.0.3-stropts.patch delete mode 100644 pkgs/core/syslog-ng/ids-block create mode 100644 pkgs/core/xorg-x11-drv-ati/xorg-x11-drv-ati.nm create mode 100644 pkgs/core/xorg-x11-drv-vmware/xorg-x11-drv-vmware.nm delete mode 100644 pkgs/core/xorg-x11-server/patches/xserver-1.6.0-displayfd.patch delete mode 100644 pkgs/core/xorg-x11-server/patches/xserver-1.6.1-nouveau.patch delete mode 100644 pkgs/core/xorg-x11-server/xorg.conf create mode 100644 pkgs/core/xrandr/xrandr.nm delete mode 100644 pkgs/toolchain/acl/acl.nm delete mode 100644 pkgs/toolchain/attr/attr.nm delete mode 100644 pkgs/toolchain/bash/bash.nm delete mode 100644 pkgs/toolchain/binutils-static/binutils-static.nm delete mode 120000 pkgs/toolchain/binutils-static/patches delete mode 100644 pkgs/toolchain/binutils/binutils.nm delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.19.1-asprintf_fix.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.19.1-ld_makefile.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20-ipfire-ld-elf-1.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20-objcopy.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20-pt_pax-1.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20.1-all_dobumen-new-dtags-behaviour.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-flexible-tests.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-rpath_envvar-smack.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-use-new-ld-dtags.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-use-relro.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-warn-textrel.patch delete mode 100644 pkgs/toolchain/binutils/patches/binutils-2.20.51.0.2-build-id.patch delete mode 100644 pkgs/toolchain/bzip2/bzip2.nm delete mode 100644 pkgs/toolchain/ccache/ccache.nm delete mode 100644 pkgs/toolchain/coreutils/coreutils.nm delete mode 100644 pkgs/toolchain/coreutils/patches/coreutils-8.5-i18n.patch delete mode 100644 pkgs/toolchain/cpio/cpio.nm delete mode 100644 pkgs/toolchain/diffutils/diffutils.nm delete mode 100644 pkgs/toolchain/diffutils/patches/diffutils-2.8.1-hardened_tmp-1.patch delete mode 100644 pkgs/toolchain/diffutils/patches/diffutils-2.9-i18n-1.patch delete mode 100644 pkgs/toolchain/file/file.nm delete mode 100644 pkgs/toolchain/findutils/findutils.nm delete mode 100644 pkgs/toolchain/gawk/gawk.nm delete mode 100644 pkgs/toolchain/gcc-static/gcc-static.nm delete mode 100644 pkgs/toolchain/gcc-static/patches/gcc-4.4-optimize_linking.patch delete mode 100644 pkgs/toolchain/gcc-static/patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch delete mode 100644 pkgs/toolchain/gcc-static/patches/gcc-4.5.0-piepatches-20100421.patch delete mode 100644 pkgs/toolchain/gcc/gcc.nm delete mode 100644 pkgs/toolchain/gcc/include-append delete mode 100644 pkgs/toolchain/gcc/patches/gcc-4.4-optimize_linking.patch delete mode 100644 pkgs/toolchain/gcc/patches/gcc-4.4.1-branch-startfiles-1.patch delete mode 100644 pkgs/toolchain/gcc/patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch delete mode 100644 pkgs/toolchain/gcc/patches/gcc-4.5.0-piepatches-20100421.patch delete mode 100644 pkgs/toolchain/gettext/gettext.nm delete mode 120000 pkgs/toolchain/glibc/glibc-stack_chk_fail.c delete mode 100644 pkgs/toolchain/glibc/glibc.nm delete mode 120000 pkgs/toolchain/glibc/patches delete mode 100644 pkgs/toolchain/grep/grep.nm delete mode 100644 pkgs/toolchain/gzip/gzip.nm delete mode 100644 pkgs/toolchain/gzip/patches/gzip-1.3.13-cve-2006-4337_len.patch delete mode 100644 pkgs/toolchain/gzip/patches/gzip-1.3.13-cve-2006-4338.patch delete mode 100644 pkgs/toolchain/gzip/patches/gzip-1.3.13-openbsd-owl-tmp.patch delete mode 100644 pkgs/toolchain/kernel-headers/kernel-headers.nm delete mode 100644 pkgs/toolchain/m4/m4.nm delete mode 120000 pkgs/toolchain/m4/patches delete mode 100644 pkgs/toolchain/make/make.nm delete mode 120000 pkgs/toolchain/make/patches delete mode 100644 pkgs/toolchain/ncurses/ncurses.nm delete mode 100644 pkgs/toolchain/patch/patch.nm delete mode 100644 pkgs/toolchain/patch/patches/patch-2.5.4-sigsegv.patch delete mode 100644 pkgs/toolchain/perl/patches/perl-5.10.1-libc-1.patch delete mode 100644 pkgs/toolchain/perl/patches/perl-5.10.1-libresolv.patch delete mode 100644 pkgs/toolchain/perl/patches/perl-5.10.1-rpath-make.patch delete mode 100644 pkgs/toolchain/perl/perl.nm delete mode 100644 pkgs/toolchain/sed/sed.nm delete mode 100644 pkgs/toolchain/tar/patches/tar-1.22-vfatTruncate.patch delete mode 100644 pkgs/toolchain/tar/patches/tar-1.23-xattrs.patch delete mode 100644 pkgs/toolchain/tar/tar.nm delete mode 100644 pkgs/toolchain/texinfo/texinfo.nm delete mode 100644 pkgs/toolchain/xz/xz.nm mode change 100644 => 120000 tools/common-functions delete mode 100755 tools/compressor create mode 100644 tools/functions-common create mode 100644 tools/functions-constants create mode 100644 tools/functions-directories create mode 100644 tools/functions-files create mode 100644 tools/functions-lists create mode 100644 tools/functions-logging create mode 100644 tools/functions-packager-find create mode 100755 tools/packager create mode 100755 tools/quality-agent.d/050-invalid-interpreters delete mode 120000 tools/quality-agent.d/qa-functions
Difference in files: diff --git a/config/architectures.conf b/config/architectures.conf index 22b65e4..e01a008 100644 --- a/config/architectures.conf +++ b/config/architectures.conf @@ -1,3 +1,7 @@ +[default] + +; The default architecture +default = i686
[i686]
diff --git a/naoki/__init__.py b/naoki/__init__.py index d513cd1..a70a057 100644 --- a/naoki/__init__.py +++ b/naoki/__init__.py @@ -7,9 +7,12 @@ import random import sys import time
-import backend -import chroot +import architectures +import build +import environ +import generators import logger +import repositories import terminal import util
@@ -41,102 +44,43 @@ class Naoki(object):
actionmap = { "build" : self.call_build, - "toolchain" : self.call_toolchain, "package" : self.call_package, "source" : self.call_source, "shell" : self.call_shell, - "repository" : self.call_repository, "generate" : self.call_generate, "batch" : self.call_batch, }
return actionmap[args.action.name](args.action)
- def call_toolchain(self, args): - if not args.has_key("action"): - self.cli.help() - return 1 + def _get_source_repos(self, arch=None): + if not arch: + arches = architectures.Architectures() + arch = arches.get_default()
- actionmap = { - "build" : self.call_toolchain_build, - "download" : self.call_toolchain_download, - "tree" : self.call_toolchain_tree, - } - - return actionmap[args.action.name](args.action) - - def call_toolchain_build(self, args): - toolchain = chroot.Toolchain(arches.current["name"]) - - return toolchain.build(naoki=self) - - def call_toolchain_download(self, args): - toolchain = chroot.Toolchain(arches.current["name"]) - - return toolchain.download() - - def call_toolchain_tree(self, args): - print backend.deptree(backend.parse_package(backend.get_package_names(toolchain=True), toolchain=True, naoki=self)) + return repositories.SourceRepositories(arch=arch)
def call_build(self, args): - force = True - - if args.packages == ["all"]: - force = False - package_names = backend.get_package_names() - else: - package_names = args.packages - - packages = [] - for package in backend.parse_package(package_names, naoki=self): - if not force and package.built: - self.log.warn("Skipping %s which was already built" % package.name) - continue + # Source repository + repo = self._get_source_repos()
- if not args.onlydeps: - packages.append(package) - - if args.withdeps or args.onlydeps: - deps = [] - for dep in package.dependencies_all: - if not dep.built: - deps.append(dep.name) - - packages.extend(backend.parse_package(deps, naoki=self)) - - if len(packages) >= 2: - packages_sorted = backend.depsort(packages) - if packages_sorted != packages: - self.log.warn("Packages were resorted for build: %s" % packages_sorted) - packages = packages_sorted - - for i in range(0, len(packages)): - package = packages[i] - if not package.buildable: - for dep in package.dependencies_unbuilt: - if not dep in packages[:i]: - self.log.error("%s is currently not buildable" % package.name) - self.log.error(" The package requires these packages to be built first: %s" \ - % [dep.name for dep in package.dependencies_unbuilt]) - return - - self.log.info("Going on to build %d packages in order: %s" \ - % (len(packages), [package.name for package in packages])) - - for package in packages: - environ = package.getEnvironment() - - if not environ.toolchain.exists: - self.log.error("You need to build or download a toolchain first.") - continue + # Initialize job queue + jobs = build.Jobs()
- if args.shell: - environ.init(clean=False) - return environ.shell([]) + if args.all: + raise Exception, "XXX to be implemented" + else: + for name in args.packages: + p = repo.find_package_by_name(name) + if not p: + raise Exception, "Could not find package: %s" % name
- environ.init() + p = build.Build(p) + jobs.add(p)
- environ.build() + #return builder.run(ignore_dependency_errors=args.ignore_dependency_errors) + while jobs.has_jobs: + jobs.process_next()
def call_package(self, args): if not args.has_key("action"): @@ -146,30 +90,16 @@ class Naoki(object): actionmap = { "info" : self.call_package_info, "list" : self.call_package_list, - "tree" : self.call_package_tree, "groups" : self.call_package_groups, }
return actionmap[args.action.name](args.action)
def call_package_info(self, args): - for package in backend.parse_package_info(args.packages): - if args.wiki: - print package.fmtstr("""\ -====== %(name)s ====== -| **Version:** | %(version)s | -| **Release:** | %(release)s | -| **Group:** | %(group)s | -| **License:** | %(license)s | -| **Maintainer:** | %(maintainer)s | -| **Dependencies:** | %(deps)s | -| **Build dependencies:** | %(build_deps)s | -| %(summary)s || -| %(description)s || -| **Website:** | %(url)s | -""") - continue + # Source repositories + repo = self._get_source_repos()
+ for package in repo.packages: if args.long: print package.fmtstr("""\ -------------------------------------------------------------------------------- @@ -202,13 +132,15 @@ Release : %(release)s """)
def call_package_list(self, args): - for package in backend.parse_package_info(backend.get_package_names()): + repo = self._get_source_repos() + + for package in repo.packages: # Skip unbuilt packages if we want built packages - if args.built and not package.built: + if args.built and not package.is_built: continue
# Skip built packages if we want unbuilt only - if args.unbuilt and package.built: + if args.unbuilt and package.is_built: continue
if args.long: @@ -216,23 +148,11 @@ Release : %(release)s else: print package.name
- def call_package_tree(self, args): - print backend.deptree(backend.parse_package(backend.get_package_names(), naoki=self)) - def call_package_groups(self, args): - groups = backend.get_group_names() - if args.wiki: - print "====== All available groups of packages ======" - for group in groups: - print "===== %s =====" % group - for package in backend.parse_package_info(backend.get_package_names()): - if not package.group == group: - continue - - print package.fmtstr(" * [[.package:%(name)s|%(name)s]] - %(summary)s") - - else: - print "\n".join(groups) + # XXX + #groups = backend.get_group_names() + #print "\n".join(groups) + pass
def call_source(self, args): if not args.has_key("action"): @@ -242,88 +162,50 @@ Release : %(release)s actionmap = { "download" : self.call_source_download, "upload" : self.call_source_upload, - "clean" : self.call_source_clean, }
return actionmap[args.action.name](args.action)
def call_source_download(self, args): - for package in backend.parse_package(args.packages or \ - backend.get_package_names(), naoki=self): - package.download() + repo = self._get_source_repos()
- def call_source_upload(self, args): - pass # TODO + for package in repo.packages: + if args.packages: + if not package.name in args.packages: + continue
- def call_source_clean(self, args): - self.log.info("Remove all unused files") - files = os.listdir(TARBALLDIR) - for package in backend.parse_package_info(backend.get_package_names()): - for object in package.objects: - if object in files: - files.remove(object) + package.source_download()
- for file in sorted(files): - self.log.info("Removing %s..." % file) - os.remove(os.path.join(TARBALLDIR, file)) + def call_source_upload(self, args): + pass # TODO
def call_shell(self, args): - environ = chroot.ShellEnvironment(naoki=self) - - actionmap = { - "clean" : self.call_shell_clean, - "extract" : self.call_shell_extract, - "enter" : self.call_shell_enter, - } + # Load architecture set + arches = architectures.Architectures()
- if args.action.name in ("enter", "execute"): - environ.init(clean=False) + # Choose default architecture + arch = arches.get_default()
- return actionmap[args.action.name](environ, args.action) + # Load all source packages + repo = repositories.SourceRepositories(arch=arch)
- def call_shell_clean(self, environ, args): - return environ.clean() + # Pick the one we need + p = repo.find_package_by_name(args.package) + if not p: + raise Exception, "Could not find package: %s" % args.package
- def call_shell_extract(self, environ, args): - if args.packages == ["all"]: - args.packages = backend.get_package_names() + # Initialize and run the shell + shell = build.PackageShell(p)
- packages = backend.parse_package(args.packages, naoki=self) - for package in backend.depsolve(packages, recursive=True): - package.getPackage(self).extract(environ.chrootPath()) - - def call_shell_enter(self, environ, args): - return environ.shell() - - def call_repository(self, args): - actionmap = { - "clean" : self.call_repository_clean, - "build" : self.call_repository_build, - } - - return actionmap[args.action.name](args.action) - - def call_repository_clean(self, repo, args): - if args.names == ["all"]: - args.names = [r.name for r in backend.get_repositories()] - - for name in args.names: - repo = backend.BinaryRepository(name, naoki=self) - repo.clean() - - def call_repository_build(self, args): - if args.names == ["all"]: - args.names = [r.name for r in backend.get_repositories()] - - for name in args.names: - repo = backend.BinaryRepository(name, naoki=self) - repo.build() + return shell.shell()
def call_generate(self, args): if not args.type in ("iso",): return
- gen = chroot.Generator(self, arches.current, args.type) + arch = architectures.Architectures().get_default() + + gen = generators.Generator(args.type, arch) return gen.run()
def call_batch(self, args): @@ -345,31 +227,35 @@ Release : %(release)s return actionmap[args.action.name](args.action)
def call_batch_cron(self, args): - packages = [] - packages_may = [] - for package in backend.parse_package_info(backend.get_package_names()): - if not package.built and package.buildable: - packages.append(package) - continue + pkgs = [] + candidates = []
- # If package was altered since last build - if package.last_change >= package.last_build: - packages.append(package) - continue - - if package.buildable: - packages_may.append(package) - - packages_may = sorted(packages_may, key=lambda p: p.last_build) + # Choose architecture + arches = architectures.Architectures() + arch = arches.get_default()
- while len(packages) < 10 and packages_may: - package = packages_may.pop(0) - packages.append(package) - - # Bad hack because we lack a _build method - args.packages = [p.name for p in packages] - args.onlydeps = False - args.withdeps = False - args.shell = False - - self.call_build(args) + repo = repositories.SourceRepositories(arch=arch) + for package in repo.packages: + if not package.is_built: + pkgs.append(package) + else: + candidates.append(package) + + # Initialize a job queue + jobs = build.Jobs() + + # Add all unbuilt packages to the job queue + for package in pkgs: + package = build.Build(package) + jobs.add(package) + + # If we have less than ten packages in the queue we add some random + # ones + need_counter = 10 - len(jobs) + if need_counter >= 0: + for candidate in random.sample(candidates, need_counter): + candidate = build.Build(candidate) + jobs.add(candidate) + + while jobs.has_jobs: + jobs.process_next() diff --git a/naoki/architectures.py b/naoki/architectures.py new file mode 100644 index 0000000..ec9b857 --- /dev/null +++ b/naoki/architectures.py @@ -0,0 +1,136 @@ +#!/usr/bin/python + +import logging +import os.path + +from ConfigParser import ConfigParser, DEFAULTSECT + +from constants import * +from decorators import * + +class Architecture(object): + def __init__(self, name, **settings): + + self._settings = { + "default" : False, + "name" : name, + } + self._settings.update(settings) + + logging.debug("Set up new architecture: %s" % self._settings) + + def __repr__(self): + s = "<%s %s" % (self.__class__.__name__, self._settings["name"]) + if self.default: + s += " (default)" + s += ">" + return s + + @property + def buildable(self): + """ Check if this architecture is buildable on the local host""" + + return True # TODO + + def get_default(self): + return self._settings["default"] + + def set_default(self, value): + self._settings["default"] = value + + default = property(get_default, set_default) + + def __getattr__(self, attr): + try: + return self._settings[attr] + except KeyError: + raise AttributeError, attr + + +@singleton +class Architectures(object): + def __init__(self): + self._architectures = [] + + # Try to read the default architectures + self.read(ARCHES_DEFAULT) + + def read(self, filename): + logging.debug("Reading architectures from %s" % filename) + + if not os.path.exists(filename): + return + + p = ConfigParser() + p.read(filename) + + default = {} + + for arch in p.sections(): + if arch == "default": + default = p.items(arch) + continue + + settings = {} + for key, val in p.items(arch): + settings[key] = val + + a = Architecture(arch, **settings) + self.add_architecture(a) + + for key, val in default: + if key == "default": + self.default = val + + def add_architecture(self, arch): + assert isinstance(arch, Architecture) + + self._architectures.append(arch) + + def get_default(self): + for a in self._architectures: + if a.default: + return a + + raise Exception, "Cannot find default architecture" + + def set_default(self, arch): + if arch is None: + return + + if not arch in [a.name for a in self.all]: + raise Exception, "Cannot set default architecture: Unknown architecture %s" % arch + + logging.debug("Setting default architecture: %s" % arch) + + for a in self._architectures: + if a.name == arch: + a.default = True + else: + a.default = False + + default = property(get_default, set_default) + + def get(self, name): + for arch in self._architectures: + if arch.name == name: + return arch + + raise Exception, "Could not find arch: %s" % name + + @property + def all(self): + return self._architectures[:] + + +if __name__ == "__main__": + arches = Architectures() + + for arch in arches.all: + print "Name: %s" % arch.name + for key, val in arch._settings.items(): + print " %-20s : %s" % (key, val) + + print arches.get("i686") + print arches.default + diff --git a/naoki/backend.py b/naoki/backend.py deleted file mode 100644 index afb7cd5..0000000 --- a/naoki/backend.py +++ /dev/null @@ -1,676 +0,0 @@ -#!/usr/bin/python - - -import os -import shutil -import smtplib -import urlgrabber -import urlgrabber.progress -import urllib - -import chroot -import util - -from exception import * -from constants import * - -__cache = { - "package_names" : None, - "group_names" : None, -} - -# Python 2.4 does not have that email module, so -# we disable the mail function here. -try: - import email.mime.multipart - import email.mime.text - have_email = 1 -except ImportError: - have_email = 0 - -try: - import hashlib - have_hashlib = 1 -except ImportError: - import sha - have_hashlib = 0 - -def find_package_info(name, toolchain=False, **kwargs): - for repo in get_repositories(toolchain): - if not os.path.exists(os.path.join(repo.path, name, name + ".nm")): - continue - - return PackageInfo(name, repo=repo, **kwargs) - -def find_package(name, naoki, toolchain=False): - package = find_package_info(name, toolchain) - if package: - return package.getPackage(naoki) - - return None - -def parse_package_info(names, toolchain=False, **kwargs): - packages = [] - for name in names: - package = find_package_info(name, toolchain, **kwargs) - if package: - packages.append(package) - - return packages - -def parse_package(names, toolchain=False, naoki=None): - packages = parse_package_info(names, toolchain) - - return [Package(package.name, naoki=naoki, toolchain=toolchain) \ - for package in packages] - -def get_package_names(toolchain=False): - if not __cache["package_names"]: - names = [] - for repo in get_repositories(toolchain): - names.extend(repo.package_names) - - __cache["package_names"] = sorted(names) - - return __cache["package_names"] - -def get_group_names(): - if not __cache["group_names"]: - groups = [] - for package in parse_package_info(get_package_names()): - if not package.group in groups: - groups.append(package.group) - - __cache["group_names"] = sorted(groups) - - return __cache["group_names"] - -def find_package_name(name, toolchain=False): - if name in get_package_names(toolchain): - return name - - for package in get_package_names(toolchain): - if os.path.basename(package) == name: - return package - -def depsolve(packages, recursive=False, build=False, toolchain=False): - deps = [] - for package in packages: - if not package in deps: - deps.append(package) - - if not recursive or not deps: - return deps - - while True: - length = len(deps) - for dep in deps[:]: - deps.extend(dep.dependencies) - if build and not toolchain: - deps.extend(dep.dependencies_build) - - new_deps = [] - for dep in deps: - if not dep in new_deps: - new_deps.append(dep) - - deps = new_deps - - if length == len(deps): - break - - deps.sort() - return deps - -def deptree(packages, toolchain=False): - ret = [packages] - - while True: - next = [] - stage = ret[-1][:] - for package in stage[:]: - for dep in package.dependencies_all: - if dep in ret[-1]: - stage.remove(package) - next.append(package) - break - - ret[-1] = stage - if next: - ret.append(next) - continue - - break - - return ret - -def depsort(packages, toolchain=False): - ret = [] - for l1 in deptree(packages, toolchain=toolchain): - ret.extend(l1) - return ret - -def calc_hash(data): - if have_hashlib: - obj = hashlib.sha1(data) - else: - obj = sha.new(data) - - return obj.hexdigest() - -def download(files, logger=None): - for file in files: - filepath = os.path.join(TARBALLDIR, file) - - if not os.path.exists(TARBALLDIR): - os.makedirs(TARBALLDIR) - - if os.path.exists(filepath): - continue - - url = config["sources_download_url"] + "/" + file - - if logger: - logger.debug("Retrieving %s" % url) - - g = urlgrabber.grabber.URLGrabber( - user_agent = "%sSourceGrabber/%s" % (config["distro_name"], config["distro_version"],), - progress_obj = urlgrabber.progress.TextMeter(), - quote=0, - ) - - try: - gobj = g.urlopen(url) - except urlgrabber.grabber.URLGrabError, e: - if logger: - logger.error("Could not retrieve %s - %s" % (url, e)) - raise - - data = gobj.read() - gobj.close() - - if gobj.hdr.has_key("X-Hash-Sha1"): - hash_server = gobj.hdr["X-Hash-Sha1"] - msg = "Comparing hashes - %s" % hash_server - - hash_calculated = calc_hash(data) - if hash_calculated == hash_server: - if logger: - logger.debug(msg + " - OK") - else: - if logger: - logger.error(msg + " - ERROR") - raise DownloadError, "Hash sum of downloaded file does not match" - - fobj = open(filepath, "w") - fobj.write(data) - fobj.close() - - -class PackageInfo(object): - __data = {} - - def __init__(self, name, repo=None, arch=arches.current["name"]): - self._name = name - self.repo = repo - - self.arch = arch - - def __cmp__(self, other): - return cmp(self.name, other.name) - - def __repr__(self): - return "<PackageInfo %s>" % self.name - - def get_data(self): - if not self.__data.has_key(self.name): - self.__data[self.name] = self.fetch() - - return self.__data[self.name] - - def set_data(self, data): - self.__data[self.name] = data - - _data = property(get_data, set_data) - - def fetch(self): - env = os.environ.copy() - env.update(config.environment) - env.update({ - "PKG_ARCH" : self.arch, - "PKGROOT" : PKGSDIR, - }) - output = util.do("make -f %s" % self.filename, shell=True, - cwd=os.path.join(PKGSDIR, self.repo.name, self.name), returnOutput=1, env=env) - - ret = {} - for line in output.splitlines(): - a = line.split("=", 1) - if not len(a) == 2: continue - key, val = a - ret[key] = val.strip(""") - - ret["FINGERPRINT"] = self.fingerprint - - return ret - - def fmtstr(self, s): - return s % self.all - - def getPackage(self, naoki): - return Package(self.name, naoki) - - @property - def all(self): - return { - "build_deps" : [dep.name for dep in self.dependencies_build], - "deps" : [dep.name for dep in self.dependencies], - "description" : self.description, - "filename" : self.filename, - "fingerprint" : self.fingerprint, - "files" : self.package_files, - "group" : self.group, - "id" : self.id, - "license" : self.license, - "maintainer" : self.maintainer, - "name" : self.name, - "objects" : self.objects, - "patches" : self.patches, - "release" : self.release, - "summary" : self.summary, - "url" : self.url, - "version" : self.version, - } - - @property - def buildable(self): - return self.dependencies_unbuilt == [] - - @property - def built(self): - for file in self.package_files: - if not os.path.exists(os.path.join(PACKAGESDIR, file)): - return False - - return True - - def _dependencies(self, s, recursive=False, toolchain=False): - c = s + "_CACHE" - if not self._data.has_key(c): - deps = parse_package_info(self._data.get(s).split(" "), toolchain=toolchain) - self._data.update({c : depsolve(deps, recursive)}) - - return self._data.get(c) - - @property - def dependencies(self): - if self.__toolchain: - return self.dependencies_toolchain - - return self._dependencies("PKG_DEPENDENCIES") - - @property - def dependencies_build(self): - return self._dependencies("PKG_BUILD_DEPENDENCIES") - - @property - def dependencies_built(self): - ret = [] - for dep in self.dependencies_all: - if dep.built: - ret.append(dep) - - return ret - - @property - def dependencies_unbuilt(self): - ret = [] - for dep in self.dependencies_all: - if not dep.built: - ret.append(dep) - - return ret - - @property - def dependencies_all(self): - deps = self.dependencies - if not self.__toolchain: - deps.extend(self.dependencies_build) - return depsolve(deps, build=True, recursive=True, toolchain=self.__toolchain) - - @property - def dependencies_toolchain(self): - return self._dependencies("PKG_TOOLCHAIN_DEPENDENCIES", toolchain=True) - - @property - def dependencies_reversed(self): - deps = [] - for package in parse_package_info(get_package_names()): - if self.name in [dep.name for dep in package.dependencies]: - deps.append(package.name) - - return deps - - @property - def description(self): - return self._data.get("PKG_DESCRIPTION") - - @property - def filename(self): - return os.path.join(PKGSDIR, self.repo.name, self.name, - os.path.basename(self.name)) + ".nm" - - @property - def fingerprint(self): - return "%d" % self.last_change - - @property - def group(self): - return self._data.get("PKG_GROUP") - - @property - def id(self): - return "%s-%s-%s" % (self.name, self.version, self.release) - - @property - def last_build(self): - file = os.path.join(PACKAGESDIR, self.package_files[0]) - if not os.path.exists(file): - return 0 - - return os.stat(file).st_mtime - - @property - def last_change(self): - return os.stat(self.filename).st_mtime - - @property - def license(self): - return self._data.get("PKG_LICENSE") - - @property - def maintainer(self): - return self._data.get("PKG_MAINTAINER") - - @property - def name(self): - return self._name - - @property - def objects(self): - return self._data.get("PKG_OBJECTS").split(" ") - - @property - def package_files(self): - return self._data.get("PKG_PACKAGES_FILES").split(" ") - - @property - def patches(self): - return self._data.get("PKG_PATCHES").split(" ") - - @property - def release(self): - return self._data.get("PKG_REL") - - @property - def summary(self): - return self._data.get("PKG_SUMMARY") - - @property - def url(self): - return self._data.get("PKG_URL") - - @property - def version(self): - return self._data.get("PKG_VER") - - @property - def __toolchain(self): - return self.repo.name == "toolchain" - - -class Package(object): - def __init__(self, name, naoki, toolchain=False): - self.info = find_package_info(name, toolchain) - - assert naoki - self.naoki = naoki - - #self.log.debug("Initialized package object %s" % name) - - def __repr__(self): - return "<Package %s>" % self.info.name - - def __cmp__(self, other): - return cmp(self.name, other.name) - - def __getattr__(self, attr): - return getattr(self.info, attr) - - @property - def name(self): - return self.info.name - - def build(self): - environment = chroot.PackageEnvironment(self) - environment.build() - - def download(self): - download(self.info.objects, logger=self.log) - - def extract(self, dest): - files = [os.path.join(PACKAGESDIR, file) for file in self.info.package_files] - if not files: - return - - self.log.debug("Extracting %s..." % files) - util.do("%s --root=%s %s" % (os.path.join(TOOLSDIR, "decompressor"), - dest, " ".join(files)), shell=True, logger=self.log) - - def getEnvironment(self, *args, **kwargs): - return chroot.PackageEnvironment(self, *args, **kwargs) - - @property - def logfile(self): - return os.path.join(LOGDIR, self.repo.name, self.info.id) + ".log" - - @property - def log(self): - return self.naoki.logging.getBuildLogger(self) - - -def get_repositories(toolchain=False): - if toolchain: - return [Repository("toolchain")] - - repos = [] - for repo in os.listdir(PKGSDIR): - if os.path.isdir(os.path.join(PKGSDIR, repo)): - repos.append(repo) - - repos.remove("toolchain") - - return [Repository(repo) for repo in repos] - -class Repository(object): - def __init__(self, name): - self.name = name - - def __repr__(self): - return "<Repository %s>" % self.name - - @property - def packages(self): - packages = [] - for package in os.listdir(self.path): - package = PackageInfo(package, repo=self) - packages.append(package) - - return packages - - @property - def package_names(self): - return [package.name for package in self.packages] - - @property - def path(self): - return os.path.join(PKGSDIR, self.name) - - -class BinaryRepository(object): - DIRS = ("db", "packages") - - def __init__(self, name, naoki=None, arch=None): - self.name = name - self.arch = arch or arches.current - self.repo = Repository(self.name) - - assert naoki - self.naoki = naoki - - def build(self): - if not self.buildable: - raise Exception, "Cannot build repository" - - # Create temporary directory layout - util.rm(self.repopath("tmp")) - for dir in self.DIRS: - util.mkdir(self.repopath("tmp", dir)) - - # Copy packages - for package in self.packages: - for file in package.package_files: - shutil.copy(os.path.join(PACKAGESDIR, file), - self.repopath("tmp", "packages")) - - # TODO check repository's sanity - # TODO create repoview - f = open(self.repopath("tmp", "db", "package-list.txt"), "w") - for package in self.packages: - s = "%-40s" % package.fmtstr("%(name)s-%(version)s-%(release)s") - s += " | %s\n" % package.summary - f.write(s) - f.close() - - for dir in self.DIRS: - util.rm(self.repopath(dir)) - shutil.move(self.repopath("tmp", dir), self.repopath(dir)) - util.rm(self.repopath("tmp")) - - def clean(self): - if os.path.exists(self.path): - self.log.debug("Cleaning up repository: %s" % self.path) - util.rm(self.path) - - def repopath(self, *args): - return os.path.join(self.path, *args) - - @property - def buildable(self): - for package in self.packages: - if package.built: - continue - return False - - return True - - @property - def log(self): - return self.naoki.log - - @property - def packages(self): - packages = [] - for package in parse_package_info(get_package_names(), arch=self.arch["name"]): - if not package.repo.name == self.name: - continue - packages.append(package) - return packages - - @property - def path(self): - return os.path.join(REPOSDIR, self.name, self.arch["name"]) - -def report_error_by_mail(package): - log = package.naoki.log - - # Do not send a report if no recipient is configured - if not config["error_report_recipient"]: - return - - if not have_email: - log.error("Can't send mail because this python version does not support this") - return - - try: - connection = smtplib.SMTP(config["smtp_server"]) - #connection.set_debuglevel(1) - - if config["smtp_user"] and config["smtp_password"]: - connection.login(config["smtp_user"], config["smtp_password"]) - - except smtplib.SMTPConnectError, e: - log.error("Could not establish a connection to the smtp server: %s" % e) - return - except smtplib.SMTPAuthenticationError, e: - log.error("Could not successfully login to the smtp server: %s" % e) - return - - msg = email.mime.multipart.MIMEMultipart() - msg["From"] = config["error_report_sender"] - msg["To"] = config["error_report_recipient"] - msg["Subject"] = config["error_report_subject"] % package.all - msg.preamble = 'You will not see this in a MIME-aware mail reader.\n' - - body = """\ -The package %(name)s had a difficulty to build itself. -This email will give you a short report about the error. - -Package information: - Name : %(name)s - %(summary)s - Version : %(version)s - Release : %(release)s - - This package in maintained by %(maintainer)s. - - -A detailed logfile is attached. - -Sincerely, - Naoki - """ % package.all - - msg.attach(email.mime.text.MIMEText(body)) - - # Read log and append it to mail - loglines = [] - if os.path.exists(package.logfile): - f = open(package.logfile) - line = f.readline() - while line: - line = line.rstrip() - if line.endswith(LOG_MARKER): - # Reset log - loglines = [] - - loglines.append(line) - line = f.readline() - - f.close() - - if not loglines: - loglines = ["Logfile wasn't found."] - - log = email.mime.text.MIMEText("\n".join(loglines), _subtype="plain") - log.add_header('Content-Disposition', 'attachment', - filename="%s.log" % package.id) - msg.attach(log) - - try: - connection.sendmail(config["error_report_sender"], - config["error_report_recipient"], msg.as_string()) - except Exception, e: - log.error("Could not send error report: %s: %s" % (e.__class__.__name__, e)) - return - - connection.quit() diff --git a/naoki/build.py b/naoki/build.py new file mode 100644 index 0000000..befab33 --- /dev/null +++ b/naoki/build.py @@ -0,0 +1,107 @@ +#!/usr/bin/python + +import logging +import uuid + +import dependencies +import environ + +from constants import * +from exception import * + + +class Build(object): + def __init__(self, package): + self.package = package + + # Generate a random, but unique id + self.id = uuid.uuid4() + + # Create dependency set + self.dependency_set = dependencies.DependencySet(arch=self.arch) + + # Add all mandatory packages and build dependencies + deps = [dependencies.Dependency(p) for p in config["mandatory_packages"]] + deps += self.package.get_dependencies("build") + for package in deps: + self.dependency_set.add_dependency(package) + + self.settings = { + "ignore_dependency_errors" : False, + } + + def __repr__(self): + return "<%s %s-%s:%s>" % \ + (self.__class__.__name__, self.id, self.package.name, self.arch.name) + + @property + def arch(self): + return self.package.arch + + def build(self, **settings): + self.settings.update(settings) + + logging.info("Building: %s (%s)" % (self.package.id, self.id)) + logging.info("") + logging.info(" %s" % self.package.summary) + logging.info("") + + # Download the source tarballs + self.package.source_download() + + # Resolve the dependencies + try: + self.dependency_set.resolve() + except DependencyResolutionError, e: + if self.settings["ignore_dependency_errors"]: + logging.warning("Ignoring dependency errors: %s" % e) + else: + raise + + e = environ.Build(self.package) + + # Extract all tools + for package in self.dependency_set.packages: + e.extract(package) + + # Build :D + e.build() + + +class Jobs(object): + def __init__(self): + self.__jobs = [] + self.__error_jobs = [] + + logging.debug("Initialized jobs queue") + + def __len__(self): + return len(self.__jobs) + + def add(self, job): + assert isinstance(job, Build) + + self.__jobs.append(job) + + @property + def all(self): + return self.__jobs[:] + + @property + def has_jobs(self): + return self.__jobs != [] + + def process_next(self): + if not self.__jobs: + return + + job = self.__jobs[0] + + try: + job.build() + finally: + self.__jobs.remove(job) + + +class PackageShell(environ.Shell): + pass diff --git a/naoki/chroot.py b/naoki/chroot.py deleted file mode 100644 index e0c7ca5..0000000 --- a/naoki/chroot.py +++ /dev/null @@ -1,544 +0,0 @@ -#!/usr/bin/python - -import fcntl -import grp -import logging -import os -import random -import shutil -import stat -import time - -import backend -import util -from constants import * -from exception import * -from logger import getLog - -class Environment(object): - kernel_version = os.uname()[2] - - def __init__(self, naoki, arch=arches.current): - self.arch = arch - self.config = config - self.naoki = naoki - - self.initialized = False - self.__buildroot = None - - self.toolchain = Toolchain(self.arch["name"]) - - # Create initial directory that we can set the lock - util.mkdir(self.chrootPath()) - - # Lock environment. Throws exception if function cannot set the lock. - self.lock() - - def init(self, clean=True): - marker = self.chrootPath(".initialized") - self.log.debug("Initialize environment %s..." % self.chrootPath()) - - if clean: - self.clean() - - # If marker exists, we won't reinit again - if os.path.exists(marker): - return - - # create dirs - dirs = ( - CACHEDIR, - CCACHEDIR, - IMAGESDIR, - PACKAGESDIR, - self.chrootPath("bin"), - self.chrootPath("etc"), - self.chrootPath("lib"), - self.chrootPath("proc"), - self.chrootPath("root"), - self.chrootPath("sbin"), - self.chrootPath("sys"), - self.chrootPath("tmp"), - self.chrootPath("tools_%s" % self.arch["name"]), - self.chrootPath("usr/src/cache"), - self.chrootPath("usr/src/ccache"), - self.chrootPath("usr/src/images"), - self.chrootPath("usr/src/packages"), - self.chrootPath("usr/src/pkgs"), - self.chrootPath("usr/src/src"), - self.chrootPath("usr/src/tools"), - self.chrootPath("var/tmp"), - ) - for item in dirs: - util.mkdir(item) - - # touch files - files = ( - "etc/fstab", - "etc/mtab", - ) - for item in files: - util.touch(self.chrootPath(item)) - - self._setupDev() - self._setupUsers() - self._setupDns() - - self.toolchain.extract(self.chrootPath()) - - self.extractAll() - - self.toolchain.adjust(self.chrootPath()) - - # Set marker - util.touch(marker) - - @property - def buildroot(self): - if not self.__buildroot: - self.__buildroot = "buildroot.%s" % util.random_string() - - return self.__buildroot - - def lock(self): - self.log.debug("Trying to lock environment") - - try: - self._lock = open(self.chrootPath(".lock"), "a+") - except IOError, e: - return 0 - - try: - fcntl.lockf(self._lock.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB) - except IOError, e: - raise BuildRootLocked, "Environment is locked by another process" - - return 1 - - def clean(self): - if os.path.exists(self.chrootPath()): - util.rm(self.chrootPath()) - - @property - def environ(self): - env = config.environment.copy() - env.update({ - "HOME" : "/root", - "BASEDIR" : "/usr/src", - "PKGROOT" : "/usr/src/pkgs", - "TOOLS_DIR" : "/tools_%s" % self.arch["name"], - "TARGET" : "%s-ipfire-linux-gnu" % self.arch["machine"], - "TARGET_MACHINE" : self.arch["machine"], - "PATH" : CHROOT_PATH + ":/tools_%(arch)s/sbin:/tools_%(arch)s/bin" \ - % { "arch" : self.arch["name"], }, - "BUILDROOT" : "/%s" % self.buildroot, - "CHROOT" : "1", - "CFLAGS" : self.arch["cflags"], - "CXXFLAGS" : self.arch["cxxflags"], - "PKG_ARCH" : self.arch["name"], - }) - - ccache_path = os.path.join("tools_%s" % self.arch["name"], - "usr", "ccache", "bin") - if os.path.exists(self.chrootPath(ccache_path)): - env.update({ - "PATH" : "/%s:%s" % (ccache_path, env["PATH"]), - "CCACHE_COMPILERCHECK" : "none", - "CCACHE_COMPRESS" : "1", - "CCACHE_DIR" : "/usr/src/ccache", - }) - - return env - - def doChroot(self, command, shell=True, *args, **kwargs): - ret = None - try: - env = self.environ - - if kwargs.has_key("env"): - env.update(kwargs.pop("env")) - - self._mountall() - - if not kwargs.has_key("chrootPath"): - kwargs["chrootPath"] = self.chrootPath() - - ret = util.do(command, personality=self.arch["personality"], - shell=shell, env=env, logger=self.log, *args, **kwargs) - - finally: - self._umountall() - - return ret - - def chrootPath(self, *args): - raise NotImplementedError - - def _setupDev(self): - self.log.debug("Setting up /dev and /proc") - - # files in /dev - util.rm(self.chrootPath("dev")) - util.mkdir(self.chrootPath("dev", "pts")) - util.mkdir(self.chrootPath("dev", "shm")) - prevMask = os.umask(0000) - - devNodes = [ - (stat.S_IFCHR | 0666, os.makedev(1, 3), "dev/null"), - (stat.S_IFCHR | 0666, os.makedev(1, 7), "dev/full"), - (stat.S_IFCHR | 0666, os.makedev(1, 5), "dev/zero"), - (stat.S_IFCHR | 0666, os.makedev(1, 8), "dev/random"), - (stat.S_IFCHR | 0444, os.makedev(1, 9), "dev/urandom"), - (stat.S_IFCHR | 0666, os.makedev(5, 0), "dev/tty"), - (stat.S_IFCHR | 0600, os.makedev(5, 1), "dev/console") - ] - - # make device node for el4 and el5 - if self.kernel_version < "2.6.19": - devNodes.append((stat.S_IFCHR | 0666, os.makedev(5, 2), "dev/ptmx")) - - for i in devNodes: - # create node - os.mknod(self.chrootPath(i[2]), i[0], i[1]) - - os.symlink("/proc/self/fd/0", self.chrootPath("dev", "stdin")) - os.symlink("/proc/self/fd/1", self.chrootPath("dev", "stdout")) - os.symlink("/proc/self/fd/2", self.chrootPath("dev", "stderr")) - os.symlink("/proc/self/fd", self.chrootPath("dev", "fd")) - - if self.kernel_version >= "2.6.19": - os.symlink("/dev/pts/ptmx", self.chrootPath("dev", "ptmx")) - - os.umask(prevMask) - - def _setupUsers(self): - self.log.debug("Creating users") - f = open(self.chrootPath("etc", "passwd"), "w") - f.write("root:x:0:0:root:/root:/bin/bash\n") - f.write("nobody:x:99:99:Nobody:/:/sbin/nologin\n") - f.close() - - f = open(self.chrootPath("etc", "group"), "w") - f.write("root:x:0:root\n") - f.write("nobody:x:99:\n") - f.close() - - def _setupDns(self): - self.log.debug("Setting up DNS") - nameservers = [] - f = open("/etc/resolv.conf") - for line in f.readlines(): - if line.startswith("nameserver"): - nameservers.append(line.split(" ")[-1]) - f.close() - - self.log.debug("Using nameservers: %s" % nameservers) - - f = open(self.chrootPath("etc", "resolv.conf"), "w") - for nameserver in nameservers: - f.write("nameserver %s" % nameserver) - f.close() - - self.log.debug("Creating record for localhost") - f = open(self.chrootPath("etc", "hosts"), "w") - f.write("127.0.0.1 localhost\n") - f.close() - - def _mountall(self): - """mount 'normal' fs like /dev/ /proc/ /sys""" - self.log.debug("Mounting chroot") - for cmd in self.mountCmds: - util.do(cmd, shell=True) - - def _umountall(self): - """umount all mounted chroot fs.""" - self.log.debug("Umounting chroot") - for cmd in self.umountCmds: - util.do(cmd, raiseExc=0, shell=True) - - @property - def log(self): - return getLog() - - def shell(self, args=[]): - command = "chroot %s /usr/src/tools/chroot-shell %s" % \ - (self.chrootPath(), " ".join(args)) - - for key, val in self.environ.items(): - command = "%s="%s" " % (key, val) + command - - try: - self._mountall() - - shell = os.system(command) - return os.WEXITSTATUS(shell) - - finally: - self._umountall() - - @property - def umountCmds(self): - ret = ( - "umount -n %s" % self.chrootPath("proc"), - "umount -n %s" % self.chrootPath("sys"), - "umount -n %s" % self.chrootPath("usr", "src", "cache"), - "umount -n %s" % self.chrootPath("usr", "src", "ccache"), - "umount -n %s" % self.chrootPath("usr", "src", "images"), - "umount -n %s" % self.chrootPath("usr", "src", "packages"), - "umount -n %s" % self.chrootPath("usr", "src", "pkgs"), - "umount -n %s" % self.chrootPath("usr", "src", "src"), - "umount -n %s" % self.chrootPath("usr", "src", "tools"), - "umount -n %s" % self.chrootPath("dev", "pts"), - "umount -n %s" % self.chrootPath("dev", "shm") - ) - - return ret - - @property - def mountCmds(self): - ret = [ - "mount -n -t proc naoki_chroot_proc %s" % self.chrootPath("proc"), - "mount -n -t sysfs naoki_chroot_sysfs %s" % self.chrootPath("sys"), - "mount -n --bind %s %s" % (CACHEDIR, self.chrootPath("usr", "src", "cache")), - "mount -n --bind %s %s" % (CCACHEDIR, self.chrootPath("usr", "src", "ccache")), - "mount -n --bind %s %s" % (IMAGESDIR, self.chrootPath("usr", "src", "images")), - "mount -n --bind %s %s" % (PACKAGESDIR, self.chrootPath("usr", "src", "packages")), - "mount -n --bind %s %s" % (PKGSDIR, self.chrootPath("usr", "src", "pkgs")), - "mount -n --bind %s %s" % (os.path.join(BASEDIR, "src"), self.chrootPath("usr", "src", "src")), - "mount -n --bind %s %s" % (TOOLSDIR, self.chrootPath("usr", "src", "tools")), - ] - - mountopt = "gid=%d,mode=0620,ptmxmode=0666" % grp.getgrnam("tty").gr_gid - if self.kernel_version >= "2.6.29": - mountopt += ",newinstance" - - ret.extend([ - "mount -n -t devpts -o %s naoki_chroot_devpts %s" % (mountopt, self.chrootPath("dev", "pts")), - "mount -n -t tmpfs naoki_chroot_shmfs %s" % self.chrootPath("dev", "shm")]) - - return ret - - def extractAll(self): - raise NotImplementedError - - -class PackageEnvironment(Environment): - def __init__(self, package, *args, **kwargs): - self.package = package - - Environment.__init__(self, naoki=package.naoki, *args, **kwargs) - - def build(self): - self.log.debug(LOG_MARKER) - - self.package.download() - - # Save start time - time_start = time.time() - - try: - self.make("package") - except Error: - if config["cleanup_on_failure"]: - self.clean() - backend.report_error_by_mail(self.package) - raise - - time_end = time.time() - self.log.debug("Package build took %.2fs" % (time_end - time_start)) - - if config["cleanup_on_success"]: - self.clean() - - def chrootPath(self, *args): - return os.path.join(BUILDDIR, "environments", self.package.info.id, *args) - - def extractAll(self): - packages = [p.getPackage(self.naoki) \ - for p in self.package.info.dependencies_all] - - for package in packages: - package.extract(self.chrootPath()) - - def make(self, target): - file = "/usr/src%s" % self.package.info.filename[len(BASEDIR):] - - return self.doChroot("make -C %s -f %s %s" % \ - (os.path.dirname(file), file, target), shell=True) - - @property - def log(self): - return self.package.log - - def shell(self, *args): - self.make("prepare") - Environment.shell(self, *args) - self.clean() - - -class ShellEnvironment(Environment): - def chrootPath(self, *args): - return os.path.join(BUILDDIR, "environments", "shell", *args) - - def extractAll(self): - pass - - -class Toolchain(object): - def __init__(self, arch): - util.mkdir(TOOLCHAINSDIR) - - self.arch = arches[arch] - - # Create a filename object - self.filename = "toolchain-%s.%s.tar.gz" % \ - (self.arch["name"], config["toolchain_version"],) - - # Store the path including the filename - self.path = os.path.join(TOOLCHAINSDIR, self.filename) - - self.build_dir = os.path.join(BUILDDIR, "toolchains", - "tools_%s.%s" % (self.arch["name"], config["toolchain_version"])) - - self.log = getLog() - - @property - def exists(self): - return os.path.exists(self.path) - - def download(self): - self.log.info("Downloading toolchain...") - pass - - def cmd(self, args=[]): - cmd = "%s" % os.path.join(TOOLSDIR, "toolchain") - if args: - cmd += " " - cmd += " ".join(args) - util.do(cmd, cwd=self.build_dir, shell=True, logger=self.log, - env={ "TOOLS_DIR" : self.build_dir }) - - # TODO: - # - logging - def make(self, pkg, target): - env = config.environment.copy() - env.update({ - "BASEDIR" : BASEDIR, - "PATH" : "/tools_%(arch)s/sbin:/tools_%(arch)s/bin:%(path)s" % \ - { "arch" : self.arch["name"], "path" : os.environ["PATH"], }, - "PKGROOT" : PKGSDIR, - "ROOT" : self.build_dir, - "TARGET" : "%s-ipfire-linux-gnu" % self.arch["machine"], - "TARGET_MACHINE" : self.arch["machine"], - "TOOLCHAIN" : "1", - "TOOLS_DIR" : "/tools_%s" % self.arch["name"], - - "CFLAGS" : self.arch["cflags"], - "CXXFLAGS" : self.arch["cxxflags"], - }) - - command = "make -C %s -f %s %s" % \ - (os.path.dirname(pkg.filename), pkg.filename, target) - - return util.do(command, shell=True, env=env, personality=self.arch["personality"], - logger=self.log) - - def build_package(self, pkg): - self.log.info("Building %s..." % pkg.name) - - source_dir = os.path.join(self.build_dir, "usr/src") - - util.rm(source_dir) - util.mkdir(source_dir) - - self.checkLink() - - return self.make(pkg, "package") - - def compress(self): - self.cmd(["compress", self.path, self.build_dir]) - - def extract(self, path): - self.cmd(["extract", self.path, os.path.join(path, "tools_%s" % self.arch["name"])]) - - def adjust(self, path): - self.cmd(["adjust", path]) - - def build(self, naoki): - self.log.info("Building toolchain...") - - packages = backend.get_package_names(toolchain=True) - packages = backend.parse_package(packages, toolchain=True, naoki=naoki) - packages = backend.depsort(packages) - for pkg in packages: - if os.path.exists(os.path.join(self.path, pkg.name)): - continue - self.build_package(pkg) - self.compress() - - def checkLink(self): - link = "/tools_%s" % self.arch["name"] - destination = os.path.abspath(self.build_dir) - - if not os.path.islink(link): - # File is not a link. Remove it... - util.rm(link) - - else: - # If link points to correct destination we break up - if os.path.abspath(os.readlink(link)) == destination: - return - os.unlink(link) - - - os.symlink(destination, link) - - -class Generator(Environment): - def __init__(self, naoki, arch, type): - self.type = type - Environment.__init__(self, naoki, arch) - - def chrootPath(self, *args): - return os.path.join(BUILDDIR, "generators", self.type, self.arch["name"], *args) - - def run(self): - self.init() - - # Extracting installer packages - util.mkdir(self.chrootPath("installer")) - - for package in self.get_packages("installer"): - package.extract(self.chrootPath("installer")) - - all_package_files = [] - for package in self.get_packages("all"): - all_package_files.extend(package.package_files) - - self.doChroot("/usr/src/tools/generator %s" % self.type, - env={"ALL_PACKAGES" : " ".join(all_package_files)}) - - def get_packages(self, type): - _packages = { - "all" : backend.get_package_names(), - "build" : [ "arping", "bash", "coreutils", "cpio", "curl", - "dhcp", "findutils", "grep", "iproute2", "iputils", "kbd", - "less", "module-init-tools", "procps", "sed", "sysvinit", - "udev", "util-linux-ng", "which", "dvdrtools", "kernel", - "squashfs-tools", "syslinux", "zlib",], - "installer" : ["initscripts", "kernel", "pomona", "upstart"], - } - _package_infos = backend.parse_package_info(_packages[type]) - - packages = [] - for package in backend.depsolve(_package_infos, recursive=True): - package = package.getPackage(self.naoki) - if not package in packages: - packages.append(package) - - return packages - - def extractAll(self): - # Extract required tools - for package in self.get_packages("build"): - package.extract(self.chrootPath()) diff --git a/naoki/constants.py b/naoki/constants.py index 07c3ee3..861c83c 100644 --- a/naoki/constants.py +++ b/naoki/constants.py @@ -1,6 +1,6 @@ #!/usr/bin/python
-import ConfigParser +from ConfigParser import ConfigParser, DEFAULTSECT import math import os import socket @@ -12,6 +12,7 @@ CACHEDIR = os.path.join(BASEDIR, "cache") CCACHEDIR = os.path.join(BASEDIR, "ccache") CONFIGDIR = os.path.join(BASEDIR, "config") DOCDIR = os.path.join(BASEDIR, "doc") +GENDIR = os.path.join(BUILDDIR, "generators") IMAGESDIR = os.path.join(BUILDDIR, "images") LOGDIR = os.path.join(BASEDIR, "logs") PKGSDIR = os.path.join(BASEDIR, "pkgs") @@ -19,9 +20,7 @@ PACKAGESDIR = os.path.join(BUILDDIR, "packages") REPOSDIR = os.path.join(BUILDDIR, "repositories") TOOLSDIR = os.path.join(BASEDIR, "tools")
-TARBALLDIR = os.path.join(CACHEDIR, "tarballs") -TOOLCHAINSDIR = os.path.join(CACHEDIR, "toolchains") -PATCHESDIR = os.path.join(CACHEDIR, "patches") +ARCHES_DEFAULT = os.path.join(CONFIGDIR, "architectures.conf")
CONFIGFILE = os.path.join(CONFIGDIR, "naoki.conf")
@@ -48,8 +47,28 @@ class Config(object): _items = { "toolchain" : False, "mandatory_packages" : [ - "core/ccache", - "core/glibc", + "bash", + "bzip2", + "ccache", + "coreutils", + "cpio", + "diffutils", + "file", + "findutils", + "gawk", + "grep", + "gzip", + "make", + "patch", + "sed", + "tar", + "which", + "xz", + ], + "shell_packages" : [ + "/bin/bash", + "less", + "vim", ], "nice_level" : 0, "parallelism" : calc_parallelism(), @@ -88,11 +107,11 @@ class Config(object): self.read([CONFIGFILE, os.path.join(BASEDIR, ".config")])
def read(self, files): - parser = ConfigParser.ConfigParser() + parser = ConfigParser() parser.read(files)
config = {} - for key, val in parser.items(ConfigParser.DEFAULTSECT): + for key, val in parser.items(DEFAULTSECT): config[key] = val
for section in parser.sections(): @@ -138,42 +157,6 @@ class Config(object): return ret
-class Architectures(object): - def __init__(self, configfile): - parser = ConfigParser.ConfigParser() - parser.read(configfile) - - arches = {} - for arch in parser.sections(): - arches[arch] = { "name" : arch } - for key, val in parser.items(arch): - arches[arch][key] = val - - self._arches = arches - self.__current = None - - def set(self, arch): - self.__current = arch - - @property - def all(self): - return self._arches - - @property - def default(self): - return self._arches.get("i686") - - @property - def current(self): - if not self.__current: - return self.default - return self._arches[self.__current] - - def __getitem__(self, key): - return self._arches[key] - - # Create a globally useable instance of the configuration config = Config()
-arches = Architectures(config["architecture_config"]) diff --git a/naoki/decorators.py b/naoki/decorators.py new file mode 100644 index 0000000..5b26ace --- /dev/null +++ b/naoki/decorators.py @@ -0,0 +1,12 @@ +#!/usr/bin/python + +# A decorator to use singleton on a class +# http://en.wikipedia.org/wiki/Singleton_pattern#Python_.28using_decorators.29 +def singleton(cls): + instance_container = [] + def getinstance(): + if not len(instance_container): + instance_container.append(cls()) + return instance_container[0] + return getinstance + diff --git a/naoki/dependencies.py b/naoki/dependencies.py new file mode 100644 index 0000000..7f21b22 --- /dev/null +++ b/naoki/dependencies.py @@ -0,0 +1,192 @@ +#!/usr/bin/python + +import logging +import os +import re + +import architectures +import repositories +import packages + +from exception import * + +DEP_INVALID, DEP_FILE, DEP_LIBRARY, DEP_PACKAGE = range(4) + + +class Dependency(object): + def __init__(self, identifier, origin=None): + self.identifier = identifier + self.origin = origin + + def __cmp__(self, other): + return cmp(self.identifier, other.identifier) + + def __repr__(self): + s = "<%s %s" % (self.__class__.__name__, self.identifier) + if self.origin: + s += " by %s" % self.origin.name + s += "(%s)" % os.path.basename(self.origin.filename) + s += ">" + return s + + @property + def type(self): + if self.identifier.startswith("/"): + return DEP_FILE + elif ".so" in self.identifier: + return DEP_LIBRARY + elif re.match("^[A-Za-z0-9-+_]+$", self.identifier): + return DEP_PACKAGE + + return DEP_INVALID + + def match(self, other): + return self.type == other.type \ + and self.identifier == other.identifier + + +class Provides(Dependency): + pass + + +class DependencySet(object): + def __init__(self, dependencies=[], arch=None): + if not arch: + arches = architectures.Architectures() + arch = arches.get_default() + self.arch = arch + + self.repo = repositories.BinaryRepository(self.arch) + + # initialize package lists + self._dependencies = [] + self._items = [] + self._provides = [] + + # add all provided dependencies + for dependency in dependencies: + self.add_dependency(dependency) + + logging.debug("Successfully initialized %s" % self) + + def __repr__(self): + return "<%s>" % (self.__class__.__name__) + + def add_dependency(self, item): + assert isinstance(item, Dependency) + + # If this dependency is already provided by something else + # we skip the add + for p in self.provides: + if p.match(item): + logging.debug("%s matches %s" % (p, item)) + return + + if not item in self.dependencies: + self._dependencies.append(item) + + logging.debug("Added new dependency %s" % item) + + def add_package(self, item): + assert isinstance(item, packages.BinaryPackage) + + if item in self._items: + return + + for provides in item.get_provides(): + self.add_provides(provides) + + for dependency in item.get_dependencies(): + self.add_dependency(dependency) + + self._items.append(item) + logging.debug("Added new package %s" % item) + + def add_provides(self, item): + assert isinstance(item, Provides) + + if item in self._provides: + return + + self._provides.append(item) + self._provides.sort() + + def resolve(self): + logging.debug("Resolving %s" % self) + + # Safe for endless loop + counter = 1000 + + while self._dependencies: + counter -= 1 + if not counter: + logging.debug("Maximum count of dependency loop was reached") + break + + dependency = self._dependencies.pop(0) + + logging.debug("Processing dependency: %s" % dependency.identifier) + + if dependency.type == DEP_PACKAGE: + package = self.repo.find_package_by_name(dependency.identifier) + if package: + # Found a package and add this + self.add_package(package) + continue + + elif dependency.type == DEP_LIBRARY: + for package in self.repo.all: + for provides in package.get_provides(): + if provides.match(dependency): + self.add_package(package) + break + + elif dependency.type == DEP_FILE: + package = self.repo.find_package_by_file(dependency.identifier) + if package: + self.add_package(package) + continue + + logging.warning("Cannot find a package which provides file %s" % \ + dependency.identifier) + + elif dependency.type == DEP_INVALID: + logging.warning("Dropping invalid dependency %s" % dependency.identifier) + continue + + # Found not solution, push it to the end + logging.debug("No match found: %s" % dependency) + self.add_dependency(dependency) + + if self.dependencies: + #logging.error("Unresolveable dependencies: %s" % self.dependencies) + raise DependencyResolutionError, "%s" % self.dependencies + + @property + def dependencies(self): + return sorted(self._dependencies) + + @property + def items(self): + #if not self._items: + # self.resolve() + + return self._items + + @property + def packages(self): + return sorted(self.items) + + @property + def provides(self): + return self._provides + + +if __name__ == "__main__": + import architectures + arches = architectures.Architectures() + + ds = DependencySet(arch=arches.get("i686")) + ds.add_dependency(Dependency("/bin/bash")) + ds.resolve() + print ds.packages diff --git a/naoki/environ.py b/naoki/environ.py new file mode 100644 index 0000000..fd14efc --- /dev/null +++ b/naoki/environ.py @@ -0,0 +1,341 @@ +#!/usr/bin/python + +import grp +import logging +import os +import stat + +import logger +import mail +import util + +from constants import * + +# XXX to be moved to somewhere else +ENVIRONMENT_ARGS = ["PATH", "PWD" ] + +def set(e): + env = {} + + for key in ENVIRONMENT_ARGS: + if os.environ.has_key(key): + env[key] = os.environ[key] + + env.update(config.environment) + env.update(e) + + return env + + +class _Environment(object): + kernel_version = os.uname()[2] + + def __init__(self, arch): + self.arch = arch + + logging.debug("Successfully initialized %s" % self) + + # XXX check if already locked + self.prepare() + + def chrootPath(self, *args): + raise NotImplementedError + + def clean(self): + logging.debug("Cleaning environment %s" % self) + if os.path.exists(self.chrootPath()): + util.rm(self.chrootPath()) + + def prepare(self): + self.clean() + + logging.debug("Preparing environment %s" % self) + + dirs = ( + CACHEDIR, + CCACHEDIR, + IMAGESDIR, + PACKAGESDIR, + "dev", + "dev/pts", + "dev/shm", + "proc", + "root", + "sys", + "tmp", + "usr/src", + "usr/src/cache", + "usr/src/ccache", + "usr/src/images", + "usr/src/packages", + "usr/src/pkgs", + "usr/src/src", + "usr/src/tools", + "var/tmp", + ) + + for dir in dirs: + util.mkdir(self.chrootPath(dir)) + + files = ( + "etc/fstab", + "etc/mtab" + ) + + for file in files: + file = self.chrootPath(file) + dir = os.path.dirname(file) + if not os.path.exists(dir): + util.mkdir(dir) + util.touch(file) + + # Prepare the other stuff + self._prepare_dev() + self._prepare_users() + self._prepare_dns() + + def _prepare_dev(self): + prevMask = os.umask(0000) + + devNodes = [ + (stat.S_IFCHR | 0666, os.makedev(1, 3), "dev/null"), + (stat.S_IFCHR | 0666, os.makedev(1, 7), "dev/full"), + (stat.S_IFCHR | 0666, os.makedev(1, 5), "dev/zero"), + (stat.S_IFCHR | 0666, os.makedev(1, 8), "dev/random"), + (stat.S_IFCHR | 0444, os.makedev(1, 9), "dev/urandom"), + (stat.S_IFCHR | 0666, os.makedev(5, 0), "dev/tty"), + (stat.S_IFCHR | 0600, os.makedev(5, 1), "dev/console") + ] + + # make device node for el4 and el5 + if self.kernel_version < "2.6.19": + devNodes.append((stat.S_IFCHR | 0666, os.makedev(5, 2), "dev/ptmx")) + + for i in devNodes: + # create node + os.mknod(self.chrootPath(i[2]), i[0], i[1]) + + os.symlink("/proc/self/fd/0", self.chrootPath("dev", "stdin")) + os.symlink("/proc/self/fd/1", self.chrootPath("dev", "stdout")) + os.symlink("/proc/self/fd/2", self.chrootPath("dev", "stderr")) + os.symlink("/proc/self/fd", self.chrootPath("dev", "fd")) + + if self.kernel_version >= "2.6.19": + os.symlink("/dev/pts/ptmx", self.chrootPath("dev", "ptmx")) + + os.umask(prevMask) + + def _prepare_users(self): + f = open(self.chrootPath("etc", "passwd"), "w") + f.write("root:x:0:0:root:/root:/bin/bash\n") + f.write("nobody:x:99:99:Nobody:/:/sbin/nologin\n") + f.close() + + f = open(self.chrootPath("etc", "group"), "w") + f.write("root:x:0:root\n") + f.write("nobody:x:99:\n") + f.close() + + def _prepare_dns(self): + # XXX to be replaced + nameservers = [] + f = open("/etc/resolv.conf") + for line in f.readlines(): + if line.startswith("nameserver"): + nameservers.append(line.split(" ")[-1].strip()) + f.close() + + logging.debug("Using nameservers: %s" % nameservers) + + f = open(self.chrootPath("etc", "resolv.conf"), "w") + for nameserver in nameservers: + f.write("nameserver %s" % nameserver) + f.close() + + logging.debug("Creating record for localhost") + f = open(self.chrootPath("etc", "hosts"), "w") + f.write("127.0.0.1 localhost\n") + f.close() + + def extract(self, package, *args): + logging.info("Extracting %s" % package) + + package.extract(self.chrootPath(*args)) + + def variables(self): + env = set({ + "HOME" : "/root", + "PATH" : "/sbin:/bin:/usr/sbin:/usr/bin", + "BASEDIR" : "/usr/src", + "PKGROOT" : "/usr/src/pkgs", + "TARGET" : "%s-ipfire-linux-gnu" % self.arch.machine, + "TARGET_MACHINE" : self.arch.machine, + "CHROOT" : "1", # XXX to be removed + "CFLAGS" : self.arch.cflags, + "CXXFLAGS" : self.arch.cxxflags, + "PKG_ARCH" : self.arch.name, + }) + + # Settings for ccache + env.update({ + "PATH" : "/usr/ccache/bin:%s" % env["PATH"], + "CCACHE_COMPILERCHECK" : "none", + "CCACHE_COMPRESS" : "1", + "CCACHE_DIR" : "/usr/src/ccache", + }) + + return env + + def doChroot(self, command, shell=True, *args, **kwargs): + ret = None + try: + env = self.variables() + + if kwargs.has_key("env"): + env.update(kwargs.pop("env")) + + self._mountall() + + if not kwargs.has_key("chrootPath"): + kwargs["chrootPath"] = self.chrootPath() + + ret = util.do(command, + personality=self.arch.personality, + shell=shell, + env=env, + logger=self.logger, + *args, **kwargs) + + finally: + self._umountall() + + return ret + + def _mountall(self): + logging.debug("Mounting environment") + for cmd in self.mountCmds: + util.do(cmd, shell=True) + + def _umountall(self): + logging.debug("Umounting environment") + for cmd in self.umountCmds: + util.do(cmd, raiseExc=0, shell=True) + + @property + def umountCmds(self): + return ( + "umount -n %s" % self.chrootPath("proc"), + "umount -n %s" % self.chrootPath("sys"), + "umount -n %s" % self.chrootPath("usr", "src", "cache"), + "umount -n %s" % self.chrootPath("usr", "src", "ccache"), + "umount -n %s" % self.chrootPath("usr", "src", "images"), + "umount -n %s" % self.chrootPath("usr", "src", "packages"), + "umount -n %s" % self.chrootPath("usr", "src", "pkgs"), + "umount -n %s" % self.chrootPath("usr", "src", "src"), + "umount -n %s" % self.chrootPath("usr", "src", "tools"), + "umount -n %s" % self.chrootPath("dev", "pts"), + "umount -n %s" % self.chrootPath("dev", "shm") + ) + + @property + def mountCmds(self): + ret = [ + "mount -n -t proc naoki_chroot_proc %s" % self.chrootPath("proc"), + "mount -n -t sysfs naoki_chroot_sysfs %s" % self.chrootPath("sys"), + "mount -n --bind %s %s" % (CACHEDIR, self.chrootPath("usr", "src", "cache")), + "mount -n --bind %s %s" % (CCACHEDIR, self.chrootPath("usr", "src", "ccache")), + "mount -n --bind %s %s" % (IMAGESDIR, self.chrootPath("usr", "src", "images")), + "mount -n --bind %s %s" % (PACKAGESDIR, self.chrootPath("usr", "src", "packages")), + "mount -n --bind %s %s" % (PKGSDIR, self.chrootPath("usr", "src", "pkgs")), + "mount -n --bind %s %s" % (os.path.join(BASEDIR, "src"), self.chrootPath("usr", "src", "src")), + "mount -n --bind %s %s" % (TOOLSDIR, self.chrootPath("usr", "src", "tools")), + ] + + mountopt = "gid=%d,mode=0620,ptmxmode=0666" % grp.getgrnam("tty").gr_gid + if self.kernel_version >= "2.6.29": + mountopt += ",newinstance" + + ret.extend([ + "mount -n -t devpts -o %s naoki_chroot_devpts %s" % (mountopt, self.chrootPath("dev", "pts")), + "mount -n -t tmpfs naoki_chroot_shmfs %s" % self.chrootPath("dev", "shm")]) + + return ret + + @property + def logger(self): + return logging.getLogger() + + +class Build(_Environment): + def __init__(self, package): + self.package = package + + _Environment.__init__(self, self.package.arch) + + @property + def logger(self): + return logging.getLogger() # XXX just for now + + def chrootPath(self, *args): + return os.path.join(BUILDDIR, "environments", self.package.id, *args) + + @property + def buildroot(self): + if not hasattr(self, "__buildroot"): + self.__buildroot = "buildroot.%s" % util.random_string() + + return self.__buildroot + + def variables(self): + v = _Environment.variables(self) + v.update({ "BUILDROOT" : "/%s" % self.buildroot }) + return v + + def build(self, *args, **kwargs): + try: + self.make("package") + except: + if config["cleanup_on_failure"]: + self.clean() + + # Send email report about an error + mail.report_error(self.package) + raise + + if config["cleanup_on_success"]: + self.clean() + + def make(self, target): + file = "/usr/src%s" % self.package.filename[len(BASEDIR):] + + return self.doChroot("make -C %s -f %s %s" % \ + (os.path.dirname(file), file, target), shell=True) + + +class Shell(Build): + def shell(self, args=[]): + # Preparing source... + self.make("prepare") + + command = "chroot %s /usr/src/tools/chroot-shell %s" % \ + (self.chrootPath(), " ".join(args)) + + for key, val in self.variables().items(): + command = "%s="%s" " % (key, val) + command + + if self.package.source_dir: + command = "SOURCE_DIR=%s %s" % (self.package.source_dir, command) + + logging.debug("Shell command: %s" % command) + + try: + self._mountall() + + shell = os.system(command) + return os.WEXITSTATUS(shell) + + finally: + self._umountall() + + # Clean up the environment + self.clean() diff --git a/naoki/exception.py b/naoki/exception.py index e132934..1713010 100644 --- a/naoki/exception.py +++ b/naoki/exception.py @@ -30,3 +30,7 @@ class commandTimeoutExpired(Error):
class DownloadError(Exception): pass + + +class DependencyResolutionError(Error): + pass diff --git a/naoki/generators.py b/naoki/generators.py new file mode 100644 index 0000000..bcb027b --- /dev/null +++ b/naoki/generators.py @@ -0,0 +1,73 @@ +#!/usr/bin/python + +import logging +import os + +import dependencies +import repositories +import util + +from constants import * +from environ import _Environment + + +class Generator(_Environment): + def __init__(self, type, arch=None): + _Environment.__init__(self, arch) + + self.type = type + + self.repos = repositories.SourceRepositories(self.arch) + + for r in self.repos.all: + if not r.completely_built: + raise Exception, "The repo is not built completely: %s" % r + + self.build_deps = dependencies.DependencySet(arch=self.arch) + deps = [ + "basesystem", + "dracut", + "squashfs-tools", + "syslinux", + "/usr/bin/mkisofs", + ] + for dep in deps: + dep = dependencies.Dependency(dep) + self.build_deps.add_dependency(dep) + + self.installer_deps = dependencies.DependencySet(arch=self.arch) + deps = [ + "basesystem", + #"installer", + ] + for dep in deps: + dep = dependencies.Dependency(dep) + self.installer_deps.add_dependency(dep) + + def chrootPath(self, *args): + return os.path.join(GENDIR, self.arch.name, *args) + + @property + def logger(self): + return logging.getLogger() + + def run(self): + # Unpacking packages we need in this environment + logging.info("Resolving dependencies...") + self.build_deps.resolve() + self.installer_deps.resolve() + + for package in self.build_deps.packages: + self.extract(package) + + util.mkdir(self.chrootPath("installer")) + for package in self.installer_deps.packages: + self.extract(package, "installer") + + util.mkdir(self.chrootPath("packages")) + for p in self.repos.packages: + for bin in p.binary_files: + os.link(os.path.join(PACKAGESDIR, self.arch.name, bin), + self.chrootPath("packages", bin)) + + self.doChroot("/usr/src/tools/generator %s" % self.type, shell=True) diff --git a/naoki/io.py b/naoki/io.py new file mode 100644 index 0000000..6f06caa --- /dev/null +++ b/naoki/io.py @@ -0,0 +1,262 @@ +#!/usr/bin/python + +import grp +import os +import pwd +import stat +import time + +def ftype(mode): + if stat.S_ISBLK(mode): + return "b" + elif stat.S_ISCHR(mode): + return "c" + elif stat.S_ISDIR(mode): + return "d" + elif stat.S_ISREG(mode): + return "-" + elif stat.S_ISFIFO(mode): + return "p" + elif stat.S_ISLINK(mode): + return "l" + elif stat.S_ISSOCK(mode): + return "s" + return "?" + +def rwx(mode): + ret = "" + if mode & stat.S_IRUSR: + ret += "r" + else: + ret += "-" + + if mode & stat.S_IWUSR: + ret += "w" + else: + ret += "-" + + if mode & stat.S_IXUSR: + ret += "x" + else: + ret += "-" + + return ret + +def fmode(mode): + ret = ftype(mode) + ret += rwx((mode & 0700) << 0) + ret += rwx((mode & 0070) << 3) + ret += rwx((mode & 0007) << 6) + return ret + +class CpioError(Exception): + pass + + +class CpioEntry(object): + def __init__(self, hdr, archive, offset): + self.archive = archive + self.hdr = hdr + + self.offset = offset + 110 + self.namesize + self.offset += (4 - (self.offset % 4)) % 4 + self.current = 0 + + self.closed = False + + if len(self.hdr) < 110: + raise CpioError("Header too short.") + + if not self.hdr.startswith("070701") and not self.hdr.startswith("070702"): + raise CpioError("Invalid header: %s" % self.hdr[:6]) + + def close(self): + self.closed = True + + def flush(self): + pass # noop + + def read(self, size=None): + """Read data from the entry. + + Keyword arguments: + size -- Number of bytes to read (default: whole entry) + """ + if self.closed: + raise ValueError("Read operation on closed file.") + + self.archive.file.seek(self.offset + self.current, os.SEEK_SET) + + if size and size < self.size - self.current: + ret = self.archive.file.read(size) + else: + ret = self.archive.file.read(self.size - self.current) + self.current += len(ret) + return ret + + def seek(self, offset, whence=0): + """Move to new position within an entry. + + Keyword arguments: + offset -- Byte count + whence -- Describes how offset is used. + 0: From beginning of file + 1: Forwards from current position + 2: Backwards from current position + Other values are ignored. + """ + if self.closed: + raise ValueError("Seek operation on closed file.") + + if whence == os.SEEK_SET: + self.current = offset + elif whence == os.SEEK_REL: + self.current += offset + elif whence == os.SEEK_END: + self.current -= offset + + self.current = min(max(0, self.current), self.size) + + def tell(self): + """Get current position within an entry""" + if self.closed: + raise ValueError("Tell operation on closed file.") + return self.current + + def __repr__(self): + return "<CpioEntry %s 0x%s>" % (self.name, self.checksum,) + + @property + def checksum(self): + return int(self.hdr[102:110], 16) + + @property + def devmajor(self): + return int(self.hdr[62:70], 16) + + @property + def devminor(self): + return int(self.hdr[70:78], 16) + + @property + def gid(self): + return int(self.hdr[30:38], 16) + + @property + def inode(self): + return int(self.hdr[6:14], 16) + + @property + def mode(self): + return int(self.hdr[14:22], 16) + + @property + def mtime(self): + return int(self.hdr[46:54], 16) + + @property + def name(self): + end = 110 + self.namesize - 1 + return self.hdr[110:end] + + @property + def namesize(self): + return int(self.hdr[94:102], 16) + + @property + def nlinks(self): + return int(self.hdr[38:46], 16) + + @property + def rdevmajor(self): + return int(self.hdr[78:86], 16) + + @property + def rdevminor(self): + return int(self.hdr[86:94], 16) + + @property + def size(self): + return int(self.hdr[54:62], 16) + + @property + def uid(self): + return int(self.hdr[22:30], 16) + + +class CpioArchive(object): + _entries = [] + file = None + + def __init__(self, filename): + + self.filename = filename + self.file = open(self.filename, "r") + self.__readfile() + + self.closed = False + + def close(self): + if self.closed: + return + self.closed = True + + self.file.close() + + def __readfile(self): + if not self.file: + raise CpioError("File was not yet opened.") + + self._entries = [] + sposition = self.file.tell() + hdr = self.file.read(110) + while hdr: + namelen = int(hdr[94:102], 16) # Length of the name + hdr += self.file.read(namelen) + ce = CpioEntry(hdr, self, sposition) + if ce.name == "TRAILER!!!": + return + self._entries.append(ce) + + self.file.seek((4 - (self.file.tell()-sposition) % 4) % 4, os.SEEK_CUR) + self.file.seek(ce.size, os.SEEK_CUR) + self.file.seek((4 - (self.file.tell()-sposition) % 4) % 4, os.SEEK_CUR) + + sposition = self.file.tell() + hdr = self.file.read(110) + else: + raise CpioError("Premature end of headers.") + + @property + def entries(self): + return sorted(self._entries) + + @property + def size(self): + return os.path.getsize(self.filename) + + def ls(self): + for x in self.entries: + print x.name + + def ll(self): + for x in self.entries: + print "%s %s %s %s %9d %s %s" % \ + (fmode(x.mode), + x.nlinks, + pwd.getpwuid(x.uid)[0], + grp.getgrgid(x.gid)[0], + x.size, + time.strftime("%Y-%m-%d %H:%M", time.localtime(x.mtime)), + x.name,) + + def get(self, item): + for x in self.entries: + if x.name == item: + return x + raise KeyError("No such file or directory.") + + def __getitem__(self, item): + x = self.get(item) + x.seek(0) + return x.read() diff --git a/naoki/mail.py b/naoki/mail.py new file mode 100644 index 0000000..fdd7235 --- /dev/null +++ b/naoki/mail.py @@ -0,0 +1,93 @@ +#!/usr/bin/python + +import email.mime.multipart +import email.mime.text +import logging +import os +import smtplib + +from constants import * + +def report_error(package): + # Do not send a report if no recipient is configured + if not config["error_report_recipient"]: + return + + try: + connection = smtplib.SMTP(config["smtp_server"]) + #connection.set_debuglevel(1) + + if config["smtp_user"] and config["smtp_password"]: + connection.login(config["smtp_user"], config["smtp_password"]) + + except smtplib.SMTPConnectError, e: + logging.error("Could not establish a connection to the smtp server: %s" % e) + return + except smtplib.SMTPAuthenticationError, e: + logging.error("Could not successfully login to the smtp server: %s" % e) + return + + msg = email.mime.multipart.MIMEMultipart() + msg["From"] = config["error_report_sender"] + msg["To"] = config["error_report_recipient"] + msg["Subject"] = config["error_report_subject"] % package.all + msg.preamble = 'You will not see this in a MIME-aware mail reader.\n' + + body = """\ +The package %(name)s had a difficulty to build itself. +This email will give you a short report about the error. + +Package information: + Name : %(name)s - %(summary)s + Version : %(version)s + Release : %(release)s + + This package in maintained by %(maintainer)s. + + +A detailed logfile is attached. + +Sincerely, + Naoki + """ % { + "name" : package.name, + "summary" : package.summary, + "version" : package.version, + "release" : package.release, + "maintainer" : package.maintainer, + } + + msg.attach(email.mime.text.MIMEText(body)) + + # Read log and append it to mail + loglines = [] + if os.path.exists(package.logfile): + f = open(package.logfile) + line = f.readline() + while line: + line = line.rstrip() + if line.endswith(LOG_MARKER): + # Reset log + loglines = [] + + loglines.append(line) + line = f.readline() + + f.close() + + if not loglines: + loglines = ["Logfile wasn't found."] + + log = email.mime.text.MIMEText("\n".join(loglines), _subtype="plain") + log.add_header('Content-Disposition', 'attachment', + filename="%s.log" % package.id) + msg.attach(log) + + try: + connection.sendmail(config["error_report_sender"], + config["error_report_recipient"], msg.as_string()) + except Exception, e: + logging.error("Could not send error report: %s: %s" % (e.__class__.__name__, e)) + return + + connection.quit() diff --git a/naoki/packages.py b/naoki/packages.py new file mode 100644 index 0000000..3b09e90 --- /dev/null +++ b/naoki/packages.py @@ -0,0 +1,227 @@ +#!/usr/bin/python + +import logging +import os +import re + +import urlgrabber +import urlgrabber.progress + +import architectures +import dependencies +import environ +import io +import util + +from constants import * + + +class Package(object): + def __repr__(self): + return "<%s %s:%s>" % \ + (self.__class__.__name__, self.name, self.arch.name) + + #@property + #def arch(self): + # raise NotImplementedError + + @property + def name(self): + return self._info["PKG_NAME"] + + @property + def id(self): + return "%s-%s-%s.%s" % \ + (self.name, self.version, self.release, self.arch.name) + + @property + def release(self): + return int(self._info["PKG_REL"]) + + @property + def version(self): + return self._info["PKG_VER"] + + +class SourcePackage(Package): + def __init__(self, filename, repo, arch): + self.arch = arch + self.filename = filename + self.repository = repo + + self.init() + + logging.debug("Successfully initialized %s" % self) + + def init(self): + self._info = {} + + env = environ.set({ + "PKG_ARCH" : self.arch.name, + "PKGROOT" : PKGSDIR, + }) + + output = util.do("make -f %s" % os.path.basename(self.filename), + shell=True, + cwd=os.path.dirname(self.filename), + returnOutput=1, + env=env) + + for line in output.splitlines(): + if not line: + continue + + m = re.match(r"^(\w+)=(.*)$", line) + if m is None: + continue + + key, val = m.groups() + self._info[key] = val.strip(""") + + # XXX should return a dependencyset + def get_dependencies(self, type=""): + type2var = { + "" : "PKG_DEPENDENCIES", + "build" : "PKG_BUILD_DEPENDENCIES", + } + + type = type2var[type] + + return [dependencies.Dependency(d, origin=self) for d in self._info[type].split()] + + @property + def source_dir(self): + return self._info.get("SOURCE_DIR", "") + + @property + def summary(self): + return self._info["PKG_SUMMARY"] + + @property + def binary_files(self): + return self._info.get("PKG_PACKAGES_FILES").split() + + @property + def is_built(self): + for file in self.binary_files: + file = os.path.join(PACKAGESDIR, self.arch.name, file) + if not os.path.exists(file): + return False + + return True + + @property + def source_files(self): + return self._info.get("PKG_OBJECTS").split() + + def source_download(self): + g = urlgrabber.grabber.URLGrabber( + prefix = config["sources_download_url"], + progress_obj = urlgrabber.progress.TextMeter(), + quote=0, + ) + + for file in self.source_files: + file = os.path.join(CACHEDIR, file) + + if os.path.exists(file): + continue + + util.mkdir(CACHEDIR) + + g.urlgrab(os.path.basename(file), filename=file) + + +class BinaryPackage(Package): + def __init__(self, filename): + self.filename = filename + + self.init() + logging.debug("Successfully initialized %s" % self) + + def __repr__(self): + return "<%s %s-%s-%s>" % \ + (self.__class__.__name__, self.name, self.version, self.release) + + def __cmp__(self, other): + return cmp(self.id, other.id) + + def _readfile(self, name): + f = io.CpioArchive(self.filename) + + # If file is not available, return None + ret = None + if name in [e.name for e in f.entries]: + ret = f.get(name).read() + + f.close() + return ret + + def init(self): + self._info = {} + self._filelist = [] + + info = self._readfile("info") + + for line in info.splitlines(): + if not line: + continue + + m = re.match(r"^(\w+)=(.*)$", line) + if m is None: + continue + + key, val = m.groups() + self._info[key] = val.strip(""") + + def extract(self, path): + logging.debug("Extracting %s to %s" % (self, path)) + + cmd = os.path.join(TOOLSDIR, "decompressor") + cmd += " --root=%s %s" % (path, self.filename) + + util.do(cmd, shell=True, logger=logging.getLogger()) + + @property + def arch(self): + arches = architectures.Architectures() + + arch = self._info.get("PKG_ARCH", None) + if arch: + arch = arches.get(arch) + else: + arch = arches.get_default() + + return arch + + @property + def name(self): + return self._info["PKG_NAME"] + + def get_dependencies(self): + objects = self._info.get("PKG_DEPS", "").split() + + # Compatibility to older package format + objects += self._info.get("PKG_REQUIRES", "").split() + + return [dependencies.Dependency(o, origin=self) for o in objects] + + def get_provides(self): + return [dependencies.Provides(p, origin=self) \ + for p in self._info.get("PKG_PROVIDES", "").split()] + + @property + def filelist(self): + if not self._filelist: + + filelist = self._readfile("filelist") + if not filelist: + return [] + + for file in filelist.splitlines(): + if not file or not file.startswith("/"): + continue + + self._filelist.append(file) + + return self._filelist diff --git a/naoki/repositories.py b/naoki/repositories.py new file mode 100644 index 0000000..709c669 --- /dev/null +++ b/naoki/repositories.py @@ -0,0 +1,215 @@ +#!/usr/bin/python + +import logging +import operator +import os + +import architectures +import packages + +from constants import * +from decorators import * + +class Repository(object): + def __init__(self, arch): + assert isinstance(arch, architectures.Architecture) + self.arch = arch + + logging.debug("Successfully initialized %s" % self) + + def __repr__(self): + return "<%s %s>" % (self.__class__.__name__, self.path) + + @property + def path(self): + raise NotImplementedError + + +class BinaryRepository(Repository): + _cache = {} + + @property + def path(self): + return os.path.join(PACKAGESDIR, self.arch.name) + + def find_package_by_name(self, name): + pkgs = self.find_packages_by_name(name) + + if pkgs: + return pkgs[0] + + def find_packages_by_name(self, name): + pkgs = [] + + for package in self.all: + if package.name == name: + pkgs.append(package) + + return sorted(pkgs, key=operator.attrgetter("release"), reverse=True) + + @property + def all(self): + if not self._cache.has_key(self.arch.name): + l = [] + + for package in os.listdir(self.path): + # Construct filename + package = os.path.join(self.path, package) + + # Create package instance + package = packages.BinaryPackage(package) + + # Append package to list + l.append(package) + + self._cache[self.arch.name] = l + + return self._cache[self.arch.name] + + def find_package_by_file(self, filename): + pkgs = self.find_packages_by_file(filename) + + if pkgs: + return pkgs[0] + + def find_packages_by_file(self, filename): + pkgs = [] + + for package in self.all: + if filename in package.filelist: + pkgs.append(package) + + return sorted(pkgs, key=operator.attrgetter("release"), reverse=True) + + +class SourceRepository(Repository): + def __init__(self, name, arch): + self.name = name + + Repository.__init__(self, arch) + + def __iter__(self): + pkgs = [os.path.join(self.path, p, p + ".nm") for p in self.packages] + + args = { + "arch" : self.arch, + "repo" : self, + } + + return PackageIterator(pkgs, packages.SourcePackage, args) + + def find_package_by_name(self, name, fast=False): + if fast: + filename = os.path.join(self.path, name, name + ".nm") + if os.path.exists(filename): + return packages.SourcePackage(filename, repo=self, arch=self.arch) + + else: + for package in self: + if package.name == name: + return package + + @property + def path(self): + return os.path.join(PKGSDIR, self.name) + + @property + def packages(self): + return sorted(os.listdir(self.path)) + + @property + def completely_built(self): + for p in self: + if not p.is_built: + return False + + return True + + +class PackageIterator(object): + def __init__(self, paks, package_cls=None, cls_args={}): + self.packages = paks + self.package_cls = package_cls + self.package_cls_args = cls_args + + self.__i = 0 + + def __iter__(self): + return self + + def next(self): + if self.__i >= len(self.packages): + raise StopIteration + + pkgs = self.packages[self.__i] + self.__i += 1 + + if self.package_cls: + package = self.package_cls(pkgs, **self.package_cls_args) + + return package + + +class SourceRepositories(object): + def __init__(self, arch): + assert isinstance(arch, architectures.Architecture) + self.arch = arch + + self._repositories = [] + + self.find_all() + + def find_all(self): + for repo in sorted(os.listdir(PKGSDIR)): + # Skip all non-directories + if not os.path.isdir(os.path.join(PKGSDIR, repo)): + continue + + logging.debug("Found source repository: %s" % repo) + + repo = SourceRepository(repo, self.arch) + self._repositories.append(repo) + + @property + def all(self): + return self._repositories[:] + + def find_package_by_name(self, name): + for fast in (True, False): + for repo in self._repositories: + package = repo.find_package_by_name(name, fast=fast) + if package: + return package + + @property + def packages(self): + #pkgs = [] + #for repository in self._repositories: + # pkgs += [p for p in repository] + # + #return pkgs + + for repository in self._repositories: + for p in repository: + yield p + + +if __name__ == "__main__": + arches = architectures.Architectures() + + r = SourceRepositories(arches.get("i686")) + + for repo in r.all: + print "%s" % repo.name + + #for pack in repo: + # print " %s" % pack.name + + #for package in ("gcc", "screen", "iptables", "system-release", "glibc", "nonexistant"): + # print "Searching for %s" % package, + # print r.find_package_by_name(package) + + b = BinaryRepository(arches.get("i686")) + + print b.find_packages_by_name("aiccu") + print b.find_package_by_name("aiccu") diff --git a/naoki/terminal.py b/naoki/terminal.py index 95c658d..0ec6f57 100644 --- a/naoki/terminal.py +++ b/naoki/terminal.py @@ -6,8 +6,11 @@ import struct import sys import termios
+import architectures from constants import *
+arches = architectures.Architectures() + class ParsingError(Exception): pass
@@ -262,7 +265,7 @@ class Commandline(object): self.naoki.logging.debug(args.debug)
# Set architecture - arches.set(args.arch) + arches.set_default(args.arch)
def __parse(self): parser = Parser(sys.argv[0], @@ -272,27 +275,22 @@ class Commandline(object): Option("quiet", ["-q", "--quiet"], help="Set quiet mode"), Option("debug", ["-d", "--debug"], help="Set debugging mode"), Choice("arch", ["-a", "--arch"], help="Set architecture", - choices=[arch for arch in arches.all]), + choices=[arch.name for arch in arches.all]), ], parsers=[ # Build Parser("build", help="Primary build command", arguments=[ + Option("all", ["--all"], help="Build all packages"), Option("withdeps", ["--with-deps"], help="Build all dependencies first if needed"), Option("onlydeps", ["--only-deps"], help="Build only dependencies that belong to a package"), Option("shell", ["-s", "--shell"], help="Change into a chroot environment"), + Option("ignore_dependency_errors", ["-i", "--ignore-dependency-errors"], + help="Ignore dependency errors."), List("packages", help="Give a list of packages to build or say 'all'"), ]),
- # Toolchain - Parser("toolchain", - parsers=[ - Parser("download", help="Download a toolchain"), - Parser("build", help="Build the toolchain"), - Parser("tree", help="Show package tree of toolchain"), - ]), - # Package Parser("package", parsers=[ @@ -301,7 +299,6 @@ class Commandline(object): arguments=[ Option("long", ["-l", "--long"], help="Show long list of information"), Option("machine", ["--machine"], help="Output in machine parseable format"), - Option("wiki", ["--wiki"], help="Output in wiki format"), List("packages"), ]), Parser("tree", help="Show package tree"), @@ -314,9 +311,7 @@ class Commandline(object): ]), Parser("groups", help="Show package groups", - arguments=[ - Option("wiki", ["--wiki"], help="Output in wiki format"), - ]), + ), ]),
# Source @@ -333,7 +328,6 @@ class Commandline(object): arguments=[ List("packages"), ]), - Parser("clean", help="Cleanup unused tarballs"), ]),
# Check @@ -353,30 +347,8 @@ class Commandline(object): # Shell Parser("shell", help="Shell environment", - parsers=[ - Parser("clean", help="Cleanup the environment"), - Parser("extract", - help="Extract packages", - arguments=[ - List("packages", help="Give a list of packages") - ]), - Parser("enter", help="Enter into environment"), - ]), - - # Repository - Parser("repository", - help="Repository commands", - parsers=[ - Parser("clean", - help="Cleanup the repository", - arguments=[ - List("names", help="List of repositories"), - ]), - Parser("build", - help="Build the repository", - arguments=[ - List("names", help="List of repositories"), - ]), + arguments=[ + Argument("package", help="Package to process."), ]),
# Generator diff --git a/pkgs/Constants b/pkgs/Constants index b1adf57..7cdb680 100644 --- a/pkgs/Constants +++ b/pkgs/Constants @@ -5,6 +5,10 @@ # ###############################################################################
+PKG_VARIABLES = PKG_BUILD_DEPS PKG_DEPS PKG_DESCRIPTION PKG_FILES PKG_GROUP \ + PKG_MAINTAINER PKG_LICENSE PKG_PROVIDES PKG_REL PKG_SUMMARY PKG_URL \ + PKG_VER + ifeq "$(CHROOT)" "1" BASEDIR = /usr/src endif @@ -12,12 +16,12 @@ endif THISAPP = $(PKG_NAME)-$(PKG_VER)
DIR_APP = $(DIR_SRC)/$(THISAPP) -DIR_DL = $(BASEDIR)/cache/tarballs +DIR_DL = $(BASEDIR)/cache DIR_PATCHES = $(DIR_SOURCE)/patches DIR_SRC = $(ROOT)/usr/src DIR_TMP = /tmp DIR_SOURCE = $(CURDIR) -DIR_PACKAGES = /usr/src/packages +DIR_PACKAGES = /usr/src/packages/$(PKG_ARCH) DIR_TOOLS = $(BASEDIR)/tools DIR_LOGS = $(BASEDIR)/logs
@@ -39,15 +43,8 @@ DO_EXTRACT = $(DIR_TOOLS)/extractor DO_PATCHES = cd $(DIR_APP) && $(DIR_TOOLS)/patch $(foreach patch,$(PKG_PATCHES),$(DIR_PATCHES)/$(patch)) DO_QUALITY_AGENT = $(DIR_TOOLS)/quality-agent
-PKG_DESCRIPTION_$(PKG_NAME_REAL)-devel = Development files of $(THISAPP). - -define PKG_FILES_$(PKG_NAME_REAL)-devel - /usr/include - */lib/*.so -endef - -PKG_BUILD_DEPS += kernel-headers -PKG_DEPS += glibc +PKG_BUILD_DEPS += gcc glibc-devel kernel-headers +PKG_DEPS +=
CONFIGURE_OPTIONS = --prefix=/usr
@@ -84,3 +81,4 @@ export QUALITY_AGENT_WHITELIST_EXECSTACK export QUALITY_AGENT_WHITELIST_NX export QUALITY_AGENT_WHITELIST_RPATH export QUALITY_AGENT_WHITELIST_SONAME +export QUALITY_AGENT_PERMIT_NOT_FULL_RELRO diff --git a/pkgs/Functions b/pkgs/Functions index c94b0b1..4dce5aa 100644 --- a/pkgs/Functions +++ b/pkgs/Functions @@ -9,6 +9,20 @@ include $(PKGROOT)/gmsl
DO_PACKAGE_FILENAME = $(1)$(PKG_SUFFIX)
+define DO_PACKAGE + @echo "#####################################################################" + @echo "# $(1) - Package build started" + @echo "#####################################################################" + + @$(foreach var,$(PKG_VARIABLES),$(if $($(var)-$(1)),$(var)="$(strip $($(var)-$(1)))",$(var)="$(strip $($(var)))")) \ + $(DIR_TOOLS)/packager $(1) $(DIR_PACKAGES)/$(call DO_PACKAGE_FILENAME,$(1)) + + @echo "#####################################################################" + @echo "# $(1) - Package build finished" + @echo "#####################################################################" + +endef + define DO_FILELIST @echo "# Filelist dump" @cd $(BUILDROOT) && find -ls @@ -112,9 +126,8 @@ define DO_INSTALL @echo "# $(PKG_NAME) - Install finished" @echo "#####################################################################"
- $(if $(TOOLCHAIN),,$(DO_QUALITY_AGENT)) - - $(if $(TOOLCHAIN),,$(DO_FILELIST)) + $(DO_QUALITY_AGENT) + $(DO_FILELIST) endef
define STAGE_PREPARE @@ -144,7 +157,7 @@ endef STAGE_INSTALL_TARGETS = install
define STAGE_INSTALL - cd $(DIR_APP) && make $(STAGE_INSTALL_TARGETS) $(if $(TOOLCHAIN),,DESTDIR=$(BUILDROOT)) + cd $(DIR_APP) && make $(STAGE_INSTALL_TARGETS) DESTDIR=$(BUILDROOT)
$(STAGE_INSTALL_CMDS) endef diff --git a/pkgs/Include b/pkgs/Include index 50541e4..a3d62be 100644 --- a/pkgs/Include +++ b/pkgs/Include @@ -23,3 +23,4 @@ include $(PKGROOT)/Constants include $(PKGROOT)/Functions include $(PKGROOT)/Targets +include $(PKGROOT)/Templates diff --git a/pkgs/Targets b/pkgs/Targets index 95fcb38..0ee051c 100644 --- a/pkgs/Targets +++ b/pkgs/Targets @@ -22,21 +22,15 @@ info: @echo "PKG_REL="$(PKG_REL)"" @echo "PKG_SUMMARY="$(strip $(PKG_SUMMARY))"" @echo "PKG_URL="$(PKG_URL)"" - @echo "PKG_TOOLCHAIN_DEPENDENCIES="$(PKG_TOOLCHAIN_DEPS)"" + @echo "SOURCE_DIR="$(DIR_APP)""
$(OBJECTS): @echo "Object file "$@" is required." >&2 @exit 1
-%.ipk: $(STAGE_DONE) - @echo "$(strip $(PKG_FILES_$(patsubst %$(PKG_SUFFIX),%,$@)))" \ - > $(DIR_TMP)/filelist_$(patsubst %$(PKG_SUFFIX),%,$@) - @$(DIR_TOOLS)/compressor $(DIR_PACKAGES)/$@ \ - --root=$(BUILDROOT) $(if $(PKG_FILES_$(patsubst %$(PKG_SUFFIX),%,$@)), \ - --regexes=$(DIR_TMP)/filelist_$(patsubst %$(PKG_SUFFIX),%,$@)) - .PHONY: package -package: $(if $(TOOLCHAIN),$(STAGE_DONE),$$(STAGE_PACKAGE_TARGETS)) +package: $(STAGE_DONE) + $(foreach package,$(call reverse,$(PKG_PACKAGES)),$(call DO_PACKAGE,$(package)))
.PHONY: shell shell: $(OBJECTS) diff --git a/pkgs/Templates b/pkgs/Templates new file mode 100644 index 0000000..54f7e79 --- /dev/null +++ b/pkgs/Templates @@ -0,0 +1,49 @@ + +############################################################################### +# +# Template definitions of the naoki build system +# +############################################################################### + + +############################################################################### +# Devel template +############################################################################### + +PKG_DESCRIPTION-$(PKG_NAME_REAL)-devel = Development files of $(THISAPP). +PKG_SUMMARY-$(PKG_NAME_REAL)-devel = $(PKG_DESCRIPTION-$(PKG_NAME_REAL)-devel) + +PKG_DEPS-$(PKG_NAME_REAL)-devel = $(foreach dep,$(PKG_BUILD_DEPS),$(if $(findstring -devel,$(dep)),$(dep))) + +define PKG_FILES-$(PKG_NAME_REAL)-devel + /usr/bin/*-config + /usr/include + /usr/lib/pkgconfig + /usr/share/aclocal + */lib/*.so + /usr/share/*/cmake + /usr/share/vala +endef + + +############################################################################### +# Library template +############################################################################### + +PKG_DESCRIPTION-$(PKG_NAME_REAL)-libs = Library files of $(THISAPP). +PKG_SUMMARY-$(PKG_NAME_REAL)-libs = $(PKG_DESCRIPTION-$(PKG_NAME_REAL)-libs) + +define PKG_FILES-$(PKG_NAME_REAL)-libs + /lib/lib*.so.* + /usr/lib/lib*.so.* +endef + +# Another naming scheme template... +PKG_DESCRIPTION-lib$(PKG_NAME_REAL) = $(PKG_DESCRIPTION-$(PKG_NAME_REAL)-libs) +PKG_SUMMARY-lib$(PKG_NAME_REAL) = $(PKG_SUMMARY-$(PKG_NAME_REAL)-libs) +PKG_FILES-lib$(PKG_NAME_REAL) = $(PKG_FILES-$(PKG_NAME_REAL)-libs) + +PKG_DESCRIPTION-lib$(PKG_NAME_REAL)-devel = $(PKG_DESCRIPTION-$(PKG_NAME_REAL)-devel) +PKG_SUMMARY-lib$(PKG_NAME_REAL)-devel = $(PKG_SUMMARY-$(PKG_NAME_REAL)-devel) +PKG_FILES-lib$(PKG_NAME_REAL)-devel = $(PKG_FILES-$(PKG_NAME_REAL)-devel) blah +PKG_BUILD_DEPS-lib$(PKG_NAME_REAL)-devel = $(PKG_BUILD_DEPS-$(PKG_NAME_REAL)-devel) diff --git a/pkgs/core/acl/acl.nm b/pkgs/core/acl/acl.nm index 94d4adf..8ba2e31 100644 --- a/pkgs/core/acl/acl.nm +++ b/pkgs/core/acl/acl.nm @@ -34,19 +34,19 @@ PKG_URL = http://oss.sgi.com/projects/xfs/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Access control list utilities.
-PKG_PACKAGES += $(PKG_NAME_REAL)-devel - define PKG_DESCRIPTION This package contains the getfacl and setfacl utilities needed for \ manipulating access control lists. endef
-PKG_BUILD_DEPS+= gettext libtool make -PKG_DEPS += attr libnfsidmap +PKG_BUILD_DEPS+= gettext libattr-devel libnfsidmap-devel libtool
PKG_TARBALL = $(THISAPP).tar.gz
-STAGE_BUILD_TARGETS += LIBTOOL="libtool --tag=CC" +PKG_PACKAGES += libacl libacl-devel + +PKG_FILES-libacl = $(PKG_FILES-$(PKG_NAME_REAL)-libs) +PKG_FILES-libacl-devel = $(PKG_FILES-$(PKG_NAME_REAL)-devel)
CONFIGURE_OPTIONS += \ --bindir=/bin \ diff --git a/pkgs/core/aiccu/aiccu.nm b/pkgs/core/aiccu/aiccu.nm index 3b1a514..9a2768e 100644 --- a/pkgs/core/aiccu/aiccu.nm +++ b/pkgs/core/aiccu/aiccu.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.sixxs.net/tools/aiccu/ PKG_LICENSE = BSD PKG_SUMMARY = Automatic IPv6 Connectivity Client Utility for SixXS tunnels.
-PKG_DEPS += gnutls +PKG_BUILD_DEPS+= gnutls-devel
define PKG_DESCRIPTION This client automatically gives one IPv6 connectivity without having \ diff --git a/pkgs/core/attr/attr.nm b/pkgs/core/attr/attr.nm index 743ebfd..94f217a 100644 --- a/pkgs/core/attr/attr.nm +++ b/pkgs/core/attr/attr.nm @@ -34,10 +34,6 @@ PKG_URL = http://oss.sgi.com/projects/xfs/ PKG_LICENSE = GPLv2+ LGPLv2+ PKG_SUMMARY = Tools for extended attribute support.
-PKG_BUILD_DEPS+= gettext gzip libtool make sed - -PKG_PACKAGES += $(PKG_NAME_REAL)-devel - define PKG_DESCRIPTION A set of tools for manipulating extended attributes on filesystem \ objects. @@ -45,6 +41,13 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_BUILD_DEPS+= gettext libtool + +PKG_PACKAGES = libattr libattr-devel + +PKG_FILES-libattr = $(PKG_FILES-$(PKG_NAME_REAL)-libs) +PKG_FILES-libattr-devel = $(PKG_FILES-$(PKG_NAME_REAL)-devel) + CONFIGURE_OPTIONS += \ --bindir=/bin \ --enable-shared \ diff --git a/pkgs/core/autoconf/autoconf.nm b/pkgs/core/autoconf/autoconf.nm index e8df9a2..695e222 100644 --- a/pkgs/core/autoconf/autoconf.nm +++ b/pkgs/core/autoconf/autoconf.nm @@ -34,7 +34,8 @@ PKG_URL = http://www.gnu.org/software/autoconf/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = A GNU tool for automatically configuring source code.
-PKG_DEPS += m4 perl +PKG_BUILD_DEPS+= m4 perl +PKG_DEPS += m4
define PKG_DESCRIPTION GNU's Autoconf is a tool for configuring source code and Makefiles. \ diff --git a/pkgs/core/automake/automake.nm b/pkgs/core/automake/automake.nm index 07bc644..975bfcd 100644 --- a/pkgs/core/automake/automake.nm +++ b/pkgs/core/automake/automake.nm @@ -34,7 +34,8 @@ PKG_URL = http://www.gnu.org/software/automake/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = A GNU tool for automatically configuring source code.
-PKG_DEPS += autoconf perl +PKG_BUILD_DEPS+= autoconf perl +PKG_DEPS += autoconf
define PKG_DESCRIPTION Automake is a tool for automatically generating Makefile.in \ diff --git a/pkgs/core/avahi/avahi.nm b/pkgs/core/avahi/avahi.nm index 3e4313b..2459b4f 100644 --- a/pkgs/core/avahi/avahi.nm +++ b/pkgs/core/avahi/avahi.nm @@ -44,11 +44,13 @@ define PKG_DESCRIPTION convenient endef
-PKG_BUILD_DEPS+= gettext intltool pkg-config -PKG_DEPS += dbus dbus-glib libdaemon python python-dbus perl-xml-parser +PKG_BUILD_DEPS+= dbus-devel dbus-glib-devel gcc-c++ gettext libdaemon-devel \ + intltool perl perl-xml-parser pkg-config python-devel python-dbus
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + CONFIGURE_OPTIONS += \ --bindir=/bin \ --mandir=/usr/share/man \ diff --git a/pkgs/core/basesystem/basesystem.nm b/pkgs/core/basesystem/basesystem.nm index df9ce61..75562bf 100644 --- a/pkgs/core/basesystem/basesystem.nm +++ b/pkgs/core/basesystem/basesystem.nm @@ -34,6 +34,15 @@ PKG_URL = PKG_LICENSE = GPLv3+ PKG_SUMMARY = Basic system files.
+PKG_BUILD_DEPS = # There are no build dependencies + +# This is a package that pulls lots of other dependencies to always have a +# useable system. +PKG_DEPS += /bin/sh /sbin/init \ + coreutils file findutils gawk grep iana-etc initscripts kbd kernel less \ + module-init-tools network pakfire passwd procps psmisc sed shadow \ + system-release tar udev util-linux-ng vim + define PKG_DESCRIPTION This package contains files that are needed to run basic \ functions of the system. @@ -46,4 +55,3 @@ define STAGE_INSTALL -mkdir -pv $(BUILDROOT)/etc cp -vf $(DIR_SOURCE)/resolv.conf $(BUILDROOT)/etc/ endef - diff --git a/pkgs/core/bash/bash.nm b/pkgs/core/bash/bash.nm index 113d5a4..5d14486 100644 --- a/pkgs/core/bash/bash.nm +++ b/pkgs/core/bash/bash.nm @@ -41,8 +41,7 @@ define PKG_DESCRIPTION to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. endef
-PKG_BUILD_DEPS+= autoconf automake bison -PKG_DEPS += readline +PKG_BUILD_DEPS+= autoconf automake bison ncurses-devel readline-devel
PKG_TARBALL = $(THISAPP).tar.gz
diff --git a/pkgs/core/bind/bind.nm b/pkgs/core/bind/bind.nm index 1c3109e..b5ca8f3 100644 --- a/pkgs/core/bind/bind.nm +++ b/pkgs/core/bind/bind.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.isc.org/products/BIND/ PKG_LICENSE = Proprietary PKG_SUMMARY = BIND provides tools for the DNS.
-PKG_DEPS += db openssl +PKG_BUILD_DEPS+= db-devel openssl-devel
define PKG_DESCRIPTION BIND (Berkeley Internet Name Domain or named) is the most commonly used \ @@ -43,6 +43,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES = bind-utils + define STAGE_BUILD cd $(DIR_APP) && \ ./configure \ diff --git a/pkgs/core/binutils/binutils.nm b/pkgs/core/binutils/binutils.nm index 3f71d68..8391fa2 100644 --- a/pkgs/core/binutils/binutils.nm +++ b/pkgs/core/binutils/binutils.nm @@ -39,8 +39,7 @@ define PKG_DESCRIPTION tools for the manipulation of object code in various object file formats. endef
-PKG_BUILD_DEPS = glibc dejagnu -PKG_DEPS += zlib +PKG_BUILD_DEPS+= dejagnu texinfo zlib-devel
PKG_TARBALL += $(THISAPP).tar.bz2
diff --git a/pkgs/core/bison/bison.nm b/pkgs/core/bison/bison.nm index 101a4c6..6e4c843 100644 --- a/pkgs/core/bison/bison.nm +++ b/pkgs/core/bison/bison.nm @@ -34,6 +34,9 @@ PKG_URL = http://www.gnu.org/software/bison/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = GNU Bison is a parser generator.
+PKG_BUILD_DEPS+= m4 +PKG_DEPS += m4 + define PKG_DESCRIPTION Bison is a general-purpose parser generator that converts an annotated \ context-free grammar into an LALR(1) or GLR parser for that grammar. diff --git a/pkgs/core/boost/boost.nm b/pkgs/core/boost/boost.nm index 1dc5a7a..773192f 100644 --- a/pkgs/core/boost/boost.nm +++ b/pkgs/core/boost/boost.nm @@ -34,21 +34,20 @@ PKG_URL = http://www.boost.org/ PKG_LICENSE = Boost PKG_SUMMARY = The Boost C++ Libraries.
-PKG_BUILD_DEPS+= cmake -PKG_DEPS += zlib +PKG_BUILD_DEPS+= cmake gcc-c++ zlib-devel
define PKG_DESCRIPTION Boost provides free peer-reviewed portable C++ source libraries. The \ emphasis is on libraries which work well with the C++ Standard \ - Library, in the hopes of establishing "existing practice" for \ + Library, in the hopes of establishing existing practice for \ extensions and providing reference implementations so that the Boost \ - libraries are suitable for eventual standardization. (Some of the \ - libraries have already been proposed for inclusion in the C++ \ - Standards Committee's upcoming C++ Standard Library Technical Report.) + libraries are suitable for eventual standardization. endef
PKG_TARBALL = $(THISAPP).cmake0.tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CFLAGS += -fno-strict-aliasing CXXFLAGS += -fno-strict-aliasing
diff --git a/pkgs/core/br2684ctl/br2684ctl.nm b/pkgs/core/br2684ctl/br2684ctl.nm index 81cb9c0..c684b2f 100644 --- a/pkgs/core/br2684ctl/br2684ctl.nm +++ b/pkgs/core/br2684ctl/br2684ctl.nm @@ -34,7 +34,7 @@ PKG_URL = http://cvs.linux-atm.sourceforge.net/viewcvs.py/linux-atm/linux PKG_LICENSE = GPLv2+ PKG_SUMMARY = Utilities for configuring an ATM/ethernet bridge.
-PKG_DEPS += linux-atm +PKG_BUILD_DEPS+= linux-atm-devel
define PKG_DESCRIPTION Utility for configuring RFC 2684 ATM/Ethernet bridging \ diff --git a/pkgs/core/bridge-utils/bridge-utils.nm b/pkgs/core/bridge-utils/bridge-utils.nm index 4ec5d37..3f34764 100644 --- a/pkgs/core/bridge-utils/bridge-utils.nm +++ b/pkgs/core/bridge-utils/bridge-utils.nm @@ -52,3 +52,7 @@ CONFIGURE_OPTIONS += \ define STAGE_PREPARE_CMDS cd $(DIR_APP) && autoconf endef + +define STAGE_INSTALL_CMDS + rm -rvf $(BUILDROOT)/usr/include +endef diff --git a/pkgs/core/btrfs-progs/btrfs-progs.nm b/pkgs/core/btrfs-progs/btrfs-progs.nm index eacd751..a1e7ca6 100644 --- a/pkgs/core/btrfs-progs/btrfs-progs.nm +++ b/pkgs/core/btrfs-progs/btrfs-progs.nm @@ -34,7 +34,7 @@ PKG_URL = http://btrfs.wiki.kernel.org/index.php/Main_Page PKG_LICENSE = GPLv2 PKG_SUMMARY = Userspace programs for btrfs.
-PKG_BUILD_DEPS+= util-linux-ng +PKG_BUILD_DEPS+= util-linux-ng-devel
define PKG_DESCRIPTION The btrfs-progs package provides all the userpsace programs needed to create, \ diff --git a/pkgs/core/bwm-ng/bwm-ng.nm b/pkgs/core/bwm-ng/bwm-ng.nm index a995814..80b4008 100644 --- a/pkgs/core/bwm-ng/bwm-ng.nm +++ b/pkgs/core/bwm-ng/bwm-ng.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gropp.org/?id=projects&sub=bwm-ng PKG_LICENSE = GPLv2+ PKG_SUMMARY = A bandwidth monitor for the shell.
-PKG_DEPS += ncurses +PKG_BUILD_DEPS+= ncurses-devel
define PKG_DESCRIPTION bwm-ng diplays the traffic passing by on all interfaces. diff --git a/pkgs/core/cairo/cairo.nm b/pkgs/core/cairo/cairo.nm index fe34c29..ba846d3 100644 --- a/pkgs/core/cairo/cairo.nm +++ b/pkgs/core/cairo/cairo.nm @@ -34,10 +34,8 @@ PKG_URL = http://cairographics.org PKG_LICENSE = LGPLv2 MPLv1.1 PKG_SUMMARY = A 2D graphics library.
-PKG_PACKAGES += $(PKG_NAME_REAL)-devel - -PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += fontconfig freetype libpng pixman zlib +PKG_BUILD_DEPS+= fontconfig-devel freetype-devel libpng-devel pixman-devel \ + pkg-config zlib-devel
define PKG_DESCRIPTION Cairo is a 2D graphics library designed to provide high-quality display \ @@ -45,3 +43,5 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.gz + +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/cloog/cloog.nm b/pkgs/core/cloog/cloog.nm index 51daae2..31684cb 100644 --- a/pkgs/core/cloog/cloog.nm +++ b/pkgs/core/cloog/cloog.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.cloog.org PKG_LICENSE = GPLv2+ PKG_SUMMARY = The Chunky Loop Generator.
-PKG_BUILD_DEPS+= autoconf automake m4 -PKG_DEPS += gmp ppl +PKG_BUILD_DEPS+= autoconf automake gmp-devel m4 ppl-devel
define PKG_DESCRIPTION CLooG is a software which generates loops for scanning Z-polyhedra. That is, \ @@ -45,6 +44,9 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(PKG_NAME)-ppl-$(PKG_VER).tar.gz + +PKG_PACKAGES += $(PKG_NAME_REAL)-devel + DIR_APP = $(DIR_SRC)/$(PKG_NAME)-ppl-$(PKG_VER)
CONFIGURE_OPTIONS += \ diff --git a/pkgs/core/cmake/cmake.nm b/pkgs/core/cmake/cmake.nm index 458b843..b42cd1d 100644 --- a/pkgs/core/cmake/cmake.nm +++ b/pkgs/core/cmake/cmake.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.cmake.org PKG_LICENSE = BSD PKG_SUMMARY = Cross-platform make system.
-PKG_DEPS += curl expat ncurses zlib +PKG_BUILD_DEPS+= expat-devel gcc-c++ libcurl-devel ncurses-devel zlib-devel
define PKG_DESCRIPTION CMake is used to control the software compilation process using simple \ diff --git a/pkgs/core/coreutils/coreutils.nm b/pkgs/core/coreutils/coreutils.nm index bc642d2..5d5861d 100644 --- a/pkgs/core/coreutils/coreutils.nm +++ b/pkgs/core/coreutils/coreutils.nm @@ -39,8 +39,8 @@ define PKG_DESCRIPTION the old GNU fileutils, sh-utils, and textutils packages. endef
-PKG_BUILD_DEPS+= autoconf automake e2fsprogs -PKG_DEPS += acl attr libcap ncurses pam shadow util-linux-ng +PKG_BUILD_DEPS+= autoconf automake libacl-devel libattr-devel libcap \ + ncurses-devel e2fsprogs pam-devel
PKG_TARBALL = $(THISAPP).tar.gz
diff --git a/pkgs/core/cracklib/cracklib.nm b/pkgs/core/cracklib/cracklib.nm index f412c63..60d5d4c 100644 --- a/pkgs/core/cracklib/cracklib.nm +++ b/pkgs/core/cracklib/cracklib.nm @@ -34,7 +34,8 @@ PKG_URL = http://sourceforge.net/projects/cracklib/ PKG_LICENSE = GPLv2 PKG_SUMMARY = A password-checking library.
-PKG_DEPS += python +PKG_BUILD_DEPS+= python +PKG_DEPS += cracklib-dicts
define PKG_DESCRIPTION CrackLib tests passwords to determine whether they match certain \ @@ -49,6 +50,18 @@ endef PKG_TARBALL = $(THISAPP).tar.gz PKG_OBJECTS += cracklib-words-20080507.gz
+PKG_PACKAGES += $(PKG_NAME)-dicts $(PKG_NAME)-devel python-$(PKG_NAME) + +### We build an extra python package with the bindings for it. +PKG_DESCRIPTION-python-cracklib = Python bindings for $(THISAPP). +PKG_SUMMARY-python-cracklib = Python bindings for $(THISAPP). +PKG_FILES-python-cracklib = /usr/lib/python* + +### We build an extra package with the dictionaries. +PKG_DESCRIPTION-cracklib-dicts = Dictionaries for $(THISAPP). +PKG_SUMMARY-cracklib-dicts = Dictionaries for $(THISAPP). +PKG_FILES-cracklib-dicts = /lib/cracklib /usr/share/dict* + CONFIGURE_OPTIONS += \ --with-default-dict=/lib/cracklib/pw_dict \ --with-python \ diff --git a/pkgs/core/cryptsetup-luks/cryptsetup-luks.nm b/pkgs/core/cryptsetup-luks/cryptsetup-luks.nm index 854c5e6..fb95aea 100644 --- a/pkgs/core/cryptsetup-luks/cryptsetup-luks.nm +++ b/pkgs/core/cryptsetup-luks/cryptsetup-luks.nm @@ -34,7 +34,8 @@ PKG_URL = http://cryptsetup.googlecode.com/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = A utility for setting up encrypted filesystems.
-PKG_DEPS += e2fsprogs libgcrypt libgpg-error lvm2 popt +PKG_BUILD_DEPS+= e2fsprogs-devel libdevmapper-devel libgcrypt-devel \ + libgpg-error-devel popt-devel
define PKG_DESCRIPTION This package contains cryptsetup, a utility for setting up \ @@ -43,6 +44,8 @@ endef
PKG_TARBALL = cryptsetup-$(PKG_VER).tar.bz2
+PKG_PACKAGES += $(PKG_NAME_REAL)-devel + DIR_APP = $(DIR_SRC)/cryptsetup-$(PKG_VER)
CONFIGURE_OPTIONS += \ diff --git a/pkgs/core/cups/cups.nm b/pkgs/core/cups/cups.nm index bc09112..029bde1 100644 --- a/pkgs/core/cups/cups.nm +++ b/pkgs/core/cups/cups.nm @@ -34,7 +34,9 @@ PKG_URL = http://cups.org/software.php PKG_LICENSE = GPLv2+ PKG_SUMMARY = The common UNIX printing system.
-PKG_DEPS += cyrus-sasl ghostscript libjpeg libpng libtiff openldap pam perl python zlib +PKG_BUILD_DEPS+= cyrus-sasl-devel gcc-c++ ghostscript libjpeg-devel libpng-devel \ + libtiff-devel openldap-devel pam-devel perl python zlib-devel +PKG_DEPS += ghostscript
define PKG_DESCRIPTION CUPS is the standards-based, open source printing system developed \ @@ -43,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP)-source.tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --localstatedir=/var diff --git a/pkgs/core/curl/curl.nm b/pkgs/core/curl/curl.nm index 1cda1a7..3f049f0 100644 --- a/pkgs/core/curl/curl.nm +++ b/pkgs/core/curl/curl.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.curl.haxx.se/ PKG_LICENSE = MIT PKG_SUMMARY = A utility for getting files from remote servers (FTP, HTTP, and others).
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libidn openldap libssh2 openssh openssl zlib +PKG_BUILD_DEPS+= autoconf automake libidn-devel libssh2-devel libtool \ + openldap-devel openssl-devel pkg-config zlib-devel
define PKG_DESCRIPTION cURL is a tool for getting files from HTTP, FTP, FILE, LDAP, LDAPS, \ @@ -47,6 +47,18 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += libcurl libcurl-devel + +PKG_DEPS-libcurl = $(PKG_DEPS-$(PKG_NAME)-libs) +PKG_BUILD_DEPS-libcurl = $(PKG_BUILD_DEPS-$(PKG_NAME)-libs) +PKG_SUMMARY-libcurl = $(PKG_SUMMARY-$(PKG_NAME)-libs) +PKG_FILES-libcurl = $(PKG_FILES-$(PKG_NAME)-libs) + +PKG_DEPS-libcurl-devel = $(PKG_DEPS-$(PKG_NAME)-devel) +PKG_BUILD_DEPS-libcurl-devel = $(PKG_BUILD_DEPS-$(PKG_NAME)-devel) +PKG_SUMMARY-libcurl-devel = $(PKG_SUMMARY-$(PKG_NAME)-devel) +PKG_FILES-libcurl-devel = $(PKG_FILES-$(PKG_NAME)-devel) + CONFIGURE_OPTIONS += \ --disable-static \ --with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt \ @@ -56,6 +68,10 @@ CONFIGURE_OPTIONS += \ --enable-ldaps \ --enable-ipv6
+define STAGE_PREPARE_CMDS + cd $(DIR_APP) && autoreconf -vfi +endef + # Doesn't work #define STAGE_TEST # cd $(DIR_APP) && make check diff --git a/pkgs/core/curl/patches/curl-7.20.0-lrt.patch b/pkgs/core/curl/patches/curl-7.20.0-lrt.patch new file mode 100644 index 0000000..775f183 --- /dev/null +++ b/pkgs/core/curl/patches/curl-7.20.0-lrt.patch @@ -0,0 +1,30 @@ + src/Makefile.am | 2 +- + tests/libtest/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 3672458..890893d 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -49,7 +49,7 @@ include Makefile.inc + # This might hold -Werror + CFLAGS += @CURL_CFLAG_EXTRAS@ + +-curl_LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@ ++curl_LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@ -lrt + curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la + BUILT_SOURCES = hugehelp.c + CLEANFILES = hugehelp.c +diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am +index 70b0f12..6512ce4 100644 +--- a/tests/libtest/Makefile.am ++++ b/tests/libtest/Makefile.am +@@ -54,7 +54,7 @@ EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \ + test1022.pl Makefile.inc + + # Dependencies (may need to be overriden) +-LDADD = $(top_builddir)/lib/libcurl.la ++LDADD = $(top_builddir)/lib/libcurl.la -lrt + DEPENDENCIES = $(top_builddir)/lib/libcurl.la + + # Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES, diff --git a/pkgs/core/cyrus-sasl/cyrus-sasl.nm b/pkgs/core/cyrus-sasl/cyrus-sasl.nm index 2d40a12..1bdc1fa 100644 --- a/pkgs/core/cyrus-sasl/cyrus-sasl.nm +++ b/pkgs/core/cyrus-sasl/cyrus-sasl.nm @@ -34,7 +34,7 @@ PKG_URL = http://asg.web.cmu.edu/sasl/sasl-library.html PKG_LICENSE = BSD PKG_SUMMARY = The Cyrus SASL library.
-PKG_DEPS += db openssl pam +PKG_BUILD_DEPS+= db-devel openssl-devel pam-devel
define PKG_DESCRIPTION The cyrus-sasl package contains the Cyrus implementation of SASL. \ @@ -44,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --with-dbpath=/var/lib/sasl/sasldb2 \ diff --git a/pkgs/core/db/db.nm b/pkgs/core/db/db.nm index 392b73a..de0c54c 100644 --- a/pkgs/core/db/db.nm +++ b/pkgs/core/db/db.nm @@ -25,7 +25,9 @@ include $(PKGROOT)/Include
PKG_NAME = db -PKG_VER = 4.7.25 +PKG_VER_MAJ = 4.7 +PKG_VER_MIN = 25 +PKG_VER = $(PKG_VER_MAJ).$(PKG_VER_MIN) PKG_REL = 0
PKG_MAINTAINER = @@ -34,6 +36,8 @@ PKG_URL = http://www.oracle.com/technology/products/berkeley-db/ PKG_LICENSE = Proprietary PKG_SUMMARY = Berkeley DB is a library that provides an embedded database.
+PKG_BUILD_DEPS+= gcc-c++ + define PKG_DESCRIPTION Berkeley DB (BDB) is a computer software library that provides \ a high-performance embedded database. @@ -41,9 +45,12 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-############################################################################### -# Installation Details -############################################################################### +PKG_PACKAGES = $(PKG_NAME)-devel $(PKG_NAME)-utils $(PKG_NAME) $(PKG_NAME)-cxx + +PKG_FILES = /usr/lib/libdb-$(PKG_VER_MAJ).so +PKG_FILES-$(PKG_NAME)-cxx = /usr/lib/libdb_cxx-$(PKG_VER_MAJ).so +PKG_FILES-$(PKG_NAME)-devel = /usr/include /usr/lib +PKG_FILES-$(PKG_NAME)-utils = /usr/bin
define STAGE_BUILD cd $(DIR_APP)/build_unix && \ diff --git a/pkgs/core/dbus-glib/dbus-glib.nm b/pkgs/core/dbus-glib/dbus-glib.nm index 4a1fe36..f5051bb 100644 --- a/pkgs/core/dbus-glib/dbus-glib.nm +++ b/pkgs/core/dbus-glib/dbus-glib.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.freedesktop.org/software/dbus/ PKG_LICENSE = GPLv2+ AFL PKG_SUMMARY = Glib bindings for D-Bus.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += dbus glib2 expat +PKG_BUILD_DEPS+= dbus dbus-devel expat-devel gettext glib2-devel pkg-config
define PKG_DESCRIPTION D-Bus add-on library to integrate the standard D-Bus library with \ @@ -44,6 +43,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --libdir=/lib \ diff --git a/pkgs/core/dbus/dbus.nm b/pkgs/core/dbus/dbus.nm index b0cf158..ba149e1 100644 --- a/pkgs/core/dbus/dbus.nm +++ b/pkgs/core/dbus/dbus.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.freedesktop.org/software/dbus/ PKG_LICENSE = GPLv2+ AFL PKG_SUMMARY = D-BUS message bus.
-PKG_DEPS += expat +PKG_BUILD_DEPS+= expat-devel
define PKG_DESCRIPTION D-BUS is a system for sending messages between applications. It is \ @@ -44,6 +44,10 @@ endef
PKG_TARBALL = $(THISAPP).885483.tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + +PKG_FILES-$(PKG_NAME)-devel += /usr/lib/dbus-1.0 + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --localstatedir=/var \ diff --git a/pkgs/core/directfb/directfb.nm b/pkgs/core/directfb/directfb.nm index 98ffa7e..163401f 100644 --- a/pkgs/core/directfb/directfb.nm +++ b/pkgs/core/directfb/directfb.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.directfb.org/ PKG_LICENSE = LGPLv2+ PKG_SUMMARY = Graphics abstraction library for the Linux Framebuffer Device.
-PKG_DEPS += freetype libjpeg sysfsutils zlib +PKG_BUILD_DEPS+= freetype-devel libjpeg-devel perl sysfsutils-devel zlib-devel
define PKG_DESCRIPTION DirectFB is a thin library that provides hardware graphics acceleration, \ @@ -45,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME_REAL)-devel + # XXX Needs a double check ifneq "$(TARGET)" "i686" ifneq "$(TARGET)" "i586" diff --git a/pkgs/core/dmraid/dmraid.nm b/pkgs/core/dmraid/dmraid.nm index 8a85d64..0c1d660 100644 --- a/pkgs/core/dmraid/dmraid.nm +++ b/pkgs/core/dmraid/dmraid.nm @@ -34,7 +34,7 @@ PKG_URL = http://people.redhat.com/heinzm/sw/dmraid PKG_LICENSE = GPLv2+ PKG_SUMMARY = Device-mapper RAID tool and library.
-PKG_DEPS += lvm2 +PKG_BUILD_DEPS+= libdevmapper-devel
define PKG_DESCRIPTION DMRAID supports RAID device discovery, RAID set activation, creation, \ @@ -44,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + DIR_APP = $(DIR_SRC)/$(PKG_NAME)/$(PKG_VER)
PARALLELISMFLAGS = # Disabled diff --git a/pkgs/core/dracut/dracut.nm b/pkgs/core/dracut/dracut.nm index e7aa89a..7059b2f 100644 --- a/pkgs/core/dracut/dracut.nm +++ b/pkgs/core/dracut/dracut.nm @@ -34,8 +34,8 @@ PKG_URL = http://sourceforge.net/apps/trac/dracut/wiki PKG_LICENSE = GPLv2+ PKG_SUMMARY = Initramfs generator using udev.
-PKG_DEPS += bash bzip2 cpio coreutils dmraid e2fsprogs gzip kbd lvm2 \ - mdadm udev which +PKG_DEPS += bash bzip2 cpio coreutils dmraid e2fsprogs gzip iproute2 kbd \ + less lvm2 mdadm multipath-tools sysvinit udev util-linux-ng which
define PKG_DESCRIPTION dracut is a new, event-driven initramfs infrastructure based around udev. diff --git a/pkgs/core/e2fsprogs/e2fsprogs.nm b/pkgs/core/e2fsprogs/e2fsprogs.nm index 392ef76..12accd3 100644 --- a/pkgs/core/e2fsprogs/e2fsprogs.nm +++ b/pkgs/core/e2fsprogs/e2fsprogs.nm @@ -42,8 +42,7 @@ define PKG_DESCRIPTION and third extended (ext2/ext3) filesystems. endef
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += util-linux-ng +PKG_BUILD_DEPS+= pkg-config util-linux-ng-devel
PKG_TARBALL = $(THISAPP).tar.gz
diff --git a/pkgs/core/eggdbus/eggdbus.nm b/pkgs/core/eggdbus/eggdbus.nm index ae602e8..126a1d9 100644 --- a/pkgs/core/eggdbus/eggdbus.nm +++ b/pkgs/core/eggdbus/eggdbus.nm @@ -34,7 +34,7 @@ PKG_URL = http://cgit.freedesktop.org/~david/eggdbus PKG_LICENSE = LGPLv2+ PKG_SUMMARY = Experimental D-Bus bindings for GObject.
-PKG_DEPS += dbus dbus-glib glib2 +PKG_BUILD_DEPS+= dbus-devel dbus-glib-devel glib2-devel pkg-config
define PKG_DESCRIPTION Experimental D-Bus bindings for GObject. @@ -42,6 +42,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --disable-static
diff --git a/pkgs/core/elfutils/elfutils.nm b/pkgs/core/elfutils/elfutils.nm index a78ef36..0063693 100644 --- a/pkgs/core/elfutils/elfutils.nm +++ b/pkgs/core/elfutils/elfutils.nm @@ -34,7 +34,7 @@ PKG_URL = https://fedorahosted.org/elfutils/ PKG_LICENSE = GPLv2 with exceptions PKG_SUMMARY = A collection of utilities and DSOs to handle compiled objects.
-PKG_DEPS += bzip2 xz zlib +PKG_BUILD_DEPS+= bzip2-devel m4 xz-devel zlib-devel
define PKG_DESCRIPTION Elfutils is a collection of utilities, including ld (a linker), \ @@ -46,6 +46,10 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + +PKG_DEPS-$(PKG_NAME)-devel = $(PKG_NAME)-libs + CONFIGURE_OPTIONS += \ --program-prefix=eu-
diff --git a/pkgs/core/eventlog/eventlog.nm b/pkgs/core/eventlog/eventlog.nm index b13f9c8..8a4901d 100644 --- a/pkgs/core/eventlog/eventlog.nm +++ b/pkgs/core/eventlog/eventlog.nm @@ -42,6 +42,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += --libdir=/lib
define STAGE_INSTALL_CMDS diff --git a/pkgs/core/expat/expat.nm b/pkgs/core/expat/expat.nm index e4e7ada..1414959 100644 --- a/pkgs/core/expat/expat.nm +++ b/pkgs/core/expat/expat.nm @@ -45,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += --libdir=/lib --mandir=/usr/share
define STAGE_INSTALL_CMDS diff --git a/pkgs/core/expect/expect.nm b/pkgs/core/expect/expect.nm index 6c3a10b..fe5bdb5 100644 --- a/pkgs/core/expect/expect.nm +++ b/pkgs/core/expect/expect.nm @@ -25,7 +25,7 @@ include $(PKGROOT)/Include
PKG_NAME = expect -PKG_VER = 5.44.1.15 +PKG_VER = 5.43 PKG_REL = 0
PKG_MAINTAINER = @@ -34,8 +34,7 @@ PKG_URL = http://expect.nist.gov/ PKG_LICENSE = Public Domain PKG_SUMMARY = A program-script interaction and testing utility.
-PKG_BUILD_DEPS+= autoconf automake -PKG_DEPS += tcl +PKG_BUILD_DEPS+= autoconf automake tcl
define PKG_DESCRIPTION xpect is a tcl application for automating and testing \ @@ -44,27 +43,22 @@ define PKG_DESCRIPTION control another program and interact with it. endef
-PKG_TARBALL = $(THISAPP).tar.gz - -QUALITY_AGENT_WHITELIST_RPATH = /usr/lib +PKG_TARBALL = $(THISAPP).0.tar.gz
CONFIGURE_OPTIONS = \ --mandir=/usr/share/man \ --with-tcl=/usr/lib \ --with-tclinclude=/usr/include/ \ --with-x=no \ - --without-tk - -define STAGE_CONFIGURE_CMDS - # Disable stubs - cd $(DIR_APP) && sed -e "s/tclstub/tcl/g" -i Makefile -endef + --enable-shared
define STAGE_TEST cd $(DIR_APP) && make test endef
-define STAGE_INSTALL_CMDS +define STAGE_INSTALL + cd $(DIR_APP) && make install INSTALL_ROOT=$(BUILDROOT) + # remove cryptdir/decryptdir, as Linux has no crypt command rm -f $(BUILDROOT)/usr/bin/{cryptdir,decryptdir} rm -f $(BUILDROOT)/usr/share/man1/{cryptdir,decryptdir}.1* diff --git a/pkgs/core/expect/patches/expect-5.38.0-lib-spec.patch b/pkgs/core/expect/patches/expect-5.38.0-lib-spec.patch new file mode 100644 index 0000000..803f858 --- /dev/null +++ b/pkgs/core/expect/patches/expect-5.38.0-lib-spec.patch @@ -0,0 +1,12 @@ +diff -up expect-5.43/configure.in.lib-spec expect-5.43/configure.in +--- expect-5.43/configure.in.lib-spec 2005-02-08 02:45:06.000000000 +0100 ++++ expect-5.43/configure.in 2008-09-25 12:23:26.000000000 +0200 +@@ -1141,7 +1141,7 @@ if test $ac_cv_sys_long_file_names = no; + fi + + EXP_BUILD_LIB_SPEC="-L`pwd` -lexpect${EXP_LIB_VERSION}${DBGX}" +-EXP_LIB_SPEC="-L${INSTALL_ROOT}${exec_prefix}/lib -lexpect${EXP_LIB_VERSION}${DBGX}" ++EXP_LIB_SPEC="-L${libdir}/../.. -lexpect${EXP_LIB_VERSION}${DBGX}" + EXP_UNSHARED_LIB_FILE=libexpect${EXP_LIB_VERSION}${DBGX}.a + + # The TCL_SHARED_LIB_SUFFIX macro below relies on the DBGX macro, diff --git a/pkgs/core/expect/patches/expect-5.39.0-libdir.patch b/pkgs/core/expect/patches/expect-5.39.0-libdir.patch new file mode 100644 index 0000000..8546c90 --- /dev/null +++ b/pkgs/core/expect/patches/expect-5.39.0-libdir.patch @@ -0,0 +1,12 @@ +diff -up expect-5.43/Makefile.in.libdir expect-5.43/Makefile.in +--- expect-5.43/Makefile.in.libdir 2004-05-07 20:10:30.000000000 +0200 ++++ expect-5.43/Makefile.in 2008-09-25 12:24:08.000000000 +0200 +@@ -317,7 +317,7 @@ EXP_AND_TK_LIBS = $(LDFLAGS) @EXP_AND_TK + CFLAGS_INT = $(MH_CFLAGS) $(CPPFLAGS) $(XCFLAGS) + + LIB_INSTALL_DIR = $(tcl_libdir) +-LIB_RUNTIME_DIR = $(tcl_libdir) ++LIB_RUNTIME_DIR = $(subst $(INSTALL_ROOT),,$(tcl_libdir)) + # I don't understand why Tcl splits these up, but it does. LIB_RUNTIME_DIR + # can appear as part of the LD_SEARCH_FLAGS inherited by configure. + diff --git a/pkgs/core/expect/patches/expect-5.43.0-override_default_prefix.patch b/pkgs/core/expect/patches/expect-5.43.0-override_default_prefix.patch new file mode 100644 index 0000000..54fe1e8 --- /dev/null +++ b/pkgs/core/expect/patches/expect-5.43.0-override_default_prefix.patch @@ -0,0 +1,12 @@ +diff -Nur expect-5.43_old/configure expect-5.43_new/configure +--- expect-5.43_old/configure 2010-03-10 10:11:41.000000000 +0100 ++++ expect-5.43_new/configure 2010-03-10 10:12:01.000000000 +0100 +@@ -9,7 +9,7 @@ + + # Defaults: + ac_help= +-ac_default_prefix=/usr/local ++ac_default_prefix=/usr + # Any additions from configure.in: + ac_help="$ac_help + --enable-threads build with threads (not supported)" diff --git a/pkgs/core/expect/patches/expect-5.43.0-spawn-1.patch b/pkgs/core/expect/patches/expect-5.43.0-spawn-1.patch new file mode 100644 index 0000000..c2033c0 --- /dev/null +++ b/pkgs/core/expect/patches/expect-5.43.0-spawn-1.patch @@ -0,0 +1,217 @@ +Submitted By: LFS Book lfs-book@linuxfromscratch.org +Date: 2003-10-05 +Initial Package Version: 5.38 +Origin: Redhat RPM (Patch by HJ Lu) +Description: NA +diff -uNr expect-5.38.orig/exp_chan.c expect-5.38/exp_chan.c +--- expect-5.38.orig/exp_chan.c 2002-02-12 13:00:55.000000000 +1100 ++++ expect-5.38/exp_chan.c 2003-03-01 10:36:18.000000000 +1100 +@@ -519,6 +519,7 @@ + esPtr->buffer = Tcl_NewStringObj("",0); + Tcl_IncrRefCount(esPtr->buffer); + esPtr->umsize = exp_default_match_max; ++ esPtr->umsize_changed = exp_default_match_max_changed; + /* this will reallocate object with an appropriate sized buffer */ + expAdjust(esPtr); + +diff -uNr expect-5.38.orig/exp_command.h expect-5.38/exp_command.h +--- expect-5.38.orig/exp_command.h 2002-04-08 08:57:20.000000000 +1000 ++++ expect-5.38/exp_command.h 2003-03-01 10:36:18.000000000 +1100 +@@ -25,6 +25,7 @@ + EXTERN char * exp_get_var _ANSI_ARGS_((Tcl_Interp *,char *)); + + EXTERN int exp_default_match_max; ++EXTERN int exp_default_match_max_changed; + EXTERN int exp_default_parity; + EXTERN int exp_default_rm_nulls; + +@@ -97,6 +98,7 @@ + int msize; /* # of bytes that buffer can hold (max) */ + int umsize; /* # of bytes (min) that is guaranteed to match */ + /* this comes from match_max command */ ++ int umsize_changed; /* is umsize changed by user? */ + int printed; /* # of bytes written to stdout (if logging on) */ + /* but not actually returned via a match yet */ + int echoed; /* additional # of bytes (beyond "printed" above) */ +diff -uNr expect-5.38.orig/expect.c expect-5.38/expect.c +--- expect-5.38.orig/expect.c 2002-04-08 09:00:33.000000000 +1000 ++++ expect-5.38/expect.c 2003-03-01 10:36:18.000000000 +1100 +@@ -41,8 +41,17 @@ + #include "tcldbg.h" + #endif + ++/* The initial length is 2000. We increment it by 2000. The maximum ++ is 8MB (0x800000). */ ++#define EXP_MATCH_MAX 2000 ++#define EXP_MATCH_INC 2000 ++#define EXP_MATCH_STEP_LIMIT 0x700000 ++#define EXP_MATCH_LIMIT 0x800000 ++#define EXP_MATCH_LIMIT_QUOTE "0x800000" ++ + /* initial length of strings that we can guarantee patterns can match */ +-int exp_default_match_max = 2000; ++int exp_default_match_max = EXP_MATCH_MAX; ++int exp_default_match_max_changed = 0; + #define INIT_EXPECT_TIMEOUT_LIT "10" /* seconds */ + #define INIT_EXPECT_TIMEOUT 10 /* seconds */ + int exp_default_parity = TRUE; +@@ -1618,6 +1627,76 @@ + return newsize; + } + ++/* returns # of bytes until we see a newline at the end or EOF. */ ++/*ARGSUSED*/ ++static int ++expReadNewLine(interp,esPtr,save_flags) /* INTL */ ++Tcl_Interp *interp; ++ExpState *esPtr; ++int save_flags; ++{ ++ int size; ++ int exp_size; ++ int full_size; ++ int count; ++ char *str; ++ ++ count = 0; ++ for (;;) { ++ exp_size = expSizeGet(esPtr); ++ ++ /* When we reach the limit, we will only read one char at a ++ time. */ ++ if (esPtr->umsize >= EXP_MATCH_STEP_LIMIT) ++ size = TCL_UTF_MAX; ++ else ++ size = exp_size; ++ ++ if (exp_size + TCL_UTF_MAX >= esPtr->msize) { ++ if (esPtr->umsize >= EXP_MATCH_LIMIT) { ++ expDiagLogU("WARNING: interact buffer is full. probably your program\r\n"); ++ expDiagLogU("is not interactive or has a very long output line. The\r\n"); ++ expDiagLogU("current limit is " EXP_MATCH_LIMIT_QUOTE ".\r\n"); ++ expDiagLogU("Dumping first half of buffer in order to continue\r\n"); ++ expDiagLogU("Recommend you enlarge the buffer.\r\n"); ++ exp_buffer_shuffle(interp,esPtr,save_flags,EXPECT_OUT,"expect"); ++ return count; ++ } ++ else { ++ esPtr->umsize += EXP_MATCH_INC; ++ expAdjust(esPtr); ++ } ++ } ++ ++ full_size = esPtr->msize - (size / TCL_UTF_MAX); ++ size = Tcl_ReadChars(esPtr->channel, ++ esPtr->buffer, ++ full_size, ++ 1 /* append */); ++ if (size > 0) { ++ count += size; ++ /* We try again if there are more to read and we haven't ++ seen a newline at the end. */ ++ if (size == full_size) { ++ str = Tcl_GetStringFromObj(esPtr->buffer, &size); ++ if (str[size - 1] != '\n') ++ continue; ++ } ++ } ++ else { ++ /* It is even trickier. We got an error from read. We have ++ to recover from it. Let's make sure the size of ++ buffer is correct. It can be corrupted. */ ++ str = Tcl_GetString(esPtr->buffer); ++ Tcl_SetObjLength(esPtr->buffer, strlen(str)); ++ } ++ ++ break; ++ } ++ ++ return count; ++} ++ + /* returns # of bytes read or (non-positive) error of form EXP_XXX */ + /* returns 0 for end of file */ + /* If timeout is non-zero, set an alarm before doing the read, else assume */ +@@ -1632,6 +1711,8 @@ + { + int cc = EXP_TIMEOUT; + int size = expSizeGet(esPtr); ++ int full_size; ++ int count; + + if (size + TCL_UTF_MAX >= esPtr->msize) + exp_buffer_shuffle(interp,esPtr,save_flags,EXPECT_OUT,"expect"); +@@ -1648,11 +1729,43 @@ + } + #endif + +- ++ /* FIXME: If we ask less than what is available in the tcl buffer ++ when tcl has seen EOF, we will throw away the remaining data ++ since the next read will get EOF. Since expect is line-oriented, ++ we exand our buffer to get EOF or the next newline at the end of ++ the input buffer. I don't know if it is the right fix. H.J. */ ++ count = 0; ++ full_size = esPtr->msize - (size / TCL_UTF_MAX); + cc = Tcl_ReadChars(esPtr->channel, +- esPtr->buffer, +- esPtr->msize - (size / TCL_UTF_MAX), +- 1 /* append */); ++ esPtr->buffer, ++ full_size, ++ 1 /* append */); ++ if (cc > 0) { ++ count += cc; ++ /* It gets very tricky. There are more to read. We will expand ++ our buffer and get EOF or a newline at the end unless the ++ buffer length has been changed. */ ++ if (cc == full_size) { ++ char *str; ++ str = Tcl_GetStringFromObj(esPtr->buffer, &size); ++ if (str[size - 1] != '\n') { ++ if (esPtr->umsize_changed) { ++ char buf[20]; /* big enough for 64bit int in hex. */ ++ snprintf(buf,sizeof(buf),"0x%x", esPtr->umsize); ++ expDiagLogU("WARNING: interact buffer is not large enough to hold\r\n"); ++ expDiagLogU("all output. probably your program is not interactive or\r\n"); ++ expDiagLogU("has a very long output line. The current limit is "); ++ expDiagLogU(buf); ++ expDiagLogU(".\r\n"); ++ } ++ else { ++ cc = expReadNewLine(interp,esPtr,save_flags); ++ if (cc > 0) ++ count += cc; ++ } ++ } ++ } ++ } + i_read_errno = errno; + + #ifdef SIMPLE_EVENT +@@ -1673,7 +1786,7 @@ + } + } + #endif +- return cc; ++ return count > 0 ? count : cc; + } + + /* +@@ -2746,8 +2859,14 @@ + return(TCL_ERROR); + } + +- if (Default) exp_default_match_max = size; +- else esPtr->umsize = size; ++ if (Default) { ++ exp_default_match_max = size; ++ exp_default_match_max_changed = 1; ++ } ++ else { ++ esPtr->umsize = size; ++ esPtr->umsize_changed = 1; ++ } + + return(TCL_OK); + } diff --git a/pkgs/core/expect/patches/expect-5.43.0-tcl_8.5.8_fix-1.patch b/pkgs/core/expect/patches/expect-5.43.0-tcl_8.5.8_fix-1.patch new file mode 100644 index 0000000..5b9596a --- /dev/null +++ b/pkgs/core/expect/patches/expect-5.43.0-tcl_8.5.8_fix-1.patch @@ -0,0 +1,125 @@ +Submitted By: DJ Lucas <dj_AT_linuxfromscratch_DOT_org> +Date: 2008-09-28 +Initial Package Version: 5.43 +Upstream status: Not Submitted +Origin: LFS ticket 2126 (http://wiki.linuxfromscratch.org/lfs/ticket/2126) + Bryan Kadzban bryan@kadzban.is-a-geek.net +Description: Removes references to functions that Tcl 8.5 no longer exposes + and correct other minor build problems WRT TCL-8.5.x. + +diff -Naur expect-5.43-orig/Dbg.c expect-5.43/Dbg.c +--- expect-5.43-orig/Dbg.c 2002-03-22 22:11:54.000000000 -0600 ++++ expect-5.43/Dbg.c 2008-08-24 01:30:15.000000000 -0500 +@@ -9,7 +9,7 @@ + */ + + #include <stdio.h> +- ++#include "expect_cf.h" + #include "tcldbgcf.h" + #if 0 + /* tclInt.h drags in stdlib. By claiming no-stdlib, force it to drag in */ +diff -Naur expect-5.43-orig/exp_inter.c expect-5.43/exp_inter.c +--- expect-5.43-orig/exp_inter.c 2004-08-17 21:03:00.000000000 -0500 ++++ expect-5.43/exp_inter.c 2008-08-24 01:28:59.000000000 -0500 +@@ -36,6 +36,7 @@ + #include <ctype.h> + + #include "tcl.h" ++#include "tclInt.h" + #include "string.h" + + #include "exp_tty_in.h" +diff -Naur expect-5.43/exp_command.c expect-5.43-patched/exp_command.c +--- expect-5.43/exp_command.c 2004-08-20 13:18:01.000000000 -0400 ++++ expect-5.43-patched/exp_command.c 2008-01-12 11:42:45.000000000 -0500 +@@ -2265,6 +2265,8 @@ + /*NOTREACHED*/ + } + ++static struct exp_cmd_data cmd_data[]; ++ + /*ARGSUSED*/ + static int + Exp_CloseObjCmd(clientData, interp, objc, objv) +@@ -2311,12 +2313,23 @@ + /* Historical note: we used "close" long before there was a */ + /* Tcl builtin by the same name. */ + ++ /* The code that registered this function as the handler for */ ++ /* the "close" command stored away the old handler in the */ ++ /* exp_cmd_data for the "close" command. */ ++ ++ struct exp_cmd_data *cmd_ptr; + Tcl_CmdInfo info; ++ ++ for(cmd_ptr = &cmd_data[0]; cmd_ptr->name; cmd_ptr++) { ++ if(strncmp(cmd_ptr->name, "close", 5) == 0) ++ break; ++ } ++ + Tcl_ResetResult(interp); + if (0 == Tcl_GetCommandInfo(interp,"close",&info)) { + info.clientData = 0; + } +- return(Tcl_CloseObjCmd(info.clientData,interp,objc_orig,objv_orig)); ++ return(cmd_ptr->old_objProc(info.clientData,interp,objc_orig,objv_orig)); + } + + if (chanName) { +@@ -2961,7 +2974,10 @@ + /* if successful (i.e., TCL_RETURN is returned) */ + /* modify the result, so that we will handle it specially */ + +- int result = Tcl_ReturnObjCmd(clientData,interp,objc,objv); ++ Tcl_CmdInfo info; ++ Tcl_GetCommandInfo(interp, "return", &info); ++ ++ int result = info.objProc(clientData,interp,objc,objv); + if (result == TCL_RETURN) + result = EXP_TCL_RETURN; + return result; +@@ -3062,8 +3078,7 @@ + + for (;c->name;c++) { + /* if already defined, don't redefine */ +- if ((c->flags & EXP_REDEFINE) || +- !(Tcl_FindHashEntry(&globalNsPtr->cmdTable,c->name) || ++ if (!(Tcl_FindHashEntry(&globalNsPtr->cmdTable,c->name) || + Tcl_FindHashEntry(&currNsPtr->cmdTable,c->name))) { + if (c->objproc) + Tcl_CreateObjCommand(interp,c->name, +@@ -3072,6 +3087,21 @@ + Tcl_CreateCommand(interp,c->name,c->proc, + c->data,exp_deleteProc); + } ++ else if (c->flags & EXP_REDEFINE) { /* unless the REDEFINE flag is present */ ++ Tcl_CmdInfo info; ++ ++ if (Tcl_GetCommandInfo(interp, c->name, &info)) { ++ c->old_proc = info.proc; ++ c->old_objProc = info.objProc; ++ } ++ ++ if (c->objproc) ++ Tcl_CreateObjCommand(interp,c->name, ++ c->objproc,c->data,exp_deleteObjProc); ++ else ++ Tcl_CreateCommand(interp,c->name,c->proc, ++ c->data,exp_deleteProc); ++ } + if (!(c->name[0] == 'e' && + c->name[1] == 'x' && + c->name[2] == 'p') +diff -Naur expect-5.43/exp_command.h expect-5.43-patched/exp_command.h +--- expect-5.43/exp_command.h 2008-01-12 11:44:11.000000000 -0500 ++++ expect-5.43-patched/exp_command.h 2008-01-12 11:26:05.000000000 -0500 +@@ -297,6 +297,8 @@ + Tcl_CmdProc *proc; + ClientData data; + int flags; ++ Tcl_CmdProc *old_proc; /* these store the procedure for the old command, */ ++ Tcl_ObjCmdProc *old_objProc; /* if any */ + }; + + EXTERN void exp_create_commands _ANSI_ARGS_((Tcl_Interp *, diff --git a/pkgs/core/expect/patches/expect-5.44.1.15-no_tk-1.patch b/pkgs/core/expect/patches/expect-5.44.1.15-no_tk-1.patch deleted file mode 100644 index 35b6541..0000000 --- a/pkgs/core/expect/patches/expect-5.44.1.15-no_tk-1.patch +++ /dev/null @@ -1,134 +0,0 @@ -Submitted By: Matt Burgess <matthew_at_linuxfromscratch_dot_org> -Date: 2010-06-20 -Initial Package Version: 5.44.1.15 -Upstream Status: Submitted -Origin: Gilles Espinasse -Description: Allows the compilation of expectk to be disabled by - passing --with-tk=no to the configure script. - -diff -Naur expect-5.44.1.15.orig/INSTALL expect-5.44.1.15/INSTALL ---- expect-5.44.1.15.orig/INSTALL 2010-03-11 19:06:30.000000000 +0000 -+++ expect-5.44.1.15/INSTALL 2010-06-19 21:17:43.000000000 +0000 -@@ -152,6 +152,7 @@ - - --with-tk=... Specifies the directory containing Tk's - configure file (tkConfig.sh). -+ --with-tk=no disable Tk usage in expect - - --with-tkinclude=... Specifies the directory containing Tk's - private include files (such as tkInt.h) -diff -Naur expect-5.44.1.15.orig/Makefile.in expect-5.44.1.15/Makefile.in ---- expect-5.44.1.15.orig/Makefile.in 2010-03-11 19:06:30.000000000 +0000 -+++ expect-5.44.1.15/Makefile.in 2010-06-19 21:09:39.000000000 +0000 -@@ -103,7 +103,10 @@ - PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ - - lib_BINARIES = $(PKG_LIB_FILE) --bin_BINARIES = expect expectk -+bin_BINARIES = expect -+ifneq ($(TK_BIN_DIR),) -+ bin_BINARIES += expectk -+endif - BINARIES = $(lib_BINARIES) $(bin_BINARIES) - - SHELL = @SHELL@ -diff -Naur expect-5.44.1.15.orig/configure expect-5.44.1.15/configure ---- expect-5.44.1.15.orig/configure 2010-03-11 19:06:30.000000000 +0000 -+++ expect-5.44.1.15/configure 2010-06-19 21:27:51.000000000 +0000 -@@ -1754,6 +1754,12 @@ - withval="$with_tk" - with_tkconfig=${withval} - fi; -+ -+ if test x"${with_tkconfig}" = x"no" ; then -+ echo "$as_me:$LINENO: result: Tk is disabled by --with-tk=no" >&5 -+echo "${ECHO_T}Tk is disabled by --with-tk=no" >&6 -+ unset TK_BIN_DIR -+ else - echo "$as_me:$LINENO: checking for Tk configuration" >&5 - echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6 - if test "${ac_cv_c_tkconfig+set}" = set; then -@@ -1873,6 +1879,7 @@ - echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 - echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6 - fi -+ fi - fi - - -@@ -6458,6 +6465,11 @@ - echo "${ECHO_T}Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" >&6 - - -+ if test x"${with_tkconfig}" = x"no" ; then -+ TK_INCLUDES="" -+ -+ else -+ - echo "$as_me:$LINENO: checking for Tk public headers" >&5 - echo $ECHO_N "checking for Tk public headers... $ECHO_C" >&6 - -@@ -6556,6 +6568,7 @@ - echo "$as_me:$LINENO: result: ${INCLUDE_DIR_NATIVE}" >&5 - echo "${ECHO_T}${INCLUDE_DIR_NATIVE}" >&6 - fi -+ fi - - - #-------------------------------------------------------------------- -diff -Naur expect-5.44.1.15.orig/tclconfig/tcl.m4 expect-5.44.1.15/tclconfig/tcl.m4 ---- expect-5.44.1.15.orig/tclconfig/tcl.m4 2010-03-11 19:06:30.000000000 +0000 -+++ expect-5.44.1.15/tclconfig/tcl.m4 2010-06-19 21:17:02.000000000 +0000 -@@ -181,10 +181,12 @@ - # - # Adds the following arguments to configure: - # --with-tk=... -+# --with-tk=no disable Tk is disabled - # - # Defines the following vars: - # TK_BIN_DIR Full path to the directory containing - # the tkConfig.sh file -+# Empty if Tk is disabled - #------------------------------------------------------------------------ - - AC_DEFUN(TEA_PATH_TKCONFIG, [ -@@ -201,6 +203,11 @@ - AC_HELP_STRING([--with-tk], - [directory containing tk configuration (tkConfig.sh)]), - with_tkconfig=${withval}) -+ -+ if test x"${with_tkconfig}" = x"no" ; then -+ AC_MSG_RESULT([Tk is disabled by --with-tk=no]) -+ unset TK_BIN_DIR -+ else - AC_MSG_CHECKING([for Tk configuration]) - AC_CACHE_VAL(ac_cv_c_tkconfig,[ - -@@ -309,6 +316,7 @@ - TK_BIN_DIR=${ac_cv_c_tkconfig} - AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh]) - fi -+ fi - fi - ]) - -@@ -3528,6 +3536,11 @@ - #------------------------------------------------------------------------ - - AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [ -+ if test x"${with_tkconfig}" = x"no" ; then -+ TK_INCLUDES="" -+ AC_SUBST(TK_INCLUDES) -+ else -+ - AC_MSG_CHECKING([for Tk public headers]) - - AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval}) -@@ -3608,6 +3621,7 @@ - fi - AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}]) - fi -+ fi - ]) - - #------------------------------------------------------------------------ diff --git a/pkgs/core/file/file.nm b/pkgs/core/file/file.nm index a11d14a..159eb21 100644 --- a/pkgs/core/file/file.nm +++ b/pkgs/core/file/file.nm @@ -43,6 +43,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += file-devel + ############################################################################### # Installation Details ############################################################################### diff --git a/pkgs/core/firewall/firewall.nm b/pkgs/core/firewall/firewall.nm index d8cdaaa..e2e3625 100644 --- a/pkgs/core/firewall/firewall.nm +++ b/pkgs/core/firewall/firewall.nm @@ -34,6 +34,7 @@ PKG_URL = http://www.ipfire.org/ PKG_LICENSE = GPLv3+ PKG_SUMMARY = The IPFire Firewall Engine.
+PKG_BUILD_DEPS = # Empty PKG_DEPS += iproute2 iptables
define PKG_DESCRIPTION diff --git a/pkgs/core/flex/flex.nm b/pkgs/core/flex/flex.nm index ee12293..90e953b 100644 --- a/pkgs/core/flex/flex.nm +++ b/pkgs/core/flex/flex.nm @@ -34,9 +34,11 @@ PKG_URL = http://flex.sourceforge.net/ PKG_LICENSE = BSD PKG_SUMMARY = A tool for creating scanners (text pattern recognizers).
-PKG_BUILD_DEPS+= bison +PKG_BUILD_DEPS+= bison m4 PKG_DEPS += m4
+# XXX possibly we can remove libfl_pic and things in /usr/include + define PKG_DESCRIPTION The flex program generates scanners. Scanners are programs which can \ recognize lexical patterns in text. Flex takes pairs of regular \ diff --git a/pkgs/core/fontconfig/fontconfig.nm b/pkgs/core/fontconfig/fontconfig.nm index e930cc1..a81fe65 100644 --- a/pkgs/core/fontconfig/fontconfig.nm +++ b/pkgs/core/fontconfig/fontconfig.nm @@ -34,8 +34,7 @@ PKG_URL = http://fontconfig.org/ PKG_LICENSE = MIT PKG_SUMMARY = Font configuration and customization library.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += freetype libxml2 +PKG_BUILD_DEPS+= freetype-devel libxml2-devel pkg-config
define PKG_DESCRIPTION Fontconfig is designed to locate fonts within the \ @@ -45,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --localstatedir=/var \ diff --git a/pkgs/core/freeradius/freeradius.nm b/pkgs/core/freeradius/freeradius.nm index eadaad0..01b1f35 100644 --- a/pkgs/core/freeradius/freeradius.nm +++ b/pkgs/core/freeradius/freeradius.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.freeradius.org PKG_LICENSE = GPLv2+ and LGPLv2+ PKG_SUMMARY = High-performance and highly configurable free RADIUS server.
-PKG_BUILD_DEPS+= libtool -PKG_DEPS += gdbm libpcap openssl perl +PKG_BUILD_DEPS+= gdbm-devel libpcap-devel libtool libtool-devel openssl-devel \ + perl
define PKG_DESCRIPTION The FreeRADIUS Server Project is a high performance and highly \ diff --git a/pkgs/core/freetype/freetype.nm b/pkgs/core/freetype/freetype.nm index 3c39f80..7e0b4f0 100644 --- a/pkgs/core/freetype/freetype.nm +++ b/pkgs/core/freetype/freetype.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.freetype.org/ PKG_LICENSE = FTL GPLv2+ PKG_SUMMARY = A free and portable font rendering engine.
-PKG_DEPS += zlib +PKG_BUILD_DEPS+= zlib-devel
define PKG_DESCRIPTION The FreeType engine is a free and portable font rendering \ @@ -47,6 +47,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + define STAGE_PREPARE_CMDS cd $(DIR_APP) && \ sed -i -r -e 's:.*(#.*BYTE.*) .*:\1:' \ diff --git a/pkgs/core/gcc/gcc.nm b/pkgs/core/gcc/gcc.nm index 14fe53c..fb94bac 100644 --- a/pkgs/core/gcc/gcc.nm +++ b/pkgs/core/gcc/gcc.nm @@ -39,8 +39,9 @@ define PKG_DESCRIPTION You'll need this package in order to compile C code. endef
-PKG_BUILD_DEPS = autogen dejagnu expect -PKG_DEPS += binutils cloog elfutils glibc gmp kernel-headers libffi mpc mpfr ppl +PKG_BUILD_DEPS+= autogen cloog-devel dejagnu elfutils-devel expect gmp-devel \ + libffi-devel mpc-devel mpfr-devel pkg-config ppl-devel zlib-devel +PKG_DEPS-gcc += binutils libgcc-devel
ifeq "$(MACHINE)" "i586" CONFIGURE_ARGS = --disable-decimal-float @@ -54,9 +55,59 @@ endif
PKG_TARBALL += $(THISAPP).tar.gz
-############################################################################### -# Installation Details -############################################################################### +# A package for C++ +PKG_PACKAGES += $(PKG_NAME)-c++ +PKG_DEPS-$(PKG_NAME)-c++ = gcc libstdc++-devel +define PKG_FILES-$(PKG_NAME)-c++ + /usr/bin/*++ + /usr/lib/gcc/*/*/cc1plus + /usr/share/man/man*/*++* +endef + +# libgcc +PKG_PACKAGES += libgcc +define PKG_FILES-libgcc + /usr/lib/libgcc*.so.* +endef + +PKG_PACKAGES += libgcc-devel +define PKG_FILES-libgcc-devel + /usr/lib/libgcc*.so +endef + +# libstdc++ +PKG_PACKAGES += libstdc++ +define PKG_FILES-libstdc++ + /usr/lib/libstdc++*.so.* +endef + +PKG_PACKAGES += libstdc++-devel +define PKG_FILES-libstdc++-devel + /usr/include/c++ + /usr/lib/libstdc++*.so +endef + +# libgomp +PKG_PACKAGES += libgomp +define PKG_FILES-libgomp + /usr/lib/libgomp*.so.* +endef + +PKG_PACKAGES += libgomp-devel +define PKG_FILES-libgomp-devel + /usr/lib/libgomp*.so +endef + +# libmudflap +PKG_PACKAGES += libmudflap +define PKG_FILES-libmudflap + /usr/lib/libmudflap*.so.* +endef + +PKG_PACKAGES += libmudflap-devel +define PKG_FILES-libmudflap-devel + /usr/lib/libmudflap*.so +endef
define STAGE_PREPARE_CMDS -mkdir -v $(DIR_SRC)/gcc-build @@ -91,6 +142,8 @@ endef
define STAGE_BUILD cd $(DIR_SRC)/gcc-build && \ + XCFLAGS="$(CFLAGS)" \ + TCFLAGS="$(CFLAGS)" \ ../$(THISAPP)/configure \ $(CONFIG_CPU) \ --prefix=/usr \ @@ -101,12 +154,14 @@ define STAGE_BUILD --enable-threads=posix \ --enable-__cxa_atexit \ --enable-clocale=gnu \ - --enable-languages=c,c++ \ - --enable-lto \ - --disable-bootstrap \ + --enable-languages=c,c++,lto \ + --enable-bootstrap \ + --enable-checking=release \ --disable-werror \ --disable-libssp \ --disable-static \ + --with-system-zlib \ + --with-bugurl=http://bugtracker.ipfire.org \ $(CONFIGURE_ARGS)
cd $(DIR_SRC)/gcc-build && make $(PARALLELISMFLAGS) diff --git a/pkgs/core/gcc/patches/gcc-4.5.0-no-add-needed.patch b/pkgs/core/gcc/patches/gcc-4.5.0-no-add-needed.patch new file mode 100644 index 0000000..792bcb8 --- /dev/null +++ b/pkgs/core/gcc/patches/gcc-4.5.0-no-add-needed.patch @@ -0,0 +1,52 @@ +2010-02-08 Roland McGrath roland@redhat.com + + * config/rs6000/sysv4.h (LINK_EH_SPEC): Pass --no-add-needed to the + linker. + * config/linux.h (LINK_EH_SPEC): Likewise. + * config/alpha/elf.h (LINK_EH_SPEC): Likewise. + * config/ia64/linux.h (LINK_EH_SPEC): Likewise. + +--- a/gcc/config/alpha/elf.h.~1~ ++++ b/gcc/config/alpha/elf.h +@@ -421,7 +421,7 @@ extern int alpha_this_gpdisp_sequence_nu + I imagine that other systems will catch up. In the meantime, it + doesn't harm to make sure that the data exists to be used later. */ + #if defined(HAVE_LD_EH_FRAME_HDR) +-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " + #endif + + /* A C statement (sans semicolon) to output to the stdio stream STREAM +--- a/gcc/config/ia64/linux.h.~1~ ++++ b/gcc/config/ia64/linux.h +@@ -58,7 +58,7 @@ do { \ + Signalize that because we have fde-glibc, we don't need all C shared libs + linked against -lgcc_s. */ + #undef LINK_EH_SPEC +-#define LINK_EH_SPEC "" ++#define LINK_EH_SPEC "--no-add-needed " + + #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" + +--- a/gcc/config/linux.h.~1~ ++++ b/gcc/config/linux.h +@@ -89,7 +89,7 @@ see the files COPYING3 and COPYING.RUNTI + } while (0) + + #if defined(HAVE_LD_EH_FRAME_HDR) +-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " + #endif + + /* Define this so we can compile MS code for use with WINE. */ +--- a/gcc/config/rs6000/sysv4.h.~1~ ++++ b/gcc/config/rs6000/sysv4.h +@@ -917,7 +917,7 @@ SVR4_ASM_SPEC \ + %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}" + + #if defined(HAVE_LD_EH_FRAME_HDR) +-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " + #endif + + #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \ diff --git a/pkgs/core/gdb/gdb.nm b/pkgs/core/gdb/gdb.nm index f26d0cb..b7904aa 100644 --- a/pkgs/core/gdb/gdb.nm +++ b/pkgs/core/gdb/gdb.nm @@ -34,7 +34,8 @@ PKG_URL = http://gnu.org/software/gdb/ PKG_LICENSE = GPLv3+ PKG_SUMMARY = A GNU source-level debugger for C, C++, Java and other languages.
-PKG_DEPS += python readline zlib +PKG_BUILD_DEPS+= ncurses-devel readline-devel zlib-devel +PKG_DEPS += python
define PKG_DESCRIPTION GDB, the GNU debugger, allows you to debug programs written in C, C++, \ diff --git a/pkgs/core/gdbm/gdbm.nm b/pkgs/core/gdbm/gdbm.nm index 5587015..cf0d9f3 100644 --- a/pkgs/core/gdbm/gdbm.nm +++ b/pkgs/core/gdbm/gdbm.nm @@ -43,6 +43,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += --mandir=/usr/share/man
define STAGE_PREPARE_CMDS diff --git a/pkgs/core/glib2/glib2.nm b/pkgs/core/glib2/glib2.nm index 4c3ce5a..bbee6aa 100644 --- a/pkgs/core/glib2/glib2.nm +++ b/pkgs/core/glib2/glib2.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.gtk.org PKG_LICENSE = LGPLv2+ PKG_SUMMARY = A library of handy utility functions.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += pcre +PKG_BUILD_DEPS+= gettext pcre-devel pkg-config zlib-devel
define PKG_DESCRIPTION GLib is the low-level core library that forms the basis \ @@ -47,6 +46,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)2-devel + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --with-pcre=system diff --git a/pkgs/core/glibc/glibc.nm b/pkgs/core/glibc/glibc.nm index 8e1b99a..bc5ad53 100644 --- a/pkgs/core/glibc/glibc.nm +++ b/pkgs/core/glibc/glibc.nm @@ -46,8 +46,6 @@ define PKG_DESCRIPTION Linux system will not function. endef
-PKG_DEPS = # Has got no dependencies - GLIBC_FLAGS += -fno-strict-aliasing -mno-tls-direct-seg-refs
CFLAGS += $(GLIBC_FLAGS) @@ -150,9 +148,9 @@ define STAGE_PREPARE cat $(DIR_SOURCE)/$(PKG_NAME)-stack_chk_fail.c \ > $(DIR_APP)/debug/stack_chk_fail.c
- cd $(DIR_APP) && \ - sed -e "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$(shell readelf -l /bin/sh | sed -n 's@.*interpret.*$(TOOLS_DIR)(.*)]$$@\1@p') -o|" \ - -i scripts/test-installation.pl + #cd $(DIR_APP) && \ + # sed -e "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$(shell readelf -l /bin/sh | sed -n 's@.*interpret.*$(TOOLS_DIR)(.*)]$$@\1@p') -o|" \ + # -i scripts/test-installation.pl
# Use gnu hash style cd $(DIR_APP) && sed -i Makeconfig \ @@ -260,11 +258,11 @@ define STAGE_BUILD CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" endef
-define STAGE_TEST - cd $(DIR_SRC)/glibc-build && TIMEOUTFACTOR=16 make check \ - CFLAGS="$(CFLAGS) -fno-stack-protector -U_FORTIFY_SOURCE" \ - CXXFLAGS="$(CXXFLAGS) -fno-stack-protector -U_FORTIFY_SOURCE" -endef +#define STAGE_TEST +# cd $(DIR_SRC)/glibc-build && TIMEOUTFACTOR=16 make check \ +# CFLAGS="$(CFLAGS) -fno-stack-protector -U_FORTIFY_SOURCE" \ +# CXXFLAGS="$(CXXFLAGS) -fno-stack-protector -U_FORTIFY_SOURCE" +#endef
define STAGE_INSTALL cd $(DIR_SRC)/glibc-build && make install install_root=$(BUILDROOT) diff --git a/pkgs/core/gmp/gmp.nm b/pkgs/core/gmp/gmp.nm index 7f71dff..f2fe601 100644 --- a/pkgs/core/gmp/gmp.nm +++ b/pkgs/core/gmp/gmp.nm @@ -46,16 +46,16 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_BUILD_DEPS+= m4 + +PKG_PACKAGES += $(PKG_NAME_REAL)-devel + ifeq "$(MACHINE)" "x86_64" ABI = 64 else ABI = 32 endif
-############################################################################### -# Installation Details -############################################################################### - define STAGE_BUILD cd $(DIR_APP) && \ ABI=$(ABI) \ diff --git a/pkgs/core/gnupg2/gnupg2.nm b/pkgs/core/gnupg2/gnupg2.nm index 5fc449b..8ccb5e2 100644 --- a/pkgs/core/gnupg2/gnupg2.nm +++ b/pkgs/core/gnupg2/gnupg2.nm @@ -34,7 +34,8 @@ PKG_URL = http://www.gnupg.org/ PKG_LICENSE = GPLv3+ PKG_SUMMARY = Utility for secure communication and data storage.
-PKG_DEPS += curl libassuan libgcrypt libksba pinentry pth +PKG_BUILD_DEPS+= libassuan-devel libcurl-devel libgcrypt-devel libksba-devel \ + pinentry pth-devel
define PKG_DESCRIPTION The GnuPG 2 package is GNU's tool for secure communication and data \ diff --git a/pkgs/core/gnutls/gnutls.nm b/pkgs/core/gnutls/gnutls.nm index af5601e..a119bd5 100644 --- a/pkgs/core/gnutls/gnutls.nm +++ b/pkgs/core/gnutls/gnutls.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gnu.org/software/gnutls/ PKG_LICENSE = LGPLv2.1+ PKG_SUMMARY = A general-purpose cryptography library.
-PKG_DEPS += libgcrypt lzo +PKG_BUILD_DEPS+= libgcrypt-devel lzo-devel
define PKG_DESCRIPTION GnuTLS is a project that aims to develop a library which provides \ @@ -45,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --with-included-libcfg \ --disable-srp-authentication diff --git a/pkgs/core/gobject-introspection/gobject-introspection.nm b/pkgs/core/gobject-introspection/gobject-introspection.nm new file mode 100644 index 0000000..9aa0e27 --- /dev/null +++ b/pkgs/core/gobject-introspection/gobject-introspection.nm @@ -0,0 +1,55 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = gobject-introspection +PKG_VER = 0.9.3 +PKG_REL = 0 + +PKG_MAINTAINER = +PKG_GROUP = Development/Libraries +PKG_URL = http://live.gnome.org/GObjectIntrospection +PKG_LICENSE = GPLv2+, LGPLv2+, MIT +PKG_SUMMARY = Introspection system for GObject-based libraries. + +PKG_BUILD_DEPS+= bison cairo-devel flex glib2-devel libffi-devel libtool \ + pkg-config python-devel + +define PKG_DESCRIPTION + GObject Introspection can scan C header and source files in order \ + to generate introspection "typelib" files. It also provides an API to \ + examine typelib files, useful for creating language bindings among \ + other things. +endef + +PKG_TARBALL = $(THISAPP).tar.gz + +PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + +CONFIGURE_OPTIONS += --sbindir=/sbin --disable-static + +define STAGE_TEST + cd $(DIR_APP) && make check +endef diff --git a/pkgs/core/gobject-introspection/gobject-introspection.nm.off b/pkgs/core/gobject-introspection/gobject-introspection.nm.off deleted file mode 100644 index f05459f..0000000 --- a/pkgs/core/gobject-introspection/gobject-introspection.nm.off +++ /dev/null @@ -1,53 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include $(PKGROOT)/Include - -PKG_NAME = gobject-introspection -PKG_VER = 0.6.11 -PKG_REL = 0 - -PKG_MAINTAINER = -PKG_GROUP = Development/Libraries -PKG_URL = http://live.gnome.org/GObjectIntrospection -PKG_LICENSE = GPLv2+, LGPLv2+, MIT -PKG_SUMMARY = Introspection system for GObject-based libraries. - -PKG_BUILD_DEPS+= bison cairo flex pkg-config -PKG_DEPS += glib2 libffi libtool python - -define PKG_DESCRIPTION - GObject Introspection can scan C header and source files in order \ - to generate introspection "typelib" files. It also provides an API to \ - examine typelib files, useful for creating language bindings among \ - other things. -endef - -PKG_TARBALL = $(THISAPP).tar.bz2 - -CONFIGURE_OPTIONS += --sbindir=/sbin --disable-static - -define STAGE_TEST - cd $(DIR_APP) && make check -endef diff --git a/pkgs/core/gperf/gperf.nm b/pkgs/core/gperf/gperf.nm index 984c847..289dc4c 100644 --- a/pkgs/core/gperf/gperf.nm +++ b/pkgs/core/gperf/gperf.nm @@ -34,6 +34,8 @@ PKG_URL = http://www.gnu.org/software/gperf/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = A perfect hash function generator.
+PKG_BUILD_DEPS+= gcc-c++ + define PKG_DESCRIPTION Gperf is a perfect hash function generator written in C++. Simply \ stated, a perfect hash function is a hash function and a data \ diff --git a/pkgs/core/groff/groff.nm b/pkgs/core/groff/groff.nm index 892b3f8..0e81e5a 100644 --- a/pkgs/core/groff/groff.nm +++ b/pkgs/core/groff/groff.nm @@ -34,7 +34,7 @@ PKG_URL = http://groff.ffii.org/ PKG_LICENSE = GPLv2 and GFDL PKG_SUMMARY = A document formatting system.
-PKG_BUILD_DEPS+= bison +PKG_BUILD_DEPS+= bison gcc-c++ perl
define PKG_DESCRIPTION Groff is a document formatting system. Groff takes standard text and \ @@ -51,10 +51,6 @@ export PAGE=A4 CONFIGURE_OPTIONS += --enable-multibyte PARALLELISMFLAGS =
-############################################################################### -# Installation Details -############################################################################### - define STAGE_PREPARE_CMDS cd $(DIR_APP) && sed -i \ -e 's/2010/002D/' \ diff --git a/pkgs/core/grub/grub.nm b/pkgs/core/grub/grub.nm index dd5365a..011e716 100644 --- a/pkgs/core/grub/grub.nm +++ b/pkgs/core/grub/grub.nm @@ -34,8 +34,9 @@ PKG_URL = http://www.gnu.org/software/grub/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Grand Unified Boot Loader.
-PKG_BUILD_DEPS+= autoconf automake bison flex -PKG_DEPS += freetype ncurses os-prober zlib +PKG_BUILD_DEPS+= autoconf automake bison flex freetype-devel gettext \ + ncurses-devel zlib-devel +PKG_DEPS += os-prober
define PKG_DESCRIPTION GRUB (Grand Unified Boot Loader) is an experimental boot loader \ diff --git a/pkgs/core/gssdp/gssdp.nm b/pkgs/core/gssdp/gssdp.nm index 86b025d..1c8ada5 100644 --- a/pkgs/core/gssdp/gssdp.nm +++ b/pkgs/core/gssdp/gssdp.nm @@ -34,11 +34,12 @@ PKG_URL = http://www.gupnp.org PKG_LICENSE = LGPL PKG_SUMMARY = Resource discovery and announcement over SSDP.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += glib2 libsoup +PKG_BUILD_DEPS+= glib2-devel libsoup-devel pkg-config
define PKG_DESCRIPTION GSSDP implements resource discovery and announcement over SSDP. endef
PKG_TARBALL = $(THISAPP).tar.gz + +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/guile/guile.nm b/pkgs/core/guile/guile.nm index 6a9b0f0..3572846 100644 --- a/pkgs/core/guile/guile.nm +++ b/pkgs/core/guile/guile.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gnu.org/software/guile/ PKG_LICENSE = GPLv2+ and LGPLv2+ and GFDL and OFSFDL PKG_SUMMARY = A GNU implementation of Scheme for application extensibility.
-PKG_DEPS += gmp libtool +PKG_BUILD_DEPS+= gmp-devel libtool-devel
define PKG_DESCRIPTION GUILE (GNU's Ubiquitous Intelligent Language for Extension) is a library \ @@ -45,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + QUALITY_AGENT_WHITELIST_RPATH = /usr/lib
define STAGE_TEST diff --git a/pkgs/core/gupnp-av/gupnp-av.nm b/pkgs/core/gupnp-av/gupnp-av.nm index 2d6ef25..1d2ab1b 100644 --- a/pkgs/core/gupnp-av/gupnp-av.nm +++ b/pkgs/core/gupnp-av/gupnp-av.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gupnp.org PKG_LICENSE = LGPL PKG_SUMMARY = gupnp audio/video helpers.
-PKG_DEPS += gssdp gupnp +PKG_BUILD_DEPS+= gssdp-devel gupnp-devel pkg-config
define PKG_DESCRIPTION GUPnP-AV is a collection of helpers for building AV (audio/video) \ @@ -43,5 +43,7 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --without-gnome diff --git a/pkgs/core/gupnp/gupnp.nm b/pkgs/core/gupnp/gupnp.nm index 6cbc325..126ba86 100644 --- a/pkgs/core/gupnp/gupnp.nm +++ b/pkgs/core/gupnp/gupnp.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.gupnp.org PKG_LICENSE = LGPL PKG_SUMMARY = An UPNP framework.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += glib2 gssdp libsoup libxml2 util-linux-ng +PKG_BUILD_DEPS+= glib2-devel gssdp-devel libsoup-devel libxml2-devel \ + pkg-config util-linux-ng-devel
define PKG_DESCRIPTION GUPnP is an object-oriented open source framework for creating UPnP\ @@ -45,5 +45,7 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --without-gnome diff --git a/pkgs/core/gzip/gzip.nm b/pkgs/core/gzip/gzip.nm index 8f2c0a8..00a66b6 100644 --- a/pkgs/core/gzip/gzip.nm +++ b/pkgs/core/gzip/gzip.nm @@ -41,11 +41,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
- -############################################################################### -# Installation Details -############################################################################### - define STAGE_BUILD # NO_ASM is for textrels. cd $(DIR_APP) && \ diff --git a/pkgs/core/hostapd/hostapd.nm b/pkgs/core/hostapd/hostapd.nm index 1a66641..46e07bd 100644 --- a/pkgs/core/hostapd/hostapd.nm +++ b/pkgs/core/hostapd/hostapd.nm @@ -34,7 +34,7 @@ PKG_URL = http://hostap.epitest.fi/hostapd/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = User space daemon to create Wifi Access points.
-PKG_DEPS += libnl openssl +PKG_BUILD_DEPS+= libnl-devel openssl-devel
define PKG_DESCRIPTION Hostapd is a user space daemon for access point and authentication \ diff --git a/pkgs/core/hplip/hplip.nm b/pkgs/core/hplip/hplip.nm index 2372e3b..396f7dc 100644 --- a/pkgs/core/hplip/hplip.nm +++ b/pkgs/core/hplip/hplip.nm @@ -34,8 +34,9 @@ PKG_URL = http://hplipopensource.com/hplip-web/index.html PKG_LICENSE = GPLv2* PKG_SUMMARY = HP Printer/Scanner Library (full version).
-PKG_BUILD_DEPS+= autoconf automake libtool -PKG_DEPS += cups dbus libjpeg libusb-compat net-snmp python sane +PKG_BUILD_DEPS+= autoconf automake cups-devel dbus-devel gcc-c++ libjpeg-devel \ + libtool libusb-compat-devel net-snmp-devel pkg-config python-devel \ + sane-devel
define PKG_DESCRIPTION HPLIP (Hewlett-Packard Linux Imaging & Printing) is an HP-developed \ diff --git a/pkgs/core/htop/htop.nm b/pkgs/core/htop/htop.nm index 72fd130..5c5524f 100644 --- a/pkgs/core/htop/htop.nm +++ b/pkgs/core/htop/htop.nm @@ -34,7 +34,7 @@ PKG_URL = http://htop.sourceforge.net/ PKG_LICENSE = GPL+ PKG_SUMMARY = Interactive process viewer.
-PKG_DEPS += ncurses +PKG_BUILD_DEPS+= ncurses-devel
define PKG_DESCRIPTION htop is an interactive text-mode process viewer for Linux, similar to \ diff --git a/pkgs/core/iana-etc/iana-etc.nm b/pkgs/core/iana-etc/iana-etc.nm index 77eea99..05604c8 100644 --- a/pkgs/core/iana-etc/iana-etc.nm +++ b/pkgs/core/iana-etc/iana-etc.nm @@ -34,6 +34,9 @@ PKG_URL = http://www.iana.org/ PKG_LICENSE = PKG_SUMMARY = The Internet Assigned Numbers Authority.
+PKG_BUILD_DEPS = # EMPTY +PKG_DEPS = + define PKG_DESCRIPTION The Internet Assigned Numbers Authority (IANA) is responsible for the \ global coordination of the DNS Root, IP addressing, and other Internet \ @@ -42,10 +45,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
-############################################################################### -# Installation Details -############################################################################### - define STAGE_BUILD cd $(DIR_APP) && make $(PARALLELISMFLAGS) endef diff --git a/pkgs/core/intltool/intltool.nm b/pkgs/core/intltool/intltool.nm index d3bf691..816d748 100644 --- a/pkgs/core/intltool/intltool.nm +++ b/pkgs/core/intltool/intltool.nm @@ -40,7 +40,8 @@ define PKG_DESCRIPTION them in the po files. endef
-PKG_DEPS += expat gettext perl-xml-parser +PKG_BUILD_DEPS+= expat-devel gettext perl-xml-parser +PKG_DEPS += gettext perl-xml-parser
PKG_TARBALL = $(THISAPP).tar.bz2
diff --git a/pkgs/core/iproute2/iproute2.nm b/pkgs/core/iproute2/iproute2.nm index ea83500..1d5ef6c 100644 --- a/pkgs/core/iproute2/iproute2.nm +++ b/pkgs/core/iproute2/iproute2.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.linuxfoundation.org/en/Net:Iproute2 PKG_LICENSE = GPLv2+ PKG_SUMMARY = Advanced IP routing and network device configuration tools.
-PKG_BUILD_DEPS+= bison flex -PKG_DEPS += db +PKG_BUILD_DEPS+= bison db-devel flex
define PKG_DESCRIPTION The iproute package contains networking utilities (ip and rtmon, for \ diff --git a/pkgs/core/iptables/iptables.nm b/pkgs/core/iptables/iptables.nm index ec728fe..ec98529 100644 --- a/pkgs/core/iptables/iptables.nm +++ b/pkgs/core/iptables/iptables.nm @@ -42,6 +42,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CFLAGS += -fno-strict-aliasing
CONFIGURE_OPTIONS += \ diff --git a/pkgs/core/iputils/iputils.nm b/pkgs/core/iputils/iputils.nm index a65e78a..d9cfc9c 100644 --- a/pkgs/core/iputils/iputils.nm +++ b/pkgs/core/iputils/iputils.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.skbuff.net/iputils PKG_LICENSE = BSD PKG_SUMMARY = Network monitoring tools including ping.
-PKG_BUILD_DEPS+= libcap -PKG_DEPS += libidn +PKG_BUILD_DEPS+= libcap-devel libidn-devel
define PKG_DESCRIPTION The iputils package contains basic utilities for monitoring a network, \ @@ -59,10 +58,6 @@ PKG_PATCHES += $(THISAPP)-traffic_class.patch PKG_PATCHES += $(THISAPP)-warnings.patch PKG_PATCHES += $(THISAPP)-output.patch
-############################################################################### -# Installation Details -############################################################################### - define STAGE_BUILD cd $(DIR_APP) && make $(PARALLELISMFLAGS) endef diff --git a/pkgs/core/iw/iw.nm b/pkgs/core/iw/iw.nm index b7ed0fc..61fc6da 100644 --- a/pkgs/core/iw/iw.nm +++ b/pkgs/core/iw/iw.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.linuxwireless.org/en/users/Documentation/iw PKG_LICENSE = BSD PKG_SUMMARY = A nl80211 based wireless configuration tool.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libnl +PKG_BUILD_DEPS+= libnl-devel pkg-config
define PKG_DESCRIPTION iw is a new nl80211 based CLI configuration utility for wireless \ diff --git a/pkgs/core/jwhois/jwhois.nm b/pkgs/core/jwhois/jwhois.nm index 3ac74d4..e8a98a1 100644 --- a/pkgs/core/jwhois/jwhois.nm +++ b/pkgs/core/jwhois/jwhois.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gnu.org/software/jwhois/ PKG_LICENSE = GPLv3 PKG_SUMMARY = Internet whois/nicname client.
-PKG_DEPS += gdbm +PKG_BUILD_DEPS+= gdbm-devel
define PKG_DESCRIPTION A whois client that accepts both traditional and finger-style queries. diff --git a/pkgs/core/kernel-headers/kernel-headers.nm b/pkgs/core/kernel-headers/kernel-headers.nm deleted file mode 100644 index 9527b7a..0000000 --- a/pkgs/core/kernel-headers/kernel-headers.nm +++ /dev/null @@ -1,24 +0,0 @@ - -include ../../core/kernel/kernel.nm - -PKG_BUILD_DEPS = - -STAGE_PREPARE_CMDS = - -define STAGE_BUILD - cd $(DIR_APP) && make mrproper - cd $(DIR_APP) && make ARCH=x86 headers_check -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make ARCH=x86 INSTALL_HDR_PATH=dest headers_install - -mkdir -pv $(BUILDROOT)/usr/include - cd $(DIR_APP) && find dest/include ( -name .install -o -name ..install.cmd ) -delete - cd $(DIR_APP) && cp -rv dest/include/* $(BUILDROOT)/usr/include - - # Glibc provides these headers - rm -rfv $(BUILDROOT)/usr/include/scsi \ - $(BUILDROOT)/usr/include/asm*/atomic.h \ - $(BUILDROOT)/usr/include/asm*/io.h \ - $(BUILDROOT)/usr/include/asm*/irq.h -endef diff --git a/pkgs/core/kernel-headers/patches b/pkgs/core/kernel-headers/patches deleted file mode 120000 index fa2c707..0000000 --- a/pkgs/core/kernel-headers/patches +++ /dev/null @@ -1 +0,0 @@ -../kernel/patches \ No newline at end of file diff --git a/pkgs/core/kernel/kernel.nm b/pkgs/core/kernel/kernel.nm index 40dddbe..49201b7 100644 --- a/pkgs/core/kernel/kernel.nm +++ b/pkgs/core/kernel/kernel.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.kernel.org/ PKG_LICENSE = GPLv2 PKG_SUMMARY = The Linux kernel.
-PKG_BUILD_DEPS+= module-init-tools ncurses -PKG_DEPS = # No dependencies +PKG_BUILD_DEPS+= dracut module-init-tools ncurses-devel perl
define PKG_DESCRIPTION The kernel package contains the Linux kernel (vmlinuz), the core of any \ @@ -52,9 +51,11 @@ FULLVER = $(PKG_VER)$(LOCALVERSION)
PKG_TARBALL = $(THISAPP).tar.bz2
-############################################################################### -# Installation Details -############################################################################### +PKG_PACKAGES += kernel-headers + +PKG_SUMMARY-kernel-headers = Header files if the kernel release $(FULLVER). +PKG_DESCRIPTION-kernel-headers = $(PKG_SUMMARY-kernel-headers) +PKG_FILES-kernel-headers = /usr/include
define STAGE_PREPARE_CMDS cd $(DIR_APP) && echo "$(LOCALVERSION)" > localversion-$(DISTRO_SNAME) @@ -75,7 +76,10 @@ endef
define STAGE_BUILD cd $(DIR_APP) && yes "" | make oldconfig - + + # Check headers + cd $(DIR_APP) && make ARCH=x86 headers_check + cd $(DIR_APP) && make CC="gcc -nopie" $(PARALLELISMFLAGS) endef
@@ -88,5 +92,20 @@ define STAGE_INSTALL
-mkdir -pv $(BUILDROOT)/lib/modules/$(FULLVER)/extra
+ dracut -v --kmoddir $(BUILDROOT)/lib/modules/$(FULLVER) \ + $(BUILDROOT)/boot/initrd-$(FULLVER).img $(FULLVER) + rm -vf $(BUILDROOT)/lib/modules/$(FULLVER)/{build,source} + + # Install the header files + cd $(DIR_APP) && make ARCH=x86 INSTALL_HDR_PATH=dest headers_install + -mkdir -pv $(BUILDROOT)/usr/include + cd $(DIR_APP) && find dest/include ( -name .install -o -name ..install.cmd ) -delete + cd $(DIR_APP) && cp -rv dest/include/* $(BUILDROOT)/usr/include + + # Glibc provides these headers + rm -rfv $(BUILDROOT)/usr/include/scsi \ + $(BUILDROOT)/usr/include/asm*/atomic.h \ + $(BUILDROOT)/usr/include/asm*/io.h \ + $(BUILDROOT)/usr/include/asm*/irq.h endef diff --git a/pkgs/core/l7-protocols/l7-protocols.nm b/pkgs/core/l7-protocols/l7-protocols.nm index 6bf061f..205bf4a 100644 --- a/pkgs/core/l7-protocols/l7-protocols.nm +++ b/pkgs/core/l7-protocols/l7-protocols.nm @@ -34,8 +34,6 @@ PKG_URL = http://l7-filter.sourceforge.net/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Application Layer Packet Classifier for Linux.
-PKG_DEPS += - define PKG_DESCRIPTION L7-filter is a classifier for Linux's Netfilter that identifies packets \ based on application layer data. It can classify packets as Kazaa, HTTP, \ diff --git a/pkgs/core/ldapvi/ldapvi.nm b/pkgs/core/ldapvi/ldapvi.nm index fb988a1..26c02f7 100644 --- a/pkgs/core/ldapvi/ldapvi.nm +++ b/pkgs/core/ldapvi/ldapvi.nm @@ -34,8 +34,9 @@ PKG_URL = http://www.lichteblau.com/ldapvi/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = An interactive LDAP client.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += glib2 libxslt ncurses openldap openssl popt readline +PKG_BUILD_DEPS+= glib2-devel ncurses-devel openldap-devel openssl-devel \ + pkg-config popt-devel readline-devel +PKG_DEPS += vim
define PKG_DESCRIPTION ldapvi is an interactive LDAP client for Unix terminals. Using it, you can \ diff --git a/pkgs/core/less/less.nm b/pkgs/core/less/less.nm index 1034723..64a6688 100644 --- a/pkgs/core/less/less.nm +++ b/pkgs/core/less/less.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.greenwoodsoftware.com/less/ PKG_LICENSE = GPLv3+ PKG_SUMMARY = A text file browser similar to more, but better.
-PKG_DEPS += ncurses pcre +PKG_BUILD_DEPS+= ncurses-devel pcre-devel
define PKG_DESCRIPTION The less utility is a text file browser that resembles more, but has \ diff --git a/pkgs/core/libICE/libICE.nm b/pkgs/core/libICE/libICE.nm new file mode 100644 index 0000000..ae668f4 --- /dev/null +++ b/pkgs/core/libICE/libICE.nm @@ -0,0 +1,48 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libICE +PKG_VER = 1.0.6 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X.Org X11 libICE runtime library. + +PKG_BUILD_DEPS+= pkg-config xorg-x11-proto-devel xorg-x11-xtrans-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X.Org X11 libICE development package. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libSM/libSM.nm b/pkgs/core/libSM/libSM.nm new file mode 100644 index 0000000..9274da8 --- /dev/null +++ b/pkgs/core/libSM/libSM.nm @@ -0,0 +1,48 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libSM +PKG_VER = 1.1.1 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X.Org X11 libSM runtime library. + +PKG_BUILD_DEPS+= libICE-devel pkg-config xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X.Org X11 libSM development package. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libX11/libX11.nm b/pkgs/core/libX11/libX11.nm index bd618cf..d82799b 100644 --- a/pkgs/core/libX11/libX11.nm +++ b/pkgs/core/libX11/libX11.nm @@ -34,8 +34,9 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = X11 protocol client library.
-PKG_BUILD_DEPS+= pkg-config xorg-x11-proto-devel xorg-x11-xtrans-devel -PKG_DEPS += libxcb +PKG_BUILD_DEPS+= libxcb-devel pkg-config xorg-x11-proto-devel xorg-x11-xtrans-devel + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION Client library for X.org X11 protocol. diff --git a/pkgs/core/libXau/libXau.nm b/pkgs/core/libXau/libXau.nm index 1a78bf7..8bc2230 100644 --- a/pkgs/core/libXau/libXau.nm +++ b/pkgs/core/libXau/libXau.nm @@ -36,13 +36,15 @@ PKG_SUMMARY = Sample Authorization Protocol for X.
PKG_BUILD_DEPS+= pkg-config xorg-x11-proto-devel
+PKG_PACKAGES += $(PKG_NAME)-devel + define PKG_DESCRIPTION This is a very simple mechanism for providing individual access \ to an X Window System display.It uses existing core protocol and \ library hooks for specifying authorization data in the connection \ setup block to restrict use of the display to only those clients \ that show that they know a server-specific key called a \ - "magic cookie". + magic cookie. endef
PKG_TARBALL = $(THISAPP).tar.bz2 diff --git a/pkgs/core/libXdamage/libXdamage.nm b/pkgs/core/libXdamage/libXdamage.nm new file mode 100644 index 0000000..1757719 --- /dev/null +++ b/pkgs/core/libXdamage/libXdamage.nm @@ -0,0 +1,48 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libXdamage +PKG_VER = 1.1.3 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X Damage extension library. + +PKG_BUILD_DEPS+= libX11-devel libXfixes-devel pkg-config xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X.Org X11 libXdamage runtime library. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libXdmcp/libXdmcp.nm b/pkgs/core/libXdmcp/libXdmcp.nm new file mode 100644 index 0000000..ff84969 --- /dev/null +++ b/pkgs/core/libXdmcp/libXdmcp.nm @@ -0,0 +1,48 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libXdmcp +PKG_VER = 1.0.3 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X Display Manager Control Protocol library. + +PKG_BUILD_DEPS+= pkg-config xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X Display Manager Control Protocol library. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libXext/libXext.nm b/pkgs/core/libXext/libXext.nm index 0009e80..3669fe6 100644 --- a/pkgs/core/libXext/libXext.nm +++ b/pkgs/core/libXext/libXext.nm @@ -34,8 +34,9 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = X.Org X11 libXext runtime library.
-PKG_BUILD_DEPS+= pkg-config xorg-x11-proto-devel -PKG_DEPS += libX11 libXau +PKG_BUILD_DEPS+= libX11-devel libXau-devel pkg-config xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION X.Org X11 libXext development package. diff --git a/pkgs/core/libXfixes/libXfixes.nm b/pkgs/core/libXfixes/libXfixes.nm new file mode 100644 index 0000000..cdef342 --- /dev/null +++ b/pkgs/core/libXfixes/libXfixes.nm @@ -0,0 +1,48 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libXfixes +PKG_VER = 4.0.5 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X Fixes library. + +PKG_BUILD_DEPS+= libX11-devel pkg-config xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X Fixes library. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libXfont/libXfont.nm b/pkgs/core/libXfont/libXfont.nm index 277472b5..b73e3e7 100644 --- a/pkgs/core/libXfont/libXfont.nm +++ b/pkgs/core/libXfont/libXfont.nm @@ -34,8 +34,10 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = X.Org X11 libXfont runtime library.
-PKG_BUILD_DEPS+= pkg-config xorg-x11-xtrans-devel -PKG_DEPS += freetype libfontenc +PKG_BUILD_DEPS+= freetype-devel libfontenc-devel pkg-config\ + xorg-x11-xtrans-devel + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION X.Org X11 libXfont development package. diff --git a/pkgs/core/libXmu/libXmu.nm b/pkgs/core/libXmu/libXmu.nm new file mode 100644 index 0000000..b5a279d --- /dev/null +++ b/pkgs/core/libXmu/libXmu.nm @@ -0,0 +1,48 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libXmu +PKG_VER = 1.0.5 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X.Org X11 libXmu/libXmuu runtime libraries. + +PKG_BUILD_DEPS+= libX11-devel libXext-devel libXt-devel pkg-config xorg-x11-util-macros + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X.Org X11 libXmu/libXmuu runtime libraries. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libXrandr/libXrandr.nm b/pkgs/core/libXrandr/libXrandr.nm new file mode 100644 index 0000000..bef34b7 --- /dev/null +++ b/pkgs/core/libXrandr/libXrandr.nm @@ -0,0 +1,49 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libXrandr +PKG_VER = 1.3.0 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X11 libXrandr runtime library. + +PKG_BUILD_DEPS+= libX11-devel libXext-devel libXrender-devel pkg-config \ + xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X.Org X11 libXrandr runtime library. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libXrandr/patches/libXrandr-1.3.0-fixes.patch b/pkgs/core/libXrandr/patches/libXrandr-1.3.0-fixes.patch new file mode 100644 index 0000000..44f8ca9 --- /dev/null +++ b/pkgs/core/libXrandr/patches/libXrandr-1.3.0-fixes.patch @@ -0,0 +1,102 @@ +diff --git a/configure.ac b/configure.ac +index a018667..09c5d8d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -32,7 +32,7 @@ dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n + dnl + AC_INIT(libXrandr, 1.3.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr) + AC_CONFIG_AUX_DIR(.) +-AM_INIT_AUTOMAKE([dist-bzip2]) ++AM_INIT_AUTOMAKE([foreign dist-bzip2]) + AM_MAINTAINER_MODE + + # Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h +index a411321..6b756a7 100644 +--- a/include/X11/extensions/Xrandr.h ++++ b/include/X11/extensions/Xrandr.h +@@ -197,6 +197,7 @@ Time XRRTimes (Display *dpy, int screen, Time *config_timestamp); + + /* Version 1.2 additions */ + ++/* despite returning a Status, this returns 1 for success */ + Status + XRRGetScreenSizeRange (Display *dpy, Window window, + int *minWidth, int *minHeight, +diff --git a/src/XrrConfig.c b/src/XrrConfig.c +index db7a1ae..34ff3ef 100644 +--- a/src/XrrConfig.c ++++ b/src/XrrConfig.c +@@ -409,6 +409,7 @@ Status XRRSetScreenConfigAndRate (Display *dpy, + + (void) _XReply (dpy, (xReply *) &rep, 0, xTrue); + ++ /* actually .errorCode in struct xError */ + if (rep.status == RRSetConfigSuccess) { + /* if we succeed, set our view of reality to what we set it to */ + config->config_timestamp = rep.newConfigTimestamp; +diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c +index db9d0b4..697987a 100644 +--- a/src/XrrCrtc.c ++++ b/src/XrrCrtc.c +@@ -167,7 +167,7 @@ XRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc) + req->crtc = crtc; + + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) +- rep.status = RRSetConfigFailed; ++ rep.size = 0; + UnlockDisplay (dpy); + SyncHandle (); + return rep.size; +@@ -179,7 +179,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) + XExtDisplayInfo *info = XRRFindDisplay(dpy); + xRRGetCrtcGammaReply rep; + xRRGetCrtcGammaReq *req; +- XRRCrtcGamma *crtc_gamma; ++ XRRCrtcGamma *crtc_gamma = NULL; + long nbytes; + long nbytesRead; + +@@ -192,7 +192,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) + req->crtc = crtc; + + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) +- rep.status = RRSetConfigFailed; ++ goto out; + + nbytes = (long) rep.length << 2; + +@@ -204,9 +204,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) + if (!crtc_gamma) + { + _XEatData (dpy, (unsigned long) nbytes); +- UnlockDisplay (dpy); +- SyncHandle (); +- return NULL; ++ goto out; + } + _XRead16 (dpy, crtc_gamma->red, rep.size * 2); + _XRead16 (dpy, crtc_gamma->green, rep.size * 2); +@@ -214,7 +212,8 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) + + if (nbytes > nbytesRead) + _XEatData (dpy, (unsigned long) (nbytes - nbytesRead)); +- ++ ++out: + UnlockDisplay (dpy); + SyncHandle (); + return crtc_gamma; +diff --git a/src/XrrProperty.c b/src/XrrProperty.c +index 9554f9a..1a125b2 100644 +--- a/src/XrrProperty.c ++++ b/src/XrrProperty.c +@@ -272,7 +272,7 @@ XRRGetOutputProperty (Display *dpy, RROutput output, + { + UnlockDisplay (dpy); + SyncHandle (); +- return 1; ++ return ((xError *)&rep)->errorCode; + } + + *prop = (unsigned char *) NULL; diff --git a/pkgs/core/libXrender/libXrender.nm b/pkgs/core/libXrender/libXrender.nm new file mode 100644 index 0000000..69cbfcf --- /dev/null +++ b/pkgs/core/libXrender/libXrender.nm @@ -0,0 +1,48 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libXrender +PKG_VER = 0.9.6 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X11 libXrender runtime library. + +PKG_BUILD_DEPS+= libX11-devel pkg-config xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X.Org X11 libXrender runtime library. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libXres/libXres.nm b/pkgs/core/libXres/libXres.nm new file mode 100644 index 0000000..9163c6f --- /dev/null +++ b/pkgs/core/libXres/libXres.nm @@ -0,0 +1,52 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libXres +PKG_VER = 1.0.4 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X-Resource extension client library. + +PKG_BUILD_DEPS+= libXext-devel pkg-config + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X-Resource is an extension that allows a client to query \ + the X server about its usage of various resources. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static + +STAGE_INSTALL_TARGETS += \ + INSTALL="install -p" diff --git a/pkgs/core/libXt/libXt.nm b/pkgs/core/libXt/libXt.nm new file mode 100644 index 0000000..d9105b1 --- /dev/null +++ b/pkgs/core/libXt/libXt.nm @@ -0,0 +1,51 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libXt +PKG_VER = 1.0.7 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X.Org X11 libXt runtime library. + +PKG_BUILD_DEPS+= libICE-devel libSM-devel libX11-devel pkg-config\ + xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X.Org X11 libXt runtime library. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CFLAGS += -fno-strict-aliasing + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libXt/patches/libXt-1.0.7-libsm-fix.patch b/pkgs/core/libXt/patches/libXt-1.0.7-libsm-fix.patch new file mode 100644 index 0000000..309aea8 --- /dev/null +++ b/pkgs/core/libXt/patches/libXt-1.0.7-libsm-fix.patch @@ -0,0 +1,11 @@ +--- libXt-1.0.2/xt.pc.in.libsm-fix 2006-06-28 14:56:37.000000000 -0400 ++++ libXt-1.0.2/xt.pc.in 2006-06-28 14:56:51.000000000 -0400 +@@ -7,7 +7,7 @@ + Name: Xt + Description: X Toolkit Library + Version: @VERSION@ +-Requires: xproto x11 sm ++Requires: xproto x11 + Requires.private: x11 sm + Cflags: -I${includedir} + Libs: -L${libdir} -lXt diff --git a/pkgs/core/libXxf86vm/libXxf86vm.nm b/pkgs/core/libXxf86vm/libXxf86vm.nm new file mode 100644 index 0000000..0c68bd4 --- /dev/null +++ b/pkgs/core/libXxf86vm/libXxf86vm.nm @@ -0,0 +1,48 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libXxf86vm +PKG_VER = 1.1.0 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = X.Org X11 libXxf86vm runtime library. + +PKG_BUILD_DEPS+= libX11-devel libXext-devel pkg-config xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + X.Org X11 libXxf86vm runtime library. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/libaal/libaal.nm b/pkgs/core/libaal/libaal.nm index 863ea45..aa7035a 100644 --- a/pkgs/core/libaal/libaal.nm +++ b/pkgs/core/libaal/libaal.nm @@ -34,12 +34,16 @@ PKG_URL = http://www.kernel.org/pub/linux/utils/fs/reiser4/libaal/ PKG_LICENSE = GPL PKG_SUMMARY = Reiser4's application abstraction library.
+PKG_BUILD_DEPS+= gcc-c++ + define PKG_DESCRIPTION This library is part of the Reiser4's filesystem support tools. endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --libdir=/lib
diff --git a/pkgs/core/libaio/libaio.nm b/pkgs/core/libaio/libaio.nm index 9ac7bb4..efb81b6 100644 --- a/pkgs/core/libaio/libaio.nm +++ b/pkgs/core/libaio/libaio.nm @@ -37,7 +37,7 @@ PKG_SUMMARY = Linux-native asynchronous I/O access library. PKG_PACKAGES += $(PKG_NAME_REAL)-devel
define PKG_DESCRIPTION - The Linux-native asynchronous I/O facility ("async I/O", or "aio") \ + The Linux-native asynchronous I/O facility (async I/O, or aio) \ has a richer API and capability set than the simple POSIX async I/O \ facility. This library, libaio, provides the Linux-native API for \ async I/O. The POSIX async I/O facility requires this library in \ @@ -45,7 +45,7 @@ define PKG_DESCRIPTION applications which require the Linux-native async I/O API. endef
-PKG_BUILD_DEPS+= e2fsprogs +PKG_BUILD_DEPS+= e2fsprogs-devel
PKG_TARBALL = $(THISAPP).tar.bz2
diff --git a/pkgs/core/libart/libart.nm b/pkgs/core/libart/libart.nm index 2c1b47c..ecea742 100644 --- a/pkgs/core/libart/libart.nm +++ b/pkgs/core/libart/libart.nm @@ -34,11 +34,11 @@ PKG_URL = http://www.gnome.org PKG_LICENSE = LGPLv2+ PKG_SUMMARY = Library of graphics routines used by libgnomecanvas.
-PKG_DEPS += - define PKG_DESCRIPTION Graphics routines used by the GnomeCanvas widget and some other \ applications. libart renders vector paths and the like. endef
PKG_TARBALL = $(THISAPP).tar.bz2 + +PKG_PACKAGES += $(PKG_NAME_REAL)-devel diff --git a/pkgs/core/libassuan/libassuan.nm b/pkgs/core/libassuan/libassuan.nm index a8e5bb6..911a2fa 100644 --- a/pkgs/core/libassuan/libassuan.nm +++ b/pkgs/core/libassuan/libassuan.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gnupg.org/ PKG_LICENSE = LGPLv2+ PKG_SUMMARY = GnuPG IPC library.
-PKG_DEPS += libgpg-error pth +PKG_BUILD_DEPS+= autoconf automake libgpg-error-devel libtool pth-devel
define PKG_DESCRIPTION The Libassuan package contains an IPC library used by some of the other \ @@ -46,3 +46,9 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.bz2 + +PKG_PACKAGES += $(PKG_NAME)-devel + +define STAGE_PREPARE_CMDS + cd $(DIR_APP) && autoreconf --install +endef diff --git a/pkgs/core/libatasmart/libatasmart.nm b/pkgs/core/libatasmart/libatasmart.nm index 9de5f0b..9509ca5 100644 --- a/pkgs/core/libatasmart/libatasmart.nm +++ b/pkgs/core/libatasmart/libatasmart.nm @@ -34,8 +34,7 @@ PKG_URL = http://git.0pointer.de/?p=libatasmart.git;a=summary PKG_LICENSE = LGPLv2+ PKG_SUMMARY = ATA S.M.A.R.T. Disk Health Monitoring Library.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += udev +PKG_BUILD_DEPS+= libudev-devel pkg-config
define PKG_DESCRIPTION A scmall and lightweight parser library for ATA S.M.A.R.T. hard disk \ @@ -44,6 +43,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --libdir=/lib
diff --git a/pkgs/core/libcap-ng/libcap-ng.nm b/pkgs/core/libcap-ng/libcap-ng.nm index 111ab8b..daca254 100644 --- a/pkgs/core/libcap-ng/libcap-ng.nm +++ b/pkgs/core/libcap-ng/libcap-ng.nm @@ -34,7 +34,7 @@ PKG_URL = http://people.redhat.com/sgrubb/libcap-ng PKG_LICENSE = LGPLv2+ PKG_SUMMARY = An alternate posix capabilities library.
-PKG_DEPS += attr kernel-headers python +PKG_BUILD_DEPS+= libattr-devel python
PKG_PACKAGES += $(PKG_NAME_REAL)-devel
@@ -45,8 +45,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-#CONFIGURE_OPTIONS += \ - # XXX Testsuite is broken by the package developers #define STAGE_TEST # cd $(DIR_APP) && make check diff --git a/pkgs/core/libcap/libcap.nm b/pkgs/core/libcap/libcap.nm index 4f5008d..7e1b56c 100644 --- a/pkgs/core/libcap/libcap.nm +++ b/pkgs/core/libcap/libcap.nm @@ -41,7 +41,7 @@ define PKG_DESCRIPTION draft 15 capabilities. endef
-PKG_DEPS += attr pam +PKG_BUILD_DEPS+= libattr-devel pam-devel perl
PKG_TARBALL = $(THISAPP).tar.gz
diff --git a/pkgs/core/libdaemon/libdaemon.nm b/pkgs/core/libdaemon/libdaemon.nm index 725effa..9b1265c 100644 --- a/pkgs/core/libdaemon/libdaemon.nm +++ b/pkgs/core/libdaemon/libdaemon.nm @@ -40,6 +40,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --bindir=/bin \ --mandir=/usr/share/man diff --git a/pkgs/core/libdnet/libdnet.nm b/pkgs/core/libdnet/libdnet.nm index 0768b76..b976e41 100644 --- a/pkgs/core/libdnet/libdnet.nm +++ b/pkgs/core/libdnet/libdnet.nm @@ -34,6 +34,8 @@ PKG_URL = http://code.google.com/p/libdnet/ PKG_LICENSE = BSD PKG_SUMMARY = Simple portable interface to lowlevel networking routines.
+PKG_BUILD_DEPS+= gcc-c++ + define PKG_DESCRIPTION libdnet provides a simplified, portable interface to several \ low-level networking routines, including network address \ @@ -45,6 +47,8 @@ endef
PKG_TARBALL = $(THISAPP).tgz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --sbindir=/sbin \ --mandir=/usr/share diff --git a/pkgs/core/libdrm/91-drm-modeset.rules b/pkgs/core/libdrm/91-drm-modeset.rules new file mode 100644 index 0000000..789c9f4 --- /dev/null +++ b/pkgs/core/libdrm/91-drm-modeset.rules @@ -0,0 +1 @@ +KERNEL=="controlD[0-9]*", NAME="dri/%k", MODE="0666" diff --git a/pkgs/core/libdrm/libdrm.nm b/pkgs/core/libdrm/libdrm.nm new file mode 100644 index 0000000..cda7e2c --- /dev/null +++ b/pkgs/core/libdrm/libdrm.nm @@ -0,0 +1,62 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libdrm +PKG_VER = 2.4.21 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Libraries +PKG_URL = http://dri.freedesktop.org/libdrm/ +PKG_LICENSE = MIT +PKG_SUMMARY = Direct Rendering Manager runtime library. + +PKG_BUILD_DEPS+= automake autoconf libtool libxcb-devel pkg-config libudev-devel + +PKG_PACKAGES += $(PKG_NAME_REAL)-devel + +define PKG_DESCRIPTION + Direct Rendering Manager runtime library. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +CONFIGURE_OPTIONS += \ + --enable-udev \ + --enable-libkms \ + --disable-static + +define STAGE_PREPARE_CMDS + cd $(DIR_APP) && sed -e "s/pthread-stubs//g" -i configure.ac + cd $(DIR_APP) && sed -e "s/PKG_CHECK_MODULES(PTHREADSTUBS, )//g" -i configure.ac + cd $(DIR_APP) && autoreconf -v --install +endef + +define STAGE_INSTALL_CMDS + mkdir -pv $(BUILDROOT)/lib/udev/rules.d/ + cd $(DIR_APP) && install -m 644 $(DIR_SOURCE)/91-drm-modeset.rules\ + $(BUILDROOT)/lib/udev/rules.d/ +endef diff --git a/pkgs/core/libdrm/patches/libdrm-2.4.0-no-bc.patch b/pkgs/core/libdrm/patches/libdrm-2.4.0-no-bc.patch new file mode 100644 index 0000000..ad14e21 --- /dev/null +++ b/pkgs/core/libdrm/patches/libdrm-2.4.0-no-bc.patch @@ -0,0 +1,54 @@ +diff -up libdrm-20080814/xf86drm.c.no-bc libdrm-20080814/xf86drm.c +--- libdrm-20080814/xf86drm.c.no-bc 2008-08-14 15:43:09.000000000 +1000 ++++ libdrm-20080814/xf86drm.c 2008-08-14 15:45:09.000000000 +1000 +@@ -396,11 +396,6 @@ int drmAvailable(void) + int fd; + + if ((fd = drmOpenMinor(0, 1, DRM_NODE_RENDER)) < 0) { +-#ifdef __linux__ +- /* Try proc for backward Linux compatibility */ +- if (!access("/proc/dri/0", R_OK)) +- return 1; +-#endif + return 0; + } + +@@ -519,38 +514,6 @@ static int drmOpenByName(const char *nam + } + } + +-#ifdef __linux__ +- /* Backward-compatibility /proc support */ +- for (i = 0; i < 8; i++) { +- char proc_name[64], buf[512]; +- char *driver, *pt, *devstring; +- int retcode; +- +- sprintf(proc_name, "/proc/dri/%d/name", i); +- if ((fd = open(proc_name, 0, 0)) >= 0) { +- retcode = read(fd, buf, sizeof(buf)-1); +- close(fd); +- if (retcode) { +- buf[retcode-1] = '\0'; +- for (driver = pt = buf; *pt && *pt != ' '; ++pt) +- ; +- if (*pt) { /* Device is next */ +- *pt = '\0'; +- if (!strcmp(driver, name)) { /* Match */ +- for (devstring = ++pt; *pt && *pt != ' '; ++pt) +- ; +- if (*pt) { /* Found busid */ +- return drmOpenByBusid(++pt); +- } else { /* No busid */ +- return drmOpenDevice(strtol(devstring, NULL, 0),i, DRM_NODE_RENDER); +- } +- } +- } +- } +- } +- } +-#endif +- + return -1; + } + diff --git a/pkgs/core/libdrm/patches/libdrm-2.4.21-b803918f3f.patch b/pkgs/core/libdrm/patches/libdrm-2.4.21-b803918f3f.patch new file mode 100644 index 0000000..ff8c1c4 --- /dev/null +++ b/pkgs/core/libdrm/patches/libdrm-2.4.21-b803918f3f.patch @@ -0,0 +1,506 @@ +diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c +index a8e072d..3446390 100644 +--- a/intel/intel_bufmgr_gem.c ++++ b/intel/intel_bufmgr_gem.c +@@ -93,6 +93,7 @@ typedef struct _drm_intel_bufmgr_gem { + /** Array of lists of cached gem objects of power-of-two sizes */ + struct drm_intel_gem_bo_bucket cache_bucket[14 * 4]; + int num_buckets; ++ time_t time; + + uint64_t gtt_size; + int available_fences; +@@ -132,6 +133,7 @@ struct _drm_intel_bo_gem { + */ + uint32_t tiling_mode; + uint32_t swizzle_mode; ++ unsigned long stride; + + time_t free_time; + +@@ -200,8 +202,9 @@ drm_intel_gem_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, + uint32_t * swizzle_mode); + + static int +-drm_intel_gem_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, +- uint32_t stride); ++drm_intel_gem_bo_set_tiling_internal(drm_intel_bo *bo, ++ uint32_t tiling_mode, ++ uint32_t stride); + + static void drm_intel_gem_bo_unreference_locked_timed(drm_intel_bo *bo, + time_t time); +@@ -251,7 +254,7 @@ drm_intel_gem_bo_tile_size(drm_intel_bufmgr_gem *bufmgr_gem, unsigned long size, + */ + static unsigned long + drm_intel_gem_bo_tile_pitch(drm_intel_bufmgr_gem *bufmgr_gem, +- unsigned long pitch, uint32_t tiling_mode) ++ unsigned long pitch, uint32_t *tiling_mode) + { + unsigned long tile_width; + unsigned long i; +@@ -259,10 +262,10 @@ drm_intel_gem_bo_tile_pitch(drm_intel_bufmgr_gem *bufmgr_gem, + /* If untiled, then just align it so that we can do rendering + * to it with the 3D engine. + */ +- if (tiling_mode == I915_TILING_NONE) ++ if (*tiling_mode == I915_TILING_NONE) + return ALIGN(pitch, 64); + +- if (tiling_mode == I915_TILING_X) ++ if (*tiling_mode == I915_TILING_X) + tile_width = 512; + else + tile_width = 128; +@@ -271,6 +274,14 @@ drm_intel_gem_bo_tile_pitch(drm_intel_bufmgr_gem *bufmgr_gem, + if (bufmgr_gem->gen >= 4) + return ROUND_UP_TO(pitch, tile_width); + ++ /* The older hardware has a maximum pitch of 8192 with tiled ++ * surfaces, so fallback to untiled if it's too large. ++ */ ++ if (pitch > 8192) { ++ *tiling_mode = I915_TILING_NONE; ++ return ALIGN(pitch, 64); ++ } ++ + /* Pre-965 needs power of two tile width */ + for (i = tile_width; i < pitch; i <<= 1) + ; +@@ -549,7 +560,9 @@ static drm_intel_bo * + drm_intel_gem_bo_alloc_internal(drm_intel_bufmgr *bufmgr, + const char *name, + unsigned long size, +- unsigned long flags) ++ unsigned long flags, ++ uint32_t tiling_mode, ++ unsigned long stride) + { + drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr; + drm_intel_bo_gem *bo_gem; +@@ -615,6 +628,13 @@ retry: + bucket); + goto retry; + } ++ ++ if (drm_intel_gem_bo_set_tiling_internal(&bo_gem->bo, ++ tiling_mode, ++ stride)) { ++ drm_intel_gem_bo_free(&bo_gem->bo); ++ goto retry; ++ } + } + } + pthread_mutex_unlock(&bufmgr_gem->lock); +@@ -642,6 +662,17 @@ retry: + return NULL; + } + bo_gem->bo.bufmgr = bufmgr; ++ ++ bo_gem->tiling_mode = I915_TILING_NONE; ++ bo_gem->swizzle_mode = I915_BIT_6_SWIZZLE_NONE; ++ bo_gem->stride = 0; ++ ++ if (drm_intel_gem_bo_set_tiling_internal(&bo_gem->bo, ++ tiling_mode, ++ stride)) { ++ drm_intel_gem_bo_free(&bo_gem->bo); ++ return NULL; ++ } + } + + bo_gem->name = name; +@@ -650,8 +681,6 @@ retry: + bo_gem->reloc_tree_fences = 0; + bo_gem->used_as_reloc_target = 0; + bo_gem->has_error = 0; +- bo_gem->tiling_mode = I915_TILING_NONE; +- bo_gem->swizzle_mode = I915_BIT_6_SWIZZLE_NONE; + bo_gem->reusable = 1; + + drm_intel_bo_gem_set_in_aperture_size(bufmgr_gem, bo_gem); +@@ -669,7 +698,8 @@ drm_intel_gem_bo_alloc_for_render(drm_intel_bufmgr *bufmgr, + unsigned int alignment) + { + return drm_intel_gem_bo_alloc_internal(bufmgr, name, size, +- BO_ALLOC_FOR_RENDER); ++ BO_ALLOC_FOR_RENDER, ++ I915_TILING_NONE, 0); + } + + static drm_intel_bo * +@@ -678,7 +708,8 @@ drm_intel_gem_bo_alloc(drm_intel_bufmgr *bufmgr, + unsigned long size, + unsigned int alignment) + { +- return drm_intel_gem_bo_alloc_internal(bufmgr, name, size, 0); ++ return drm_intel_gem_bo_alloc_internal(bufmgr, name, size, 0, ++ I915_TILING_NONE, 0); + } + + static drm_intel_bo * +@@ -687,10 +718,8 @@ drm_intel_gem_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name, + unsigned long *pitch, unsigned long flags) + { + drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; +- drm_intel_bo *bo; + unsigned long size, stride; + uint32_t tiling; +- int ret; + + do { + unsigned long aligned_y; +@@ -717,24 +746,17 @@ drm_intel_gem_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name, + aligned_y = ALIGN(y, 32); + + stride = x * cpp; +- stride = drm_intel_gem_bo_tile_pitch(bufmgr_gem, stride, tiling); ++ stride = drm_intel_gem_bo_tile_pitch(bufmgr_gem, stride, tiling_mode); + size = stride * aligned_y; + size = drm_intel_gem_bo_tile_size(bufmgr_gem, size, tiling_mode); + } while (*tiling_mode != tiling); +- +- bo = drm_intel_gem_bo_alloc_internal(bufmgr, name, size, flags); +- if (!bo) +- return NULL; +- +- ret = drm_intel_gem_bo_set_tiling(bo, tiling_mode, stride); +- if (ret != 0) { +- drm_intel_gem_bo_unreference(bo); +- return NULL; +- } +- + *pitch = stride; + +- return bo; ++ if (tiling == I915_TILING_NONE) ++ stride = 0; ++ ++ return drm_intel_gem_bo_alloc_internal(bufmgr, name, size, flags, ++ tiling, stride); + } + + /** +@@ -791,6 +813,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr, + } + bo_gem->tiling_mode = get_tiling.tiling_mode; + bo_gem->swizzle_mode = get_tiling.swizzle_mode; ++ /* XXX stride is unknown */ + drm_intel_bo_gem_set_in_aperture_size(bufmgr_gem, bo_gem); + + DBG("bo_create_from_handle: %d (%s)\n", handle, bo_gem->name); +@@ -829,6 +852,9 @@ drm_intel_gem_cleanup_bo_cache(drm_intel_bufmgr_gem *bufmgr_gem, time_t time) + { + int i; + ++ if (bufmgr_gem->time == time) ++ return; ++ + for (i = 0; i < bufmgr_gem->num_buckets; i++) { + struct drm_intel_gem_bo_bucket *bucket = + &bufmgr_gem->cache_bucket[i]; +@@ -846,6 +872,8 @@ drm_intel_gem_cleanup_bo_cache(drm_intel_bufmgr_gem *bufmgr_gem, time_t time) + drm_intel_gem_bo_free(&bo_gem->bo); + } + } ++ ++ bufmgr_gem->time = time; + } + + static void +@@ -854,7 +882,6 @@ drm_intel_gem_bo_unreference_final(drm_intel_bo *bo, time_t time) + drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; + drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; + struct drm_intel_gem_bo_bucket *bucket; +- uint32_t tiling_mode; + int i; + + /* Unreference all the target buffers */ +@@ -883,9 +910,7 @@ drm_intel_gem_bo_unreference_final(drm_intel_bo *bo, time_t time) + + bucket = drm_intel_gem_bo_bucket_for_size(bufmgr_gem, bo->size); + /* Put the buffer into our internal cache for reuse if we can. */ +- tiling_mode = I915_TILING_NONE; + if (bufmgr_gem->bo_reuse && bo_gem->reusable && bucket != NULL && +- drm_intel_gem_bo_set_tiling(bo, &tiling_mode, 0) == 0 && + drm_intel_gem_bo_madvise_internal(bufmgr_gem, bo_gem, + I915_MADV_DONTNEED)) { + bo_gem->free_time = time; +@@ -894,8 +919,6 @@ drm_intel_gem_bo_unreference_final(drm_intel_bo *bo, time_t time) + bo_gem->validate_index = -1; + + DRMLISTADDTAIL(&bo_gem->head, &bucket->head); +- +- drm_intel_gem_cleanup_bo_cache(bufmgr_gem, time); + } else { + drm_intel_gem_bo_free(bo); + } +@@ -925,6 +948,7 @@ static void drm_intel_gem_bo_unreference(drm_intel_bo *bo) + + pthread_mutex_lock(&bufmgr_gem->lock); + drm_intel_gem_bo_unreference_final(bo, time.tv_sec); ++ drm_intel_gem_cleanup_bo_cache(bufmgr_gem, time.tv_sec); + pthread_mutex_unlock(&bufmgr_gem->lock); + } + } +@@ -982,12 +1006,9 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int write_enable) + &set_domain); + } while (ret == -1 && errno == EINTR); + if (ret != 0) { +- ret = -errno; + fprintf(stderr, "%s:%d: Error setting to CPU domain %d: %s\n", + __FILE__, __LINE__, bo_gem->gem_handle, + strerror(errno)); +- pthread_mutex_unlock(&bufmgr_gem->lock); +- return ret; + } + + pthread_mutex_unlock(&bufmgr_gem->lock); +@@ -1062,9 +1083,7 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) + DRM_IOCTL_I915_GEM_SET_DOMAIN, + &set_domain); + } while (ret == -1 && errno == EINTR); +- + if (ret != 0) { +- ret = -errno; + fprintf(stderr, "%s:%d: Error setting domain %d: %s\n", + __FILE__, __LINE__, bo_gem->gem_handle, + strerror(errno)); +@@ -1072,7 +1091,7 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) + + pthread_mutex_unlock(&bufmgr_gem->lock); + +- return ret; ++ return 0; + } + + int drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo) +@@ -1587,7 +1606,7 @@ drm_intel_gem_bo_mrb_exec2(drm_intel_bo *bo, int used, + + if (ret != 0) { + ret = -errno; +- if (ret == -ENOMEM) { ++ if (ret == -ENOSPC) { + fprintf(stderr, + "Execbuffer fails to pin. " + "Estimate: %u. Actual: %u. Available: %u\n", +@@ -1671,34 +1690,56 @@ drm_intel_gem_bo_unpin(drm_intel_bo *bo) + } + + static int +-drm_intel_gem_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, +- uint32_t stride) ++drm_intel_gem_bo_set_tiling_internal(drm_intel_bo *bo, ++ uint32_t tiling_mode, ++ uint32_t stride) + { + drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; + drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; + struct drm_i915_gem_set_tiling set_tiling; + int ret; + +- if (bo_gem->global_name == 0 && *tiling_mode == bo_gem->tiling_mode) ++ if (bo_gem->global_name == 0 && ++ tiling_mode == bo_gem->tiling_mode && ++ stride == bo_gem->stride) + return 0; + + memset(&set_tiling, 0, sizeof(set_tiling)); +- set_tiling.handle = bo_gem->gem_handle; +- + do { +- set_tiling.tiling_mode = *tiling_mode; ++ set_tiling.handle = bo_gem->gem_handle; ++ set_tiling.tiling_mode = tiling_mode; + set_tiling.stride = stride; + + ret = ioctl(bufmgr_gem->fd, + DRM_IOCTL_I915_GEM_SET_TILING, + &set_tiling); + } while (ret == -1 && errno == EINTR); +- if (ret == 0) { +- bo_gem->tiling_mode = set_tiling.tiling_mode; +- bo_gem->swizzle_mode = set_tiling.swizzle_mode; ++ if (ret == -1) ++ return -errno; ++ ++ bo_gem->tiling_mode = set_tiling.tiling_mode; ++ bo_gem->swizzle_mode = set_tiling.swizzle_mode; ++ bo_gem->stride = set_tiling.stride; ++ return 0; ++} ++ ++static int ++drm_intel_gem_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, ++ uint32_t stride) ++{ ++ drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; ++ drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; ++ int ret; ++ ++ /* Linear buffers have no stride. By ensuring that we only ever use ++ * stride 0 with linear buffers, we simplify our code. ++ */ ++ if (*tiling_mode == I915_TILING_NONE) ++ stride = 0; ++ ++ ret = drm_intel_gem_bo_set_tiling_internal(bo, *tiling_mode, stride); ++ if (ret == 0) + drm_intel_bo_gem_set_in_aperture_size(bufmgr_gem, bo_gem); +- } else +- ret = -errno; + + *tiling_mode = bo_gem->tiling_mode; + return ret; +diff --git a/xf86drmMode.c b/xf86drmMode.c +index f330e6f..ecb1fd5 100644 +--- a/xf86drmMode.c ++++ b/xf86drmMode.c +@@ -52,6 +52,12 @@ + #define U642VOID(x) ((void *)(unsigned long)(x)) + #define VOID2U64(x) ((uint64_t)(unsigned long)(x)) + ++static inline DRM_IOCTL(int fd, int cmd, void *arg) ++{ ++ int ret = drmIoctl(fd, cmd, arg); ++ return ret < 0 ? -errno : ret; ++} ++ + /* + * Util functions + */ +@@ -242,7 +248,7 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth, + f.depth = depth; + f.handle = bo_handle; + +- if ((ret = drmIoctl(fd, DRM_IOCTL_MODE_ADDFB, &f))) ++ if ((ret = DRM_IOCTL(fd, DRM_IOCTL_MODE_ADDFB, &f))) + return ret; + + *buf_id = f.fb_id; +@@ -251,7 +257,7 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth, + + int drmModeRmFB(int fd, uint32_t bufferId) + { +- return drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &bufferId); ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_RMFB, &bufferId); + + + } +@@ -289,7 +295,7 @@ int drmModeDirtyFB(int fd, uint32_t bufferId, + dirty.clips_ptr = VOID2U64(clips); + dirty.num_clips = num_clips; + +- return drmIoctl(fd, DRM_IOCTL_MODE_DIRTYFB, &dirty); ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_DIRTYFB, &dirty); + } + + +@@ -344,7 +350,7 @@ int drmModeSetCrtc(int fd, uint32_t crtcId, uint32_t bufferId, + } else + crtc.mode_valid = 0; + +- return drmIoctl(fd, DRM_IOCTL_MODE_SETCRTC, &crtc); ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_SETCRTC, &crtc); + } + + /* +@@ -361,7 +367,7 @@ int drmModeSetCursor(int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width + arg.height = height; + arg.handle = bo_handle; + +- return drmIoctl(fd, DRM_IOCTL_MODE_CURSOR, &arg); ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_CURSOR, &arg); + } + + int drmModeMoveCursor(int fd, uint32_t crtcId, int x, int y) +@@ -373,7 +379,7 @@ int drmModeMoveCursor(int fd, uint32_t crtcId, int x, int y) + arg.x = x; + arg.y = y; + +- return drmIoctl(fd, DRM_IOCTL_MODE_CURSOR, &arg); ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_CURSOR, &arg); + } + + /* +@@ -510,7 +516,7 @@ int drmModeAttachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_inf + memcpy(&res.mode, mode_info, sizeof(struct drm_mode_modeinfo)); + res.connector_id = connector_id; + +- return drmIoctl(fd, DRM_IOCTL_MODE_ATTACHMODE, &res); ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_ATTACHMODE, &res); + } + + int drmModeDetachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_info) +@@ -520,7 +526,7 @@ int drmModeDetachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_inf + memcpy(&res.mode, mode_info, sizeof(struct drm_mode_modeinfo)); + res.connector_id = connector_id; + +- return drmIoctl(fd, DRM_IOCTL_MODE_DETACHMODE, &res); ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_DETACHMODE, &res); + } + + +@@ -637,16 +643,12 @@ int drmModeConnectorSetProperty(int fd, uint32_t connector_id, uint32_t property + uint64_t value) + { + struct drm_mode_connector_set_property osp; +- int ret; + + osp.connector_id = connector_id; + osp.prop_id = property_id; + osp.value = value; + +- if ((ret = drmIoctl(fd, DRM_IOCTL_MODE_SETPROPERTY, &osp))) +- return ret; +- +- return 0; ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_SETPROPERTY, &osp); + } + + /* +@@ -715,7 +717,6 @@ int drmCheckModesettingSupported(const char *busid) + int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size, + uint16_t *red, uint16_t *green, uint16_t *blue) + { +- int ret; + struct drm_mode_crtc_lut l; + + l.crtc_id = crtc_id; +@@ -724,16 +725,12 @@ int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size, + l.green = VOID2U64(green); + l.blue = VOID2U64(blue); + +- if ((ret = drmIoctl(fd, DRM_IOCTL_MODE_GETGAMMA, &l))) +- return ret; +- +- return 0; ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_GETGAMMA, &l); + } + + int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size, + uint16_t *red, uint16_t *green, uint16_t *blue) + { +- int ret; + struct drm_mode_crtc_lut l; + + l.crtc_id = crtc_id; +@@ -742,10 +739,7 @@ int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size, + l.green = VOID2U64(green); + l.blue = VOID2U64(blue); + +- if ((ret = drmIoctl(fd, DRM_IOCTL_MODE_SETGAMMA, &l))) +- return ret; +- +- return 0; ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_SETGAMMA, &l); + } + + int drmHandleEvent(int fd, drmEventContextPtr evctx) +@@ -810,5 +804,5 @@ int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id, + flip.flags = flags; + flip.reserved = 0; + +- return drmIoctl(fd, DRM_IOCTL_MODE_PAGE_FLIP, &flip); ++ return DRM_IOCTL(fd, DRM_IOCTL_MODE_PAGE_FLIP, &flip); + } diff --git a/pkgs/core/libdrm/patches/libdrm-make-dri-perms-okay.patch b/pkgs/core/libdrm/patches/libdrm-make-dri-perms-okay.patch new file mode 100644 index 0000000..0d82319 --- /dev/null +++ b/pkgs/core/libdrm/patches/libdrm-make-dri-perms-okay.patch @@ -0,0 +1,12 @@ +diff -up libdrm-20080303/xf86drm.h.da libdrm-20080303/xf86drm.h +--- libdrm-20080303/xf86drm.h.da 2008-03-19 15:26:31.000000000 +1000 ++++ libdrm-20080303/xf86drm.h 2008-03-19 15:26:46.000000000 +1000 +@@ -45,7 +45,7 @@ + /* Default /dev/dri directory permissions 0755 */ + #define DRM_DEV_DIRMODE \ + (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) +-#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) ++#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) + + #define DRM_DIR_NAME "/dev/dri" + #define DRM_DEV_NAME "%s/card%d" diff --git a/pkgs/core/libevent/libevent.nm b/pkgs/core/libevent/libevent.nm index bdea038..e181694 100644 --- a/pkgs/core/libevent/libevent.nm +++ b/pkgs/core/libevent/libevent.nm @@ -46,6 +46,8 @@ endef
PKG_TARBALL = $(THISAPP)-stable.tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + DIR_APP = $(DIR_SRC)/$(THISAPP)-stable
CONFIGURE_OPTIONS += --mandir=/usr/share/man diff --git a/pkgs/core/libffi/libffi.nm b/pkgs/core/libffi/libffi.nm index 29d3481..40811cf 100644 --- a/pkgs/core/libffi/libffi.nm +++ b/pkgs/core/libffi/libffi.nm @@ -41,3 +41,7 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.gz + +PKG_PACKAGES += $(PKG_NAME_REAL)-devel + +PKG_FILES-$(PKG_NAME_REAL)-devel += /usr/lib/libffi-$(PKG_VER) diff --git a/pkgs/core/libfontenc/libfontenc.nm b/pkgs/core/libfontenc/libfontenc.nm index 2de3e09..7fe0b7e 100644 --- a/pkgs/core/libfontenc/libfontenc.nm +++ b/pkgs/core/libfontenc/libfontenc.nm @@ -34,7 +34,9 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = X.Org X11 libfontenc runtime library.
-PKG_BUILD_DEPS+= pkg-config xorg-x11-proto-devel zlib +PKG_BUILD_DEPS+= pkg-config xorg-x11-proto-devel zlib-devel + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION X.Org X11 libfontenc runtime library. diff --git a/pkgs/core/libgcrypt/libgcrypt.nm b/pkgs/core/libgcrypt/libgcrypt.nm index cbe5920..6c50144 100644 --- a/pkgs/core/libgcrypt/libgcrypt.nm +++ b/pkgs/core/libgcrypt/libgcrypt.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include
PKG_NAME = libgcrypt PKG_VER = 1.4.6 -PKG_REL = 0 +PKG_REL = 1
PKG_MAINTAINER = PKG_GROUP = System/Libraries @@ -34,7 +34,7 @@ PKG_URL = http://www.gnupg.org/ PKG_LICENSE = LGPLv2.1+ PKG_SUMMARY = A general-purpose cryptography library.
-PKG_DEPS += libgpg-error +PKG_BUILD_DEPS+= gcc-c++ libgpg-error-devel
define PKG_DESCRIPTION Libgcrypt is a general purpose crypto library based on the code used \ @@ -43,6 +43,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --libdir=/lib \ --enable-noexecstack \ diff --git a/pkgs/core/libgcrypt/patches/libgcrypt-1.4.5-ImplicitDSOLinking.patch b/pkgs/core/libgcrypt/patches/libgcrypt-1.4.5-ImplicitDSOLinking.patch new file mode 100644 index 0000000..7b4671f --- /dev/null +++ b/pkgs/core/libgcrypt/patches/libgcrypt-1.4.5-ImplicitDSOLinking.patch @@ -0,0 +1,24 @@ +diff -up libgcrypt-1.4.5/tests/Makefile.am.ImplicitDSOLinking libgcrypt-1.4.5/tests/Makefile.am +--- libgcrypt-1.4.5/tests/Makefile.am.ImplicitDSOLinking 2009-04-02 04:25:34.000000000 -0500 ++++ libgcrypt-1.4.5/tests/Makefile.am 2010-02-14 14:28:49.792383613 -0600 +@@ -36,7 +36,7 @@ TESTS += benchmark + AM_CPPFLAGS = -I../src -I$(top_srcdir)/src + AM_CFLAGS = $(GPG_ERROR_CFLAGS) + +-LDADD = ../src/libgcrypt.la $(DL_LIBS) ++LDADD = ../src/libgcrypt.la $(DL_LIBS) $(GPG_ERROR_LIBS) + + EXTRA_PROGRAMS = testapi pkbench + noinst_PROGRAMS = $(TESTS) fipsdrv +diff -up libgcrypt-1.4.5/tests/Makefile.in.ImplicitDSOLinking libgcrypt-1.4.5/tests/Makefile.in +--- libgcrypt-1.4.5/tests/Makefile.in.ImplicitDSOLinking 2009-12-11 09:43:30.000000000 -0600 ++++ libgcrypt-1.4.5/tests/Makefile.in 2010-02-14 14:29:30.232368780 -0600 +@@ -334,7 +334,7 @@ top_srcdir = @top_srcdir@ + # a built header. + AM_CPPFLAGS = -I../src -I$(top_srcdir)/src + AM_CFLAGS = $(GPG_ERROR_CFLAGS) +-LDADD = ../src/libgcrypt.la $(DL_LIBS) ++LDADD = ../src/libgcrypt.la $(DL_LIBS) $(GPG_ERROR_LIBS) + EXTRA_DIST = README rsa-16k.key cavs_tests.sh cavs_driver.pl + all: all-am + diff --git a/pkgs/core/libgpg-error/libgpg-error.nm b/pkgs/core/libgpg-error/libgpg-error.nm index 3d88de1..f744656 100644 --- a/pkgs/core/libgpg-error/libgpg-error.nm +++ b/pkgs/core/libgpg-error/libgpg-error.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include
PKG_NAME = libgpg-error PKG_VER = 1.9 -PKG_REL = 0 +PKG_REL = 1
PKG_MAINTAINER = PKG_GROUP = System/Libraries @@ -34,6 +34,8 @@ PKG_URL = http://www.gnupg.org/ PKG_LICENSE = LGPLv2+ PKG_SUMMARY = Library for error values used by GnuPG components.
+PKG_BUILD_DEPS+= gcc-c++ + define PKG_DESCRIPTION This is a library that defines common error values for all GnuPG \ components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, \ @@ -42,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --libdir=/lib
diff --git a/pkgs/core/libgssglue/libgssglue.nm b/pkgs/core/libgssglue/libgssglue.nm index 0f14185..e7026ee 100644 --- a/pkgs/core/libgssglue/libgssglue.nm +++ b/pkgs/core/libgssglue/libgssglue.nm @@ -41,3 +41,5 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.gz + +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/libidn/libidn.nm b/pkgs/core/libidn/libidn.nm index 869c811..d595686 100644 --- a/pkgs/core/libidn/libidn.nm +++ b/pkgs/core/libidn/libidn.nm @@ -43,6 +43,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --libdir=/lib \ --disable-csharp \ diff --git a/pkgs/core/libjpeg/libjpeg.nm b/pkgs/core/libjpeg/libjpeg.nm index 8fe32d2..cbbe9bf 100644 --- a/pkgs/core/libjpeg/libjpeg.nm +++ b/pkgs/core/libjpeg/libjpeg.nm @@ -36,7 +36,7 @@ PKG_SUMMARY = A MMX/SSE2 accelerated library for manipulating JPEG image file
PKG_PACKAGES += $(PKG_NAME_REAL)-devel
-PKG_BUILD_DEPS+= autoconf automake libtool nasm +PKG_BUILD_DEPS+= autoconf automake gcc-c++ libtool nasm
define PKG_DESCRIPTION The libjpeg-turbo-utils package contains simple client programs for \ diff --git a/pkgs/core/libksba/libksba.nm b/pkgs/core/libksba/libksba.nm index 57c0865..02f2fc4 100644 --- a/pkgs/core/libksba/libksba.nm +++ b/pkgs/core/libksba/libksba.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gnugp.org PKG_LICENSE = GPLv3 PKG_SUMMARY = X.509 Library.
-PKG_DEPS += libgpg-error +PKG_BUILD_DEPS+= libgpg-error-devel
define PKG_DESCRIPTION KSBA is a library designed to build software based on the X.509 and \ @@ -42,3 +42,5 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.bz2 + +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/libnetfilter_conntrack/libnetfilter_conntrack.nm b/pkgs/core/libnetfilter_conntrack/libnetfilter_conntrack.nm index 1540c44..0c36c4c 100644 --- a/pkgs/core/libnetfilter_conntrack/libnetfilter_conntrack.nm +++ b/pkgs/core/libnetfilter_conntrack/libnetfilter_conntrack.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.netfilter.org/projects/libnetfilter_conntrack/downlo PKG_LICENSE = GPL PKG_SUMMARY = libnetfilter_conntrack is a userspace library.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libnfnetlink +PKG_BUILD_DEPS+= libnfnetlink-devel pkg-config
define PKG_DESCRIPTION libnetfilter_conntrack is a library that allows user-space \ @@ -44,3 +43,5 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.bz2 + +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/libnetfilter_log/libnetfilter_log.nm b/pkgs/core/libnetfilter_log/libnetfilter_log.nm index 487bff8..10e3fd9 100644 --- a/pkgs/core/libnetfilter_log/libnetfilter_log.nm +++ b/pkgs/core/libnetfilter_log/libnetfilter_log.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.netfilter.org/projects/libnetfilter_log/downloads.ht PKG_LICENSE = GPL PKG_SUMMARY = The libnetfilter_log userspace library.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libnfnetlink +PKG_BUILD_DEPS+= libnfnetlink-devel pkg-config
define PKG_DESCRIPTION libnetfilter_log is a software library to interface with the \ @@ -45,3 +44,5 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.bz2 + +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/libnetfilter_queue/libnetfilter_queue.nm b/pkgs/core/libnetfilter_queue/libnetfilter_queue.nm index c0910fc..f290e12 100644 --- a/pkgs/core/libnetfilter_queue/libnetfilter_queue.nm +++ b/pkgs/core/libnetfilter_queue/libnetfilter_queue.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.netfilter.org/projects/libnetfilter_queue/downloads. PKG_LICENSE = GPL PKG_SUMMARY = The libnetfilter_queue userspace library.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libnfnetlink +PKG_BUILD_DEPS+= libnfnetlink-devel pkg-config
define PKG_DESCRIPTION libnetfilter_queue is a userspace library that provides an API \ @@ -45,3 +44,5 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.bz2 + +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/libnfnetlink/libnfnetlink.nm b/pkgs/core/libnfnetlink/libnfnetlink.nm index e306e5e..b139cbb 100644 --- a/pkgs/core/libnfnetlink/libnfnetlink.nm +++ b/pkgs/core/libnfnetlink/libnfnetlink.nm @@ -43,3 +43,5 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.bz2 + +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/libnfsidmap/libnfsidmap.nm b/pkgs/core/libnfsidmap/libnfsidmap.nm index c587734..80fdb79 100644 --- a/pkgs/core/libnfsidmap/libnfsidmap.nm +++ b/pkgs/core/libnfsidmap/libnfsidmap.nm @@ -41,6 +41,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME_REAL)-devel + CONFIGURE_OPTIONS += --libdir=/lib
define STAGE_INSTALL_CMDS diff --git a/pkgs/core/libnih/libnih.nm b/pkgs/core/libnih/libnih.nm index 7757c2b..99c6084 100644 --- a/pkgs/core/libnih/libnih.nm +++ b/pkgs/core/libnih/libnih.nm @@ -34,8 +34,7 @@ PKG_URL = https://launchpad.net/libnih PKG_LICENSE = GPL2+ PKG_SUMMARY = Small library with advanced functions.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += dbus +PKG_BUILD_DEPS+= dbus-devel pkg-config
define PKG_DESCRIPTION libnih is a small library for C application development containing \ @@ -45,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --libdir=/lib
diff --git a/pkgs/core/libnl/libnl.nm b/pkgs/core/libnl/libnl.nm index 46c2da7..a2133ad 100644 --- a/pkgs/core/libnl/libnl.nm +++ b/pkgs/core/libnl/libnl.nm @@ -41,6 +41,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += --libdir=/lib
define STAGE_INSTALL_CMDS diff --git a/pkgs/core/libpcap/libpcap.nm b/pkgs/core/libpcap/libpcap.nm index ad99b5b..45dccf3 100644 --- a/pkgs/core/libpcap/libpcap.nm +++ b/pkgs/core/libpcap/libpcap.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.tcpdump.org/ PKG_LICENSE = BSD with advertising PKG_SUMMARY = A system-independent interface for user-level packet capture.
-PKG_BUILD_DEPS+= bison flex libnl +PKG_BUILD_DEPS+= bison flex libnl-devel
define PKG_DESCRIPTION Libpcap provides a portable framework for low-level network \ @@ -48,6 +48,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + define STAGE_INSTALL -mkdir -pv $(BUILDROOT)/usr/bin cd $(DIR_APP) && make install install-shared-so DESTDIR=$(BUILDROOT) diff --git a/pkgs/core/libpciaccess/libpciaccess.nm b/pkgs/core/libpciaccess/libpciaccess.nm index b444343..44dab49 100644 --- a/pkgs/core/libpciaccess/libpciaccess.nm +++ b/pkgs/core/libpciaccess/libpciaccess.nm @@ -43,3 +43,5 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + diff --git a/pkgs/core/libpng/libpng.nm b/pkgs/core/libpng/libpng.nm index 4074318..1f5e077 100644 --- a/pkgs/core/libpng/libpng.nm +++ b/pkgs/core/libpng/libpng.nm @@ -34,10 +34,9 @@ PKG_URL = http://www.libpng.org/pub/png/ PKG_LICENSE = zlib PKG_SUMMARY = A library of functions for manipulating PNG image format files.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += zlib +PKG_BUILD_DEPS+= pkg-config zlib-devel
-PKG_PACKAGES += $(PKG_NAME_REAL)-devel +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION The libpng package contains a library of functions for creating and \ diff --git a/pkgs/core/librpcsecgss/librpcsecgss.nm b/pkgs/core/librpcsecgss/librpcsecgss.nm index 5a3eddf..bd4f475 100644 --- a/pkgs/core/librpcsecgss/librpcsecgss.nm +++ b/pkgs/core/librpcsecgss/librpcsecgss.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.citi.umich.edu/projects/nfsv4/linux/librpcsecgss/ PKG_LICENSE = BSD PKG_SUMMARY = A Library for secure rpc communication.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libgssglue +PKG_BUILD_DEPS+= libgssglue-devel pkg-config
define PKG_DESCRIPTION rpcsecgss allows secure rpc communication using the rpcsec_gss \ @@ -44,4 +43,4 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-CFLAGS += -fPIC +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/libsoup/libsoup.nm b/pkgs/core/libsoup/libsoup.nm index 21a8bba..1c29e93 100644 --- a/pkgs/core/libsoup/libsoup.nm +++ b/pkgs/core/libsoup/libsoup.nm @@ -34,8 +34,7 @@ PKG_URL = http://ftp.gnome.org/pub/gnome/sources/libsoup/ PKG_LICENSE = GPL PKG_SUMMARY = HTTP client/server library for GNOME.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += glib2 libxml2 openssl +PKG_BUILD_DEPS+= glib2-devel libxml2-devel openssl-devel pkg-config
define PKG_DESCRIPTION libsoup is an HTTP client/server library for GNOME. It uses GObjects \ @@ -45,5 +44,7 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --without-gnome diff --git a/pkgs/core/libssh2/libssh2.nm b/pkgs/core/libssh2/libssh2.nm index a6ce100..3e1509a 100644 --- a/pkgs/core/libssh2/libssh2.nm +++ b/pkgs/core/libssh2/libssh2.nm @@ -36,7 +36,7 @@ PKG_SUMMARY = A library implementing the SSH2 protocol.
PKG_PACKAGES += $(PKG_NAME_REAL)-devel
-PKG_DEPS += openssl zlib +PKG_BUILD_DEPS+= openssl-devel zlib-devel
define PKG_DESCRIPTION libssh2 is a library implementing the SSH2 protocol as defined by \ diff --git a/pkgs/core/libtiff/libtiff.nm b/pkgs/core/libtiff/libtiff.nm index ee610c9..3163fef 100644 --- a/pkgs/core/libtiff/libtiff.nm +++ b/pkgs/core/libtiff/libtiff.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.libtiff.org PKG_LICENSE = libtiff ( own ) PKG_SUMMARY = Library of functions for manipulating TIFF format image files.
-PKG_BUILD_DEPS+= libjpeg +PKG_BUILD_DEPS+= gcc-c++ libjpeg-devel
define PKG_DESCRIPTION The libtiff package contains a library of functions for manipulating \ @@ -45,4 +45,6 @@ endef
PKG_TARBALL = tiff-$(PKG_VER).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + DIR_APP = /usr/src/tiff-$(PKG_VER) diff --git a/pkgs/core/libtool/libtool.nm b/pkgs/core/libtool/libtool.nm index d8d5cde..bec5870 100644 --- a/pkgs/core/libtool/libtool.nm +++ b/pkgs/core/libtool/libtool.nm @@ -34,6 +34,8 @@ PKG_URL = http://www.gnu.org/software/libtool/ PKG_LICENSE = GPLv2+ and LGPLv2+ and GFDL PKG_SUMMARY = Runtime libraries for GNU Libtool Dynamic Module Loader.
+PKG_PACKAGES += $(PKG_NAME_REAL)-libs $(PKG_NAME_REAL)-devel + define PKG_DESCRIPTION GNU Libtool is a set of shell scripts which automatically \ configure UNIX and UNIX-like systems to generically build \ @@ -42,3 +44,10 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.gz + +# Overwrite filelist for -devel so /usr/share/aclocal will be in main package +define PKG_FILES-$(PKG_NAME)-devel + /usr/include + /usr/lib/lib*.so + /usr/share/libtool/libltdl +endef diff --git a/pkgs/core/libusb-compat/libusb-compat.nm b/pkgs/core/libusb-compat/libusb-compat.nm index eac7dee..a3b70da 100644 --- a/pkgs/core/libusb-compat/libusb-compat.nm +++ b/pkgs/core/libusb-compat/libusb-compat.nm @@ -34,7 +34,7 @@ PKG_URL = http://sourceforge.net/projects/libusb/ PKG_LICENSE = LGPLv2+ PKG_SUMMARY = A library which allows userspace access to USB devices.
-PKG_BUILD_DEPS+= pkg-config +PKG_BUILD_DEPS+= gcc-c++ pkg-config
define PKG_DESCRIPTION This package provides a way for applications to access USB devices. @@ -42,6 +42,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-compat-devel + CONFIGURE_OPTIONS += \ --libdir=/lib \ --disable-build-docs \ diff --git a/pkgs/core/libusb/libusb.nm b/pkgs/core/libusb/libusb.nm index 3bf8601..836378a 100644 --- a/pkgs/core/libusb/libusb.nm +++ b/pkgs/core/libusb/libusb.nm @@ -40,4 +40,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += --disable-static diff --git a/pkgs/core/libuser/libuser.nm b/pkgs/core/libuser/libuser.nm index 2b0aaa8..fb6e34c 100644 --- a/pkgs/core/libuser/libuser.nm +++ b/pkgs/core/libuser/libuser.nm @@ -34,8 +34,7 @@ PKG_URL = https://fedorahosted.org/libuser/ PKG_LICENSE = LGPLv2+ PKG_SUMMARY = A user and group account administration library.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += glib2 openldap popt python +PKG_BUILD_DEPS+= glib2-devel openldap-devel pkg-config popt-devel python-devel
define PKG_DESCRIPTION The libuser library implements a standardized interface for \ @@ -45,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --with-ldap diff --git a/pkgs/core/libvirt/libvirt.nm b/pkgs/core/libvirt/libvirt.nm index a31b506..6ce4878 100644 --- a/pkgs/core/libvirt/libvirt.nm +++ b/pkgs/core/libvirt/libvirt.nm @@ -34,8 +34,10 @@ PKG_URL = http://www.libvirt.org/ PKG_LICENSE = LGPLv2.1+ PKG_SUMMARY = A library for controlling VMs.
-PKG_BUILD_DEPS+= libtool pkg-config -PKG_DEPS += avahi curl cyrus-sasl gnutls libpciaccess libssh2 libxml2 lvm2 parted readline udev +PKG_BUILD_DEPS+= avahi-devel libcurl-devel cyrus-sasl-devel gnutls-devel \ + libpciaccess-devel libssh2-devel libtool libxml2-devel lvm2 parted-devel \ + pkg-config readline-devel libudev-devel +PKG_DEPS += lvm2
define PKG_DESCRIPTION A toolkit to interact with the virtualization capabilities of recent \ diff --git a/pkgs/core/libxcb/libxcb.nm b/pkgs/core/libxcb/libxcb.nm index 79736fa..070552c 100644 --- a/pkgs/core/libxcb/libxcb.nm +++ b/pkgs/core/libxcb/libxcb.nm @@ -34,8 +34,10 @@ PKG_URL = http://xcb.freedesktop.org/ PKG_LICENSE = MIT PKG_SUMMARY = A C binding to the X11 protocol.
-PKG_BUILD_DEPS+= autoconf automake pkg-config xcb-proto xorg-x11-proto-devel -PKG_DEPS += libXau libxslt python +PKG_BUILD_DEPS+= autoconf automake libtool libXau-devel libxslt-devel \ + pkg-config python-devel xcb-proto xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION The X protocol C-language Binding (XCB) is a replacement for Xlib \ diff --git a/pkgs/core/libxkbfile/libxkbfile.nm b/pkgs/core/libxkbfile/libxkbfile.nm index ebced19..272c04a 100644 --- a/pkgs/core/libxkbfile/libxkbfile.nm +++ b/pkgs/core/libxkbfile/libxkbfile.nm @@ -34,8 +34,9 @@ PKG_URL = http://www.x.org PKG_LICENSE = MIT PKG_SUMMARY = X.Org X11 libxkbfile runtime library.
-PKG_BUILD_DEPS+= pkg-config xorg-x11-proto-devel -PKG_DEPS += libX11 +PKG_BUILD_DEPS+= pkg-config libX11-devel xorg-x11-proto-devel + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION The flex program generates scanners. Scanners are programs which can \ diff --git a/pkgs/core/libxml2/libxml2.nm b/pkgs/core/libxml2/libxml2.nm index ce4e012..4f38bb8 100644 --- a/pkgs/core/libxml2/libxml2.nm +++ b/pkgs/core/libxml2/libxml2.nm @@ -34,7 +34,7 @@ PKG_URL = http://xmlsoft.org/ PKG_LICENSE = MIT PKG_SUMMARY = Library providing XML and HTML support.
-PKG_DEPS += zlib +PKG_BUILD_DEPS+= zlib-devel
define PKG_DESCRIPTION This library allows to manipulate XML files. It includes support \ @@ -49,3 +49,5 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.gz + +PKG_PACKAGES += $(PKG_NAME)-devel diff --git a/pkgs/core/libxslt/libxslt.nm b/pkgs/core/libxslt/libxslt.nm index bd3b5b4..6ef5a5e 100644 --- a/pkgs/core/libxslt/libxslt.nm +++ b/pkgs/core/libxslt/libxslt.nm @@ -34,8 +34,9 @@ PKG_URL = http://xmlsoft.org/XSLT/ PKG_LICENSE = MIT PKG_SUMMARY = Library providing the Gnome XSLT engine.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libgcrypt libxml2 python +PKG_BUILD_DEPS+= libgcrypt-devel libxml2-devel pkg-config + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION This C library allows to transform XML files into other XML files \ diff --git a/pkgs/core/lighttpd/lighttpd.nm b/pkgs/core/lighttpd/lighttpd.nm index 9c2422f..d4a506e 100644 --- a/pkgs/core/lighttpd/lighttpd.nm +++ b/pkgs/core/lighttpd/lighttpd.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.lighttpd.net/ PKG_LICENSE = BSD PKG_SUMMARY = Lightning fast webserver with light system requirements.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += bzip2 gdbm openldap openssl pcre zlib +PKG_BUILD_DEPS+= bzip2-devel gdbm-devel openldap-devel openssl-devel pcre-devel \ + pkg-config zlib-devel
define PKG_DESCRIPTION Secure, fast, compliant and very flexible web-server which has been optimized \ diff --git a/pkgs/core/linux-atm/linux-atm.nm b/pkgs/core/linux-atm/linux-atm.nm index 2fc8a3f..c11e70c 100644 --- a/pkgs/core/linux-atm/linux-atm.nm +++ b/pkgs/core/linux-atm/linux-atm.nm @@ -34,7 +34,7 @@ PKG_URL = http://linux-atm.sourceforge.net/ PKG_LICENSE = BSD and GPLv2 and GPLv2+ and LGPLv2+ and MIT PKG_SUMMARY = Tools to support ATM networking under Linux.
-PKG_BUILD_DEPS+= flex kernel-headers +PKG_BUILD_DEPS+= flex kernel-headers perl
define PKG_DESCRIPTION This package contains header files and libraries for development \ @@ -43,6 +43,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --mandir=/usr/share/man diff --git a/pkgs/core/lua/lua.nm b/pkgs/core/lua/lua.nm index d8ac16d..7a36b44 100644 --- a/pkgs/core/lua/lua.nm +++ b/pkgs/core/lua/lua.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.lua.org/ PKG_LICENSE = MIT PKG_SUMMARY = Powerful light-weight programming language.
-PKG_BUILD_DEPS+= autoconf automake libtool -PKG_DEPS += ncurses readline +PKG_BUILD_DEPS+= autoconf automake libtool ncurses-devel readline-devel
define PKG_DESCRIPTION Lua is a powerful light-weight programming language designed for \ @@ -50,6 +49,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + define STAGE_PREPARE_CMDS cd $(DIR_APP) && chmod u+x autogen.sh config.guess config.sub configure \ depcomp install-sh missing diff --git a/pkgs/core/lvm2/lvm2.nm b/pkgs/core/lvm2/lvm2.nm index 578eaeb..db8ca72 100644 --- a/pkgs/core/lvm2/lvm2.nm +++ b/pkgs/core/lvm2/lvm2.nm @@ -34,8 +34,7 @@ PKG_URL = http://sources.redhat.com/lvm2/ PKG_LICENSE = GPLv2 PKG_SUMMARY = Userland logical volume management tools.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += module-init-tools ncurses readline +PKG_BUILD_DEPS+= pkg-config ncurses-devel readline-devel
define PKG_DESCRIPTION LVM2 includes all of the support for handling read/write operations on \ @@ -48,6 +47,11 @@ endef
PKG_TARBALL = $(THISAPP).tgz
+PKG_PACKAGES += libdevmapper libdevmapper-devel + +PKG_FILES-libdevmapper = $(PKG_FILES-$(PKG_NAME_REAL)-libs) +PKG_FILES-libdevmapper-devel = $(PKG_FILES-$(PKG_NAME_REAL)-devel) + THISAPP = $(PKG_NAME).$(PKG_VER)
CONFIGURE_OPTIONS += \ diff --git a/pkgs/core/lzo/lzo.nm b/pkgs/core/lzo/lzo.nm index 2d6e082..89363aa 100644 --- a/pkgs/core/lzo/lzo.nm +++ b/pkgs/core/lzo/lzo.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.oberhumer.com/opensource/lzo/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Data compression library with very fast (de)compression.
-PKG_DEPS += zlib +PKG_BUILD_DEPS+= zlib-devel
define PKG_DESCRIPTION LZO is a portable lossless data compression library written in ANSI C. \ @@ -46,4 +46,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += --disable-static --enable-shared diff --git a/pkgs/core/man-db/man-db.nm b/pkgs/core/man-db/man-db.nm index ac12aa0..c092f45 100644 --- a/pkgs/core/man-db/man-db.nm +++ b/pkgs/core/man-db/man-db.nm @@ -34,7 +34,8 @@ PKG_URL = http://bzr.savannah.gnu.org/r/man-db/ PKG_LICENSE = GPL PKG_SUMMARY = man-db is an on-line manual database.
-PKG_DEPS += db groff less +PKG_BUILD_DEPS+= db-devel groff +PKG_DEPS += groff less
define PKG_DESCRIPTION man-db is an implementation of the standard Unix documentation \ diff --git a/pkgs/core/man-pages/man-pages.nm b/pkgs/core/man-pages/man-pages.nm index c0ad3a6..d68d415 100644 --- a/pkgs/core/man-pages/man-pages.nm +++ b/pkgs/core/man-pages/man-pages.nm @@ -34,6 +34,7 @@ PKG_URL = http://www.kernel.org/pub/linux/docs/manpages/ PKG_LICENSE = GPLv2+ and GPL+ and BSD and MIT and Copyright only and IEEE PKG_SUMMARY = Man (manual) pages from the Linux Documentation Project.
+PKG_BUILD_DEPS = # Nothing PKG_DEPS += man-db
define PKG_DESCRIPTION diff --git a/pkgs/core/mc/mc.nm b/pkgs/core/mc/mc.nm index 4fe7311..dca9e19 100644 --- a/pkgs/core/mc/mc.nm +++ b/pkgs/core/mc/mc.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.ibiblio.org/mc/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = User-friendly text console file manager and visual shell.
-PKG_DEPS += e2fsprogs glib2 samba slang +PKG_BUILD_DEPS+= e2fsprogs-devel glib2-devel samba-devel slang-devel
define PKG_DESCRIPTION Midnight Commander is a visual shell much like a file manager, only \ diff --git a/pkgs/core/mdadm/mdadm.nm b/pkgs/core/mdadm/mdadm.nm index 2792e7b..0c9b404 100644 --- a/pkgs/core/mdadm/mdadm.nm +++ b/pkgs/core/mdadm/mdadm.nm @@ -46,6 +46,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CFLAGS += -fno-strict-aliasing
define STAGE_PREPARE_CMDS diff --git a/pkgs/core/mesa/mesa.nm b/pkgs/core/mesa/mesa.nm new file mode 100644 index 0000000..fcb19e0 --- /dev/null +++ b/pkgs/core/mesa/mesa.nm @@ -0,0 +1,68 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = mesa +PKG_VER = 7.8.2 +PKG_REL = 0 + +PKG_MAINTAINER = +PKG_GROUP = Development/Tools +PKG_URL = http://www.mesa3d.org +PKG_LICENSE = MIT +PKG_SUMMARY = Mesa graphics libraries. + +PKG_BUILD_DEPS+= pkg-config libX11-devel libXdamage-devel libXext-devel\ + libXxf86vm-devel libdrm-devel libxcb-devel + +PKG_PACKAGES += $(PKG_NAME)-devel + +define PKG_DESCRIPTION + Mesa libGL runtime libraries and DRI drivers. +endef + +PKG_TARBALL = MesaLib-$(PKG_VER).tar.bz2 + +DIR_APP = $(DIR_SRC)/Mesa-$(PKG_VER) + +CFLAGS += -Wl,-z,lazy + +QUALITY_AGENT_PERMIT_NOT_FULL_RELRO = yes + +CONFIGURE_OPTIONS += \ + --enable-pic \ + --with-driver=dri \ + --with-state-tracker=dri,glx \ + --disable-glw \ + --disable-glu \ + --disable-glut \ + --disable-gl-osmesa \ + --disable-gallium \ + --disable-gallium-intel \ + --disable-gallium-svga \ + --disable-gallium-radeon \ + --disable-gallium-nouveau \ + --disable-egl \ + --without-demos diff --git a/pkgs/core/module-init-tools/module-init-tools.nm b/pkgs/core/module-init-tools/module-init-tools.nm index 4fd794d..53f6e93 100644 --- a/pkgs/core/module-init-tools/module-init-tools.nm +++ b/pkgs/core/module-init-tools/module-init-tools.nm @@ -34,7 +34,7 @@ PKG_URL = http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Kernel module management utilities.
-PKG_DEPS += zlib +PKG_BUILD_DEPS+= zlib-devel
define PKG_DESCRIPTION The module-init-tools package includes various programs needed \ diff --git a/pkgs/core/mpc/mpc.nm b/pkgs/core/mpc/mpc.nm index e8f6789..14cf1fc 100644 --- a/pkgs/core/mpc/mpc.nm +++ b/pkgs/core/mpc/mpc.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.multiprecision.org/ PKG_LICENSE = LGPLv2.1+ PKG_SUMMARY = Mpc is a C library for the arithmetic of complex numbers.
-PKG_DEPS += gmp mpfr +PKG_BUILD_DEPS+= gmp-devel mpfr-devel
define PKG_DESCRIPTION Mpc is a C library for the arithmetic of complex numbers with \ @@ -44,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME_REAL)-devel + define STAGE_TEST cd $(DIR_APP) && make check endef diff --git a/pkgs/core/mpfr/mpfr.nm b/pkgs/core/mpfr/mpfr.nm index a272f29..d5a733d 100644 --- a/pkgs/core/mpfr/mpfr.nm +++ b/pkgs/core/mpfr/mpfr.nm @@ -34,11 +34,11 @@ PKG_URL = http://www.mpfr.org/ PKG_LICENSE = LGPLv2+ and GPLv2+ and GFDL PKG_SUMMARY = A C library for multiple-precision floating-point computations.
-PKG_DEPS += gmp +PKG_BUILD_DEPS+= gmp-devel
define PKG_DESCRIPTION The MPFR library is a C library for multiple-precision floating-point \ - computations with "correct rounding". The MPFR is efficient and \ + computations with correct rounding. The MPFR is efficient and \ also has a well-defined semantics. It copies the good ideas from the \ ANSI/IEEE-754 standard for double-precision floating-point arithmetic \ (53-bit mantissa). MPFR is based on the GMP multiple-precision \ @@ -47,6 +47,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME_REAL)-devel + ifeq "$(MACHINE)" "x86_64" ABI = 64 else diff --git a/pkgs/core/multipath-tools/multipath-tools.nm b/pkgs/core/multipath-tools/multipath-tools.nm index 647b473..4fbfe46 100644 --- a/pkgs/core/multipath-tools/multipath-tools.nm +++ b/pkgs/core/multipath-tools/multipath-tools.nm @@ -34,8 +34,7 @@ PKG_URL = http://christophe.varoqui.free.fr/ PKG_LICENSE = GPL+ PKG_SUMMARY = Tools to manage multipath devices using device-mapper.
-PKG_BUILD_DEPS+= gzip -PKG_DEPS += libaio lvm2 ncurses readline +PKG_BUILD_DEPS+= gzip libaio-devel libdevmapper-devel ncurses-devel readline-devel
define PKG_DESCRIPTION This package provides tools to manage multipath devices by \ @@ -44,6 +43,8 @@ endef
PKG_TARBALL = $(PKG_NAME)-091027.tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + DIR_APP = $(DIR_SRC)/$(PKG_NAME)
define STAGE_BUILD diff --git a/pkgs/core/nano/nano.nm b/pkgs/core/nano/nano.nm index 1e2ff6b..6981da0 100644 --- a/pkgs/core/nano/nano.nm +++ b/pkgs/core/nano/nano.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.nano-editor.org/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = A small text editor.
-PKG_BUILD_DEPS+= groff -PKG_DEPS += ncurses +PKG_BUILD_DEPS+= groff ncurses-devel
define PKG_DESCRIPTION GNU nano is a small and friendly text editor. @@ -43,9 +42,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-############################################################################### -# Installation Details -############################################################################### CONFIGURE_OPTIONS += \ --bindir=/bin \ --sysconfdir=/etc/nano \ @@ -54,5 +50,6 @@ CONFIGURE_OPTIONS += \ --enable-nanorc
define STAGE_INSTALL_CMDS - cd $(DIR_APP) && install -v -m644 -D doc/nanorc.sample $(BUILDROOT)/etc/nano/nanorc.sample + cd $(DIR_APP) && install -v -m644 -D doc/nanorc.sample \ + $(BUILDROOT)/etc/nano/nanorc.sample endef diff --git a/pkgs/core/net-snmp/net-snmp.nm b/pkgs/core/net-snmp/net-snmp.nm index 239058d..018ffb2 100644 --- a/pkgs/core/net-snmp/net-snmp.nm +++ b/pkgs/core/net-snmp/net-snmp.nm @@ -34,7 +34,7 @@ PKG_URL = http://net-snmp.sourceforge.net PKG_LICENSE = BSD PKG_SUMMARY = Simple Network Management Protocol Daemon.
-PKG_DEPS += perl +PKG_BUILD_DEPS+= perl
define PKG_DESCRIPTION Simple Network Management Protocol (SNMP) is a widely used protocol \ @@ -44,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + PARALLELISMFLAGS = # No parallel build
CONFIGURE_OPTIONS += \ diff --git a/pkgs/core/network/network.nm b/pkgs/core/network/network.nm index 25b6c89..0554d38 100644 --- a/pkgs/core/network/network.nm +++ b/pkgs/core/network/network.nm @@ -34,7 +34,8 @@ PKG_URL = http://www.ipfire.org/ PKG_LICENSE = GPLv3+ PKG_SUMMARY = The IPFire Networking Scripts.
-PKG_DEPS += bash brctl coreutils dhcp grep iproute2 ppp sqlite upstart vlan +PKG_DEPS += bash bridge-utils coreutils dhcp grep iproute2 ppp sqlite \ + upstart vlan
define PKG_DESCRIPTION This script installs the IPFire Networking Scripts. diff --git a/pkgs/core/newt/newt.nm b/pkgs/core/newt/newt.nm index 624a500..e00a083 100644 --- a/pkgs/core/newt/newt.nm +++ b/pkgs/core/newt/newt.nm @@ -34,7 +34,7 @@ PKG_URL = https://fedorahosted.org/releases/n/e/newt/ PKG_LICENSE = LGPLv2 PKG_SUMMARY = A library for text mode user interfaces.
-PKG_DEPS += popt python slang +PKG_BUILD_DEPS+= popt-devel python-devel slang-devel
define PKG_DESCRIPTION Newt is a programming library for color text mode, widget based user \ @@ -48,6 +48,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --without-gpm-support \ --without-tcl diff --git a/pkgs/core/nmap/nmap.nm b/pkgs/core/nmap/nmap.nm index c4f54c0..09752ca 100644 --- a/pkgs/core/nmap/nmap.nm +++ b/pkgs/core/nmap/nmap.nm @@ -34,7 +34,8 @@ PKG_URL = http://nmap.org/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Network exploration tool and security scanner.
-PKG_DEPS += libdnet libpcap lua openssl pcre +PKG_BUILD_DEPS+= gcc-c++ libdnet-devel libpcap-devel lua-devel openssl-devel \ + pcre-devel
define PKG_DESCRIPTION Nmap is a utility for network exploration or security auditing. \ diff --git a/pkgs/core/nss_ldap/nss_ldap.nm b/pkgs/core/nss_ldap/nss_ldap.nm index 5122bc2..e99ad68 100644 --- a/pkgs/core/nss_ldap/nss_ldap.nm +++ b/pkgs/core/nss_ldap/nss_ldap.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.padl.com/ PKG_LICENSE = LGPLv2+ PKG_SUMMARY = NSS library and PAM module for LDAP.
-PKG_DEPS += cyrus-sasl openldap +PKG_BUILD_DEPS+= cyrus-sasl-devel openldap-devel
define PKG_DESCRIPTION This package includes two LDAP access clients: nss_ldap and \ @@ -46,6 +46,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS = \ --prefix=/ \ --libdir=/usr/lib \ diff --git a/pkgs/core/ntp/ntp.nm b/pkgs/core/ntp/ntp.nm index 837fe0c..b842350 100644 --- a/pkgs/core/ntp/ntp.nm +++ b/pkgs/core/ntp/ntp.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.ntp.org/ PKG_LICENSE = MIT, BSD and GPLv2 PKG_SUMMARY = The NTP daemon and utilities.
-PKG_DEPS += openssl readline +PKG_BUILD_DEPS+= openssl-devel readline-devel
define PKG_DESCRIPTION The Network Time Protocol (NTP) is used to synchronize a computer's \ diff --git a/pkgs/core/openl2tp/openl2tp.nm b/pkgs/core/openl2tp/openl2tp.nm index fa0349a..1cc5a9e 100644 --- a/pkgs/core/openl2tp/openl2tp.nm +++ b/pkgs/core/openl2tp/openl2tp.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.openl2tp.org/ PKG_LICENSE = GPL PKG_SUMMARY = A Linux L2TP solution for enterprise VPN and ISPs.
-PKG_BUILD_DEPS+= bison flex tcl -PKG_DEPS += readline +PKG_BUILD_DEPS+= bison flex readline-devel tcl
define PKG_DESCRIPTION OpenL2TP is an open source L2TP client / server, written specifically \ diff --git a/pkgs/core/openldap/openldap.nm b/pkgs/core/openldap/openldap.nm index 1cb64fc..4341367 100644 --- a/pkgs/core/openldap/openldap.nm +++ b/pkgs/core/openldap/openldap.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.openldap.org/ PKG_LICENSE = OpenLDAP PKG_SUMMARY = LDAP support libraries.
-PKG_BUILD_DEPS+= groff -PKG_DEPS += db cyrus-sasl libtool openssl pth +PKG_BUILD_DEPS+= db-devel cyrus-sasl-devel groff libtool libtool-devel \ + openssl-devel pth-devel
define PKG_DESCRIPTION OpenLDAP is an open source suite of LDAP (Lightweight Directory Access \ @@ -48,6 +48,8 @@ endef
PKG_TARBALL = $(THISAPP).tgz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + CONFIGURE_OPTIONS += \ --libexecdir=/usr/lib \ --sysconfdir=/etc \ diff --git a/pkgs/core/openssh/openssh.nm b/pkgs/core/openssh/openssh.nm index 531b87f..cd197af 100644 --- a/pkgs/core/openssh/openssh.nm +++ b/pkgs/core/openssh/openssh.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.openssh.com/portable.html PKG_LICENSE = MIT PKG_SUMMARY = An open source implementation of SSH protocol versions 1 and 2.
-PKG_DEPS += openssl pam +PKG_BUILD_DEPS+= openssl-devel pam-devel
define PKG_DESCRIPTION SH (Secure SHell) is a program for logging into and executing \ diff --git a/pkgs/core/openssl/openssl.nm b/pkgs/core/openssl/openssl.nm index 00ed631..25d8faf 100644 --- a/pkgs/core/openssl/openssl.nm +++ b/pkgs/core/openssl/openssl.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.openssl.org/ PKG_LICENSE = OpenSSL PKG_SUMMARY = A general purpose cryptography library with TLS implementation.
-PKG_BUILD_DEPS+= bc perl -PKG_DEPS += gnutls zlib +PKG_BUILD_DEPS+= bc gnutls-devel perl zlib-devel
define PKG_DESCRIPTION The OpenSSL toolkit provides support for secure communications between \ @@ -45,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + ifneq "$(MACHINE)" "i686" SSL_ARCH = no-asm 386 # 386 implies no-sse2 endif diff --git a/pkgs/core/openvpn/openvpn.nm b/pkgs/core/openvpn/openvpn.nm index 5325dff..a6850a4 100644 --- a/pkgs/core/openvpn/openvpn.nm +++ b/pkgs/core/openvpn/openvpn.nm @@ -34,7 +34,8 @@ PKG_URL = http://openvpn.net/ PKG_LICENSE = GPLv2 PKG_SUMMARY = A full-featured SSL VPN solution.
-PKG_DEPS += iproute2 lzo openssl pam +PKG_BUILD_DEPS+= lzo-devel openssl-devel pam-devel +PKG_DEPS += iproute2
define PKG_DESCRIPTION OpenVPN is a robust and highly flexible tunneling application that uses all \ diff --git a/pkgs/core/os-prober/os-prober.nm b/pkgs/core/os-prober/os-prober.nm index fd158d7..d2eb74d 100644 --- a/pkgs/core/os-prober/os-prober.nm +++ b/pkgs/core/os-prober/os-prober.nm @@ -34,7 +34,8 @@ PKG_URL = http://joey.kitenet.net/code/os-prober/ PKG_LICENSE = GPL PKG_SUMMARY = Utility to detect other OSes on a set of drives.
-PKG_DEPS += dmraid lvm2 udev util-linux-ng +PKG_BUILD_DEPS+= dmraid-devel libdevmapper-devel libudev-devel \ + util-linux-ng-devel
define PKG_DESCRIPTION os-prober is a spinoff of debian-installer. One of the installer's features \ diff --git a/pkgs/core/pakfire/pakfire.nm b/pkgs/core/pakfire/pakfire.nm index 097662a..97742c4 100644 --- a/pkgs/core/pakfire/pakfire.nm +++ b/pkgs/core/pakfire/pakfire.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.ipfire.org/ PKG_LICENSE = GPLv3+ PKG_SUMMARY = Package installer/updater.
-PKG_DEPS += cpio python python-urlgrabber system-release xz +PKG_DEPS += cpio python system-release xz
define PKG_DESCRIPTION Pakfire optains package lists from the mirrors and can install and update \ diff --git a/pkgs/core/pam/pam.nm b/pkgs/core/pam/pam.nm index e2c92fc..a3df9b2 100644 --- a/pkgs/core/pam/pam.nm +++ b/pkgs/core/pam/pam.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.us.kernel.org/pub/linux/libs/pam/index.html PKG_LICENSE = BSD and GPLv2+ and BSD with advertising PKG_SUMMARY = An extensible library which provides authentication for applications.
-PKG_BUILD_DEPS+= bison flex -PKG_DEPS += cracklib +PKG_BUILD_DEPS+= bison cracklib-devel flex
define PKG_DESCRIPTION PAM (Pluggable Authentication Modules) is a system security tool that \ @@ -45,9 +44,7 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
-############################################################################### -# Installation Details -############################################################################### +PKG_PACKAGES += $(PKG_NAME_REAL)-devel
define STAGE_BUILD cd $(DIR_APP) && \ diff --git a/pkgs/core/pam_ldap/pam_ldap.nm b/pkgs/core/pam_ldap/pam_ldap.nm index ff26ba8..d347a8a 100644 --- a/pkgs/core/pam_ldap/pam_ldap.nm +++ b/pkgs/core/pam_ldap/pam_ldap.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.padl.com/OSS/pam_ldap.html PKG_LICENSE = GPL and LGPL PKG_SUMMARY = A pam/ldap module that supports password changes.
-PKG_DEPS += openldap +PKG_BUILD_DEPS+= openldap-devel
define PKG_DESCRIPTION The pam_ldap module provides the means for Solaris and Linux servers \ diff --git a/pkgs/core/pango/pango.nm b/pkgs/core/pango/pango.nm index 43c2ea3..5587122 100644 --- a/pkgs/core/pango/pango.nm +++ b/pkgs/core/pango/pango.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.pango.org/ PKG_LICENSE = LGPLv2+ PKG_SUMMARY = System for layout and rendering of internationalized text.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += cairo fontconfig glib2 +PKG_BUILD_DEPS+= cairo-devel fontconfig-devel gcc-c++ glib2-devel perl \ + pkg-config
define PKG_DESCRIPTION Pango is a library for laying out and rendering of text, with an \ @@ -44,5 +44,7 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --sysconfdir=/etc diff --git a/pkgs/core/parted/parted.nm b/pkgs/core/parted/parted.nm index ff50734..82083ed 100644 --- a/pkgs/core/parted/parted.nm +++ b/pkgs/core/parted/parted.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gnu.org/software/parted PKG_LICENSE = GPLv3+ PKG_SUMMARY = The GNU disk partition manipulation program.
-PKG_DEPS += lvm2 readline util-linux-ng +PKG_BUILD_DEPS+= libdevmapper-devel readline-devel util-linux-ng-devel
define PKG_DESCRIPTION The GNU Parted program allows you to create, destroy, resize, move, \ @@ -45,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --libdir=/lib
diff --git a/pkgs/core/pax-utils/pax-utils.nm b/pkgs/core/pax-utils/pax-utils.nm index 06fcd20..2829cb9 100644 --- a/pkgs/core/pax-utils/pax-utils.nm +++ b/pkgs/core/pax-utils/pax-utils.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gentoo.org/proj/en/hardened/pax-utils.xml PKG_LICENSE = GPLv2+ PKG_SUMMARY = Utilities for checking PaX features.
-PKG_DEPS += libcap +PKG_BUILD_DEPS+= libcap-devel
define PKG_DESCRIPTION This package contains several utilities for checking PaX features. @@ -42,10 +42,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
-############################################################################### -# Installation Details -############################################################################### - define STAGE_BUILD cd $(DIR_APP) && make CFLAGS="$(CFLAGS)" USE_CAP=yes $(PARALLELISMFLAGS) endef diff --git a/pkgs/core/paxctl/paxctl.nm b/pkgs/core/paxctl/paxctl.nm index de3ce8c..3f7920c 100644 --- a/pkgs/core/paxctl/paxctl.nm +++ b/pkgs/core/paxctl/paxctl.nm @@ -34,7 +34,7 @@ PKG_URL = http://pax.grsecurity.net/ PKG_LICENSE = GPLv2 PKG_SUMMARY = Application to control PaX flags.
-PKG_DEPS += m4 +PKG_BUILD_DEPS+= m4
define PKG_DESCRIPTION paxctl may be used to control PaX flags on a per-binary basis. PaX \ @@ -43,10 +43,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-############################################################################### -# Installation Details -############################################################################### - define STAGE_BUILD cd $(DIR_APP) && make $(PARALLELISMFLAGS) CFLAGS="$(CFLAGS)" endef diff --git a/pkgs/core/pcapy/pcapy.nm b/pkgs/core/pcapy/pcapy.nm index 535c202..d74ca55 100644 --- a/pkgs/core/pcapy/pcapy.nm +++ b/pkgs/core/pcapy/pcapy.nm @@ -34,7 +34,7 @@ PKG_URL = http://oss.coresecurity.com/projects/pcapy.html PKG_LICENSE = ASL 1.1 PKG_SUMMARY = A Python interface to libpcap.
-PKG_DEPS += libpcap python +PKG_BUILD_DEPS+= gcc-c++ libpcap-devel python-devel
define PKG_DESCRIPTION Pcapy is a Python extension module that interfaces with the libpcap \ diff --git a/pkgs/core/pciutils/pciutils.nm b/pkgs/core/pciutils/pciutils.nm index d98e034..80d5ae7 100644 --- a/pkgs/core/pciutils/pciutils.nm +++ b/pkgs/core/pciutils/pciutils.nm @@ -41,6 +41,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + define STAGE_BUILD cd $(DIR_APP) && make SHARED=yes OPT="$(CFLAGS)" PREFIX=/usr ZLIB=no $(PARALLELISMFLAGS) endef diff --git a/pkgs/core/pcre/pcre.nm b/pkgs/core/pcre/pcre.nm index 416c73a..0f81d45 100644 --- a/pkgs/core/pcre/pcre.nm +++ b/pkgs/core/pcre/pcre.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.pcre.org/ PKG_LICENSE = BSD PKG_SUMMARY = Perl-compatible regular expression library.
-PKG_DEPS += bzip2 readline zlib +PKG_BUILD_DEPS+= bzip2-devel gcc-c++ readline-devel zlib-devel
define PKG_DESCRIPTION Perl-compatible regular expression library. PCRE has its own native \ @@ -44,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --docdir=/usr/share/doc/pcre-$(PKG_VER) \ --enable-utf8 \ diff --git a/pkgs/core/pdns-recursor/pdns-recursor.nm b/pkgs/core/pdns-recursor/pdns-recursor.nm index 6b7c32d..49e291e 100644 --- a/pkgs/core/pdns-recursor/pdns-recursor.nm +++ b/pkgs/core/pdns-recursor/pdns-recursor.nm @@ -34,7 +34,7 @@ PKG_URL = http://powerdns.com/ PKG_LICENSE = GPLv2 PKG_SUMMARY = A modern, advanced and high performance recursing nameserver.
-PKG_DEPS += boost lua +PKG_BUILD_DEPS+= gcc-c++ boost-devel lua-devel
define PKG_DESCRIPTION PowerDNS Recursor is a non authoritative/recursing DNS server. Use this \ diff --git a/pkgs/core/pdns/pdns.nm b/pkgs/core/pdns/pdns.nm index 915ce52..cd2587d 100644 --- a/pkgs/core/pdns/pdns.nm +++ b/pkgs/core/pdns/pdns.nm @@ -34,7 +34,7 @@ PKG_URL = http://powerdns.com/ PKG_LICENSE = GPLv2 PKG_SUMMARY = A modern, advanced and high performance authoritative-only nameserver.
-PKG_DEPS += boost openldap sqlite zlib +PKG_BUILD_DEPS+= boost-devel gcc-c++ openldap-devel sqlite-devel zlib-devel
define PKG_DESCRIPTION The PowerDNS Nameserver is a modern, advanced and high performance \ diff --git a/pkgs/core/perl-xml-parser/perl-xml-parser.nm b/pkgs/core/perl-xml-parser/perl-xml-parser.nm index 41dbf40..73f03af 100644 --- a/pkgs/core/perl-xml-parser/perl-xml-parser.nm +++ b/pkgs/core/perl-xml-parser/perl-xml-parser.nm @@ -34,7 +34,8 @@ PKG_URL = http://search.cpan.org/dist/XML-Parser/ PKG_LICENSE = GPL+ or Artistic PKG_SUMMARY = Perl module for parsing XML files.
-PKG_DEPS += expat perl +PKG_BUILD_DEPS+= expat-devel perl +PKG_DEPS += perl
define PKG_DESCRIPTION This module provides ways to parse XML documents. It is built on \ diff --git a/pkgs/core/perl/perl.nm b/pkgs/core/perl/perl.nm index 0bab329..44dc563 100644 --- a/pkgs/core/perl/perl.nm +++ b/pkgs/core/perl/perl.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.perl.org/ PKG_LICENSE = GPL+ or Artistic and GPLv2+ or Artistic PKG_SUMMARY = Practical Extraction and Report Language.
-PKG_BUILD_DEPS+= procps # for testing -PKG_DEPS += db gdbm iana-etc zlib +PKG_BUILD_DEPS+= db-devel gcc-c++ gdbm-devel iana-etc procps zlib-devel
define PKG_DESCRIPTION Perl is a high-level programming language with roots in C, sed, awk \ diff --git a/pkgs/core/pinentry/pinentry.nm b/pkgs/core/pinentry/pinentry.nm index 0e79f6e..47ca896 100644 --- a/pkgs/core/pinentry/pinentry.nm +++ b/pkgs/core/pinentry/pinentry.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gnupg.org PKG_LICENSE = GPLv2 PKG_SUMMARY = Collection of simple PIN or passphrase entry dialogs.
-PKG_DEPS += libgpg-error ncurses +PKG_BUILD_DEPS+= libgpg-error-devel ncurses-devel
define PKG_DESCRIPTION Pinentry is a collection of simple PIN or passphrase entry dialogs which \ diff --git a/pkgs/core/pixman/pixman.nm b/pkgs/core/pixman/pixman.nm index da92016..e7a1e0f 100644 --- a/pkgs/core/pixman/pixman.nm +++ b/pkgs/core/pixman/pixman.nm @@ -34,7 +34,7 @@ PKG_URL = http://xorg.freedesktop.org/archive/individual/lib/ PKG_LICENSE = MIT PKG_SUMMARY = Pixel manipulation library.
-PKG_BUILD_DEPS+= pkg-config +PKG_BUILD_DEPS+= perl pkg-config
define PKG_DESCRIPTION Pixman is a pixel manipulation library for X and cairo. @@ -42,6 +42,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + # XXX double check this later on ifeq "$(TARGET)" "via-c7" CONFIGURE_OPTIONS += --enable-mmx #--enable-sse2 diff --git a/pkgs/core/pkg-config/pkg-config.nm b/pkgs/core/pkg-config/pkg-config.nm index 4cbdc29..64cadbe 100644 --- a/pkgs/core/pkg-config/pkg-config.nm +++ b/pkgs/core/pkg-config/pkg-config.nm @@ -34,8 +34,7 @@ PKG_URL = http://pkg-config.freedesktop.org/ PKG_LICENSE = GPLv2 PKG_SUMMARY = A tool for determining compilation options.
-PKG_BUILD_DEPS+= m4 sed -PKG_DEPS += popt +PKG_BUILD_DEPS+= m4 popt-devel sed
define PKG_DESCRIPTION The pkgconfig tool determines compilation options. For each required \ diff --git a/pkgs/core/polkit/polkit.nm b/pkgs/core/polkit/polkit.nm index 830e0f5..f11dc4c 100644 --- a/pkgs/core/polkit/polkit.nm +++ b/pkgs/core/polkit/polkit.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.freedesktop.org/wiki/Software/PolicyKit PKG_LICENSE = LGPLv2+ PKG_SUMMARY = PolicyKit Authorization Framework.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += eggdbus expat intltool glib2 pam perl-xml-parser +PKG_BUILD_DEPS+= eggdbus-devel expat-devel intltool gettext glib2-devel \ + pam-devel perl-xml-parser pkg-config
define PKG_DESCRIPTION PolicyKit is a toolkit for defining and handling authorizations. \ @@ -45,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --libexecdir=/usr/lib/polkit-1 \ diff --git a/pkgs/core/popt/popt.nm b/pkgs/core/popt/popt.nm index f661353..1b6bbb6 100644 --- a/pkgs/core/popt/popt.nm +++ b/pkgs/core/popt/popt.nm @@ -42,6 +42,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --libdir=/lib \
diff --git a/pkgs/core/ppl/ppl.nm b/pkgs/core/ppl/ppl.nm index a692b23..28c03eb 100644 --- a/pkgs/core/ppl/ppl.nm +++ b/pkgs/core/ppl/ppl.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.cs.unipr.it/ppl/ PKG_LICENSE = GPLv3+ PKG_SUMMARY = The Parma Polyhedra Library: a library of numerical abstractions.
-PKG_BUILD_DEPS+= autoconf automake m4 -PKG_DEPS += gmp +PKG_BUILD_DEPS+= autoconf automake gmp-devel m4
define PKG_DESCRIPTION The Parma Polyhedra Library (PPL) is a library for the manipulation of \ @@ -53,6 +52,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME_REAL)-devel + CONFIGURE_OPTIONS += \ --enable-interfaces="c cxx" \ --disable-debugging diff --git a/pkgs/core/ppp/ppp.nm b/pkgs/core/ppp/ppp.nm index f9cb367..7bcd150 100644 --- a/pkgs/core/ppp/ppp.nm +++ b/pkgs/core/ppp/ppp.nm @@ -34,7 +34,7 @@ PKG_URL = ftp://ftp.samba.org/pub/ppp/ PKG_LICENSE = BSD and LGPLv2+ and GPLv2+ and Public Domain PKG_SUMMARY = The PPP (Point-to-Point Protocol) daemon.
-PKG_DEPS += libpcap linux-atm pam +PKG_BUILD_DEPS+= libpcap-devel linux-atm-devel pam-devel
define PKG_DESCRIPTION The ppp package contains the PPP (Point-to-Point Protocol) daemon and \ @@ -46,6 +46,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + define STAGE_PREPARE_CMDS cd $(DIR_APP) && sed -e "s/^LIBS =/LIBS=-lutil/" -i pppd/Makefile.linux
diff --git a/pkgs/core/pptp/pptp.nm b/pkgs/core/pptp/pptp.nm index 6582c1d..e16ad76 100644 --- a/pkgs/core/pptp/pptp.nm +++ b/pkgs/core/pptp/pptp.nm @@ -34,7 +34,8 @@ PKG_URL = http://pptpclient.sourceforge.net/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Point-to-Point Tunneling Protocol (PPTP) Client.
-PKG_DEPS += iproute2 ppp +PKG_BUILD_DEPS+= perl ppp-devel +PKG_DEPS += iproute2
define PKG_DESCRIPTION Client for the proprietary Microsoft Point-to-Point Tunneling \ diff --git a/pkgs/core/procps/procps.nm b/pkgs/core/procps/procps.nm index bf05519..4e838da 100644 --- a/pkgs/core/procps/procps.nm +++ b/pkgs/core/procps/procps.nm @@ -34,7 +34,7 @@ PKG_URL = http://procps.sourceforge.net/ PKG_LICENSE = GPLv2+ and LGPLv2+ PKG_SUMMARY = System and process monitoring utilities.
-PKG_DEPS += ncurses +PKG_BUILD_DEPS+= ncurses-devel
define PKG_DESCRIPTION The procps package contains a set of system utilities that provide \ diff --git a/pkgs/core/psmisc/psmisc.nm b/pkgs/core/psmisc/psmisc.nm index 7378d7e..d54ed04 100644 --- a/pkgs/core/psmisc/psmisc.nm +++ b/pkgs/core/psmisc/psmisc.nm @@ -34,7 +34,7 @@ PKG_URL = http://sourceforge.net/projects/psmisc PKG_LICENSE = GPLv2+ PKG_SUMMARY = Utilities for managing processes on your system.
-PKG_DEPS += ncurses +PKG_BUILD_DEPS+= ncurses-devel
define PKG_DESCRIPTION The psmisc package contains utilities for managing processes on your \ diff --git a/pkgs/core/pth/pth.nm b/pkgs/core/pth/pth.nm index ff42687..f101b9c 100644 --- a/pkgs/core/pth/pth.nm +++ b/pkgs/core/pth/pth.nm @@ -45,11 +45,10 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + PARALLELISMFLAGS = # No parallel build
-############################################################################### -# Installation Details -############################################################################### CONFIGURE_OPTIONS += \ --disable-static \ --mandir=/usr/share/man diff --git a/pkgs/core/pychecker/pychecker.nm b/pkgs/core/pychecker/pychecker.nm index 18425f4..439fb9d 100644 --- a/pkgs/core/pychecker/pychecker.nm +++ b/pkgs/core/pychecker/pychecker.nm @@ -34,7 +34,7 @@ PKG_URL = http://pychecker.sourceforge.net PKG_LICENSE = BSD PKG_SUMMARY = A python source code checking tool.
-PKG_DEPS += python +PKG_BUILD_DEPS+= python-devel
define PKG_DESCRIPTION PyChecker is a python source code checking tool to help you find \ diff --git a/pkgs/core/pyfire/pyfire.nm b/pkgs/core/pyfire/pyfire.nm index 0cba7fe..b138db6 100644 --- a/pkgs/core/pyfire/pyfire.nm +++ b/pkgs/core/pyfire/pyfire.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.ipfire.org PKG_LICENSE = GPLv3+ PKG_SUMMARY = A python library for easy functions.
-PKG_DEPS += python +PKG_BUILD_DEPS+= python
define PKG_DESCRIPTION Pyfire is a library which offers a lot of easy to use functions. diff --git a/pkgs/core/python-IPy/python-IPy.nm b/pkgs/core/python-IPy/python-IPy.nm index c10e03f..77258b0 100644 --- a/pkgs/core/python-IPy/python-IPy.nm +++ b/pkgs/core/python-IPy/python-IPy.nm @@ -34,7 +34,7 @@ PKG_URL = http://software.inl.fr/trac/trac.cgi/wiki/IPy PKG_LICENSE = BSD PKG_SUMMARY = Python module for handling IPv4 and IPv6 Addresses and Networks.
-PKG_DEPS += python +PKG_BUILD_DEPS+= python-devel
define PKG_DESCRIPTION IPy is a Python module for handling IPv4 and IPv6 Addresses and \ diff --git a/pkgs/core/python-cryptsetup/python-cryptsetup.nm b/pkgs/core/python-cryptsetup/python-cryptsetup.nm index 4ab6af2..01c5ea5 100644 --- a/pkgs/core/python-cryptsetup/python-cryptsetup.nm +++ b/pkgs/core/python-cryptsetup/python-cryptsetup.nm @@ -34,7 +34,7 @@ PKG_URL = http://msivak.fedorapeople.org/pycryptsetup PKG_LICENSE = GPLv2+ PKG_SUMMARY = Python bindings for cryptsetup.
-PKG_DEPS += cryptsetup-luks python +PKG_BUILD_DEPS+= cryptsetup-luks-devel python-devel
define PKG_DESCRIPTION A python module to ease the manipulation with LUKS devices. diff --git a/pkgs/core/python-dbus/python-dbus.nm b/pkgs/core/python-dbus/python-dbus.nm index 5628496..2df7e78 100644 --- a/pkgs/core/python-dbus/python-dbus.nm +++ b/pkgs/core/python-dbus/python-dbus.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.freedesktop.org/software/dbus/ PKG_LICENSE = MIT PKG_SUMMARY = Dbus Python Bindings.
-PKG_DEPS += dbus-glib python +PKG_BUILD_DEPS+= dbus-glib-devel pkg-config python
define PKG_DESCRIPTION D-Bus python bindings for use with python programs. diff --git a/pkgs/core/python-decorator/python-decorator.nm b/pkgs/core/python-decorator/python-decorator.nm index 4033a0d..ba81c96 100644 --- a/pkgs/core/python-decorator/python-decorator.nm +++ b/pkgs/core/python-decorator/python-decorator.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.phyast.pitt.edu/~micheles/python/documentation.html PKG_LICENSE = BSD PKG_SUMMARY = Module to simplify usage of decorators.
-PKG_DEPS += python +PKG_BUILD_DEPS+= python
define PKG_DESCRIPTION The aim of the decorator module is to simplify the usage of decorators \ diff --git a/pkgs/core/python-netfilter_conntrack/python-netfilter_conntrack.nm b/pkgs/core/python-netfilter_conntrack/python-netfilter_conntrack.nm index 78ef12b..6219434 100644 --- a/pkgs/core/python-netfilter_conntrack/python-netfilter_conntrack.nm +++ b/pkgs/core/python-netfilter_conntrack/python-netfilter_conntrack.nm @@ -34,7 +34,7 @@ PKG_URL = http://software.inl.fr/trac/wiki/pynetfilter_conntrack PKG_LICENSE = PKG_SUMMARY = Python binding of libnetfilter_conntrack.
-PKG_DEPS += libnetfilter_conntrack python +PKG_BUILD_DEPS+= libnetfilter_conntrack-devel python-devel
define PKG_DESCRIPTION This python library is based on libnetfilter_conntrack, which lets \ diff --git a/pkgs/core/python-parted/python-parted.nm b/pkgs/core/python-parted/python-parted.nm index 09c67e2..f7b304e 100644 --- a/pkgs/core/python-parted/python-parted.nm +++ b/pkgs/core/python-parted/python-parted.nm @@ -34,8 +34,7 @@ PKG_URL = http://fedorahosted.org/pyparted PKG_LICENSE = GPLv2+ PKG_SUMMARY = Python module for GNU parted.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += parted python python-decorator +PKG_BUILD_DEPS+= parted-devel pkg-config python-decorator python-devel
define PKG_DESCRIPTION Python module for the parted library. It is used for manipulating \ diff --git a/pkgs/core/python-pyblock/python-pyblock.nm b/pkgs/core/python-pyblock/python-pyblock.nm index a6a8912..4c17526 100644 --- a/pkgs/core/python-pyblock/python-pyblock.nm +++ b/pkgs/core/python-pyblock/python-pyblock.nm @@ -34,7 +34,7 @@ PKG_URL = http://git.fedorahosted.org/git/?p=pyblock.git;a=summary PKG_LICENSE = GPLv2 or GPLv3 PKG_SUMMARY = Python modules for dealing with block devices.
-PKG_DEPS += dmraid lvm2 python python-parted +PKG_BUILD_DEPS+= dmraid-devel libdevmapper-devel python-devel python-parted
define PKG_DESCRIPTION The pyblock contains Python modules for dealing with block devices. diff --git a/pkgs/core/python-setuptools/python-setuptools.nm b/pkgs/core/python-setuptools/python-setuptools.nm index 3baa8c1..7b508a0 100644 --- a/pkgs/core/python-setuptools/python-setuptools.nm +++ b/pkgs/core/python-setuptools/python-setuptools.nm @@ -34,7 +34,7 @@ PKG_URL = http://pypi.python.org/pypi/setuptools PKG_LICENSE = Python or ZPLv2.0 PKG_SUMMARY = Easily build and distribute Python packages.
-PKG_DEPS += python +PKG_BUILD_DEPS+= python-devel
define PKG_DESCRIPTION Setuptools is a collection of enhancements to the Python distutils \ diff --git a/pkgs/core/python-tornado/python-tornado.nm b/pkgs/core/python-tornado/python-tornado.nm index 67aadb9..c210cec 100644 --- a/pkgs/core/python-tornado/python-tornado.nm +++ b/pkgs/core/python-tornado/python-tornado.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.tornadoweb.org/ PKG_LICENSE = Apache2.0 PKG_SUMMARY = A python based non-blocking web server.
-PKG_DEPS += python +PKG_BUILD_DEPS+= python-devel
define PKG_DESCRIPTION The framework is distinct from most mainstream web server frameworks \ diff --git a/pkgs/core/python-urlgrabber/python-urlgrabber.nm b/pkgs/core/python-urlgrabber/python-urlgrabber.nm index 581d330..54290ce 100644 --- a/pkgs/core/python-urlgrabber/python-urlgrabber.nm +++ b/pkgs/core/python-urlgrabber/python-urlgrabber.nm @@ -34,7 +34,7 @@ PKG_URL = http://urlgrabber.baseurl.org/ PKG_LICENSE = LGPLv2+ PKG_SUMMARY = A high-level cross-protocol url-grabber.
-PKG_DEPS += python +PKG_BUILD_DEPS+= python-devel
define PKG_DESCRIPTION A high-level cross-protocol url-grabber for python supporting HTTP, \ diff --git a/pkgs/core/python/python.nm b/pkgs/core/python/python.nm index 2c0dc34..44a60ae 100644 --- a/pkgs/core/python/python.nm +++ b/pkgs/core/python/python.nm @@ -34,8 +34,9 @@ PKG_URL = http://www.python.org PKG_LICENSE = Python PKG_SUMMARY = An interpreted, interactive, object-oriented programming language.
-PKG_BUILD_DEPS+= autoconf automake pkg-config -PKG_DEPS += bzip2 db expat gdbm gmp libffi ncurses openssl readline sqlite tar zlib +PKG_BUILD_DEPS+= autoconf automake bzip2-devel db-devel expat-devel gdbm-devel \ + libffi-devel ncurses-devel openssl-devel pkg-config readline-devel sqlite-devel \ + tar zlib-devel
define PKG_DESCRIPTION Python is an interpreted, interactive, object-oriented programming \ @@ -47,6 +48,8 @@ endef
PKG_TARBALL = $(THISAPP).tgz
+PKG_PACKAGES += $(PKG_NAME_REAL)-devel + export CFLAGS += -D_GNU_SOURCE -fwrapv export CPPFLAGS = $(shell pkg-config --cflags-only-I libffi)
@@ -79,4 +82,7 @@ define STAGE_INSTALL cd $(DIR_APP) && make install DESTDIR=$(BUILDROOT)
rm -rf $(BUILDROOT)/usr/lib/python*/test/ + + # All *.py files don't need to be executeable... + find $(BUILDROOT)/usr/lib/python*/ -name "*.py" | xargs chmod a-x -v endef diff --git a/pkgs/core/qemu/qemu.nm b/pkgs/core/qemu/qemu.nm index eca71f7..eb8fc69 100644 --- a/pkgs/core/qemu/qemu.nm +++ b/pkgs/core/qemu/qemu.nm @@ -34,7 +34,8 @@ PKG_URL = http://www.linux-kvm.org/page/Main_Page PKG_LICENSE = GPLv2+ PKG_SUMMARY = QEMU is a generic and open source machine emulator and virtualizer.
-PKG_DEPS += curl gnutls ncurses pciutils sdl util-linux-ng +PKG_BUILD_DEPS+= libcurl-devel gnutls-devel ncurses-devel pciutils-devel \ + sdl-devel util-linux-ng-devel
define PKG_DESCRIPTION QEMU is a processor emulator that relies on dynamic binary translation \ diff --git a/pkgs/core/qt/qt.nm b/pkgs/core/qt/qt.nm index 1faee8e..d65ea4c 100644 --- a/pkgs/core/qt/qt.nm +++ b/pkgs/core/qt/qt.nm @@ -34,8 +34,9 @@ PKG_URL = http://www.qtsoftware.com/ PKG_LICENSE = LGPLv2 with exceptions or GPLv3 with exceptions PKG_SUMMARY = Qt toolkit.
-PKG_BUILD_DEPS+= coreutils pkg-config xorg-x11-proto-devel -PKG_DEPS += fontconfig libjpeg libpng libtiff libX11 libXext pcre zlib +PKG_BUILD_DEPS+= fontconfig-devel gcc-c++ libjpeg-devel libpng-devel \ + libtiff-devel libX11-devel libXext-devel pcre-devel pkg-config \ + xorg-x11-proto-devel zlib-devel
define PKG_DESCRIPTION Qt is a software toolkit for developing applications. diff --git a/pkgs/core/quagga/quagga.nm b/pkgs/core/quagga/quagga.nm index a66f29a..ef4c362 100644 --- a/pkgs/core/quagga/quagga.nm +++ b/pkgs/core/quagga/quagga.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.quagga.net/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Quagga is a rounting daemon.
-PKG_DEPS += pam +PKG_BUILD_DEPS+= pam-devel
define PKG_DESCRIPTION Quagga is a free software that manages TCP/IP based routing \ @@ -45,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + define STAGE_BUILD # ac_cv_have_decl_TCP_MD5SIG=no was set to work around a bug cd $(DIR_APP) && \ diff --git a/pkgs/core/readline/readline.nm b/pkgs/core/readline/readline.nm index 00a4c32..4528a6b 100644 --- a/pkgs/core/readline/readline.nm +++ b/pkgs/core/readline/readline.nm @@ -36,7 +36,7 @@ PKG_SUMMARY = A library for editing typed command lines.
PKG_PACKAGES += $(PKG_NAME_REAL)-devel
-PKG_DEPS += ncurses +PKG_BUILD_DEPS+= ncurses-devel
define PKG_DESCRIPTION The Readline library provides a set of functions that allow users to \ diff --git a/pkgs/core/reiser4progs/reiser4progs.nm b/pkgs/core/reiser4progs/reiser4progs.nm index 376165a..03eaf77 100644 --- a/pkgs/core/reiser4progs/reiser4progs.nm +++ b/pkgs/core/reiser4progs/reiser4progs.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.kernel.org/pub/linux/utils/fs/reiser4/reiser4progs/ PKG_LICENSE = GPL PKG_SUMMARY = Administration utilities for the Reiser4 filesystem.
-PKG_BUILD_DEPS+= autoconf automake libtool -PKG_DEPS = e2fsprogs libaal ncurses readline util-linux-ng +PKG_BUILD_DEPS+= autoconf automake e2fsprogs-devel libaal-devel libtool \ + ncurses-devel readline-devel util-linux-ng-devel
define PKG_DESCRIPTION The filesystem utilities for the reiser4 filesystem, including: \ @@ -44,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += \ --sbindir=/sbin \ --libdir=/lib \ diff --git a/pkgs/core/rrdtool/rrdtool.nm b/pkgs/core/rrdtool/rrdtool.nm index 3ed55b1..2cfeead 100644 --- a/pkgs/core/rrdtool/rrdtool.nm +++ b/pkgs/core/rrdtool/rrdtool.nm @@ -34,8 +34,8 @@ PKG_URL = http://oss.oetiker.ch/rrdtool/ PKG_LICENSE = GPLv2+ with exceptions PKG_SUMMARY = Round Robin Database Tool to store and display time-series data.
-PKG_BUILD_DEPS+= gettext groff libtool pkg-config -PKG_DEPS += cairo libxml2 pango python +PKG_BUILD_DEPS+= cairo-devel gcc-c++ gettext groff libtool libxml2-devel \ + pango-devel pkg-config python-devel
define PKG_DESCRIPTION RRD is the Acronym for Round Robin Database. RRD is a system to \ @@ -47,6 +47,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + CONFIGURE_OPTIONS += \ --disable-rrdcgi \ --disable-perl \ diff --git a/pkgs/core/samba/samba.nm b/pkgs/core/samba/samba.nm index 7e4a414..d89c7c6 100644 --- a/pkgs/core/samba/samba.nm +++ b/pkgs/core/samba/samba.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.samba.org/ PKG_LICENSE = GPLv3+ and LGPLv3+ PKG_SUMMARY = Server and Client software to interoperate with Windows machines.
-PKG_BUILD_DEPS+= autoconf automake which -PKG_DEPS += cups gawk ncurses libcap2 openldap openssl pam popt readline +PKG_BUILD_DEPS+= autoconf automake cups-devel ncurses-devel libcap-devel \ + openldap-devel openssl-devel pam-devel popt-devel readline-devel which
define PKG_DESCRIPTION Samba is the suite of programs by which a lot of PC-related machines \ @@ -51,6 +51,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED
define STAGE_BUILD diff --git a/pkgs/core/sane/sane.nm b/pkgs/core/sane/sane.nm index 4f9d5fb..de15925 100644 --- a/pkgs/core/sane/sane.nm +++ b/pkgs/core/sane/sane.nm @@ -34,9 +34,7 @@ PKG_URL = ftp://ftp2.sane-project.org/pub/sane/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = SANE - Scanner Access Now Easy.
-PKG_PACKAGES += $(PKG_NAME_REAL)-devel - -PKG_DEPS += libjpeg libtiff libusb +PKG_BUILD_DEPS+= libjpeg-devel libtiff-devel libusb-devel
define PKG_DESCRIPTION sane-backends - includes: backends (scanner drivers), \ @@ -46,6 +44,8 @@ endef
PKG_TARBALL = $(PKG_NAME)-backends-$(PKG_VER).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + DIR_APP = $(DIR_SRC)/$(PKG_NAME)-backends-$(PKG_VER)
CONFIGURE_OPTIONS += \ diff --git a/pkgs/core/screen/patches/screen-4.0.1-args.patch b/pkgs/core/screen/patches/screen-4.0.1-args.patch new file mode 100644 index 0000000..0fefc55 --- /dev/null +++ b/pkgs/core/screen/patches/screen-4.0.1-args.patch @@ -0,0 +1,31 @@ +--- a/ansi.c.orig 2003-12-04 10:59:05.000000000 -0500 ++++ b/ansi.c 2003-12-04 10:59:20.000000000 -0500 +@@ -559,7 +559,7 @@ + { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': +- if (curr->w_NumArgs < MAXARGS) ++ if (curr->w_NumArgs >= 0 && curr->w_NumArgs < MAXARGS) + { + if (curr->w_args[curr->w_NumArgs] < 100000000) + curr->w_args[curr->w_NumArgs] = +--- a/resize.c.old 2003-11-27 02:55:07.000000000 +0200 ++++ b/resize.c 2003-11-27 02:58:33.000000000 +0200 +@@ -682,6 +682,17 @@ + if (wi == 0) + he = hi = 0; + ++ if (wi > 1000) ++ { ++ Msg(0, "Window width too large, truncated"); ++ wi = 1000; ++ } ++ if (he > 1000) ++ { ++ Msg(0, "Window height too large, truncated"); ++ he = 1000; ++ } ++ + if (p->w_width == wi && p->w_height == he && p->w_histheight == hi) + { + debug("ChangeWindowSize: No change.\n"); diff --git a/pkgs/core/screen/patches/screen-4.0.2-maxstr.patch b/pkgs/core/screen/patches/screen-4.0.2-maxstr.patch new file mode 100644 index 0000000..466e2f1 --- /dev/null +++ b/pkgs/core/screen/patches/screen-4.0.2-maxstr.patch @@ -0,0 +1,11 @@ +--- screen-4.0.2/screen.h.maxstr 2006-07-10 13:37:11.000000000 +0200 ++++ screen-4.0.2/screen.h 2006-07-10 13:36:36.000000000 +0200 +@@ -86,7 +86,7 @@ + + #define Ctrl(c) ((c)&037) + +-#define MAXSTR 256 ++#define MAXSTR 4096 + #define MAXARGS 64 + #define MSGWAIT 5 + #define MSGMINWAIT 1 diff --git a/pkgs/core/screen/patches/screen-4.0.3-configh.patch b/pkgs/core/screen/patches/screen-4.0.3-configh.patch new file mode 100644 index 0000000..5f46385 --- /dev/null +++ b/pkgs/core/screen/patches/screen-4.0.3-configh.patch @@ -0,0 +1,20 @@ +diff -up screen-4.0.3/config.h.in.configh screen-4.0.3/config.h.in +--- screen-4.0.3/config.h.in.configh 2006-10-23 15:06:32.000000000 +0200 ++++ screen-4.0.3/config.h.in 2008-05-19 15:47:19.000000000 +0200 +@@ -291,7 +291,7 @@ + * Define USE_LOCALE if you want screen to use the locale names + * for the name of the month and day of the week. + */ +-#define USE_LOCALE ++#undef USE_LOCALE + + /* + * Define USE_PAM if your system supports PAM (Pluggable Authentication +@@ -563,7 +563,6 @@ + * If you are on a SYS V machine that restricts filename length to 14 + * characters, you may need to enforce that by setting NAME_MAX to 14 + */ +-#undef NAME_MAX /* KEEP_UNDEF_HERE override system value */ + #undef NAME_MAX + + /* diff --git a/pkgs/core/screen/patches/screen-4.0.3-ipv6.patch b/pkgs/core/screen/patches/screen-4.0.3-ipv6.patch new file mode 100644 index 0000000..b7b6f75 --- /dev/null +++ b/pkgs/core/screen/patches/screen-4.0.3-ipv6.patch @@ -0,0 +1,323 @@ +--- screen-4.0.3/window.h.ipv6 2003-08-21 16:57:30.000000000 +0200 ++++ screen-4.0.3/window.h 2006-11-15 13:36:57.000000000 +0100 +@@ -254,7 +254,7 @@ + struct display *w_zdisplay; + #endif + #ifdef BUILTIN_TELNET +- struct sockaddr_in w_telsa; ++ struct sockaddr_storage w_telsa; + char w_telbuf[IOSIZE]; + int w_telbufl; + char w_telmopts[256]; +--- screen-4.0.3/window.c.ipv6 2003-12-05 14:45:41.000000000 +0100 ++++ screen-4.0.3/window.c 2006-11-15 13:39:27.000000000 +0100 +@@ -582,6 +582,13 @@ + n = pp - wtab; + debug1("Makewin creating %d\n", n); + ++#ifdef BUILTIN_TELNET ++ if(!strcmp(nwin.args[0], "//telnet")) { ++ type = W_TYPE_TELNET; ++ TtyName = "telnet"; ++ } ++ else ++#endif + if ((f = OpenDevice(nwin.args, nwin.lflag, &type, &TtyName)) < 0) + return -1; + +@@ -736,7 +743,7 @@ + #ifdef BUILTIN_TELNET + if (type == W_TYPE_TELNET) + { +- if (TelConnect(p)) ++ if (TelOpenAndConnect(p)) + { + FreeWindow(p); + return -1; +@@ -834,6 +841,13 @@ + int lflag, f; + + lflag = nwin_default.lflag; ++#ifdef BUILTIN_TELNET ++ if(!strcmp(p->w_cmdargs[0], "//telnet")) { ++ p->w_type = W_TYPE_TELNET; ++ TtyName = "telnet"; ++ } ++ else ++#endif + if ((f = OpenDevice(p->w_cmdargs, lflag, &p->w_type, &TtyName)) < 0) + return -1; + +@@ -864,7 +878,7 @@ + #ifdef BUILTIN_TELNET + if (p->w_type == W_TYPE_TELNET) + { +- if (TelConnect(p)) ++ if (TelOpenAndConnect(p)) + return -1; + } + else +@@ -1007,16 +1021,6 @@ + + if (!arg) + return -1; +-#ifdef BUILTIN_TELNET +- if (strcmp(arg, "//telnet") == 0) +- { +- f = TelOpen(args + 1); +- lflag = 0; +- *typep = W_TYPE_TELNET; +- *namep = "telnet"; +- } +- else +-#endif + if ((stat(arg, &st)) == 0 && S_ISCHR(st.st_mode)) + { + if (access(arg, R_OK | W_OK) == -1) +--- screen-4.0.3/teln.c.ipv6 2003-09-08 16:26:56.000000000 +0200 ++++ screen-4.0.3/teln.c 2006-11-15 13:36:57.000000000 +0100 +@@ -25,6 +25,7 @@ + #include <sys/socket.h> + #include <fcntl.h> + #include <netdb.h> ++#include <stdio.h> + + #include "config.h" + +@@ -37,12 +38,13 @@ + extern struct layer *flayer; + extern int visual_bell; + extern char screenterm[]; ++extern int af; + + static void TelReply __P((struct win *, char *, int)); + static void TelDocmd __P((struct win *, int, int)); + static void TelDosub __P((struct win *)); +- +-#define TEL_DEFPORT 23 ++// why TEL_DEFPORT has " ++#define TEL_DEFPORT "23" + #define TEL_CONNECTING (-2) + + #define TC_IAC 255 +@@ -99,86 +101,78 @@ + } + + int +-TelOpen(args) +-char **args; +-{ +- int fd; +- int on = 1; +- +- if ((fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) +- { +- Msg(errno, "TelOpen: socket"); +- return -1; +- } +- if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, (char *)&on, sizeof(on))) +- Msg(errno, "TelOpen: setsockopt SO_OOBINLINE"); +- return fd; +-} +- +-int +-TelConnect(p) +-struct win *p; +-{ +- int port = TEL_DEFPORT; +- struct hostent *hp; +- char **args; ++TelOpenAndConnect(struct win *p) { ++ int fd, on = 1; + char buf[256]; + +- args = p->w_cmdargs + 1; +- +- if (!*args) +- { +- Msg(0, "Usage: screen //telnet host [port]"); +- return -1; +- } +- if (args[1]) +- port = atoi(args[1]); +- p->w_telsa.sin_family = AF_INET; +- if((p->w_telsa.sin_addr.s_addr = inet_addr(*args)) == -1) +- { +- if ((hp = gethostbyname(*args)) == NULL) +- { +- Msg(0, "unknown host: %s", *args); +- return -1; +- } +- if (hp->h_length != sizeof(p->w_telsa.sin_addr.s_addr) || hp->h_addrtype != AF_INET) +- { +- Msg(0, "Bad address type for %s", hp->h_name); +- return -1; +- } +- bcopy((char *)hp->h_addr,(char *)&p->w_telsa.sin_addr.s_addr, hp->h_length); +- p->w_telsa.sin_family = hp->h_addrtype; +- } +- p->w_telsa.sin_port = htons(port); +- if (port != TEL_DEFPORT) +- sprintf(buf, "Trying %s %d...", inet_ntoa(p->w_telsa.sin_addr), port); +- else +- sprintf(buf, "Trying %s...", inet_ntoa(p->w_telsa.sin_addr)); +- WriteString(p, buf, strlen(buf)); +- if (connect(p->w_ptyfd, (struct sockaddr *)&p->w_telsa, sizeof(p->w_telsa))) +- { +- if (errno == EINPROGRESS) +- { +- p->w_telstate = TEL_CONNECTING; +- p->w_telconnev.fd = p->w_ptyfd; +- p->w_telconnev.handler = tel_connev_fn; +- p->w_telconnev.data = (char *)p; +- p->w_telconnev.type = EV_WRITE; +- p->w_telconnev.pri = 1; +- debug("telnet connect in progress...\n"); +- evenq(&p->w_telconnev); +- } +- else +- { +- Msg(errno, "TelOpen: connect"); +- return -1; +- } +- } +- else +- WriteString(p, "connected.\r\n", 12); +- if (port == TEL_DEFPORT) +- TelReply(p, (char *)tn_init, sizeof(tn_init)); +- return 0; ++ struct addrinfo hints, *res0, *res; ++ ++ if (!(p->w_cmdargs[1])) { ++ Msg(0, "Usage: screen //telnet host [port]"); ++ return -1; ++ } ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = af; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_protocol = IPPROTO_TCP; ++ if(getaddrinfo(p->w_cmdargs[1], p->w_cmdargs[2] ? p->w_cmdargs[2] : TEL_DEFPORT, ++ &hints, &res0)) { ++ Msg(0, "unknown host: %s", p->w_cmdargs[1]); ++ return -1; ++ } ++ ++ for(res = res0; res; res = res->ai_next) { ++ if((fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == -1) { ++ if(res->ai_next) ++ continue; ++ else { ++ Msg(errno, "TelOpenAndConnect: socket"); ++ freeaddrinfo(res0); ++ return -1; ++ } ++ } ++ ++ if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, (char *)&on, sizeof(on))) ++ Msg(errno, "TelOpenAndConnect: setsockopt SO_OOBINLINE"); ++ ++ if (p->w_cmdargs[2] && strcmp(p->w_cmdargs[2], TEL_DEFPORT)) ++ snprintf(buf, 256, "Trying %s %s...", p->w_cmdargs[1], p->w_cmdargs[2]); ++ else ++ snprintf(buf, 256, "Trying %s...", p->w_cmdargs[1]); ++ WriteString(p, buf, strlen(buf)); ++ if (connect(fd, res->ai_addr, res->ai_addrlen)) { ++ if (errno == EINPROGRESS) { ++ p->w_telstate = TEL_CONNECTING; ++ p->w_telconnev.fd = fd; ++ p->w_telconnev.handler = tel_connev_fn; ++ p->w_telconnev.data = (char *)p; ++ p->w_telconnev.type = EV_WRITE; ++ p->w_telconnev.pri = 1; ++ debug("telnet connect in progress...\n"); ++ evenq(&p->w_telconnev); ++ } ++ else { ++ close(fd); ++ if(res->ai_next) ++ continue; ++ else { ++ Msg(errno, "TelOpenAndConnect: connect"); ++ freeaddrinfo(res0); ++ return -1; ++ } ++ } ++ } ++ else ++ WriteString(p, "connected.\r\n", 12); ++ if (!(p->w_cmdargs[2] && strcmp(p->w_cmdargs[2], TEL_DEFPORT))) ++ TelReply(p, (char *)tn_init, sizeof(tn_init)); ++ p->w_ptyfd = fd; ++ memcpy(&p->w_telsa, &res->ai_addr, sizeof(res->ai_addr)); ++ freeaddrinfo(res0); ++ return 0; ++ } ++ return -1; + } + + int +--- screen-4.0.3/help.c.ipv6 2003-09-08 16:25:33.000000000 +0200 ++++ screen-4.0.3/help.c 2006-11-15 13:36:57.000000000 +0100 +@@ -49,6 +49,10 @@ + { + printf("Use: %s [-opts] [cmd [args]]\n", myname); + printf(" or: %s -r [host.tty]\n\nOptions:\n", myname); ++#ifdef BUILTIN_TELNET ++ printf("-4 Use IPv4.\n"); ++ printf("-6 Use IPv6.\n"); ++#endif + printf("-a Force all capabilities into each window's termcap.\n"); + printf("-A -[r|R] Adapt all windows to the new display width & height.\n"); + printf("-c file Read configuration file instead of '.screenrc'.\n"); +--- screen-4.0.3/screen.c.ipv6 2003-09-08 16:26:41.000000000 +0200 ++++ screen-4.0.3/screen.c 2006-11-15 13:36:57.000000000 +0100 +@@ -231,8 +231,9 @@ + struct win *fore; + struct win *windows; + struct win *console_window; +- +- ++#ifdef BUILTIN_TELNET ++int af; ++#endif + + /* + * Do this last +@@ -471,6 +472,9 @@ + nwin = nwin_undef; + nwin_options = nwin_undef; + strcpy(screenterm, "screen"); ++#ifdef BUILTIN_TELNET ++ af = AF_UNSPEC; ++#endif + + logreopen_register(lf_secreopen); + +@@ -505,6 +509,14 @@ + { + switch (*ap) + { ++#ifdef BUILTIN_TELNET ++ case '4': ++ af = AF_INET; ++ break; ++ case '6': ++ af = AF_INET6; ++ break; ++#endif + case 'a': + nwin_options.aflag = 1; + break; +--- screen-4.0.3/extern.h.ipv6 2003-08-22 14:27:57.000000000 +0200 ++++ screen-4.0.3/extern.h 2006-11-15 13:36:57.000000000 +0100 +@@ -446,8 +446,7 @@ + + /* teln.c */ + #ifdef BUILTIN_TELNET +-extern int TelOpen __P((char **)); +-extern int TelConnect __P((struct win *)); ++extern int TelOpenAndConnect __P((struct win *)); + extern int TelIsline __P((struct win *p)); + extern void TelProcessLine __P((char **, int *)); + extern int DoTelnet __P((char *, int *, int)); diff --git a/pkgs/core/screen/patches/screen-4.0.3-libs.patch b/pkgs/core/screen/patches/screen-4.0.3-libs.patch new file mode 100644 index 0000000..a548787 --- /dev/null +++ b/pkgs/core/screen/patches/screen-4.0.3-libs.patch @@ -0,0 +1,50 @@ +diff -up screen-4.0.3/configure.in.libs screen-4.0.3/configure.in +--- screen-4.0.3/configure.in.libs 2003-06-03 13:58:24.000000000 +0200 ++++ screen-4.0.3/configure.in 2008-02-26 13:58:29.000000000 +0100 +@@ -196,7 +196,9 @@ AC_EGREP_CPP(yes, + ], LIBS="$LIBS -lsocket -linet";seqptx=1) + + oldlibs="$LIBS" +-LIBS="$LIBS -lelf" ++# Humm we don't actually need to link against libelf for linux ++#LIBS="$LIBS -lelf" ++LIBS="$LIBS" + AC_CHECKING(SVR4) + AC_TRY_LINK([#include <utmpx.h> + ],, +@@ -643,14 +645,10 @@ dnl + AC_CHECKING(for tgetent) + AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, + olibs="$LIBS" +-LIBS="-lcurses $olibs" +-AC_CHECKING(libcurses) ++LIBS="-ltinfo $olibs" ++AC_CHECKING(libtinfo) + AC_TRY_LINK(,[ +-#ifdef __hpux +-__sorry_hpux_libcurses_is_totally_broken_in_10_10(); +-#else + tgetent((char *)0, (char *)0); +-#endif + ],, + LIBS="-ltermcap $olibs" + AC_CHECKING(libtermcap) +@@ -666,7 +664,7 @@ AC_MSG_ERROR(!!! no tgetent - no screen) + AC_TRY_RUN([ + main() + { +- exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); ++ return 1; + }], AC_NOTE(- you use the termcap database), + AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) + AC_CHECKING(ospeed) +@@ -864,9 +862,6 @@ fi + dnl + dnl **** loadav **** + dnl +-AC_CHECKING(for libutil(s)) +-test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" +-test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" + + AC_CHECKING(getloadavg) + AC_TRY_LINK(,[getloadavg((double *)0, 0);], diff --git a/pkgs/core/screen/patches/screen-4.0.3-screenrc.patch b/pkgs/core/screen/patches/screen-4.0.3-screenrc.patch new file mode 100644 index 0000000..66b367d --- /dev/null +++ b/pkgs/core/screen/patches/screen-4.0.3-screenrc.patch @@ -0,0 +1,139 @@ +diff -up screen-4.0.3/etc/etcscreenrc.screenrc screen-4.0.3/etc/etcscreenrc +--- screen-4.0.3/etc/etcscreenrc.screenrc 2003-12-05 14:46:13.000000000 +0100 ++++ screen-4.0.3/etc/etcscreenrc 2009-09-25 14:20:31.000000000 +0200 +@@ -55,15 +55,15 @@ terminfo sun 'up=^K:AL=\E[%p1%dL:DL=\E[% + #xterm understands both im/ic and doesn't have a status line. + #Note: Do not specify im and ic in the real termcap/info file as + #some programs (e.g. vi) will (no,no, may (jw)) not work anymore. +-termcap xterm|fptwist hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l +-terminfo xterm|fptwist hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l ++#termcap xterm|fptwist hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l ++#terminfo xterm|fptwist hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l + + # Long time I had this in my private screenrc file. But many people + # seem to want it (jw): + # we do not want the width to change to 80 characters on startup: + # on suns, /etc/termcap has :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l: +-termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' +-terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' ++#termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' ++#terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' + + # + # Do not use xterms alternate window buffer. +diff -up screen-4.0.3/etc/screenrc.screenrc screen-4.0.3/etc/screenrc +--- screen-4.0.3/etc/screenrc.screenrc 2006-10-23 15:06:32.000000000 +0200 ++++ screen-4.0.3/etc/screenrc 2009-09-25 14:31:30.000000000 +0200 +@@ -1,21 +1,11 @@ +-# +-# Example of a user's .screenrc file +-# +- + # This is how one can set a reattach password: + # password ODSJQf.4IJN7E # "1234" + +-# no annoying audible bell, please +-vbell on +- +-# detach on hangup +-autodetach on +- + # don't display the copyright page + startup_message off + + # emulate .logout message +-pow_detach_msg "Screen session of $LOGNAME $:cr:$:nl:ended." ++pow_detach_msg "Screen session of $LOGNAME $:cr:$:nl:ended." + + # advertise hardstatus support to $TERMCAP + # termcapinfo * '' 'hs:ts=\E_:fs=\E\:ds=\E_\E\' +@@ -40,18 +30,12 @@ defscrollback 1000 + + ################ + # +-# xterm tweaks ++# more xterm tweaks + # + +-#xterm understands both im/ic and doesn't have a status line. +-#Note: Do not specify im and ic in the real termcap/info file as +-#some programs (e.g. vi) will not work anymore. +-termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l +-terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l +- + #80/132 column switching must be enabled for ^AW to work + #change init sequence to not switch width +-termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l ++#termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l + + # Make the output buffer large for (fast) xterms. + #termcapinfo xterm* OL=10000 +@@ -60,14 +44,14 @@ termcapinfo xterm* OL=100 + # tell screen that xterm can switch to dark background and has function + # keys. + termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l' +-termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' +-termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~' ++#termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' ++#termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~' + + # special xterm hardstatus: use the window title. + termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' + + #terminfo xterm 'vb=\E[?5h$<200/>\E[?5l' +-termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' ++#termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' + + # emulate part of the 'K' charset + termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\326,]\334,{\344,|\366,}\374,~\337' +@@ -103,32 +87,12 @@ termcapinfo linux C8 + # old rxvt versions also need this + # termcapinfo rxvt C8 + +- +-################ +-# +-# keybindings +-# +- +-#remove some stupid / dangerous key bindings +-bind k +-bind ^k +-bind . +-bind ^\ +-bind \ +-bind ^h +-bind h +-#make them better +-bind 'K' kill +-bind 'I' login on +-bind 'O' login off +-bind '}' history +- + # Yet another hack: + # Prepend/append register [/] to the paste if ^a^] is pressed. + # This lets me have autoindent mode in vi. +-register [ "\033:se noai\015a" +-register ] "\033:se ai\015a" +-bind ^] paste [.] ++#register [ "\033:se noai\015a" ++#register ] "\033:se ai\015a" ++#bind ^] paste [.] + + ################ + # +@@ -140,9 +104,14 @@ bind ^] paste [.] + # screen -t 40 2 rlogin server + + # caption always "%3n %t%? @%u%?%? [%h]%?%=%c" ++## alternative caption, gives window list, LOGNAME and current date: ++# caption always "%{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw %=%{mk}@%H %{yk}%D %{ck}%M%{wk} %{ck}%d %{gk}%c" + # hardstatus alwaysignore + # hardstatus alwayslastline "%Lw" + ++# Red Hat's normal status line ++hardstatus string "[screen %n%?: %t%?] %h" ++ + # bind = resize = + # bind + resize +1 + # bind - resize -1 diff --git a/pkgs/core/screen/patches/screen-4.0.3-stropts.patch b/pkgs/core/screen/patches/screen-4.0.3-stropts.patch new file mode 100644 index 0000000..d6cbed7 --- /dev/null +++ b/pkgs/core/screen/patches/screen-4.0.3-stropts.patch @@ -0,0 +1,48 @@ +diff -up screen-4.0.3/tty.sh.stropts screen-4.0.3/tty.sh +--- screen-4.0.3/tty.sh.stropts 2003-09-08 16:24:25.000000000 +0200 ++++ screen-4.0.3/tty.sh 2008-04-07 11:28:34.000000000 +0200 +@@ -76,7 +76,7 @@ exit 0 + #endif + + #include "config.h" +-#ifdef SVR4 ++#if 0 + #include <sys/stropts.h> /* for I_POP */ + #endif + +diff -up screen-4.0.3/screen.c.stropts screen-4.0.3/screen.c +--- screen-4.0.3/screen.c.stropts 2008-04-07 11:25:21.000000000 +0200 ++++ screen-4.0.3/screen.c 2008-04-07 11:29:14.000000000 +0200 +@@ -50,7 +50,7 @@ + + #include "config.h" + +-#ifdef SVR4 ++#if 0 + # include <sys/stropts.h> + #endif + +diff -up screen-4.0.3/process.c.stropts screen-4.0.3/process.c +--- screen-4.0.3/process.c.stropts 2003-09-18 14:53:54.000000000 +0200 ++++ screen-4.0.3/process.c 2008-04-07 11:29:47.000000000 +0200 +@@ -37,7 +37,7 @@ + #include "config.h" + + /* for solaris 2.1, Unixware (SVR4.2) and possibly others: */ +-#ifdef SVR4 ++#if 0 + # include <sys/stropts.h> + #endif + +diff -up screen-4.0.3/pty.c.stropts screen-4.0.3/pty.c +--- screen-4.0.3/pty.c.stropts 2003-09-08 16:26:18.000000000 +0200 ++++ screen-4.0.3/pty.c 2008-04-07 11:30:07.000000000 +0200 +@@ -34,7 +34,7 @@ + #endif + + /* for solaris 2.1, Unixware (SVR4.2) and possibly others */ +-#ifdef HAVE_SVR4_PTYS ++#if 0 + # include <sys/stropts.h> + #endif + diff --git a/pkgs/core/screen/screen.nm b/pkgs/core/screen/screen.nm index c0f9052..6e0a662 100644 --- a/pkgs/core/screen/screen.nm +++ b/pkgs/core/screen/screen.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.gnu.org/software/screen PKG_LICENSE = GPLv2+ PKG_SUMMARY = A screen manager that supports multiple logins on one terminal.
-PKG_DEPS += ncurses pam +PKG_BUILD_DEPS+= ncurses-devel pam-devel
define PKG_DESCRIPTION The screen utility allows you to have multiple logins on just one \ @@ -45,9 +45,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-############################################################################### -# Installation Details -############################################################################### CONFIGURE_OPTIONS += \ --with-socket-dir=/var/run/screen \ --with-sys-screenrc=/etc/screenrc \ diff --git a/pkgs/core/sdl/sdl.nm b/pkgs/core/sdl/sdl.nm index 13c09c6..806f4b5 100644 --- a/pkgs/core/sdl/sdl.nm +++ b/pkgs/core/sdl/sdl.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.libsdl.org/ PKG_LICENSE = LGPLv2+ PKG_SUMMARY = A cross-platform multimedia library.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += directfb libusb-compat +PKG_BUILD_DEPS+= directfb-devel libusb-compat-devel pkg-config
define PKG_DESCRIPTION Simple DirectMedia Layer (SDL) is a cross-platform multimedia library \ @@ -44,3 +43,5 @@ define PKG_DESCRIPTION endef
PKG_TARBALL = $(THISAPP).tar.gz + +PKG_PACKAGES += $(PKG_NAME_REAL)-devel diff --git a/pkgs/core/sg3-utils/sg3-utils.nm b/pkgs/core/sg3-utils/sg3-utils.nm index 6849a7a..3a6e069 100644 --- a/pkgs/core/sg3-utils/sg3-utils.nm +++ b/pkgs/core/sg3-utils/sg3-utils.nm @@ -36,10 +36,12 @@ PKG_SUMMARY = Utilities for devices that use SCSI command sets.
define PKG_DESCRIPTION Collection of Linux utilities for devices that use the SCSI command set. \ - Includes utilities to copy data based on "dd" syntax and semantics (called \ + Includes utilities to copy data based on dd syntax and semantics (called \ sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check \ mode and log pages (sginfo, sg_modes and sg_logs); spin up and down \ disks (sg_start); do self tests (sg_senddiag); and various other functions. endef
PKG_TARBALL = $(THISAPP).tgz + +PKG_PACKAGES += $(PKG_NAME_REAL)-devel $(PKG_NAME_REAL)-libs diff --git a/pkgs/core/shadow/shadow.nm b/pkgs/core/shadow/shadow.nm index a129cc8..95be96a 100644 --- a/pkgs/core/shadow/shadow.nm +++ b/pkgs/core/shadow/shadow.nm @@ -51,10 +51,6 @@ CONFIGURE_OPTIONS += \ --without-libpam \ --disable-static
-############################################################################### -# Installation Details -############################################################################### - define STAGE_PREPARE_CMDS # Do not build these files: cd $(DIR_APP) && \ diff --git a/pkgs/core/sip/sip.nm b/pkgs/core/sip/sip.nm index df2d8c0..4e1eebd 100644 --- a/pkgs/core/sip/sip.nm +++ b/pkgs/core/sip/sip.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.riverbankcomputing.com/software/sip/intro PKG_LICENSE = GPLv2 or GPLv3 PKG_SUMMARY = SIP - Python/C++ Bindings Generator.
-PKG_DEPS += python +PKG_BUILD_DEPS+= gcc-c++ python-devel
define PKG_DESCRIPTION SIP is a tool for generating bindings for C++ classes so that they can be \ @@ -45,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + define STAGE_BUILD cd $(DIR_APP) && python configure.py \ CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" diff --git a/pkgs/core/slang/slang.nm b/pkgs/core/slang/slang.nm index 5c7e960..d100209 100644 --- a/pkgs/core/slang/slang.nm +++ b/pkgs/core/slang/slang.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.jedsoft.org/slang/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Shared library for the S-Lang extension language.
-PKG_DEPS += ncurses pcre +PKG_BUILD_DEPS+= ncurses-devel pcre-devel
define PKG_DESCRIPTION S-Lang is an interpreted language and a programming library. \ @@ -45,6 +45,12 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += --sysconfdir=/etc
PARALLELISMFLAGS = # off + +define STAGE_INSTALL_CMDS + rm -rvf $(BUILDROOT)/usr/share/slsh +endef diff --git a/pkgs/core/sqlite/sqlite.nm b/pkgs/core/sqlite/sqlite.nm index 64cd6c7..0454942 100644 --- a/pkgs/core/sqlite/sqlite.nm +++ b/pkgs/core/sqlite/sqlite.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.sqlite.org/ PKG_LICENSE = PublicDomain PKG_SUMMARY = A small an versative Database, that uses simple text files.
-PKG_DEPS += readline +PKG_BUILD_DEPS+= readline-devel
define PKG_DESCRIPTION SQLite is a in-process library that implements a self-contained, \ @@ -47,6 +47,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + define STAGE_PREPARE_CMDS -mkdir -pv $(DIR_SRC)/sqlite-build endef diff --git a/pkgs/core/squashfs-tools/squashfs-tools.nm b/pkgs/core/squashfs-tools/squashfs-tools.nm index b77b62a..4ee5297 100644 --- a/pkgs/core/squashfs-tools/squashfs-tools.nm +++ b/pkgs/core/squashfs-tools/squashfs-tools.nm @@ -34,7 +34,7 @@ PKG_URL = http://squashfs.sf.net/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Utility for the creation of squashfs filesystems.
-PKG_DEPS += xz zlib +PKG_BUILD_DEPS+= libattr-devel xz-devel zlib-devel
define PKG_DESCRIPTION Squashfs is a highly compressed read-only filesystem for Linux. diff --git a/pkgs/core/squid/squid.nm b/pkgs/core/squid/squid.nm index 7cdc811..beb02b1 100644 --- a/pkgs/core/squid/squid.nm +++ b/pkgs/core/squid/squid.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.squid-cache.org/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = The Squid proxy caching server.
-PKG_DEPS += libxml2 openssl openldap +PKG_BUILD_DEPS+= gcc-c++ libxml2-devel openssl-devel openldap-devel
define PKG_DESCRIPTION Squid is a high-performance proxy caching server for Web clients, \ diff --git a/pkgs/core/strace/strace.nm b/pkgs/core/strace/strace.nm index 95ee41a..fc98b7f 100644 --- a/pkgs/core/strace/strace.nm +++ b/pkgs/core/strace/strace.nm @@ -40,7 +40,6 @@ define PKG_DESCRIPTION system call, its arguments and its return value. Strace is useful \ for diagnosing problems and debugging, as well as for instructional \ purposes. - endef
PKG_TARBALL = $(THISAPP).tar.bz2 diff --git a/pkgs/core/strongswan/strongswan.nm b/pkgs/core/strongswan/strongswan.nm index d30557a..c7272c3 100644 --- a/pkgs/core/strongswan/strongswan.nm +++ b/pkgs/core/strongswan/strongswan.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.strongswan.org/ PKG_LICENSE = GPL PKG_SUMMARY = IPsec and IKEv1 implementation for Linux 2.4 and 2.6 kernels.
-PKG_BUILD_DEPS+= bison flex gperf perl -PKG_DEPS += curl gcrypt gmp libcap openldap sqlite +PKG_BUILD_DEPS+= bison flex gmp-devel gperf libcap-devel libcurl-devel \ + libgcrypt-devel openldap-devel perl sqlite-devel
define PKG_DESCRIPTION StrongSwan is a complete IPsec and IKEv1 implementation for \ diff --git a/pkgs/core/sudo/sudo.nm b/pkgs/core/sudo/sudo.nm index 46855b8..1f90803 100644 --- a/pkgs/core/sudo/sudo.nm +++ b/pkgs/core/sudo/sudo.nm @@ -34,7 +34,8 @@ PKG_URL = http://www.sudo.ws/sudo/download.html PKG_LICENSE = BSD PKG_SUMMARY = Allows restricted root access for specified users.
-PKG_DEPS += cyrus-sasl openldap pam vim +PKG_BUILD_DEPS+= cyrus-sasl-devel openldap-devel pam-devel +PKG_DEPS += vim
define PKG_DESCRIPTION Sudo (superuser do) allows a system administrator to give certain \ diff --git a/pkgs/core/suricata/suricata.nm b/pkgs/core/suricata/suricata.nm index ed565e1..bd8c3db 100644 --- a/pkgs/core/suricata/suricata.nm +++ b/pkgs/core/suricata/suricata.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.openinfosecfoundation.org/ PKG_LICENSE = GPLv2 PKG_SUMMARY = Open Source Next Generation Intrusion Detection and Prevention Engine.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libcap-ng libnfnetlink libnetfilter_queue libnet libpcap libyaml pcre +PKG_BUILD_DEPS+= libcap-ng-devel libnfnetlink-devel libnetfilter_queue-devel \ + libnet-devel libpcap-devel libyaml-devel pcre-devel pkg-config zlib-devel
PKG_PACKAGES += $(PKG_NAME_REAL)-devel
diff --git a/pkgs/core/sysfsutils/sysfsutils.nm b/pkgs/core/sysfsutils/sysfsutils.nm index 44582a3..4a13d8b 100644 --- a/pkgs/core/sysfsutils/sysfsutils.nm +++ b/pkgs/core/sysfsutils/sysfsutils.nm @@ -41,4 +41,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel + CONFIGURE_OPTIONS += --mandir=/usr/share/man diff --git a/pkgs/core/syslinux/syslinux.nm b/pkgs/core/syslinux/syslinux.nm index cebf70f..18044d8 100644 --- a/pkgs/core/syslinux/syslinux.nm +++ b/pkgs/core/syslinux/syslinux.nm @@ -34,7 +34,7 @@ PKG_URL = http://syslinux.zytor.com/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Simple kernel loader which boots from a FAT filesystem.
-PKG_BUILD_DEPS+= nasm python +PKG_BUILD_DEPS+= nasm python-devel
define PKG_DESCRIPTION SYSLINUX is a suite of bootloaders, currently supporting DOS FAT \ diff --git a/pkgs/core/syslog-ng/ids-block b/pkgs/core/syslog-ng/ids-block deleted file mode 100644 index e00ea74..0000000 --- a/pkgs/core/syslog-ng/ids-block +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/python -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007, 2008, 2009 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -import os -import sys -import re - -from IPy import IP - -#os.system('modprobe ipt_recent ip_list_tot=1000') - -def main(): - while 1: - data = sys.stdin.readline() - # need to extract the ip adress from the whole log line to get - # this working as expected,IPy just only returns a valid address - if not data: break - try: - ip = IP(data) - except AttributeError: - #f = open("/tmp/testfile","w") - #f.write("Wrong value given") - #f.close() - sys.stderr.write("Wrong attribute given.\n") - break - except KeyError: - sys.stderr.write("Not enough parameters given.\n") - break - except ValueError: - sys.stderr.write("Given value is not a valid ip address.\n") - #f = open("/tmp/testfile","w") - #f.write("This does not match - %s\n" % data ) - #f.close() - break - try: - #f = open("/tmp/testfile", "w") - f = open("/proc/net/ipt_recent/BLOCK", "w") - f.write("%s\n" % ip) - f.close() - except: - sys.stderr.write("Cannot write ip "%s" to file.\n" % ip) - break -main() -sys.exit(0) diff --git a/pkgs/core/syslog-ng/syslog-ng.conf b/pkgs/core/syslog-ng/syslog-ng.conf index e3c1478..cc0bbae 100644 --- a/pkgs/core/syslog-ng/syslog-ng.conf +++ b/pkgs/core/syslog-ng/syslog-ng.conf @@ -40,7 +40,6 @@ destination boot {file("/var/log/boot.log");}; destination kernel {file("/var/log/kernel.log");}; destination console {usertty("root");}; destination console_all {file("/dev/tty12");}; -destination ids {program("/usr/sbin/ids-block");}; #destination loghost {#tcp("10.0.0.1" port(514));};
filter f_boot {facility(local7);}; @@ -49,12 +48,10 @@ filter f_daemon {facility(daemon);}; filter f_kern {facility(kern);}; filter f_messages {not facility(mail, news, cron);}; filter f_emergency {level(emerg);}; -filter f_snort {match("snort") and match("Priority: 1");}; filter f_ssh {program("sshd.*") and match("Failed password for root from");};
log {source(sys);filter(f_messages);destination(messages);}; log {source(sys);filter(f_emergency);destination(console);}; log {source(sys);filter(f_boot);destination(boot);}; log {source(sys);destination(console_all);}; -log {source(sys);filter(f_snort);destination(ids);}; log {source(sys);filter(f_kern);destination(kernel);}; diff --git a/pkgs/core/syslog-ng/syslog-ng.nm b/pkgs/core/syslog-ng/syslog-ng.nm index 6d307b0..5083e9e 100644 --- a/pkgs/core/syslog-ng/syslog-ng.nm +++ b/pkgs/core/syslog-ng/syslog-ng.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.balabit.com/network-security/syslog-ng/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Syslog-ng is a daemon that handles the logging stuff.
-PKG_BUILD_DEPS+= pkg-config which -PKG_DEPS += eventlog glib2 +PKG_BUILD_DEPS+= eventlog-devel glib2-devel pkg-config which
define PKG_DESCRIPTION The syslog-ng application can operate in server or agent mode, and - \ @@ -46,9 +45,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-############################################################################### -# Installation Details -############################################################################### CONFIGURE_OPTIONS += \ --sbindir=/sbin \ --libexecdir=/usr/lib \ @@ -62,7 +58,6 @@ CONFIGURE_OPTIONS += \
define STAGE_INSTALL_CMDS -mkdir -pv $(BUILDROOT)/etc/syslog-ng - cp -vf $(DIR_SOURCE)/$(PKG_NAME).conf $(BUILDROOT)/etc/$(PKG_NAME)/$(PKG_NAME).conf - -mkdir -pv $(BUILDROOT)/usr/sbin - install -v -m 755 $(DIR_SOURCE)/ids-block $(BUILDROOT)/usr/sbin/ids-block + cp -vf $(DIR_SOURCE)/$(PKG_NAME).conf \ + $(BUILDROOT)/etc/$(PKG_NAME)/$(PKG_NAME).conf endef diff --git a/pkgs/core/tar/tar.nm b/pkgs/core/tar/tar.nm index a78c332..2706ebe 100644 --- a/pkgs/core/tar/tar.nm +++ b/pkgs/core/tar/tar.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.gnu.org/software/tar/ PKG_LICENSE = GPLv3+ PKG_SUMMARY = A GNU file archiving program.
-PKG_BUILD_DEPS+= autoconf automake -PKG_DEPS += acl attr +PKG_BUILD_DEPS+= autoconf automake libacl-devel libattr-devel
define PKG_DESCRIPTION The GNU tar program saves many files together in one archive \ diff --git a/pkgs/core/tcpdump/tcpdump.nm b/pkgs/core/tcpdump/tcpdump.nm index 15541d8..4cce770 100644 --- a/pkgs/core/tcpdump/tcpdump.nm +++ b/pkgs/core/tcpdump/tcpdump.nm @@ -34,7 +34,7 @@ PKG_URL = http://www.tcpdump.org/ PKG_LICENSE = BSD with advertising PKG_SUMMARY = A network traffic monitoring tool.
-PKG_DEPS += libpcap openssl +PKG_BUILD_DEPS+= libpcap-devel openssl-devel
define PKG_DESCRIPTION Tcpdump is a command-line tool for monitoring network traffic. \ diff --git a/pkgs/core/traceroute/traceroute.nm b/pkgs/core/traceroute/traceroute.nm index bbf8f94..88b45ee 100644 --- a/pkgs/core/traceroute/traceroute.nm +++ b/pkgs/core/traceroute/traceroute.nm @@ -46,10 +46,6 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-############################################################################### -# Installation Details -############################################################################### - define STAGE_PREPARE_CMDS cd $(DIR_APP) && echo "CFLAGS += $(CFLAGS)" >> Make.defines endef diff --git a/pkgs/core/udev/udev.nm b/pkgs/core/udev/udev.nm index 5e0e2d4..045c7bb 100644 --- a/pkgs/core/udev/udev.nm +++ b/pkgs/core/udev/udev.nm @@ -34,7 +34,8 @@ PKG_URL = ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = A userspace implementation of devfs.
-PKG_DEPS += acl glib2 gperf kbd libusb-compat pciutils usbutils util-linux-ng +PKG_BUILD_DEPS+= glib2-devel gperf kbd libacl-devel libusb-compat-devel \ + pciutils pkg-config usbutils util-linux-ng-devel
define PKG_DESCRIPTION The udev package contains an implementation of devfs in userspace using \ @@ -43,6 +44,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += libudev libudev-devel + CONFIGURE_OPTIONS += \ --exec-prefix="" \ --sbindir=/sbin \ diff --git a/pkgs/core/udisks/udisks.nm b/pkgs/core/udisks/udisks.nm index 9058a4e..bab8198 100644 --- a/pkgs/core/udisks/udisks.nm +++ b/pkgs/core/udisks/udisks.nm @@ -34,9 +34,10 @@ PKG_URL = http://www.freedesktop.org/wiki/Software/udisks PKG_LICENSE = GPLv2+ PKG_SUMMARY = Storage Management Service.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += dbus dbus-glib dosfstools e2fsprogs glib2 libatasmart lvm2 \ - mdadm parted polkit sg3-utils udev util-linux-ng xfsprogs +PKG_BUILD_DEPS+= dbus-devel dbus-glib-devel e2fsprogs-devel glib2-devel \ + intltool libatasmart-devel libdevmapper-devel parted-devel polkit-devel \ + pkg-config sg3-utils-devel +PKG_DEPS += dosfstools e2fsprogs mdadm parted udev util-linux-ng xfsprogs
define PKG_DESCRIPTION udisks provides a daemon, D-Bus API and command line tools \ diff --git a/pkgs/core/ulogd2/ulogd2.nm b/pkgs/core/ulogd2/ulogd2.nm index 4774959..3bde457 100644 --- a/pkgs/core/ulogd2/ulogd2.nm +++ b/pkgs/core/ulogd2/ulogd2.nm @@ -34,8 +34,8 @@ PKG_URL = http://netfilter.org/projects/ulogd/index.html PKG_LICENSE = GPLv2 PKG_SUMMARY = The userspace logging daemon for netfilter.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libnfnetlink libnetfilter_conntrack libnetfilter_log libpcap sqlite +PKG_BUILD_DEPS+= libnfnetlink-devel libnetfilter_conntrack-devel \ + libnetfilter_log-devel libpcap-devel pkg-config sqlite-devel
define PKG_DESCRIPTION This package contains utilities for configuring the linux ethernet \ diff --git a/pkgs/core/upower/upower.nm b/pkgs/core/upower/upower.nm index 2a17d48..2c2d746 100644 --- a/pkgs/core/upower/upower.nm +++ b/pkgs/core/upower/upower.nm @@ -34,9 +34,9 @@ PKG_URL = http://hal.freedesktop.org/releases/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Power Management Service.
-PKG_BUILD_DEPS+= bison -PKG_DEPS += dbus dbus-glib dosfstools e2fsprogs glib2 libatasmart lvm2 \ - mdadm parted polkit sg3-utils udev util-linux-ng xfsprogs +PKG_BUILD_DEPS+= bison dbus-devel dbus-glib-devel glib2-devel gettext intltool \ + perl-xml-parser pkg-config polkit-devel +PKG_DEPS += udev util-linux-ng
define PKG_DESCRIPTION udisks provides a daemon, D-Bus API and command line tools \ @@ -45,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME)-devel $(PKG_NAME)-libs + CONFIGURE_OPTIONS += \ --sysconfdir=/etc \ --libexecdir=/usr/lib \ diff --git a/pkgs/core/upstart/upstart.nm b/pkgs/core/upstart/upstart.nm index 57e7870..62727cc 100644 --- a/pkgs/core/upstart/upstart.nm +++ b/pkgs/core/upstart/upstart.nm @@ -34,8 +34,9 @@ PKG_URL = http://upstart.ubuntu.com/ PKG_LICENSE = GPLv2+ PKG_SUMMARY = An event-driven init system.
-PKG_BUILD_DEPS+= coreutils pkg-config -PKG_DEPS += dbus libnih sysvinit udev +PKG_BUILD_DEPS+= autoconf automake coreutils dbus-devel libnih-devel libtool \ + libudev-devel pkg-config +PKG_DEPS += sysvinit
define PKG_DESCRIPTION Upstart is an event-based replacement for the /sbin/init daemon \ diff --git a/pkgs/core/usbutils/usbutils.nm b/pkgs/core/usbutils/usbutils.nm index dd770f7..19cda6f 100644 --- a/pkgs/core/usbutils/usbutils.nm +++ b/pkgs/core/usbutils/usbutils.nm @@ -34,8 +34,7 @@ PKG_URL = http://www.linux-usb.org/ PKG_LICENSE = GPLv2 PKG_SUMMARY = Tool to provide and enhance USB support in Linux.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libusb-compat zlib +PKG_BUILD_DEPS+= libusb-compat-devel pkg-config zlib-devel
define PKG_DESCRIPTION A set of tools to configure list USB Devices. diff --git a/pkgs/core/util-linux-ng/util-linux-ng.nm b/pkgs/core/util-linux-ng/util-linux-ng.nm index 8c6ba4b..efb421d 100644 --- a/pkgs/core/util-linux-ng/util-linux-ng.nm +++ b/pkgs/core/util-linux-ng/util-linux-ng.nm @@ -34,8 +34,7 @@ PKG_URL = ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng PKG_LICENSE = GPLv2 and GPLv2+ and BSD with advertising and Public Domain PKG_SUMMARY = A collection of basic system utilities.
-PKG_BUILD_DEPS+= libcap -PKG_DEPS += ncurses pam zlib +PKG_BUILD_DEPS+= gettext libcap-devel ncurses-devel pam-devel zlib-devel
define PKG_DESCRIPTION The util-linux-ng package contains a large variety of low-level system \ @@ -46,6 +45,8 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
+PKG_PACKAGES += $(PKG_NAME)-devel + CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
CONFIGURE_OPTIONS += \ @@ -83,7 +84,10 @@ define STAGE_INSTALL_CMDS touch $(BUILDROOT)/var/log/lastlog
# Remove deprecated commands - rm -fv $(BUILDROOT)/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* + rm -fv $(BUILDROOT)/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \ + $(BUILDROOT)/usr/bin/chkdupexe $(BUILDROOT)/usr/bin/vi{gr,pw} \ + $(BUILDROOT)/sbin/{sln,shutdown} $(BUILDROOT)/bin/{line,newgrp,pg} + rm -fv $(BUILDROOT)/usr/share/getopt/*.tcsh
# Set capabilities chmod -v -s $(BUILDROOT)/bin/mount diff --git a/pkgs/core/vim/vim.nm b/pkgs/core/vim/vim.nm index 6d5985c..c48075d 100644 --- a/pkgs/core/vim/vim.nm +++ b/pkgs/core/vim/vim.nm @@ -34,7 +34,7 @@ PKG_URL = http://flex.sourceforge.net/ PKG_LICENSE = PublicDomain/Charityware PKG_SUMMARY = Very feature- and powerful editor.
-PKG_DEPS += acl ncurses +PKG_BUILD_DEPS+= libacl-devel ncurses-devel
define PKG_DESCRIPTION Vim is a highly configurable text editor built to enable efficient \ @@ -48,10 +48,6 @@ DIR_APP = $(DIR_SRC)/$(PKG_NAME)72
CONFIGURE_OPTIONS += --enable-multibyte
-############################################################################### -# Installation Details -############################################################################### - define STAGE_PREPARE_CMDS cd $(DIR_APP) && echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h endef diff --git a/pkgs/core/vlan/vlan.nm b/pkgs/core/vlan/vlan.nm index 1d048ba..e1c4d99 100644 --- a/pkgs/core/vlan/vlan.nm +++ b/pkgs/core/vlan/vlan.nm @@ -42,10 +42,6 @@ PKG_TARBALL = $(THISAPP).tar.gz
DIR_APP = $(DIR_SRC)/$(PKG_NAME)
-############################################################################### -# Installation Details -############################################################################### - define STAGE_BUILD cd $(DIR_APP) && make purge vconfig CCFLAGS="$(CFLAGS)" endef diff --git a/pkgs/core/vsftpd/vsftpd.nm b/pkgs/core/vsftpd/vsftpd.nm index 70ad729..3601425 100644 --- a/pkgs/core/vsftpd/vsftpd.nm +++ b/pkgs/core/vsftpd/vsftpd.nm @@ -34,7 +34,7 @@ PKG_URL = ftp://vsftpd.beasts.org/users/cevans/ PKG_LICENSE = GPLv2 with exceptions PKG_SUMMARY = Very Secure Ftp Daemon.
-PKG_DEPS += libcap openssl pam +PKG_BUILD_DEPS+= libcap-devel openssl-devel pam-devel
define PKG_DESCRIPTION vsftpd is a Very Secure FTP daemon. It was written completely \ @@ -45,6 +45,11 @@ PKG_TARBALL = $(THISAPP).tar.gz
CFLAGS += -Wall -W -Wshadow -fstack-protector -fpie -Wextra -Werror
+define STAGE_PREPARE_CMDS + # Fix an issue with DSO + cd $(DIR_APP) && sed -e "s/-lssl/& -lcrypto/" -i Makefile +endef + define STAGE_BUILD cd $(DIR_APP) && make CFLAGS='$(CFLAGS)' $(PARALLELISMFLAGS) endef diff --git a/pkgs/core/wireless-tools/wireless-tools.nm b/pkgs/core/wireless-tools/wireless-tools.nm index 31861d1..910778d 100644 --- a/pkgs/core/wireless-tools/wireless-tools.nm +++ b/pkgs/core/wireless-tools/wireless-tools.nm @@ -45,6 +45,8 @@ THISAPP = $(PKG_NAME).$(PKG_VER)
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += $(PKG_NAME_REAL)-devel + define STAGE_BUILD cd $(DIR_APP) && make $(PARALLELISMFLAGS) BUILD_SHARED=1 \ FORCE_WEXT_VERSION=16 OPT_FLAGS="$(CFLAGS)" diff --git a/pkgs/core/xcb-proto/xcb-proto.nm b/pkgs/core/xcb-proto/xcb-proto.nm index ea87f4b..5b45d50 100644 --- a/pkgs/core/xcb-proto/xcb-proto.nm +++ b/pkgs/core/xcb-proto/xcb-proto.nm @@ -34,7 +34,7 @@ PKG_URL = http://xcb.freedesktop.org/ PKG_LICENSE = MIT PKG_SUMMARY = XCB protocol descriptions.
-PKG_BUILD_DEPS+= pkg-config python +PKG_BUILD_DEPS+= pkg-config python-devel
define PKG_DESCRIPTION XCB is a project to enable efficient language bindings to the X11 \ diff --git a/pkgs/core/xfsprogs/xfsprogs.nm b/pkgs/core/xfsprogs/xfsprogs.nm index 79f66c2..7a6850d 100644 --- a/pkgs/core/xfsprogs/xfsprogs.nm +++ b/pkgs/core/xfsprogs/xfsprogs.nm @@ -34,8 +34,7 @@ PKG_URL = http://oss.sgi.com/projects/xfs/ PKG_LICENSE = GPL+ and LGPLv2+ PKG_SUMMARY = Utilities for managing the XFS filesystem
-PKG_BUILD_DEPS+= libtool gettext make -PKG_DEPS += acl e2fsprogs readline +PKG_BUILD_DEPS+= libacl-devel e2fsprogs-devel libtool gettext readline-devel
define PKG_DESCRIPTION A set of commands to use the XFS filesystem, including mkfs.xfs. @@ -43,9 +42,7 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-############################################################################### -# Installation Details -############################################################################### +PKG_PACKAGES += $(PKG_NAME)-devel
define STAGE_BUILD cd $(DIR_APP) && \ diff --git a/pkgs/core/xkeyboard-config/xkeyboard-config.nm b/pkgs/core/xkeyboard-config/xkeyboard-config.nm index 4907e95..1a18ace 100644 --- a/pkgs/core/xkeyboard-config/xkeyboard-config.nm +++ b/pkgs/core/xkeyboard-config/xkeyboard-config.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = X Keyboard Extension configuration data.
-PKG_BUILD_DEPS+= gettext intltool pkg-config xorg-x11-util-macros -PKG_DEPS += xorg-x11-xkb-utils +PKG_BUILD_DEPS+= gettext intltool pkg-config perl-xml-parser xorg-x11-util-macros \ + xorg-x11-xkb-utils
define PKG_DESCRIPTION This package contains configuration data used by the X Keyboard \ diff --git a/pkgs/core/xorg-x11-drv-ati/xorg-x11-drv-ati.nm b/pkgs/core/xorg-x11-drv-ati/xorg-x11-drv-ati.nm new file mode 100644 index 0000000..92f6a83 --- /dev/null +++ b/pkgs/core/xorg-x11-drv-ati/xorg-x11-drv-ati.nm @@ -0,0 +1,54 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = xorg-x11-drv-ati +PKG_VER = 6.13.1 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Driver +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = Xorg X11 ati video driver. + +PKG_BUILD_DEPS += libdrm-devel libpciaccess-devel libX11-devel mesa-devel \ + pkg-config xorg-x11-server-devel xorg-x11-util-macros + +define PKG_DESCRIPTION + X.Org X11 ati video driver. +endef + +PKG_TARBALL = xf86-video-ati-$(PKG_VER).tar.bz2 + +DIR_APP = $(DIR_SRC)/xf86-video-ati-$(PKG_VER) + +CFLAGS += -Wl,-z,lazy + +QUALITY_AGENT_PERMIT_NOT_FULL_RELRO = yes + +CONFIGURE_OPTIONS += \ + --enable-dri \ + --disable-static diff --git a/pkgs/core/xorg-x11-drv-evdev/xorg-x11-drv-evdev.nm b/pkgs/core/xorg-x11-drv-evdev/xorg-x11-drv-evdev.nm index 2a63386..08f1eba 100644 --- a/pkgs/core/xorg-x11-drv-evdev/xorg-x11-drv-evdev.nm +++ b/pkgs/core/xorg-x11-drv-evdev/xorg-x11-drv-evdev.nm @@ -34,7 +34,9 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = Xorg X11 evdev input driver.
-PKG_DEPS += libxbkfile xkeyboard-config xorg-x11-server +PKG_BUILD_DEPS+= libxkbfile-devel pkg-config xorg-x11-server-devel + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION X.Org X11 evdev input driver. @@ -44,5 +46,9 @@ PKG_TARBALL = xf86-input-evdev-$(PKG_VER).tar.bz2
DIR_APP = $(DIR_SRC)/xf86-input-evdev-$(PKG_VER)
+CFLAGS += -Wl,-z,lazy + +QUALITY_AGENT_PERMIT_NOT_FULL_RELRO = yes + CONFIGURE_OPTIONS += \ --disable-static diff --git a/pkgs/core/xorg-x11-drv-keyboard/xorg-x11-drv-keyboard.nm b/pkgs/core/xorg-x11-drv-keyboard/xorg-x11-drv-keyboard.nm index 86aa44b..3bd665d 100644 --- a/pkgs/core/xorg-x11-drv-keyboard/xorg-x11-drv-keyboard.nm +++ b/pkgs/core/xorg-x11-drv-keyboard/xorg-x11-drv-keyboard.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = Xorg X11 keyboard input driver.
-PKG_BUILD_DEPS += libpciaccess libX11 pkg-config xorg-x11-util-macros -PKG_DEPS += xorg-x11-server +PKG_BUILD_DEPS += libX11-devel libpciaccess-devel pkg-config xorg-x11-server-devel \ + xorg-x11-util-macros
define PKG_DESCRIPTION X.Org X11 keyboard input driver. @@ -45,5 +45,9 @@ PKG_TARBALL = xf86-input-keyboard-$(PKG_VER).tar.bz2
DIR_APP = $(DIR_SRC)/xf86-input-keyboard-$(PKG_VER)
+CFLAGS += -Wl,-z,lazy + +QUALITY_AGENT_PERMIT_NOT_FULL_RELRO = yes + CONFIGURE_OPTIONS += \ --disable-static diff --git a/pkgs/core/xorg-x11-drv-mouse/xorg-x11-drv-mouse.nm b/pkgs/core/xorg-x11-drv-mouse/xorg-x11-drv-mouse.nm index f8227ff..d32c4fe 100644 --- a/pkgs/core/xorg-x11-drv-mouse/xorg-x11-drv-mouse.nm +++ b/pkgs/core/xorg-x11-drv-mouse/xorg-x11-drv-mouse.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = Xorg X11 mouse input driver.
-PKG_BUILD_DEPS += libpciaccess libX11 pkg-config xorg-x11-util-macros -PKG_DEPS += xorg-x11-server +PKG_BUILD_DEPS += libX11-devel libpciaccess-devel pkg-config xorg-x11-server-devel\ + xorg-x11-util-macros
define PKG_DESCRIPTION X.Org X11 mouse input driver. @@ -45,5 +45,9 @@ PKG_TARBALL = xf86-input-mouse-$(PKG_VER).tar.bz2
DIR_APP = $(DIR_SRC)/xf86-input-mouse-$(PKG_VER)
+CFLAGS += -Wl,-z,lazy + +QUALITY_AGENT_PERMIT_NOT_FULL_RELRO = yes + CONFIGURE_OPTIONS += \ --disable-static diff --git a/pkgs/core/xorg-x11-drv-vesa/xorg-x11-drv-vesa.nm b/pkgs/core/xorg-x11-drv-vesa/xorg-x11-drv-vesa.nm index 2fa4036..db4cceb 100644 --- a/pkgs/core/xorg-x11-drv-vesa/xorg-x11-drv-vesa.nm +++ b/pkgs/core/xorg-x11-drv-vesa/xorg-x11-drv-vesa.nm @@ -34,8 +34,8 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = Xorg X11 vesa video driver.
-PKG_BUILD_DEPS += libpciaccess libX11 pkg-config xorg-x11-util-macros -PKG_DEPS += xorg-x11-server +PKG_BUILD_DEPS += libX11-devel libpciaccess-devel pkg-config xorg-x11-server-devel \ + xorg-x11-util-macros
define PKG_DESCRIPTION X.Org X11 vesa video driver. @@ -45,5 +45,9 @@ PKG_TARBALL = xf86-video-vesa-$(PKG_VER).tar.bz2
DIR_APP = $(DIR_SRC)/xf86-video-vesa-$(PKG_VER)
+CFLAGS += -Wl,-z,lazy + +QUALITY_AGENT_PERMIT_NOT_FULL_RELRO = yes + CONFIGURE_OPTIONS += \ --disable-static diff --git a/pkgs/core/xorg-x11-drv-vmware/xorg-x11-drv-vmware.nm b/pkgs/core/xorg-x11-drv-vmware/xorg-x11-drv-vmware.nm new file mode 100644 index 0000000..b5fc3c7 --- /dev/null +++ b/pkgs/core/xorg-x11-drv-vmware/xorg-x11-drv-vmware.nm @@ -0,0 +1,53 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = xorg-x11-drv-vmware +PKG_VER = 11.0.2 +PKG_REL = 0 + +PKG_MAINTAINER = Stefan Schantl stefan.schantl@ipfire.org +PKG_GROUP = X/Driver +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = Xorg X11 vmware video driver. + +PKG_BUILD_DEPS += libX11-devel libdrm-devel libpciaccess-devel pkg-config\ + xorg-x11-server-devel xorg-x11-util-macros + +define PKG_DESCRIPTION + X.Org X11 vmware video driver. +endef + +PKG_TARBALL = xf86-video-vmware-$(PKG_VER).tar.bz2 + +DIR_APP = $(DIR_SRC)/xf86-video-vmware-$(PKG_VER) + +CFLAGS += -Wl,-z,lazy + +QUALITY_AGENT_PERMIT_NOT_FULL_RELRO = yes + +CONFIGURE_OPTIONS += \ + --disable-static diff --git a/pkgs/core/xorg-x11-font-utils/xorg-x11-font-utils.nm b/pkgs/core/xorg-x11-font-utils/xorg-x11-font-utils.nm index 28e8dcf..a279ee5 100644 --- a/pkgs/core/xorg-x11-font-utils/xorg-x11-font-utils.nm +++ b/pkgs/core/xorg-x11-font-utils/xorg-x11-font-utils.nm @@ -34,8 +34,10 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = X.Org X11 font utilities.
-PKG_BUILD_DEPS+= autoconf pkg-config -PKG_DEPS += freetype libX11 libXfont libfontenc zlib +PKG_BUILD_DEPS+= autoconf freetype-devel libX11-devel libXfont-devel libfontenc-devel\ + pkg-config zlib-devel + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION X.Org X11 font utilities required for font installation, conversion, \ diff --git a/pkgs/core/xorg-x11-server/patches/xserver-1.6.0-displayfd.patch b/pkgs/core/xorg-x11-server/patches/xserver-1.6.0-displayfd.patch deleted file mode 100644 index 09e7b49..0000000 --- a/pkgs/core/xorg-x11-server/patches/xserver-1.6.0-displayfd.patch +++ /dev/null @@ -1,172 +0,0 @@ -From 1766352059d0db67bff3f7dd0820563a30f54858 Mon Sep 17 00:00:00 2001 -From: Adam Jackson ajax@redhat.com -Date: Thu, 18 Jun 2009 16:56:41 +1000 -Subject: [PATCH] displayfd hack - ---- - dix/globals.c | 1 + - include/opaque.h | 1 + - os/connection.c | 72 ++++++++++++++++++++++++++++++++++++----------------- - os/utils.c | 11 ++++++++ - 4 files changed, 62 insertions(+), 23 deletions(-) - -diff --git a/dix/globals.c b/dix/globals.c -index 907a5e8..c1e64d3 100644 ---- a/dix/globals.c -+++ b/dix/globals.c -@@ -135,6 +135,7 @@ int defaultColorVisualClass = -1; - int monitorResolution = 0; - - char *display; -+int displayfd; - char *ConnectionInfo; - - CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; -diff --git a/include/opaque.h b/include/opaque.h -index fcc8c95..2a08e2d 100644 ---- a/include/opaque.h -+++ b/include/opaque.h -@@ -50,6 +50,7 @@ extern _X_EXPORT int ScreenSaverAllowExposures; - extern _X_EXPORT int defaultScreenSaverBlanking; - extern _X_EXPORT int defaultScreenSaverAllowExposures; - extern _X_EXPORT char *display; -+extern _X_EXPORT int displayfd; - - extern _X_EXPORT int defaultBackingStore; - extern _X_EXPORT Bool disableBackingStore; -diff --git a/os/connection.c b/os/connection.c -index 0c72b67..05d95c4 100644 ---- a/os/connection.c -+++ b/os/connection.c -@@ -146,6 +146,7 @@ Bool NewOutputPending; /* not yet attempted to write some new output */ - Bool AnyClientsWriteBlocked; /* true if some client blocked on write */ - - static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ -+static char dynamic_display[7]; - Bool PartialNetwork; /* continue even if unable to bind all addrs */ - static Pid_t ParentProcess; - -@@ -357,9 +358,23 @@ NotifyParentProcess(void) - kill (ParentProcess, SIGUSR1); - } - } -+ if (dynamic_display[0]) -+ write(displayfd, dynamic_display, strlen(dynamic_display)); - #endif - } - -+static Bool -+TryCreateSocket(int num, int *partial) -+{ -+ char port[20]; -+ -+ sprintf(port, "%d", num); -+ -+ return _XSERVTransMakeAllCOTSServerListeners(port, partial, -+ &ListenTransCount, -+ &ListenTransConns); -+} -+ - /***************** - * CreateWellKnownSockets - * At initialization, create the sockets to listen on for new clients. -@@ -370,7 +385,6 @@ CreateWellKnownSockets(void) - { - int i; - int partial; -- char port[20]; - - FD_ZERO(&AllSockets); - FD_ZERO(&AllClients); -@@ -385,32 +399,44 @@ CreateWellKnownSockets(void) - - FD_ZERO (&WellKnownConnections); - -- sprintf (port, "%d", atoi (display)); -- -- if ((_XSERVTransMakeAllCOTSServerListeners (port, &partial, -- &ListenTransCount, &ListenTransConns) >= 0) && -- (ListenTransCount >= 1)) -+ if (display) - { -- if (!PartialNetwork && partial) -- { -- FatalError ("Failed to establish all listening sockets"); -- } -- else -+ if (TryCreateSocket(atoi(display), &partial) && -+ (ListenTransCount >= 1)) -+ if (!PartialNetwork && partial) -+ FatalError ("Failed to establish all listening sockets"); -+ } -+ else /* -displayfd */ -+ { -+ Bool found = 0; -+ for (i = 0; i < 65535 - 1024; i++) - { -- ListenTransFds = xalloc (ListenTransCount * sizeof (int)); -- -- for (i = 0; i < ListenTransCount; i++) -+ if (!TryCreateSocket(i, &partial) && !partial) - { -- int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i]); -- -- ListenTransFds[i] = fd; -- FD_SET (fd, &WellKnownConnections); -- -- if (!_XSERVTransIsLocal (ListenTransConns[i])) -- { -- DefineSelf (fd); -- } -+ found = 1; -+ break; - } -+ else -+ CloseWellKnownConnections(); -+ } -+ if (!found) -+ FatalError("Failed to find a socket to listen on"); -+ sprintf(dynamic_display, "%d\n", i); -+ display = dynamic_display; -+ } -+ -+ ListenTransFds = xalloc (ListenTransCount * sizeof (int)); -+ -+ for (i = 0; i < ListenTransCount; i++) -+ { -+ int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i]); -+ -+ ListenTransFds[i] = fd; -+ FD_SET (fd, &WellKnownConnections); -+ -+ if (!_XSERVTransIsLocal (ListenTransConns[i])) -+ { -+ DefineSelf (fd); - } - } - -diff --git a/os/utils.c b/os/utils.c -index 7bfdf8b..37a93b1 100644 ---- a/os/utils.c -+++ b/os/utils.c -@@ -678,6 +678,17 @@ ProcessCommandLine(int argc, char *argv[]) - else - UseMsg(); - } -+ else if (strcmp(argv[i], "-displayfd") == 0) -+ { -+ if (++i < argc) -+ { -+ displayfd = atoi(argv[i]); -+ display = NULL; -+ nolock = TRUE; -+ } -+ else -+ UseMsg(); -+ } - #ifdef DPMSExtension - else if ( strcmp( argv[i], "dpms") == 0) - /* ignored for compatibility */ ; --- -1.6.3.rc1.2.g0164.dirty - diff --git a/pkgs/core/xorg-x11-server/patches/xserver-1.6.1-nouveau.patch b/pkgs/core/xorg-x11-server/patches/xserver-1.6.1-nouveau.patch deleted file mode 100644 index 35a1ff9..0000000 --- a/pkgs/core/xorg-x11-server/patches/xserver-1.6.1-nouveau.patch +++ /dev/null @@ -1,109 +0,0 @@ -From a685b5cf34532cef96fc9b05f735088ac0c0c7ad Mon Sep 17 00:00:00 2001 -From: Fedora X Ninjas x@fedoraproject.org -Date: Tue, 16 Feb 2010 11:38:17 +1000 -Subject: [PATCH 08/17] autoconfig: select nouveau by default for NVIDIA GPUs - -Also, don't treat DRI setup failure as an error for nouveau. ---- - glx/glxdri.c | 7 +++++-- - glx/glxdri2.c | 7 +++++-- - hw/xfree86/common/xf86AutoConfig.c | 19 ++++++++++++++++++- - 3 files changed, 28 insertions(+), 5 deletions(-) - -diff --git a/glx/glxdri.c b/glx/glxdri.c -index 21e44d1..30b820c 100644 ---- a/glx/glxdri.c -+++ b/glx/glxdri.c -@@ -968,6 +968,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - const __DRIconfig **driConfigs; - const __DRIextension **extensions; - int i; -+ int from = X_ERROR; - - if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") || - !DRIQueryDirectRenderingCapable(pScreen, &isCapable) || -@@ -1047,7 +1048,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - - screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); - if (screen->driver == NULL) { -- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", -+ if (!strcmp(driverName, "nouveau")) -+ from = X_INFO; -+ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n", - filename, dlerror()); - goto handle_error; - } -@@ -1184,7 +1187,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - - xfree(screen); - -- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); -+ LogMessage(from, "AIGLX: reverting to software rendering\n"); - - return NULL; - } -diff --git a/glx/glxdri2.c b/glx/glxdri2.c -index 0f998de..a244809 100644 ---- a/glx/glxdri2.c -+++ b/glx/glxdri2.c -@@ -676,6 +676,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - const __DRIextension **extensions; - const __DRIconfig **driConfigs; - int i; -+ int from = X_ERROR; - - screen = xcalloc(1, sizeof *screen); - if (screen == NULL) -@@ -702,7 +703,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - - screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); - if (screen->driver == NULL) { -- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", -+ if (!strcmp(driverName, "nouveau")) -+ from = X_INFO; -+ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n", - filename, dlerror()); - goto handle_error; - } -@@ -793,7 +796,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - - xfree(screen); - -- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); -+ LogMessage(from, "AIGLX: reverting to software rendering\n"); - - return NULL; - } -diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c -index 7f4ada8..d964c6c 100644 ---- a/hw/xfree86/common/xf86AutoConfig.c -+++ b/hw/xfree86/common/xf86AutoConfig.c -@@ -192,7 +192,24 @@ videoPtrToDriverList(struct pci_device *dev, - break; - case 0x102b: driverList[0] = "mga"; break; - case 0x10c8: driverList[0] = "neomagic"; break; -- case 0x10de: case 0x12d2: driverList[0] = "nv"; break; -+ case 0x10de: case 0x12d2: -+ switch (dev->device_id) { -+ /* NV1 */ -+ case 0x0008: -+ case 0x0009: -+ driverList[0] = "vesa"; -+ break; -+ /* NV3 */ -+ case 0x0018: -+ case 0x0019: -+ driverList[0] = "nv"; -+ break; -+ default: -+ driverList[0] = "nouveau"; -+ driverList[1] = "nv"; -+ break; -+ } -+ break; - case 0x1106: driverList[0] = "openchrome"; break; - case 0x1b36: driverList[0] = "qxl"; break; - case 0x1163: driverList[0] = "rendition"; break; --- -1.6.5.2 - diff --git a/pkgs/core/xorg-x11-server/xorg-x11-server.nm b/pkgs/core/xorg-x11-server/xorg-x11-server.nm index 7b1236a..6c82065 100644 --- a/pkgs/core/xorg-x11-server/xorg-x11-server.nm +++ b/pkgs/core/xorg-x11-server/xorg-x11-server.nm @@ -34,12 +34,15 @@ PKG_URL = http://www.x.org PKG_LICENSE = MIT PKG_SUMMARY = X.Org X11 X server.
-PKG_PACKAGES += $(PKG_NAME_REAL)-devel - -PKG_BUILD_DEPS+= autoconf automake pkg-config xorg-x11-font-utils \ - xorg-x11-util-macros xorg-x11-proto-devel \ +PKG_BUILD_DEPS+= autoconf automake libX11-devel libXau-devel libXdmcp-devel\ + libXext-devel libXfixes-devel libXfont-devel libXmu-devel libXrender-devel\ + libXres-devel libXt-devel libdrm-devel libfontenc-devel libpciaccess-devel\ + libtool libudev-devel libxcb-devel libxkbfile-devel mesa-devel pixman-devel\ + pkg-config xorg-x11-font-utils-devel xorg-x11-util-macros xorg-x11-proto-devel\ xorg-x11-xtrans-devel -PKG_DEPS += libX11 libXau libXfont libpciaccess libxcb libxkbfile pixman udev +PKG_DEPS += pixman udev xkeyboard-config xorg-x11-xkb-utils + +PKG_PACKAGES += $(PKG_NAME)-devel
define PKG_DESCRIPTION X.org X11 is an open source implementation of the X Window System. \ @@ -50,44 +53,38 @@ endef
PKG_TARBALL = xorg-server-$(PKG_VER).tar.bz2
-CFLAGS += -Wstrict-overflow -rdynamic +CFLAGS += -Wstrict-overflow -rdynamic -Wl,-z,lazy + +QUALITY_AGENT_PERMIT_NOT_FULL_RELRO = yes
DIR_APP = $(DIR_SRC)/xorg-server-$(PKG_VER)
CONFIGURE_OPTIONS += \ --enable-xvfb \ - --disable-xnest \ - --enable-kdrive \ - --disable-xephyr \ - --disable-xsdl \ - --disable-xfake \ - --disable-xfbdev \ + --enable-xsdl \ + --enable-xfake \ + --enable-xfbdev \ --enable-xorg \ --disable-static \ + --disable-xnest \ + --disable-xdmx \ + --disable-xephyr \ --with-pic \ + --enable-maintainer-mode \ --with-int10=x86emu \ --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \ --with-module-dir=/usr/lib/xorg/modules \ --with-builderstring="Build ID: $(PKG_NAME) $(PKG_VER)-$(PKG_REL)" \ --with-os-name="$(hostname -s) $(uname -r)" \ - -with-vendor-name="$(DISTRO_NAME) Project" \ + --with-vendor-name="$(DISTRO_NAME) Project" \ + --with-vendor-web="http://www.ipfire.org" \ --with-xkb-output=/var/lib/xkb \ --enable-install-libxf86config \ --localstatedir=/var \ - --disable-aiglx \ - --disable-composite \ - --disable-xdmcp \ - --disable-xdm-auth-1 \ - --disable-glx \ --disable-screensaver \ - --disable-dri \ - --disable-dri2 \ - --disable-xinerama \ - --disable-dbe \ --disable-config-dbus \ --disable-config-hal \ - --disable-xquartz \ - --enable-config-udev \ + --enable-config-udev
define STAGE_PREPARE_CMDS cd $(DIR_APP) && autoreconf -vfi @@ -105,6 +102,4 @@ define STAGE_INSTALL $(BUILDROOT)/usr/share/xorg/ cd $(DIR_APP) && install -m 644 $(DIR_SOURCE)/10-quirks.conf \ $(BUILDROOT)/usr/share/X11/xorg.conf.d - cd $(DIR_APP) && install -m 644 $(DIR_SOURCE)/xorg.conf \ - $(BUILDROOT)/etc/X11/ endef diff --git a/pkgs/core/xorg-x11-server/xorg.conf b/pkgs/core/xorg-x11-server/xorg.conf deleted file mode 100644 index 684cf4a..0000000 --- a/pkgs/core/xorg-x11-server/xorg.conf +++ /dev/null @@ -1,26 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2010 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -Section "Module" - Load "int10" - Load "vbe" - Load "fb" - Load "shadow" -EndSection diff --git a/pkgs/core/xorg-x11-xkb-utils/xorg-x11-xkb-utils.nm b/pkgs/core/xorg-x11-xkb-utils/xorg-x11-xkb-utils.nm index f61ab22..795c5f0 100644 --- a/pkgs/core/xorg-x11-xkb-utils/xorg-x11-xkb-utils.nm +++ b/pkgs/core/xorg-x11-xkb-utils/xorg-x11-xkb-utils.nm @@ -34,9 +34,8 @@ PKG_URL = http://www.x.org/ PKG_LICENSE = MIT PKG_SUMMARY = X.Org X11 xkb utilities.
-PKG_BUILD_DEPS+= pkg-config -PKG_DEPS += libX11 libxkbfile - +PKG_BUILD_DEPS+= bison libX11-devel libxkbfile-devel pkg-config + define PKG_DESCRIPTION X.Org X11 xkb utilities. endef diff --git a/pkgs/core/xrandr/xrandr.nm b/pkgs/core/xrandr/xrandr.nm new file mode 100644 index 0000000..cedb0d6 --- /dev/null +++ b/pkgs/core/xrandr/xrandr.nm @@ -0,0 +1,49 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = xrandr +PKG_VER = 1.3.3 +PKG_REL = 0 + +PKG_MAINTAINER = +PKG_GROUP = X/Tools +PKG_URL = http://www.x.org/ +PKG_LICENSE = MIT +PKG_SUMMARY = Primitive command line interface to RandR extension. + +PKG_BUILD_DEPS+= libX11-devel libXrandr-devel libXrender-devel pkg-config + +define PKG_DESCRIPTION + Xrandr is used to set the screen size, orientation and/or \ + reflection using the RandR extension. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +# Remove xkeystone, it has a bad interpreter and we don't need it. +define STAGE_INSTALL_CMDS + rm -vf $(BUILDROOT)/usr/bin/xkeystone +endef diff --git a/pkgs/core/zlib/zlib.nm b/pkgs/core/zlib/zlib.nm index 5fb2e80..3771ab5 100644 --- a/pkgs/core/zlib/zlib.nm +++ b/pkgs/core/zlib/zlib.nm @@ -39,8 +39,6 @@ define PKG_DESCRIPTION library which is used by many different programs. endef
-PKG_BUILD_DEPS = glibc - PKG_PACKAGES += $(PKG_NAME_REAL)-devel
PKG_TARBALL = $(THISAPP).tar.gz diff --git a/pkgs/toolchain/acl/acl.nm b/pkgs/toolchain/acl/acl.nm deleted file mode 100644 index bc72fc8..0000000 --- a/pkgs/toolchain/acl/acl.nm +++ /dev/null @@ -1,16 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += attr gcc glibc - -include ../../core/acl/acl.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) - - cd $(DIR_APP) && make LIBTOOL="libtool --tag=CC" #$(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make install install-dev install-lib -endef diff --git a/pkgs/toolchain/attr/attr.nm b/pkgs/toolchain/attr/attr.nm deleted file mode 100644 index f44be23..0000000 --- a/pkgs/toolchain/attr/attr.nm +++ /dev/null @@ -1,24 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/attr/attr.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --enable-shared - - cd $(DIR_APP) && make LIBTOOL="libtool --tag=CC" #$(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make install - - install -v -m0755 $(DIR_APP)/libattr/.libs/libattr.so.1.1.0 $(TOOLS_DIR)/lib - ln -vsf libattr.so.1.1.0 $(TOOLS_DIR)/lib/libattr.so.1 - ln -vsf libattr.so.1.1.0 $(TOOLS_DIR)/lib/libattr.so - install -v -d $(TOOLS_DIR)/include/attr - cp -vf $(DIR_APP)/include/{attributes.h,error_context.h,libattr.h,xattr.h} \ - $(TOOLS_DIR)/include/attr/ -endef diff --git a/pkgs/toolchain/bash/bash.nm b/pkgs/toolchain/bash/bash.nm deleted file mode 100644 index 0bce29e..0000000 --- a/pkgs/toolchain/bash/bash.nm +++ /dev/null @@ -1,20 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/bash/bash.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ac_cv_func_working_mktime=yes \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --without-bash-malloc - - cd $(DIR_APP) && make #$(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make install - - ln -svf bash $(TOOLS_DIR)/bin/sh -endef diff --git a/pkgs/toolchain/binutils-static/binutils-static.nm b/pkgs/toolchain/binutils-static/binutils-static.nm deleted file mode 100644 index b0a5cd3..0000000 --- a/pkgs/toolchain/binutils-static/binutils-static.nm +++ /dev/null @@ -1,19 +0,0 @@ - -PKG_TOOLCHAIN_DEPS = # No deps - -include ../../core/binutils/binutils.nm - -define STAGE_BUILD - cd $(DIR_SRC)/binutils-build && \ - ../$(THISAPP)/configure \ - --target=$(TARGET) \ - --prefix=$(TOOLS_DIR) \ - --disable-nls \ - --disable-werror - - cd $(DIR_SRC)/binutils-build && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_SRC)/binutils-build && make install -endef diff --git a/pkgs/toolchain/binutils-static/patches b/pkgs/toolchain/binutils-static/patches deleted file mode 120000 index 046f17d..0000000 --- a/pkgs/toolchain/binutils-static/patches +++ /dev/null @@ -1 +0,0 @@ -../binutils/patches/ \ No newline at end of file diff --git a/pkgs/toolchain/binutils/binutils.nm b/pkgs/toolchain/binutils/binutils.nm deleted file mode 100644 index ac80c2e..0000000 --- a/pkgs/toolchain/binutils/binutils.nm +++ /dev/null @@ -1,28 +0,0 @@ - -include ../binutils-static/binutils-static.nm - -PKG_TOOLCHAIN_DEPS = glibc - -define STAGE_BUILD - cd $(DIR_SRC)/binutils-build && \ - AR=$(TARGET)-ar \ - CC="$(TARGET)-gcc -B$(TOOLS_DIR)/lib/" \ - RANLIB=$(TARGET)-ranlib \ - ../$(THISAPP)/configure \ - --host=$(TARGET) \ - --build=$(TARGET) \ - --prefix=$(TOOLS_DIR) \ - --with-lib-path=$(TOOLS_DIR)/lib \ - --disable-nls \ - --disable-werror - - cd $(DIR_SRC)/binutils-build && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_SRC)/binutils-build && make install - - cd $(DIR_SRC)/binutils-build && make -C ld clean - cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/lib:/usr/lib - cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new $(TOOLS_DIR)/bin -endef diff --git a/pkgs/toolchain/binutils/patches/binutils-2.19.1-asprintf_fix.patch b/pkgs/toolchain/binutils/patches/binutils-2.19.1-asprintf_fix.patch deleted file mode 100644 index 102ec2e..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.19.1-asprintf_fix.patch +++ /dev/null @@ -1,16 +0,0 @@ -https://hardened.gentooexperimental.org/trac/secure/raw-attachment/ticket/33... - ---- a/include/libiberty.h.orig 2007-02-09 15:29:21.000000000 +0000 -+++ b/include/libiberty.h 2008-07-25 21:17:25.000000000 +0000 -@@ -554,8 +554,11 @@ - /* Like sprintf but provides a pointer to malloc'd storage, which must - be freed by the caller. */ - -+/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ -+#ifndef asprintf - extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; - #endif -+#endif - - #if !HAVE_DECL_VASPRINTF - /* Like vsprintf but provides a pointer to malloc'd storage, which diff --git a/pkgs/toolchain/binutils/patches/binutils-2.19.1-ld_makefile.patch b/pkgs/toolchain/binutils/patches/binutils-2.19.1-ld_makefile.patch deleted file mode 100644 index 4624f29..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.19.1-ld_makefile.patch +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -e -## 001_ld_makefile_patch.dpatch -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Description: correct where ld scripts are installed -## DP: Author: Chris Chimelis chris@debian.org -## DP: Upstream status: N/A -## DP: Date: ?? - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -Index: binutils-2.18/ld/Makefile.am -=================================================================== ---- binutils-2.18.orig/ld/Makefile.am 2007-06-28 09:19:34.837940280 +0200 -+++ binutils-2.18/ld/Makefile.am 2007-06-28 09:19:35.795794664 +0200 -@@ -18,7 +18,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ -Index: binutils-2.18/ld/Makefile.in -=================================================================== ---- binutils-2.18.orig/ld/Makefile.in 2007-06-28 09:19:34.844939216 +0200 -+++ binutils-2.18/ld/Makefile.in 2007-06-28 09:19:35.796794512 +0200 -@@ -287,7 +287,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20-ipfire-ld-elf-1.patch b/pkgs/toolchain/binutils/patches/binutils-2.20-ipfire-ld-elf-1.patch deleted file mode 100644 index 88e539d..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20-ipfire-ld-elf-1.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Nur a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp ---- a/ld/testsuite/ld-elf/elf.exp 2010-03-17 10:59:03.000000000 +0100 -+++ b/ld/testsuite/ld-elf/elf.exp 2010-03-17 11:00:31.000000000 +0100 -@@ -70,11 +70,8 @@ - - set array_tests { - {"preinit array" "" "" {preinit.c} "preinit" "preinit.out"} -- {"static preinit array" "-static" "" {preinit.c} "preinit" "preinit.out"} - {"init array" "" "" {init.c} "init" "init.out"} -- {"static init array" "-static" "" {init.c} "init" "init.out"} - {"fini array" "" "" {fini.c} "fini" "fini.out"} -- {"static fini array" "-static" "" {fini.c} "fini" "fini.out"} - } - - # NetBSD ELF systems do not currently support the .*_array sections. diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20-objcopy.patch b/pkgs/toolchain/binutils/patches/binutils-2.20-objcopy.patch deleted file mode 100644 index 62c90c7..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20-objcopy.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/binutils/objcopy.c b/binutils/objcopy.c -index 9732b86..dec0feb 100644 ---- a/binutils/objcopy.c -+++ b/binutils/objcopy.c -@@ -2287,6 +2287,18 @@ copy_file (const char *input_filename, const char *output_filename, - - status = 1; - } -+ -+ if (status == 0) -+ { -+ struct stat statbuf; -+ -+ /* No need to check the return value of stat(). It has already -+ been checked in get_file_size(). */ -+ stat (input_filename, &statbuf); -+ -+ /* Try to preserve the permission bits. */ -+ chmod (output_filename, statbuf.st_mode); -+ } - } - - /* Add a name to the section renaming list. */ - diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20-pt_pax-1.patch b/pkgs/toolchain/binutils/patches/binutils-2.20-pt_pax-1.patch deleted file mode 100644 index 4eee0e6..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20-pt_pax-1.patch +++ /dev/null @@ -1,411 +0,0 @@ -diff -Naur binutils-2.19.50.orig/bfd/elf-bfd.h binutils-2.19.50/bfd/elf-bfd.h ---- binutils-2.19.50.orig/bfd/elf-bfd.h 2008-08-20 23:28:58.000000000 +0000 -+++ binutils-2.19.50/bfd/elf-bfd.h 2008-10-05 02:03:46.000000000 +0000 -@@ -1526,6 +1526,9 @@ - /* Segment flags for the PT_GNU_STACK segment. */ - unsigned int stack_flags; - -+ /* Segment flags for the PT_PAX_FLAGS segment. */ -+ unsigned int pax_flags; -+ - /* Symbol version definitions in external objects. */ - Elf_Internal_Verdef *verdef; - -diff -Naur binutils-2.19.50.orig/bfd/elf.c binutils-2.19.50/bfd/elf.c ---- binutils-2.19.50.orig/bfd/elf.c 2008-10-03 09:40:48.000000000 +0000 -+++ binutils-2.19.50/bfd/elf.c 2008-10-05 02:03:46.000000000 +0000 -@@ -1136,6 +1136,7 @@ - case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break; - case PT_GNU_STACK: pt = "STACK"; break; - case PT_GNU_RELRO: pt = "RELRO"; break; -+ case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break; - default: pt = NULL; break; - } - return pt; -@@ -2436,6 +2437,9 @@ - case PT_GNU_RELRO: - return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "relro"); - -+ case PT_PAX_FLAGS: -+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "pax_flags"); -+ - default: - /* Check for any processor-specific program segment types. */ - bed = get_elf_backend_data (abfd); -@@ -3429,6 +3433,11 @@ - ++segs; - } - -+ { -+ /* We need a PT_PAX_FLAGS segment. */ -+ ++segs; -+ } -+ - for (s = abfd->sections; s != NULL; s = s->next) - { - if ((s->flags & SEC_LOAD) != 0 -@@ -4008,6 +4017,20 @@ - } - } - -+ { -+ amt = sizeof (struct elf_segment_map); -+ m = bfd_zalloc (abfd, amt); -+ if (m == NULL) -+ goto error_return; -+ m->next = NULL; -+ m->p_type = PT_PAX_FLAGS; -+ m->p_flags = elf_tdata (abfd)->pax_flags; -+ m->p_flags_valid = 1; -+ -+ *pm = m; -+ pm = &m->next; -+ } -+ - free (sections); - elf_tdata (abfd)->segment_map = mfirst; - } -@@ -5205,7 +5228,8 @@ - 6. PT_TLS segment includes only SHF_TLS sections. - 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments. - 8. PT_DYNAMIC should not contain empty sections at the beginning -- (with the possible exception of .dynamic). */ -+ (with the possible exception of .dynamic). -+ 9. PT_PAX_FLAGS segments does not include any sections. */ - #define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \ - ((((segment->p_paddr \ - ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \ -@@ -5213,6 +5237,7 @@ - && (section->flags & SEC_ALLOC) != 0) \ - || IS_NOTE (segment, section)) \ - && segment->p_type != PT_GNU_STACK \ -+ && segment->p_type != PT_PAX_FLAGS \ - && (segment->p_type != PT_TLS \ - || (section->flags & SEC_THREAD_LOCAL)) \ - && (segment->p_type == PT_LOAD \ -diff -Naur binutils-2.19.50.orig/bfd/elflink.c binutils-2.19.50/bfd/elflink.c ---- binutils-2.19.50.orig/bfd/elflink.c 2008-10-03 09:40:48.000000000 +0000 -+++ binutils-2.19.50/bfd/elflink.c 2008-10-05 02:03:46.000000000 +0000 -@@ -5413,16 +5413,30 @@ - return TRUE; - - bed = get_elf_backend_data (output_bfd); -+ elf_tdata (output_bfd)->pax_flags = PF_NORANDEXEC; -+ -+ if (info->execheap) -+ elf_tdata (output_bfd)->pax_flags |= PF_NOMPROTECT; -+ else if (info->noexecheap) -+ elf_tdata (output_bfd)->pax_flags |= PF_MPROTECT; -+ - if (info->execstack) -- elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X; -+ { -+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X; -+ elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP; -+ } - else if (info->noexecstack) -- elf_tdata (output_bfd)->stack_flags = PF_R | PF_W; -+ { -+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W; -+ elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP; -+ } - else - { - bfd *inputobj; - asection *notesec = NULL; - int exec = 0; - -+ elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP; - for (inputobj = info->input_bfds; - inputobj; - inputobj = inputobj->link_next) -@@ -5435,7 +5449,11 @@ - if (s) - { - if (s->flags & SEC_CODE) -- exec = PF_X; -+ { -+ elf_tdata (output_bfd)->pax_flags &= ~PF_NOEMUTRAMP; -+ elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP; -+ exec = PF_X; -+ } - notesec = s; - } - else if (bed->default_execstack) -diff -Naur binutils-2.19.50.orig/binutils/readelf.c binutils-2.19.50/binutils/readelf.c ---- binutils-2.19.50.orig/binutils/readelf.c 2008-09-17 07:50:28.000000000 +0000 -+++ binutils-2.19.50/binutils/readelf.c 2008-10-05 02:03:46.000000000 +0000 -@@ -2505,6 +2505,7 @@ - return "GNU_EH_FRAME"; - case PT_GNU_STACK: return "GNU_STACK"; - case PT_GNU_RELRO: return "GNU_RELRO"; -+ case PT_PAX_FLAGS: return "PAX_FLAGS"; - - default: - if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC)) -diff -Naur binutils-2.19.50.orig/include/bfdlink.h binutils-2.19.50/include/bfdlink.h ---- binutils-2.19.50.orig/include/bfdlink.h 2008-08-17 03:12:50.000000000 +0000 -+++ binutils-2.19.50/include/bfdlink.h 2008-10-05 02:03:46.000000000 +0000 -@@ -319,6 +319,14 @@ - /* TRUE if PT_GNU_RELRO segment should be created. */ - unsigned int relro: 1; - -+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT -+ flags. */ -+ unsigned int execheap: 1; -+ -+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT -+ flags. */ -+ unsigned int noexecheap: 1; -+ - /* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */ - unsigned int warn_shared_textrel: 1; - -diff -Naur binutils-2.19.50.orig/include/elf/common.h binutils-2.19.50/include/elf/common.h ---- binutils-2.19.50.orig/include/elf/common.h 2008-08-03 23:20:42.000000000 +0000 -+++ binutils-2.19.50/include/elf/common.h 2008-10-05 02:04:51.000000000 +0000 -@@ -360,6 +360,7 @@ - #define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */ - #define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */ - #define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */ -+#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) /* PaX flags */ - - /* Program segment permissions, in program header p_flags field. */ - -@@ -370,6 +371,21 @@ - #define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ - #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */ - -+/* Flags to control PaX behavior. */ -+ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ -+ - /* Values for section header, sh_type field. */ - - #define SHT_NULL 0 /* Section header table entry unused */ -diff -Naur binutils-2.19.50.orig/ld/emultempl/elf32.em binutils-2.19.50/ld/emultempl/elf32.em ---- binutils-2.19.50.orig/ld/emultempl/elf32.em 2008-10-03 09:40:49.000000000 +0000 -+++ binutils-2.19.50/ld/emultempl/elf32.em 2008-10-05 02:03:46.000000000 +0000 -@@ -2123,6 +2123,16 @@ - link_info.noexecstack = TRUE; - link_info.execstack = FALSE; - } -+ else if (strcmp (optarg, "execheap") == 0) -+ { -+ link_info.execheap = TRUE; -+ link_info.noexecheap = FALSE; -+ } -+ else if (strcmp (optarg, "noexecheap") == 0) -+ { -+ link_info.noexecheap = TRUE; -+ link_info.execheap = FALSE; -+ } - EOF - - if test -n "$COMMONPAGESIZE"; then -@@ -2206,6 +2216,8 @@ - fprintf (file, _("\ - -z execstack Mark executable as requiring executable stack\n")); - fprintf (file, _("\ -+ -z execheap Mark executable as requiring executable heap\n")); -+ fprintf (file, _("\ - -z initfirst Mark DSO to be initialized first at runtime\n")); - fprintf (file, _("\ - -z interpose Mark object to interpose all DSOs but executable\n")); -@@ -2229,6 +2241,8 @@ - -z nodump Mark DSO not available to dldump\n")); - fprintf (file, _("\ - -z noexecstack Mark executable as not requiring executable stack\n")); -+ fprintf (file, _("\ -+ -z noexecheap Mark executable as not requiring executable heap\n")); - EOF - - if test -n "$COMMONPAGESIZE"; then -diff -Naur binutils-2.19.50.orig/ld/ldgram.y binutils-2.19.50/ld/ldgram.y ---- binutils-2.19.50.orig/ld/ldgram.y 2008-07-06 13:38:36.000000000 +0000 -+++ binutils-2.19.50/ld/ldgram.y 2008-10-05 02:03:46.000000000 +0000 -@@ -1112,6 +1112,8 @@ - $$ = exp_intop (0x6474e550); - else if (strcmp (s, "PT_GNU_STACK") == 0) - $$ = exp_intop (0x6474e551); -+ else if (strcmp (s, "PT_PAX_FLAGS") == 0) -+ $$ = exp_intop (0x65041580); - else - { - einfo (_("\ -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-elf/seg.d binutils-2.19.50/ld/testsuite/ld-elf/seg.d ---- binutils-2.19.50.orig/ld/testsuite/ld-elf/seg.d 2008-02-22 23:10:45.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-elf/seg.d 2008-10-05 02:03:46.000000000 +0000 -@@ -10,5 +10,6 @@ - #... - LOAD .* - LOAD 0x0*001000 0xf*fffff000 0xf*fffff000 0x0*1000 0x0*1000 .* -+ PAX_FLAGS 0x000000 0x00000000 0x00000000 0x00000 0x00000 0x4 - # FRV adds a PT_GNU_STACK header - #... -@@ -17,4 +18,5 @@ - # On MIPS, the first segment is for .reginfo. - #... - 0. reset boot -+ 02 - #pass -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-i386/hidden2.d binutils-2.19.50/ld/testsuite/ld-i386/hidden2.d ---- binutils-2.19.50.orig/ld/testsuite/ld-i386/hidden2.d 2008-03-16 22:26:23.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-i386/hidden2.d 2008-10-05 02:03:46.000000000 +0000 -@@ -8,6 +8,6 @@ - Disassembly of section .text: - - [a-f0-9]+ <bar>: --[ ]*[a-f0-9]+: e8 cf fe ff ff call 0 <bar-0x[a-f0-9]+> -+[ ]*[a-f0-9]+: e8 af fe ff ff call 0 <bar-0x[a-f0-9]+> - [ ]*[a-f0-9]+: c3 ret - #pass -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsbin.rd binutils-2.19.50/ld/testsuite/ld-i386/tlsbin.rd ---- binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsbin.rd 2007-09-30 01:33:14.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-i386/tlsbin.rd 2008-10-05 02:03:46.000000000 +0000 -@@ -44,6 +44,7 @@ - LOAD.* - DYNAMIC.* - TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000 -+ PAX_FLAGS +0x000000 0x00000000 0x00000000 0x00000 0x00000 +0x4 - - Section to Segment mapping: - Segment Sections... -@@ -53,6 +54,7 @@ - 03 +.tdata .dynamic .got .got.plt * - 04 +.dynamic * - 05 +.tdata .tbss * -+ 06 * - - Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries: - Offset +Info +Type +Sym.Value +Sym. Name -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsbindesc.rd binutils-2.19.50/ld/testsuite/ld-i386/tlsbindesc.rd ---- binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsbindesc.rd 2008-07-28 18:07:05.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-i386/tlsbindesc.rd 2008-10-05 02:03:46.000000000 +0000 -@@ -42,6 +42,7 @@ - LOAD.* - DYNAMIC.* - TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000 -+ PAX_FLAGS +0x000000 0x00000000 0x00000000 0x00000 0x00000 +0x4 - - Section to Segment mapping: - Segment Sections... -@@ -51,6 +52,7 @@ - 03 +.tdata .dynamic .got .got.plt * - 04 +.dynamic * - 05 +.tdata .tbss * -+ 06 * - - Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries: - Offset +Info +Type +Sym.Value +Sym. Name -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsdesc.rd binutils-2.19.50/ld/testsuite/ld-i386/tlsdesc.rd ---- binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsdesc.rd 2007-09-30 01:33:14.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-i386/tlsdesc.rd 2008-10-05 02:03:46.000000000 +0000 -@@ -39,6 +39,7 @@ - LOAD.* - DYNAMIC.* - TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1 -+ PAX_FLAGS +0x000000 0x00000000 0x00000000 0x00000 0x00000 +0x4 - - Section to Segment mapping: - Segment Sections... -@@ -46,6 +47,7 @@ - 01 +.tdata .dynamic .got .got.plt * - 02 +.dynamic * - 03 +.tdata .tbss * -+ 04 * - - Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries: - Offset +Info +Type +Sym.Value +Sym. Name -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsdesc.sd binutils-2.19.50/ld/testsuite/ld-i386/tlsdesc.sd ---- binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsdesc.sd 2006-10-17 13:41:48.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-i386/tlsdesc.sd 2008-10-05 02:03:46.000000000 +0000 -@@ -14,7 +14,7 @@ - [0-9a-f]+ 6c000000 b4ffffff 4c000000 68000000 .* - [0-9a-f]+ 50000000 70000000 00000000 bcffffff .* - Contents of section .got.plt: -- [0-9a-f]+ b0150000 00000000 00000000 00000000 .* -+ [0-9a-f]+ d0150000 00000000 00000000 00000000 .* - [0-9a-f]+ 20000000 00000000 60000000 00000000 .* - [0-9a-f]+ 00000000 00000000 00000000 00000000 .* - [0-9a-f]+ 40000000 +.* -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsgdesc.rd binutils-2.19.50/ld/testsuite/ld-i386/tlsgdesc.rd ---- binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsgdesc.rd 2007-09-30 01:33:14.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-i386/tlsgdesc.rd 2008-10-05 02:03:46.000000000 +0000 -@@ -36,12 +36,14 @@ - LOAD.* - LOAD.* - DYNAMIC.* -+ PAX_FLAGS +0x000000 0x00000000 0x00000000 0x00000 0x00000 +0x4 - - Section to Segment mapping: - Segment Sections... - 00 +.hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text * - 01 +.dynamic .got .got.plt * - 02 +.dynamic * -+ 03 * - - Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries: - Offset +Info +Type +Sym.Value +Sym. Name -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsnopic.rd binutils-2.19.50/ld/testsuite/ld-i386/tlsnopic.rd ---- binutils-2.19.50.orig/ld/testsuite/ld-i386/tlsnopic.rd 2007-09-30 01:33:14.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-i386/tlsnopic.rd 2008-10-05 02:03:46.000000000 +0000 -@@ -37,6 +37,7 @@ - LOAD.* - DYNAMIC.* - TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+ 0x0+24 R +0x1 -+ PAX_FLAGS +0x000000 0x00000000 0x00000000 0x00000 0x00000 +0x4 - - Section to Segment mapping: - Segment Sections... -@@ -44,6 +45,7 @@ - 01 +.dynamic .got .got.plt * - 02 +.dynamic * - 03 +.tbss * -+ 04 * - - Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries: - Offset +Info +Type +Sym.Value +Sym. Name -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-i386/tlspic.rd binutils-2.19.50/ld/testsuite/ld-i386/tlspic.rd ---- binutils-2.19.50.orig/ld/testsuite/ld-i386/tlspic.rd 2007-09-30 01:33:14.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-i386/tlspic.rd 2008-10-05 02:03:46.000000000 +0000 -@@ -40,6 +40,7 @@ - LOAD.* - DYNAMIC.* - TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1 -+ PAX_FLAGS +0x000000 0x00000000 0x00000000 0x00000 0x00000 +0x4 - - Section to Segment mapping: - Segment Sections... -@@ -47,6 +48,7 @@ - 01 +.tdata .dynamic .got .got.plt * - 02 +.dynamic * - 03 +.tdata .tbss * -+ 04 * - - Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 26 entries: - Offset +Info +Type +Sym.Value +Sym. Name -diff -Naur binutils-2.19.50.orig/ld/testsuite/ld-scripts/empty-aligned.d binutils-2.19.50/ld/testsuite/ld-scripts/empty-aligned.d ---- binutils-2.19.50.orig/ld/testsuite/ld-scripts/empty-aligned.d 2005-08-18 07:51:07.000000000 +0000 -+++ binutils-2.19.50/ld/testsuite/ld-scripts/empty-aligned.d 2008-10-05 02:03:46.000000000 +0000 -@@ -7,7 +7,9 @@ - Program Headers: - +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg +Align - +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ [RWE ]+ +0x[0-9a-f]+ -+ +PAX_FLAGS +0x000000 0x00000000 0x00000000 0x00000 0x00000 +0x4 - - Section to Segment mapping: - +Segment Sections... - +00 +.text -+ +01 + diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20.1-all_dobumen-new-dtags-behaviour.patch b/pkgs/toolchain/binutils/patches/binutils-2.20.1-all_dobumen-new-dtags-behaviour.patch deleted file mode 100644 index 3587c99..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20.1-all_dobumen-new-dtags-behaviour.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: binutils-2.19.51.0.5/ld/ld.texinfo -=================================================================== ---- binutils-2.19.51.0.5.orig/ld/ld.texinfo -+++ binutils-2.19.51.0.5/ld/ld.texinfo -@@ -2036,8 +2036,9 @@ This linker can create the new dynamic t - systems may not understand them. If you specify - @option{--enable-new-dtags}, the dynamic tags will be created as needed. - If you specify @option{--disable-new-dtags}, no new dynamic tags will be --created. By default, the new dynamic tags are not created. Note that --those options are only available for ELF systems. -+created. On IPFire, by default, the new dynamic tags are created (this -+differs from upstream behaviour). Note that those options are only -+available for ELF systems. - - @kindex --hash-size=@var{number} - @item --hash-size=@var{number} diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-flexible-tests.patch b/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-flexible-tests.patch deleted file mode 100644 index c95e369..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-flexible-tests.patch +++ /dev/null @@ -1,82 +0,0 @@ -making some of the address matches more flexible fixes tests when using -pax/relro/hash patches - ---- binutils/ld/testsuite/ld-i386/hidden2.d -+++ binutils/ld/testsuite/ld-i386/hidden2.d -@@ -8,6 +8,6 @@ - Disassembly of section .text: - - [a-f0-9]+ <bar>: --[ ]*[a-f0-9]+: e8 af fe ff ff call 0 <bar-0x[a-f0-9]+> -+[ ]*[a-f0-9]+: e8 ([a-f0-9]{2} ){2}ff ff call 0 <bar-0x[a-f0-9]+> - [ ]*[a-f0-9]+: c3 ret - #pass ---- binutils/ld/testsuite/ld-x86-64/hidden2.d -+++ binutils/ld/testsuite/ld-x86-64/hidden2.d -@@ -8,6 +8,6 @@ - Disassembly of section .text: - - [a-f0-9]+ <bar>: --[ ]*[a-f0-9]+: e8 33 fe ff ff callq 0 <bar-0x[a-f0-9]+> -+[ ]*[a-f0-9]+: e8 ([a-f0-9]{2} ){2}ff ff callq 0 <bar-0x[a-f0-9]+> - [ ]*[a-f0-9]+: c3 retq - #pass ---- binutils/ld/testsuite/ld-x86-64/protected3.d -+++ binutils/ld/testsuite/ld-x86-64/protected3.d -@@ -8,6 +8,6 @@ - Disassembly of section .text: - - 0+[a-f0-9]+ <bar>: --[ ]*[a-f0-9]+: 8b 05 ce 00 20 00 mov 0x[a-f0-9]+(%rip),%eax # [a-f0-9]+ <foo> -+[ ]*[a-f0-9]+: 8b 05 ([a-f0-9]{2} ){2}20 00 mov 0x[a-f0-9]+(%rip),%eax # [a-f0-9]+ <foo> - [ ]*[a-f0-9]+: c3 retq - #pass ---- binutils/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d -+++ binutils/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d -@@ -3,5 +3,5 @@ - #target: x86_64-*-* i?86-*-* - - #... --[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*(+0x200|)@plt> -+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*(+0x[a-f0-9]+|)@plt> - #pass ---- binutils/ld/testsuite/ld-ifunc/ifunc-1-x86.d -+++ binutils/ld/testsuite/ld-ifunc/ifunc-1-x86.d -@@ -3,5 +3,5 @@ - #target: x86_64-*-* i?86-*-* - - #... --[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*(+0x220|)@plt> -+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*(+0x[a-f0-9]+|)@plt> - #pass ---- binutils/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d -+++ binutils/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d -@@ -4,6 +4,6 @@ - #target: x86_64-*-* - - #... --[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*+0x220@plt> --[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*(%rip),%rax.*[ \t0-9a-fq]+<*ABS*+0x220@plt> -+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*+0x[a-f0-9]+@plt> -+[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*(%rip),%rax.*[ \t0-9a-fq]+<*ABS*+0x[a-f0-9]+@plt> - #pass ---- binutils/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d -+++ binutils/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d -@@ -4,6 +4,6 @@ - #target: x86_64-*-* - - #... --[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*+0x220@plt> --[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*(%rip),%rax.*[ \t0-9a-fq]+<*ABS*+0x220@plt> -+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*+0x[a-f0-9]+@plt> -+[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*(%rip),%rax.*[ \t0-9a-fq]+<*ABS*+0x[a-f0-9]+@plt> - #pass ---- binutils/ld/testsuite/ld-ifunc/ifunc-3a-x86.d -+++ binutils/ld/testsuite/ld-ifunc/ifunc-3a-x86.d -@@ -4,5 +4,5 @@ - #target: x86_64-*-* i?86-*-* - - #... --[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*(+0x258|)@plt> -+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<*ABS*(+0x[a-f0-9]+|)@plt> - #pass diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-rpath_envvar-smack.patch b/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-rpath_envvar-smack.patch deleted file mode 100644 index 2e90f0c..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-rpath_envvar-smack.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://sourceware.org/ml/binutils/2007-07/msg00401.html -http://sourceware.org/bugzilla/show_bug.cgi?id=4970 - ---- a/configure -+++ b/configure -@@ -5601,6 +5601,7 @@ case "${host}" in - *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;; - *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; - esac -+RPATH_ENVVAR="cant_touch_this_nah_nah_nah" - - # On systems where the dynamic library environment variable is PATH, - if test "$RPATH_ENVVAR" = PATH; then diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-use-new-ld-dtags.patch b/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-use-new-ld-dtags.patch deleted file mode 100644 index 84e20f7..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-use-new-ld-dtags.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- binutils/ld/ldmain.c -+++ binutils/ld/ldmain.c -@@ -296,6 +296,7 @@ main (int argc, char **argv) - - link_info.allow_undefined_version = TRUE; - link_info.keep_memory = TRUE; -+ link_info.new_dtags = TRUE; - link_info.combreloc = TRUE; - link_info.strip_discarded = TRUE; - link_info.callbacks = &link_callbacks; diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-use-relro.patch b/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-use-relro.patch deleted file mode 100644 index db3276b..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-use-relro.patch +++ /dev/null @@ -1,9 +0,0 @@ -background: -http://www.airs.com/blog/archives/189 - ---- binutils/ld/ldmain.c -+++ binutils/ld/ldmain.c -@@ -293,2 +293,3 @@ main (int argc, char **argv) - link_info.combreloc = TRUE; -+ link_info.relro = TRUE; - link_info.strip_discarded = TRUE; diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-warn-textrel.patch b/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-warn-textrel.patch deleted file mode 100644 index c8783a2..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20.1-gentoo-warn-textrel.patch +++ /dev/null @@ -1,85 +0,0 @@ -textrels are bad for forcing copy-on-write (this affects everyone), -and for security/runtime code generation, this affects security ppl. -But in either case, it doesn't matter who needs textrels, it's -the very fact that they're needed at all. - -2006-06-10 Ned Ludd solar@gentoo.org, Mike Frysinger vapier@gentoo.org - - * bfd/elflink.c (bfd_elf_final_link): Check all objects for TEXTRELs. - * ld/ldmain.c (main): Change textrel warning default to true. - * ld/testsuite/lib/ld-lib.exp (default_ld_simple_link): Scrub TEXTREL - warnings from ld output. - ---- binutils/bfd/elflink.c -+++ binutils/bfd/elflink.c -@@ -8652,14 +8652,12 @@ - goto error_return; - - /* Check for DT_TEXTREL (late, in case the backend removes it). */ -- if (info->warn_shared_textrel && info->shared) -+ o = bfd_get_section_by_name (dynobj, ".dynamic"); -+ if (info->warn_shared_textrel && o != NULL) - { - bfd_byte *dyncon, *dynconend; - - /* Fix up .dynamic entries. */ -- o = bfd_get_section_by_name (dynobj, ".dynamic"); -- BFD_ASSERT (o != NULL); -- - dyncon = o->contents; - dynconend = o->contents + o->size; - for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn) -@@ -8702,7 +8702,7 @@ bfd_elf_final_link (bfd *abfd, struct bf - if (dyn.d_tag == DT_TEXTREL) - { - info->callbacks->einfo -- (_("%P: warning: creating a DT_TEXTREL in a shared object.\n")); -+ (_("%P: warning: creating a DT_TEXTREL in object.\n")); - break; - } - } ---- binutils/ld/ldmain.c -+++ binutils/ld/ldmain.c -@@ -282,2 +282,3 @@ - link_info.spare_dynamic_tags = 5; -+ link_info.warn_shared_textrel = TRUE; - link_info.sharable_sections = FALSE; ---- binutils/ld/testsuite/lib/ld-lib.exp -+++ binutils/ld/testsuite/lib/ld-lib.exp -@@ -181,6 +181,10 @@ proc default_ld_simple_link { ld target - # symbol, since the default linker script might use ENTRY. - regsub -all "(^|\n)([^\n]*: warning: cannot find entry symbol[^\n]*\n?)" $exec_output "\1" exec_output - -+ # Gentoo tweak: -+ # We want to ignore TEXTREL warnings since we force enable them by default -+ regsub -all "^.*ld-new: warning: creating a DT_TEXTREL in object." $exec_output "\1" exec_output -+ - if [string match "" $exec_output] then { - return 1 - } else { -@@ -899,6 +903,10 @@ - remote_file build delete "ld.tmp" - set cmdret [lindex $cmdret 0] - -+ # Gentoo tweak: -+ # We want to ignore TEXTREL warnings since we force enable them by default -+ regsub -all "^.*ld-new: warning: creating a DT_TEXTREL in object." $comp_output "\1" comp_output -+ - if { $cmdret == 0 && $run_objcopy } { - set infile $objfile - set objfile "tmpdir/dump1" - -this sucks, but the warn test explicitly checks for textrels, and we -change/filter that output with the above hunks - ---- binutils/ld/testsuite/ld-i386/i386.exp -+++ binutils/ld/testsuite/ld-i386/i386.exp -@@ -176,7 +176,7 @@ - run_dump_test "pcrel16" - run_dump_test "pcrel16abs" - run_dump_test "alloc" --run_dump_test "warn1" -+#run_dump_test "warn1" - run_dump_test "tlsgd2" - run_dump_test "tlsie2" - run_dump_test "tlsie3" diff --git a/pkgs/toolchain/binutils/patches/binutils-2.20.51.0.2-build-id.patch b/pkgs/toolchain/binutils/patches/binutils-2.20.51.0.2-build-id.patch deleted file mode 100644 index 02abef4..0000000 --- a/pkgs/toolchain/binutils/patches/binutils-2.20.51.0.2-build-id.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -rcp ../binutils-2.20.51.0.7.original/bfd/elfcode.h ./bfd/elfcode.h -*** ../binutils-2.20.51.0.7.original/bfd/elfcode.h 2010-04-08 15:29:32.000000000 +0100 ---- ./bfd/elfcode.h 2010-04-08 15:29:39.000000000 +0100 -*************** elf_checksum_contents (bfd *abfd, -*** 1188,1193 **** ---- 1188,1211 ---- - - if (i_shdr.contents) - (*process) (i_shdr.contents, i_shdr.sh_size, arg); -+ else -+ { -+ asection *sec; -+ -+ sec = bfd_section_from_elf_index (abfd, count); -+ if (sec != NULL) -+ { -+ if (sec->contents == NULL) -+ { -+ /* Force rereading from file. */ -+ sec->flags &= ~SEC_IN_MEMORY; -+ if (! bfd_malloc_and_get_section (abfd, sec, & sec->contents)) -+ continue; -+ } -+ if (sec->contents != NULL) -+ (*process) (sec->contents, i_shdr.sh_size, arg); -+ } -+ } - } - - return TRUE; -diff -rcp ../binutils-2.20.51.0.7.original/bfd/section.c ./bfd/section.c -*** ../binutils-2.20.51.0.7.original/bfd/section.c 2010-04-08 15:29:32.000000000 +0100 ---- ./bfd/section.c 2010-04-08 15:29:39.000000000 +0100 -*************** bfd_malloc_and_get_section (bfd *abfd, s -*** 1488,1494 **** - return TRUE; - - p = (bfd_byte *) -! bfd_malloc (sec->rawsize > sec->size ? sec->rawsize : sec->size); - if (p == NULL) - return FALSE; - *buf = p; ---- 1488,1494 ---- - return TRUE; - - p = (bfd_byte *) -! bfd_zmalloc (sec->rawsize > sec->size ? sec->rawsize : sec->size); - if (p == NULL) - return FALSE; - *buf = p; -diff -rcp ../binutils-2.20.51.0.7.original/bfd/section.c.orig ./bfd/section.c.orig diff --git a/pkgs/toolchain/bzip2/bzip2.nm b/pkgs/toolchain/bzip2/bzip2.nm deleted file mode 100644 index b4b70ba..0000000 --- a/pkgs/toolchain/bzip2/bzip2.nm +++ /dev/null @@ -1,14 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/bzip2/bzip2.nm - -STAGE_PREPARE_CMDS = # Nothing to do - -define STAGE_BUILD - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make PREFIX=$(TOOLS_DIR) install -endef diff --git a/pkgs/toolchain/ccache/ccache.nm b/pkgs/toolchain/ccache/ccache.nm deleted file mode 100644 index c83720d..0000000 --- a/pkgs/toolchain/ccache/ccache.nm +++ /dev/null @@ -1,20 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc zlib - -include ../../core/ccache/ccache.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL_CMDS - mkdir -pv $(TOOLS_DIR)/usr/ccache/bin - for i in gcc g++ cc c++; do \ - ln -svf ../../../bin/ccache $(TOOLS_DIR)/usr/ccache/bin/$${i}; \ - ln -svf ../../../bin/ccache $(TOOLS_DIR)/usr/ccache/bin/$(TARGET)-$${i}; \ - done -endef diff --git a/pkgs/toolchain/coreutils/coreutils.nm b/pkgs/toolchain/coreutils/coreutils.nm deleted file mode 100644 index 8d5e6c2..0000000 --- a/pkgs/toolchain/coreutils/coreutils.nm +++ /dev/null @@ -1,24 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += acl attr gcc glibc ncurses - -include ../../core/coreutils/coreutils.nm - -STAGE_PREPARE_CMDS = # We need to autoreconf here - -define STAGE_BUILD - cd $(DIR_APP) && \ - gl_cv_func_printf_directive_n=no \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --enable-install-program=hostname - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -STAGE_TEST = # Disable tests in toolchain - -define STAGE_INSTALL - cd $(DIR_APP) && make install - - cd $(DIR_APP) && cp -v src/su $(TOOLS_DIR)/bin/su-tools -endef diff --git a/pkgs/toolchain/coreutils/patches/coreutils-8.5-i18n.patch b/pkgs/toolchain/coreutils/patches/coreutils-8.5-i18n.patch deleted file mode 100644 index d6e6c46..0000000 --- a/pkgs/toolchain/coreutils/patches/coreutils-8.5-i18n.patch +++ /dev/null @@ -1,4048 +0,0 @@ -diff -urNp coreutils-8.5-orig/lib/linebuffer.h coreutils-8.5/lib/linebuffer.h ---- coreutils-8.5-orig/lib/linebuffer.h 2010-04-23 15:44:00.000000000 +0200 -+++ coreutils-8.5/lib/linebuffer.h 2010-04-26 14:24:33.000000000 +0200 -@@ -21,6 +21,11 @@ - - # include <stdio.h> - -+/* Get mbstate_t. */ -+# if HAVE_WCHAR_H -+# include <wchar.h> -+# endif -+ - /* A `struct linebuffer' holds a line of text. */ - - struct linebuffer -@@ -28,6 +33,9 @@ struct linebuffer - size_t size; /* Allocated. */ - size_t length; /* Used. */ - char *buffer; -+# if HAVE_WCHAR_H -+ mbstate_t state; -+# endif - }; - - /* Initialize linebuffer LINEBUFFER for use. */ -diff -urNp coreutils-8.5-orig/src/cut.c coreutils-8.5/src/cut.c ---- coreutils-8.5-orig/src/cut.c 2010-04-20 21:52:04.000000000 +0200 -+++ coreutils-8.5/src/cut.c 2010-04-26 14:24:33.000000000 +0200 -@@ -28,6 +28,11 @@ - #include <assert.h> - #include <getopt.h> - #include <sys/types.h> -+ -+/* Get mbstate_t, mbrtowc(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif - #include "system.h" - - #include "error.h" -@@ -36,6 +41,18 @@ - #include "quote.h" - #include "xstrndup.h" - -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+ installation; work around this configuration error. */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# undef MB_LEN_MAX -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - /* The official name of this program (e.g., no `g' prefix). */ - #define PROGRAM_NAME "cut" - -@@ -71,6 +88,52 @@ - } \ - while (0) - -+/* Refill the buffer BUF to get a multibyte character. */ -+#define REFILL_BUFFER(BUF, BUFPOS, BUFLEN, STREAM) \ -+ do \ -+ { \ -+ if (BUFLEN < MB_LEN_MAX && !feof (STREAM) && !ferror (STREAM)) \ -+ { \ -+ memmove (BUF, BUFPOS, BUFLEN); \ -+ BUFLEN += fread (BUF + BUFLEN, sizeof(char), BUFSIZ, STREAM); \ -+ BUFPOS = BUF; \ -+ } \ -+ } \ -+ while (0) -+ -+/* Get wide character on BUFPOS. BUFPOS is not included after that. -+ If byte sequence is not valid as a character, CONVFAIL is 1. Otherwise 0. */ -+#define GET_NEXT_WC_FROM_BUFFER(WC, BUFPOS, BUFLEN, MBLENGTH, STATE, CONVFAIL) \ -+ do \ -+ { \ -+ mbstate_t state_bak; \ -+ \ -+ if (BUFLEN < 1) \ -+ { \ -+ WC = WEOF; \ -+ break; \ -+ } \ -+ \ -+ /* Get a wide character. */ \ -+ CONVFAIL = 0; \ -+ state_bak = STATE; \ -+ MBLENGTH = mbrtowc ((wchar_t *)&WC, BUFPOS, BUFLEN, &STATE); \ -+ \ -+ switch (MBLENGTH) \ -+ { \ -+ case (size_t)-1: \ -+ case (size_t)-2: \ -+ CONVFAIL++; \ -+ STATE = state_bak; \ -+ /* Fall througn. */ \ -+ \ -+ case 0: \ -+ MBLENGTH = 1; \ -+ break; \ -+ } \ -+ } \ -+ while (0) -+ - struct range_pair - { - size_t lo; -@@ -89,7 +152,7 @@ static char *field_1_buffer; - /* The number of bytes allocated for FIELD_1_BUFFER. */ - static size_t field_1_bufsize; - --/* The largest field or byte index used as an endpoint of a closed -+/* The largest byte, character or field index used as an endpoint of a closed - or degenerate range specification; this doesn't include the starting - index of right-open-ended ranges. For example, with either range spec - `2-5,9-', `2-3,5,9-' this variable would be set to 5. */ -@@ -101,10 +164,11 @@ static size_t eol_range_start; - - /* This is a bit vector. - In byte mode, which bytes to output. -+ In character mode, which characters to output. - In field mode, which DELIM-separated fields to output. -- Both bytes and fields are numbered starting with 1, -+ Bytes, characters and fields are numbered starting with 1, - so the zeroth bit of this array is unused. -- A field or byte K has been selected if -+ A byte, character or field K has been selected if - (K <= MAX_RANGE_ENDPOINT and is_printable_field(K)) - || (EOL_RANGE_START > 0 && K >= EOL_RANGE_START). */ - static unsigned char *printable_field; -@@ -113,15 +177,25 @@ enum operating_mode - { - undefined_mode, - -- /* Output characters that are in the given bytes. */ -+ /* Output bytes that are at the given positions. */ - byte_mode, - -+ /* Output characters that are at the given positions. */ -+ character_mode, -+ - /* Output the given delimeter-separated fields. */ - field_mode - }; - - static enum operating_mode operating_mode; - -+/* If nonzero, when in byte mode, don't split multibyte characters. */ -+static int byte_mode_character_aware; -+ -+/* If nonzero, the function for single byte locale is work -+ if this program runs on multibyte locale. */ -+static int force_singlebyte_mode; -+ - /* If true do not output lines containing no delimeter characters. - Otherwise, all such lines are printed. This option is valid only - with field mode. */ -@@ -133,6 +207,9 @@ static bool complement; - - /* The delimeter character for field mode. */ - static unsigned char delim; -+#if HAVE_WCHAR_H -+static wchar_t wcdelim; -+#endif - - /* True if the --output-delimiter=STRING option was specified. */ - static bool output_delimiter_specified; -@@ -206,7 +283,7 @@ Mandatory arguments to long options are - -f, --fields=LIST select only these fields; also print any line\n\ - that contains no delimiter character, unless\n\ - the -s option is specified\n\ -- -n (ignored)\n\ -+ -n with -b: don't split multibyte characters\n\ - "), stdout); - fputs (_("\ - --complement complement the set of selected bytes, characters\n\ -@@ -365,7 +442,7 @@ set_fields (const char *fieldstr) - in_digits = false; - /* Starting a range. */ - if (dash_found) -- FATAL_ERROR (_("invalid byte or field list")); -+ FATAL_ERROR (_("invalid byte, character or field list")); - dash_found = true; - fieldstr++; - -@@ -389,14 +466,16 @@ set_fields (const char *fieldstr) - if (!rhs_specified) - { - /* `n-'. From `initial' to end of line. */ -- eol_range_start = initial; -+ if (eol_range_start == 0 || -+ (eol_range_start != 0 && eol_range_start > initial)) -+ eol_range_start = initial; - field_found = true; - } - else - { - /* `m-n' or `-n' (1-n). */ - if (value < initial) -- FATAL_ERROR (_("invalid decreasing range")); -+ FATAL_ERROR (_("invalid byte, character or field list")); - - /* Is there already a range going to end of line? */ - if (eol_range_start != 0) -@@ -476,6 +555,9 @@ set_fields (const char *fieldstr) - if (operating_mode == byte_mode) - error (0, 0, - _("byte offset %s is too large"), quote (bad_num)); -+ else if (operating_mode == character_mode) -+ error (0, 0, -+ _("character offset %s is too large"), quote (bad_num)); - else - error (0, 0, - _("field number %s is too large"), quote (bad_num)); -@@ -486,7 +568,7 @@ set_fields (const char *fieldstr) - fieldstr++; - } - else -- FATAL_ERROR (_("invalid byte or field list")); -+ FATAL_ERROR (_("invalid byte, character or field list")); - } - - max_range_endpoint = 0; -@@ -579,6 +661,63 @@ cut_bytes (FILE *stream) - } - } - -+#if HAVE_MBRTOWC -+/* This function is in use for the following case. -+ -+ 1. Read from the stream STREAM, printing to standard output any selected -+ characters. -+ -+ 2. Read from stream STREAM, printing to standard output any selected bytes, -+ without splitting multibyte characters. */ -+ -+static void -+cut_characters_or_cut_bytes_no_split (FILE *stream) -+{ -+ int idx; /* number of bytes or characters in the line so far. */ -+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ -+ char *bufpos; /* Next read position of BUF. */ -+ size_t buflen; /* The length of the byte sequence in buf. */ -+ wint_t wc; /* A gotten wide character. */ -+ size_t mblength; /* The byte size of a multibyte character which shows -+ as same character as WC. */ -+ mbstate_t state; /* State of the stream. */ -+ int convfail; /* 1, when conversion is failed. Otherwise 0. */ -+ -+ idx = 0; -+ buflen = 0; -+ bufpos = buf; -+ memset (&state, '\0', sizeof(mbstate_t)); -+ -+ while (1) -+ { -+ REFILL_BUFFER (buf, bufpos, buflen, stream); -+ -+ GET_NEXT_WC_FROM_BUFFER (wc, bufpos, buflen, mblength, state, convfail); -+ -+ if (wc == WEOF) -+ { -+ if (idx > 0) -+ putchar ('\n'); -+ break; -+ } -+ else if (wc == L'\n') -+ { -+ putchar ('\n'); -+ idx = 0; -+ } -+ else -+ { -+ idx += (operating_mode == byte_mode) ? mblength : 1; -+ if (print_kth (idx, NULL)) -+ fwrite (bufpos, mblength, sizeof(char), stdout); -+ } -+ -+ buflen -= mblength; -+ bufpos += mblength; -+ } -+} -+#endif -+ - /* Read from stream STREAM, printing to standard output any selected fields. */ - - static void -@@ -701,13 +840,192 @@ cut_fields (FILE *stream) - } - } - -+#if HAVE_MBRTOWC -+static void -+cut_fields_mb (FILE *stream) -+{ -+ int c; -+ unsigned int field_idx; -+ int found_any_selected_field; -+ int buffer_first_field; -+ int empty_input; -+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ -+ char *bufpos; /* Next read position of BUF. */ -+ size_t buflen; /* The length of the byte sequence in buf. */ -+ wint_t wc = 0; /* A gotten wide character. */ -+ size_t mblength; /* The byte size of a multibyte character which shows -+ as same character as WC. */ -+ mbstate_t state; /* State of the stream. */ -+ int convfail; /* 1, when conversion is failed. Otherwise 0. */ -+ -+ found_any_selected_field = 0; -+ field_idx = 1; -+ bufpos = buf; -+ buflen = 0; -+ memset (&state, '\0', sizeof(mbstate_t)); -+ -+ c = getc (stream); -+ empty_input = (c == EOF); -+ if (c != EOF) -+ ungetc (c, stream); -+ else -+ wc = WEOF; -+ -+ /* To support the semantics of the -s flag, we may have to buffer -+ all of the first field to determine whether it is `delimited.' -+ But that is unnecessary if all non-delimited lines must be printed -+ and the first field has been selected, or if non-delimited lines -+ must be suppressed and the first field has *not* been selected. -+ That is because a non-delimited line has exactly one field. */ -+ buffer_first_field = (suppress_non_delimited ^ !print_kth (1, NULL)); -+ -+ while (1) -+ { -+ if (field_idx == 1 && buffer_first_field) -+ { -+ int len = 0; -+ -+ while (1) -+ { -+ REFILL_BUFFER (buf, bufpos, buflen, stream); -+ -+ GET_NEXT_WC_FROM_BUFFER -+ (wc, bufpos, buflen, mblength, state, convfail); -+ -+ if (wc == WEOF) -+ break; -+ -+ field_1_buffer = xrealloc (field_1_buffer, len + mblength); -+ memcpy (field_1_buffer + len, bufpos, mblength); -+ len += mblength; -+ buflen -= mblength; -+ bufpos += mblength; -+ -+ if (!convfail && (wc == L'\n' || wc == wcdelim)) -+ break; -+ } -+ -+ if (wc == WEOF) -+ break; -+ -+ /* If the first field extends to the end of line (it is not -+ delimited) and we are printing all non-delimited lines, -+ print this one. */ -+ if (convfail || (!convfail && wc != wcdelim)) -+ { -+ if (suppress_non_delimited) -+ { -+ /* Empty. */ -+ } -+ else -+ { -+ fwrite (field_1_buffer, sizeof (char), len, stdout); -+ /* Make sure the output line is newline terminated. */ -+ if (convfail || (!convfail && wc != L'\n')) -+ putchar ('\n'); -+ } -+ continue; -+ } -+ -+ if (print_kth (1, NULL)) -+ { -+ /* Print the field, but not the trailing delimiter. */ -+ fwrite (field_1_buffer, sizeof (char), len - 1, stdout); -+ found_any_selected_field = 1; -+ } -+ ++field_idx; -+ } -+ -+ if (wc != WEOF) -+ { -+ if (print_kth (field_idx, NULL)) -+ { -+ if (found_any_selected_field) -+ { -+ fwrite (output_delimiter_string, sizeof (char), -+ output_delimiter_length, stdout); -+ } -+ found_any_selected_field = 1; -+ } -+ -+ while (1) -+ { -+ REFILL_BUFFER (buf, bufpos, buflen, stream); -+ -+ GET_NEXT_WC_FROM_BUFFER -+ (wc, bufpos, buflen, mblength, state, convfail); -+ -+ if (wc == WEOF) -+ break; -+ else if (!convfail && (wc == wcdelim || wc == L'\n')) -+ { -+ buflen -= mblength; -+ bufpos += mblength; -+ break; -+ } -+ -+ if (print_kth (field_idx, NULL)) -+ fwrite (bufpos, mblength, sizeof(char), stdout); -+ -+ buflen -= mblength; -+ bufpos += mblength; -+ } -+ } -+ -+ if ((!convfail || wc == L'\n') && buflen < 1) -+ wc = WEOF; -+ -+ if (!convfail && wc == wcdelim) -+ ++field_idx; -+ else if (wc == WEOF || (!convfail && wc == L'\n')) -+ { -+ if (found_any_selected_field -+ || (!empty_input && !(suppress_non_delimited && field_idx == 1))) -+ putchar ('\n'); -+ if (wc == WEOF) -+ break; -+ field_idx = 1; -+ found_any_selected_field = 0; -+ } -+ } -+} -+#endif -+ - static void - cut_stream (FILE *stream) - { -- if (operating_mode == byte_mode) -- cut_bytes (stream); -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode) -+ { -+ switch (operating_mode) -+ { -+ case byte_mode: -+ if (byte_mode_character_aware) -+ cut_characters_or_cut_bytes_no_split (stream); -+ else -+ cut_bytes (stream); -+ break; -+ -+ case character_mode: -+ cut_characters_or_cut_bytes_no_split (stream); -+ break; -+ -+ case field_mode: -+ cut_fields_mb (stream); -+ break; -+ -+ default: -+ abort (); -+ } -+ } - else -- cut_fields (stream); -+#endif -+ { -+ if (operating_mode == field_mode) -+ cut_fields (stream); -+ else -+ cut_bytes (stream); -+ } - } - - /* Process file FILE to standard output. -@@ -757,6 +1075,8 @@ main (int argc, char **argv) - bool ok; - bool delim_specified = false; - char *spec_list_string IF_LINT (= NULL); -+ char mbdelim[MB_LEN_MAX + 1]; -+ size_t delimlen = 0; - - initialize_main (&argc, &argv); - set_program_name (argv[0]); -@@ -779,7 +1099,6 @@ main (int argc, char **argv) - switch (optc) - { - case 'b': -- case 'c': - /* Build the byte list. */ - if (operating_mode != undefined_mode) - FATAL_ERROR (_("only one type of list may be specified")); -@@ -787,6 +1106,14 @@ main (int argc, char **argv) - spec_list_string = optarg; - break; - -+ case 'c': -+ /* Build the character list. */ -+ if (operating_mode != undefined_mode) -+ FATAL_ERROR (_("only one type of list may be specified")); -+ operating_mode = character_mode; -+ spec_list_string = optarg; -+ break; -+ - case 'f': - /* Build the field list. */ - if (operating_mode != undefined_mode) -@@ -798,10 +1125,35 @@ main (int argc, char **argv) - case 'd': - /* New delimiter. */ - /* Interpret -d '' to mean `use the NUL byte as the delimiter.' */ -- if (optarg[0] != '\0' && optarg[1] != '\0') -- FATAL_ERROR (_("the delimiter must be a single character")); -- delim = optarg[0]; -- delim_specified = true; -+ { -+#if HAVE_MBRTOWC -+ if(MB_CUR_MAX > 1) -+ { -+ mbstate_t state; -+ -+ memset (&state, '\0', sizeof(mbstate_t)); -+ delimlen = mbrtowc (&wcdelim, optarg, strnlen(optarg, MB_LEN_MAX), &state); -+ -+ if (delimlen == (size_t)-1 || delimlen == (size_t)-2) -+ ++force_singlebyte_mode; -+ else -+ { -+ delimlen = (delimlen < 1) ? 1 : delimlen; -+ if (wcdelim != L'\0' && *(optarg + delimlen) != '\0') -+ FATAL_ERROR (_("the delimiter must be a single character")); -+ memcpy (mbdelim, optarg, delimlen); -+ } -+ } -+ -+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode) -+#endif -+ { -+ if (optarg[0] != '\0' && optarg[1] != '\0') -+ FATAL_ERROR (_("the delimiter must be a single character")); -+ delim = (unsigned char) optarg[0]; -+ } -+ delim_specified = true; -+ } - break; - - case OUTPUT_DELIMITER_OPTION: -@@ -814,6 +1166,7 @@ main (int argc, char **argv) - break; - - case 'n': -+ byte_mode_character_aware = 1; - break; - - case 's': -@@ -836,7 +1189,7 @@ main (int argc, char **argv) - if (operating_mode == undefined_mode) - FATAL_ERROR (_("you must specify a list of bytes, characters, or fields")); - -- if (delim != '\0' && operating_mode != field_mode) -+ if (delim_specified && operating_mode != field_mode) - FATAL_ERROR (_("an input delimiter may be specified only\ - when operating on fields")); - -@@ -863,15 +1216,34 @@ main (int argc, char **argv) - } - - if (!delim_specified) -- delim = '\t'; -+ { -+ delim = '\t'; -+#ifdef HAVE_MBRTOWC -+ wcdelim = L'\t'; -+ mbdelim[0] = '\t'; -+ mbdelim[1] = '\0'; -+ delimlen = 1; -+#endif -+ } - - if (output_delimiter_string == NULL) - { -- static char dummy[2]; -- dummy[0] = delim; -- dummy[1] = '\0'; -- output_delimiter_string = dummy; -- output_delimiter_length = 1; -+#ifdef HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode) -+ { -+ output_delimiter_string = xstrdup(mbdelim); -+ output_delimiter_length = delimlen; -+ } -+ -+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode) -+#endif -+ { -+ static char dummy[2]; -+ dummy[0] = delim; -+ dummy[1] = '\0'; -+ output_delimiter_string = dummy; -+ output_delimiter_length = 1; -+ } - } - - if (optind == argc) -diff -urNp coreutils-8.5-orig/src/expand.c coreutils-8.5/src/expand.c ---- coreutils-8.5-orig/src/expand.c 2010-01-01 14:06:47.000000000 +0100 -+++ coreutils-8.5/src/expand.c 2010-04-26 14:24:33.000000000 +0200 -@@ -38,11 +38,28 @@ - #include <stdio.h> - #include <getopt.h> - #include <sys/types.h> -+ -+/* Get mbstate_t, mbrtowc(), wcwidth(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ - #include "system.h" - #include "error.h" - #include "quote.h" - #include "xstrndup.h" - -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+ installation; work around this configuration error. */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - /* The official name of this program (e.g., no `g' prefix). */ - #define PROGRAM_NAME "expand" - -@@ -358,6 +375,142 @@ expand (void) - } - } - -+#if HAVE_MBRTOWC -+static void -+expand_multibyte (void) -+{ -+ FILE *fp; /* Input strem. */ -+ mbstate_t i_state; /* Current shift state of the input stream. */ -+ mbstate_t i_state_bak; /* Back up the I_STATE. */ -+ mbstate_t o_state; /* Current shift state of the output stream. */ -+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ -+ char *bufpos; /* Next read position of BUF. */ -+ size_t buflen = 0; /* The length of the byte sequence in buf. */ -+ wchar_t wc; /* A gotten wide character. */ -+ size_t mblength; /* The byte size of a multibyte character -+ which shows as same character as WC. */ -+ int tab_index = 0; /* Index in `tab_list' of next tabstop. */ -+ int column = 0; /* Column on screen of the next char. */ -+ int next_tab_column; /* Column the next tab stop is on. */ -+ int convert = 1; /* If nonzero, perform translations. */ -+ -+ fp = next_file ((FILE *) NULL); -+ if (fp == NULL) -+ return; -+ -+ memset (&o_state, '\0', sizeof(mbstate_t)); -+ memset (&i_state, '\0', sizeof(mbstate_t)); -+ -+ for (;;) -+ { -+ /* Refill the buffer BUF. */ -+ if (buflen < MB_LEN_MAX && !feof(fp) && !ferror(fp)) -+ { -+ memmove (buf, bufpos, buflen); -+ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, fp); -+ bufpos = buf; -+ } -+ -+ /* No character is left in BUF. */ -+ if (buflen < 1) -+ { -+ fp = next_file (fp); -+ -+ if (fp == NULL) -+ break; /* No more files. */ -+ else -+ { -+ memset (&i_state, '\0', sizeof(mbstate_t)); -+ continue; -+ } -+ } -+ -+ /* Get a wide character. */ -+ i_state_bak = i_state; -+ mblength = mbrtowc (&wc, bufpos, buflen, &i_state); -+ -+ switch (mblength) -+ { -+ case (size_t)-1: /* illegal byte sequence. */ -+ case (size_t)-2: -+ mblength = 1; -+ i_state = i_state_bak; -+ if (convert) -+ { -+ ++column; -+ if (convert_entire_line == 0) -+ convert = 0; -+ } -+ putchar (*bufpos); -+ break; -+ -+ case 0: /* null. */ -+ mblength = 1; -+ if (convert && convert_entire_line == 0) -+ convert = 0; -+ putchar ('\0'); -+ break; -+ -+ default: -+ if (wc == L'\n') /* LF. */ -+ { -+ tab_index = 0; -+ column = 0; -+ convert = 1; -+ putchar ('\n'); -+ } -+ else if (wc == L'\t' && convert) /* Tab. */ -+ { -+ if (tab_size == 0) -+ { -+ /* Do not let tab_index == first_free_tab; -+ stop when it is 1 less. */ -+ while (tab_index < first_free_tab - 1 -+ && column >= tab_list[tab_index]) -+ tab_index++; -+ next_tab_column = tab_list[tab_index]; -+ if (tab_index < first_free_tab - 1) -+ tab_index++; -+ if (column >= next_tab_column) -+ next_tab_column = column + 1; -+ } -+ else -+ next_tab_column = column + tab_size - column % tab_size; -+ -+ while (column < next_tab_column) -+ { -+ putchar (' '); -+ ++column; -+ } -+ } -+ else /* Others. */ -+ { -+ if (convert) -+ { -+ if (wc == L'\b') -+ { -+ if (column > 0) -+ --column; -+ } -+ else -+ { -+ int width; /* The width of WC. */ -+ -+ width = wcwidth (wc); -+ column += (width > 0) ? width : 0; -+ if (convert_entire_line == 0) -+ convert = 0; -+ } -+ } -+ fwrite (bufpos, sizeof(char), mblength, stdout); -+ } -+ } -+ buflen -= mblength; -+ bufpos += mblength; -+ } -+} -+#endif -+ - int - main (int argc, char **argv) - { -@@ -422,7 +575,12 @@ main (int argc, char **argv) - - file_list = (optind < argc ? &argv[optind] : stdin_argv); - -- expand (); -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ expand_multibyte (); -+ else -+#endif -+ expand (); - - if (have_read_stdin && fclose (stdin) != 0) - error (EXIT_FAILURE, errno, "-"); -diff -urNp coreutils-8.5-orig/src/fold.c coreutils-8.5/src/fold.c ---- coreutils-8.5-orig/src/fold.c 2010-01-01 14:06:47.000000000 +0100 -+++ coreutils-8.5/src/fold.c 2010-04-26 14:24:33.000000000 +0200 -@@ -22,11 +22,33 @@ - #include <getopt.h> - #include <sys/types.h> - -+/* Get mbstate_t, mbrtowc(), wcwidth(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ -+/* Get iswprint(), iswblank(), wcwidth(). */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+ - #include "system.h" - #include "error.h" - #include "quote.h" - #include "xstrtol.h" - -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+ installation; work around this configuration error. */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# undef MB_LEN_MAX -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - #define TAB_WIDTH 8 - - /* The official name of this program (e.g., no `g' prefix). */ -@@ -34,20 +56,41 @@ - - #define AUTHORS proper_name ("David MacKenzie") - -+#define FATAL_ERROR(Message) \ -+ do \ -+ { \ -+ error (0, 0, (Message)); \ -+ usage (2); \ -+ } \ -+ while (0) -+ -+enum operating_mode -+{ -+ /* Fold texts by columns that are at the given positions. */ -+ column_mode, -+ -+ /* Fold texts by bytes that are at the given positions. */ -+ byte_mode, -+ -+ /* Fold texts by characters that are at the given positions. */ -+ character_mode, -+}; -+ -+/* The argument shows current mode. (Default: column_mode) */ -+static enum operating_mode operating_mode; -+ - /* If nonzero, try to break on whitespace. */ - static bool break_spaces; - --/* If nonzero, count bytes, not column positions. */ --static bool count_bytes; -- - /* If nonzero, at least one of the files we read was standard input. */ - static bool have_read_stdin; - --static char const shortopts[] = "bsw:0::1::2::3::4::5::6::7::8::9::"; -+static char const shortopts[] = "bcsw:0::1::2::3::4::5::6::7::8::9::"; - - static struct option const longopts[] = - { - {"bytes", no_argument, NULL, 'b'}, -+ {"characters", no_argument, NULL, 'c'}, - {"spaces", no_argument, NULL, 's'}, - {"width", required_argument, NULL, 'w'}, - {GETOPT_HELP_OPTION_DECL}, -@@ -77,6 +120,7 @@ Mandatory arguments to long options are - "), stdout); - fputs (_("\ - -b, --bytes count bytes rather than columns\n\ -+ -c, --characters count characters rather than columns\n\ - -s, --spaces break at spaces\n\ - -w, --width=WIDTH use WIDTH columns instead of 80\n\ - "), stdout); -@@ -94,7 +138,7 @@ Mandatory arguments to long options are - static size_t - adjust_column (size_t column, char c) - { -- if (!count_bytes) -+ if (operating_mode != byte_mode) - { - if (c == '\b') - { -@@ -117,30 +161,14 @@ adjust_column (size_t column, char c) - to stdout, with maximum line length WIDTH. - Return true if successful. */ - --static bool --fold_file (char const *filename, size_t width) -+static void -+fold_text (FILE *istream, size_t width, int *saved_errno) - { -- FILE *istream; - int c; - size_t column = 0; /* Screen column where next char will go. */ - size_t offset_out = 0; /* Index in `line_out' for next char. */ - static char *line_out = NULL; - static size_t allocated_out = 0; -- int saved_errno; -- -- if (STREQ (filename, "-")) -- { -- istream = stdin; -- have_read_stdin = true; -- } -- else -- istream = fopen (filename, "r"); -- -- if (istream == NULL) -- { -- error (0, errno, "%s", filename); -- return false; -- } - - while ((c = getc (istream)) != EOF) - { -@@ -168,6 +196,15 @@ fold_file (char const *filename, size_t - bool found_blank = false; - size_t logical_end = offset_out; - -+ /* If LINE_OUT has no wide character, -+ put a new wide character in LINE_OUT -+ if column is bigger than width. */ -+ if (offset_out == 0) -+ { -+ line_out[offset_out++] = c; -+ continue; -+ } -+ - /* Look for the last blank. */ - while (logical_end) - { -@@ -214,11 +251,222 @@ fold_file (char const *filename, size_t - line_out[offset_out++] = c; - } - -- saved_errno = errno; -+ *saved_errno = errno; - - if (offset_out) - fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); - -+} -+ -+#if HAVE_MBRTOWC -+static void -+fold_multibyte_text (FILE *istream, size_t width, int *saved_errno) -+{ -+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ -+ size_t buflen = 0; /* The length of the byte sequence in buf. */ -+ char *bufpos = NULL; /* Next read position of BUF. */ -+ wint_t wc; /* A gotten wide character. */ -+ size_t mblength; /* The byte size of a multibyte character which shows -+ as same character as WC. */ -+ mbstate_t state, state_bak; /* State of the stream. */ -+ int convfail; /* 1, when conversion is failed. Otherwise 0. */ -+ -+ static char *line_out = NULL; -+ size_t offset_out = 0; /* Index in `line_out' for next char. */ -+ static size_t allocated_out = 0; -+ -+ int increment; -+ size_t column = 0; -+ -+ size_t last_blank_pos; -+ size_t last_blank_column; -+ int is_blank_seen; -+ int last_blank_increment = 0; -+ int is_bs_following_last_blank; -+ size_t bs_following_last_blank_num; -+ int is_cr_after_last_blank; -+ -+#define CLEAR_FLAGS \ -+ do \ -+ { \ -+ last_blank_pos = 0; \ -+ last_blank_column = 0; \ -+ is_blank_seen = 0; \ -+ is_bs_following_last_blank = 0; \ -+ bs_following_last_blank_num = 0; \ -+ is_cr_after_last_blank = 0; \ -+ } \ -+ while (0) -+ -+#define START_NEW_LINE \ -+ do \ -+ { \ -+ putchar ('\n'); \ -+ column = 0; \ -+ offset_out = 0; \ -+ CLEAR_FLAGS; \ -+ } \ -+ while (0) -+ -+ CLEAR_FLAGS; -+ memset (&state, '\0', sizeof(mbstate_t)); -+ -+ for (;; bufpos += mblength, buflen -= mblength) -+ { -+ if (buflen < MB_LEN_MAX && !feof (istream) && !ferror (istream)) -+ { -+ memmove (buf, bufpos, buflen); -+ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, istream); -+ bufpos = buf; -+ } -+ -+ if (buflen < 1) -+ break; -+ -+ /* Get a wide character. */ -+ convfail = 0; -+ state_bak = state; -+ mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &state); -+ -+ switch (mblength) -+ { -+ case (size_t)-1: -+ case (size_t)-2: -+ convfail++; -+ state = state_bak; -+ /* Fall through. */ -+ -+ case 0: -+ mblength = 1; -+ break; -+ } -+ -+rescan: -+ if (operating_mode == byte_mode) /* byte mode */ -+ increment = mblength; -+ else if (operating_mode == character_mode) /* character mode */ -+ increment = 1; -+ else /* column mode */ -+ { -+ if (convfail) -+ increment = 1; -+ else -+ { -+ switch (wc) -+ { -+ case L'\n': -+ fwrite (line_out, sizeof(char), offset_out, stdout); -+ START_NEW_LINE; -+ continue; -+ -+ case L'\b': -+ increment = (column > 0) ? -1 : 0; -+ break; -+ -+ case L'\r': -+ increment = -1 * column; -+ break; -+ -+ case L'\t': -+ increment = 8 - column % 8; -+ break; -+ -+ default: -+ increment = wcwidth (wc); -+ increment = (increment < 0) ? 0 : increment; -+ } -+ } -+ } -+ -+ if (column + increment > width && break_spaces && last_blank_pos) -+ { -+ fwrite (line_out, sizeof(char), last_blank_pos, stdout); -+ putchar ('\n'); -+ -+ offset_out = offset_out - last_blank_pos; -+ column = column - last_blank_column + ((is_cr_after_last_blank) -+ ? last_blank_increment : bs_following_last_blank_num); -+ memmove (line_out, line_out + last_blank_pos, offset_out); -+ CLEAR_FLAGS; -+ goto rescan; -+ } -+ -+ if (column + increment > width && column != 0) -+ { -+ fwrite (line_out, sizeof(char), offset_out, stdout); -+ START_NEW_LINE; -+ goto rescan; -+ } -+ -+ if (allocated_out < offset_out + mblength) -+ { -+ line_out = X2REALLOC (line_out, &allocated_out); -+ } -+ -+ memcpy (line_out + offset_out, bufpos, mblength); -+ offset_out += mblength; -+ column += increment; -+ -+ if (is_blank_seen && !convfail && wc == L'\r') -+ is_cr_after_last_blank = 1; -+ -+ if (is_bs_following_last_blank && !convfail && wc == L'\b') -+ ++bs_following_last_blank_num; -+ else -+ is_bs_following_last_blank = 0; -+ -+ if (break_spaces && !convfail && iswblank (wc)) -+ { -+ last_blank_pos = offset_out; -+ last_blank_column = column; -+ is_blank_seen = 1; -+ last_blank_increment = increment; -+ is_bs_following_last_blank = 1; -+ bs_following_last_blank_num = 0; -+ is_cr_after_last_blank = 0; -+ } -+ } -+ -+ *saved_errno = errno; -+ -+ if (offset_out) -+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); -+ -+} -+#endif -+ -+/* Fold file FILENAME, or standard input if FILENAME is "-", -+ to stdout, with maximum line length WIDTH. -+ Return 0 if successful, 1 if an error occurs. */ -+ -+static bool -+fold_file (char *filename, size_t width) -+{ -+ FILE *istream; -+ int saved_errno; -+ -+ if (STREQ (filename, "-")) -+ { -+ istream = stdin; -+ have_read_stdin = 1; -+ } -+ else -+ istream = fopen (filename, "r"); -+ -+ if (istream == NULL) -+ { -+ error (0, errno, "%s", filename); -+ return 1; -+ } -+ -+ /* Define how ISTREAM is being folded. */ -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ fold_multibyte_text (istream, width, &saved_errno); -+ else -+#endif -+ fold_text (istream, width, &saved_errno); -+ - if (ferror (istream)) - { - error (0, saved_errno, "%s", filename); -@@ -251,7 +499,8 @@ main (int argc, char **argv) - - atexit (close_stdout); - -- break_spaces = count_bytes = have_read_stdin = false; -+ operating_mode = column_mode; -+ break_spaces = have_read_stdin = false; - - while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) - { -@@ -260,7 +509,15 @@ main (int argc, char **argv) - switch (optc) - { - case 'b': /* Count bytes rather than columns. */ -- count_bytes = true; -+ if (operating_mode != column_mode) -+ FATAL_ERROR (_("only one way of folding may be specified")); -+ operating_mode = byte_mode; -+ break; -+ -+ case 'c': -+ if (operating_mode != column_mode) -+ FATAL_ERROR (_("only one way of folding may be specified")); -+ operating_mode = character_mode; - break; - - case 's': /* Break at word boundaries. */ -diff -urNp coreutils-8.5-orig/src/join.c coreutils-8.5/src/join.c ---- coreutils-8.5-orig/src/join.c 2010-04-20 21:52:04.000000000 +0200 -+++ coreutils-8.5/src/join.c 2010-04-26 14:24:33.000000000 +0200 -@@ -22,17 +22,31 @@ - #include <sys/types.h> - #include <getopt.h> - -+/* Get mbstate_t, mbrtowc(), mbrtowc(), wcwidth(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ -+/* Get iswblank(), towupper. */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+ - #include "system.h" - #include "error.h" - #include "hard-locale.h" - #include "linebuffer.h" --#include "memcasecmp.h" - #include "quote.h" - #include "stdio--.h" - #include "xmemcoll.h" - #include "xstrtol.h" - #include "argmatch.h" - -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - /* The official name of this program (e.g., no `g' prefix). */ - #define PROGRAM_NAME "join" - -@@ -121,10 +135,12 @@ static struct outlist outlist_head; - /* Last element in `outlist', where a new element can be added. */ - static struct outlist *outlist_end = &outlist_head; - --/* Tab character separating fields. If negative, fields are separated -- by any nonempty string of blanks, otherwise by exactly one -- tab character whose value (when cast to unsigned char) equals TAB. */ --static int tab = -1; -+/* Tab character separating fields. If NULL, fields are separated -+ by any nonempty string of blanks. */ -+static char *tab = NULL; -+ -+/* The number of bytes used for tab. */ -+static size_t tablen = 0; - - /* If nonzero, check that the input is correctly ordered. */ - static enum -@@ -248,10 +264,11 @@ xfields (struct line *line) - if (ptr == lim) - return; - -- if (0 <= tab) -+ if (tab != NULL) - { -+ unsigned char t = tab[0]; - char *sep; -- for (; (sep = memchr (ptr, tab, lim - ptr)) != NULL; ptr = sep + 1) -+ for (; (sep = memchr (ptr, t, lim - ptr)) != NULL; ptr = sep + 1) - extract_field (line, ptr, sep - ptr); - } - else -@@ -278,6 +295,148 @@ xfields (struct line *line) - extract_field (line, ptr, lim - ptr); - } - -+#if HAVE_MBRTOWC -+static void -+xfields_multibyte (struct line *line) -+{ -+ char *ptr = line->buf.buffer; -+ char const *lim = ptr + line->buf.length - 1; -+ wchar_t wc = 0; -+ size_t mblength = 1; -+ mbstate_t state, state_bak; -+ -+ memset (&state, 0, sizeof (mbstate_t)); -+ -+ if (ptr >= lim) -+ return; -+ -+ if (tab != NULL) -+ { -+ unsigned char t = tab[0]; -+ char *sep = ptr; -+ for (; ptr < lim; ptr = sep + mblength) -+ { -+ sep = ptr; -+ while (sep < lim) -+ { -+ state_bak = state; -+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state); -+ -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ mblength = 1; -+ state = state_bak; -+ } -+ mblength = (mblength < 1) ? 1 : mblength; -+ -+ if (mblength == tablen && !memcmp (sep, tab, mblength)) -+ break; -+ else -+ { -+ sep += mblength; -+ continue; -+ } -+ } -+ -+ if (sep >= lim) -+ break; -+ -+ extract_field (line, ptr, sep - ptr); -+ } -+ } -+ else -+ { -+ /* Skip leading blanks before the first field. */ -+ while(ptr < lim) -+ { -+ state_bak = state; -+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state); -+ -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ mblength = 1; -+ state = state_bak; -+ break; -+ } -+ mblength = (mblength < 1) ? 1 : mblength; -+ -+ if (!iswblank(wc)) -+ break; -+ ptr += mblength; -+ } -+ -+ do -+ { -+ char *sep; -+ state_bak = state; -+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state); -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ mblength = 1; -+ state = state_bak; -+ break; -+ } -+ mblength = (mblength < 1) ? 1 : mblength; -+ -+ sep = ptr + mblength; -+ while (sep < lim) -+ { -+ state_bak = state; -+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state); -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ mblength = 1; -+ state = state_bak; -+ break; -+ } -+ mblength = (mblength < 1) ? 1 : mblength; -+ -+ if (iswblank (wc)) -+ break; -+ -+ sep += mblength; -+ } -+ -+ extract_field (line, ptr, sep - ptr); -+ if (sep >= lim) -+ return; -+ -+ state_bak = state; -+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state); -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ mblength = 1; -+ state = state_bak; -+ break; -+ } -+ mblength = (mblength < 1) ? 1 : mblength; -+ -+ ptr = sep + mblength; -+ while (ptr < lim) -+ { -+ state_bak = state; -+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state); -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ mblength = 1; -+ state = state_bak; -+ break; -+ } -+ mblength = (mblength < 1) ? 1 : mblength; -+ -+ if (!iswblank (wc)) -+ break; -+ -+ ptr += mblength; -+ } -+ } -+ while (ptr < lim); -+ } -+ -+ extract_field (line, ptr, lim - ptr); -+} -+#endif -+ - static void - freeline (struct line *line) - { -@@ -299,56 +458,115 @@ keycmp (struct line const *line1, struct - size_t jf_1, size_t jf_2) - { - /* Start of field to compare in each file. */ -- char *beg1; -- char *beg2; -- -- size_t len1; -- size_t len2; /* Length of fields to compare. */ -+ char *beg[2]; -+ char *copy[2]; -+ size_t len[2]; /* Length of fields to compare. */ - int diff; -+ int i, j; - - if (jf_1 < line1->nfields) - { -- beg1 = line1->fields[jf_1].beg; -- len1 = line1->fields[jf_1].len; -+ beg[0] = line1->fields[jf_1].beg; -+ len[0] = line1->fields[jf_1].len; - } - else - { -- beg1 = NULL; -- len1 = 0; -+ beg[0] = NULL; -+ len[0] = 0; - } - - if (jf_2 < line2->nfields) - { -- beg2 = line2->fields[jf_2].beg; -- len2 = line2->fields[jf_2].len; -+ beg[1] = line2->fields[jf_2].beg; -+ len[1] = line2->fields[jf_2].len; - } - else - { -- beg2 = NULL; -- len2 = 0; -+ beg[1] = NULL; -+ len[1] = 0; - } - -- if (len1 == 0) -- return len2 == 0 ? 0 : -1; -- if (len2 == 0) -+ if (len[0] == 0) -+ return len[1] == 0 ? 0 : -1; -+ if (len[1] == 0) - return 1; - - if (ignore_case) - { -- /* FIXME: ignore_case does not work with NLS (in particular, -- with multibyte chars). */ -- diff = memcasecmp (beg1, beg2, MIN (len1, len2)); -+#ifdef HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ size_t mblength; -+ wchar_t wc, uwc; -+ mbstate_t state, state_bak; -+ -+ memset (&state, '\0', sizeof (mbstate_t)); -+ -+ for (i = 0; i < 2; i++) -+ { -+ copy[i] = alloca (len[i] + 1); -+ -+ for (j = 0; j < MIN (len[0], len[1]);) -+ { -+ state_bak = state; -+ mblength = mbrtowc (&wc, beg[i] + j, len[i] - j, &state); -+ -+ switch (mblength) -+ { -+ case (size_t) -1: -+ case (size_t) -2: -+ state = state_bak; -+ /* Fall through */ -+ case 0: -+ mblength = 1; -+ break; -+ -+ default: -+ uwc = towupper (wc); -+ -+ if (uwc != wc) -+ { -+ mbstate_t state_wc; -+ -+ memset (&state_wc, '\0', sizeof (mbstate_t)); -+ wcrtomb (copy[i] + j, uwc, &state_wc); -+ } -+ else -+ memcpy (copy[i] + j, beg[i] + j, mblength); -+ } -+ j += mblength; -+ } -+ copy[i][j] = '\0'; -+ } -+ } -+ else -+#endif -+ { -+ for (i = 0; i < 2; i++) -+ { -+ copy[i] = alloca (len[i] + 1); -+ -+ for (j = 0; j < MIN (len[0], len[1]); j++) -+ copy[i][j] = toupper (beg[i][j]); -+ -+ copy[i][j] = '\0'; -+ } -+ } - } - else - { -- if (hard_LC_COLLATE) -- return xmemcoll (beg1, len1, beg2, len2); -- diff = memcmp (beg1, beg2, MIN (len1, len2)); -+ copy[0] = (unsigned char *) beg[0]; -+ copy[1] = (unsigned char *) beg[1]; - } - -+ if (hard_LC_COLLATE) -+ return xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]); -+ diff = memcmp (copy[0], copy[1], MIN (len[0], len[1])); -+ -+ - if (diff) - return diff; -- return len1 < len2 ? -1 : len1 != len2; -+ return len[0] - len[1]; - } - - /* Check that successive input lines PREV and CURRENT from input file -@@ -429,6 +647,11 @@ get_line (FILE *fp, struct line **linep, - return false; - } - -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ xfields_multibyte (line); -+ else -+#endif - xfields (line); - - if (prevline[which - 1]) -@@ -528,11 +751,18 @@ prfield (size_t n, struct line const *li - - /* Print the join of LINE1 and LINE2. */ - -+#define PUT_TAB_CHAR \ -+ do \ -+ { \ -+ (tab != NULL) ? \ -+ fwrite(tab, sizeof(char), tablen, stdout) : putchar (' '); \ -+ } \ -+ while (0) -+ - static void - prjoin (struct line const *line1, struct line const *line2) - { - const struct outlist *outlist; -- char output_separator = tab < 0 ? ' ' : tab; - - outlist = outlist_head.next; - if (outlist) -@@ -567,7 +797,7 @@ prjoin (struct line const *line1, struct - o = o->next; - if (o == NULL) - break; -- putchar (output_separator); -+ PUT_TAB_CHAR; - } - putchar ('\n'); - } -@@ -585,23 +815,23 @@ prjoin (struct line const *line1, struct - prfield (join_field_1, line1); - for (i = 0; i < join_field_1 && i < line1->nfields; ++i) - { -- putchar (output_separator); -+ PUT_TAB_CHAR; - prfield (i, line1); - } - for (i = join_field_1 + 1; i < line1->nfields; ++i) - { -- putchar (output_separator); -+ PUT_TAB_CHAR; - prfield (i, line1); - } - - for (i = 0; i < join_field_2 && i < line2->nfields; ++i) - { -- putchar (output_separator); -+ PUT_TAB_CHAR; - prfield (i, line2); - } - for (i = join_field_2 + 1; i < line2->nfields; ++i) - { -- putchar (output_separator); -+ PUT_TAB_CHAR; - prfield (i, line2); - } - putchar ('\n'); -@@ -1039,21 +1269,46 @@ main (int argc, char **argv) - - case 't': - { -- unsigned char newtab = optarg[0]; -+ char *newtab; -+ size_t newtablen; -+ newtab = xstrdup (optarg); -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ mbstate_t state; -+ -+ memset (&state, 0, sizeof (mbstate_t)); -+ newtablen = mbrtowc (NULL, newtab, -+ strnlen (newtab, MB_LEN_MAX), -+ &state); -+ if (newtablen == (size_t) 0 -+ || newtablen == (size_t) -1 -+ || newtablen == (size_t) -2) -+ newtablen = 1; -+ } -+ else -+#endif -+ newtablen = 1; - if (! newtab) -+ { - newtab = '\n'; /* '' => process the whole line. */ -+ } - else if (optarg[1]) - { -- if (STREQ (optarg, "\0")) -- newtab = '\0'; -- else -- error (EXIT_FAILURE, 0, _("multi-character tab %s"), -- quote (optarg)); -+ if (newtablen == 1 && newtab[1]) -+ { -+ if (STREQ (newtab, "\0")) -+ newtab[0] = '\0'; -+ } -+ } -+ if (tab != NULL && strcmp (tab, newtab)) -+ { -+ free (newtab); -+ error (EXIT_FAILURE, 0, _("incompatible tabs")); - } -- if (0 <= tab && tab != newtab) -- error (EXIT_FAILURE, 0, _("incompatible tabs")); - tab = newtab; -- } -+ tablen = newtablen; -+ } - break; - - case NOCHECK_ORDER_OPTION: -diff -urNp coreutils-8.5-orig/src/pr.c coreutils-8.5/src/pr.c ---- coreutils-8.5-orig/src/pr.c 2010-03-13 16:14:09.000000000 +0100 -+++ coreutils-8.5/src/pr.c 2010-04-26 14:24:33.000000000 +0200 -@@ -312,6 +312,32 @@ - - #include <getopt.h> - #include <sys/types.h> -+ -+/* Get MB_LEN_MAX. */ -+#include <limits.h> -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+ installation; work around this configuration error. */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX == 1 -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Get MB_CUR_MAX. */ -+#include <stdlib.h> -+ -+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ -+/* Get mbstate_t, mbrtowc(), wcwidth(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ -+/* Get iswprint(). -- for wcwidth(). */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+#if !defined iswprint && !HAVE_ISWPRINT -+# define iswprint(wc) 1 -+#endif -+ - #include "system.h" - #include "error.h" - #include "hard-locale.h" -@@ -322,6 +348,18 @@ - #include "strftime.h" - #include "xstrtol.h" - -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ -+#ifndef HAVE_DECL_WCWIDTH -+"this configure-time declaration test was not run" -+#endif -+#if !HAVE_DECL_WCWIDTH -+extern int wcwidth (); -+#endif -+ - /* The official name of this program (e.g., no `g' prefix). */ - #define PROGRAM_NAME "pr" - -@@ -414,7 +452,20 @@ struct COLUMN - - typedef struct COLUMN COLUMN; - --static int char_to_clump (char c); -+/* Funtion pointers to switch functions for single byte locale or for -+ multibyte locale. If multibyte functions do not exist in your sysytem, -+ these pointers always point the function for single byte locale. */ -+static void (*print_char) (char c); -+static int (*char_to_clump) (char c); -+ -+/* Functions for single byte locale. */ -+static void print_char_single (char c); -+static int char_to_clump_single (char c); -+ -+/* Functions for multibyte locale. */ -+static void print_char_multi (char c); -+static int char_to_clump_multi (char c); -+ - static bool read_line (COLUMN *p); - static bool print_page (void); - static bool print_stored (COLUMN *p); -@@ -424,6 +475,7 @@ static void print_header (void); - static void pad_across_to (int position); - static void add_line_number (COLUMN *p); - static void getoptarg (char *arg, char switch_char, char *character, -+ int *character_length, int *character_width, - int *number); - void usage (int status); - static void print_files (int number_of_files, char **av); -@@ -438,7 +490,6 @@ static void store_char (char c); - static void pad_down (int lines); - static void read_rest_of_line (COLUMN *p); - static void skip_read (COLUMN *p, int column_number); --static void print_char (char c); - static void cleanup (void); - static void print_sep_string (void); - static void separator_string (const char *optarg_S); -@@ -450,7 +501,7 @@ static COLUMN *column_vector; - we store the leftmost columns contiguously in buff. - To print a line from buff, get the index of the first character - from line_vector[i], and print up to line_vector[i + 1]. */ --static char *buff; -+static unsigned char *buff; - - /* Index of the position in buff where the next character - will be stored. */ -@@ -554,7 +605,7 @@ static int chars_per_column; - static bool untabify_input = false; - - /* (-e) The input tab character. */ --static char input_tab_char = '\t'; -+static char input_tab_char[MB_LEN_MAX] = "\t"; - - /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ... - where the leftmost column is 1. */ -@@ -564,7 +615,10 @@ static int chars_per_input_tab = 8; - static bool tabify_output = false; - - /* (-i) The output tab character. */ --static char output_tab_char = '\t'; -+static char output_tab_char[MB_LEN_MAX] = "\t"; -+ -+/* (-i) The byte length of output tab character. */ -+static int output_tab_char_length = 1; - - /* (-i) The width of the output tab. */ - static int chars_per_output_tab = 8; -@@ -638,7 +692,13 @@ static int power_10; - static bool numbered_lines = false; - - /* (-n) Character which follows each line number. */ --static char number_separator = '\t'; -+static char number_separator[MB_LEN_MAX] = "\t"; -+ -+/* (-n) The byte length of the character which follows each line number. */ -+static int number_separator_length = 1; -+ -+/* (-n) The character width of the character which follows each line number. */ -+static int number_separator_width = 0; - - /* (-n) line counting starts with 1st line of input file (not with 1st - line of 1st page printed). */ -@@ -691,6 +751,7 @@ static bool use_col_separator = false; - -a|COLUMN|-m is a `space' and with the -J option a `tab'. */ - static char *col_sep_string = (char *) ""; - static int col_sep_length = 0; -+static int col_sep_width = 0; - static char *column_separator = (char *) " "; - static char *line_separator = (char *) "\t"; - -@@ -847,6 +908,13 @@ separator_string (const char *optarg_S) - col_sep_length = (int) strlen (optarg_S); - col_sep_string = xmalloc (col_sep_length + 1); - strcpy (col_sep_string, optarg_S); -+ -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ col_sep_width = mbswidth (col_sep_string, 0); -+ else -+#endif -+ col_sep_width = col_sep_length; - } - - int -@@ -871,6 +939,21 @@ main (int argc, char **argv) - - atexit (close_stdout); - -+/* Define which functions are used, the ones for single byte locale or the ones -+ for multibyte locale. */ -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ print_char = print_char_multi; -+ char_to_clump = char_to_clump_multi; -+ } -+ else -+#endif -+ { -+ print_char = print_char_single; -+ char_to_clump = char_to_clump_single; -+ } -+ - n_files = 0; - file_names = (argc > 1 - ? xmalloc ((argc - 1) * sizeof (char *)) -@@ -947,8 +1030,12 @@ main (int argc, char **argv) - break; - case 'e': - if (optarg) -- getoptarg (optarg, 'e', &input_tab_char, -- &chars_per_input_tab); -+ { -+ int dummy_length, dummy_width; -+ -+ getoptarg (optarg, 'e', input_tab_char, &dummy_length, -+ &dummy_width, &chars_per_input_tab); -+ } - /* Could check tab width > 0. */ - untabify_input = true; - break; -@@ -961,8 +1048,12 @@ main (int argc, char **argv) - break; - case 'i': - if (optarg) -- getoptarg (optarg, 'i', &output_tab_char, -- &chars_per_output_tab); -+ { -+ int dummy_width; -+ -+ getoptarg (optarg, 'i', output_tab_char, &output_tab_char_length, -+ &dummy_width, &chars_per_output_tab); -+ } - /* Could check tab width > 0. */ - tabify_output = true; - break; -@@ -989,8 +1080,8 @@ main (int argc, char **argv) - case 'n': - numbered_lines = true; - if (optarg) -- getoptarg (optarg, 'n', &number_separator, -- &chars_per_number); -+ getoptarg (optarg, 'n', number_separator, &number_separator_length, -+ &number_separator_width, &chars_per_number); - break; - case 'N': - skip_count = false; -@@ -1029,7 +1120,7 @@ main (int argc, char **argv) - old_s = false; - /* Reset an additional input of -s, -S dominates -s */ - col_sep_string = bad_cast (""); -- col_sep_length = 0; -+ col_sep_length = col_sep_width = 0; - use_col_separator = true; - if (optarg) - separator_string (optarg); -@@ -1186,10 +1277,45 @@ main (int argc, char **argv) - a number. */ - - static void --getoptarg (char *arg, char switch_char, char *character, int *number) -+getoptarg (char *arg, char switch_char, char *character, int *character_length, -+ int *character_width, int *number) - { - if (!ISDIGIT (*arg)) -- *character = *arg++; -+ { -+#ifdef HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) /* for multibyte locale. */ -+ { -+ wchar_t wc; -+ size_t mblength; -+ int width; -+ mbstate_t state = {'\0'}; -+ -+ mblength = mbrtowc (&wc, arg, strnlen(arg, MB_LEN_MAX), &state); -+ -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ *character_length = 1; -+ *character_width = 1; -+ } -+ else -+ { -+ *character_length = (mblength < 1) ? 1 : mblength; -+ width = wcwidth (wc); -+ *character_width = (width < 0) ? 0 : width; -+ } -+ -+ strncpy (character, arg, *character_length); -+ arg += *character_length; -+ } -+ else /* for single byte locale. */ -+#endif -+ { -+ *character = *arg++; -+ *character_length = 1; -+ *character_width = 1; -+ } -+ } -+ - if (*arg) - { - long int tmp_long; -@@ -1248,7 +1374,7 @@ init_parameters (int number_of_files) - else - col_sep_string = column_separator; - -- col_sep_length = 1; -+ col_sep_length = col_sep_width = 1; - use_col_separator = true; - } - /* It's rather pointless to define a TAB separator with column -@@ -1279,11 +1405,11 @@ init_parameters (int number_of_files) - TAB_WIDTH (chars_per_input_tab, chars_per_number); */ - - /* Estimate chars_per_text without any margin and keep it constant. */ -- if (number_separator == '\t') -+ if (number_separator[0] == '\t') - number_width = chars_per_number + - TAB_WIDTH (chars_per_default_tab, chars_per_number); - else -- number_width = chars_per_number + 1; -+ number_width = chars_per_number + number_separator_width; - - /* The number is part of the column width unless we are - printing files in parallel. */ -@@ -1298,7 +1424,7 @@ init_parameters (int number_of_files) - } - - chars_per_column = (chars_per_line - chars_used_by_number - -- (columns - 1) * col_sep_length) / columns; -+ (columns - 1) * col_sep_width) / columns; - - if (chars_per_column < 1) - error (EXIT_FAILURE, 0, _("page width too narrow")); -@@ -1423,7 +1549,7 @@ init_funcs (void) - - /* Enlarge p->start_position of first column to use the same form of - padding_not_printed with all columns. */ -- h = h + col_sep_length; -+ h = h + col_sep_width; - - /* This loop takes care of all but the rightmost column. */ - -@@ -1457,7 +1583,7 @@ init_funcs (void) - } - else - { -- h = h_next + col_sep_length; -+ h = h_next + col_sep_width; - h_next = h + chars_per_column; - } - } -@@ -1747,9 +1873,9 @@ static void - align_column (COLUMN *p) - { - padding_not_printed = p->start_position; -- if (padding_not_printed - col_sep_length > 0) -+ if (padding_not_printed - col_sep_width > 0) - { -- pad_across_to (padding_not_printed - col_sep_length); -+ pad_across_to (padding_not_printed - col_sep_width); - padding_not_printed = ANYWHERE; - } - -@@ -2020,13 +2146,13 @@ store_char (char c) - /* May be too generous. */ - buff = X2REALLOC (buff, &buff_allocated); - } -- buff[buff_current++] = c; -+ buff[buff_current++] = (unsigned char) c; - } - - static void - add_line_number (COLUMN *p) - { -- int i; -+ int i, j; - char *s; - int left_cut; - -@@ -2049,22 +2175,24 @@ add_line_number (COLUMN *p) - /* Tabification is assumed for multiple columns, also for n-separators, - but `default n-separator = TAB' hasn't been given priority over - equal column_width also specified by POSIX. */ -- if (number_separator == '\t') -+ if (number_separator[0] == '\t') - { - i = number_width - chars_per_number; - while (i-- > 0) - (p->char_func) (' '); - } - else -- (p->char_func) (number_separator); -+ for (j = 0; j < number_separator_length; j++) -+ (p->char_func) (number_separator[j]); - } - else - /* To comply with POSIX, we avoid any expansion of default TAB - separator with a single column output. No column_width requirement - has to be considered. */ - { -- (p->char_func) (number_separator); -- if (number_separator == '\t') -+ for (j = 0; j < number_separator_length; j++) -+ (p->char_func) (number_separator[j]); -+ if (number_separator[0] == '\t') - output_position = POS_AFTER_TAB (chars_per_output_tab, - output_position); - } -@@ -2225,7 +2353,7 @@ print_white_space (void) - while (goal - h_old > 1 - && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) - { -- putchar (output_tab_char); -+ fwrite (output_tab_char, sizeof(char), output_tab_char_length, stdout); - h_old = h_new; - } - while (++h_old <= goal) -@@ -2245,6 +2373,7 @@ print_sep_string (void) - { - char *s; - int l = col_sep_length; -+ int not_space_flag; - - s = col_sep_string; - -@@ -2258,6 +2387,7 @@ print_sep_string (void) - { - for (; separators_not_printed > 0; --separators_not_printed) - { -+ not_space_flag = 0; - while (l-- > 0) - { - /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2271,12 +2401,15 @@ print_sep_string (void) - } - else - { -+ not_space_flag = 1; - if (spaces_not_printed > 0) - print_white_space (); - putchar (*s++); -- ++output_position; - } - } -+ if (not_space_flag) -+ output_position += col_sep_width; -+ - /* sep_string ends with some spaces */ - if (spaces_not_printed > 0) - print_white_space (); -@@ -2304,7 +2437,7 @@ print_clump (COLUMN *p, int n, char *clu - required number of tabs and spaces. */ - - static void --print_char (char c) -+print_char_single (char c) - { - if (tabify_output) - { -@@ -2328,6 +2461,74 @@ print_char (char c) - putchar (c); - } - -+#ifdef HAVE_MBRTOWC -+static void -+print_char_multi (char c) -+{ -+ static size_t mbc_pos = 0; -+ static char mbc[MB_LEN_MAX] = {'\0'}; -+ static mbstate_t state = {'\0'}; -+ mbstate_t state_bak; -+ wchar_t wc; -+ size_t mblength; -+ int width; -+ -+ if (tabify_output) -+ { -+ state_bak = state; -+ mbc[mbc_pos++] = c; -+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state); -+ -+ while (mbc_pos > 0) -+ { -+ switch (mblength) -+ { -+ case (size_t)-2: -+ state = state_bak; -+ return; -+ -+ case (size_t)-1: -+ state = state_bak; -+ ++output_position; -+ putchar (mbc[0]); -+ memmove (mbc, mbc + 1, MB_CUR_MAX - 1); -+ --mbc_pos; -+ break; -+ -+ case 0: -+ mblength = 1; -+ -+ default: -+ if (wc == L' ') -+ { -+ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength); -+ --mbc_pos; -+ ++spaces_not_printed; -+ return; -+ } -+ else if (spaces_not_printed > 0) -+ print_white_space (); -+ -+ /* Nonprintables are assumed to have width 0, except L'\b'. */ -+ if ((width = wcwidth (wc)) < 1) -+ { -+ if (wc == L'\b') -+ --output_position; -+ } -+ else -+ output_position += width; -+ -+ fwrite (mbc, sizeof(char), mblength, stdout); -+ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength); -+ mbc_pos -= mblength; -+ } -+ } -+ return; -+ } -+ putchar (c); -+} -+#endif -+ - /* Skip to page PAGE before printing. - PAGE may be larger than total number of pages. */ - -@@ -2507,9 +2708,9 @@ read_line (COLUMN *p) - align_empty_cols = false; - } - -- if (padding_not_printed - col_sep_length > 0) -+ if (padding_not_printed - col_sep_width > 0) - { -- pad_across_to (padding_not_printed - col_sep_length); -+ pad_across_to (padding_not_printed - col_sep_width); - padding_not_printed = ANYWHERE; - } - -@@ -2610,9 +2811,9 @@ print_stored (COLUMN *p) - } - } - -- if (padding_not_printed - col_sep_length > 0) -+ if (padding_not_printed - col_sep_width > 0) - { -- pad_across_to (padding_not_printed - col_sep_length); -+ pad_across_to (padding_not_printed - col_sep_width); - padding_not_printed = ANYWHERE; - } - -@@ -2625,8 +2826,8 @@ print_stored (COLUMN *p) - if (spaces_not_printed == 0) - { - output_position = p->start_position + end_vector[line]; -- if (p->start_position - col_sep_length == chars_per_margin) -- output_position -= col_sep_length; -+ if (p->start_position - col_sep_width == chars_per_margin) -+ output_position -= col_sep_width; - } - - return true; -@@ -2645,7 +2846,7 @@ print_stored (COLUMN *p) - number of characters is 1.) */ - - static int --char_to_clump (char c) -+char_to_clump_single (char c) - { - unsigned char uc = c; - char *s = clump_buff; -@@ -2655,10 +2856,10 @@ char_to_clump (char c) - int chars; - int chars_per_c = 8; - -- if (c == input_tab_char) -+ if (c == input_tab_char[0]) - chars_per_c = chars_per_input_tab; - -- if (c == input_tab_char || c == '\t') -+ if (c == input_tab_char[0] || c == '\t') - { - width = TAB_WIDTH (chars_per_c, input_position); - -@@ -2739,6 +2940,154 @@ char_to_clump (char c) - return chars; - } - -+#ifdef HAVE_MBRTOWC -+static int -+char_to_clump_multi (char c) -+{ -+ static size_t mbc_pos = 0; -+ static char mbc[MB_LEN_MAX] = {'\0'}; -+ static mbstate_t state = {'\0'}; -+ mbstate_t state_bak; -+ wchar_t wc; -+ size_t mblength; -+ int wc_width; -+ register char *s = clump_buff; -+ register int i, j; -+ char esc_buff[4]; -+ int width; -+ int chars; -+ int chars_per_c = 8; -+ -+ state_bak = state; -+ mbc[mbc_pos++] = c; -+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state); -+ -+ width = 0; -+ chars = 0; -+ while (mbc_pos > 0) -+ { -+ switch (mblength) -+ { -+ case (size_t)-2: -+ state = state_bak; -+ return 0; -+ -+ case (size_t)-1: -+ state = state_bak; -+ mblength = 1; -+ -+ if (use_esc_sequence || use_cntrl_prefix) -+ { -+ width = +4; -+ chars = +4; -+ *s++ = '\'; -+ sprintf (esc_buff, "%03o", mbc[0]); -+ for (i = 0; i <= 2; ++i) -+ *s++ = (int) esc_buff[i]; -+ } -+ else -+ { -+ width += 1; -+ chars += 1; -+ *s++ = mbc[0]; -+ } -+ break; -+ -+ case 0: -+ mblength = 1; -+ /* Fall through */ -+ -+ default: -+ if (memcmp (mbc, input_tab_char, mblength) == 0) -+ chars_per_c = chars_per_input_tab; -+ -+ if (memcmp (mbc, input_tab_char, mblength) == 0 || c == '\t') -+ { -+ int width_inc; -+ -+ width_inc = TAB_WIDTH (chars_per_c, input_position); -+ width += width_inc; -+ -+ if (untabify_input) -+ { -+ for (i = width_inc; i; --i) -+ *s++ = ' '; -+ chars += width_inc; -+ } -+ else -+ { -+ for (i = 0; i < mblength; i++) -+ *s++ = mbc[i]; -+ chars += mblength; -+ } -+ } -+ else if ((wc_width = wcwidth (wc)) < 1) -+ { -+ if (use_esc_sequence) -+ { -+ for (i = 0; i < mblength; i++) -+ { -+ width += 4; -+ chars += 4; -+ *s++ = '\'; -+ sprintf (esc_buff, "%03o", c); -+ for (j = 0; j <= 2; ++j) -+ *s++ = (int) esc_buff[j]; -+ } -+ } -+ else if (use_cntrl_prefix) -+ { -+ if (wc < 0200) -+ { -+ width += 2; -+ chars += 2; -+ *s++ = '^'; -+ *s++ = wc ^ 0100; -+ } -+ else -+ { -+ for (i = 0; i < mblength; i++) -+ { -+ width += 4; -+ chars += 4; -+ *s++ = '\'; -+ sprintf (esc_buff, "%03o", c); -+ for (j = 0; j <= 2; ++j) -+ *s++ = (int) esc_buff[j]; -+ } -+ } -+ } -+ else if (wc == L'\b') -+ { -+ width += -1; -+ chars += 1; -+ *s++ = c; -+ } -+ else -+ { -+ width += 0; -+ chars += mblength; -+ for (i = 0; i < mblength; i++) -+ *s++ = mbc[i]; -+ } -+ } -+ else -+ { -+ width += wc_width; -+ chars += mblength; -+ for (i = 0; i < mblength; i++) -+ *s++ = mbc[i]; -+ } -+ } -+ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength); -+ mbc_pos -= mblength; -+ } -+ -+ input_position += width; -+ return chars; -+} -+#endif -+ - /* We've just printed some files and need to clean up things before - looking for more options and printing the next batch of files. - -diff -urNp coreutils-8.5-orig/src/sort.c coreutils-8.5/src/sort.c ---- coreutils-8.5-orig/src/sort.c 2010-04-21 09:06:17.000000000 +0200 -+++ coreutils-8.5/src/sort.c 2010-04-26 14:24:33.000000000 +0200 -@@ -22,10 +22,19 @@ - - #include <config.h> - -+#include <assert.h> - #include <getopt.h> - #include <sys/types.h> - #include <sys/wait.h> - #include <signal.h> -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+/* Get isw* functions. */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+ - #include "system.h" - #include "argmatch.h" - #include "error.h" -@@ -124,14 +133,38 @@ static int decimal_point; - /* Thousands separator; if -1, then there isn't one. */ - static int thousands_sep; - -+static int force_general_numcompare = 0; -+ - /* Nonzero if the corresponding locales are hard. */ - static bool hard_LC_COLLATE; --#if HAVE_NL_LANGINFO -+#if HAVE_LANGINFO_CODESET - static bool hard_LC_TIME; - #endif - - #define NONZERO(x) ((x) != 0) - -+/* get a multibyte character's byte length. */ -+#define GET_BYTELEN_OF_CHAR(LIM, PTR, MBLENGTH, STATE) \ -+ do \ -+ { \ -+ wchar_t wc; \ -+ mbstate_t state_bak; \ -+ \ -+ state_bak = STATE; \ -+ mblength = mbrtowc (&wc, PTR, LIM - PTR, &STATE); \ -+ \ -+ switch (MBLENGTH) \ -+ { \ -+ case (size_t)-1: \ -+ case (size_t)-2: \ -+ STATE = state_bak; \ -+ /* Fall through. */ \ -+ case 0: \ -+ MBLENGTH = 1; \ -+ } \ -+ } \ -+ while (0) -+ - /* The kind of blanks for '-b' to skip in various options. */ - enum blanktype { bl_start, bl_end, bl_both }; - -@@ -270,13 +303,11 @@ static bool reverse; - they were read if all keys compare equal. */ - static bool stable; - --/* If TAB has this value, blanks separate fields. */ --enum { TAB_DEFAULT = CHAR_MAX + 1 }; -- --/* Tab character separating fields. If TAB_DEFAULT, then fields are -+/* Tab character separating fields. If tab_length is 0, then fields are - separated by the empty string between a non-blank character and a blank - character. */ --static int tab = TAB_DEFAULT; -+static char tab[MB_LEN_MAX + 1]; -+static size_t tab_length = 0; - - /* Flag to remove consecutive duplicate lines from the output. - Only the last of a sequence of equal lines will be output. */ -@@ -714,6 +745,44 @@ reap_some (void) - update_proc (pid); - } - -+/* Function pointers. */ -+static void -+(*inittables) (void); -+static char * -+(*begfield) (const struct line*, const struct keyfield *); -+static char * -+(*limfield) (const struct line*, const struct keyfield *); -+static int -+(*getmonth) (char const *, size_t); -+static int -+(*keycompare) (const struct line *, const struct line *); -+static int -+(*numcompare) (const char *, const char *); -+ -+/* Test for white space multibyte character. -+ Set LENGTH the byte length of investigated multibyte character. */ -+#if HAVE_MBRTOWC -+static int -+ismbblank (const char *str, size_t len, size_t *length) -+{ -+ size_t mblength; -+ wchar_t wc; -+ mbstate_t state; -+ -+ memset (&state, '\0', sizeof(mbstate_t)); -+ mblength = mbrtowc (&wc, str, len, &state); -+ -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ *length = 1; -+ return 0; -+ } -+ -+ *length = (mblength < 1) ? 1 : mblength; -+ return iswblank (wc); -+} -+#endif -+ - /* Clean up any remaining temporary files. */ - - static void -@@ -1158,7 +1227,7 @@ zaptemp (const char *name) - free (node); - } - --#if HAVE_NL_LANGINFO -+#if HAVE_LANGINFO_CODESET - - static int - struct_month_cmp (const void *m1, const void *m2) -@@ -1173,7 +1242,7 @@ struct_month_cmp (const void *m1, const - /* Initialize the character class tables. */ - - static void --inittables (void) -+inittables_uni (void) - { - size_t i; - -@@ -1185,7 +1254,7 @@ inittables (void) - fold_toupper[i] = toupper (i); - } - --#if HAVE_NL_LANGINFO -+#if HAVE_LANGINFO_CODESET - /* If we're not in the "C" locale, read different names for months. */ - if (hard_LC_TIME) - { -@@ -1268,6 +1337,64 @@ specify_nmerge (int oi, char c, char con - xstrtol_fatal (e, oi, c, long_options, s); - } - -+#if HAVE_MBRTOWC -+static void -+inittables_mb (void) -+{ -+ int i, j, k, l; -+ char *name, *s; -+ size_t s_len, mblength; -+ char mbc[MB_LEN_MAX]; -+ wchar_t wc, pwc; -+ mbstate_t state_mb, state_wc; -+ -+ for (i = 0; i < MONTHS_PER_YEAR; i++) -+ { -+ s = (char *) nl_langinfo (ABMON_1 + i); -+ s_len = strlen (s); -+ monthtab[i].name = name = (char *) xmalloc (s_len + 1); -+ monthtab[i].val = i + 1; -+ -+ memset (&state_mb, '\0', sizeof (mbstate_t)); -+ memset (&state_wc, '\0', sizeof (mbstate_t)); -+ -+ for (j = 0; j < s_len;) -+ { -+ if (!ismbblank (s + j, s_len - j, &mblength)) -+ break; -+ j += mblength; -+ } -+ -+ for (k = 0; j < s_len;) -+ { -+ mblength = mbrtowc (&wc, (s + j), (s_len - j), &state_mb); -+ assert (mblength != (size_t)-1 && mblength != (size_t)-2); -+ if (mblength == 0) -+ break; -+ -+ pwc = towupper (wc); -+ if (pwc == wc) -+ { -+ memcpy (mbc, s + j, mblength); -+ j += mblength; -+ } -+ else -+ { -+ j += mblength; -+ mblength = wcrtomb (mbc, pwc, &state_wc); -+ assert (mblength != (size_t)0 && mblength != (size_t)-1); -+ } -+ -+ for (l = 0; l < mblength; l++) -+ name[k++] = mbc[l]; -+ } -+ name[k] = '\0'; -+ } -+ qsort ((void *) monthtab, MONTHS_PER_YEAR, -+ sizeof (struct month), struct_month_cmp); -+} -+#endif -+ - /* Specify the amount of main memory to use when sorting. */ - static void - specify_sort_size (int oi, char c, char const *s) -@@ -1478,7 +1605,7 @@ buffer_linelim (struct buffer const *buf - by KEY in LINE. */ - - static char * --begfield (const struct line *line, const struct keyfield *key) -+begfield_uni (const struct line *line, const struct keyfield *key) - { - char *ptr = line->text, *lim = ptr + line->length - 1; - size_t sword = key->sword; -@@ -1487,10 +1614,10 @@ begfield (const struct line *line, const - /* The leading field separator itself is included in a field when -t - is absent. */ - -- if (tab != TAB_DEFAULT) -+ if (tab_length) - while (ptr < lim && sword--) - { -- while (ptr < lim && *ptr != tab) -+ while (ptr < lim && *ptr != tab[0]) - ++ptr; - if (ptr < lim) - ++ptr; -@@ -1516,11 +1643,70 @@ begfield (const struct line *line, const - return ptr; - } - -+#if HAVE_MBRTOWC -+static char * -+begfield_mb (const struct line *line, const struct keyfield *key) -+{ -+ int i; -+ char *ptr = line->text, *lim = ptr + line->length - 1; -+ size_t sword = key->sword; -+ size_t schar = key->schar; -+ size_t mblength; -+ mbstate_t state; -+ -+ memset (&state, '\0', sizeof(mbstate_t)); -+ -+ if (tab_length) -+ while (ptr < lim && sword--) -+ { -+ while (ptr < lim && memcmp (ptr, tab, tab_length) != 0) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ ptr += mblength; -+ } -+ if (ptr < lim) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ ptr += mblength; -+ } -+ } -+ else -+ while (ptr < lim && sword--) -+ { -+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) -+ ptr += mblength; -+ if (ptr < lim) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ ptr += mblength; -+ } -+ while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength)) -+ ptr += mblength; -+ } -+ -+ if (key->skipsblanks) -+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) -+ ptr += mblength; -+ -+ for (i = 0; i < schar; i++) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ -+ if (ptr + mblength > lim) -+ break; -+ else -+ ptr += mblength; -+ } -+ -+ return ptr; -+} -+#endif -+ - /* Return the limit of (a pointer to the first character after) the field - in LINE specified by KEY. */ - - static char * --limfield (const struct line *line, const struct keyfield *key) -+limfield_uni (const struct line *line, const struct keyfield *key) - { - char *ptr = line->text, *lim = ptr + line->length - 1; - size_t eword = key->eword, echar = key->echar; -@@ -1535,10 +1721,10 @@ limfield (const struct line *line, const - `beginning' is the first character following the delimiting TAB. - Otherwise, leave PTR pointing at the first `blank' character after - the preceding field. */ -- if (tab != TAB_DEFAULT) -+ if (tab_length) - while (ptr < lim && eword--) - { -- while (ptr < lim && *ptr != tab) -+ while (ptr < lim && *ptr != tab[0]) - ++ptr; - if (ptr < lim && (eword || echar)) - ++ptr; -@@ -1584,10 +1770,10 @@ limfield (const struct line *line, const - */ - - /* Make LIM point to the end of (one byte past) the current field. */ -- if (tab != TAB_DEFAULT) -+ if (tab_length) - { - char *newlim; -- newlim = memchr (ptr, tab, lim - ptr); -+ newlim = memchr (ptr, tab[0], lim - ptr); - if (newlim) - lim = newlim; - } -@@ -1618,6 +1804,113 @@ limfield (const struct line *line, const - return ptr; - } - -+#if HAVE_MBRTOWC -+static char * -+limfield_mb (const struct line *line, const struct keyfield *key) -+{ -+ char *ptr = line->text, *lim = ptr + line->length - 1; -+ size_t eword = key->eword, echar = key->echar; -+ int i; -+ size_t mblength; -+ mbstate_t state; -+ -+ if (echar == 0) -+ eword++; /* skip all of end field. */ -+ -+ memset (&state, '\0', sizeof(mbstate_t)); -+ -+ if (tab_length) -+ while (ptr < lim && eword--) -+ { -+ while (ptr < lim && memcmp (ptr, tab, tab_length) != 0) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ ptr += mblength; -+ } -+ if (ptr < lim && (eword | echar)) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ ptr += mblength; -+ } -+ } -+ else -+ while (ptr < lim && eword--) -+ { -+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) -+ ptr += mblength; -+ if (ptr < lim) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ ptr += mblength; -+ } -+ while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength)) -+ ptr += mblength; -+ } -+ -+ -+# ifdef POSIX_UNSPECIFIED -+ /* Make LIM point to the end of (one byte past) the current field. */ -+ if (tab_length) -+ { -+ char *newlim, *p; -+ -+ newlim = NULL; -+ for (p = ptr; p < lim;) -+ { -+ if (memcmp (p, tab, tab_length) == 0) -+ { -+ newlim = p; -+ break; -+ } -+ -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ p += mblength; -+ } -+ } -+ else -+ { -+ char *newlim; -+ newlim = ptr; -+ -+ while (newlim < lim && ismbblank (newlim, lim - newlim, &mblength)) -+ newlim += mblength; -+ if (ptr < lim) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ ptr += mblength; -+ } -+ while (newlim < lim && !ismbblank (newlim, lim - newlim, &mblength)) -+ newlim += mblength; -+ lim = newlim; -+ } -+# endif -+ -+ if (echar != 0) -+ { -+ /* If we're skipping leading blanks, don't start counting characters -+ * until after skipping past any leading blanks. */ -+ if (key->skipsblanks) -+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) -+ ptr += mblength; -+ -+ memset (&state, '\0', sizeof(mbstate_t)); -+ -+ /* Advance PTR by ECHAR (if possible), but no further than LIM. */ -+ for (i = 0; i < echar; i++) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ -+ if (ptr + mblength > lim) -+ break; -+ else -+ ptr += mblength; -+ } -+ } -+ -+ return ptr; -+} -+#endif -+ - /* Fill BUF reading from FP, moving buf->left bytes from the end - of buf->buf to the beginning first. If EOF is reached and the - file wasn't terminated by a newline, supply one. Set up BUF's line -@@ -1700,8 +1993,24 @@ fillbuf (struct buffer *buf, FILE *fp, c - else - { - if (key->skipsblanks) -- while (blanks[to_uchar (*line_start)]) -- line_start++; -+ { -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ size_t mblength; -+ mbstate_t state; -+ memset (&state, '\0', sizeof(mbstate_t)); -+ while (line_start < line->keylim && -+ ismbblank (line_start, -+ line->keylim - line_start, -+ &mblength)) -+ line_start += mblength; -+ } -+ else -+#endif -+ while (blanks[to_uchar (*line_start)]) -+ line_start++; -+ } - line->keybeg = line_start; - } - } -@@ -1739,7 +2048,7 @@ fillbuf (struct buffer *buf, FILE *fp, c - hideously fast. */ - - static int --numcompare (const char *a, const char *b) -+numcompare_uni (const char *a, const char *b) - { - while (blanks[to_uchar (*a)]) - a++; -@@ -1848,6 +2157,25 @@ human_numcompare (const char *a, const c - : strnumcmp (a, b, decimal_point, thousands_sep)); - } - -+#if HAVE_MBRTOWC -+static int -+numcompare_mb (const char *a, const char *b) -+{ -+ size_t mblength, len; -+ len = strlen (a); /* okay for UTF-8 */ -+ while (*a && ismbblank (a, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength)) -+ { -+ a += mblength; -+ len -= mblength; -+ } -+ len = strlen (b); /* okay for UTF-8 */ -+ while (*b && ismbblank (b, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength)) -+ b += mblength; -+ -+ return strnumcmp (a, b, decimal_point, thousands_sep); -+} -+#endif /* HAV_EMBRTOWC */ -+ - static int - general_numcompare (const char *sa, const char *sb) - { -@@ -1881,7 +2209,7 @@ general_numcompare (const char *sa, cons - Return 0 if the name in S is not recognized. */ - - static int --getmonth (char const *month, size_t len) -+getmonth_uni (char const *month, size_t len) - { - size_t lo = 0; - size_t hi = MONTHS_PER_YEAR; -@@ -2062,11 +2390,79 @@ compare_version (char *restrict texta, s - return diff; - } - -+#if HAVE_MBRTOWC -+static int -+getmonth_mb (const char *s, size_t len) -+{ -+ char *month; -+ register size_t i; -+ register int lo = 0, hi = MONTHS_PER_YEAR, result; -+ char *tmp; -+ size_t wclength, mblength; -+ const char **pp; -+ const wchar_t **wpp; -+ wchar_t *month_wcs; -+ mbstate_t state; -+ -+ while (len > 0 && ismbblank (s, len, &mblength)) -+ { -+ s += mblength; -+ len -= mblength; -+ } -+ -+ if (len == 0) -+ return 0; -+ -+ month = (char *) alloca (len + 1); -+ -+ tmp = (char *) alloca (len + 1); -+ memcpy (tmp, s, len); -+ tmp[len] = '\0'; -+ pp = (const char **)&tmp; -+ month_wcs = (wchar_t *) alloca ((len + 1) * sizeof (wchar_t)); -+ memset (&state, '\0', sizeof(mbstate_t)); -+ -+ wclength = mbsrtowcs (month_wcs, pp, len + 1, &state); -+ assert (wclength != (size_t)-1 && *pp == NULL); -+ -+ for (i = 0; i < wclength; i++) -+ { -+ month_wcs[i] = towupper(month_wcs[i]); -+ if (iswblank (month_wcs[i])) -+ { -+ month_wcs[i] = L'\0'; -+ break; -+ } -+ } -+ -+ wpp = (const wchar_t **)&month_wcs; -+ -+ mblength = wcsrtombs (month, wpp, len + 1, &state); -+ assert (mblength != (-1) && *wpp == NULL); -+ -+ do -+ { -+ int ix = (lo + hi) / 2; -+ -+ if (strncmp (month, monthtab[ix].name, strlen (monthtab[ix].name)) < 0) -+ hi = ix; -+ else -+ lo = ix; -+ } -+ while (hi - lo > 1); -+ -+ result = (!strncmp (month, monthtab[lo].name, strlen (monthtab[lo].name)) -+ ? monthtab[lo].val : 0); -+ -+ return result; -+} -+#endif -+ - /* Compare two lines A and B trying every key in sequence until there - are no more keys or a difference is found. */ - - static int --keycompare (const struct line *a, const struct line *b) -+keycompare_uni (const struct line *a, const struct line *b) - { - struct keyfield *key = keylist; - -@@ -2246,6 +2642,179 @@ keycompare (const struct line *a, const - return key->reverse ? -diff : diff; - } - -+#if HAVE_MBRTOWC -+static int -+keycompare_mb (const struct line *a, const struct line *b) -+{ -+ struct keyfield *key = keylist; -+ -+ /* For the first iteration only, the key positions have been -+ precomputed for us. */ -+ char *texta = a->keybeg; -+ char *textb = b->keybeg; -+ char *lima = a->keylim; -+ char *limb = b->keylim; -+ -+ size_t mblength_a, mblength_b; -+ wchar_t wc_a, wc_b; -+ mbstate_t state_a, state_b; -+ -+ int diff; -+ -+ memset (&state_a, '\0', sizeof(mbstate_t)); -+ memset (&state_b, '\0', sizeof(mbstate_t)); -+ -+ for (;;) -+ { -+ char const *translate = key->translate; -+ bool const *ignore = key->ignore; -+ -+ /* Find the lengths. */ -+ size_t lena = lima <= texta ? 0 : lima - texta; -+ size_t lenb = limb <= textb ? 0 : limb - textb; -+ -+ /* Actually compare the fields. */ -+ if (key->random) -+ diff = compare_random (texta, lena, textb, lenb); -+ else if (key->numeric | key->general_numeric | key->human_numeric) -+ { -+ char savea = *lima, saveb = *limb; -+ -+ *lima = *limb = '\0'; -+ diff = (key->numeric ? numcompare (texta, textb) -+ : key->general_numeric ? general_numcompare (texta, textb) -+ : human_numcompare (texta, textb, key)); -+ *lima = savea, *limb = saveb; -+ } -+ else if (key->version) -+ diff = compare_version (texta, lena, textb, lenb); -+ else if (key->month) -+ diff = getmonth (texta, lena) - getmonth (textb, lenb); -+ else -+ { -+ if (ignore || translate) -+ { -+ char *copy_a = (char *) alloca (lena + 1 + lenb + 1); -+ char *copy_b = copy_a + lena + 1; -+ size_t new_len_a, new_len_b; -+ size_t i, j; -+ -+ /* Ignore and/or translate chars before comparing. */ -+# define IGNORE_CHARS(NEW_LEN, LEN, TEXT, COPY, WC, MBLENGTH, STATE) \ -+ do \ -+ { \ -+ wchar_t uwc; \ -+ char mbc[MB_LEN_MAX]; \ -+ mbstate_t state_wc; \ -+ \ -+ for (NEW_LEN = i = 0; i < LEN;) \ -+ { \ -+ mbstate_t state_bak; \ -+ \ -+ state_bak = STATE; \ -+ MBLENGTH = mbrtowc (&WC, TEXT + i, LEN - i, &STATE); \ -+ \ -+ if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1 \ -+ || MBLENGTH == 0) \ -+ { \ -+ if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \ -+ STATE = state_bak; \ -+ if (!ignore) \ -+ COPY[NEW_LEN++] = TEXT[i++]; \ -+ continue; \ -+ } \ -+ \ -+ if (ignore) \ -+ { \ -+ if ((ignore == nonprinting && !iswprint (WC)) \ -+ || (ignore == nondictionary \ -+ && !iswalnum (WC) && !iswblank (WC))) \ -+ { \ -+ i += MBLENGTH; \ -+ continue; \ -+ } \ -+ } \ -+ \ -+ if (translate) \ -+ { \ -+ \ -+ uwc = towupper(WC); \ -+ if (WC == uwc) \ -+ { \ -+ memcpy (mbc, TEXT + i, MBLENGTH); \ -+ i += MBLENGTH; \ -+ } \ -+ else \ -+ { \ -+ i += MBLENGTH; \ -+ WC = uwc; \ -+ memset (&state_wc, '\0', sizeof (mbstate_t)); \ -+ \ -+ MBLENGTH = wcrtomb (mbc, WC, &state_wc); \ -+ assert (MBLENGTH != (size_t)-1 && MBLENGTH != 0); \ -+ } \ -+ \ -+ for (j = 0; j < MBLENGTH; j++) \ -+ COPY[NEW_LEN++] = mbc[j]; \ -+ } \ -+ else \ -+ for (j = 0; j < MBLENGTH; j++) \ -+ COPY[NEW_LEN++] = TEXT[i++]; \ -+ } \ -+ COPY[NEW_LEN] = '\0'; \ -+ } \ -+ while (0) -+ IGNORE_CHARS (new_len_a, lena, texta, copy_a, -+ wc_a, mblength_a, state_a); -+ IGNORE_CHARS (new_len_b, lenb, textb, copy_b, -+ wc_b, mblength_b, state_b); -+ diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b); -+ } -+ else if (lena == 0) -+ diff = - NONZERO (lenb); -+ else if (lenb == 0) -+ goto greater; -+ else -+ diff = xmemcoll (texta, lena, textb, lenb); -+ } -+ -+ if (diff) -+ goto not_equal; -+ -+ key = key->next; -+ if (! key) -+ break; -+ -+ /* Find the beginning and limit of the next field. */ -+ if (key->eword != -1) -+ lima = limfield (a, key), limb = limfield (b, key); -+ else -+ lima = a->text + a->length - 1, limb = b->text + b->length - 1; -+ -+ if (key->sword != -1) -+ texta = begfield (a, key), textb = begfield (b, key); -+ else -+ { -+ texta = a->text, textb = b->text; -+ if (key->skipsblanks) -+ { -+ while (texta < lima && ismbblank (texta, lima - texta, &mblength_a)) -+ texta += mblength_a; -+ while (textb < limb && ismbblank (textb, limb - textb, &mblength_b)) -+ textb += mblength_b; -+ } -+ } -+ } -+ -+ return 0; -+ -+greater: -+ diff = 1; -+not_equal: -+ return key->reverse ? -diff : diff; -+} -+#endif -+ - /* Compare two lines A and B, returning negative, zero, or positive - depending on whether A compares less than, equal to, or greater than B. */ - -@@ -3244,7 +3813,7 @@ main (int argc, char **argv) - initialize_exit_failure (SORT_FAILURE); - - hard_LC_COLLATE = hard_locale (LC_COLLATE); --#if HAVE_NL_LANGINFO -+#if HAVE_LANGINFO_CODESET - hard_LC_TIME = hard_locale (LC_TIME); - #endif - -@@ -3265,6 +3834,27 @@ main (int argc, char **argv) - thousands_sep = -1; - } - -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ inittables = inittables_mb; -+ begfield = begfield_mb; -+ limfield = limfield_mb; -+ getmonth = getmonth_mb; -+ keycompare = keycompare_mb; -+ numcompare = numcompare_mb; -+ } -+ else -+#endif -+ { -+ inittables = inittables_uni; -+ begfield = begfield_uni; -+ limfield = limfield_uni; -+ getmonth = getmonth_uni; -+ keycompare = keycompare_uni; -+ numcompare = numcompare_uni; -+ } -+ - have_read_stdin = false; - inittables (); - -@@ -3536,13 +4126,35 @@ main (int argc, char **argv) - - case 't': - { -- char newtab = optarg[0]; -- if (! newtab) -+ char newtab[MB_LEN_MAX + 1]; -+ size_t newtab_length = 1; -+ strncpy (newtab, optarg, MB_LEN_MAX); -+ if (! newtab[0]) - error (SORT_FAILURE, 0, _("empty tab")); -- if (optarg[1]) -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ wchar_t wc; -+ mbstate_t state; -+ size_t i; -+ -+ memset (&state, '\0', sizeof (mbstate_t)); -+ newtab_length = mbrtowc (&wc, newtab, strnlen (newtab, -+ MB_LEN_MAX), -+ &state); -+ switch (newtab_length) -+ { -+ case (size_t) -1: -+ case (size_t) -2: -+ case 0: -+ newtab_length = 1; -+ } -+ } -+#endif -+ if (newtab_length == 1 && optarg[1]) - { - if (STREQ (optarg, "\0")) -- newtab = '\0'; -+ newtab[0] = '\0'; - else - { - /* Provoke with `sort -txx'. Complain about -@@ -3553,9 +4165,12 @@ main (int argc, char **argv) - quote (optarg)); - } - } -- if (tab != TAB_DEFAULT && tab != newtab) -+ if (tab_length -+ && (tab_length != newtab_length -+ || memcmp (tab, newtab, tab_length) != 0)) - error (SORT_FAILURE, 0, _("incompatible tabs")); -- tab = newtab; -+ memcpy (tab, newtab, newtab_length); -+ tab_length = newtab_length; - } - break; - -diff -urNp coreutils-8.5-orig/src/unexpand.c coreutils-8.5/src/unexpand.c ---- coreutils-8.5-orig/src/unexpand.c 2010-01-01 14:06:47.000000000 +0100 -+++ coreutils-8.5/src/unexpand.c 2010-04-26 14:24:33.000000000 +0200 -@@ -39,11 +39,28 @@ - #include <stdio.h> - #include <getopt.h> - #include <sys/types.h> -+ -+/* Get mbstate_t, mbrtowc(), wcwidth(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ - #include "system.h" - #include "error.h" - #include "quote.h" - #include "xstrndup.h" - -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+ installation; work around this configuration error. */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - /* The official name of this program (e.g., no `g' prefix). */ - #define PROGRAM_NAME "unexpand" - -@@ -103,6 +120,208 @@ static struct option const longopts[] = - {NULL, 0, NULL, 0} - }; - -+static FILE *next_file (FILE *fp); -+ -+#if HAVE_MBRTOWC -+static void -+unexpand_multibyte (void) -+{ -+ FILE *fp; /* Input stream. */ -+ mbstate_t i_state; /* Current shift state of the input stream. */ -+ mbstate_t i_state_bak; /* Back up the I_STATE. */ -+ mbstate_t o_state; /* Current shift state of the output stream. */ -+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ -+ char *bufpos; /* Next read position of BUF. */ -+ size_t buflen = 0; /* The length of the byte sequence in buf. */ -+ wint_t wc; /* A gotten wide character. */ -+ size_t mblength; /* The byte size of a multibyte character -+ which shows as same character as WC. */ -+ -+ /* Index in `tab_list' of next tabstop: */ -+ int tab_index = 0; /* For calculating width of pending tabs. */ -+ int print_tab_index = 0; /* For printing as many tabs as possible. */ -+ unsigned int column = 0; /* Column on screen of next char. */ -+ int next_tab_column; /* Column the next tab stop is on. */ -+ int convert = 1; /* If nonzero, perform translations. */ -+ unsigned int pending = 0; /* Pending columns of blanks. */ -+ -+ fp = next_file ((FILE *) NULL); -+ if (fp == NULL) -+ return; -+ -+ memset (&o_state, '\0', sizeof(mbstate_t)); -+ memset (&i_state, '\0', sizeof(mbstate_t)); -+ -+ for (;;) -+ { -+ if (buflen < MB_LEN_MAX && !feof(fp) && !ferror(fp)) -+ { -+ memmove (buf, bufpos, buflen); -+ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, fp); -+ bufpos = buf; -+ } -+ -+ /* Get a wide character. */ -+ if (buflen < 1) -+ { -+ mblength = 1; -+ wc = WEOF; -+ } -+ else -+ { -+ i_state_bak = i_state; -+ mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &i_state); -+ } -+ -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ i_state = i_state_bak; -+ wc = L'\0'; -+ } -+ -+ if (wc == L' ' && convert && column < INT_MAX) -+ { -+ ++pending; -+ ++column; -+ } -+ else if (wc == L'\t' && convert) -+ { -+ if (tab_size == 0) -+ { -+ /* Do not let tab_index == first_free_tab; -+ stop when it is 1 less. */ -+ while (tab_index < first_free_tab - 1 -+ && column >= tab_list[tab_index]) -+ tab_index++; -+ next_tab_column = tab_list[tab_index]; -+ if (tab_index < first_free_tab - 1) -+ tab_index++; -+ if (column >= next_tab_column) -+ { -+ convert = 0; /* Ran out of tab stops. */ -+ goto flush_pend_mb; -+ } -+ } -+ else -+ { -+ next_tab_column = column + tab_size - column % tab_size; -+ } -+ pending += next_tab_column - column; -+ column = next_tab_column; -+ } -+ else -+ { -+flush_pend_mb: -+ /* Flush pending spaces. Print as many tabs as possible, -+ then print the rest as spaces. */ -+ if (pending == 1) -+ { -+ putchar (' '); -+ pending = 0; -+ } -+ column -= pending; -+ while (pending > 0) -+ { -+ if (tab_size == 0) -+ { -+ /* Do not let print_tab_index == first_free_tab; -+ stop when it is 1 less. */ -+ while (print_tab_index < first_free_tab - 1 -+ && column >= tab_list[print_tab_index]) -+ print_tab_index++; -+ next_tab_column = tab_list[print_tab_index]; -+ if (print_tab_index < first_free_tab - 1) -+ print_tab_index++; -+ } -+ else -+ { -+ next_tab_column = -+ column + tab_size - column % tab_size; -+ } -+ if (next_tab_column - column <= pending) -+ { -+ putchar ('\t'); -+ pending -= next_tab_column - column; -+ column = next_tab_column; -+ } -+ else -+ { -+ --print_tab_index; -+ column += pending; -+ while (pending != 0) -+ { -+ putchar (' '); -+ pending--; -+ } -+ } -+ } -+ -+ if (wc == WEOF) -+ { -+ fp = next_file (fp); -+ if (fp == NULL) -+ break; /* No more files. */ -+ else -+ { -+ memset (&i_state, '\0', sizeof(mbstate_t)); -+ continue; -+ } -+ } -+ -+ if (mblength == (size_t)-1 || mblength == (size_t)-2) -+ { -+ if (convert) -+ { -+ ++column; -+ if (convert_entire_line == 0) -+ convert = 0; -+ } -+ mblength = 1; -+ putchar (buf[0]); -+ } -+ else if (mblength == 0) -+ { -+ if (convert && convert_entire_line == 0) -+ convert = 0; -+ mblength = 1; -+ putchar ('\0'); -+ } -+ else -+ { -+ if (convert) -+ { -+ if (wc == L'\b') -+ { -+ if (column > 0) -+ --column; -+ } -+ else -+ { -+ int width; /* The width of WC. */ -+ -+ width = wcwidth (wc); -+ column += (width > 0) ? width : 0; -+ if (convert_entire_line == 0) -+ convert = 0; -+ } -+ } -+ -+ if (wc == L'\n') -+ { -+ tab_index = print_tab_index = 0; -+ column = pending = 0; -+ convert = 1; -+ } -+ fwrite (bufpos, sizeof(char), mblength, stdout); -+ } -+ } -+ buflen -= mblength; -+ bufpos += mblength; -+ } -+} -+#endif -+ -+ - void - usage (int status) - { -@@ -524,7 +743,12 @@ main (int argc, char **argv) - - file_list = (optind < argc ? &argv[optind] : stdin_argv); - -- unexpand (); -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ unexpand_multibyte (); -+ else -+#endif -+ unexpand (); - - if (have_read_stdin && fclose (stdin) != 0) - error (EXIT_FAILURE, errno, "-"); -diff -urNp coreutils-8.5-orig/src/uniq.c coreutils-8.5/src/uniq.c ---- coreutils-8.5-orig/src/uniq.c 2010-03-13 16:14:09.000000000 +0100 -+++ coreutils-8.5/src/uniq.c 2010-04-26 14:24:33.000000000 +0200 -@@ -21,6 +21,16 @@ - #include <getopt.h> - #include <sys/types.h> - -+/* Get mbstate_t, mbrtowc(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ -+/* Get isw* functions. */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+ - #include "system.h" - #include "argmatch.h" - #include "linebuffer.h" -@@ -31,7 +41,19 @@ - #include "stdio--.h" - #include "xmemcoll.h" - #include "xstrtol.h" --#include "memcasecmp.h" -+#include "xmemcoll.h" -+ -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+ installation; work around this configuration error. */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - - /* The official name of this program (e.g., no `g' prefix). */ - #define PROGRAM_NAME "uniq" -@@ -107,6 +129,10 @@ static enum delimit_method const delimit - /* Select whether/how to delimit groups of duplicate lines. */ - static enum delimit_method delimit_groups; - -+/* Function pointers. */ -+static char * -+(*find_field) (struct linebuffer *line); -+ - static struct option const longopts[] = - { - {"count", no_argument, NULL, 'c'}, -@@ -206,7 +232,7 @@ size_opt (char const *opt, char const *m - return a pointer to the beginning of the line's field to be compared. */ - - static char * --find_field (struct linebuffer const *line) -+find_field_uni (struct linebuffer *line) - { - size_t count; - char const *lp = line->buffer; -@@ -227,6 +253,83 @@ find_field (struct linebuffer const *lin - return line->buffer + i; - } - -+#if HAVE_MBRTOWC -+ -+# define MBCHAR_TO_WCHAR(WC, MBLENGTH, LP, POS, SIZE, STATEP, CONVFAIL) \ -+ do \ -+ { \ -+ mbstate_t state_bak; \ -+ \ -+ CONVFAIL = 0; \ -+ state_bak = *STATEP; \ -+ \ -+ MBLENGTH = mbrtowc (&WC, LP + POS, SIZE - POS, STATEP); \ -+ \ -+ switch (MBLENGTH) \ -+ { \ -+ case (size_t)-2: \ -+ case (size_t)-1: \ -+ *STATEP = state_bak; \ -+ CONVFAIL++; \ -+ /* Fall through */ \ -+ case 0: \ -+ MBLENGTH = 1; \ -+ } \ -+ } \ -+ while (0) -+ -+static char * -+find_field_multi (struct linebuffer *line) -+{ -+ size_t count; -+ char *lp = line->buffer; -+ size_t size = line->length - 1; -+ size_t pos; -+ size_t mblength; -+ wchar_t wc; -+ mbstate_t *statep; -+ int convfail; -+ -+ pos = 0; -+ statep = &(line->state); -+ -+ /* skip fields. */ -+ for (count = 0; count < skip_fields && pos < size; count++) -+ { -+ while (pos < size) -+ { -+ MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail); -+ -+ if (convfail || !iswblank (wc)) -+ { -+ pos += mblength; -+ break; -+ } -+ pos += mblength; -+ } -+ -+ while (pos < size) -+ { -+ MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail); -+ -+ if (!convfail && iswblank (wc)) -+ break; -+ -+ pos += mblength; -+ } -+ } -+ -+ /* skip fields. */ -+ for (count = 0; count < skip_chars && pos < size; count++) -+ { -+ MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail); -+ pos += mblength; -+ } -+ -+ return lp + pos; -+} -+#endif -+ - /* Return false if two strings OLD and NEW match, true if not. - OLD and NEW point not to the beginnings of the lines - but rather to the beginnings of the fields to compare. -@@ -235,6 +338,8 @@ find_field (struct linebuffer const *lin - static bool - different (char *old, char *new, size_t oldlen, size_t newlen) - { -+ char *copy_old, *copy_new; -+ - if (check_chars < oldlen) - oldlen = check_chars; - if (check_chars < newlen) -@@ -242,14 +347,92 @@ different (char *old, char *new, size_t - - if (ignore_case) - { -- /* FIXME: This should invoke strcoll somehow. */ -- return oldlen != newlen || memcasecmp (old, new, oldlen); -+ size_t i; -+ -+ copy_old = alloca (oldlen + 1); -+ copy_new = alloca (oldlen + 1); -+ -+ for (i = 0; i < oldlen; i++) -+ { -+ copy_old[i] = toupper (old[i]); -+ copy_new[i] = toupper (new[i]); -+ } - } -- else if (hard_LC_COLLATE) -- return xmemcoll (old, oldlen, new, newlen) != 0; - else -- return oldlen != newlen || memcmp (old, new, oldlen); -+ { -+ copy_old = (char *)old; -+ copy_new = (char *)new; -+ } -+ -+ return xmemcoll (copy_old, oldlen, copy_new, newlen); -+} -+ -+#if HAVE_MBRTOWC -+static int -+different_multi (const char *old, const char *new, size_t oldlen, size_t newlen, mbstate_t oldstate, mbstate_t newstate) -+{ -+ size_t i, j, chars; -+ const char *str[2]; -+ char *copy[2]; -+ size_t len[2]; -+ mbstate_t state[2]; -+ size_t mblength; -+ wchar_t wc, uwc; -+ mbstate_t state_bak; -+ -+ str[0] = old; -+ str[1] = new; -+ len[0] = oldlen; -+ len[1] = newlen; -+ state[0] = oldstate; -+ state[1] = newstate; -+ -+ for (i = 0; i < 2; i++) -+ { -+ copy[i] = alloca (len[i] + 1); -+ -+ for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++) -+ { -+ state_bak = state[i]; -+ mblength = mbrtowc (&wc, str[i] + j, len[i] - j, &(state[i])); -+ -+ switch (mblength) -+ { -+ case (size_t)-1: -+ case (size_t)-2: -+ state[i] = state_bak; -+ /* Fall through */ -+ case 0: -+ mblength = 1; -+ break; -+ -+ default: -+ if (ignore_case) -+ { -+ uwc = towupper (wc); -+ -+ if (uwc != wc) -+ { -+ mbstate_t state_wc; -+ -+ memset (&state_wc, '\0', sizeof(mbstate_t)); -+ wcrtomb (copy[i] + j, uwc, &state_wc); -+ } -+ else -+ memcpy (copy[i] + j, str[i] + j, mblength); -+ } -+ else -+ memcpy (copy[i] + j, str[i] + j, mblength); -+ } -+ j += mblength; -+ } -+ copy[i][j] = '\0'; -+ len[i] = j; -+ } -+ -+ return xmemcoll (copy[0], len[0], copy[1], len[1]); - } -+#endif - - /* Output the line in linebuffer LINE to standard output - provided that the switches say it should be output. -@@ -303,15 +486,43 @@ check_file (const char *infile, const ch - { - char *prevfield IF_LINT (= NULL); - size_t prevlen IF_LINT (= 0); -+#if HAVE_MBRTOWC -+ mbstate_t prevstate; -+ -+ memset (&prevstate, '\0', sizeof (mbstate_t)); -+#endif - - while (!feof (stdin)) - { - char *thisfield; - size_t thislen; -+#if HAVE_MBRTOWC -+ mbstate_t thisstate; -+#endif -+ - if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) - break; - thisfield = find_field (thisline); - thislen = thisline->length - 1 - (thisfield - thisline->buffer); -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ thisstate = thisline->state; -+ -+ if (prevline->length == 0 || different_multi -+ (thisfield, prevfield, thislen, prevlen, thisstate, prevstate)) -+ { -+ fwrite (thisline->buffer, sizeof (char), -+ thisline->length, stdout); -+ -+ SWAP_LINES (prevline, thisline); -+ prevfield = thisfield; -+ prevlen = thislen; -+ prevstate = thisstate; -+ } -+ } -+ else -+#endif - if (prevline->length == 0 - || different (thisfield, prevfield, thislen, prevlen)) - { -@@ -330,17 +541,26 @@ check_file (const char *infile, const ch - size_t prevlen; - uintmax_t match_count = 0; - bool first_delimiter = true; -+#if HAVE_MBRTOWC -+ mbstate_t prevstate; -+#endif - - if (readlinebuffer_delim (prevline, stdin, delimiter) == 0) - goto closefiles; - prevfield = find_field (prevline); - prevlen = prevline->length - 1 - (prevfield - prevline->buffer); -+#if HAVE_MBRTOWC -+ prevstate = prevline->state; -+#endif - - while (!feof (stdin)) - { - bool match; - char *thisfield; - size_t thislen; -+#if HAVE_MBRTOWC -+ mbstate_t thisstate; -+#endif - if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) - { - if (ferror (stdin)) -@@ -349,6 +569,15 @@ check_file (const char *infile, const ch - } - thisfield = find_field (thisline); - thislen = thisline->length - 1 - (thisfield - thisline->buffer); -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ thisstate = thisline->state; -+ match = !different_multi (thisfield, prevfield, -+ thislen, prevlen, thisstate, prevstate); -+ } -+ else -+#endif - match = !different (thisfield, prevfield, thislen, prevlen); - match_count += match; - -@@ -381,6 +610,9 @@ check_file (const char *infile, const ch - SWAP_LINES (prevline, thisline); - prevfield = thisfield; - prevlen = thislen; -+#if HAVE_MBRTOWC -+ prevstate = thisstate; -+#endif - if (!match) - match_count = 0; - } -@@ -426,6 +658,19 @@ main (int argc, char **argv) - - atexit (close_stdout); - -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ find_field = find_field_multi; -+ } -+ else -+#endif -+ { -+ find_field = find_field_uni; -+ } -+ -+ -+ - skip_chars = 0; - skip_fields = 0; - check_chars = SIZE_MAX; -diff -urNp coreutils-8.5-orig/tests/Makefile.am coreutils-8.5/tests/Makefile.am ---- coreutils-8.5-orig/tests/Makefile.am 2010-04-26 14:24:10.000000000 +0200 -+++ coreutils-8.5/tests/Makefile.am 2010-04-26 14:24:33.000000000 +0200 -@@ -224,6 +224,7 @@ TESTS = \ - misc/sort-compress \ - misc/sort-continue \ - misc/sort-files0-from \ -+ misc/sort-mb-tests \ - misc/sort-merge \ - misc/sort-merge-fdlimit \ - misc/sort-month \ -@@ -475,6 +476,10 @@ TESTS = \ - $(root_tests) - - pr_data = \ -+ misc/mb1.X \ -+ misc/mb1.I \ -+ misc/mb2.X \ -+ misc/mb2.I \ - pr/0F \ - pr/0FF \ - pr/0FFnt \ -diff -urNp coreutils-8.5-orig/tests/misc/cut coreutils-8.5/tests/misc/cut ---- coreutils-8.5-orig/tests/misc/cut 2010-01-01 14:06:47.000000000 +0100 -+++ coreutils-8.5/tests/misc/cut 2010-04-26 14:24:33.000000000 +0200 -@@ -26,7 +26,7 @@ use strict; - my $prog = 'cut'; - my $try = "Try `$prog --help' for more information.\n"; - my $from_1 = "$prog: fields and positions are numbered from 1\n$try"; --my $inval = "$prog: invalid byte or field list\n$try"; -+my $inval = "$prog: invalid byte, character or field list\n$try"; - my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try"; - - my @Tests = -@@ -141,7 +141,7 @@ my @Tests = - - # None of the following invalid ranges provoked an error up to coreutils-6.9. - ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1}, -- {ERR=>"$prog: invalid decreasing range\n$try"}], -+ {ERR=>"$prog: invalid byte, character or field list\n$try"}], - ['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}], - ['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}], - ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}], -diff -urNp coreutils-8.5-orig/tests/misc/mb1.I coreutils-8.5/tests/misc/mb1.I ---- coreutils-8.5-orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.5/tests/misc/mb1.I 2010-04-26 14:24:33.000000000 +0200 -@@ -0,0 +1,4 @@ -+Apple@10 -+Banana@5 -+Citrus@20 -+Cherry@30 -diff -urNp coreutils-8.5-orig/tests/misc/mb1.X coreutils-8.5/tests/misc/mb1.X ---- coreutils-8.5-orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.5/tests/misc/mb1.X 2010-04-26 14:24:33.000000000 +0200 -@@ -0,0 +1,4 @@ -+Banana@5 -+Apple@10 -+Citrus@20 -+Cherry@30 -diff -urNp coreutils-8.5-orig/tests/misc/mb2.I coreutils-8.5/tests/misc/mb2.I ---- coreutils-8.5-orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.5/tests/misc/mb2.I 2010-04-26 14:24:33.000000000 +0200 -@@ -0,0 +1,4 @@ -+Apple@AA10@@20 -+Banana@AA5@@30 -+Citrus@AA20@@5 -+Cherry@AA30@@10 -diff -urNp coreutils-8.5-orig/tests/misc/mb2.X coreutils-8.5/tests/misc/mb2.X ---- coreutils-8.5-orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.5/tests/misc/mb2.X 2010-04-26 14:24:33.000000000 +0200 -@@ -0,0 +1,4 @@ -+Citrus@AA20@@5 -+Cherry@AA30@@10 -+Apple@AA10@@20 -+Banana@AA5@@30 -diff -urNp coreutils-8.5-orig/tests/misc/sort-mb-tests coreutils-8.5/tests/misc/sort-mb-tests ---- coreutils-8.5-orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.5/tests/misc/sort-mb-tests 2010-04-26 14:24:33.000000000 +0200 -@@ -0,0 +1,58 @@ -+#! /bin/sh -+case $# in -+ 0) xx='../src/sort';; -+ *) xx="$1";; -+esac -+test "$VERBOSE" && echo=echo || echo=: -+$echo testing program: $xx -+errors=0 -+test "$srcdir" || srcdir=. -+test "$VERBOSE" && $xx --version 2> /dev/null -+ -+export LC_ALL=en_US.UTF-8 -+locale -k LC_CTYPE 2>&1 | grep -q charmap.*UTF-8 || exit 77 -+errors=0 -+ -+$xx -t @ -k2 -n misc/mb1.I > misc/mb1.O -+code=$? -+if test $code != 0; then -+ $echo "Test mb1 failed: $xx return code $code differs from expected value 0" 1>&2 -+ errors=`expr $errors + 1` -+else -+ cmp misc/mb1.O $srcdir/misc/mb1.X > /dev/null 2>&1 -+ case $? in -+ 0) if test "$VERBOSE"; then $echo "passed mb1"; fi;; -+ 1) $echo "Test mb1 failed: files misc/mb1.O and $srcdir/misc/mb1.X differ" 1>&2 -+ (diff -c misc/mb1.O $srcdir/misc/mb1.X) 2> /dev/null -+ errors=`expr $errors + 1`;; -+ 2) $echo "Test mb1 may have failed." 1>&2 -+ $echo The command "cmp misc/mb1.O $srcdir/misc/mb1.X" failed. 1>&2 -+ errors=`expr $errors + 1`;; -+ esac -+fi -+ -+$xx -t @ -k4 -n misc/mb2.I > misc/mb2.O -+code=$? -+if test $code != 0; then -+ $echo "Test mb2 failed: $xx return code $code differs from expected value 0" 1>&2 -+ errors=`expr $errors + 1` -+else -+ cmp misc/mb2.O $srcdir/misc/mb2.X > /dev/null 2>&1 -+ case $? in -+ 0) if test "$VERBOSE"; then $echo "passed mb2"; fi;; -+ 1) $echo "Test mb2 failed: files misc/mb2.O and $srcdir/misc/mb2.X differ" 1>&2 -+ (diff -c misc/mb2.O $srcdir/misc/mb2.X) 2> /dev/null -+ errors=`expr $errors + 1`;; -+ 2) $echo "Test mb2 may have failed." 1>&2 -+ $echo The command "cmp misc/mb2.O $srcdir/misc/mb2.X" failed. 1>&2 -+ errors=`expr $errors + 1`;; -+ esac -+fi -+ -+if test $errors = 0; then -+ $echo Passed all 113 tests. 1>&2 -+else -+ $echo Failed $errors tests. 1>&2 -+fi -+test $errors = 0 || errors=1 -+exit $errors diff --git a/pkgs/toolchain/cpio/cpio.nm b/pkgs/toolchain/cpio/cpio.nm deleted file mode 100644 index bf1e404..0000000 --- a/pkgs/toolchain/cpio/cpio.nm +++ /dev/null @@ -1,14 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/cpio/cpio.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -STAGE_TEST = # No test. diff --git a/pkgs/toolchain/diffutils/diffutils.nm b/pkgs/toolchain/diffutils/diffutils.nm deleted file mode 100644 index 278d3bb..0000000 --- a/pkgs/toolchain/diffutils/diffutils.nm +++ /dev/null @@ -1,12 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/diffutils/diffutils.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef diff --git a/pkgs/toolchain/diffutils/patches/diffutils-2.8.1-hardened_tmp-1.patch b/pkgs/toolchain/diffutils/patches/diffutils-2.8.1-hardened_tmp-1.patch deleted file mode 100644 index c335090..0000000 --- a/pkgs/toolchain/diffutils/patches/diffutils-2.8.1-hardened_tmp-1.patch +++ /dev/null @@ -1,31 +0,0 @@ -Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes) -Date: 2006-10-09 -Initial Package Version: 2.8.7 -Upstream Status: Submitted - Partially accepted -Thread starts here: - http://sources.redhat.com/ml/bug-gnu-utils/2000-12/msg00163.html -Origin: ALT Linux / Openwall Owl Linux - diffutils-2.8.7-alt-tmp.diff -Description: This patch removes the more portable and less safe use of -tmpname(3), in preference of mkstemp(3). - ---- diffutils-2.8.7/src/sdiff.c.orig 2004-04-12 07:44:35 +0000 -+++ diffutils-2.8.7/src/sdiff.c 2005-05-17 12:58:44 +0000 -@@ -990,13 +990,13 @@ edit (struct line_filter *left, char con - int fd; - - if (tmpname) -- tmp = fopen (tmpname, "w"); -- else - { -- if ((fd = temporary_file ()) < 0) -- perror_fatal ("mkstemp"); -- tmp = fdopen (fd, "w"); -+ unlink (tmpname); -+ free (tmpname); - } -+ if ((fd = temporary_file ()) < 0) -+ perror_fatal ("mkstemp"); -+ tmp = fdopen (fd, "w"); - - if (! tmp) - perror_fatal (tmpname); diff --git a/pkgs/toolchain/diffutils/patches/diffutils-2.9-i18n-1.patch b/pkgs/toolchain/diffutils/patches/diffutils-2.9-i18n-1.patch deleted file mode 100644 index b6f12ef..0000000 --- a/pkgs/toolchain/diffutils/patches/diffutils-2.9-i18n-1.patch +++ /dev/null @@ -1,768 +0,0 @@ ---- diffutils-2.9/src/diff.c 2010-02-11 10:39:17.000000000 +0100 -+++ diffutils-2.9.mod/src/diff.c 2010-02-13 15:28:22.268208253 +0100 -@@ -284,6 +284,13 @@ - re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING); - excluded = new_exclude (); - -+#ifdef HANDLE_MULTIBYTE -+ if (MB_CUR_MAX > 1) -+ lines_differ = lines_differ_multibyte; -+ else -+#endif -+ lines_differ = lines_differ_singlebyte; -+ - /* Decode the options. */ - - while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) ---- diffutils-2.9/src/diff.h 2010-02-11 10:05:57.000000000 +0100 -+++ diffutils-2.9.mod/src/diff.h 2010-02-13 15:28:22.269208190 +0100 -@@ -23,6 +23,19 @@ - #include <stdio.h> - #include <unlocked-io.h> - -+/* For platform which support the ISO C amendement 1 functionality we -+ support user defined character classes. */ -+#if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H -+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ -+# include <wchar.h> -+# include <wctype.h> -+# if defined (HAVE_MBRTOWC) -+# define HANDLE_MULTIBYTE 1 -+# endif -+#endif -+ -+#define TAB_WIDTH 8 -+ - /* What kind of changes a hunk contains. */ - enum changes - { -@@ -350,7 +363,13 @@ - extern char const pr_program[]; - char *concat (char const *, char const *, char const *); - char *dir_file_pathname (char const *, char const *); --bool lines_differ (char const *, char const *); -+ -+bool (*lines_differ) (char const *, char const *); -+bool lines_differ_singlebyte (char const *, char const *); -+#ifdef HANDLE_MULTIBYTE -+bool lines_differ_multibyte (char const *, char const *); -+#endif -+ - lin translate_line_number (struct file_data const *, lin); - struct change *find_change (struct change *); - struct change *find_reverse_change (struct change *); ---- diffutils-2.9/src/io.c 2010-02-05 09:10:15.000000000 +0100 -+++ diffutils-2.9.mod/src/io.c 2010-02-13 15:39:59.313224273 +0100 -@@ -22,6 +22,7 @@ - #include <cmpbuf.h> - #include <file-type.h> - #include <xalloc.h> -+#include <assert.h> - - /* Rotate an unsigned value to the left. */ - #define ROL(v, n) ((v) << (n) | (v) >> (sizeof (v) * CHAR_BIT - (n))) -@@ -194,6 +195,28 @@ - - /* Split the file into lines, simultaneously computing the equivalence - class for each line. */ -+#ifdef HANDLE_MULTIBYTE -+# define MBC2WC(P, END, MBLENGTH, WC, STATE, CONVFAIL) \ -+do \ -+{ \ -+ mbstate_t state_bak = STATE; \ -+ \ -+ CONVFAIL = 0; \ -+ MBLENGTH = mbrtowc (&WC, P, END - (char const *)P, &STATE); \ -+ \ -+ switch (MBLENGTH) \ -+ { \ -+ case (size_t)-2: \ -+ case (size_t)-1: \ -+ STATE = state_bak; \ -+ ++CONVFAIL; \ -+ /* Fall through. */ \ -+ case 0: \ -+ MBLENGTH = 1; \ -+ } \ -+} \ -+while (0) -+#endif - - static void - find_and_hash_each_line (struct file_data *current) -@@ -220,12 +243,282 @@ - bool same_length_diff_contents_compare_anyway = - diff_length_compare_anyway | ignore_case; - -+#ifdef HANDLE_MULTIBYTE -+ wchar_t wc; -+ size_t mblength; -+ mbstate_t state; -+ int convfail; -+ -+ memset (&state, '\0', sizeof (mbstate_t)); -+#endif -+ - while (p < suffix_begin) - { - char const *ip = p; - - h = 0; - -+#ifdef HANDLE_MULTIBYTE -+ if (MB_CUR_MAX > 1) -+ { -+ wchar_t lo_wc; -+ char mbc[MB_LEN_MAX]; -+ mbstate_t state_wc; -+ -+ /* Hash this line until we find a newline. */ -+ switch (ignore_white_space) -+ { -+ case IGNORE_ALL_SPACE: -+ while (1) -+ { -+ if (*p == '\n') -+ { -+ ++p; -+ break; -+ } -+ -+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail); -+ -+ if (convfail) -+ mbc[0] = *p++; -+ else if (!iswspace (wc)) -+ { -+ bool flag = 0; -+ -+ if (ignore_case) -+ { -+ lo_wc = towlower (wc); -+ if (lo_wc != wc) -+ { -+ flag = 1; -+ -+ p += mblength; -+ memset (&state_wc, '\0', sizeof(mbstate_t)); -+ mblength = wcrtomb (mbc, lo_wc, &state_wc); -+ -+ assert (mblength != (size_t)-1 && -+ mblength != (size_t)-2); -+ -+ mblength = (mblength < 1) ? 1 : mblength; -+ } -+ } -+ -+ if (!flag) -+ { -+ for (i = 0; i < mblength; i++) -+ mbc[i] = *p++; -+ } -+ } -+ else -+ { -+ p += mblength; -+ continue; -+ } -+ -+ for (i = 0; i < mblength; i++) -+ h = HASH (h, mbc[i]); -+ } -+ break; -+ -+ case IGNORE_SPACE_CHANGE: -+ while (1) -+ { -+ if (*p == '\n') -+ { -+ ++p; -+ break; -+ } -+ -+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail); -+ -+ if (!convfail && iswspace (wc)) -+ { -+ while (1) -+ { -+ if (*p == '\n') -+ { -+ ++p; -+ goto hashing_done; -+ } -+ -+ p += mblength; -+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail); -+ if (convfail || (!convfail && !iswspace (wc))) -+ break; -+ } -+ h = HASH (h, ' '); -+ } -+ -+ /* WC is now the first non-space. */ -+ if (convfail) -+ mbc[0] = *p++; -+ else -+ { -+ bool flag = 0; -+ -+ if (ignore_case) -+ { -+ lo_wc = towlower (wc); -+ if (lo_wc != wc) -+ { -+ flag = 1; -+ -+ p += mblength; -+ memset (&state_wc, '\0', sizeof(mbstate_t)); -+ mblength = wcrtomb (mbc, lo_wc, &state_wc); -+ -+ assert (mblength != (size_t)-1 && -+ mblength != (size_t)-2); -+ -+ mblength = (mblength < 1) ? 1 : mblength; -+ } -+ } -+ -+ if (!flag) -+ { -+ for (i = 0; i < mblength; i++) -+ mbc[i] = *p++; -+ } -+ } -+ -+ for (i = 0; i < mblength; i++) -+ h = HASH (h, mbc[i]); -+ } -+ break; -+ -+ case IGNORE_TAB_EXPANSION: -+ { -+ size_t column = 0; -+ -+ while (1) -+ { -+ if (*p == '\n') -+ { -+ ++p; -+ break; -+ } -+ -+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail); -+ -+ if (convfail) -+ { -+ h = HASH (h, *p++); -+ ++column; -+ } -+ else -+ { -+ bool flag; -+ -+ switch (wc) -+ { -+ case L'\b': -+ column -= 0 < column; -+ h = HASH (h, '\b'); -+ ++p; -+ break; -+ -+ case L'\t': -+ { -+ int repetitions; -+ -+ repetitions = TAB_WIDTH - column % TAB_WIDTH; -+ column += repetitions; -+ do -+ h = HASH (h, ' '); -+ while (--repetitions != 0); -+ ++p; -+ } -+ break; -+ -+ case L'\r': -+ column = 0; -+ h = HASH (h, '\r'); -+ ++p; -+ break; -+ -+ default: -+ flag = 0; -+ column += wcwidth (wc); -+ if (ignore_case) -+ { -+ lo_wc = towlower (wc); -+ if (lo_wc != wc) -+ { -+ flag = 1; -+ p += mblength; -+ memset (&state_wc, '\0', sizeof(mbstate_t)); -+ mblength = wcrtomb (mbc, lo_wc, &state_wc); -+ -+ assert (mblength != (size_t)-1 && -+ mblength != (size_t)-2); -+ -+ mblength = (mblength < 1) ? 1 : mblength; -+ } -+ } -+ -+ if (!flag) -+ { -+ for (i = 0; i < mblength; i++) -+ mbc[i] = *p++; -+ } -+ -+ for (i = 0; i < mblength; i++) -+ h = HASH (h, mbc[i]); -+ } -+ } -+ } -+ } -+ break; -+ -+ default: -+ while (1) -+ { -+ if (*p == '\n') -+ { -+ ++p; -+ break; -+ } -+ -+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail); -+ -+ if (convfail) -+ mbc[0] = *p++; -+ else -+ { -+ int flag = 0; -+ -+ if (ignore_case) -+ { -+ lo_wc = towlower (wc); -+ if (lo_wc != wc) -+ { -+ flag = 1; -+ p += mblength; -+ memset (&state_wc, '\0', sizeof(mbstate_t)); -+ mblength = wcrtomb (mbc, lo_wc, &state_wc); -+ -+ assert (mblength != (size_t)-1 && -+ mblength != (size_t)-2); -+ -+ mblength = (mblength < 1) ? 1 : mblength; -+ } -+ } -+ -+ if (!flag) -+ { -+ for (i = 0; i < mblength; i++) -+ mbc[i] = *p++; -+ } -+ } -+ -+ for (i = 0; i < mblength; i++) -+ h = HASH (h, mbc[i]); -+ } -+ } -+ } -+ else -+#endif -+ - /* Hash this line until we find a newline. */ - if (ignore_case) - switch (ignore_white_space) ---- diffutils-2.9/src/side.c 2010-02-05 09:10:15.000000000 +0100 -+++ diffutils-2.9.mod/src/side.c 2010-02-13 15:51:32.647221551 +0100 -@@ -77,11 +77,74 @@ - register char const *text_limit = line[1]; - mbstate_t mbstate = { 0 }; - -+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H -+ unsigned char mbc[MB_LEN_MAX]; -+ wchar_t wc; -+ mbstate_t state, state_bak; -+ size_t mbc_pos, mblength; -+ int mbc_loading_flag = 0; -+ int wc_width; -+ -+ memset (&state, '\0', sizeof (mbstate_t)); -+#endif -+ - while (text_pointer < text_limit) - { - char const *tp0 = text_pointer; - register char c = *text_pointer++; - -+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H -+ if (MB_CUR_MAX > 1 && mbc_loading_flag) -+ { -+ mbc_loading_flag = 0; -+ state_bak = state; -+ mbc[mbc_pos++] = c; -+ -+process_mbc: -+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state); -+ -+ switch (mblength) -+ { -+ case (size_t)-2: /* Incomplete multibyte character. */ -+ mbc_loading_flag = 1; -+ state = state_bak; -+ break; -+ -+ case (size_t)-1: /* Invalid as a multibyte character. */ -+ if (in_position++ < out_bound) -+ { -+ out_position = in_position; -+ putc (mbc[0], out); -+ } -+ memmove (mbc, mbc + 1, --mbc_pos); -+ if (mbc_pos > 0) -+ { -+ mbc[mbc_pos] = '\0'; -+ goto process_mbc; -+ } -+ break; -+ -+ default: -+ wc_width = wcwidth (wc); -+ if (wc_width < 1) /* Unprintable multibyte character. */ -+ { -+ if (in_position <= out_bound) -+ fprintf (out, "%lc", (wint_t)wc); -+ } -+ else /* Printable multibyte character. */ -+ { -+ in_position += wc_width; -+ if (in_position <= out_bound) -+ { -+ out_position = in_position; -+ fprintf (out, "%lc", (wint_t)wc); -+ } -+ } -+ } -+ continue; -+ } -+#endif -+ - switch (c) - { - case '\t': ---- diffutils-2.9/src/util.c 2010-02-11 10:39:17.000000000 +0100 -+++ diffutils-2.9.mod/src/util.c 2010-02-13 16:08:16.065232588 +0100 -@@ -309,7 +309,7 @@ - - outfile = 0; - } -- -+ - /* Compare two lines (typically one from each input file) - according to the command line options. - For efficiency, this is invoked only when the lines do not match exactly -@@ -317,7 +317,7 @@ - Return nonzero if the lines differ. */ - - bool --lines_differ (char const *s1, char const *s2) -+lines_differ_singlebyte (char const *s1, char const *s2) - { - register char const *t1 = s1; - register char const *t2 = s2; -@@ -446,7 +446,294 @@ - - return true; - } -- -+ -+#ifdef HANDLE_MULTIBYTE -+# define MBC2WC(T, END, MBLENGTH, WC, STATE, CONVFAIL) \ -+do \ -+{ \ -+ mbstate_t bak = STATE; \ -+ \ -+ CONVFAIL = 0; \ -+ MBLENGTH = mbrtowc (&WC, T, END - T, &STATE); \ -+ \ -+ switch (MBLENGTH) \ -+ { \ -+ case (size_t)-2: \ -+ case (size_t)-1: \ -+ STATE = bak; \ -+ ++CONVFAIL; \ -+ /* Fall through. */ \ -+ case 0: \ -+ MBLENGTH = 1; \ -+ } \ -+} \ -+while (0) -+ -+bool -+lines_differ_multibyte (char const *s1, char const *s2) -+{ -+ unsigned char const *end1, *end2; -+ unsigned char c1, c2; -+ wchar_t wc1, wc2, wc1_bak, wc2_bak; -+ size_t mblen1, mblen2; -+ mbstate_t state1, state2, state1_bak, state2_bak; -+ int convfail1, convfail2, convfail1_bak, convfail2_bak; -+ -+ unsigned char const *t1 = (unsigned char const *) s1; -+ unsigned char const *t2 = (unsigned char const *) s2; -+ unsigned char const *t1_bak, *t2_bak; -+ size_t column = 0; -+ -+ if (ignore_white_space == IGNORE_NO_WHITE_SPACE && !ignore_case) -+ { -+ while (*t1 != '\n') -+ if (*t1++ != * t2++) -+ return 1; -+ return 0; -+ } -+ -+ memset (&state1, '\0', sizeof (mbstate_t)); -+ memset (&state2, '\0', sizeof (mbstate_t)); -+ -+ end1 = s1 + strlen (s1); -+ end2 = s2 + strlen (s2); -+ -+ while (1) -+ { -+ c1 = *t1; -+ c2 = *t2; -+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1); -+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2); -+ -+ /* Test for exact char equality first, since it's a common case. */ -+ if (convfail1 ^ convfail2) -+ break; -+ else if (convfail1 && convfail2 && c1 != c2) -+ break; -+ else if (!convfail1 && !convfail2 && wc1 != wc2) -+ { -+ switch (ignore_white_space) -+ { -+ case IGNORE_ALL_SPACE: -+ /* For -w, just skip past any white space. */ -+ while (1) -+ { -+ if (convfail1) -+ break; -+ else if (wc1 == L'\n' || !iswspace (wc1)) -+ break; -+ -+ t1 += mblen1; -+ c1 = *t1; -+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1); -+ } -+ -+ while (1) -+ { -+ if (convfail2) -+ break; -+ else if (wc2 == L'\n' || !iswspace (wc2)) -+ break; -+ -+ t2 += mblen2; -+ c2 = *t2; -+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2); -+ } -+ t1 += mblen1; -+ t2 += mblen2; -+ break; -+ -+ case IGNORE_SPACE_CHANGE: -+ /* For -b, advance past any sequence of white space in -+ line 1 and consider it just one space, or nothing at -+ all if it is at the end of the line. */ -+ if (wc1 != L'\n' && iswspace (wc1)) -+ { -+ size_t mblen_bak; -+ mbstate_t state_bak; -+ -+ do -+ { -+ t1 += mblen1; -+ mblen_bak = mblen1; -+ state_bak = state1; -+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1); -+ } -+ while (!convfail1 && (wc1 != L'\n' && iswspace (wc1))); -+ -+ state1 = state_bak; -+ mblen1 = mblen_bak; -+ t1 -= mblen1; -+ convfail1 = 0; -+ wc1 = L' '; -+ } -+ -+ /* Likewise for line 2. */ -+ if (wc2 != L'\n' && iswspace (wc2)) -+ { -+ size_t mblen_bak; -+ mbstate_t state_bak; -+ -+ do -+ { -+ t2 += mblen2; -+ mblen_bak = mblen2; -+ state_bak = state2; -+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2); -+ } -+ while (!convfail2 && (wc2 != L'\n' && iswspace (wc2))); -+ -+ state2 = state_bak; -+ mblen2 = mblen_bak; -+ t2 -= mblen2; -+ convfail2 = 0; -+ wc2 = L' '; -+ } -+ -+ if (wc1 != wc2) -+ { -+ if (wc2 == L' ' && wc1 != L'\n' && -+ t1 > (unsigned char const *)s1 && -+ !convfail1_bak && iswspace (wc1_bak)) -+ { -+ t1 = t1_bak; -+ wc1 = wc1_bak; -+ state1 = state1_bak; -+ convfail1 = convfail1_bak; -+ continue; -+ } -+ if (wc1 == L' ' && wc2 != L'\n' -+ && t2 > (unsigned char const *)s2 -+ && !convfail2_bak && iswspace (wc2_bak)) -+ { -+ t2 = t2_bak; -+ wc2 = wc2_bak; -+ state2 = state2_bak; -+ convfail2 = convfail2_bak; -+ continue; -+ } -+ } -+ -+ t1_bak = t1; t2_bak = t2; -+ wc1_bak = wc1; wc2_bak = wc2; -+ state1_bak = state1; state2_bak = state2; -+ convfail1_bak = convfail1; convfail2_bak = convfail2; -+ -+ if (wc1 == L'\n') -+ wc1 = L' '; -+ else -+ t1 += mblen1; -+ -+ if (wc2 == L'\n') -+ wc2 = L' '; -+ else -+ t2 += mblen2; -+ -+ break; -+ -+ case IGNORE_TAB_EXPANSION: -+ if ((wc1 == L' ' && wc2 == L'\t') -+ || (wc1 == L'\t' && wc2 == L' ')) -+ { -+ size_t column2 = column; -+ -+ while (1) -+ { -+ if (convfail1) -+ { -+ ++t1; -+ break; -+ } -+ else if (wc1 == L' ') -+ column++; -+ else if (wc1 == L'\t') -+ column += TAB_WIDTH - column % TAB_WIDTH; -+ else -+ { -+ t1 += mblen1; -+ break; -+ } -+ -+ t1 += mblen1; -+ c1 = *t1; -+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1); -+ } -+ -+ while (1) -+ { -+ if (convfail2) -+ { -+ ++t2; -+ break; -+ } -+ else if (wc2 == L' ') -+ column2++; -+ else if (wc2 == L'\t') -+ column2 += TAB_WIDTH - column2 % TAB_WIDTH; -+ else -+ { -+ t2 += mblen2; -+ break; -+ } -+ -+ t2 += mblen2; -+ c2 = *t2; -+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2); -+ } -+ -+ if (column != column2) -+ return 1; -+ } -+ else -+ { -+ t1 += mblen1; -+ t2 += mblen2; -+ } -+ break; -+ -+ case IGNORE_NO_WHITE_SPACE: -+ t1 += mblen1; -+ t2 += mblen2; -+ break; -+ } -+ -+ /* Lowercase all letters if -i is specified. */ -+ if (ignore_case) -+ { -+ if (!convfail1) -+ wc1 = towlower (wc1); -+ if (!convfail2) -+ wc2 = towlower (wc2); -+ } -+ -+ if (convfail1 ^ convfail2) -+ break; -+ else if (convfail1 && convfail2 && c1 != c2) -+ break; -+ else if (!convfail1 && !convfail2 && wc1 != wc2) -+ break; -+ } -+ else -+ { -+ t1_bak = t1; t2_bak = t2; -+ wc1_bak = wc1; wc2_bak = wc2; -+ state1_bak = state1; state2_bak = state2; -+ convfail1_bak = convfail1; convfail2_bak = convfail2; -+ -+ t1 += mblen1; t2 += mblen2; -+ } -+ -+ if (!convfail1 && wc1 == L'\n') -+ return 0; -+ -+ column += convfail1 ? 1 : -+ (wc1 == L'\t') ? TAB_WIDTH - column % TAB_WIDTH : wcwidth (wc1); -+ } -+ -+ return 1; -+} -+#endif -+ - /* Find the consecutive changes at the start of the script START. - Return the last link before the first gap. */ - diff --git a/pkgs/toolchain/file/file.nm b/pkgs/toolchain/file/file.nm deleted file mode 100644 index 1bbafe8..0000000 --- a/pkgs/toolchain/file/file.nm +++ /dev/null @@ -1,17 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/file/file.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --disable-static - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make install -endef diff --git a/pkgs/toolchain/findutils/findutils.nm b/pkgs/toolchain/findutils/findutils.nm deleted file mode 100644 index aae8c38..0000000 --- a/pkgs/toolchain/findutils/findutils.nm +++ /dev/null @@ -1,17 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/findutils/findutils.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --libexecdir=$(TOOLS_DIR)/lib/findutils - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make install -endef diff --git a/pkgs/toolchain/gawk/gawk.nm b/pkgs/toolchain/gawk/gawk.nm deleted file mode 100644 index e3530ff..0000000 --- a/pkgs/toolchain/gawk/gawk.nm +++ /dev/null @@ -1,14 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/gawk/gawk.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ac_cv_func_working_mktime=yes \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --libexecdir=$(TOOLS_DIR)/lib - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef diff --git a/pkgs/toolchain/gcc-static/gcc-static.nm b/pkgs/toolchain/gcc-static/gcc-static.nm deleted file mode 100644 index aab6c8e..0000000 --- a/pkgs/toolchain/gcc-static/gcc-static.nm +++ /dev/null @@ -1,61 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += binutils-static - -include ../../core/gcc/gcc.nm - -GMP = gmp-5.0.1 -MPC = mpc-0.8.2 -MPFR = mpfr-3.0.0 - -PKG_OBJECTS += $(GMP).tar.bz2 $(MPC).tar.gz $(MPFR).tar.gz - -define STAGE_PREPARE_CMDS - -mkdir -pv $(DIR_SRC)/gcc-build - - cd $(DIR_APP) && $(DO_EXTRACT) $(DIR_DL)/$(GMP).tar.bz2 - cd $(DIR_APP) && $(DO_EXTRACT) $(DIR_DL)/$(MPC).tar.gz - cd $(DIR_APP) && $(DO_EXTRACT) $(DIR_DL)/$(MPFR).tar.gz - cd $(DIR_APP) && ln -svf $(GMP) gmp - cd $(DIR_APP) && ln -svf $(MPC) mpc - cd $(DIR_APP) && ln -svf $(MPFR) mpfr -endef - -define STAGE_BUILD - ## Enable -fPIC by default - cd $(DIR_APP) && sed 's/^(#define CC1_SPEC.*)(")$$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \ - -i gcc/config/i386/linux.h - cd $(DIR_APP) && sed 's/^(#define CC1_SPEC.*)(")$$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \ - -i gcc/config/i386/x86-64.h - - # libssp has no use with new versions of Glibc. Glibc completely replaces all - # functions in libssp, linking to libssp will cause conflicts with libc, so - # libssp is a waste of space... so --disable-libssp. - - cd $(DIR_SRC)/gcc-build && \ - ../$(THISAPP)/configure \ - --target=$(TARGET) \ - $(CONFIG_CPU) \ - --prefix=$(TOOLS_DIR) \ - --libexecdir=$(TOOLS_DIR)/lib \ - --disable-decimal-float \ - --disable-libgomp \ - --disable-libmudflap \ - --disable-libssp \ - --enable-languages=c \ - --disable-threads \ - --disable-multilib \ - --disable-shared \ - --disable-nls \ - --enable-esp \ - --without-cloog \ - --without-ppl \ - $(CONFIGURE_ARGS) - - cd $(DIR_SRC)/gcc-build && make #$(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_SRC)/gcc-build && make install - - ln -svf libgcc.a $$($(TARGET)-gcc -print-libgcc-file-name | sed -e "s/libgcc/&_eh/") -endef diff --git a/pkgs/toolchain/gcc-static/patches/gcc-4.4-optimize_linking.patch b/pkgs/toolchain/gcc-static/patches/gcc-4.4-optimize_linking.patch deleted file mode 100644 index 659586d..0000000 --- a/pkgs/toolchain/gcc-static/patches/gcc-4.4-optimize_linking.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naur gcc-4.4-20100216.orig/gcc/config/i386/linux.h gcc-4.4-20100216/gcc/config/i386/linux.h ---- gcc-4.4-20100216.orig/gcc/config/i386/linux.h 2010-02-26 17:44:46.000000000 +0000 -+++ gcc-4.4-20100216/gcc/config/i386/linux.h 2010-02-26 17:46:55.000000000 +0000 -@@ -113,7 +113,7 @@ - { "dynamic_linker", LINUX_DYNAMIC_LINKER } - - #undef LINK_SPEC --#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ -+#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} --hash-style=gnu -O1 \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ -diff -Naur gcc-4.4-20100216.orig/gcc/config/i386/linux64.h gcc-4.4-20100216/gcc/config/i386/linux64.h ---- gcc-4.4-20100216.orig/gcc/config/i386/linux64.h 2010-02-26 17:44:46.000000000 +0000 -+++ gcc-4.4-20100216/gcc/config/i386/linux64.h 2010-02-26 17:47:47.000000000 +0000 -@@ -75,7 +75,7 @@ - #endif - - #undef LINK_SPEC --#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \ -+#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=gnu -O1 \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ diff --git a/pkgs/toolchain/gcc-static/patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch b/pkgs/toolchain/gcc-static/patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch deleted file mode 100644 index f2e91dc..0000000 --- a/pkgs/toolchain/gcc-static/patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: gcc/configure -=================================================================== ---- gcc/configure (revision 162481) -+++ gcc/configure (revision 162482) -@@ -5478,7 +5478,7 @@ - if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then - gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs" - gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc" -- extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp' -+ extra_mpfr_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" - extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" - # Do not test the gmp version. Assume that it is sufficient, since - # it is in the source tree, and the library has not been built yet -Index: gcc/configure.ac -=================================================================== ---- gcc/configure.ac (revision 162481) -+++ gcc/configure.ac (revision 162482) -@@ -1354,7 +1354,7 @@ - if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then - gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs" - gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc" -- extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp' -+ extra_mpfr_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" - extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" - # Do not test the gmp version. Assume that it is sufficient, since - # it is in the source tree, and the library has not been built yet diff --git a/pkgs/toolchain/gcc-static/patches/gcc-4.5.0-piepatches-20100421.patch b/pkgs/toolchain/gcc-static/patches/gcc-4.5.0-piepatches-20100421.patch deleted file mode 100644 index e525d5b..0000000 --- a/pkgs/toolchain/gcc-static/patches/gcc-4.5.0-piepatches-20100421.patch +++ /dev/null @@ -1,1056 +0,0 @@ -diff -Nur gcc-4.5.0-vanilla/configure gcc-4.5.0/configure ---- gcc-4.5.0-vanilla/configure 2010-04-02 19:35:47.000000000 +0200 -+++ gcc-4.5.0/configure 2010-04-21 15:21:09.762948361 +0200 -@@ -707,6 +707,7 @@ - CFLAGS - CC - target_subdir -+enable_esp - host_subdir - build_subdir - build_libsubdir -@@ -1485,6 +1486,11 @@ - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-gold use gold instead of ld - --enable-libada build libada directory -+ --enable-esp -+ Enable Stack protector, Position independent executable and -+ Fortify_sources as default if we have suppot for it when compiling -+ and link with -z relro and -z now as default. -+ Linux targets supported i*86, x86_64, powerpc*, ia64, arm* and mips - --enable-libssp build libssp directory - --enable-build-with-cxx build with C++ compiler instead of C compiler - --disable-ppl-version-check disable check for PPL version -@@ -3164,6 +3170,24 @@ - noconfigdirs="$noconfigdirs gnattools" - fi - -+# Check whether --enable-esp was given and target have the support. -+# Check whether --enable-esp or --disable-esp was given. -+if test "${enable_esp+set}" = set; then -+ enableval="$enable_esp" -+ -+ case $target in -+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux* | mips-*-linux*) -+ enable_esp=yes -+ ;; -+ *) -+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported on this $target target." >&5 -+echo "$as_me: error: *** --enable-esp is not supported on this $target target." >&2;} -+ { (exit 1); exit 1; }; } -+ ;; -+ esac -+ -+fi; -+ - # Check whether --enable-libssp was given. - if test "${enable_libssp+set}" = set; then : - enableval=$enable_libssp; ENABLE_LIBSSP=$enableval -@@ -14290,6 +14314,9 @@ - *) stage1_cflags="-g -J" ;; - esac ;; - esac -+if test x$enable_esp = xyes; then -+ stage1_cflags="$stage1_cflags -fno-stack-protector" -+fi - - # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. - if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then -diff -Nur gcc-4.5.0-vanilla/gcc/config/i386/linux64.h gcc-4.5.0/gcc/config/i386/linux64.h ---- gcc-4.5.0-vanilla/gcc/config/i386/linux64.h 2010-03-24 21:44:48.000000000 +0100 -+++ gcc-4.5.0/gcc/config/i386/linux64.h 2010-04-21 15:21:16.730815972 +0200 -@@ -115,7 +115,7 @@ - /* This macro may be overridden in i386/k*bsd-gnu.h. */ - #define REG_NAME(reg) reg - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* i386 glibc provides __stack_chk_guard in %gs:0x14, - x86_64 glibc provides it in %fs:0x28. */ - #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) -diff -Nur gcc-4.5.0-vanilla/gcc/config/i386/linux.h gcc-4.5.0/gcc/config/i386/linux.h ---- gcc-4.5.0-vanilla/gcc/config/i386/linux.h 2010-03-24 21:44:48.000000000 +0100 -+++ gcc-4.5.0/gcc/config/i386/linux.h 2010-04-21 15:21:16.721813554 +0200 -@@ -212,7 +212,7 @@ - /* This macro may be overridden in i386/k*bsd-gnu.h. */ - #define REG_NAME(reg) reg - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* i386 glibc provides __stack_chk_guard in %gs:0x14. */ - #define TARGET_THREAD_SSP_OFFSET 0x14 - #endif -diff -Nur gcc-4.5.0-vanilla/gcc/config/linux.h gcc-4.5.0/gcc/config/linux.h ---- gcc-4.5.0-vanilla/gcc/config/linux.h 2009-04-09 17:00:19.000000000 +0200 -+++ gcc-4.5.0/gcc/config/linux.h 2010-04-21 15:21:16.667815357 +0200 -@@ -43,7 +43,11 @@ - object constructed before entering `main'. */ - - #undef STARTFILE_SPEC --#if defined HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) -+#define STARTFILE_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \ -+ %{static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) - #define STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" -diff -Nur gcc-4.5.0-vanilla/gcc/config/rs6000/linux64.h gcc-4.5.0/gcc/config/rs6000/linux64.h ---- gcc-4.5.0-vanilla/gcc/config/rs6000/linux64.h 2010-03-17 05:44:37.000000000 +0100 -+++ gcc-4.5.0/gcc/config/rs6000/linux64.h 2010-04-21 15:21:16.732816308 +0200 -@@ -162,7 +162,7 @@ - #endif - - #define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \ --%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \ -+%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \ - %{memb} %{!memb: %{msdata=eabi: -memb}} \ - %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ - %{mcall-freebsd: -mbig} \ -@@ -525,7 +525,7 @@ - - #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* ppc32 glibc provides __stack_chk_guard in -0x7008(2), - ppc64 glibc provides it at -0x7010(13). */ - #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008) -diff -Nur gcc-4.5.0-vanilla/gcc/config/rs6000/linux.h gcc-4.5.0/gcc/config/rs6000/linux.h ---- gcc-4.5.0-vanilla/gcc/config/rs6000/linux.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.5.0/gcc/config/rs6000/linux.h 2010-04-21 15:21:16.731819651 +0200 -@@ -117,7 +117,7 @@ - - #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* ppc32 glibc provides __stack_chk_guard in -0x7008(2). */ - #define TARGET_THREAD_SSP_OFFSET -0x7008 - #endif -diff -Nur gcc-4.5.0-vanilla/gcc/config/rs6000/sysv4.h gcc-4.5.0/gcc/config/rs6000/sysv4.h ---- gcc-4.5.0-vanilla/gcc/config/rs6000/sysv4.h 2009-11-25 21:23:20.000000000 +0100 -+++ gcc-4.5.0/gcc/config/rs6000/sysv4.h 2010-04-21 15:21:16.674812959 +0200 -@@ -883,7 +883,12 @@ - %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ - %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" - --#ifdef HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) -+#define STARTFILE_LINUX_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ -+ %{mnewlib:ecrti.o%s;:crti.o%s} \ -+ {static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) - #define STARTFILE_LINUX_SPEC "\ - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - %{mnewlib:ecrti.o%s;:crti.o%s} \ -diff -Nur gcc-4.5.0-vanilla/gcc/config/s390/linux.h gcc-4.5.0/gcc/config/s390/linux.h ---- gcc-4.5.0-vanilla/gcc/config/s390/linux.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.5.0/gcc/config/s390/linux.h 2010-04-21 15:21:16.738814124 +0200 -@@ -93,7 +93,7 @@ - - #define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h" - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* s390 glibc provides __stack_chk_guard in 0x14(tp), - s390x glibc provides it at 0x28(tp). */ - #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) -diff -Nur gcc-4.5.0-vanilla/gcc/config/sparc/linux64.h gcc-4.5.0/gcc/config/sparc/linux64.h ---- gcc-4.5.0-vanilla/gcc/config/sparc/linux64.h 2009-12-08 00:31:01.000000000 +0100 -+++ gcc-4.5.0/gcc/config/sparc/linux64.h 2010-04-21 15:21:16.749816158 +0200 -@@ -298,7 +298,7 @@ - #undef NEED_INDICATE_EXEC_STACK - #define NEED_INDICATE_EXEC_STACK 1 - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14], - sparc64 glibc provides it at [%g7 + 0x28]. */ - #define TARGET_THREAD_SSP_OFFSET (TARGET_ARCH64 ? 0x28 : 0x14) -diff -Nur gcc-4.5.0-vanilla/gcc/config/sparc/linux.h gcc-4.5.0/gcc/config/sparc/linux.h ---- gcc-4.5.0-vanilla/gcc/config/sparc/linux.h 2009-12-08 00:31:01.000000000 +0100 -+++ gcc-4.5.0/gcc/config/sparc/linux.h 2010-04-21 15:21:16.746815839 +0200 -@@ -172,7 +172,7 @@ - #undef NEED_INDICATE_EXEC_STACK - #define NEED_INDICATE_EXEC_STACK 1 - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14]. */ - #define TARGET_THREAD_SSP_OFFSET 0x14 - #endif -diff -Nur gcc-4.5.0-vanilla/gcc/config.in gcc-4.5.0/gcc/config.in ---- gcc-4.5.0-vanilla/gcc/config.in 2010-04-14 11:30:07.000000000 +0200 -+++ gcc-4.5.0/gcc/config.in 2010-04-21 15:21:09.879812904 +0200 -@@ -52,6 +52,12 @@ - #endif - - -+/* Define to 1 to enable crtbeginTS.o. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_CRTBEGINTS -+#endif -+ -+ - /* Define to 1 to specify that we are using the BID decimal floating point - format instead of DPD */ - #ifndef USED_FOR_TARGET -@@ -71,6 +77,12 @@ - #endif - - -+/* Define to 1 to enable esp. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_ESP -+#endif -+ -+ - /* Define to 1 to enable fixed-point arithmetic extension to C. */ - #ifndef USED_FOR_TARGET - #undef ENABLE_FIXED_POINT -@@ -996,6 +1008,12 @@ - #endif - - -+/* Define to 1 if your compiler supports -fstack-protector */ -+#ifndef USED_FOR_TARGET -+#undef HAVE_GCC_SSP -+#endif -+ -+ - /* Define to 1 if you have the `getchar_unlocked' function. */ - #ifndef USED_FOR_TARGET - #undef HAVE_GETCHAR_UNLOCKED -diff -Nur gcc-4.5.0-vanilla/gcc/configure gcc-4.5.0/gcc/configure ---- gcc-4.5.0-vanilla/gcc/configure 2010-03-26 06:40:32.000000000 +0100 -+++ gcc-4.5.0/gcc/configure 2010-04-21 15:21:09.784072083 +0200 -@@ -678,6 +678,8 @@ - HOST_LIBS - GGC - libgcc_visibility -+enable_esp -+enable_crtbeginTS - gcc_cv_readelf - gcc_cv_objdump - ORIGINAL_NM_FOR_TARGET -@@ -24576,6 +24578,50 @@ - ;; - esac - -+echo "$as_me:$LINENO: checking linker -z now support" >&5 -+echo $ECHO_N "checking linker -z now support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_now+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_now=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_now=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z now options -+ if $gcc_cv_ld --help 2>/dev/null | grep now > /dev/null; then -+ gcc_cv_ld_now=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_now" >&5 -+echo "${ECHO_T}$gcc_cv_ld_now" >&6 -+ -+echo "$as_me:$LINENO: checking linker -z relro support" >&5 -+echo $ECHO_N "checking linker -z relro support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_relro+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_relro=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_relro=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z relro and -z norelro options -+ if $gcc_cv_ld --help 2>/dev/null | grep relro > /dev/null; then -+ gcc_cv_ld_relro=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_relro" >&5 -+echo "${ECHO_T}$gcc_cv_ld_relro" >&6 -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5 - $as_echo_n "checking linker --build-id support... " >&6; } - if test "${gcc_cv_ld_buildid+set}" = set; then : -@@ -24729,6 +24775,146 @@ - - fi - -+if test x$gcc_cv_libc_provides_ssp = xyes; then -+ echo "$as_me:$LINENO: checking whether $CC support -fstack-protector" >&5 -+echo $ECHO_N "checking whether $CC support -fstack-protector... $ECHO_C" >&6 -+if test "${gcc_cv_cc_stack_protector+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+ saved_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -fstack-protector" -+ cat >conftest.$ac_ext <<_ACEOF -+#ifndef __SSP__ -+#error -+#endif -+ -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: $? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: $? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: $? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ -+ case $target in -+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux*) -+ if test x$set_have_as_tls = xyes; then -+ gcc_cv_cc_stack_protector=yes -+ else -+ gcc_cv_cc_stack_protector=no -+ fi -+ ;; -+ *) -+ cc_cv_cc_stack_protector=yes -+ ;; -+ esac -+ -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gcc_cv_cc_stack_protector=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ CFLAGS="$saved_CFLAGS" -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_cc_stack_protector" >&5 -+echo "${ECHO_T}$gcc_cv_cc_stack_protector" >&6 -+fi -+if test x$gcc_cv_cc_stack_protector = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_GCC_SSP 1 -+_ACEOF -+ -+fi -+ -+ -+if test x$enable_esp = xyes ; then -+case $target in -+ ia64*-*-linux*) -+ if test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_relro = xyes && test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *) -+ enable_esp_ld=no -+ ;; -+ esac -+else -+ enable_esp_ld=no -+fi -+if test x$enable_esp_ld = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_ESP 1 -+_ACEOF -+ -+fi -+if test x$enable_esp = xyes && test x$enable_esp_ld = xno; then -+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&5 -+echo "$as_me: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+echo "$as_me:$LINENO: checking for crtbeginTS.o support" >&5 -+echo $ECHO_N "checking for crtbeginTS.o support... $ECHO_C" >&6 -+if test "${enable_crtbeginTS+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+if test x$enable_esp = xyes ; then -+ case "$target" in -+ ia64*-*-linux*) -+ enable_crtbeginTS=no ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then -+ enable_crtbeginTS=yes -+ fi -+ ;; -+ *) enable_crtbeginTS=no ;; -+ esac -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $enable_crtbeginTS" >&5 -+echo "${ECHO_T}$enable_crtbeginTS" >&6 -+ -+if test x$enable_crtbeginTS = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_CRTBEGINTS 1 -+_ACEOF -+ -+fi -+ - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 - # and later they can use TFmode. -diff -Nur gcc-4.5.0-vanilla/gcc/cp/lang-specs.h gcc-4.5.0/gcc/cp/lang-specs.h ---- gcc-4.5.0-vanilla/gcc/cp/lang-specs.h 2007-08-06 13:10:19.000000000 +0200 -+++ gcc-4.5.0/gcc/cp/lang-specs.h 2010-04-21 15:21:16.684816335 +0200 -@@ -47,7 +47,7 @@ - %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\ - cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - %{!fsyntax-only:-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {"@c++", -@@ -57,11 +57,11 @@ - %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\ - cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".ii", "@c++-cpp-output", 0, 0, 0}, - {"@c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ -+ cc1plus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.5.0-vanilla/gcc/doc/invoke.texi gcc-4.5.0/gcc/doc/invoke.texi ---- gcc-4.5.0-vanilla/gcc/doc/invoke.texi 2010-04-06 16:02:22.000000000 +0200 -+++ gcc-4.5.0/gcc/doc/invoke.texi 2010-04-21 15:21:16.796812184 +0200 -@@ -7856,6 +7856,11 @@ - @opindex fstack-protector-all - Like @option{-fstack-protector} except that all functions are protected. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector} -+or @option{-nostdlib} or @option{-nodefaultlibs} or -+@option{-fstack-protector} are found. -+ - @item -fsection-anchors - @opindex fsection-anchors - Try to reduce the number of symbolic address calculations by using -@@ -8705,6 +8710,12 @@ - that were used to generate code (@option{-fpie}, @option{-fPIE}, - or model suboptions) when you specify this option. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p} -+are found. -+ - @item -rdynamic - @opindex rdynamic - Pass the flag @option{-export-dynamic} to the ELF linker, on targets -@@ -17251,6 +17262,11 @@ - @code{__pie__} and @code{__PIE__}. The macros have the value 1 - for @option{-fpie} and 2 for @option{-fPIE}. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} are found. -+ - @item -fno-jump-tables - @opindex fno-jump-tables - Do not use jump tables for switch statements even where it would be -diff -Nur gcc-4.5.0-vanilla/gcc/esp.h gcc-4.5.0/gcc/esp.h ---- gcc-4.5.0-vanilla/gcc/esp.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.5.0/gcc/esp.h 2010-04-21 15:21:16.622811922 +0200 -@@ -0,0 +1,148 @@ -+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. -+ * Version 20100409.1 -+ * Magnus Granberg (Zorry) zorry@gentoo.org */ -+#ifndef GCC_ESP_H -+#define GCC_ESP_H -+ -+/* This file will add -fstack-protector, -fPIE, -pie -D_FORTIFY_SOURCES=2 -z,relro and -z,now -+ as default if the defines and the spec allow it. -+ -+ On Gentoo -+ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass -+ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. -+ We use -fstack-protector-all instead of -fstack-protector -+ This will add some unsupported upstream commands options as -nopie. -+ -D__KERNEL__ is added so we don't have -fPIE and -fstack-protector-all when building kernels. -+ ESP_CC1_SPEC is added to CC1_SPEC. -+ -D_FORTIFY_SOURCES=2 is added with gentoo's patchset as default so no need to set it hear. -+ ESP_LINK_SPEC will not add -z,relro as it default on with binutils. -+ ESP_CC1_STRICT_SPEC is added so we don't use gcc/opts.c to disable it. -+ ESP_OPTIONS_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile, -static and -shared. -+ ENABLE_CRTBEGINTS add support for crtbeginTS.o, build -static with -fPIE or -fpie. -+*/ -+#ifdef ENABLE_ESP -+ -+ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */ -+ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict)" -+ #ifdef HAVE_GCC_SSP -+ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: }}" -+ #else -+ #define ESP_CC1_SSP_SPEC "" -+ #endif -+ #define ESP_CC1_PIE_SPEC "%{!nopie: }" -+ #define ESP_CC1_STRICT_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}" -+ -+ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable -+ -z now will be added if we don't have -vanilla spec */ -+ #define ESP_LINK_SPEC "%(esp_link_now)" -+ #define ESP_LINK_NOW_SPEC "%{!now:-z now}" -+ -+ /* ESP_OPTIONS_SPEC is added to the compiler spec in gcc/gcc.c */ -+ #define ESP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* ESP_CPP_OPTIONS_SPEC is added to the cpp_options spec in gcc/gcc.c -+ For precompiling headers. */ -+ #define ESP_CPP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector -+ -fstack-protector-all and we have TARGET_LIBC_PROVIDES_SSP and HAVE_GCC_SSP defined. */ -+ #ifdef HAVE_GCC_SSP -+ #define ESP_OPTIONS_SSP_SPEC \ -+ "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \ -+ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}" -+ #else -+ #define ESP_OPTIONS_SSP_SPEC "" -+ #endif -+ -+ /* If HAVE_LD_PIE not defined we will not add any -fPIE -pie */ -+ #ifdef HAVE_LD_PIE -+ -+ /* We use ESP_COMMAND_OPTIONS_SPEC to add pie command-line options. */ -+ #define ESP_COMMAND_OPTIONS_SPEC "%{!D__KERNEL__:%{!nopie:%(esp_options_pie) %(esp_link_pie)}}" -+ -+ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -+ -nostdlib -nostartfiles. */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" -+ #else -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" -+ #endif -+ -+ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib -+ -nostartfiles */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static -+ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" -+ #else -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" -+ #endif -+ -+ /* This will check if shared is set when -static -pie -fPIE -fpie -fno-PIC -fno-pic, -pie is set when -static -pg -p -profile. -+ If set it will make gcc print out "-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible" or -+ "-pie and pg|p|profile are incompatible" */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_OPTIONS_PIE_CHECK_SPEC \ -+ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \ -+ %{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible}}" -+ #else -+ #define ESP_OPTIONS_PIE_CHECK_SPEC \ -+ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \ -+ %{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible}}" -+ #endif -+ -+ /* We don't pass -pie to the linker when -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link) " -+ #else -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) " -+ #endif -+ -+ #else -+ #define ESP_OPTIONS_PIE_SPEC "" -+ #define ESP_OPTIONS_PIE_CHECK_SPEC "" -+ #define ESP_LINK_PIE_SPEC "" -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) " -+ #endif -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_cc1", ESP_CC1_SPEC }, \ -+ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ -+ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ -+ { "esp_cc1_strict", ESP_CC1_STRICT_SPEC }, \ -+ { "esp_link", ESP_LINK_SPEC }, \ -+ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ -+ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ -+ { "esp_command_options", ESP_COMMAND_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC }, \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ -+ { "esp_options_pie_check", ESP_OPTIONS_PIE_CHECK_SPEC }, \ -+ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } -+ -+ static const char *esp_command_options_spec = ESP_COMMAND_OPTIONS_SPEC; -+ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; -+ -+#else /* If not ESP_ENABLE defined do this. */ -+ -+ #define ESP_OPTIONS_SPEC "" -+ #define ESP_CPP_OPTIONS_SPEC "" -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC } -+ -+#endif -+#endif /* End GCC_ESP_H */ -diff -Nur gcc-4.5.0-vanilla/gcc/gcc.c gcc-4.5.0/gcc/gcc.c ---- gcc-4.5.0-vanilla/gcc/gcc.c 2010-02-11 13:23:08.000000000 +0100 -+++ gcc-4.5.0/gcc/gcc.c 2010-04-21 15:21:16.589812777 +0200 -@@ -84,6 +84,7 @@ - #include "gcc.h" - #include "flags.h" - #include "opts.h" -+#include "esp.h" /* for --enable-esp support */ - - #ifdef HAVE_MMAP_FILE - # include <sys/mman.h> -@@ -822,7 +823,9 @@ - - static const char *asm_debug; - static const char *cpp_spec = CPP_SPEC; -+#ifndef ENABLE_ESP - static const char *cc1_spec = CC1_SPEC; -+#endif - static const char *cc1plus_spec = CC1PLUS_SPEC; - static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; - static const char *link_ssp_spec = LINK_SSP_SPEC; -@@ -885,7 +888,7 @@ - static const char *cpp_options = - "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ - %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ -- %{undef} %{save-temps*:-fpch-preprocess}"; -+ %{undef} %{save-temps*:-fpch-preprocess} %(esp_cpp_options)"; - - /* This contains cpp options which are not passed when the preprocessor - output will be used by another program. */ -@@ -893,6 +896,9 @@ - - /* NB: This is shared amongst all front-ends, except for Ada. */ - static const char *cc1_options = -+#ifdef ENABLE_ESP -+"%(esp_options_pie_check)" -+#endif - "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ - %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{a*}\ - %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} \ -@@ -1075,15 +1081,15 @@ - %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ - %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ - cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ -- %(cc1_options)}\ -+ %(cc1_options) %(esp_options)}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}}\ - %{!fsyntax-only:%(invoke_as)}} \ - %{combine:\ - %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ - %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i}}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}\ - %{!fsyntax-only:%(invoke_as)}}}}}}", 0, 1, 1}, - {"-", - "%{!E:%e-E or -x required when input is from standard input}\ -@@ -1106,7 +1112,7 @@ - %W{o*:--output-pch=%*}%V}}}}}}", 0, 0, 0}, - {".i", "@cpp-output", 0, 1, 0}, - {"@cpp-output", -- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0}, -+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(esp_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0}, - {".s", "@assembler", 0, 1, 0}, - {"@assembler", - "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 1, 0}, -@@ -1699,18 +1705,23 @@ - INIT_STATIC_SPEC ("sysroot_hdrs_suffix_spec", &sysroot_hdrs_suffix_spec), - }; - --#ifdef EXTRA_SPECS /* additional specs needed */ -+/* EXTRA_SPECS needs to be defined */ -+#ifndef EXTRA_SPECS -+#define EXTRA_SPECS -+#endif -+ -+/* EXTRA_SPECS and ESP_EXTRA_SPECS add additional specs */ - /* Structure to keep track of just the first two args of a spec_list. -- That is all that the EXTRA_SPECS macro gives us. */ -+ That is all that the EXTRA_SPECS and ESP_EXTRA_SPECS macro gives us. */ - struct spec_list_1 - { - const char *const name; - const char *const ptr; - }; - --static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS }; -+/* ESP_EXTRA_SPECS before EXTRA_SPECS */ -+static const struct spec_list_1 extra_specs_1[] = { ESP_EXTRA_SPECS, EXTRA_SPECS }; - static struct spec_list *extra_specs = (struct spec_list *) 0; --#endif - - /* List of dynamically allocates specs that have been defined so far. */ - -@@ -1798,7 +1809,6 @@ - if (verbose_flag) - notice ("Using built-in specs.\n"); - --#ifdef EXTRA_SPECS - extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1)); - - for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--) -@@ -1811,7 +1821,6 @@ - sl->ptr_spec = &sl->ptr; - next = sl; - } --#endif - - for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--) - { -@@ -7111,6 +7120,12 @@ - gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str, - spec_version, dir_separator_str, NULL); - -+#ifdef ENABLE_ESP -+ /* Process ESP_COMMAND_OPTIONS_SPEC, adding any new options to the end -+ of the command line. */ -+ do_self_spec (esp_command_options_spec); -+#endif -+ - /* Now we have the specs. - Set the `valid' bits for switches that match anything in any spec. */ - -diff -Nur gcc-4.5.0-vanilla/gcc/Makefile.in gcc-4.5.0/gcc/Makefile.in ---- gcc-4.5.0-vanilla/gcc/Makefile.in 2010-04-02 09:49:06.000000000 +0200 -+++ gcc-4.5.0/gcc/Makefile.in 2010-04-21 15:21:10.033812913 +0200 -@@ -636,13 +636,24 @@ - INHIBIT_LIBC_CFLAGS = -Dinhibit_libc - endif - -+# We don't want __stack_chk_fail in crt* and libgcc2.a. -+# We don't want to compile crtbegin, crtend and crtbeginT with -fPIE. -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOPIE_CFLAGS = -fno-PIE -+ESP_NOSSP_CFLAGS = -fno-stack-protector -+else -+ESP_NOPIE_CFLAGS= -+ESP_NOSSP_CFLAGS= -+endif -+ - # Options to use when compiling libgcc2.a. - # - LIBGCC2_DEBUG_CFLAGS = -g - LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) \ - $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \ - -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ -- $(INHIBIT_LIBC_CFLAGS) -+ $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS) - - # Additional options to use when compiling libgcc2.a. - # Some targets override this to -isystem include -@@ -655,7 +666,7 @@ - CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ - -finhibit-size-directive -fno-inline -fno-exceptions \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ -- $(INHIBIT_LIBC_CFLAGS) -+ $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS) - - # Additional sources to handle exceptions; overridden by targets as needed. - LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ -@@ -685,6 +696,12 @@ - # The rules for compiling them should be in the t-* file for the machine. - EXTRA_PARTS = @extra_parts@ - -+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes -+enable_crtbeginTS = @enable_crtbeginTS@ -+ifeq ($(enable_crtbeginTS),yes) -+EXTRA_PARTS += crtbeginTS.o -+endif -+ - # List of extra object files that should be compiled and linked with - # compiler proper (cc1, cc1obj, cc1plus). - EXTRA_OBJS = @extra_objs@ -@@ -1863,9 +1880,10 @@ - echo LIBGCC_SYNC = '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars - echo LIBGCC_SYNC_CFLAGS = '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_CFLAGS = '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars -- echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars -+ echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars - echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars -+ echo enable_crtbeginTS = '$(enable_crtbeginTS)' >> tmp-libgcc.mvars - - mv tmp-libgcc.mvars libgcc.mvars - -@@ -1899,12 +1917,14 @@ - $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_BEGIN \ - -o $(T)crtbegin$(objext) - - $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_END \ - -o $(T)crtend$(objext) - -@@ -1925,9 +1945,19 @@ - $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ - -o $(T)crtbeginT$(objext) - -+# This is a version of crtbegin for -static -fPIE links if esp is enable. -+ifeq ($(enable_crtbeginTS),yes) -+$(T)crtbeginTS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ -+ gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) -+ $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \ -+ -o $(T)crtbeginTS$(objext) -+endif -+ - # Compile the start modules crt0.o and mcrt0.o that are linked with - # every program - $(T)crt0.o: s-crt0 ; @true -diff -Nur gcc-4.5.0-vanilla/gcc/objc/lang-specs.h gcc-4.5.0/gcc/objc/lang-specs.h ---- gcc-4.5.0-vanilla/gcc/objc/lang-specs.h 2007-08-02 12:37:36.000000000 +0200 -+++ gcc-4.5.0/gcc/objc/lang-specs.h 2010-04-21 15:21:16.702913793 +0200 -@@ -30,13 +30,13 @@ - %{traditional|ftraditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ -- cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ -+ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}\ - %{!save-temps:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {".mi", "@objc-cpp-output", 0, 0, 0}, - {"@objc-cpp-output", -- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objective-c-header", - "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ -@@ -45,10 +45,10 @@ - %{traditional|ftraditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ -- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj -fpreprocessed %b.mi %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}\ - %{!save-temps:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, -diff -Nur gcc-4.5.0-vanilla/gcc/objcp/lang-specs.h gcc-4.5.0/gcc/objcp/lang-specs.h ---- gcc-4.5.0-vanilla/gcc/objcp/lang-specs.h 2007-08-02 12:38:44.000000000 +0200 -+++ gcc-4.5.0/gcc/objcp/lang-specs.h 2010-04-21 15:21:16.708817730 +0200 -@@ -36,7 +36,7 @@ - %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\ - cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {"@objective-c++", -@@ -46,15 +46,15 @@ - %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\ - cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".mii", "@objective-c++-cpp-output", 0, 0, 0}, - {"@objective-c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objc++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.5.0-vanilla/gcc/varasm.c gcc-4.5.0/gcc/varasm.c ---- gcc-4.5.0-vanilla/gcc/varasm.c 2010-03-27 12:56:30.000000000 +0100 -+++ gcc-4.5.0/gcc/varasm.c 2010-04-21 15:21:16.606812404 +0200 -@@ -5961,7 +5961,11 @@ - bool is_local; - - is_local = targetm.binds_local_p (decl); -- if (!flag_shlib) -+ #ifdef ENABLE_ESP -+ if (!flag_pic) -+ #else -+ if (!flag_shlib) -+ #endif - { - if (is_local) - kind = TLS_MODEL_LOCAL_EXEC; -diff -Nur gcc-4.5.0-vanilla/libgcc/Makefile.in gcc-4.5.0/libgcc/Makefile.in ---- gcc-4.5.0-vanilla/libgcc/Makefile.in 2010-03-30 15:08:52.000000000 +0200 -+++ gcc-4.5.0/libgcc/Makefile.in 2010-04-21 15:21:10.824811514 +0200 -@@ -291,6 +291,12 @@ - gen-hide-list = echo > $@ - endif - -+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes -+enable_libgcc_crtbeginTS = $(enable_crtbeginTS) -+ifeq ($(enable_libgcc_crtbeginTS),yes) -+EXTRA_PARTS += crtbeginTS.o -+endif -+ - ifneq ($(EXTRA_PARTS),) - extra-parts = libgcc-extra-parts - INSTALL_PARTS = $(EXTRA_PARTS) -@@ -842,6 +848,13 @@ - crtbeginT.o: $(gcc_srcdir)/crtstuff.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS) \ - -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -+ -+# This is a version of crtbegin for -static -fPIE links. -+ifeq ($(enable_libgcc_crtbeginTS),yes) -+crtbeginTS.o: $(gcc_srcdir)/crtstuff.c -+ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O -+endif - endif - - # Build extra startfiles in the libgcc directory. -diff -Nur gcc-4.5.0-vanilla/libmudflap/configure gcc-4.5.0/libmudflap/configure ---- gcc-4.5.0-vanilla/libmudflap/configure 2009-12-05 18:18:53.000000000 +0100 -+++ gcc-4.5.0/libmudflap/configure 2010-04-21 15:21:09.843811773 +0200 -@@ -652,6 +652,7 @@ - MAINTAINER_MODE_FALSE - MAINTAINER_MODE_TRUE - am__untar -+enable_esp - am__tar - AMTAR - am__leading_dot -diff -Nur gcc-4.5.0-vanilla/libmudflap/Makefile.in gcc-4.5.0/libmudflap/Makefile.in ---- gcc-4.5.0-vanilla/libmudflap/Makefile.in 2010-04-02 20:18:06.000000000 +0200 -+++ gcc-4.5.0/libmudflap/Makefile.in 2010-04-21 15:21:10.844815108 +0200 -@@ -304,10 +304,18 @@ - MAINT_CHARSET = latin1 - SUBDIRS = testsuite - -+# Some stuff don't compile with PIE or SSP -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+NO_ESP_CFLAGS = -fno-stack-protector -U_FORTIFY_SOURCE -+else -+NO_ESP_CFLAGS = -+endif -+ - # May be used by various substitution variables. - gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) --AM_CFLAGS = -Wall $(SECTION_FLAGS) --@LIBMUDFLAPTH_FALSE@libmudflapth = -+AM_CFLAGS = -Wall $(SECTION_FLAGS) $(NO_ESP_CFLAGS) -+@LIBMUDFLAPTH_FALSE@libmudflapth = - @LIBMUDFLAPTH_TRUE@libmudflapth = libmudflapth.la - toolexeclib_LTLIBRARIES = libmudflap.la $(libmudflapth) - libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include -diff -Nur gcc-4.5.0-vanilla/Makefile.in gcc-4.5.0/Makefile.in ---- gcc-4.5.0-vanilla/Makefile.in 2010-02-17 12:01:44.000000000 +0100 -+++ gcc-4.5.0/Makefile.in 2010-04-21 15:21:10.022812548 +0200 -@@ -350,9 +350,17 @@ - BUILD_PREFIX = @BUILD_PREFIX@ - BUILD_PREFIX_1 = @BUILD_PREFIX_1@ - -+# Some stuff don't compile with SSP -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOSSP_CFLAGS = -fno-stack-protector -+else -+ESP_NOSSP_CFLAGS= -+endif -+ - # Flags to pass to stage2 and later makes. They are defined - # here so that they can be overridden by Makefile fragments. --BOOT_CFLAGS= -g -O2 -+BOOT_CFLAGS= -g -O2 $(ESP_NOSSP_CFLAGS) - BOOT_LDFLAGS= - BOOT_ADAFLAGS=-gnatpg -gnata - -@@ -397,9 +405,9 @@ - - CFLAGS = @CFLAGS@ - LDFLAGS = @LDFLAGS@ --LIBCFLAGS = $(CFLAGS) -+LIBCFLAGS = $(CFLAGS) $(ESP_NOSSP_CFLAGS) - CXXFLAGS = @CXXFLAGS@ --LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESP_NOSSP_CFLAGS) - - TFLAGS = - diff --git a/pkgs/toolchain/gcc/gcc.nm b/pkgs/toolchain/gcc/gcc.nm deleted file mode 100644 index 304cea7..0000000 --- a/pkgs/toolchain/gcc/gcc.nm +++ /dev/null @@ -1,50 +0,0 @@ - -include ../gcc-static/gcc-static.nm - -PKG_TOOLCHAIN_DEPS += binutils elfutils glibc - -define STAGE_PREPARE_CMDS2 - cd $(DIR_APP) && sed \ - -e "s@./fixinc.sh@-c true@" \ - -e "s/^T_CFLAGS =$$/& -fomit-frame-pointer/" \ - -i gcc/Makefile.in - - for file in $$(find $(DIR_APP)/gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h); do \ - sed -i $$file \ - -e "s@/lib(64)?(32)?/ld@$(TOOLS_DIR)&@g" \ - -e "s@/usr@$(TOOLS_DIR)@g"; \ - cat include-append >> $$file; \ - done -endef - -define STAGE_BUILD - cd $(DIR_SRC)/gcc-build && \ - AR=$(TARGET)-ar \ - CC="$(TARGET)-gcc -B$(TOOLS_DIR)/lib/" \ - RANLIB=$(TARGET)-ranlib \ - ../$(THISAPP)/configure \ - --host=$(TARGET) \ - --build=$(TARGET) \ - --prefix=$(TOOLS_DIR) \ - --libexecdir=$(TOOLS_DIR)/lib \ - --with-local-prefix=$(TOOLS_DIR) \ - --enable-clocale=gnu \ - --enable-shared \ - --enable-threads=posix \ - --enable-__cxa_atexit \ - --enable-languages=c,c++ \ - --enable-lto \ - --disable-libstdcxx-pch \ - --disable-multilib \ - --disable-libssp \ - --enable-esp \ - \ - $(CONFIG_CPU) - - cd $(DIR_SRC)/gcc-build && make #$(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_SRC)/gcc-build && make install - ln -svf gcc $(TOOLS_DIR)/bin/cc -endef diff --git a/pkgs/toolchain/gcc/include-append b/pkgs/toolchain/gcc/include-append deleted file mode 100644 index 1d5c265..0000000 --- a/pkgs/toolchain/gcc/include-append +++ /dev/null @@ -1,5 +0,0 @@ - -#undef STANDARD_INCLUDE_DIR -#define STANDARD_INCLUDE_DIR 0 -#define STANDARD_STARTFILE_PREFIX_1 "" -#define STANDARD_STARTFILE_PREFIX_2 "" diff --git a/pkgs/toolchain/gcc/patches/gcc-4.4-optimize_linking.patch b/pkgs/toolchain/gcc/patches/gcc-4.4-optimize_linking.patch deleted file mode 100644 index 659586d..0000000 --- a/pkgs/toolchain/gcc/patches/gcc-4.4-optimize_linking.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naur gcc-4.4-20100216.orig/gcc/config/i386/linux.h gcc-4.4-20100216/gcc/config/i386/linux.h ---- gcc-4.4-20100216.orig/gcc/config/i386/linux.h 2010-02-26 17:44:46.000000000 +0000 -+++ gcc-4.4-20100216/gcc/config/i386/linux.h 2010-02-26 17:46:55.000000000 +0000 -@@ -113,7 +113,7 @@ - { "dynamic_linker", LINUX_DYNAMIC_LINKER } - - #undef LINK_SPEC --#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ -+#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} --hash-style=gnu -O1 \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ -diff -Naur gcc-4.4-20100216.orig/gcc/config/i386/linux64.h gcc-4.4-20100216/gcc/config/i386/linux64.h ---- gcc-4.4-20100216.orig/gcc/config/i386/linux64.h 2010-02-26 17:44:46.000000000 +0000 -+++ gcc-4.4-20100216/gcc/config/i386/linux64.h 2010-02-26 17:47:47.000000000 +0000 -@@ -75,7 +75,7 @@ - #endif - - #undef LINK_SPEC --#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \ -+#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=gnu -O1 \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ diff --git a/pkgs/toolchain/gcc/patches/gcc-4.4.1-branch-startfiles-1.patch b/pkgs/toolchain/gcc/patches/gcc-4.4.1-branch-startfiles-1.patch deleted file mode 100644 index 52423bd..0000000 --- a/pkgs/toolchain/gcc/patches/gcc-4.4.1-branch-startfiles-1.patch +++ /dev/null @@ -1,26 +0,0 @@ -# DIY Linux Patch -Date: 2008-09-09 -Author: Refer Origin. -Origin: Partial revert of http://gcc.gnu.org/ml/gcc-cvs/2006-11/msg00416.html -Maker: Greg Schafer gschafer@zip.com.au -Upstream Status: Not applicable. Tweak only for Temptools phase GCC-Pass2. -Description: Partially revert GCC driver to pre-GCC-4.3 state to allow startfiles to be - found in $prefix when GCC is configured for a non-standard prefix eg: /temptools. Full - background info in thread starting here: http://gcc.gnu.org/ml/gcc/2008-03/msg00095.html - and GCC bugzilla here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35532 - -diff -Naur gcc-4.3.0-RC-20080222.orig/gcc/gcc.c gcc-4.3.0-RC-20080222/gcc/gcc.c ---- gcc-4.3.0-RC-20080222.orig/gcc/gcc.c 2008-01-24 18:57:12.000000000 +0000 -+++ gcc-4.3.0-RC-20080222/gcc/gcc.c 2008-03-02 06:07:36.000000000 +0000 -@@ -6370,6 +6370,11 @@ - machine_suffix, - standard_startfile_prefix, NULL), - NULL, PREFIX_PRIORITY_LAST, 0, 1); -+ add_prefix (&startfile_prefixes, -+ concat (standard_exec_prefix, -+ machine_suffix, -+ standard_startfile_prefix, NULL), -+ NULL, PREFIX_PRIORITY_LAST, 0, 1); - } - - /* Sysrooted prefixes are relocated because target_system_root is diff --git a/pkgs/toolchain/gcc/patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch b/pkgs/toolchain/gcc/patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch deleted file mode 100644 index f2e91dc..0000000 --- a/pkgs/toolchain/gcc/patches/gcc-4.5.0-gmp-mpfr-build-fix-1.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: gcc/configure -=================================================================== ---- gcc/configure (revision 162481) -+++ gcc/configure (revision 162482) -@@ -5478,7 +5478,7 @@ - if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then - gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs" - gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc" -- extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp' -+ extra_mpfr_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" - extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" - # Do not test the gmp version. Assume that it is sufficient, since - # it is in the source tree, and the library has not been built yet -Index: gcc/configure.ac -=================================================================== ---- gcc/configure.ac (revision 162481) -+++ gcc/configure.ac (revision 162482) -@@ -1354,7 +1354,7 @@ - if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then - gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs" - gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc" -- extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp' -+ extra_mpfr_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" - extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" - # Do not test the gmp version. Assume that it is sufficient, since - # it is in the source tree, and the library has not been built yet diff --git a/pkgs/toolchain/gcc/patches/gcc-4.5.0-piepatches-20100421.patch b/pkgs/toolchain/gcc/patches/gcc-4.5.0-piepatches-20100421.patch deleted file mode 100644 index e525d5b..0000000 --- a/pkgs/toolchain/gcc/patches/gcc-4.5.0-piepatches-20100421.patch +++ /dev/null @@ -1,1056 +0,0 @@ -diff -Nur gcc-4.5.0-vanilla/configure gcc-4.5.0/configure ---- gcc-4.5.0-vanilla/configure 2010-04-02 19:35:47.000000000 +0200 -+++ gcc-4.5.0/configure 2010-04-21 15:21:09.762948361 +0200 -@@ -707,6 +707,7 @@ - CFLAGS - CC - target_subdir -+enable_esp - host_subdir - build_subdir - build_libsubdir -@@ -1485,6 +1486,11 @@ - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-gold use gold instead of ld - --enable-libada build libada directory -+ --enable-esp -+ Enable Stack protector, Position independent executable and -+ Fortify_sources as default if we have suppot for it when compiling -+ and link with -z relro and -z now as default. -+ Linux targets supported i*86, x86_64, powerpc*, ia64, arm* and mips - --enable-libssp build libssp directory - --enable-build-with-cxx build with C++ compiler instead of C compiler - --disable-ppl-version-check disable check for PPL version -@@ -3164,6 +3170,24 @@ - noconfigdirs="$noconfigdirs gnattools" - fi - -+# Check whether --enable-esp was given and target have the support. -+# Check whether --enable-esp or --disable-esp was given. -+if test "${enable_esp+set}" = set; then -+ enableval="$enable_esp" -+ -+ case $target in -+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux* | mips-*-linux*) -+ enable_esp=yes -+ ;; -+ *) -+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported on this $target target." >&5 -+echo "$as_me: error: *** --enable-esp is not supported on this $target target." >&2;} -+ { (exit 1); exit 1; }; } -+ ;; -+ esac -+ -+fi; -+ - # Check whether --enable-libssp was given. - if test "${enable_libssp+set}" = set; then : - enableval=$enable_libssp; ENABLE_LIBSSP=$enableval -@@ -14290,6 +14314,9 @@ - *) stage1_cflags="-g -J" ;; - esac ;; - esac -+if test x$enable_esp = xyes; then -+ stage1_cflags="$stage1_cflags -fno-stack-protector" -+fi - - # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. - if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then -diff -Nur gcc-4.5.0-vanilla/gcc/config/i386/linux64.h gcc-4.5.0/gcc/config/i386/linux64.h ---- gcc-4.5.0-vanilla/gcc/config/i386/linux64.h 2010-03-24 21:44:48.000000000 +0100 -+++ gcc-4.5.0/gcc/config/i386/linux64.h 2010-04-21 15:21:16.730815972 +0200 -@@ -115,7 +115,7 @@ - /* This macro may be overridden in i386/k*bsd-gnu.h. */ - #define REG_NAME(reg) reg - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* i386 glibc provides __stack_chk_guard in %gs:0x14, - x86_64 glibc provides it in %fs:0x28. */ - #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) -diff -Nur gcc-4.5.0-vanilla/gcc/config/i386/linux.h gcc-4.5.0/gcc/config/i386/linux.h ---- gcc-4.5.0-vanilla/gcc/config/i386/linux.h 2010-03-24 21:44:48.000000000 +0100 -+++ gcc-4.5.0/gcc/config/i386/linux.h 2010-04-21 15:21:16.721813554 +0200 -@@ -212,7 +212,7 @@ - /* This macro may be overridden in i386/k*bsd-gnu.h. */ - #define REG_NAME(reg) reg - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* i386 glibc provides __stack_chk_guard in %gs:0x14. */ - #define TARGET_THREAD_SSP_OFFSET 0x14 - #endif -diff -Nur gcc-4.5.0-vanilla/gcc/config/linux.h gcc-4.5.0/gcc/config/linux.h ---- gcc-4.5.0-vanilla/gcc/config/linux.h 2009-04-09 17:00:19.000000000 +0200 -+++ gcc-4.5.0/gcc/config/linux.h 2010-04-21 15:21:16.667815357 +0200 -@@ -43,7 +43,11 @@ - object constructed before entering `main'. */ - - #undef STARTFILE_SPEC --#if defined HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) -+#define STARTFILE_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \ -+ %{static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) - #define STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" -diff -Nur gcc-4.5.0-vanilla/gcc/config/rs6000/linux64.h gcc-4.5.0/gcc/config/rs6000/linux64.h ---- gcc-4.5.0-vanilla/gcc/config/rs6000/linux64.h 2010-03-17 05:44:37.000000000 +0100 -+++ gcc-4.5.0/gcc/config/rs6000/linux64.h 2010-04-21 15:21:16.732816308 +0200 -@@ -162,7 +162,7 @@ - #endif - - #define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \ --%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \ -+%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \ - %{memb} %{!memb: %{msdata=eabi: -memb}} \ - %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ - %{mcall-freebsd: -mbig} \ -@@ -525,7 +525,7 @@ - - #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* ppc32 glibc provides __stack_chk_guard in -0x7008(2), - ppc64 glibc provides it at -0x7010(13). */ - #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008) -diff -Nur gcc-4.5.0-vanilla/gcc/config/rs6000/linux.h gcc-4.5.0/gcc/config/rs6000/linux.h ---- gcc-4.5.0-vanilla/gcc/config/rs6000/linux.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.5.0/gcc/config/rs6000/linux.h 2010-04-21 15:21:16.731819651 +0200 -@@ -117,7 +117,7 @@ - - #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* ppc32 glibc provides __stack_chk_guard in -0x7008(2). */ - #define TARGET_THREAD_SSP_OFFSET -0x7008 - #endif -diff -Nur gcc-4.5.0-vanilla/gcc/config/rs6000/sysv4.h gcc-4.5.0/gcc/config/rs6000/sysv4.h ---- gcc-4.5.0-vanilla/gcc/config/rs6000/sysv4.h 2009-11-25 21:23:20.000000000 +0100 -+++ gcc-4.5.0/gcc/config/rs6000/sysv4.h 2010-04-21 15:21:16.674812959 +0200 -@@ -883,7 +883,12 @@ - %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ - %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" - --#ifdef HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) -+#define STARTFILE_LINUX_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ -+ %{mnewlib:ecrti.o%s;:crti.o%s} \ -+ {static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) - #define STARTFILE_LINUX_SPEC "\ - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - %{mnewlib:ecrti.o%s;:crti.o%s} \ -diff -Nur gcc-4.5.0-vanilla/gcc/config/s390/linux.h gcc-4.5.0/gcc/config/s390/linux.h ---- gcc-4.5.0-vanilla/gcc/config/s390/linux.h 2007-08-02 12:49:31.000000000 +0200 -+++ gcc-4.5.0/gcc/config/s390/linux.h 2010-04-21 15:21:16.738814124 +0200 -@@ -93,7 +93,7 @@ - - #define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h" - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* s390 glibc provides __stack_chk_guard in 0x14(tp), - s390x glibc provides it at 0x28(tp). */ - #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) -diff -Nur gcc-4.5.0-vanilla/gcc/config/sparc/linux64.h gcc-4.5.0/gcc/config/sparc/linux64.h ---- gcc-4.5.0-vanilla/gcc/config/sparc/linux64.h 2009-12-08 00:31:01.000000000 +0100 -+++ gcc-4.5.0/gcc/config/sparc/linux64.h 2010-04-21 15:21:16.749816158 +0200 -@@ -298,7 +298,7 @@ - #undef NEED_INDICATE_EXEC_STACK - #define NEED_INDICATE_EXEC_STACK 1 - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14], - sparc64 glibc provides it at [%g7 + 0x28]. */ - #define TARGET_THREAD_SSP_OFFSET (TARGET_ARCH64 ? 0x28 : 0x14) -diff -Nur gcc-4.5.0-vanilla/gcc/config/sparc/linux.h gcc-4.5.0/gcc/config/sparc/linux.h ---- gcc-4.5.0-vanilla/gcc/config/sparc/linux.h 2009-12-08 00:31:01.000000000 +0100 -+++ gcc-4.5.0/gcc/config/sparc/linux.h 2010-04-21 15:21:16.746815839 +0200 -@@ -172,7 +172,7 @@ - #undef NEED_INDICATE_EXEC_STACK - #define NEED_INDICATE_EXEC_STACK 1 - --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ - /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14]. */ - #define TARGET_THREAD_SSP_OFFSET 0x14 - #endif -diff -Nur gcc-4.5.0-vanilla/gcc/config.in gcc-4.5.0/gcc/config.in ---- gcc-4.5.0-vanilla/gcc/config.in 2010-04-14 11:30:07.000000000 +0200 -+++ gcc-4.5.0/gcc/config.in 2010-04-21 15:21:09.879812904 +0200 -@@ -52,6 +52,12 @@ - #endif - - -+/* Define to 1 to enable crtbeginTS.o. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_CRTBEGINTS -+#endif -+ -+ - /* Define to 1 to specify that we are using the BID decimal floating point - format instead of DPD */ - #ifndef USED_FOR_TARGET -@@ -71,6 +77,12 @@ - #endif - - -+/* Define to 1 to enable esp. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_ESP -+#endif -+ -+ - /* Define to 1 to enable fixed-point arithmetic extension to C. */ - #ifndef USED_FOR_TARGET - #undef ENABLE_FIXED_POINT -@@ -996,6 +1008,12 @@ - #endif - - -+/* Define to 1 if your compiler supports -fstack-protector */ -+#ifndef USED_FOR_TARGET -+#undef HAVE_GCC_SSP -+#endif -+ -+ - /* Define to 1 if you have the `getchar_unlocked' function. */ - #ifndef USED_FOR_TARGET - #undef HAVE_GETCHAR_UNLOCKED -diff -Nur gcc-4.5.0-vanilla/gcc/configure gcc-4.5.0/gcc/configure ---- gcc-4.5.0-vanilla/gcc/configure 2010-03-26 06:40:32.000000000 +0100 -+++ gcc-4.5.0/gcc/configure 2010-04-21 15:21:09.784072083 +0200 -@@ -678,6 +678,8 @@ - HOST_LIBS - GGC - libgcc_visibility -+enable_esp -+enable_crtbeginTS - gcc_cv_readelf - gcc_cv_objdump - ORIGINAL_NM_FOR_TARGET -@@ -24576,6 +24578,50 @@ - ;; - esac - -+echo "$as_me:$LINENO: checking linker -z now support" >&5 -+echo $ECHO_N "checking linker -z now support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_now+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_now=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_now=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z now options -+ if $gcc_cv_ld --help 2>/dev/null | grep now > /dev/null; then -+ gcc_cv_ld_now=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_now" >&5 -+echo "${ECHO_T}$gcc_cv_ld_now" >&6 -+ -+echo "$as_me:$LINENO: checking linker -z relro support" >&5 -+echo $ECHO_N "checking linker -z relro support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_relro+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_relro=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_relro=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z relro and -z norelro options -+ if $gcc_cv_ld --help 2>/dev/null | grep relro > /dev/null; then -+ gcc_cv_ld_relro=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_relro" >&5 -+echo "${ECHO_T}$gcc_cv_ld_relro" >&6 -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5 - $as_echo_n "checking linker --build-id support... " >&6; } - if test "${gcc_cv_ld_buildid+set}" = set; then : -@@ -24729,6 +24775,146 @@ - - fi - -+if test x$gcc_cv_libc_provides_ssp = xyes; then -+ echo "$as_me:$LINENO: checking whether $CC support -fstack-protector" >&5 -+echo $ECHO_N "checking whether $CC support -fstack-protector... $ECHO_C" >&6 -+if test "${gcc_cv_cc_stack_protector+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+ saved_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -fstack-protector" -+ cat >conftest.$ac_ext <<_ACEOF -+#ifndef __SSP__ -+#error -+#endif -+ -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: $? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: $? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: $? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ -+ case $target in -+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux*) -+ if test x$set_have_as_tls = xyes; then -+ gcc_cv_cc_stack_protector=yes -+ else -+ gcc_cv_cc_stack_protector=no -+ fi -+ ;; -+ *) -+ cc_cv_cc_stack_protector=yes -+ ;; -+ esac -+ -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+gcc_cv_cc_stack_protector=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ CFLAGS="$saved_CFLAGS" -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_cc_stack_protector" >&5 -+echo "${ECHO_T}$gcc_cv_cc_stack_protector" >&6 -+fi -+if test x$gcc_cv_cc_stack_protector = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_GCC_SSP 1 -+_ACEOF -+ -+fi -+ -+ -+if test x$enable_esp = xyes ; then -+case $target in -+ ia64*-*-linux*) -+ if test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_relro = xyes && test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *) -+ enable_esp_ld=no -+ ;; -+ esac -+else -+ enable_esp_ld=no -+fi -+if test x$enable_esp_ld = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_ESP 1 -+_ACEOF -+ -+fi -+if test x$enable_esp = xyes && test x$enable_esp_ld = xno; then -+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&5 -+echo "$as_me: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+echo "$as_me:$LINENO: checking for crtbeginTS.o support" >&5 -+echo $ECHO_N "checking for crtbeginTS.o support... $ECHO_C" >&6 -+if test "${enable_crtbeginTS+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+if test x$enable_esp = xyes ; then -+ case "$target" in -+ ia64*-*-linux*) -+ enable_crtbeginTS=no ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then -+ enable_crtbeginTS=yes -+ fi -+ ;; -+ *) enable_crtbeginTS=no ;; -+ esac -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $enable_crtbeginTS" >&5 -+echo "${ECHO_T}$enable_crtbeginTS" >&6 -+ -+if test x$enable_crtbeginTS = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_CRTBEGINTS 1 -+_ACEOF -+ -+fi -+ - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 - # and later they can use TFmode. -diff -Nur gcc-4.5.0-vanilla/gcc/cp/lang-specs.h gcc-4.5.0/gcc/cp/lang-specs.h ---- gcc-4.5.0-vanilla/gcc/cp/lang-specs.h 2007-08-06 13:10:19.000000000 +0200 -+++ gcc-4.5.0/gcc/cp/lang-specs.h 2010-04-21 15:21:16.684816335 +0200 -@@ -47,7 +47,7 @@ - %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\ - cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - %{!fsyntax-only:-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {"@c++", -@@ -57,11 +57,11 @@ - %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\ - cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".ii", "@c++-cpp-output", 0, 0, 0}, - {"@c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ -+ cc1plus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.5.0-vanilla/gcc/doc/invoke.texi gcc-4.5.0/gcc/doc/invoke.texi ---- gcc-4.5.0-vanilla/gcc/doc/invoke.texi 2010-04-06 16:02:22.000000000 +0200 -+++ gcc-4.5.0/gcc/doc/invoke.texi 2010-04-21 15:21:16.796812184 +0200 -@@ -7856,6 +7856,11 @@ - @opindex fstack-protector-all - Like @option{-fstack-protector} except that all functions are protected. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector} -+or @option{-nostdlib} or @option{-nodefaultlibs} or -+@option{-fstack-protector} are found. -+ - @item -fsection-anchors - @opindex fsection-anchors - Try to reduce the number of symbolic address calculations by using -@@ -8705,6 +8710,12 @@ - that were used to generate code (@option{-fpie}, @option{-fPIE}, - or model suboptions) when you specify this option. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p} -+are found. -+ - @item -rdynamic - @opindex rdynamic - Pass the flag @option{-export-dynamic} to the ELF linker, on targets -@@ -17251,6 +17262,11 @@ - @code{__pie__} and @code{__PIE__}. The macros have the value 1 - for @option{-fpie} and 2 for @option{-fPIE}. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} are found. -+ - @item -fno-jump-tables - @opindex fno-jump-tables - Do not use jump tables for switch statements even where it would be -diff -Nur gcc-4.5.0-vanilla/gcc/esp.h gcc-4.5.0/gcc/esp.h ---- gcc-4.5.0-vanilla/gcc/esp.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.5.0/gcc/esp.h 2010-04-21 15:21:16.622811922 +0200 -@@ -0,0 +1,148 @@ -+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. -+ * Version 20100409.1 -+ * Magnus Granberg (Zorry) zorry@gentoo.org */ -+#ifndef GCC_ESP_H -+#define GCC_ESP_H -+ -+/* This file will add -fstack-protector, -fPIE, -pie -D_FORTIFY_SOURCES=2 -z,relro and -z,now -+ as default if the defines and the spec allow it. -+ -+ On Gentoo -+ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass -+ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. -+ We use -fstack-protector-all instead of -fstack-protector -+ This will add some unsupported upstream commands options as -nopie. -+ -D__KERNEL__ is added so we don't have -fPIE and -fstack-protector-all when building kernels. -+ ESP_CC1_SPEC is added to CC1_SPEC. -+ -D_FORTIFY_SOURCES=2 is added with gentoo's patchset as default so no need to set it hear. -+ ESP_LINK_SPEC will not add -z,relro as it default on with binutils. -+ ESP_CC1_STRICT_SPEC is added so we don't use gcc/opts.c to disable it. -+ ESP_OPTIONS_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile, -static and -shared. -+ ENABLE_CRTBEGINTS add support for crtbeginTS.o, build -static with -fPIE or -fpie. -+*/ -+#ifdef ENABLE_ESP -+ -+ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */ -+ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict)" -+ #ifdef HAVE_GCC_SSP -+ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: }}" -+ #else -+ #define ESP_CC1_SSP_SPEC "" -+ #endif -+ #define ESP_CC1_PIE_SPEC "%{!nopie: }" -+ #define ESP_CC1_STRICT_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}" -+ -+ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable -+ -z now will be added if we don't have -vanilla spec */ -+ #define ESP_LINK_SPEC "%(esp_link_now)" -+ #define ESP_LINK_NOW_SPEC "%{!now:-z now}" -+ -+ /* ESP_OPTIONS_SPEC is added to the compiler spec in gcc/gcc.c */ -+ #define ESP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* ESP_CPP_OPTIONS_SPEC is added to the cpp_options spec in gcc/gcc.c -+ For precompiling headers. */ -+ #define ESP_CPP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector -+ -fstack-protector-all and we have TARGET_LIBC_PROVIDES_SSP and HAVE_GCC_SSP defined. */ -+ #ifdef HAVE_GCC_SSP -+ #define ESP_OPTIONS_SSP_SPEC \ -+ "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \ -+ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}" -+ #else -+ #define ESP_OPTIONS_SSP_SPEC "" -+ #endif -+ -+ /* If HAVE_LD_PIE not defined we will not add any -fPIE -pie */ -+ #ifdef HAVE_LD_PIE -+ -+ /* We use ESP_COMMAND_OPTIONS_SPEC to add pie command-line options. */ -+ #define ESP_COMMAND_OPTIONS_SPEC "%{!D__KERNEL__:%{!nopie:%(esp_options_pie) %(esp_link_pie)}}" -+ -+ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -+ -nostdlib -nostartfiles. */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" -+ #else -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" -+ #endif -+ -+ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib -+ -nostartfiles */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static -+ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" -+ #else -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" -+ #endif -+ -+ /* This will check if shared is set when -static -pie -fPIE -fpie -fno-PIC -fno-pic, -pie is set when -static -pg -p -profile. -+ If set it will make gcc print out "-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible" or -+ "-pie and pg|p|profile are incompatible" */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_OPTIONS_PIE_CHECK_SPEC \ -+ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \ -+ %{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible}}" -+ #else -+ #define ESP_OPTIONS_PIE_CHECK_SPEC \ -+ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \ -+ %{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible}}" -+ #endif -+ -+ /* We don't pass -pie to the linker when -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link) " -+ #else -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) " -+ #endif -+ -+ #else -+ #define ESP_OPTIONS_PIE_SPEC "" -+ #define ESP_OPTIONS_PIE_CHECK_SPEC "" -+ #define ESP_LINK_PIE_SPEC "" -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) " -+ #endif -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_cc1", ESP_CC1_SPEC }, \ -+ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ -+ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ -+ { "esp_cc1_strict", ESP_CC1_STRICT_SPEC }, \ -+ { "esp_link", ESP_LINK_SPEC }, \ -+ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ -+ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ -+ { "esp_command_options", ESP_COMMAND_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC }, \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ -+ { "esp_options_pie_check", ESP_OPTIONS_PIE_CHECK_SPEC }, \ -+ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } -+ -+ static const char *esp_command_options_spec = ESP_COMMAND_OPTIONS_SPEC; -+ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; -+ -+#else /* If not ESP_ENABLE defined do this. */ -+ -+ #define ESP_OPTIONS_SPEC "" -+ #define ESP_CPP_OPTIONS_SPEC "" -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC } -+ -+#endif -+#endif /* End GCC_ESP_H */ -diff -Nur gcc-4.5.0-vanilla/gcc/gcc.c gcc-4.5.0/gcc/gcc.c ---- gcc-4.5.0-vanilla/gcc/gcc.c 2010-02-11 13:23:08.000000000 +0100 -+++ gcc-4.5.0/gcc/gcc.c 2010-04-21 15:21:16.589812777 +0200 -@@ -84,6 +84,7 @@ - #include "gcc.h" - #include "flags.h" - #include "opts.h" -+#include "esp.h" /* for --enable-esp support */ - - #ifdef HAVE_MMAP_FILE - # include <sys/mman.h> -@@ -822,7 +823,9 @@ - - static const char *asm_debug; - static const char *cpp_spec = CPP_SPEC; -+#ifndef ENABLE_ESP - static const char *cc1_spec = CC1_SPEC; -+#endif - static const char *cc1plus_spec = CC1PLUS_SPEC; - static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; - static const char *link_ssp_spec = LINK_SSP_SPEC; -@@ -885,7 +888,7 @@ - static const char *cpp_options = - "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ - %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ -- %{undef} %{save-temps*:-fpch-preprocess}"; -+ %{undef} %{save-temps*:-fpch-preprocess} %(esp_cpp_options)"; - - /* This contains cpp options which are not passed when the preprocessor - output will be used by another program. */ -@@ -893,6 +896,9 @@ - - /* NB: This is shared amongst all front-ends, except for Ada. */ - static const char *cc1_options = -+#ifdef ENABLE_ESP -+"%(esp_options_pie_check)" -+#endif - "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ - %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{a*}\ - %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} \ -@@ -1075,15 +1081,15 @@ - %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ - %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ - cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ -- %(cc1_options)}\ -+ %(cc1_options) %(esp_options)}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}}\ - %{!fsyntax-only:%(invoke_as)}} \ - %{combine:\ - %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ - %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i}}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}\ - %{!fsyntax-only:%(invoke_as)}}}}}}", 0, 1, 1}, - {"-", - "%{!E:%e-E or -x required when input is from standard input}\ -@@ -1106,7 +1112,7 @@ - %W{o*:--output-pch=%*}%V}}}}}}", 0, 0, 0}, - {".i", "@cpp-output", 0, 1, 0}, - {"@cpp-output", -- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0}, -+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(esp_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0}, - {".s", "@assembler", 0, 1, 0}, - {"@assembler", - "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 1, 0}, -@@ -1699,18 +1705,23 @@ - INIT_STATIC_SPEC ("sysroot_hdrs_suffix_spec", &sysroot_hdrs_suffix_spec), - }; - --#ifdef EXTRA_SPECS /* additional specs needed */ -+/* EXTRA_SPECS needs to be defined */ -+#ifndef EXTRA_SPECS -+#define EXTRA_SPECS -+#endif -+ -+/* EXTRA_SPECS and ESP_EXTRA_SPECS add additional specs */ - /* Structure to keep track of just the first two args of a spec_list. -- That is all that the EXTRA_SPECS macro gives us. */ -+ That is all that the EXTRA_SPECS and ESP_EXTRA_SPECS macro gives us. */ - struct spec_list_1 - { - const char *const name; - const char *const ptr; - }; - --static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS }; -+/* ESP_EXTRA_SPECS before EXTRA_SPECS */ -+static const struct spec_list_1 extra_specs_1[] = { ESP_EXTRA_SPECS, EXTRA_SPECS }; - static struct spec_list *extra_specs = (struct spec_list *) 0; --#endif - - /* List of dynamically allocates specs that have been defined so far. */ - -@@ -1798,7 +1809,6 @@ - if (verbose_flag) - notice ("Using built-in specs.\n"); - --#ifdef EXTRA_SPECS - extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1)); - - for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--) -@@ -1811,7 +1821,6 @@ - sl->ptr_spec = &sl->ptr; - next = sl; - } --#endif - - for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--) - { -@@ -7111,6 +7120,12 @@ - gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str, - spec_version, dir_separator_str, NULL); - -+#ifdef ENABLE_ESP -+ /* Process ESP_COMMAND_OPTIONS_SPEC, adding any new options to the end -+ of the command line. */ -+ do_self_spec (esp_command_options_spec); -+#endif -+ - /* Now we have the specs. - Set the `valid' bits for switches that match anything in any spec. */ - -diff -Nur gcc-4.5.0-vanilla/gcc/Makefile.in gcc-4.5.0/gcc/Makefile.in ---- gcc-4.5.0-vanilla/gcc/Makefile.in 2010-04-02 09:49:06.000000000 +0200 -+++ gcc-4.5.0/gcc/Makefile.in 2010-04-21 15:21:10.033812913 +0200 -@@ -636,13 +636,24 @@ - INHIBIT_LIBC_CFLAGS = -Dinhibit_libc - endif - -+# We don't want __stack_chk_fail in crt* and libgcc2.a. -+# We don't want to compile crtbegin, crtend and crtbeginT with -fPIE. -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOPIE_CFLAGS = -fno-PIE -+ESP_NOSSP_CFLAGS = -fno-stack-protector -+else -+ESP_NOPIE_CFLAGS= -+ESP_NOSSP_CFLAGS= -+endif -+ - # Options to use when compiling libgcc2.a. - # - LIBGCC2_DEBUG_CFLAGS = -g - LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) \ - $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \ - -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ -- $(INHIBIT_LIBC_CFLAGS) -+ $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS) - - # Additional options to use when compiling libgcc2.a. - # Some targets override this to -isystem include -@@ -655,7 +666,7 @@ - CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ - -finhibit-size-directive -fno-inline -fno-exceptions \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ -- $(INHIBIT_LIBC_CFLAGS) -+ $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS) - - # Additional sources to handle exceptions; overridden by targets as needed. - LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ -@@ -685,6 +696,12 @@ - # The rules for compiling them should be in the t-* file for the machine. - EXTRA_PARTS = @extra_parts@ - -+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes -+enable_crtbeginTS = @enable_crtbeginTS@ -+ifeq ($(enable_crtbeginTS),yes) -+EXTRA_PARTS += crtbeginTS.o -+endif -+ - # List of extra object files that should be compiled and linked with - # compiler proper (cc1, cc1obj, cc1plus). - EXTRA_OBJS = @extra_objs@ -@@ -1863,9 +1880,10 @@ - echo LIBGCC_SYNC = '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars - echo LIBGCC_SYNC_CFLAGS = '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_CFLAGS = '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars -- echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars -+ echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars - echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars -+ echo enable_crtbeginTS = '$(enable_crtbeginTS)' >> tmp-libgcc.mvars - - mv tmp-libgcc.mvars libgcc.mvars - -@@ -1899,12 +1917,14 @@ - $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_BEGIN \ - -o $(T)crtbegin$(objext) - - $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_END \ - -o $(T)crtend$(objext) - -@@ -1925,9 +1945,19 @@ - $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ - -o $(T)crtbeginT$(objext) - -+# This is a version of crtbegin for -static -fPIE links if esp is enable. -+ifeq ($(enable_crtbeginTS),yes) -+$(T)crtbeginTS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ -+ gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) -+ $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \ -+ -o $(T)crtbeginTS$(objext) -+endif -+ - # Compile the start modules crt0.o and mcrt0.o that are linked with - # every program - $(T)crt0.o: s-crt0 ; @true -diff -Nur gcc-4.5.0-vanilla/gcc/objc/lang-specs.h gcc-4.5.0/gcc/objc/lang-specs.h ---- gcc-4.5.0-vanilla/gcc/objc/lang-specs.h 2007-08-02 12:37:36.000000000 +0200 -+++ gcc-4.5.0/gcc/objc/lang-specs.h 2010-04-21 15:21:16.702913793 +0200 -@@ -30,13 +30,13 @@ - %{traditional|ftraditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ -- cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ -+ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}\ - %{!save-temps:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {".mi", "@objc-cpp-output", 0, 0, 0}, - {"@objc-cpp-output", -- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objective-c-header", - "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ -@@ -45,10 +45,10 @@ - %{traditional|ftraditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ -- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj -fpreprocessed %b.mi %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}\ - %{!save-temps:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, -diff -Nur gcc-4.5.0-vanilla/gcc/objcp/lang-specs.h gcc-4.5.0/gcc/objcp/lang-specs.h ---- gcc-4.5.0-vanilla/gcc/objcp/lang-specs.h 2007-08-02 12:38:44.000000000 +0200 -+++ gcc-4.5.0/gcc/objcp/lang-specs.h 2010-04-21 15:21:16.708817730 +0200 -@@ -36,7 +36,7 @@ - %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\ - cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {"@objective-c++", -@@ -46,15 +46,15 @@ - %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\ - cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".mii", "@objective-c++-cpp-output", 0, 0, 0}, - {"@objective-c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objc++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.5.0-vanilla/gcc/varasm.c gcc-4.5.0/gcc/varasm.c ---- gcc-4.5.0-vanilla/gcc/varasm.c 2010-03-27 12:56:30.000000000 +0100 -+++ gcc-4.5.0/gcc/varasm.c 2010-04-21 15:21:16.606812404 +0200 -@@ -5961,7 +5961,11 @@ - bool is_local; - - is_local = targetm.binds_local_p (decl); -- if (!flag_shlib) -+ #ifdef ENABLE_ESP -+ if (!flag_pic) -+ #else -+ if (!flag_shlib) -+ #endif - { - if (is_local) - kind = TLS_MODEL_LOCAL_EXEC; -diff -Nur gcc-4.5.0-vanilla/libgcc/Makefile.in gcc-4.5.0/libgcc/Makefile.in ---- gcc-4.5.0-vanilla/libgcc/Makefile.in 2010-03-30 15:08:52.000000000 +0200 -+++ gcc-4.5.0/libgcc/Makefile.in 2010-04-21 15:21:10.824811514 +0200 -@@ -291,6 +291,12 @@ - gen-hide-list = echo > $@ - endif - -+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes -+enable_libgcc_crtbeginTS = $(enable_crtbeginTS) -+ifeq ($(enable_libgcc_crtbeginTS),yes) -+EXTRA_PARTS += crtbeginTS.o -+endif -+ - ifneq ($(EXTRA_PARTS),) - extra-parts = libgcc-extra-parts - INSTALL_PARTS = $(EXTRA_PARTS) -@@ -842,6 +848,13 @@ - crtbeginT.o: $(gcc_srcdir)/crtstuff.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS) \ - -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -+ -+# This is a version of crtbegin for -static -fPIE links. -+ifeq ($(enable_libgcc_crtbeginTS),yes) -+crtbeginTS.o: $(gcc_srcdir)/crtstuff.c -+ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O -+endif - endif - - # Build extra startfiles in the libgcc directory. -diff -Nur gcc-4.5.0-vanilla/libmudflap/configure gcc-4.5.0/libmudflap/configure ---- gcc-4.5.0-vanilla/libmudflap/configure 2009-12-05 18:18:53.000000000 +0100 -+++ gcc-4.5.0/libmudflap/configure 2010-04-21 15:21:09.843811773 +0200 -@@ -652,6 +652,7 @@ - MAINTAINER_MODE_FALSE - MAINTAINER_MODE_TRUE - am__untar -+enable_esp - am__tar - AMTAR - am__leading_dot -diff -Nur gcc-4.5.0-vanilla/libmudflap/Makefile.in gcc-4.5.0/libmudflap/Makefile.in ---- gcc-4.5.0-vanilla/libmudflap/Makefile.in 2010-04-02 20:18:06.000000000 +0200 -+++ gcc-4.5.0/libmudflap/Makefile.in 2010-04-21 15:21:10.844815108 +0200 -@@ -304,10 +304,18 @@ - MAINT_CHARSET = latin1 - SUBDIRS = testsuite - -+# Some stuff don't compile with PIE or SSP -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+NO_ESP_CFLAGS = -fno-stack-protector -U_FORTIFY_SOURCE -+else -+NO_ESP_CFLAGS = -+endif -+ - # May be used by various substitution variables. - gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) --AM_CFLAGS = -Wall $(SECTION_FLAGS) --@LIBMUDFLAPTH_FALSE@libmudflapth = -+AM_CFLAGS = -Wall $(SECTION_FLAGS) $(NO_ESP_CFLAGS) -+@LIBMUDFLAPTH_FALSE@libmudflapth = - @LIBMUDFLAPTH_TRUE@libmudflapth = libmudflapth.la - toolexeclib_LTLIBRARIES = libmudflap.la $(libmudflapth) - libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include -diff -Nur gcc-4.5.0-vanilla/Makefile.in gcc-4.5.0/Makefile.in ---- gcc-4.5.0-vanilla/Makefile.in 2010-02-17 12:01:44.000000000 +0100 -+++ gcc-4.5.0/Makefile.in 2010-04-21 15:21:10.022812548 +0200 -@@ -350,9 +350,17 @@ - BUILD_PREFIX = @BUILD_PREFIX@ - BUILD_PREFIX_1 = @BUILD_PREFIX_1@ - -+# Some stuff don't compile with SSP -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOSSP_CFLAGS = -fno-stack-protector -+else -+ESP_NOSSP_CFLAGS= -+endif -+ - # Flags to pass to stage2 and later makes. They are defined - # here so that they can be overridden by Makefile fragments. --BOOT_CFLAGS= -g -O2 -+BOOT_CFLAGS= -g -O2 $(ESP_NOSSP_CFLAGS) - BOOT_LDFLAGS= - BOOT_ADAFLAGS=-gnatpg -gnata - -@@ -397,9 +405,9 @@ - - CFLAGS = @CFLAGS@ - LDFLAGS = @LDFLAGS@ --LIBCFLAGS = $(CFLAGS) -+LIBCFLAGS = $(CFLAGS) $(ESP_NOSSP_CFLAGS) - CXXFLAGS = @CXXFLAGS@ --LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESP_NOSSP_CFLAGS) - - TFLAGS = - diff --git a/pkgs/toolchain/gettext/gettext.nm b/pkgs/toolchain/gettext/gettext.nm deleted file mode 100644 index 689cbdc..0000000 --- a/pkgs/toolchain/gettext/gettext.nm +++ /dev/null @@ -1,20 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/gettext/gettext.nm - -define STAGE_BUILD - cd $(DIR_APP)/gettext-tools && \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --disable-shared - - cd $(DIR_APP)/gettext-tools && make -C gnulib-lib - cd $(DIR_APP)/gettext-tools && make -C src msgfmt -endef - -STAGE_TEST = # Do nothing - -define STAGE_INSTALL - cd $(DIR_APP)/gettext-tools && cp -v src/msgfmt $(TOOLS_DIR)/bin -endef diff --git a/pkgs/toolchain/glibc/glibc-stack_chk_fail.c b/pkgs/toolchain/glibc/glibc-stack_chk_fail.c deleted file mode 120000 index b34b6d9..0000000 --- a/pkgs/toolchain/glibc/glibc-stack_chk_fail.c +++ /dev/null @@ -1 +0,0 @@ -../../core/glibc/glibc-stack_chk_fail.c \ No newline at end of file diff --git a/pkgs/toolchain/glibc/glibc.nm b/pkgs/toolchain/glibc/glibc.nm deleted file mode 100644 index 102cfae..0000000 --- a/pkgs/toolchain/glibc/glibc.nm +++ /dev/null @@ -1,43 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += binutils-static gcc-static kernel-headers - -include ../../core/glibc/glibc.nm - -define STAGE_BUILD - cd $(DIR_SRC)/glibc-build && \ - CFLAGS= \ - CXXFLAGS= \ - libc_cv_c_cleanup=yes \ - libc_cv_forced_unwind=yes \ - ../$(THISAPP)/configure \ - --host=$(TARGET) \ - --build=$(TARGET) \ - --prefix=$(TOOLS_DIR) \ - --libexecdir=$(TOOLS_DIR)/lib/$(PKG_NAME) \ - --with-headers=$(TOOLS_DIR)/include \ - --disable-profile \ - --enable-add-ons \ - --enable-kernel=$(OPTIMIZED_KERNEL) \ - --with-stack-protector=all \ - --enable-bind-now \ - --with-tls \ - --with-__thread \ - --enable-experimental-malloc \ - --without-cvs - - cd $(DIR_SRC)/glibc-build && make PARALLELMFLAGS=$(PARALLELISMFLAGS) -endef - -STAGE_TEST = # No test here. - -define STAGE_INSTALL - -mkdir -v $(TOOLS_DIR)/etc - touch $(TOOLS_DIR)/etc/ld.so.conf - - cd $(DIR_SRC)/glibc-build && make install localedata/install-locales - - $(TARGET)-gcc -dumpspecs | \ - sed -e "s@/lib(64)?/ld@$(TOOLS_DIR)&@g" \ - -e "/^*cpp:$$/{n;s,$$, -isystem $(TOOLS_DIR)/include,}" > \ - $$(dirname $$($(TARGET)-gcc -print-libgcc-file-name))/specs -endef diff --git a/pkgs/toolchain/glibc/patches b/pkgs/toolchain/glibc/patches deleted file mode 120000 index 9581d8e..0000000 --- a/pkgs/toolchain/glibc/patches +++ /dev/null @@ -1 +0,0 @@ -../../core/glibc/patches/ \ No newline at end of file diff --git a/pkgs/toolchain/grep/grep.nm b/pkgs/toolchain/grep/grep.nm deleted file mode 100644 index 067e0cb..0000000 --- a/pkgs/toolchain/grep/grep.nm +++ /dev/null @@ -1,14 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/grep/grep.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --disable-perl-regexp \ - --without-included-regex - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef diff --git a/pkgs/toolchain/gzip/gzip.nm b/pkgs/toolchain/gzip/gzip.nm deleted file mode 100644 index 7ab3d72..0000000 --- a/pkgs/toolchain/gzip/gzip.nm +++ /dev/null @@ -1,19 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/gzip/gzip.nm - -define STAGE_BUILD - # NO_ASM is for textrels. - cd $(DIR_APP) && \ - DEFS=NO_ASM \ - CPPFLAGS="-DHAVE_LSTAT" \ - ./configure \ - --prefix=$(TOOLS_DIR) - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make install -endef diff --git a/pkgs/toolchain/gzip/patches/gzip-1.3.13-cve-2006-4337_len.patch b/pkgs/toolchain/gzip/patches/gzip-1.3.13-cve-2006-4337_len.patch deleted file mode 100644 index db9f981..0000000 --- a/pkgs/toolchain/gzip/patches/gzip-1.3.13-cve-2006-4337_len.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://cvs.fedoraproject.org/viewvc/devel/gzip/gzip-1.3.5-cve-2006-4337_len.... - -http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4337 - ---- gzip-1.3.5/unlzh.c.len 2006-11-22 09:35:10.000000000 +0100 -+++ gzip-1.3.5/unlzh.c 2006-11-22 09:38:52.000000000 +0100 -@@ -199,7 +199,7 @@ - } - *p = ch; - } -- start[len] = nextcode; -+ start[len] = start[len] + weight[len]; - } - } - diff --git a/pkgs/toolchain/gzip/patches/gzip-1.3.13-cve-2006-4338.patch b/pkgs/toolchain/gzip/patches/gzip-1.3.13-cve-2006-4338.patch deleted file mode 100644 index 2442ab1..0000000 --- a/pkgs/toolchain/gzip/patches/gzip-1.3.13-cve-2006-4338.patch +++ /dev/null @@ -1,33 +0,0 @@ -http://cvs.fedoraproject.org/viewvc/devel/gzip/gzip-1.3.5-cve-2006-4338.patc... - -http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4338 - ---- gzip-1.3.3/unlzh.c.4338 2006-09-07 10:49:31.000000000 +0200 -+++ gzip-1.3.3/unlzh.c 2006-09-07 11:37:53.000000000 +0200 -@@ -260,7 +260,7 @@ - if (bitbuf & mask) c = right[c]; - else c = left [c]; - mask >>= 1; -- } while (c >= NT); -+ } while (c >= NT && (mask || c != left[c])); - } - fillbuf((int) pt_len[c]); - if (c <= 2) { -@@ -296,7 +296,7 @@ - if (bitbuf & mask) j = right[j]; - else j = left [j]; - mask >>= 1; -- } while (j >= NC); -+ } while (j >= NC && (mask || j != left[j])); - } - fillbuf((int) c_len[j]); - return j; -@@ -313,7 +313,7 @@ - if (bitbuf & mask) j = right[j]; - else j = left [j]; - mask >>= 1; -- } while (j >= NP); -+ } while (j >= NP && (mask || j != left[j])); - } - fillbuf((int) pt_len[j]); - if (j != 0) j = ((unsigned) 1 << (j - 1)) + getbits((int) (j - 1)); diff --git a/pkgs/toolchain/gzip/patches/gzip-1.3.13-openbsd-owl-tmp.patch b/pkgs/toolchain/gzip/patches/gzip-1.3.13-openbsd-owl-tmp.patch deleted file mode 100644 index 8028df3..0000000 --- a/pkgs/toolchain/gzip/patches/gzip-1.3.13-openbsd-owl-tmp.patch +++ /dev/null @@ -1,47 +0,0 @@ -http://cvs.fedoraproject.org/viewvc/devel/gzip/gzip-1.3.12-openbsd-owl-tmp.p... - ---- gzip-1.3.12/znew.in.owl-tmp 2007-06-04 09:15:11.000000000 +0200 -+++ gzip-1.3.12/znew.in 2007-06-04 09:23:18.000000000 +0200 -@@ -55,28 +55,27 @@ - # block is the disk block size (best guess, need not be exact) - - warn="(does not preserve modes and timestamp)" --tmp=${TMPDIR-/tmp}/zfoo.$$ --set -C --echo hi > $tmp || exit --if test -z "`(${CPMOD-cpmod} $tmp $tmp) 2>&1`"; then -- cpmod=${CPMOD-cpmod} -+cpmod= -+cpmodarg= -+if type ${CPMOD:-cpmod} 2>/dev/null; then -+ cpmod=${CPMOD:-cpmod} - warn="" - fi - --if test -z "$cpmod" && ${TOUCH-touch} -r $tmp $tmp 2>/dev/null; then -- cpmod="${TOUCH-touch}" -+if test -z "$cpmod"; then -+ cpmod=touch - cpmodarg="-r" - warn="(does not preserve file modes)" - fi - --# check if GZIP env. variable uses -S or --suffix --gzip -q $tmp --ext=`echo $tmp* | sed "s|$tmp||"` --rm -f $tmp* --if test -z "$ext"; then -- echo znew: error determining gzip extension -- exit 1 --fi -+case "$GZIP" in -+ *-S*) ext=`echo "$GZIP" | sed 's/^.*-S[[:space:]]*([^[:space:]]*).*$/\1/'` -+ ;; -+ *-suffix*) ext=`echo "$GZIP" | sed 's/^.*--suffix=([^[:space:]]*).*$/\1/'` -+ ;; -+ *) ext='.gz' -+ ;; -+esac - if test "$ext" = ".Z"; then - echo znew: cannot use .Z as gzip extension. - exit 1 diff --git a/pkgs/toolchain/kernel-headers/kernel-headers.nm b/pkgs/toolchain/kernel-headers/kernel-headers.nm deleted file mode 100644 index edf9743..0000000 --- a/pkgs/toolchain/kernel-headers/kernel-headers.nm +++ /dev/null @@ -1,10 +0,0 @@ - -PKG_TOOLCHAIN_DEPS = gcc-static - -include ../../core/kernel-headers/kernel-headers.nm - -define STAGE_INSTALL - cd $(DIR_APP) && make ARCH=x86 INSTALL_HDR_PATH=dest headers_install - -mkdir -pv $(TOOLS_DIR)/include - cd $(DIR_APP) && cp -rv dest/include/* $(TOOLS_DIR)/include -endef diff --git a/pkgs/toolchain/m4/m4.nm b/pkgs/toolchain/m4/m4.nm deleted file mode 100644 index 8f3365a..0000000 --- a/pkgs/toolchain/m4/m4.nm +++ /dev/null @@ -1,14 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/m4/m4.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - CPPFLAGS="-D_GNU_SOURCE" \ - gl_cv_func_printf_directive_n=no \ - ./configure \ - --prefix=$(TOOLS_DIR) - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef diff --git a/pkgs/toolchain/m4/patches b/pkgs/toolchain/m4/patches deleted file mode 120000 index fbc96e8..0000000 --- a/pkgs/toolchain/m4/patches +++ /dev/null @@ -1 +0,0 @@ -../../core/m4/patches/ \ No newline at end of file diff --git a/pkgs/toolchain/make/make.nm b/pkgs/toolchain/make/make.nm deleted file mode 100644 index ace7c70..0000000 --- a/pkgs/toolchain/make/make.nm +++ /dev/null @@ -1,12 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/make/make.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef diff --git a/pkgs/toolchain/make/patches b/pkgs/toolchain/make/patches deleted file mode 120000 index 1cab090..0000000 --- a/pkgs/toolchain/make/patches +++ /dev/null @@ -1 +0,0 @@ -../../core/make/patches/ \ No newline at end of file diff --git a/pkgs/toolchain/ncurses/ncurses.nm b/pkgs/toolchain/ncurses/ncurses.nm deleted file mode 100644 index 9266cc7..0000000 --- a/pkgs/toolchain/ncurses/ncurses.nm +++ /dev/null @@ -1,26 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/ncurses/ncurses.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --with-shared \ - --without-debug \ - --without-ada \ - --enable-overwrite \ - --enable-widec \ - --enable-symlinks - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make install - for lib in curses ncurses form panel menu; do \ - rm -vf $(TOOLS_DIR)/lib/lib$${lib}.so ; \ - echo "INPUT(-l$${lib}w)" >$(TOOLS_DIR)/lib/lib$${lib}.so ; \ - done -endef diff --git a/pkgs/toolchain/patch/patch.nm b/pkgs/toolchain/patch/patch.nm deleted file mode 100644 index 354fa6c..0000000 --- a/pkgs/toolchain/patch/patch.nm +++ /dev/null @@ -1,16 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/patch/patch.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make install -endef diff --git a/pkgs/toolchain/patch/patches/patch-2.5.4-sigsegv.patch b/pkgs/toolchain/patch/patches/patch-2.5.4-sigsegv.patch deleted file mode 100644 index c018153..0000000 --- a/pkgs/toolchain/patch/patches/patch-2.5.4-sigsegv.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up patch-2.6/src/inp.c.sigsegv patch-2.6/src/inp.c ---- patch-2.6/src/inp.c.sigsegv 2009-11-02 19:09:57.000000000 +0000 -+++ patch-2.6/src/inp.c 2009-11-16 09:31:52.305022200 +0000 -@@ -77,6 +77,14 @@ re_input (void) - } - } - -+void -+reset_scan_input_vars() -+{ -+ using_plan_a = 1; -+ i_buffer = NULL; -+ i_ptr = NULL; -+} -+ - /* Construct the line index, somehow or other. */ - - void -diff -up patch-2.6/src/inp.h.sigsegv patch-2.6/src/inp.h ---- patch-2.6/src/inp.h.sigsegv 2009-11-02 19:09:57.000000000 +0000 -+++ patch-2.6/src/inp.h 2009-11-16 09:32:24.440021838 +0000 -@@ -24,4 +24,5 @@ XTERN LINENUM input_lines; /* how long - char const *ifetch (LINENUM, bool, size_t *); - void get_input_file (char const *, char const *); - void re_input (void); -+void reset_scan_input_vars (void); - void scan_input (char *); -diff -up patch-2.6/src/patch.c.sigsegv patch-2.6/src/patch.c ---- patch-2.6/src/patch.c.sigsegv 2009-11-02 19:09:57.000000000 +0000 -+++ patch-2.6/src/patch.c 2009-11-16 09:31:52.306021801 +0000 -@@ -210,7 +210,10 @@ main (int argc, char **argv) - - /* find out where all the lines are */ - if (!skip_rest_of_patch) -- scan_input (inname); -+ scan_input (inname); -+ else -+ reset_scan_input_vars (); -+ - - /* from here on, open no standard i/o files, because malloc */ - /* might misfire and we can't catch it easily */ diff --git a/pkgs/toolchain/perl/patches/perl-5.10.1-libc-1.patch b/pkgs/toolchain/perl/patches/perl-5.10.1-libc-1.patch deleted file mode 100644 index b075df8..0000000 --- a/pkgs/toolchain/perl/patches/perl-5.10.1-libc-1.patch +++ /dev/null @@ -1,31 +0,0 @@ -Submitted By: Matt Burgess <matthew at linuxfromscratch dot org> -Date: 2009-08-25 -Initial Package Version: 5.10.1 -Origin: Not Submitted - LFS Specific -Description: This patch adapts some hard-wired paths to the C library. - It uses the $prefix variable to locate the correct libc. - -diff -Naur perl-5.10.1.orig/hints/linux.sh perl-5.10.1/hints/linux.sh ---- perl-5.10.1.orig/hints/linux.sh 2009-02-12 22:58:12.000000000 +0000 -+++ perl-5.10.1/hints/linux.sh 2009-08-25 18:31:06.000000000 +0000 -@@ -63,9 +63,9 @@ - # We don't use __GLIBC__ and __GLIBC_MINOR__ because they - # are insufficiently precise to distinguish things like - # libc-2.0.6 and libc-2.0.7. --if test -L /lib/libc.so.6; then -+if test -L ${prefix}/lib/libc.so.6; then - libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'` -- libc=/lib/$libc -+ libc=${prefix}/lib/$libc - fi - - # Configure may fail to find lstat() since it's a static/inline -@@ -436,3 +436,8 @@ - libswanted="$libswanted pthread" - ;; - esac -+ -+locincpth="" -+loclibpth="" -+glibpth="${prefix}/lib" -+usrinc="${prefix}/include" diff --git a/pkgs/toolchain/perl/patches/perl-5.10.1-libresolv.patch b/pkgs/toolchain/perl/patches/perl-5.10.1-libresolv.patch deleted file mode 100644 index 7676bbb..0000000 --- a/pkgs/toolchain/perl/patches/perl-5.10.1-libresolv.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up perl-5.10.0/Configure.didi perl-5.10.0/Configure ---- perl-5.10.0/Configure.didi 2007-12-18 11:47:07.000000000 +0100 -+++ perl-5.10.0/Configure 2008-07-21 10:51:16.000000000 +0200 -@@ -1327,7 +1327,7 @@ libswanted_uselargefiles='' - : set usesocks on the Configure command line to enable socks. - : List of libraries we want. - : If anyone needs extra -lxxx, put those in a hint file. --libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun" -+libswanted="sfio socket resolv inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun" - libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" - : We probably want to search /usr/shlib before most other libraries. - : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. diff --git a/pkgs/toolchain/perl/patches/perl-5.10.1-rpath-make.patch b/pkgs/toolchain/perl/patches/perl-5.10.1-rpath-make.patch deleted file mode 100644 index 9d24326..0000000 --- a/pkgs/toolchain/perl/patches/perl-5.10.1-rpath-make.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- perl-5.8.8-RC1/Makefile.SH.makerpath 2006-01-20 16:41:26.000000000 -0500 -+++ perl-5.8.8-RC1/Makefile.SH 2006-01-20 16:41:57.000000000 -0500 -@@ -125,26 +125,10 @@ - esac - - case "$osname" in -- linux) -- # If there is a pre-existing $libperl from a previous -- # installation, Linux needs to use LD_PRELOAD to -- # override the LD_LIBRARY_PATH setting. See the -- # INSTALL file, under "Building a shared perl library". -- # If there is no pre-existing $libperl, we don't need -- # to do anything further. -- if test -f $archlib/CORE/$libperl; then -- rm -f preload -- cat <<'EOT' > preload --#! /bin/sh --lib=$1 --shift --test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD" --exec "$@" --EOT -- chmod 755 preload -- ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl" -- fi -+ linux*) -+ ldlibpth="LD_PRELOAD=`pwd`/libperl.so $ldlibpth" - ;; -+ - os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth" - ;; - esac diff --git a/pkgs/toolchain/perl/perl.nm b/pkgs/toolchain/perl/perl.nm deleted file mode 100644 index 29b6531..0000000 --- a/pkgs/toolchain/perl/perl.nm +++ /dev/null @@ -1,27 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/perl/perl.nm - -STAGE_PREPARE_CMDS = # Nothing to do - -define STAGE_BUILD - # ./Configure is used instead of ./configure.gnu because it supports builds - # from an object directory. -Dmksymlinks is also used, to support read-only - # sources. -d -e are added to accept all defaults, otherwise ./Configure will - # be interactive. - cd $(DIR_APP) && \ - $(DIR_APP)/Configure \ - -Dprefix=$(TOOLS_DIR) \ - -d -e -s - - cd $(DIR_APP) && make perl utilities ext/Errno/pm_to_blib #$(PARALLELISMFLAGS) -endef - -STAGE_TEST = # No test in toolchain - -define STAGE_INSTALL - cd $(DIR_APP) && cp -vf perl pod/pod2man $(TOOLS_DIR)/bin/ - -mkdir -pv $(TOOLS_DIR)/lib/perl5/$(PKG_VER) - cd $(DIR_APP) && cp -Rvf lib/* $(TOOLS_DIR)/lib/perl5/$(PKG_VER) -endef diff --git a/pkgs/toolchain/sed/sed.nm b/pkgs/toolchain/sed/sed.nm deleted file mode 100644 index ec14cac..0000000 --- a/pkgs/toolchain/sed/sed.nm +++ /dev/null @@ -1,13 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/sed/sed.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --without-included-regex - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef diff --git a/pkgs/toolchain/tar/patches/tar-1.22-vfatTruncate.patch b/pkgs/toolchain/tar/patches/tar-1.22-vfatTruncate.patch deleted file mode 100644 index bcbb88e..0000000 --- a/pkgs/toolchain/tar/patches/tar-1.22-vfatTruncate.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- tar-1.15.1/src/system.c.vfatTruncate 2004-09-06 07:31:00.000000000 -0400 -+++ tar-1.15.1/src/system.c 2006-02-03 14:40:51.000000000 -0500 -@@ -272,8 +272,25 @@ - int - sys_truncate (int fd) - { -+ struct stat st; - off_t pos = lseek (fd, (off_t) 0, SEEK_CUR); -- return pos < 0 ? -1 : ftruncate (fd, pos); -+ -+ if ( pos < 0) -+ return -1; -+ -+ if ( ftruncate(fd, pos) && errno == EPERM ) { -+ /* wrapper around ftruncate: -+ * ftruncate may fail to grow the size of a file with some OS and filesystem -+ * combinations. Linux and vfat/fat is one example. If this is the case do -+ * a write to grow the file to the desired length. -+ */ -+ if( (fstat( fd, &st ) == -1) || -+ (st.st_size >= pos) || -+ (lseek( fd, pos - 1, SEEK_SET) == (off_t)-1) || -+ (write( fd, "\0", 1) == -1) ) -+ return -1; -+ } -+ return 0; - } - - /* Return nonzero if NAME is the name of a regular file, or if the file diff --git a/pkgs/toolchain/tar/patches/tar-1.23-xattrs.patch b/pkgs/toolchain/tar/patches/tar-1.23-xattrs.patch deleted file mode 100644 index b829652..0000000 --- a/pkgs/toolchain/tar/patches/tar-1.23-xattrs.patch +++ /dev/null @@ -1,1574 +0,0 @@ -diff -urNp tar-1.23-orig/configure.ac tar-1.23/configure.ac ---- tar-1.23-orig/configure.ac 2010-03-10 11:47:54.000000000 +0100 -+++ tar-1.23/configure.ac 2010-03-12 13:48:43.000000000 +0100 -@@ -44,7 +44,7 @@ AC_CHECK_HEADERS_ONCE(fcntl.h linux/fd.h - sys/param.h sys/device.h sys/filio.h sys/gentape.h \ - sys/inet.h sys/io/trioctl.h \ - sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \ -- unistd.h locale.h) -+ unistd.h locale.h attr/xattr.h sys/acl.h) - - AC_CHECK_HEADERS([sys/buf.h], [], [], - [#if HAVE_SYS_PARAM_H -@@ -91,6 +91,12 @@ gl_INIT - tar_PAXUTILS - - AC_CHECK_FUNCS(fsync getdtablesize lstat mkfifo readlink symlink setlocale utimes) -+AC_CHECK_FUNCS(getxattr fgetxattr lgetxattr \ -+ setxattr fsetxattr lsetxattr \ -+ listxattr flistxattr llistxattr, -+ AC_DEFINE(HAVE_XATTRS,,[Define if we have a working extended attributes]),) -+AC_CHECK_LIB(acl, acl_get_fd) -+ - AC_CHECK_DECLS([getgrgid],,, [#include <grp.h>]) - AC_CHECK_DECLS([getpwuid],,, [#include <pwd.h>]) - AC_CHECK_DECLS([time],,, [#include <time.h>]) -@@ -214,6 +220,7 @@ AC_DEFINE_UNQUOTED(DEFAULT_QUOTING_STYLE - # Iconv - AM_ICONV - AC_CHECK_HEADERS(iconv.h) -+AC_CHECK_HEADERS(attr/xattr.h) - AC_CHECK_TYPE(iconv_t,:, - AC_DEFINE(iconv_t, int, - [Conversion descriptor type]), -@@ -223,6 +230,17 @@ AC_CHECK_TYPE(iconv_t,:, - #endif - ]) - -+AC_ARG_ENABLE(selinux, -+ AC_HELP_STRING([--enable-selinux], -+ [enable SELinux support (disabled by default)]), -+ [selinux_enabled=$enableval], -+ [selinux_enabled=no]) -+ -+if test "x$selinux_enabled" = xyes; then -+ AC_CHECK_LIB(selinux, getfilecon) -+ AC_CHECK_HEADERS(selinux/selinux.h) -+fi -+ - # Gettext. - AM_GNU_GETTEXT([external], [need-formatstring-macros]) - AM_GNU_GETTEXT_VERSION([0.16]) -diff -urNp tar-1.23-orig/doc/tar.texi tar-1.23/doc/tar.texi ---- tar-1.23-orig/doc/tar.texi 2010-03-09 15:24:24.000000000 +0100 -+++ tar-1.23/doc/tar.texi 2010-03-12 13:48:43.000000000 +0100 -@@ -2364,6 +2364,10 @@ Normally when creating an archive, @comm - @samp{/} from member names. This option disables that behavior. - @xref{absolute}. - -+@opsummary{acl} -+@item --acls -+Causes @command{tar} to store ACL's. @xref{Attributes}. -+ - @opsummary{after-date} - @item --after-date - -@@ -2885,6 +2889,10 @@ contents have changed (as opposed to jus - also back up files for which any status information has - changed). @xref{after}. - -+@opsummary{no-acl} -+@item --no-acls -+Causes @command{tar} not to store and not to extract ACL's. @xref{Attributes}. -+ - @opsummary{no-anchored} - @item --no-anchored - An exclude pattern can match any subsequence of the name's components. -@@ -2968,11 +2976,21 @@ locations. Usually @command{tar} determ - the archive can be seeked or not. Use this option to disable this - mechanism. - -+@opsummary{no-selinux} -+@item --no-selinux -+Causes @command{tar} not to store and not to extract SELinux security context. -+@xref{Attributes}. -+ - @opsummary{no-unquote} - @item --no-unquote - Treat all input file or member names literally, do not interpret - escape sequences. @xref{input name quoting}. - -+@opsummary{no-xattrs} -+@item --no-xattrs -+Causes @command{tar} not to store and not to extract xattrs. This option also -+enables @option{--no-selinux} and @option{--no-acls}. @xref{Attributes}. -+ - @opsummary{no-wildcards} - @item --no-wildcards - Do not use wildcards. -@@ -3202,6 +3220,11 @@ in cases when such recognition fails. I - archive is open for reading (e.g. with @option{--list} or - @option{--extract} options). - -+@opsummary{selinux} -+@item --selinux -+Causes @command{tar} to store SElinux security context. @xref{Attributes}. -+ -+ - @opsummary{show-defaults} - @item --show-defaults - -@@ -3411,6 +3434,11 @@ Enable or disable warning messages ident - messages are suppressed if @var{keyword} is prefixed with @samp{no-}. - @xref{warnings}. - -+@opsummary{xattrs} -+@item --xattrs -+Causes @command{tar} to store xattrs. This option also enables -+@option{--selinux} and @option{--acls}. @xref{Attributes}. -+ - @opsummary{wildcards} - @item --wildcards - Use wildcards when matching member names with patterns. -@@ -8599,6 +8627,8 @@ implementation able to read @samp{ustar} - most @samp{posix} archives as well, with the only exception that any - additional information (such as long file names etc.) will in such - case be extracted as plain text files along with the files it refers to. -+This is the only format that can store ACLs, SELinux context and extended -+attributes. - - This archive format will be the default format for future versions - of @GNUTAR{}. -@@ -9160,6 +9190,51 @@ Same as both @option{--same-permissions} - - This option is deprecated, and will be removed in @GNUTAR{} version 1.23. - -+@opindex acls -+@item --acls -+This option causes @command{tar} to store the current ACL in the archive. -+ -+The @option{--acls} option has no equivalent short option name. -+ -+@opindex selinux -+@item --selinux -+This option causes @command{tar} to store the current SELinux security context -+information in the archive. -+ -+The @option{--selinux} option has no equivalent short option name. -+ -+@opindex xattrs -+@item --xattrs -+This option causes @command{tar} to store the current extended attributes in -+the archive. This option also enables @option{--acls} and @option{--selinux} if -+they haven't been set already. -+ -+The @option{--xattrs} option has no equivalent short option name. -+ -+@opindex no-acls -+@item --no-acls -+This option causes @command{tar} not to store the current ACL in the archive -+and not to extract any ACL information in an archive. -+ -+The @option{--no-acls} option has no equivalent short option name. -+ -+@opindex no-selinux -+@item --no-selinux -+This option causes @command{tar} not to store the current SELinux security -+context information in the archive and not to extract any SELinux information in -+an archive. -+ -+The @option{--no-selinux} option has no equivalent short option name. -+ -+@opindex no-xattrs -+@item --no-xattrs -+This option causes @command{tar} not to store the current extended attributes in -+the archive and not to extract any extended attributes in an archive. This -+option also enables @option{--no-acls} and @option{--no-selinux} if -+they haven't been set already. -+ -+The @option{--no-xattrs} option has no equivalent short option name. -+ - @end table - - @node Portability -diff -urNp tar-1.23-orig/src/common.h tar-1.23/src/common.h ---- tar-1.23-orig/src/common.h 2010-01-26 13:21:18.000000000 +0100 -+++ tar-1.23/src/common.h 2010-03-12 13:48:43.000000000 +0100 -@@ -251,6 +251,15 @@ GLOBAL int same_owner_option; - /* If positive, preserve permissions when extracting. */ - GLOBAL int same_permissions_option; - -+/* If positive, save the SELinux context. */ -+GLOBAL int selinux_context_option; -+ -+/* If positive, save the ACLs. */ -+GLOBAL int acls_option; -+ -+/* If positive, save the user and root xattrs. */ -+GLOBAL int xattrs_option; -+ - /* When set, strip the given number of file name components from the file name - before extracting */ - GLOBAL size_t strip_name_components; -@@ -732,6 +741,9 @@ extern char *output_start; - - void update_archive (void); - -+/* Module attrs.c. */ -+#include "xattrs.h" -+ - /* Module xheader.c. */ - - void xheader_init (struct xheader *xhdr); -@@ -753,6 +765,12 @@ bool xheader_string_end (struct xheader - bool xheader_keyword_deleted_p (const char *kw); - char *xheader_format_name (struct tar_stat_info *st, const char *fmt, - size_t n); -+void xheader_xattr_init(struct tar_stat_info *st); -+void xheader_xattr_free(struct xattr_array *vals, size_t sz); -+void xheader_xattr_copy(const struct tar_stat_info *st, -+ struct xattr_array **vals, size_t *sz); -+void xheader_xattr_add(struct tar_stat_info *st, -+ const char *key, const char *val, size_t len); - - /* Module system.c */ - -diff -urNp tar-1.23-orig/src/create.c tar-1.23/src/create.c ---- tar-1.23-orig/src/create.c 2010-03-09 13:52:41.000000000 +0100 -+++ tar-1.23/src/create.c 2010-03-12 13:48:43.000000000 +0100 -@@ -24,6 +24,7 @@ - #include <quotearg.h> - - #include "common.h" -+ - #include <hash.h> - - struct link -@@ -947,6 +948,30 @@ start_header (struct tar_stat_info *st) - GNAME_TO_CHARS (st->gname, header->header.gname); - } - -+ if (archive_format == POSIX_FORMAT) -+ { -+ if (acls_option > 0) -+ { -+ if (st->acls_a_ptr) -+ xheader_store ("SCHILY.acl.access", st, NULL); -+ if (st->acls_d_ptr) -+ xheader_store ("SCHILY.acl.default", st, NULL); -+ } -+ if ((selinux_context_option > 0) && st->cntx_name) -+ xheader_store ("RHT.security.selinux", st, NULL); -+ if (xattrs_option > 0) -+ { -+ size_t scan_xattr = 0; -+ struct xattr_array *xattr_map = st->xattr_map; -+ -+ while (scan_xattr < st->xattr_map_size) -+ { -+ xheader_store (xattr_map[scan_xattr].xkey, st, &scan_xattr); -+ ++scan_xattr; -+ } -+ } -+ } -+ - return header; - } - -@@ -1580,6 +1605,10 @@ dump_file0 (struct tar_stat_info *st, co - } - } - -+ xattrs_acls_get(st, p, fd, !is_dir); -+ xattrs_selinux_get(st, p, fd); -+ xattrs_xattrs_get(st, p, fd); -+ - if (is_dir) - { - const char *tag_file_name; -@@ -1702,6 +1731,9 @@ dump_file0 (struct tar_stat_info *st, co - if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT) < size) - write_long_link (st); - -+ xattrs_selinux_get(st, p, -1); -+ xattrs_xattrs_get(st, p, -1); -+ - block_ordinal = current_block_ordinal (); - st->stat.st_size = 0; /* force 0 size on symlink */ - header = start_header (st); -diff -urNp tar-1.23-orig/src/extract.c tar-1.23/src/extract.c ---- tar-1.23-orig/src/extract.c 2010-01-26 12:28:09.000000000 +0100 -+++ tar-1.23/src/extract.c 2010-03-12 13:48:43.000000000 +0100 -@@ -70,6 +70,13 @@ struct delayed_set_stat - mode_t invert_permissions; - enum permstatus permstatus; - bool after_links; -+ char *cntx_name; -+ char *acls_a_ptr; -+ size_t acls_a_len; -+ char *acls_d_ptr; -+ size_t acls_d_len; -+ size_t xattr_map_size; /* Size of the xattr map */ -+ struct xattr_array *xattr_map; - char file_name[1]; - }; - -@@ -97,6 +104,18 @@ struct delayed_link - hard-linked together. */ - struct string_list *sources; - -+ /* SELinux context */ -+ char *cntx_name; -+ -+ /* ACLs */ -+ char *acls_a_ptr; -+ size_t acls_a_len; -+ char *acls_d_ptr; -+ size_t acls_d_len; -+ -+ size_t xattr_map_size; /* Size of the xattr map */ -+ struct xattr_array *xattr_map; -+ - /* The desired target of the desired link. */ - char target[1]; - }; -@@ -290,6 +309,10 @@ set_stat (char const *file_name, - give files away. */ - } - -+ xattrs_acls_set(st, file_name, typeflag); -+ xattrs_selinux_set(st, file_name, typeflag); -+ xattrs_xattrs_set(st, file_name, typeflag); -+ - if (0 < same_owner_option && permstatus != INTERDIR_PERMSTATUS) - { - /* When lchown exists, it should be used to change the attributes of -@@ -366,6 +389,29 @@ delay_set_stat (char const *file_name, s - data->invert_permissions = invert_permissions; - data->permstatus = permstatus; - data->after_links = 0; -+ data->cntx_name = NULL; -+ assign_string (&data->cntx_name, st->cntx_name); -+ if (st->acls_a_ptr) -+ { -+ data->acls_a_ptr = xmemdup(st->acls_a_ptr, st->acls_a_len + 1); -+ data->acls_a_len = st->acls_a_len; -+ } -+ else -+ { -+ data->acls_a_ptr = NULL; -+ data->acls_a_len = 0; -+ } -+ if (st->acls_d_ptr) -+ { -+ data->acls_d_ptr = xmemdup(st->acls_d_ptr, st->acls_d_len + 1); -+ data->acls_d_len = st->acls_d_len; -+ } -+ else -+ { -+ data->acls_d_ptr = NULL; -+ data->acls_d_len = 0; -+ } -+ xheader_xattr_copy (st, &data->xattr_map, &data->xattr_map_size); - strcpy (data->file_name, file_name); - delayed_set_stat_head = data; - } -@@ -571,6 +617,31 @@ maybe_recoverable (char *file_name, int - } - } - -+/* Restore stat extended attributes (xattr) for FILE_NAME, using information -+ given in *ST. Restore before extraction because they may affect layout. -+ If not restoring permissions, invert the -+ INVERT_PERMISSIONS bits from the file's current permissions. -+ TYPEFLAG specifies the type of the file. -+ FILE_CREATED indicates set_xattr has created the file */ -+static int -+set_xattr (char const *file_name, struct tar_stat_info const *st, -+ mode_t invert_permissions, char typeflag, int *file_created) -+{ -+ int status = 0; -+ int interdir_made = 0; -+ -+ if ((xattrs_option >= 0) && st->xattr_map_size) { -+ mode_t mode = current_stat_info.stat.st_mode & MODE_RWX & ~ current_umask; -+ -+ do -+ status = mknod (file_name, mode ^ invert_permissions, 0); -+ while (status && maybe_recoverable ((char *)file_name, &interdir_made)); -+ xattrs_xattrs_set(st, file_name, typeflag); -+ *file_created = 1; -+ } -+ return(status); -+} -+ - /* Fix the statuses of all directories whose statuses need fixing, and - which are not ancestors of FILE_NAME. If AFTER_LINKS is - nonzero, do this for all such directories; otherwise, stop at the -@@ -624,11 +695,22 @@ apply_nonancestor_delayed_set_stat (char - sb.stat.st_gid = data->gid; - sb.atime = data->atime; - sb.mtime = data->mtime; -+ sb.cntx_name = data->cntx_name; -+ sb.acls_a_ptr = data->acls_a_ptr; -+ sb.acls_a_len = data->acls_a_len; -+ sb.acls_d_ptr = data->acls_d_ptr; -+ sb.acls_d_len = data->acls_d_len; -+ sb.xattr_map = data->xattr_map; -+ sb.xattr_map_size = data->xattr_map_size; - set_stat (data->file_name, &sb, cur_info, - data->invert_permissions, data->permstatus, DIRTYPE); - } - - delayed_set_stat_head = data->next; -+ xheader_xattr_free (data->xattr_map, data->xattr_map_size); -+ free (data->cntx_name); -+ free (data->acls_a_ptr); -+ free (data->acls_d_ptr); - free (data); - } - } -@@ -730,7 +812,7 @@ extract_dir (char *file_name, int typefl - - - static int --open_output_file (char *file_name, int typeflag, mode_t mode) -+open_output_file (char *file_name, int typeflag, mode_t mode, int file_created) - { - int fd; - int openflag = (O_WRONLY | O_BINARY | O_CREAT -@@ -738,6 +820,10 @@ open_output_file (char *file_name, int t - ? O_TRUNC - : O_EXCL)); - -+ /* File might be created in set_xattr. So clear O_EXCL to avoid open() failure */ -+ if (file_created) -+ openflag = openflag & ~O_EXCL; -+ - #if O_CTG - /* Contiguous files (on the Masscomp) have to specify the size in - the open call that creates them. */ -@@ -796,8 +882,18 @@ extract_file (char *file_name, int typef - else - { - int recover = RECOVER_NO; -+ int file_created = 0; -+ if (set_xattr (file_name, ¤t_stat_info, invert_permissions, -+ typeflag, &file_created)) -+ { -+ skip_member (); -+ open_error (file_name); -+ return 1; -+ } -+ - do -- fd = open_output_file (file_name, typeflag, mode ^ invert_permissions); -+ fd = open_output_file (file_name, typeflag, mode ^ invert_permissions, -+ file_created); - while (fd < 0 - && (recover = maybe_recoverable (file_name, &interdir_made)) - == RECOVER_OK); -@@ -922,6 +1018,13 @@ create_placeholder_file (char *file_name - + strlen (file_name) + 1); - p->sources->next = 0; - strcpy (p->sources->string, file_name); -+ p->cntx_name = NULL; -+ assign_string (&p->cntx_name, current_stat_info.cntx_name); -+ p->acls_a_ptr = NULL; -+ p->acls_a_len = 0; -+ p->acls_d_ptr = NULL; -+ p->acls_d_len = 0; -+ xheader_xattr_copy (¤t_stat_info, &p->xattr_map, &p->xattr_map_size); - strcpy (p->target, current_stat_info.link_name); - - h = delayed_set_stat_head; -@@ -1335,6 +1438,13 @@ apply_delayed_links (void) - struct tar_stat_info st1; - st1.stat.st_uid = ds->uid; - st1.stat.st_gid = ds->gid; -+ st1.cntx_name = ds->cntx_name; -+ st1.acls_a_ptr = ds->acls_a_ptr; -+ st1.acls_a_len = ds->acls_a_len; -+ st1.acls_d_ptr = ds->acls_d_ptr; -+ st1.acls_d_len = ds->acls_d_len; -+ st1.xattr_map = ds->xattr_map; -+ st1.xattr_map_size = ds->xattr_map_size; - set_stat (source, &st1, NULL, 0, 0, SYMTYPE); - valid_source = source; - } -@@ -1348,6 +1458,9 @@ apply_delayed_links (void) - sources = next; - } - -+ xheader_xattr_free (ds->xattr_map, ds->xattr_map_size); -+ free (ds->cntx_name); -+ - { - struct delayed_link *next = ds->next; - free (ds); -diff -urNp tar-1.23-orig/src/list.c tar-1.23/src/list.c ---- tar-1.23-orig/src/list.c 2010-03-12 13:40:53.000000000 +0100 -+++ tar-1.23/src/list.c 2010-03-12 13:48:43.000000000 +0100 -@@ -585,6 +585,13 @@ decode_header (union block *header, stru - assign_string (&stat_info->gname, - header->header.gname[0] ? header->header.gname : NULL); - -+ stat_info->acls_a_ptr = NULL; -+ stat_info->acls_a_len = 0; -+ stat_info->acls_d_ptr = NULL; -+ stat_info->acls_d_len = 0; -+ stat_info->cntx_name = NULL; -+ xheader_xattr_init(stat_info); -+ - if (format == OLDGNU_FORMAT && incremental_option) - { - stat_info->atime.tv_sec = TIME_FROM_HEADER (header->oldgnu_header.atime); -diff -urNp tar-1.23-orig/src/Makefile.am tar-1.23/src/Makefile.am ---- tar-1.23-orig/src/Makefile.am 2010-01-26 12:30:20.000000000 +0100 -+++ tar-1.23/src/Makefile.am 2010-03-12 13:48:43.000000000 +0100 -@@ -20,7 +20,7 @@ - - bin_PROGRAMS = tar - --noinst_HEADERS = arith.h common.h tar.h -+noinst_HEADERS = arith.h common.h tar.h xattrs.h - tar_SOURCES = \ - buffer.c\ - checkpoint.c\ -@@ -42,10 +42,11 @@ tar_SOURCES = \ - unlink.c\ - update.c\ - utf8.c\ -- warning.c -+ warning.c\ -+ xattrs.c - - INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib -I../lib - - LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV) - --tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) -+tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) -diff -urNp tar-1.23-orig/src/tar.c tar-1.23/src/tar.c ---- tar-1.23-orig/src/tar.c 2010-03-09 13:52:41.000000000 +0100 -+++ tar-1.23/src/tar.c 2010-03-12 13:48:43.000000000 +0100 -@@ -255,7 +255,8 @@ tar_set_quoting_style (char *arg) - - enum - { -- ANCHORED_OPTION = CHAR_MAX + 1, -+ ACLS_OPTION = CHAR_MAX + 1, -+ ANCHORED_OPTION, - ATIME_PRESERVE_OPTION, - BACKUP_OPTION, - CHECK_DEVICE_OPTION, -@@ -287,6 +288,7 @@ enum - MODE_OPTION, - MTIME_OPTION, - NEWER_MTIME_OPTION, -+ NO_ACLS_OPTION, - NO_ANCHORED_OPTION, - NO_AUTO_COMPRESS_OPTION, - NO_CHECK_DEVICE_OPTION, -@@ -300,9 +302,11 @@ enum - NO_SAME_OWNER_OPTION, - NO_SAME_PERMISSIONS_OPTION, - NO_SEEK_OPTION, -+ NO_SELINUX_CONTEXT_OPTION, - NO_UNQUOTE_OPTION, - NO_WILDCARDS_MATCH_SLASH_OPTION, - NO_WILDCARDS_OPTION, -+ NO_XATTR_OPTION, - NULL_OPTION, - NUMERIC_OWNER_OPTION, - OCCURRENCE_OPTION, -@@ -324,6 +328,7 @@ enum - RMT_COMMAND_OPTION, - RSH_COMMAND_OPTION, - SAME_OWNER_OPTION, -+ SELINUX_CONTEXT_OPTION, - SHOW_DEFAULTS_OPTION, - SHOW_OMITTED_DIRS_OPTION, - SHOW_TRANSFORMED_NAMES_OPTION, -@@ -339,7 +344,8 @@ enum - VOLNO_FILE_OPTION, - WARNING_OPTION, - WILDCARDS_MATCH_SLASH_OPTION, -- WILDCARDS_OPTION -+ WILDCARDS_OPTION, -+ XATTR_OPTION - }; - - const char *argp_program_version = "tar (" PACKAGE_NAME ") " VERSION; -@@ -485,6 +491,10 @@ static struct argp_option options[] = { - {NULL, 0, NULL, 0, - N_("Handling of file attributes:"), GRID }, - -+ {"acls", ACLS_OPTION, 0, 0, -+ N_("Save the ACLs to the archive"), GRID+1 }, -+ {"no-acls", NO_ACLS_OPTION, 0, 0, -+ N_("Don't extract the ACLs from the archive"), GRID+1 }, - {"owner", OWNER_OPTION, N_("NAME"), 0, - N_("force NAME as owner for added files"), GRID+1 }, - {"group", GROUP_OPTION, N_("NAME"), 0, -@@ -515,6 +525,14 @@ static struct argp_option options[] = { - {"preserve-order", 's', 0, 0, - N_("sort names to extract to match archive"), GRID+1 }, - {"same-order", 0, 0, OPTION_ALIAS, NULL, GRID+1 }, -+ {"selinux", SELINUX_CONTEXT_OPTION, 0, 0, -+ N_("Save the SELinux context to the archive"), GRID+1 }, -+ {"no-selinux", NO_SELINUX_CONTEXT_OPTION, 0, 0, -+ N_("Don't extract the SELinux context from the archive"), GRID+1 }, -+ {"xattrs", XATTR_OPTION, 0, 0, -+ N_("Save the user/root xattrs to the archive"), GRID+1 }, -+ {"no-xattrs", NO_XATTR_OPTION, 0, 0, -+ N_("Don't extract the user/root xattrs from the archive"), GRID+1 }, - {"preserve", PRESERVE_OPTION, 0, 0, - N_("same as both -p and -s"), GRID+1 }, - {"delay-directory-restore", DELAY_DIRECTORY_RESTORE_OPTION, 0, 0, -@@ -2060,6 +2078,37 @@ parse_opt (int key, char *arg, struct ar - same_permissions_option = -1; - break; - -+ case ACLS_OPTION: -+ set_archive_format ("posix"); -+ acls_option = 1; -+ break; -+ -+ case NO_ACLS_OPTION: -+ acls_option = -1; -+ break; -+ -+ case SELINUX_CONTEXT_OPTION: -+ set_archive_format ("posix"); -+ selinux_context_option = 1; -+ break; -+ -+ case NO_SELINUX_CONTEXT_OPTION: -+ selinux_context_option = -1; -+ break; -+ -+ case XATTR_OPTION: -+ set_archive_format ("posix"); -+ if (!acls_option) acls_option = 1; -+ if (!selinux_context_option) selinux_context_option = 1; -+ xattrs_option = 1; -+ break; -+ -+ case NO_XATTR_OPTION: -+ if (!acls_option) acls_option = -1; -+ if (!selinux_context_option) selinux_context_option = -1; -+ xattrs_option = -1; -+ break; -+ - case RECURSION_OPTION: - recursion_option = FNM_LEADING_DIR; - break; -@@ -2442,6 +2491,29 @@ decode_options (int argc, char **argv) - || subcommand_option != LIST_SUBCOMMAND)) - USAGE_ERROR ((0, 0, _("--pax-option can be used only on POSIX archives"))); - -+ /* star create's non-POSIX typed archives with xattr support, so allow the -+ extra headers */ -+ if ((acls_option > 0) -+ && archive_format != POSIX_FORMAT -+ && (subcommand_option != EXTRACT_SUBCOMMAND -+ || subcommand_option != DIFF_SUBCOMMAND -+ || subcommand_option != LIST_SUBCOMMAND)) -+ USAGE_ERROR ((0, 0, _("--acls can be used only on POSIX archives"))); -+ -+ if ((selinux_context_option > 0) -+ && archive_format != POSIX_FORMAT -+ && (subcommand_option != EXTRACT_SUBCOMMAND -+ || subcommand_option != DIFF_SUBCOMMAND -+ || subcommand_option != LIST_SUBCOMMAND)) -+ USAGE_ERROR ((0, 0, _("--selinux can be used only on POSIX archives"))); -+ -+ if ((xattrs_option > 0) -+ && archive_format != POSIX_FORMAT -+ && (subcommand_option != EXTRACT_SUBCOMMAND -+ || subcommand_option != DIFF_SUBCOMMAND -+ || subcommand_option != LIST_SUBCOMMAND)) -+ USAGE_ERROR ((0, 0, _("--xattrs can be used only on POSIX archives"))); -+ - /* If ready to unlink hierarchies, so we are for simpler files. */ - if (recursive_unlink_option) - old_files_option = UNLINK_FIRST_OLD_FILES; -@@ -2662,11 +2734,15 @@ tar_stat_init (struct tar_stat_info *st) - void - tar_stat_destroy (struct tar_stat_info *st) - { -+ xheader_xattr_free (st->xattr_map, st->xattr_map_size); - free (st->orig_file_name); - free (st->file_name); - free (st->link_name); - free (st->uname); - free (st->gname); -+ free (st->cntx_name); -+ free (st->acls_a_ptr); -+ free (st->acls_d_ptr); - free (st->sparse_map); - free (st->dumpdir); - xheader_destroy (&st->xhdr); -diff -urNp tar-1.23-orig/src/tar.h tar-1.23/src/tar.h ---- tar-1.23-orig/src/tar.h 2010-01-26 12:30:20.000000000 +0100 -+++ tar-1.23/src/tar.h 2010-03-12 13:48:43.000000000 +0100 -@@ -276,6 +276,14 @@ struct xheader - uintmax_t string_length; - }; - -+/* Information about xattrs for a file. */ -+struct xattr_array -+ { -+ char *xkey; -+ char *xval_ptr; -+ size_t xval_len; -+ }; -+ - struct tar_stat_info - { - char *orig_file_name; /* name of file read from the archive header */ -@@ -287,6 +295,15 @@ struct tar_stat_info - - char *uname; /* user name of owner */ - char *gname; /* group name of owner */ -+ -+ char *cntx_name; /* SELinux context for the current archive entry. */ -+ -+ char *acls_a_ptr; /* Access ACLs for the current archive entry. */ -+ size_t acls_a_len; /* Access ACLs for the current archive entry. */ -+ -+ char *acls_d_ptr; /* Default ACLs for the current archive entry. */ -+ size_t acls_d_len; /* Default ACLs for the current archive entry. */ -+ - struct stat stat; /* regular filesystem stat */ - - /* STAT doesn't always have access, data modification, and status -@@ -309,6 +326,9 @@ struct tar_stat_info - size_t sparse_map_size; /* Size of the sparse map */ - struct sp_array *sparse_map; - -+ size_t xattr_map_size; /* Size of the xattr map */ -+ struct xattr_array *xattr_map; -+ - /* Extended headers */ - struct xheader xhdr; - -diff -urNp tar-1.23-orig/src/xattrs.c tar-1.23/src/xattrs.c ---- tar-1.23-orig/src/xattrs.c 1970-01-01 01:00:00.000000000 +0100 -+++ tar-1.23/src/xattrs.c 2010-03-12 13:48:43.000000000 +0100 -@@ -0,0 +1,488 @@ -+/* Create a tar archive. -+ -+ Copyright (C) 2006 Free Software Foundation, Inc. -+ -+ Written by James Antill, on 2006-07-27. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU General Public License as published by the -+ Free Software Foundation; either version 2, or (at your option) any later -+ version. -+ -+ This program is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -+ Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with this program; if not, write to the Free Software Foundation, Inc., -+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -+ -+#include <system.h> -+ -+#include <quotearg.h> -+ -+#include "common.h" -+ -+ -+#ifndef HAVE_SELINUX_SELINUX_H -+# undef HAVE_LIBSELINUX -+#endif -+ -+#ifndef HAVE_ATTR_XATTR_H -+# undef HAVE_XATTRS -+#endif -+ -+#ifndef HAVE_SYS_ACL_H -+# undef HAVE_LIBACL -+#endif -+ -+#ifdef HAVE_SELINUX_SELINUX_H -+# include <selinux/selinux.h> -+#endif -+ -+#ifdef HAVE_ATTR_XATTR_H -+# include <attr/xattr.h> -+#endif -+ -+#ifdef HAVE_SYS_ACL_H -+# include <sys/acl.h> -+#endif -+ -+ -+#if 0 /* unused by xattr's atm. */ -+static void xattrs__fd_get(struct tar_stat_info *st, -+ char const *file_name, int fd, const char *attr, -+ char **ret_ptr, size_t *ret_len) -+{ -+#ifdef HAVE_XATTRS -+ static ssize_t asz = 1024; -+ ssize_t ret = 0; -+ static char *val = NULL; -+ -+ if (!val) val = xmalloc (asz); -+ -+ while (((ret = fgetxattr (fd, attr, val, asz)) == -1) && -+ (errno == ERANGE)) -+ { -+ asz <<= 1; -+ val = xrealloc (val, asz); -+ } -+ -+ if (ret != -1) -+ { -+ *ret_ptr = xmemdup (val, ret + 1); -+ *ret_len = ret; -+ } -+ else if (errno != ENOATTR) -+ call_arg_warn ("fgetxattr", file_name); -+#endif -+} -+#endif -+ -+static void xattrs__acls_get_a(struct tar_stat_info *st, -+ char const *file_name, int fd, -+ char **ret_ptr, size_t *ret_len) -+{ /* "system.posix_acl_access" */ -+#ifdef HAVE_LIBACL -+ char *val = NULL; -+ ssize_t len; -+ acl_t acl; -+ -+ if (fd != -1) -+ { -+ if ((acl = acl_get_fd (fd)) == (acl_t)NULL) -+ { -+ if (errno != ENOTSUP) -+ call_arg_warn ("acl_get_fd", file_name); -+ return; -+ } -+ } -+ else if ((acl = acl_get_file (file_name, ACL_TYPE_ACCESS)) == (acl_t)NULL) -+ { -+ if (errno != ENOTSUP) -+ call_arg_warn ("acl_get_file", file_name); -+ return; -+ } -+ -+ -+ val = acl_to_text(acl, &len); -+ acl_free (acl); -+ -+ if (val == NULL) -+ { -+ call_arg_warn ("acl_to_text", file_name); -+ return; -+ } -+ -+ *ret_ptr = xstrdup (val); -+ *ret_len = len; -+ -+ acl_free (val); -+#endif -+} -+ -+static void xattrs__acls_get_d(struct tar_stat_info *st, -+ char const *file_name, -+ char **ret_ptr, size_t *ret_len) -+{ /* "system.posix_acl_default" */ -+#ifdef HAVE_LIBACL -+ char *val = NULL; -+ ssize_t len; -+ acl_t acl; -+ -+ if ((acl = acl_get_file (file_name, ACL_TYPE_DEFAULT)) == (acl_t)NULL) -+ { -+ if (errno != ENOTSUP) -+ call_arg_warn ("acl_get_file", file_name); -+ return; -+ } -+ -+ val = acl_to_text(acl, &len); -+ acl_free (acl); -+ -+ if (val == NULL) -+ { -+ call_arg_warn ("acl_to_text", file_name); -+ return; -+ } -+ -+ *ret_ptr = xstrdup (val); -+ *ret_len = len; -+ -+ acl_free (val); -+#endif -+} -+ -+void xattrs_acls_get(struct tar_stat_info *st, char const *file_name, int fd, -+ int xisfile) -+{ -+ if (acls_option > 0) -+ { -+#ifndef HAVE_LIBACL -+ static int done = 0; -+ if (!done) -+ WARN ((0, 0, _("ACL support requested, but not available"))); -+ done = 1; -+#endif -+ xattrs__acls_get_a (st, file_name, fd, -+ &st->acls_a_ptr, &st->acls_a_len); -+ if (!xisfile) -+ xattrs__acls_get_d (st, file_name, -+ &st->acls_d_ptr, &st->acls_d_len); -+ } -+} -+ -+void xattrs_selinux_get(struct tar_stat_info *st, char const *file_name, int fd) -+{ -+ if (selinux_context_option > 0) -+ { -+#ifndef HAVE_LIBSELINUX -+ static int done = 0; -+ if (!done) -+ WARN ((0, 0, _("SELinux support requested, but not available"))); -+ done = 1; -+#else -+ if (fd == -1) -+ { -+ if ((lgetfilecon (file_name, &st->cntx_name) == -1) && (errno != ENOTSUP) && (errno != ENODATA)) -+ call_arg_warn ("lgetfilecon", file_name); -+ } -+ else if ((fgetfilecon (fd, &st->cntx_name) == -1) && (errno != ENOTSUP) && (errno != ENODATA)) -+ call_arg_warn ("fgetfilecon", file_name); -+#endif -+ } -+} -+ -+void xattrs_xattrs_get(struct tar_stat_info *st, char const *file_name, int fd) -+{ -+ if (xattrs_option > 0) -+ { /* get all xattrs ... this include security.* and system.* if -+ available. We filter them here, but we have to filter them -+ in xattrs_xattrs_set() anyway. -+ */ -+ static ssize_t xsz = 1024; -+ static char *xatrs = NULL; -+ ssize_t xret = -1; -+ -+#ifndef HAVE_XATTRS -+ static int done = 0; -+ if ((xattrs_option > 0) && !done) -+ WARN ((0, 0, _("Xattr support requested, but not available"))); -+ done = 1; -+#else -+ -+ if (!xatrs) xatrs = xmalloc (xsz); -+ -+ while (((fd == -1) ? -+ ((xret = llistxattr (file_name, xatrs, xsz)) == -1) : -+ ((xret = flistxattr (fd, xatrs, xsz)) == -1)) && -+ (errno == ERANGE)) -+ { -+ xsz <<= 1; -+ xatrs = xrealloc (xatrs, xsz); -+ } -+ -+ if (xret == -1) -+ call_arg_warn ((fd == -1) ? "llistxattrs" : "flistxattrs", file_name); -+ else -+ { -+ const char *attr = xatrs; -+ static ssize_t asz = 1024; -+ static char *val = NULL; -+ -+ if (!val) val = xmalloc (asz); -+ -+ while (xret > 0) -+ { -+ size_t len = strlen (attr); -+ ssize_t aret = 0; -+ -+ /* Archive all xattrs during creation, decide at extraction time -+ * which ones are of interest/use for the target filesystem. */ -+ while (((fd == -1) ? -+ ((aret = lgetxattr (file_name, attr, val, asz)) == -1) : -+ ((aret = fgetxattr (fd, attr, val, asz)) == -1)) && -+ (errno == ERANGE)) -+ { -+ asz <<= 1; -+ val = xrealloc (val, asz); -+ } -+ -+ if (aret != -1) -+ xheader_xattr_add (st, attr, val, aret); -+ else if (errno != ENOATTR) -+ call_arg_warn ((fd==-1) ? "lgetxattr" : "fgetxattr", file_name); -+ -+ attr += len + 1; -+ xret -= len + 1; -+ } -+ } -+#endif -+ } -+} -+ -+static void xattrs__fd_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag, -+ const char *attr, -+ const char *ptr, size_t len) -+{ -+#ifdef HAVE_XATTRS -+ if (ptr) -+ { -+ const char *sysname = "setxattr"; -+ int ret = -1; -+ -+ if (typeflag != SYMTYPE) -+ ret = setxattr (file_name, attr, ptr, len, 0); -+ else -+ { -+ sysname = "lsetxattr"; -+ ret = lsetxattr (file_name, attr, ptr, len, 0); -+ } -+ -+ /* do not print warnings when SELinux is disabled */ -+ if ((ret == -1) && (errno != EPERM) && (errno != ENOTSUP)) -+ call_arg_error(sysname, file_name); -+ } -+#endif -+} -+ -+/* convert unix permissions into an ACL ... needed due to "default" ACLs */ -+#ifdef HAVE_LIBACL -+static acl_t perms2acl(int perms) -+{ -+ char val[] = "user::---,group::---,other::---"; -+ /* 0123456789 123456789 123456789 123456789 */ -+ -+ /* user */ -+ if (perms & 0400) val[ 6] = 'r'; -+ if (perms & 0200) val[ 7] = 'w'; -+ if (perms & 0100) val[ 8] = 'x'; -+ -+ /* group */ -+ if (perms & 0040) val[17] = 'r'; -+ if (perms & 0020) val[18] = 'w'; -+ if (perms & 0010) val[19] = 'x'; -+ -+ /* other */ -+ if (perms & 0004) val[28] = 'r'; -+ if (perms & 0002) val[29] = 'w'; -+ if (perms & 0001) val[30] = 'x'; -+ -+ return (acl_from_text (val)); -+} -+#endif -+ -+static char *skip_to_ext_fields(char *ptr) -+{ -+ ptr += strcspn(ptr, ":,\n"); /* skip tag name. Ie. user/group/default/mask */ -+ -+ if (*ptr != ':') -+ return (ptr); /* error? no user/group field */ -+ ++ptr; -+ -+ ptr += strcspn(ptr, ":,\n"); /* skip user/group name */ -+ -+ if (*ptr != ':') -+ return (ptr); /* error? no perms field */ -+ ++ptr; -+ -+ ptr += strcspn(ptr, ":,\n"); /* skip perms */ -+ -+ if (*ptr != ':') -+ return (ptr); /* no extra fields */ -+ -+ return (ptr); -+} -+ -+/* The POSIX draft allows extra fields after the three main ones. Star -+ uses this to add a fourth field for user/group which is the numeric ID. -+ We just skip all extra fields atm. */ -+static const char *fixup_extra_acl_fields(const char *ptr) -+{ -+ char *src = (char *)ptr; -+ char *dst = (char *)ptr; -+ -+ while (*src) -+ { -+ const char *old = src; -+ size_t len = 0; -+ -+ src = skip_to_ext_fields(src); -+ len = src - old; -+ if (old != dst) memmove(dst, old, len); -+ dst += len; -+ -+ if (*src == ':') /* We have extra fields, skip them all */ -+ src += strcspn(src, "\n,"); -+ -+ if ((*src == '\n') || (*src == ',')) -+ *dst++ = *src++; /* also done when dst == src, but that's ok */ -+ } -+ if (src != dst) -+ *dst = 0; -+ -+ return ptr; -+} -+ -+static void xattrs__acls_set(struct tar_stat_info const *st, -+ char const *file_name, int type, -+ const char *ptr, size_t len) -+{ /* "system.posix_acl_access" */ -+#ifdef HAVE_LIBACL -+ acl_t acl; -+ -+ if (ptr) -+ { -+ /* assert (strlen (ptr) == len); */ -+ ptr = fixup_extra_acl_fields(ptr); -+ -+ acl = acl_from_text (ptr); -+ acls_option = 1; -+ } -+ else if (acls_option > 0) -+ acl = perms2acl (st->stat.st_mode); -+ else -+ return; /* don't call acl functions unless we first hit an ACL, or -+ --acls was passed explicitly */ -+ -+ if (acl == (acl_t)NULL) -+ { -+ call_arg_warn ("acl_from_text", file_name); -+ return; -+ } -+ -+ if (acl_set_file (file_name, type, acl) == -1) -+ { -+ if (errno != ENOTSUP) -+ call_arg_warn ("acl_set_file", file_name); -+ } -+ acl_free (acl); -+#endif -+} -+ -+void xattrs_acls_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag) -+{ -+ if ((acls_option >= 0) && (typeflag != SYMTYPE)) -+ { -+#ifndef HAVE_LIBACL -+ static int done = 0; -+ if (!done) -+ WARN ((0, 0, _("ACL support requested, but not available"))); -+ done = 1; -+#else -+ xattrs__acls_set (st, file_name, ACL_TYPE_ACCESS, -+ st->acls_a_ptr, st->acls_a_len); -+ if ((typeflag == DIRTYPE) || (typeflag == GNUTYPE_DUMPDIR)) -+ xattrs__acls_set (st, file_name, ACL_TYPE_DEFAULT, -+ st->acls_d_ptr, st->acls_d_len); -+#endif -+ } -+} -+ -+void xattrs_selinux_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag) -+{ -+ if ((selinux_context_option >= 0) && st->cntx_name) -+ { -+ const char *sysname = "setfilecon"; -+ int ret = -1; -+ -+#ifndef HAVE_LIBSELINUX -+ static int done = 0; -+ if (!done) -+ WARN ((0, 0, _("SELinux support requested, but not available"))); -+ done = 1; -+#else -+ if (typeflag != SYMTYPE) -+ ret = setfilecon (file_name, st->cntx_name); -+ else -+ { -+ sysname = "lsetfilecon"; -+ ret = lsetfilecon (file_name, st->cntx_name); -+ } -+ -+ if ((ret == -1) && (errno == EPERM)) -+ call_arg_warn(sysname, file_name); -+ else if ((ret == -1) && (errno != EOPNOTSUPP)) -+ call_arg_error(sysname, file_name); -+#endif -+ } -+} -+ -+void xattrs_xattrs_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag) -+{ -+ if ((xattrs_option >= 0) && st->xattr_map_size) -+ { -+ size_t scan = 0; -+ -+#ifndef HAVE_XATTRS -+ static int done = 0; -+ if (!done) -+ WARN ((0, 0, _("Xattr support requested, but not available"))); -+ done = 1; -+#else -+ while (scan < st->xattr_map_size) -+ { -+ char *keyword = st->xattr_map[scan].xkey; -+ -+ /* assert (!memcpy (keyword, "SCHILY.xattr.", strlen("SCHILY.xattr."))); */ -+ keyword += strlen("SCHILY.xattr."); -+ -+ if (strncmp (keyword, "user.", strlen("user.")) && -+ strncmp (keyword, "lustre.", strlen("lustre.")) && -+ strncmp (keyword, "trusted.", strlen("trusted."))) -+ continue; /* don't try and set anything but normal xattrs */ -+ -+ xattrs__fd_set (st, file_name, typeflag, keyword, -+ st->xattr_map[scan].xval_ptr, -+ st->xattr_map[scan].xval_len); -+ -+ ++scan; -+ } -+#endif -+ } -+} -diff -urNp tar-1.23-orig/src/xattrs.h tar-1.23/src/xattrs.h ---- tar-1.23-orig/src/xattrs.h 1970-01-01 01:00:00.000000000 +0100 -+++ tar-1.23/src/xattrs.h 2010-03-12 13:48:43.000000000 +0100 -@@ -0,0 +1,14 @@ -+ -+extern void xattrs_acls_get(struct tar_stat_info *st, -+ char const *file_name, int fd, int xisfile); -+extern void xattrs_selinux_get(struct tar_stat_info *st, -+ char const *file_name, int fd); -+extern void xattrs_xattrs_get(struct tar_stat_info *st, -+ char const *file_name, int fd); -+ -+extern void xattrs_acls_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag); -+extern void xattrs_selinux_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag); -+extern void xattrs_xattrs_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag); -diff -urNp tar-1.23-orig/src/xheader.c tar-1.23/src/xheader.c ---- tar-1.23-orig/src/xheader.c 2010-02-12 11:03:09.000000000 +0100 -+++ tar-1.23/src/xheader.c 2010-03-12 13:50:44.000000000 +0100 -@@ -459,6 +459,74 @@ xheader_write_global (struct xheader *xh - } - } - -+void xheader_xattr_init(struct tar_stat_info *st) -+{ -+ st->xattr_map = NULL; -+ st->xattr_map_size = 0; -+} -+ -+void xheader_xattr_free(struct xattr_array *xattr_map, size_t xattr_map_size) -+{ -+ size_t scan = 0; -+ -+ while (scan < xattr_map_size) -+ { -+ free (xattr_map[scan].xkey); -+ free (xattr_map[scan].xval_ptr); -+ -+ ++scan; -+ } -+ free (xattr_map); -+} -+ -+static void xheader_xattr__add(struct xattr_array **xattr_map, -+ size_t *xattr_map_size, -+ const char *key, const char *val, size_t len) -+{ -+ size_t pos = (*xattr_map_size)++; -+ -+ *xattr_map = xrealloc (*xattr_map, -+ *xattr_map_size * sizeof(struct xattr_array)); -+ (*xattr_map)[pos].xkey = xstrdup (key); -+ (*xattr_map)[pos].xval_ptr = xmemdup (val, len + 1); -+ (*xattr_map)[pos].xval_len = len; -+} -+ -+void xheader_xattr_add(struct tar_stat_info *st, -+ const char *key, const char *val, size_t len) -+{ -+ size_t klen = strlen (key); -+ char *xkey = xmalloc (strlen("SCHILY.xattr.") + klen + 1); -+ char *tmp = xkey; -+ -+ tmp = stpcpy (tmp, "SCHILY.xattr."); -+ tmp = stpcpy (tmp, key); -+ -+ xheader_xattr__add (&st->xattr_map, &st->xattr_map_size, xkey, val, len); -+ -+ free (xkey); -+} -+ -+void xheader_xattr_copy(const struct tar_stat_info *st, -+ struct xattr_array **xattr_map, size_t *xattr_map_size) -+{ -+ size_t scan = 0; -+ -+ *xattr_map = NULL; -+ *xattr_map_size = 0; -+ -+ while (scan < st->xattr_map_size) -+ { -+ char *key = st->xattr_map[scan].xkey; -+ char *val = st->xattr_map[scan].xval_ptr; -+ size_t len = st->xattr_map[scan].xval_len; -+ -+ xheader_xattr__add(xattr_map, xattr_map_size, key, val, len); -+ -+ ++scan; -+ } -+} -+ - - /* General Interface */ - -@@ -472,6 +540,7 @@ struct xhdr_tab - struct xheader *, void const *data); - void (*decoder) (struct tar_stat_info *, char const *, char const *, size_t); - int flags; -+ bool prefix; - }; - - /* This declaration must be extern, because ISO C99 section 6.9.2 -@@ -488,8 +557,17 @@ locate_handler (char const *keyword) - struct xhdr_tab const *p; - - for (p = xhdr_tab; p->keyword; p++) -- if (strcmp (p->keyword, keyword) == 0) -- return p; -+ if (p->prefix) -+ { -+ if (strncmp (p->keyword, keyword, strlen(p->keyword)) == 0) -+ return p; -+ } -+ else -+ { -+ if (strcmp (p->keyword, keyword) == 0) -+ return p; -+ } -+ - return NULL; - } - -@@ -499,7 +577,7 @@ xheader_protected_pattern_p (const char - struct xhdr_tab const *p; - - for (p = xhdr_tab; p->keyword; p++) -- if ((p->flags & XHDR_PROTECTED) && fnmatch (pattern, p->keyword, 0) == 0) -+ if (!p->prefix && (p->flags & XHDR_PROTECTED) && fnmatch (pattern, p->keyword, 0) == 0) - return true; - return false; - } -@@ -510,7 +588,7 @@ xheader_protected_keyword_p (const char - struct xhdr_tab const *p; - - for (p = xhdr_tab; p->keyword; p++) -- if ((p->flags & XHDR_PROTECTED) && strcmp (p->keyword, keyword) == 0) -+ if (!p->prefix && (p->flags & XHDR_PROTECTED) && strcmp (p->keyword, keyword) == 0) - return true; - return false; - } -@@ -1469,6 +1547,71 @@ volume_filename_decoder (struct tar_stat - } - - static void -+xattr_selinux_coder (struct tar_stat_info const *st, char const *keyword, -+ struct xheader *xhdr, void const *data) -+{ -+ code_string (st->cntx_name, keyword, xhdr); -+} -+ -+static void -+xattr_selinux_decoder (struct tar_stat_info *st, -+ char const *keyword, char const *arg, size_t size) -+{ -+ decode_string (&st->cntx_name, arg); -+} -+ -+static void -+xattr_acls_a_coder (struct tar_stat_info const *st , char const *keyword, -+ struct xheader *xhdr, void const *data) -+{ -+ xheader_print_n (xhdr, keyword, st->acls_a_ptr, st->acls_a_len); -+} -+ -+static void -+xattr_acls_a_decoder (struct tar_stat_info *st, -+ char const *keyword, char const *arg, size_t size) -+{ -+ st->acls_a_ptr = xmemdup (arg, size + 1); -+ st->acls_a_len = size; -+} -+ -+static void -+xattr_acls_d_coder (struct tar_stat_info const *st , char const *keyword, -+ struct xheader *xhdr, void const *data) -+{ -+ xheader_print_n (xhdr, keyword, st->acls_d_ptr, st->acls_d_len); -+} -+ -+static void -+xattr_acls_d_decoder (struct tar_stat_info *st, -+ char const *keyword, char const *arg, size_t size) -+{ -+ st->acls_d_ptr = xmemdup (arg, size + 1); -+ st->acls_d_len = size; -+} -+ -+static void -+xattr_coder (struct tar_stat_info const *st , char const *keyword, -+ struct xheader *xhdr, void const *data) -+{ -+ struct xattr_array *xattr_map = st->xattr_map; -+ const size_t *off = data; -+ xheader_print_n (xhdr, keyword, -+ xattr_map[*off].xval_ptr, xattr_map[*off].xval_len); -+} -+ -+static void -+xattr_decoder (struct tar_stat_info *st, -+ char const *keyword, char const *arg, size_t size) -+{ -+ char *xstr = NULL; -+ -+ xstr = xmemdup(arg, size + 1); -+ xheader_xattr_add(st, keyword + strlen("SCHILY.xattr."), xstr, size); -+ free(xstr); -+} -+ -+static void - sparse_major_coder (struct tar_stat_info const *st, char const *keyword, - struct xheader *xhdr, void const *data) - { -@@ -1505,53 +1648,53 @@ sparse_minor_decoder (struct tar_stat_in - } - - struct xhdr_tab const xhdr_tab[] = { -- { "atime", atime_coder, atime_decoder, 0 }, -- { "comment", dummy_coder, dummy_decoder, 0 }, -- { "charset", dummy_coder, dummy_decoder, 0 }, -- { "ctime", ctime_coder, ctime_decoder, 0 }, -- { "gid", gid_coder, gid_decoder, 0 }, -- { "gname", gname_coder, gname_decoder, 0 }, -- { "linkpath", linkpath_coder, linkpath_decoder, 0 }, -- { "mtime", mtime_coder, mtime_decoder, 0 }, -- { "path", path_coder, path_decoder, 0 }, -- { "size", size_coder, size_decoder, 0 }, -- { "uid", uid_coder, uid_decoder, 0 }, -- { "uname", uname_coder, uname_decoder, 0 }, -+ { "atime", atime_coder, atime_decoder, 0, false }, -+ { "comment", dummy_coder, dummy_decoder, 0, false }, -+ { "charset", dummy_coder, dummy_decoder, 0, false }, -+ { "ctime", ctime_coder, ctime_decoder, 0, false }, -+ { "gid", gid_coder, gid_decoder, 0, false }, -+ { "gname", gname_coder, gname_decoder, 0, false }, -+ { "linkpath", linkpath_coder, linkpath_decoder, 0, false }, -+ { "mtime", mtime_coder, mtime_decoder, 0, false }, -+ { "path", path_coder, path_decoder, 0, false }, -+ { "size", size_coder, size_decoder, 0, false }, -+ { "uid", uid_coder, uid_decoder, 0, false }, -+ { "uname", uname_coder, uname_decoder, 0, false }, - - /* Sparse file handling */ - { "GNU.sparse.name", path_coder, path_decoder, -- XHDR_PROTECTED }, -+ XHDR_PROTECTED, false }, - { "GNU.sparse.major", sparse_major_coder, sparse_major_decoder, -- XHDR_PROTECTED }, -+ XHDR_PROTECTED, false }, - { "GNU.sparse.minor", sparse_minor_coder, sparse_minor_decoder, -- XHDR_PROTECTED }, -+ XHDR_PROTECTED, false }, - { "GNU.sparse.realsize", sparse_size_coder, sparse_size_decoder, -- XHDR_PROTECTED }, -+ XHDR_PROTECTED, false }, - { "GNU.sparse.numblocks", sparse_numblocks_coder, sparse_numblocks_decoder, -- XHDR_PROTECTED }, -+ XHDR_PROTECTED, false }, - - /* tar 1.14 - 1.15.90 keywords. */ - { "GNU.sparse.size", sparse_size_coder, sparse_size_decoder, -- XHDR_PROTECTED }, -+ XHDR_PROTECTED, false }, - /* tar 1.14 - 1.15.1 keywords. Multiple instances of these appeared in 'x' - headers, and each of them was meaningful. It confilcted with POSIX specs, - which requires that "when extended header records conflict, the last one - given in the header shall take precedence." */ - { "GNU.sparse.offset", sparse_offset_coder, sparse_offset_decoder, -- XHDR_PROTECTED }, -+ XHDR_PROTECTED, false }, - { "GNU.sparse.numbytes", sparse_numbytes_coder, sparse_numbytes_decoder, -- XHDR_PROTECTED }, -+ XHDR_PROTECTED, false }, - /* tar 1.15.90 keyword, introduced to remove the above-mentioned conflict. */ - { "GNU.sparse.map", NULL /* Unused, see pax_dump_header() */, -- sparse_map_decoder, 0 }, -+ sparse_map_decoder, 0, false }, - - { "GNU.dumpdir", dumpdir_coder, dumpdir_decoder, -- XHDR_PROTECTED }, -+ XHDR_PROTECTED, false }, - - /* Keeps the tape/volume label. May be present only in the global headers. - Equivalent to GNUTYPE_VOLHDR. */ - { "GNU.volume.label", volume_label_coder, volume_label_decoder, -- XHDR_PROTECTED | XHDR_GLOBAL }, -+ XHDR_PROTECTED | XHDR_GLOBAL, false }, - - /* These may be present in a first global header of the archive. - They provide the same functionality as GNUTYPE_MULTIVOL header. -@@ -1560,11 +1703,40 @@ struct xhdr_tab const xhdr_tab[] = { - GNU.volume.offset keeps the offset of the start of this volume, - otherwise kept in oldgnu_header.offset. */ - { "GNU.volume.filename", volume_label_coder, volume_filename_decoder, -- XHDR_PROTECTED | XHDR_GLOBAL }, -+ XHDR_PROTECTED | XHDR_GLOBAL, false }, - { "GNU.volume.size", volume_size_coder, volume_size_decoder, -- XHDR_PROTECTED | XHDR_GLOBAL }, -+ XHDR_PROTECTED | XHDR_GLOBAL, false }, - { "GNU.volume.offset", volume_offset_coder, volume_offset_decoder, -- XHDR_PROTECTED | XHDR_GLOBAL }, -+ XHDR_PROTECTED | XHDR_GLOBAL, false }, -+ -+ /* We get the SELinux value from filecon, so add a namespace for SELinux -+ instead of storing it in SCHILY.xattr.* (which would be RAW). */ -+ { "RHT.security.selinux", -+ xattr_selinux_coder, xattr_selinux_decoder, 0, false }, -+ -+ /* ACLs, use the star format... */ -+ { "SCHILY.acl.access", -+ xattr_acls_a_coder, xattr_acls_a_decoder, 0, false }, -+ -+ { "SCHILY.acl.default", -+ xattr_acls_d_coder, xattr_acls_d_decoder, 0, false }, -+ -+ /* FIXME: These are compat. for FC-6 ... we shipped a tar using the generic -+ header names by accident. */ -+ { "SCHILY.xattr.security.selinux", -+ xattr_selinux_coder, xattr_selinux_decoder, 0, false }, -+ { "SCHILY.xattr.system.posix_acl_access", -+ xattr_acls_a_coder, xattr_acls_a_decoder, 0, false }, -+ { "SCHILY.xattr.system.posix_acl_default", -+ xattr_acls_d_coder, xattr_acls_d_decoder, 0, false }, -+ -+ /* xattrs use the star format. note we only save some variants... */ -+ { "SCHILY.xattr.user", xattr_coder, xattr_decoder, 0, true }, -+ { "SCHILY.xattr.trusted", xattr_coder, xattr_decoder, 0, true }, -+ { "SCHILY.xattr.lustre", xattr_coder, xattr_decoder, 0, true }, -+ -+ /* ignore everything else in the xattr namespaces... */ -+ { "SCHILY.xattr", dummy_coder, dummy_decoder, 0, true }, - -- { NULL, NULL, NULL, 0 } -+ { NULL, NULL, NULL, 0, false } - }; diff --git a/pkgs/toolchain/tar/tar.nm b/pkgs/toolchain/tar/tar.nm deleted file mode 100644 index e2ecb41..0000000 --- a/pkgs/toolchain/tar/tar.nm +++ /dev/null @@ -1,12 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += acl attr gcc glibc - -include ../../core/tar/tar.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef diff --git a/pkgs/toolchain/texinfo/texinfo.nm b/pkgs/toolchain/texinfo/texinfo.nm deleted file mode 100644 index ffca3dc..0000000 --- a/pkgs/toolchain/texinfo/texinfo.nm +++ /dev/null @@ -1,12 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc ncurses - -include ../../core/texinfo/texinfo.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef diff --git a/pkgs/toolchain/xz/xz.nm b/pkgs/toolchain/xz/xz.nm deleted file mode 100644 index 2044d2a..0000000 --- a/pkgs/toolchain/xz/xz.nm +++ /dev/null @@ -1,17 +0,0 @@ - -PKG_TOOLCHAIN_DEPS += gcc glibc - -include ../../core/xz/xz.nm - -define STAGE_BUILD - cd $(DIR_APP) && \ - ./configure \ - --prefix=$(TOOLS_DIR) \ - --disable-static - - cd $(DIR_APP) && make $(PARALLELISMFLAGS) -endef - -define STAGE_INSTALL - cd $(DIR_APP) && make install -endef diff --git a/src/bootloader/installer.conf b/src/bootloader/installer.conf index 210224f..9022972 100644 --- a/src/bootloader/installer.conf +++ b/src/bootloader/installer.conf @@ -22,12 +22,12 @@ MENU hiddenrow 5 LABEL install MENU label ^Install a new @NAME@ system MENU default - KERNEL @SNAME@0 - APPEND initrd=initrd0 root=CDLABEL=@NAME@_@VERSION@ rootfstype=iso9660 mode=install quiet ro + KERNEL vmlinuz-@KERNEL@ + APPEND initrd=initrd-@KERNEL@.img root=CDLABEL=@NAME@_@VERSION@ rootfstype=iso9660 mode=install quiet ro label rescue MENU label ^Rescue installed @NAME@ system - KERNEL @SNAME@0 - APPEND initrd=initrd0 root=CDLABEL=@NAME@_@VERSION@ rootfstype=iso9660 mode=rescue quiet ro + KERNEL vmlinuz-@KERNEL@ + APPEND initrd=initrd-@KERNEL@.img root=CDLABEL=@NAME@_@VERSION@ rootfstype=iso9660 mode=rescue quiet ro label local MENU label Boot from ^local drive LOCALBOOT 0xffff diff --git a/tools/chroot-shell b/tools/chroot-shell index e9ab9e0..48833ef 100755 --- a/tools/chroot-shell +++ b/tools/chroot-shell @@ -16,6 +16,9 @@ EOF export PS1="naoki-chroot \w> "
# Change to directory the user will most likely work in -cd /usr/src +if [ -z "${SOURCE_DIR}" ]; then + SOURCE_DIR="/usr/src" +fi +cd "${SOURCE_DIR}"
exec /bin/bash --login diff --git a/tools/common-functions b/tools/common-functions deleted file mode 100644 index 9c28f27..0000000 --- a/tools/common-functions +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/bash - -LIBARY_PATHS="${BUILDROOT}/lib ${BUILDROOT}/usr/lib" -BINARY_PATHS="${LIBARY_PATHS} ${BUILDROOT}/bin ${BUILDROOT}/sbin" -BINARY_PATHS="${BINARY_PATHS} ${BUILDROOT}/usr/bin ${BUILDROOT}/usr/sbin" - -has_canary() { - local file=${1} - - readelf -s ${file} | grep -q "__stack_chk_fail" -} - -has_execstack() { - local file=${1} - - readelf -h ${file} | grep -qE "Type:[[:space:]]*EXEC" -} - -has_interpreter() { - local file=${1} - - [ -n "$(get_interpreter ${file})" ] -} - -has_nx() { - local file=${1} - - readelf -l ${file} | grep "GNU_STACK" | grep -q "RWE" - [ $? != 0 ] -} - -is_elf() { - local file=${1} - - file ${file} | grep -q "ELF" -} - -is_relro_partly() { - local file=${1} - - readelf -l ${file} | grep -q "GNU_RELRO" -} - -is_relro_full() { - local file=${1} - - if is_relro_partly ${file}; then - readelf -d ${file} | grep -q "BIND_NOW" - return $? - fi - return 1 -} - -is_shared_object() { - local file=${1} - - file ${file} | grep -q "shared object" -} - -is_static() { - local file=${1} - - file ${file} | grep -q "statically linked" -} - -get_interpreter() { - local file=${1} - - readelf -l ${file} | grep "program interpreter" | \ - tr -d "]" | awk '{ print $NF }' -} - -get_needed() { - local file=${1} - - readelf -d ${file} | grep NEEDED | \ - tr -d "[]" | awk '{ print $NF }' -} - -get_rpath() { - local file=${1} - - readelf -d ${file} | grep RPATH | \ - tr -d "[]" | awk '{ print $NF }' -} - -get_soname() { - local file=${1} - - readelf -d ${file} | grep SONAME | \ - tr -d "[]" | awk '{ print $NF }' -} - -filter_startfiles() { - local file=${1} - - grep -qE "crt[1in].o$" <<<${file} -} - -find_requires() { - local output - local file - local files=$(find_elf_files ${BINARY_PATHS}) - - local provides=$(find_provides) - - local needed - for file in ${files}; do - needed=$(get_needed ${file}) - if ! listmatch ${needed} ${provides}; then - output="${output} ${needed}" - fi - done - - listsort ${output} -} - -find_provides() { - local output - local file - local files=$(find_elf_files ${LIBARY_PATHS}) - - for file in ${files}; do - output="${output} $(get_soname ${file})" - done - - listsort ${output} -} - -find_elf_files() { - local dir - local dirs=$@ - - local file - local files - - for dir in ${dirs}; do - for file in $(find ${dir} -type f 2>/dev/null); do - if is_elf ${file} && is_shared_object ${file} && ! is_static ${file}; then - files="${files} ${file}" - fi - done - done - - echo ${files} -} - -listsort() { - local item - for item in $@; do - echo "${item}" - done | sort -u | tr "\n" " " -} - -listmatch() { - local arg=${1} - shift - - local item - for item in $@; do - if [ "${arg}" = "${item}" ]; then - return 0 - fi - done - return 1 -} diff --git a/tools/common-functions b/tools/common-functions new file mode 120000 index 0000000..20f268b --- /dev/null +++ b/tools/common-functions @@ -0,0 +1 @@ +functions-common \ No newline at end of file diff --git a/tools/compressor b/tools/compressor deleted file mode 100755 index c6b9d46..0000000 --- a/tools/compressor +++ /dev/null @@ -1,231 +0,0 @@ -#!/bin/bash -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007, 2008, 2009 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -. $(dirname ${0})/common-functions - -PACKAGE_VERSION="0" -TAR_OPTIONS="--posix --acls --no-recursion --sparse" - -decho() { - echo "$@" >&2 -} - -function isDir() { - [ -d "${1}" ] -} - -function isFile() { - [ -f "${1}" ] || [ -h "${1}" ] || [ -b "${1}" ] || [ -c "${1}" ] -} - -function add() { - local file=${1} - - if isDir ${file}; then - addDir $@ - return $? - - elif isFile ${file}; then - addFile $@ - return $? - fi - - return 1 -} - -function addDir() { - local dir=${1} - local file - - #decho "Adding dir ${dir}..." - - local has_children=0 - - for file in $(find ${dir} -maxdepth 1); do - [ "${file}" = "${dir}" ] && continue - - add ${file} - - has_children=1 - done - - if [ "${has_children}" = "0" ]; then - echo "${dir}" >> ${manifest} - fi -} - -function addFile() { - local file=${1} - - #decho "Adding file ${file}..." - - echo "${file}" >> ${manifest} -} - -function create_manifest() { - decho "Creating manifest..." - addDir ${root} - - apply_regexes - - local file - local files=$(<${manifest}) - for file in ${files}; do - echo "${file#${root}/}" - done > ${manifest} - - cat ${manifest} -} - -function apply_regexes() { - if [ -z "${regexes}" ]; then - return - fi - - local file - local filelist - local files=$(<${manifest}) - local regex - - for regex in $(<${regexes}); do - [ "${regex:0:1}" != "/" ] && regex="/${regex}" - filelist=$(find ${root}${regex} 2>/dev/null) - for file in ${files}; do - grep "${file}" <<<"${filelist}" - done - done > ${manifest} -} - -function remove_files() { - local file - for file in $(<${manifest}); do - rm -f ${root}${file} 2>/dev/null - done -} - -regexes= -root= -target= - -while [ $# -gt 0 ]; do - case "${1}" in - --regexes=*) - regexes=${1#--regexes=} - ;; - --root=*) - root=${1#--root=} - ;; - *) - if [ -z "${target}" ]; then - target=${1} - else - echo "Unrecognized option: ${1}" >&2 - exit 2 - fi - ;; - esac - shift -done - -echo "Preparing to do ${target##*/}..." - -archieve=$(mktemp) -control=$(mktemp) -info=$(mktemp) -manifest=$(mktemp) - -tmp=$(mktemp -d) - -create_manifest - -echo "Copying files..." -cd ${root} && tar ${TAR_OPTIONS} --create --xz --file=${archieve} --files-from=${manifest} - -if [ $? -ne 0 ]; then - echo "Error." >&2 - exit 1 -fi - -remove_files - -echo "Writing meta-data..." -cat <<EOF >${info} -### $PKG_NAME package - -PACKAGE_TARGET="$TARGET" -PACKAGE_VERSION="$PACKAGE_VERSION" - -BUILD_HOST="${BUILD_HOST}" -BUILD_DATE="$(date -u)" - -# Version info -PKG_NAME="$PKG_NAME" -PKG_VER="$PKG_VER" -PKG_REL="$PKG_REL" -PKG_GROUP="$PKG_GROUP" - -PKG_MAINTAINER="$PKG_MAINTAINER" -PKG_LICENSE="$PKG_LICENSE" - -PKG_SUMMARY="$PKG_SUMMARY" -PKG_DESCRIPTION="$PKG_DESCRIPTION" - -# Dependency info -PKG_DEPS="$PKG_DEPS" - -PKG_PROVIDES="$(find_provides)" -PKG_REQUIRES="$(find_requires)" - -PKG_DATA_SHA1="$(sha1sum ${archieve} | awk '{ print $1 }')" - -### -EOF - -echo "Writing control file..." -cat <<EOF >${control} -#!/bin/sh - -function prein() { -$CONTROL_PREIN -} - -function preun() { -$CONTROL_PREUN -} - -function postin() { -$CONTROL_POSTIN -} - -function postun() { -$CONTROL_POSTUN -} - -### -EOF - -cat ${archieve} > ${tmp}/data.img -cat ${control} > ${tmp}/control -cat ${info} > ${tmp}/info - -(cd ${tmp} && find . | cpio -o -H newc --quiet > ${archieve}) - -cat ${archieve} > ${target} diff --git a/tools/decompressor b/tools/decompressor index 92503d7..8aaaf96 100755 --- a/tools/decompressor +++ b/tools/decompressor @@ -54,7 +54,7 @@ fi FILES=$(for i in $FILES; do echo $i; done | sort -u)
for file in $FILES; do - echo "Extracting $(basename ${file})..." + #echo "Extracting $(basename ${file})..." cpio --extract --quiet -H newc --to-stdout data.img < $file | \ tar --extract --use-compress-program=xz -C ${ROOT} done diff --git a/tools/functions-common b/tools/functions-common new file mode 100644 index 0000000..4c44a58 --- /dev/null +++ b/tools/functions-common @@ -0,0 +1,14 @@ +#!/bin/bash + +# Simply import all files from this directory that +# begin with functions-*. + +BASEDIR=$(dirname ${BASH_SOURCE[0]}) + +for file in ${BASEDIR}/functions-*; do + # Avoid infinite loop when importing this file again + [ "$(basename ${file})" = "functions-common" ] && continue + + . ${file} +done + diff --git a/tools/functions-constants b/tools/functions-constants new file mode 100644 index 0000000..396e045 --- /dev/null +++ b/tools/functions-constants @@ -0,0 +1,20 @@ +#!/bin/bash + +# Debugging mode for these scripts +DEBUG=0 + +# Interpreters that should not be found by find_interpreters() +INTERPRETERS_TO_BE_SKIPPED="/usr/bin/env" + +# Some path constants... +LIBRARY_PATHS="/lib /usr/lib /libexec /usr/libexec" +BINARY_PATHS="${LIBRARY_PATHS} /bin /sbin /usr/bin /usr/sbin" + +# List of directories that could probably empty and are removed automatically +# so they won't appear in any package. +ORPHAN_CANDIDATES="${BINARY_PATHS} /usr /usr/include /usr/share" +for i in $(seq 0 9); do + ORPHAN_CANDIDATES="${ORPHAN_CANDIDATES} /usr/share/man/man${i}" +done +ORPHAN_CANDIDATES="${ORPHAN_CANDIDATES} /usr/lib/pkgconfig" + diff --git a/tools/functions-directories b/tools/functions-directories new file mode 100644 index 0000000..5b0867b --- /dev/null +++ b/tools/functions-directories @@ -0,0 +1,24 @@ +#!/bin/bash + +function dir_is_empty() { + [ "$(ls -A $@ 2>/dev/null | wc -l)" = "0" ] +} + +function directory_remove_orphans() { + local basedir=${1} + + log DEBUG "Removing orphans in ${basedir}" + + local dir + for dir in ${ORPHAN_CANDIDATES}; do + dir="${basedir}/${dir}" + + [ -d "${dir}" ] || continue + + if dir_is_empty ${dir}; then + log DEBUG " Found orphaned directory: ${dir}" + rm -rf ${dir} + fi + done +} + diff --git a/tools/functions-files b/tools/functions-files new file mode 100644 index 0000000..41ce3be --- /dev/null +++ b/tools/functions-files @@ -0,0 +1,195 @@ +#!/bin/bash + +# Check if a file is an ELF binary +# +function file_is_elf() { + local file=${1} + + file "${file}" | grep -q "ELF" +} + +# Check if a file is a script. +# If the first line starts with #! this is sufficient. +# +function file_is_script() { + local file=${1} + + local first_line=$(head -n1 ${file}) + + [ "${first_line:0:2}" = "#!" ] +} + +# Get the interpreter of a file. +# +function file_get_interpreter() { + local file=${1} + + if file_is_elf ${file}; then + _file_get_elf_interpreter ${file} + elif file_is_script ${file}; then + _file_get_script_interpreter ${file} + fi +} + +# Hidden function that gets the interpreter from an ELF file. +# +function _file_get_elf_interpreter() { + local file=${1} + + readelf -l ${file} | grep "program interpreter" | \ + tr -d "]" | awk '{ print $NF }' +} + +# Hidden fucntion that gets the interpreter from a script file. +# +function _file_get_script_interpreter() { + local file=${1} + + # If the file is not executeable, no interpreter will be needed + [ -x "${file}" ] || return + + local first_line=$(head -n1 ${file}) + + first_line="${first_line:2:${#first_line}}" + + # Choose the first argument and strip any parameters if available + local interpreter + for interpreter in ${first_line}; do + echo "${interpreter}" + return + done +} + +# Check if a file is statically linked. +# +function file_is_static() { + local file=${1} + + file ${file} | grep -q "statically linked" +} + +# Get NEEDED from a file. +# +function file_get_needed() { + local file=${1} + + readelf -d ${file} | grep NEEDED | \ + tr -d "[]" | awk '{ print $NF }' +} + +# Get RPATH from a file. +# +function file_get_rpath() { + local file=${1} + + readelf -d ${file} | grep RPATH | \ + tr -d "[]" | awk '{ print $NF }' +} + +# Get SONAME from a file. +# +function file_get_soname() { + local file=${1} + + local file_basename=$(basename ${file}) + if [ "${file_basename:0:3}" = "ld-" ]; then + log DEBUG "Don't return a SONAME for linkers: ${file}" + return + fi + + readelf -d ${file} | grep SONAME | \ + tr -d "[]" | awk '{ print $NF }' +} + +# Check if a file is a shared object. +# +function file_is_shared_object() { + local file=${1} + + file ${file} | grep -q "shared object" +} + +# Check if a file has the canary. +# +function file_has_canary() { + local file=${1} + + readelf -s ${file} | grep -q "__stack_chk_fail" +} + +# Check if a file has an executeable stack. +# +function file_has_execstack() { + local file=${1} + + readelf -h ${file} | grep -qE "Type:[[:space:]]*EXEC" +} + +# Check if a file has NX. +# +function file_has_nx() { + local file=${1} + + readelf -l ${file} | grep "GNU_STACK" | grep -q "RWE" + [ $? != 0 ] +} + +# Check if a file is partly RELRO. +# +function file_is_relro_partly() { + local file=${1} + + readelf -l ${file} | grep -q "GNU_RELRO" +} + +# Check if a file is fully RELRO. +# +function file_is_relro_full() { + local file=${1} + + if file_is_relro_partly ${file}; then + readelf -d ${file} | grep -q "BIND_NOW" + return $? + fi + return 1 +} + +# Find all ELF files. +# +function find_elf_files() { + local dir + local dirs + local prefix + + while [ $# -gt 0 ]; do + case "${1}" in + --prefix=*) + prefix="${1#--prefix=}/" + ;; + *) + dirs="${dirs} ${1}" + ;; + esac + shift + done + + local file + local files + + for dir in ${dirs}; do + dir="${prefix}${dir}" + for file in $(find ${dir} -type f 2>/dev/null); do + if file_is_elf ${file} && file_is_shared_object ${file} && ! file_is_static ${file}; then + files="${files} ${file}" + fi + done + done + + echo ${files} +} + +function filter_startfiles() { + local file=${1} + + grep -qE "crt[1in].o$" <<<${file} +} diff --git a/tools/functions-lists b/tools/functions-lists new file mode 100644 index 0000000..c44fd72 --- /dev/null +++ b/tools/functions-lists @@ -0,0 +1,22 @@ +#!/bin/bash + +function listsort() { + local item + for item in $@; do + echo "${item}" + done | sort -u | tr "\n" " " +} + +function listmatch() { + local arg=${1} + shift + + local item + for item in $@; do + if [ "${arg}" = "${item}" ]; then + return 0 + fi + done + return 1 +} + diff --git a/tools/functions-logging b/tools/functions-logging new file mode 100644 index 0000000..4fd43ed --- /dev/null +++ b/tools/functions-logging @@ -0,0 +1,12 @@ +#!/bin/bash + +function log() { + local level=${1} + shift + + if [ "${level}" = "DEBUG" ] && [ "${DEBUG}" != "1" ]; then + return + fi + + printf " %1s | %s\n" "${level:0:1}" "$@" >&2 +} diff --git a/tools/functions-packager-find b/tools/functions-packager-find new file mode 100644 index 0000000..197cdb0 --- /dev/null +++ b/tools/functions-packager-find @@ -0,0 +1,150 @@ +#!/bin/bash + +# A function that finds needed libraries and interpreters. +# +function find_requires() { + local dir + local dirs=$@ + + # Find interpreters of all files in the dirs and skip those we provide + # ourself. + local interpreter + local interpreters + for interpreter in $(find_interpreters ${dirs}); do + local found=0 + for dir in ${dirs}; do + if [ -e "${dir}/${interpreter}" ]; then + found=1 + break + fi + done + + [ "${found}" = "0" ] && interpreters="${interpreters} ${interpreter}" + done + + # Find NEEDED libs and add them to a list if they are not provided by any + # other file in dirs. + local neededs + for file in $(find_elf_files ${dirs}); do + for needed in $(file_get_needed ${file}); do + neededs="${neededs} ${needed}" + done + done + + # Find all symlink destinations + local links=$(find_symlink_destinations ${dirs}) + + # Others + local others=$(find_python_requires ${dirs}) + + # Get provides, because packages should not depend on features they provide + # by themselves. + local provides=$(find_provides ${dirs}) + + # Return a sorted and unique(!) list + local require + local requires + for require in $(listsort ${interpreters} ${neededs} ${links} ${others}); do + listmatch ${require} ${provides} || requires="${requires} ${require}" + done + + echo ${requires} +} + +function find_provides() { + local dirs=$@ + + local file + local sonames + for file in $(find_elf_files ${dirs}); do + sonames="${sonames} $(file_get_soname ${file})" + done + sonames=$(listsort ${sonames}) + + # Others + local others=$(find_python_provides ${dirs}) + + listsort ${sonames} ${others} +} + +function find_interpreters() { + local dirs=$@ + + log DEBUG "Searching for interpreters in ${dirs}" + + local file + local interpreter + local interpreters + for file in $(find ${dirs} -type f 2>/dev/null); do + # Get interpreter information from file. + interpreter=$(file_get_interpreter ${file}) + + # Skip the file silently if the result was empty. + [ -z "${interpreter}" ] && continue + + # Skip invalid interpreters that don't start with a slash. + if [ "${interpreter:0:1}" != "/" ]; then + log WARNING "Skipping invalid interpreter "${interpreter}" from "${file}"." + continue + fi + + if ! listmatch ${interpreter} ${INTERPRETERS_TO_BE_SKIPPED}; then + interpreters="${interpreters} ${interpreter}" + fi + done + + interpreters=$(listsort ${interpreters}) + + log DEBUG "find_interpreters ${dirs}: ${interpreters}" + + echo "${interpreters}" +} + +# Find the destinations of all symlinks and adds a dependency for that. +# +function find_symlink_destinations() { + local dir=$@ + + local link + local links + for link in $(find ${dir} -type l 2>/dev/null); do + link="$(readlink -m ${link})" + [ -e "${link}" ] && continue + + link="${link#${dir}}" + links="${links} ${link}" + done + + echo ${links} +} + +function find_python_provides() { + local dir=${1} + + local file + for file in $(find ${dir}/usr/bin/python* 2>/dev/null); do + file=$(basename ${file}) + file=${file#python} + + if [ -n "${file}" ]; then + echo "python-api-${file}" + fi + done +} + +function find_python_requires() { + local dir=${1} + + local file + for file in $(find ${dir}/usr/lib -maxdepth 1 2>/dev/null); do + file=$(basename ${file}) + + if [ "${file:0:6}" = "python" ]; then + file=${file#python} + + if [ -n "${file}" ]; then + echo "python-api-${file}" + fi + fi + done +} diff --git a/tools/generator b/tools/generator index c6d3937..69a1024 100755 --- a/tools/generator +++ b/tools/generator @@ -1,13 +1,31 @@ -#!/bin/bash -x +#!/bin/bash
BOOTLOADER_DIR=/usr/src/src/bootloader IMAGES_DIR=/usr/src/images
-MKLIVERAMFS=$(dirname ${0})/mkliveramfs - ISO_FILENAME=${DISTRO_SNAME}-${DISTRO_VERSION}-${TARGET}.iso
-install_config() { +. $(dirname ${0})/common-functions + +function find_latest_kernel_release() { + local i + for i in /lib/modules/*; do + i=$(basename ${i}) + done + + echo "${i}" +} + +KERNEL_RELEASE=$(find_latest_kernel_release) + +function installer_image() { + local file=${1} + local dir=${2} + + cd ${dir} && mksquashfs * ${file} -no-progress -e boot +} + +function install_config() { local src=${1} local dest=${2}
@@ -16,10 +34,11 @@ install_config() { -e "s/@SNAME@/${DISTRO_SNAME}/g" \ -e "s/@VERSION@/${DISTRO_VERSION}/g" \ -e "s/@SLOGAN@/${DISTRO_SLOGAN}/g" \ + -e "s/@KERNEL@/${KERNEL_RELEASE}/g" \ < ${src} > ${dest} }
-install_isolinux() { +function install_isolinux() { local dest=${1}
mkdir -p ${dest} 2>/dev/null @@ -35,87 +54,43 @@ install_isolinux() { install_kernel ${dest} }
-install_kernel() { +function install_kernel() { local dest=${1}
mkdir -p ${dest} 2>/dev/null
- local release - local releases - for release in /lib/modules/*; do - [ ! -d "${release}" ] && continue - releases="${releases} $(basename ${release})" + local file + for file in vmlinuz-${KERNEL_RELEASE} initrd-${KERNEL_RELEASE}.img; do + cp -f /boot/${file} ${dest}/${file} done - releases=$(echo ${releases}) - - # Grab first release - release=$(awk '{ print $1 }' <<<${releases}) - - if [ -z "${release}" ]; then - echo "No kernel image installed" >&2 - return 1 - fi - - cp -f /boot/vmlinuz-${release} ${dest}/${DISTRO_SNAME}0 - - # Create liveramfs - ${MKLIVERAMFS} -v --with-net -f ${dest}/initrd0 ${release} }
-copy_packages() { - local dest=${1} - - mkdir -p ${dest} 2>/dev/null - - for i in ${ALL_PACKAGES}; do - cp -f /usr/src/packages/${i} ${dest}/ - done -} - -make_installer() { - local dest=${1} - - mkdir -p ${dest} 2>/dev/null - - pushd /installer - - # Copy installer overlay - cp -prf /usr/src/src/install/* . - - rm -rf /installer/usr/include - - for dir in dev proc sys; do - mkdir -p ${dir} 2>/dev/null - done - install -dv -m 1777 tmp var/tmp - - # XXX add -comp lzma here when kernel supports it - mksquashfs * ${dest}/installer.sfs -no-progress - - popd -} - -## main ## +case "${1}" in + iso) + log DEBUG "Creating ISO image..."
-type=${1} + ISO_DIR=$(mktemp -d) + ISO_FILE=$(mktemp)
-case "${type}" in - iso) - mkdir /iso - cd /iso + # Copy installer image to ISO + installer_image ${ISO_DIR}/installer.sfs /installer
- copy_packages packages + # Install bootloader + install_isolinux ${ISO_DIR}/isolinux
- make_installer /iso - install_isolinux /iso/isolinux + # "Copy" packages + mv /packages ${ISO_DIR}/Packages
- cd /iso && \ + cd ${ISO_DIR} && \ mkisofs -J -r -V "${DISTRO_NAME}_${DISTRO_VERSION}" \ -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \ - -boot-load-size 4 -boot-info-table . > ${IMAGES_DIR}/${ISO_FILENAME} + -boot-load-size 4 -boot-info-table . > ${ISO_FILE} + + cat ${ISO_FILE} > ${IMAGES_DIR}/${ISO_FILENAME} ;;
- "") + *) + log ERROR "Unknown type of image: ${1}" exit 1 ;; esac diff --git a/tools/packager b/tools/packager new file mode 100755 index 0000000..1318e9e --- /dev/null +++ b/tools/packager @@ -0,0 +1,229 @@ +#!/bin/bash +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2010 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +## XXX SYMLINK DEPENDENCIES + +BASEDIR=$(dirname ${0}) + +PACKAGER_HASH_ALGORITHMS="md5 sha1 sha256 sha512" +PACKAGER_VERSION="1" + +TAR_OPTIONS="--posix --acls --no-recursion --sparse --xz" + +. ${BASEDIR}/common-functions + +# Create an alias for PKG_ORIGIN to track which source package has built this +# binary package. +PKG_ORIGIN=${PKG_NAME} + +### MAIN ### + +if [ $# -ne 2 ]; then + echo "${0}: Wrong number of arguments: $# - $@" >&2 + exit 2 +fi + +PKG_NAME=${1} +PKG_TARGET=${2} + + +### Function definitions ### + +function create_metafile() { + local files=${1} + + cat <<EOF +### ${PKG_NAME} package + +VERSION="${PACKAGER_VERSION}" + +BUILD_HOST="${BUILD_HOST}" +BUILD_DATE="$(date -u)" + +# Version info +PKG_NAME="${PKG_NAME}" +PKG_VER="${PKG_VER}" +PKG_REL="${PKG_REL}" +PKG_GROUP="${PKG_GROUP}" +PKG_ARCH="${PKG_ARCH}" +PKG_ORIGIN="${PKG_ORIGIN}" + +PKG_MAINTAINER="${PKG_MAINTAINER}" +PKG_LICENSE="${PKG_LICENSE}" + +PKG_SUMMARY="${PKG_SUMMARY}" +PKG_DESCRIPTION="${PKG_DESCRIPTION}" + +# Dependency info +PKG_DEPS="${PKG_DEPS} $(find_requires ${files})" +PKG_PROVIDES="$(find_provides ${files})" + +PKG_DATA_SIZE="$(du -cb ${files} | tail -n1 | awk '{ print $1 }')" + +### +EOF +} + +function create_controlfile() { + cat <<EOF +#!/bin/sh + +function prein() { +${CONTROL_PREIN} +} + +function preun() { +${CONTROL_PREUN} +} + +function postin() { +${CONTROL_POSTIN} +} + +function postun() { +${CONTROL_POSTUN} +} + +### +EOF +} + +function __filelist() { + local paths + + # Disable globbing + set -f + + local path + for path in ${PKG_FILES}; do + if [ "${path:0:1}" != "/" ]; then + path="/${path}" + fi + + path="${BUILDROOT}${path}" + paths="${paths} ${path}" + done + + # Enable globbing again + set +f + + # If not paths were found take all files + [ -z "${paths}" ] && paths="${BUILDROOT}" + + for file in $(find ${paths} 2>/dev/null | sort); do + # Remove ${BUILDROOT} + file="${file#${BUILDROOT}}" + + # Remove all leading slashes + while [ "${file:0:1}" = "/" ]; do + file="${file:1:${#file}}" + done + + echo "${file}" + done +} + +function create_dataimg() { + local dir=${1} + local img=${2} + + # First, remove all crappy directories + directory_remove_orphans ${BUILDROOT} + + # Generate the filelist. + local filelist=$(mktemp) + __filelist > ${filelist} + + if [ "${DEBUG}" = "1" ]; then + cat ${filelist} >&2 + fi + + # Create the tarball + # Prints the filelist on fd 2. + cd ${BUILDROOT} && \ + tar ${TAR_OPTIONS} \ + --create -vv \ + --file=${img} \ + --files-from=${filelist} >&2 + + # Untar the tarball for further investigation + cd ${dir} && \ + tar ${TAR_OPTIONS} \ + --extract \ + --file=${img} + + local file + + # Remove the just copied files + while read file; do + [ -z "${file}" ] && continue + + rm -rf ${BUILDROOT}/${file} + done < ${filelist} + + # Return the filelist + cd ${dir} && \ + for file in $(find . -not -type d); do + echo "${file:1:${#file}}" + done +} + +function create_package() { + local target_file=${1} + + # Create temporary directory where to put in all files that will go into + # the package. + local tmp=$(mktemp -d) + + # A place where to copy the package files for further processing. + local files=$(mktemp -d) + + # Create the package content + create_dataimg ${files} ${tmp}/data.img > ${tmp}/filelist + create_metafile ${files} > ${tmp}/info + create_controlfile > ${tmp}/control + + # Calculate hash sums of the package files + log DEBUG "Calculating hash sums." + local algorithm + local file + local files=$(cd ${tmp} && ls) + for algorithm in ${PACKAGER_HASH_ALGORITHMS}; do + log DEBUG " Algorithm: ${algorithm}" + for file in ${files}; do + log DEBUG " ${file}" + echo "${algorithm} $(cd ${tmp} && ${algorithm}sum ${file})" \ + >> ${tmp}/sums + done + done + + # Create the package + cd ${tmp} && \ + find . | cpio -o -H newc --quiet > ${target_file} + + # Cleanup + rm -rf ${tmp} ${files} +} + +create_package ${PKG_TARGET} + +exit $? + diff --git a/tools/patch b/tools/patch index ed3ba21..93be79a 100755 --- a/tools/patch +++ b/tools/patch @@ -1,8 +1,6 @@ #!/bin/bash
-. $(dirname ${0})/common-functions - -for patch in $(listsort $@); do +for patch in $@; do echo "Applying file ${patch}..."
patch -Np1 -i ${patch} diff --git a/tools/quality-agent.d/050-canary b/tools/quality-agent.d/050-canary index 7fde31c..67b25e5 100755 --- a/tools/quality-agent.d/050-canary +++ b/tools/quality-agent.d/050-canary @@ -8,12 +8,12 @@ function check() { local failed=0
local file - for file in $(find_elf_files ${BINARY_PATHS}); do + for file in $(find_elf_files --prefix=${BUILDROOT} ${BINARY_PATHS}); do if filter_startfiles ${file}; then continue fi
- if ! has_canary ${file}; then + if ! file_has_canary ${file}; then log_warning " Has no canary: ${file}" failed=1 fi diff --git a/tools/quality-agent.d/050-execstacks b/tools/quality-agent.d/050-execstacks index d3aace6..9540eee 100755 --- a/tools/quality-agent.d/050-execstacks +++ b/tools/quality-agent.d/050-execstacks @@ -9,8 +9,8 @@ check() { local failed=0
local file - for file in $(find_elf_files ${BINARY_PATHS}); do - if has_execstack ${file}; then + for file in $(find_elf_files --prefix=${BUILDROOT} ${BINARY_PATHS}); do + if file_has_execstack ${file}; then log_error " File has execstack: ${file}" failed=1 fi diff --git a/tools/quality-agent.d/050-invalid-interpreters b/tools/quality-agent.d/050-invalid-interpreters new file mode 100755 index 0000000..09d0ba5 --- /dev/null +++ b/tools/quality-agent.d/050-invalid-interpreters @@ -0,0 +1,44 @@ +#!/bin/bash + +. $(dirname ${0})/qa-include + +DESC="Detect invalid interpreters." + +check() { + local failed=0 + + local file + local interpreter + for file in $(find ${BUILDROOT} -type f 2>/dev/null); do + # If a file is not executeable we don't need to check it + [ -x "${file}" ] || continue + + if file_is_script ${file}; then + interpreter=$(file_get_interpreter ${file}) + + if grep -q /usr/local <<<${interpreter}; then + failed=1 + log_error " Interpreter in /usr/local: ${file}" + fi + + # Search for bad /usr/bin/env + if [ "$(basename ${interpreter})" = "env" ]; then + # Autofix that crap + sed -i ${file} \ + -e "s,/usr/bin/env python...,/usr/bin/python," \ + -e "s,/usr/bin/env python,/usr/bin/python," \ + -e "s,/usr/bin/env perl,/usr/bin/perl," + + # If we could not fix it, raise an error + if [ "${interpreter}" = "$(file_get_interpreter ${file})" ]; then + failed=1 + log_error " Script uses forbidden "env" interpreter: ${file}" + fi + fi + fi + done + + return ${failed} +} + +run diff --git a/tools/quality-agent.d/050-libs-needed b/tools/quality-agent.d/050-libs-needed index dbc6196..93f600d 100755 --- a/tools/quality-agent.d/050-libs-needed +++ b/tools/quality-agent.d/050-libs-needed @@ -9,16 +9,16 @@ check() {
local file local needed - for file in $(find_elf_files ${LIBARY_PATHS}); do - if ! is_shared_object ${file}; then + for file in $(find_elf_files --prefix=${BUILDROOT} ${LIBARY_PATHS}); do + if ! file_is_shared_object ${file}; then continue fi
- if ! has_interpreter ${file}; then + if ! file_has_interpreter ${file}; then continue fi
- needed=$(get_needed ${file}) + needed=$(file_get_needed ${file}) if [ -z "${needed}" ]; then log_error " File lacks needed attribute: ${file}" failed=1 diff --git a/tools/quality-agent.d/050-libs-soname b/tools/quality-agent.d/050-libs-soname index b0b4aba..b6232b6 100755 --- a/tools/quality-agent.d/050-libs-soname +++ b/tools/quality-agent.d/050-libs-soname @@ -9,20 +9,20 @@ check() {
local file local soname - for file in $(find_elf_files ${LIBARY_PATHS}); do + for file in $(find_elf_files --prefix=${BUILDROOT} ${LIBARY_PATHS}); do if ! grep -q ".so" <<<${file}; then continue fi
- if ! is_shared_object ${file}; then + if ! file_is_shared_object ${file}; then continue fi
- if ! has_interpreter ${file}; then + if ! file_has_interpreter ${file}; then continue fi
- soname=$(get_soname ${file}) + soname=$(file_get_soname ${file}) if [ -z "${soname}" ]; then log_error " File lacks soname attribute: ${file}" failed=1 diff --git a/tools/quality-agent.d/050-nx b/tools/quality-agent.d/050-nx index febd89f..c9c2733 100755 --- a/tools/quality-agent.d/050-nx +++ b/tools/quality-agent.d/050-nx @@ -8,12 +8,12 @@ function check() { FILTER="${QUALITY_AGENT_WHITELIST_NX}"
local file - for file in $(find_elf_files ${BINARY_PATHS}); do + for file in $(find_elf_files --prefix=${BUILDROOT} ${BINARY_PATHS}); do if filtered ${file}; then continue fi
- if ! has_nx ${file}; then + if ! file_has_nx ${file}; then log_error " No NX: ${file}" failed=1 fi diff --git a/tools/quality-agent.d/050-relro b/tools/quality-agent.d/050-relro index 061a001..f011056 100755 --- a/tools/quality-agent.d/050-relro +++ b/tools/quality-agent.d/050-relro @@ -11,14 +11,18 @@ function check() { local failed=0
local file - for file in $(find_elf_files ${BINARY_PATHS}); do + for file in $(find_elf_files --prefix=${BUILDROOT} ${BINARY_PATHS}); do if filter_startfiles ${file}; then continue fi
- if ! is_relro_full ${file}; then - log_error " Is not full relro: ${file}" - failed=1 + if ! file_is_relro_full ${file}; then + if [ "${QUALITY_AGENT_PERMIT_NOT_FULL_RELRO}" = "yes" ]; then + log_warning " Is not full relro: ${file}" + else + log_error " Is not relro: ${file}" + failed=1 + fi fi done
diff --git a/tools/quality-agent.d/050-root-links-to-usr b/tools/quality-agent.d/050-root-links-to-usr index 49c097b..18b4d29 100755 --- a/tools/quality-agent.d/050-root-links-to-usr +++ b/tools/quality-agent.d/050-root-links-to-usr @@ -8,7 +8,7 @@ for file in $(find ${BUILDROOT}/{bin,lib,sbin}/* 2>/dev/null); do [ -f "${file}" ] || continue log " ${file}"
- interpreter=$(get_interpreter ${file}) + interpreter=$(file_get_interpreter ${file}) if [ ! -e "${interpreter}" ]; then log " SKIPPED because interpreter is not available" continue diff --git a/tools/quality-agent.d/050-rpaths b/tools/quality-agent.d/050-rpaths index 37efa9f..8250612 100755 --- a/tools/quality-agent.d/050-rpaths +++ b/tools/quality-agent.d/050-rpaths @@ -12,12 +12,12 @@ check() {
local file local rpath - for file in $(find_elf_files ${BINARY_PATHS}); do + for file in $(find_elf_files --prefix=${BUILDROOT} ${BINARY_PATHS}); do if filtered ${file}; then continue fi
- rpath=$(get_rpath ${file}) + rpath=$(file_get_rpath ${file}) if [ -n "${rpath}" ]; then if [ "${QUALITY_AGENT_RPATH_ALLOW_ORIGIN}" = "yes" ]; then [ "${rpath}" = '$ORIGIN' ] && continue diff --git a/tools/quality-agent.d/qa-functions b/tools/quality-agent.d/qa-functions deleted file mode 120000 index b23594d..0000000 --- a/tools/quality-agent.d/qa-functions +++ /dev/null @@ -1 +0,0 @@ -../common-functions \ No newline at end of file diff --git a/tools/quality-agent.d/qa-include b/tools/quality-agent.d/qa-include index 9c88798..4fe1c47 100644 --- a/tools/quality-agent.d/qa-include +++ b/tools/quality-agent.d/qa-include @@ -1,18 +1,18 @@ #!/bin/bash
# Include additional functions -. $(dirname ${0})/qa-functions +. $(dirname ${0})/../common-functions
function debug() { - [ "${NAOKI_DEBUG}" = "1" ] + [ "${NAOKI_DEBUG}" = "1" ] || [ "${DEBUG}" = "1" ] }
-function log() { - local facility=${1} - shift - - printf " %-7s %s\n" "${facility}" "$@" -} +#function log() { +# local facility=${1} +# shift +# +# printf " %-7s %s\n" "${facility}" "$@" +#}
function log_debug() { debug && log DEBUG "$@" @@ -62,7 +62,7 @@ function qa_find() { log_debug "Running qa_find with command ${command} in ${filetype}"
local file - for file in $(find_elf_files ${!filetype}); do + for file in $(find_elf_files --prefix=${BUILDROOT} ${!filetype}); do ${command} ${file} done }
hooks/post-receive -- IPFire 3.x development tree