[01:11] teward: The canonical way to determine whether systemd is pid 1 is os.path.isdir("/run/systemd/system") or per-language equivalent [01:12] teward: For Upstart, you want the init_is_upstart function from /lib/lsb/init-functions (or, again, per-language equivalent) [01:14] cjwatson: i really only need the systemd test/check - the apport hooks i'm writing for nginx (because of the appalling bug helpfulness quality since 15.04 and systemd) i'm trying to make sure is catchable. plans were to only land it in 15.04 and up, and since I know someone has a wildly custom setup where they got rid of systemd... *shrugs* [01:14] cjwatson: thanks thoug [01:14] Sure [01:14] At least the systemd check is pretty trivial [01:14] i'm more concerned with why when i try and get the apport hooks to request whether hte user wants to include certain files or not it then asks TWICE before doing anything [01:15] three questions coded, six questions asked (the three questions, 1 2 3, then again, 1 2 3) [01:15] * teward shrugs [01:15] You want pitti or bdmurray for that kind of thing [01:15] indeed [01:15] i'm going to poke pitti tomorrow [01:16] bare minimum is to get the systemd check [01:16] (tomorrow my time, as in the morning about 10 - 12 hours from now) [01:20] cjwatson: given only a day, though, thanks to pitti's guidance this morning my time, i've already got the gist of what i need to have done down, at the very least to fix the reason that sarnold and I want to smack the nginx package around in 15.o4 [01:20] 15.04* [01:20] so a big thanks to pitti is definitely due :) [01:26] is 15.10 going to switch to systemd either in the initramfs or user session? [02:49] cjwatson: follow-up: thanks for the guidance. Finding systemd was easy. I had to essentially write an init_is_upstart function in python, using init-functions's init_is_upstart as a partial guide for what to do. And I've replicated the command set to check if it's upstart or sysvinit (the old one) [02:50] s/for what to do/for what to do to check if upstart/ [02:54] sabdfl, [04:03] Good morning [04:08] teward: asks twice> at this point I'd need to see your hook and what you do exactly to test/call it; normaly it's run once [04:09] teward: os.path.isdir('/run/systemd/system/') -> running systemd [04:09] teward: detecting upstart is harder, but on Ubuntu you can assume that it's upstart if it's not systemd [04:09] nah, don't readlink /proc/1/exe, that's wrong [04:09] tarpman: ^ FYI [04:10] hey pitti :) teward said he'd like something that can work with debian sysvinit too [04:10] I think he cargo-culted from init-functions and got what he wanted. [04:10] At least, backscroll with cjwatson seems to imply that. [04:10] "initctl --system list" should work under upstart, but I'm not sure whether it needs root [04:11] it fails under systemd with "Name "com.ubuntu.Upstart" does not exist" as expected [04:11] teward: global hook> you mean general-hooks/, not a package specific one? you can do that too, yes [04:11] pitti: The is_upstart function from init-functions is the canonical way. [04:12] teward: logs> rsyslog's logs have everything too, so in general you can get it there; but filtering stuff that you are interested in from the journal is magnitudes easier than fishing it out of syslog [04:13] teward: no, hooks must never collect private/sensitive stuff, please obfuscate that with post-processing [04:15] teward: ok, I think I've caught up with your questions, but at this point just show me the hook for review? [04:44] I still need help creating an initram script while a remastering process. This is the way I put my "script" to initram: http://pastebin.com/RmNivmvX The script simply should do "blockdev --setro /dev/sd*" on the live-system I can find the script under /usr/share/initramfs/scripts/local-top/ but it did not have any effect. running it manually blocks the harddisk. someone could help me? [04:45] why two sudo calls per line? [04:46] opiwahn: I think I'd remove every 'sudo' from this script, and run this script via sudo manually [04:50] sarnold: hi.. you mean the "sudo" before the blockdev, right? not from my remastering-part, right? [04:52] opiwahn: well... lets take this line here: [04:52] sudo chroot "${WORK}/new" sudo chmod +x usr/share/initramfs-tools/scripts/local-top/initramblockdev [04:53] the 2nd sudo I need to chmod or not? [04:53] opiwahn: that'll execute the system's sudo, then the system's chroot, then the usr/bin/sudo from within the chroot, then the bin/chmod executable from inside the chroot [04:53] opiwahn: the entire thing could be replaced with sudo chmod +x ${WORK}/new/usr/share/initramfs-tools/scripts/local-top/initramblockdev [04:53] opiwahn: .. that'd remove the dependency on a sudo and chmod from inside the chroot... [04:53] ok I understand [04:55] do you think thats the problem? because .. the script IS on the live medium.. executable.. and works when executing it manually after boot... while the remaster process stout say me "blockdev: /dev/sd*" device not found.. could be the problem but I dont know why [04:56] opiwahn: you already asked that yesterday -- apparently you are calling it too early and /dev/sd* does not exist yet [04:58] ok.. I tried to put it on every subdirectory.. according to "man initramfs-tools"... [04:58] I also tried "Init-bottom" what is, according to manpage, the last scripts that are executed.. even here it was the same error message [04:59] /usr/share/initramfs-tools/scripts/local waits for the root file system to appear [04:59] opiwahn: perhaps you simply don't have any /dev/sd* then? maybe it's /dev/vd* from QEMU or whatnt [04:59] whatnot [05:00] no, its really sda and sdb from virtualbox [05:01] am I right that putting it in init-bottom.. just for testing.. is the latest possibility to put the script in.. and so that /dev/sd* should already exist? [05:02] or could it be possible that - at this stage - the "*" could not work?? [05:02] it's still not guaranteed to work, but I'd say in most cases it should [05:02] the only way to reliably wait for a device to appear is with an udev rule [05:03] if it's a shell script, the * works [05:13] I also put a udev role on the live system.. this works.. for the "late stage" and plugging new devices.. but there is this "early stage"... e.g. told me ubuntu "unsafe ntfs filesystem.. fixing" . This is only one example why I want to prevent the live system from writing to the disks via a init script [05:14] ok.. I am sorry :-) but my question again.. is "init-bottom" the "latest stage" where I can sure /dev/sd* should be ready?? [05:27] opiwahn: as I said, you can *never* be sure in the initramfs that all devices got detected [05:27] opiwahn: you can certainly try and applying it for those that are already there, with the /dev/sd* globbing, but it might be that new devices are detected later on [05:30] pitti: just detected.. that I use #!/bin/bash in my script... should this be "sh" instead of "bash" *shame* [05:33] opiwahn: /bin/sh is faster, otherwise it makes not much difference [05:34] pitti: oh.. hoped this was the problem. thanks pitti.. [05:34] pitti: pitti.. how would YOU solve this? generally like I am trying it? [05:34] opiwahn: it seems to me you just want something like [05:35] KERNEL="sd*", RUN+="/sbin/blockdev --setro $devnode" [05:35] put that into /lib/udev/rules.d/50-block-ro.rules and copy it into the initramfs [05:36] opiwahn: oh, another thing -- does /sbin/blockdev really exist in your initramfs? I wonder if your error message from above was really correct [05:37] if it says "device not found" that suggests that blockdev exists, but if it says "file not found" it might very well be that blockdev itself is missing [05:37] $ lsinitramfs /initrd.img |grep blockdev [05:37] sbin/blockdev [05:37] seems alright [05:39] pitti: are you german? [05:39] yes, does my writing have an accent too? :-) [05:39] zat is ze problem! [05:40] pitti: sure.. is it "allowed" to write in not-english in privat messages like this? [05:40] sure, just talk English on the public channels; what happens in priv messages stays in priv messages [05:41] pitti: ok.. na denn. mein remastering script läuft gerade durch, ist aber gleich fertig, dann geb ich dir nochmal den genauen wortlaut der fehlermeldung.. wobei mich schon wundert, dass das beim remastern im stdout erscheint.. da wird ja nix ausgeführt hinsichtlich des block-dev-scriptes.. [05:42] opiwahn: err, this is *not* a private message, it's the channel [05:42] pitti: ups.. I am really new to irc chats.. sorry.. [05:42] opiwahn: yeah, during remastering there shouldn't be a run of blockdev [05:43] pitti: thats my error message: http://pastebin.com/TCpUSZRk [05:44] pitti: dont understand why this appears in the remastering-stdout [05:44] opiwahn: what's the script right now? [05:44] pitti: you mean the init-script? [05:45] opiwahn: your remastering script [05:45] * pitti restarted IRC some minutes ago, I don't have earlier scrollback [05:46] pitti: oh... thats big.. :-) or do you just want the part where I copy the script and the initram-part? [05:46] yes [05:46] where it shows that error message [05:46] I suspect you have some missing quoting there [05:46] pitti: http://pastebin.com/PT6Ymb8y [05:46] so that it expands /dev/sd* while you run the script, not while you boot the image [05:47] sudo chroot "${WORK}/new" sudo update-initramfs -u -k all [05:47] pitti: this is the initram-part.. but dont know if this causes it [05:47] ah, this probably runs it [05:47] and please drop all those sudos [05:48] not sure why update-initramfs would run scripts/ [05:48] pitti: really ALL sudos? need them to chmod and update-initramfs or not? [05:48] opiwahn: you ought to run the remastering script as root; it's never good to call sudo in scripts [05:48] but nevermind, different issue [05:49] opiwahn: did you run your script with -x to confirm where that error message comes from? [05:49] I'm not sure it's from http://pastebin.com/PT6Ymb8y [05:49] anyway, sorry, I really need to get to do something else, bbl [05:49] pitti: ok I drop all sudos at the beginning of these lines... [05:50] pitti: no problem.. what do u mean by running with -x ? [05:50] nevermind the sudos now, those are not *that* bug; they are just utterly wrong [05:50] opiwahn: bash -x yourremasteringscript [05:52] pitti: ok..trying bash-x thank you pitti.. sorry for taking you so much time.. but I am a little closer to the solution [05:55] pitti: really one last beginners question: how can I complete write the output of bash -x myscript also to text-file? [05:55] command 2>&1 | tee output.txt [05:57] pitti: thank you. really. thank you very much. and have a really good day [05:57] good luck! [05:57] pitti: thanks [06:22] if I start a bashscript as root/su is another script that is invoked by the first also automatically run as root, or not? [06:23] they all run as root [06:23] which is why you can remove every 'sudo' from the script and run it as root :) [06:25] thats why my question :-) thank you guys ! [06:47] good morning [07:30] Laney: can you please remove your upstart test override? bug 1429756 is fixed in wily's kernel now [07:30] bug 1429756 in linux (Ubuntu Vivid) "FTBFS: upstart test_job_process fails in majority of cases / Kernel returning unexpected EIO at end of file" [High,Confirmed] https://launchpad.net/bugs/1429756 [07:31] http://d-jenkins.ubuntu-ci:8080/view/Wily/view/AutoPkgTest/job/wily-adt-upstart/ succeeded, I restarted it to see that it survives two runs in a row [08:04] pitti: yay! [08:04] Laney: yep, survived four tests in a row === dbarth_ is now known as dbarth [08:47] Laney, could you merge pcre3? === anthonyf is now known as Guest97002 [08:48] doko: hmmmmm, I guess so [08:48] wow, we have a delta in prce? [08:49] stupid delta [08:49] will fwd it if it's not already [08:49] hm, unmangled C++ symbols? [08:49] wgrant, cjwatson, do you know why templates on e.g https://translations.launchpad.net/ubuntu/wily/+source/dialer-app/+imports are "approved" but not "imported"? [08:49] I mean "mangled", i. e. "not demangled" [08:50] Laney, and then upload a follow-up version to the ci-train 16 PPA? [08:50] I thought they'd cause more trouble than they would help [08:50] seb128: Translation imports have not yet been activated for wily. [08:51] pitti: are you doing this merge? :) [08:51] wgrant, thanks [08:51] wgrant, when is that planned? [08:51] Laney: no, I was just curious what we could possibly have changed in pcr3 [08:51] seb128: Someone Ubuntuy (pitti?) would enable them at https://translations.launchpad.net/ubuntu/wily/+translations-admin once the state of the series was verified. [08:51] wgrant, it sort of created a fail for ota5 touch langpack updates [08:51] they have only exported the right symbols [08:51] sanity [08:52] seb128: ... OTA5 is based on wily? [08:52] wgrant: this currently has "hide" and "defer" enabled, is that intended? [08:52] wgrant, no, but ppas don't have translation template, so they copied the wily .po over [08:52] wgrant, assuming that the strings would be the same in their overlay and wily since they dual land [08:52] wgrant: (sorry, never saw that page) [08:52] pitti: Oh, we don't normally enable those, so I assumed you did. [08:53] There's nothing blocking it. [08:53] wgrant: no, certainly not; maybe that's just the default state until we actually get wily translations? [08:53] doko: no-change rebuild? [08:53] wgrant: so want me to uncheck these two? [08:54] pitti: Oh, I mean having those two checked is the default, and I assume you normally unchecked them. [08:54] (yay for having negative checkboxes...) [08:54] Yep, I see no reason not to. [08:54] Laney, yes, but with higher version number [08:54] wgrant: I suppose so far it was done by you or cjwatson or possibly dpm? [08:54] wgrant: done [08:54] pitti: dpm makes sense, maybe. [08:55] https://translations.launchpad.net/ubuntu/wily/+imports is full of stars now [08:57] doko: are you going to dump all of the no-change rebuilds into the silo as they can be done? [08:57] would be good to have a transition tracker which looks at that too I guess ... [08:58] pitti: does this mean we can have an another export with updated translations soonish? [08:58] Laney, transition tracker for a ppa doesn't yet exist. but infinity is supposed to work on this ... [08:58] seb128: ah, the one on https://translations.launchpad.net/ubuntu/wily/+language-packs is no good because of the above? [08:58] I mean sil2100 ^ [08:58] for now, I just upload things what need to fix bugs [08:59] pitti, well, template imports didn't work [08:59] right [08:59] so the templates are outdated [08:59] so the langpack content doesn't match the current code [08:59] so strings are missing [08:59] seb128, sil2100, wgrant: so I guess we have to wait until https://translations.launchpad.net/ubuntu/wily/+imports clears up, and then do another full export? [08:59] yes [08:59] but that's going to take days righT? [09:00] 14190 templates to import AFAICS [09:00] which might be too much for the ota update [09:00] Yes, the translation importer is slow beyond belief. [09:00] We can, er, expedite certain templates, though, with a bit of hackery. [09:00] That is, unapprove all of the imports that are boring. [09:01] wgrant: would that require a lot of work? [09:02] Since I suppose if we could get properly updated touch translations imported and then do an export, that would be sweet [09:02] wgrant: how long would that take roughly? poking 14000 strings into a DB doesn't sound like a lot? [09:04] sil2100, pitti: I would probably just use SQL to set all Approved import queue entries in wily to Needs Information. Then you can approve interesting ones as necessary. [09:04] And once the deadline has passed we can set them all back to Approved. [09:05] seb128: We'll have proper translations for the overlay PPA soon, BTW. [09:05] (Not OTA5 soon, but soon) [09:05] cjwatson, ah, that's good news ;-) [09:07] wgrant: that could work... although my experience with handling LP translations is a bit weak [09:08] wgrant: so I would need some help with that probably [09:08] pitti: could you help me out here? [09:09] sil2100: err, we are supposed to manually set several hundred templates to "approved"? [09:09] can't we do this with SQL again? [09:09] I guess it's just a matter of going to https://translations.launchpad.net/ubuntu/wily/+source/