#qi-hardware IRC log for Wednesday, 2012-10-03

kyakjow_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 root18:50
kyakseems like a bug in mkfs.ubifs18:50
kyakseems like this problem has appeared recently19:01
kyakbut mkfs.ubifs.c hadn't really changed.. i supposed it doesn't like something.. maybe some links in root-xburst19:05
kyakmkfs.ubifs fails miserable because /home directory is not readable for user19:12
kyakand there is a code trying to traverse directories doing open(dir_name, O_RDONLY);19:13
kyakperhaps it returns something mkfs.ubifs doesn't expect19:14
wpwrakif you run as root, does it work then ? or if you make /home user-readable19:15
wpwrakthe complaint about the root directory seems rather bogus anyway. i.e., would a subdirectory be any better ?19:16
kyakit works if i run as root19:17
kyakthis shit is reproducible, see:19:17
wpwrakmaybe it's just a case of bad error checking ?19:18
kyakcd ~; mkdir -p /tmp/wtf/wtf1; chmod u-r /tmp/wtf; mkfs.ubifs -m 4096 -e 516096 -c 4095 -d /tmp/wtf/wtf1 -o mytest.img19:18
kyakthis is a real bad checking if the file (-o) is inside the root (-d)19:19
kyakyou can have a look at in_path(..) in mkfs.ubifs.c19:19
kyakmytest.img is not inside /tmp/wtf/wtf1, but mkfs.ubifs fails because /tmp/wtf is not readable19:20
wpwrakyeah, that's what i meant19:20
wpwrakactually, the error message already raised a red flag for me19:20
kyaki think i will post to their mailing list really fast19:20
kyaksince i don't want to reveal my /home yet :)19:21
wpwraki suppose the purpose of this is to avoid trying to add the output file to its own input. that's a very reasonable precaution19:21
kyakyep, indeed19:21
wpwrakbut the implementation seems to only consider one special case, out of many19:21
kyakbut maybe the way this check is done is not quite good19:21
kyakso we agree :)19:21
wpwrakso the error message is either unusually specific (i.e., it would also catch other cases but complain in a different way), or19:22
wpwrakthey were just too lazy to handle the general case, or19:22
wpwrakthey didn't quite realize what the general case is.19:22
wpwraklaziness or lack of understanding are reason to distrust what else is there19:23
wpwraki call such things "negative competence markers" :)19:23
kyakbut i'm not going to look into a solution/workaround, because i'm both lazy and uncompetent :)19:25
wpwrakheh :)19:25
wpwrakwell, with running as root, you already have a solution :)19:26
wpwraknow join the fight against those stupid programs that tell you not to do things under root ;-)19:26
kyaki'd rather set the /home back to readable than build openwrt as root :)19:27
kyaki had ocassions several times when my packages wanted to touch the host filesystem :)19:27
wpwrakhow cowardly ;-)19:28
kyakit's their problem now http://lists.infradead.org/pipermail/linux-mtd/2012-October/044290.html19:37
kyakthough i realize it won't probably be fixed without a suggested patch :)19:38
kyaki remember how i tried to submit a three-line patch to linux kernel.. Never ever i will do that again19:38
kyakit's much more efficient just to apply this patch locally on every kernel update than to push anything to linux kernel19:39
wpwrakhuh ? never had much trouble with kernel patches19:40
larscback in your days nobody cared about code quality ;)19:44
wpwrakof course not. the folks writing bad code hadn't even noticed linux at that time, let alone submitted patches :)19:56
kyakthis is how i gave up20:01
kyakthere was a pre-story, when i posted to the "wrong ML".. who it knew it should go to "net-next"20:01
kyakback to mtd; on a second thought, it might be not trivial at all to find if a file is in directory or subdirectories20:03
kyakhave to handle all types of shit, like links and mount --bind and whatnot20:03
kyakso i've sent that patch 5 times, just checked my outbox20: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
kyaktoo much for two lines of actual code, how do you think?20:09
whitequarkkyak: the fact that your patch is 2-line doesn't mean it shouldn't be reviewed as throughly as a 1000-line one20:43
whitequarke.g. remember the trivial, 2-line patch in openssl which exposed all keys in Debian for 2 years?20:43
--- Thu Oct 4 201200:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!