| kyak | jow_laptop: have you ever encountered an "Error: output file cannot be in the UBIFS root directory" in mkfs.ubifs? Obviously, the output file is not requested to be located in ubifs root | 18:50 |
|---|---|---|
| kyak | seems like a bug in mkfs.ubifs | 18:50 |
| kyak | http://lists.infradead.org/pipermail/linux-mtd/2012-September/044071.html | 19:01 |
| kyak | seems like this problem has appeared recently | 19:01 |
| kyak | but mkfs.ubifs.c hadn't really changed.. i supposed it doesn't like something.. maybe some links in root-xburst | 19:05 |
| kyak | hah | 19:10 |
| kyak | mkfs.ubifs fails miserable because /home directory is not readable for user | 19:12 |
| kyak | and there is a code trying to traverse directories doing open(dir_name, O_RDONLY); | 19:13 |
| kyak | perhaps it returns something mkfs.ubifs doesn't expect | 19:14 |
| wpwrak | if you run as root, does it work then ? or if you make /home user-readable | 19:15 |
| wpwrak | the complaint about the root directory seems rather bogus anyway. i.e., would a subdirectory be any better ? | 19:16 |
| kyak | it works if i run as root | 19:17 |
| kyak | this shit is reproducible, see: | 19:17 |
| wpwrak | maybe it's just a case of bad error checking ? | 19:18 |
| kyak | cd ~; mkdir -p /tmp/wtf/wtf1; chmod u-r /tmp/wtf; mkfs.ubifs -m 4096 -e 516096 -c 4095 -d /tmp/wtf/wtf1 -o mytest.img | 19:18 |
| kyak | this is a real bad checking if the file (-o) is inside the root (-d) | 19:19 |
| kyak | you can have a look at in_path(..) in mkfs.ubifs.c | 19:19 |
| kyak | mytest.img is not inside /tmp/wtf/wtf1, but mkfs.ubifs fails because /tmp/wtf is not readable | 19:20 |
| wpwrak | yeah, that's what i meant | 19:20 |
| wpwrak | actually, the error message already raised a red flag for me | 19:20 |
| kyak | i think i will post to their mailing list really fast | 19:20 |
| kyak | since i don't want to reveal my /home yet :) | 19:21 |
| wpwrak | i suppose the purpose of this is to avoid trying to add the output file to its own input. that's a very reasonable precaution | 19:21 |
| kyak | yep, indeed | 19:21 |
| wpwrak | but the implementation seems to only consider one special case, out of many | 19:21 |
| kyak | but maybe the way this check is done is not quite good | 19:21 |
| kyak | so we agree :) | 19:21 |
| wpwrak | so the error message is either unusually specific (i.e., it would also catch other cases but complain in a different way), or | 19:22 |
| wpwrak | they were just too lazy to handle the general case, or | 19:22 |
| wpwrak | they didn't quite realize what the general case is. | 19:22 |
| wpwrak | laziness or lack of understanding are reason to distrust what else is there | 19:23 |
| wpwrak | i call such things "negative competence markers" :) | 19:23 |
| kyak | but i'm not going to look into a solution/workaround, because i'm both lazy and uncompetent :) | 19:25 |
| wpwrak | heh :) | 19:25 |
| wpwrak | well, with running as root, you already have a solution :) | 19:26 |
| wpwrak | now join the fight against those stupid programs that tell you not to do things under root ;-) | 19:26 |
| kyak | i'd rather set the /home back to readable than build openwrt as root :) | 19:27 |
| kyak | i had ocassions several times when my packages wanted to touch the host filesystem :) | 19:27 |
| wpwrak | how cowardly ;-) | 19:28 |
| kyak | --) | 19:28 |
| kyak | it's their problem now http://lists.infradead.org/pipermail/linux-mtd/2012-October/044290.html | 19:37 |
| kyak | though i realize it won't probably be fixed without a suggested patch :) | 19:38 |
| kyak | i remember how i tried to submit a three-line patch to linux kernel.. Never ever i will do that again | 19:38 |
| kyak | it's much more efficient just to apply this patch locally on every kernel update than to push anything to linux kernel | 19:39 |
| wpwrak | huh ? never had much trouble with kernel patches | 19:40 |
| larsc | back in your days nobody cared about code quality ;) | 19:44 |
| wpwrak | of course not. the folks writing bad code hadn't even noticed linux at that time, let alone submitted patches :) | 19:56 |
| larsc | hehe | 19:56 |
| kyak | https://patchwork.kernel.org/patch/1227361/ | 20:00 |
| kyak | this is how i gave up | 20:01 |
| kyak | there was a pre-story, when i posted to the "wrong ML".. who it knew it should go to "net-next" | 20:01 |
| kyak | back to mtd; on a second thought, it might be not trivial at all to find if a file is in directory or subdirectories | 20:03 |
| kyak | have to handle all types of shit, like links and mount --bind and whatnot | 20:03 |
| kyak | so i've sent that patch 5 times, just checked my outbox | 20:08 |
| kyak | "wrong ML and no right people in cc", then "no proper sign-offs", then something else, at last "git am your_patch" fails." | 20:09 |
| kyak | too much for two lines of actual code, how do you think? | 20:09 |
| whitequark | kyak: the fact that your patch is 2-line doesn't mean it shouldn't be reviewed as throughly as a 1000-line one | 20:43 |
| whitequark | e.g. remember the trivial, 2-line patch in openssl which exposed all keys in Debian for 2 years? | 20:43 |
| --- Thu Oct 4 2012 | 00:00 | |
Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!