/srv/irclogs.ubuntu.com/2015/08/18/#snappy.txt

=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
clobranoHi all10:04
ogra_hey clobrano10:04
clobranohi ogra_, a little question, I looked around but I haven't found anything so far: I would need to change something in a driver (e.g. option), like adding a vid/pid pair10:07
clobranousually, I would recompile the kernel with this change, is that possible on ubuntu core? Is there another way to do so?10:07
ogra_clobrano, you mean via a udev rule or dircetly in the driver ?10:07
clobranoogra_: directly in the driver10:08
ogra_for that i fear you have to recompile the kernel,. yes10:08
clobranois that still possible for ubuntu core?10:08
ogra_(thouht often enough a udev rule is enough to tell the kernel to load a specific driver)10:09
clobranoogra_: unfortunately this is necessary for our project10:10
ogra_what device is that ? for armhf we have semi-good documentation for building the device tarball ... i'm not sure we have anything for x86 (where the tarball gets auto-generated by the image build system)10:11
ogra_you would actually build your own device tarball for what you want to do and use that with ubuntu-device-flash to generate an image10:11
zygaogra_: hmm, no lspci/lsusb on snappy?10:15
clobranoogra_: well, the documentation for armhf could be a good starting point10:16
ogra_clobrano, https://developer.ubuntu.com/en/snappy/guides/porting/ see the section about the devcie tarball, hardware.yaml etc10:17
clobranoogra_: thanks ;)10:17
ogra_zyga, real men use /sys directly :P10:17
zygaogra_: and remember all the enums ;)10:21
ogra_indeed, from the top of their head :)10:21
asacanyone around who knows snapcraft?11:27
asacted: ogra_: ?11:27
asaci need to run a command for building qt5 from source after the checkout11:28
asacis there a hook feature post-pull or something?11:28
loolasac: I've been requesting hooks for a while11:31
loolasac: but instead, just create a make part and use the bits from the qt parts11:31
asaclool: not sure i understand11:31
asaci should derive a new plugin?11:32
asace.g. on autotools11:32
asacand then extend the pull code to run a command in srcdir ?11:32
asachmm. shouldn the make plugin allow to allow specific mark targets that are not make; make install?11:33
asaclool: is it possible to have a local part in a snapcraft tree that doesnt pull anything?11:35
asace.g. can i make my parts/qt5/ directory and put a makefile in there that then does all it needs ?11:35
asacguess i am on wrong track11:35
loolasac: so your goal is what again?11:36
loolasac: most of the time, you don't need a new plugin11:37
loolplugins are for recurring cases11:37
loolasac: we don't have any config in the make plugin; it indeed defaults to make and make install DESTDIR=...11:37
loolasac: if you don't want to pull anything, just say source: .11:38
asaclool: qt5 from git... you git clone topath; cd topath; perl init-repository11:42
asaci dont know how to best run init-repository11:42
asaclool: its like repo sync that gets all the real source11:43
=== chihchun_afk is now known as chihchun
loolasac: while you could hack this around with a makefile, if you want the "pull" semantics of snapcraft to map to this different way of pulling, you indeed need a plugin11:44
asaclool: right. wondered if there could be a post-pull mangling hook11:44
asacmaybe all stages should have pre and post hooks?11:45
asacguess not very clean11:45
asaclool: can i write local plugins yet?11:45
asacor do i best work inside the snapcraft tree to add new plugins?11:45
loolasac: I personally would like the pre- / post- hooks as I feel it would be useful, however it's not in the spirit11:48
loolsnapcraft documents parts, not actions/tasks11:48
loolso hooks already feel wrong there11:48
asacright11:48
looland then hooks would potentially make it harder to port snapcraft to non-linux platforms11:48
asacwell i kind of agree on spirit11:49
asacbut i hate the non-reuse feature of deriving from a specialized class11:49
loolif people start having a bunch of shell scripts running sudo apt-get install foo etc.11:49
asacso maybe having a plugin system that allows to add reusable things pre-post would be good11:49
asacso write a post-pull plugin that you can add through an option in parts to any plugin11:50
=== shadeslayer_ is now known as shadeslayer
asacmaybe call it extension :)11:50
asacfor instance11:50
asaccopy11:50
asacmany want that i guess11:50
asacmaybe could go in Base11:50
asacbut if not, its not good for reuse11:51
asacas it is11:51
asacassuming there are many useful helper thingies that not all want ...11:51
ogra_mvo, is there a bzr tree for initramfs-tools-ubuntu-core ?12:36
* ogra_ cant seem to find one12:37
mvoogra_: just https://code.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-core12:38
mvoogra_: but freel free to setup one12:38
ogra_ah12:39
biezpalHey everyone. We're trying to run lxc-start command and getting the following apparmor message in syslog12:48
biezpalapparmor="DENIED" operation="file_inherit" profile="/usr/bin/ubuntu-core-launcher" name="/dev/null" pid=17552 comm="ubuntu-core-lau" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=012:48
biezpalIt seems like apparmor profile for ubuntu-core-launcher is blocking lxc-start command. Our profile for lxc-start is ignored, what we are doing wrong?12:48
biezpalogra_, I believe you can help us :)12:54
ogra_biezpal, i guess jdstrand is better in that ...12:55
ogra_one thing to keep in mind if you sideload a snap is that the profile is only re-generated if you have a new version number12:56
ogra_so bump that before installing your snap locally12:56
biezpalogra_, ok, thanks12:58
biezpaljdstrand, could you advise something?12:58
jdstrandhey, reading13:03
jdstrandbiezpal: I'd need to look at the snap. is it in the store? how are you invoking it?13:04
jdstrandbiezpal: actually, looking at the denial, it is in the launcher. can you adjust '/etc/apparmor.d/usr.bin.ubuntu-core-launcher' to have this before the trailing '}': /dev/null rw,13:11
jdstrandbiezpal: then do: sudo apparmor_parser -r /etc/apparmor.d/usr.bin.ubuntu-core-launcher13:11
jdstrandbiezpal: then try again13:11
cwayneheya, whats the easiest way to resize my snappy kvm image so that i can install larger snaps?13:27
ogra_cwayne, well, add zeros to the end of it, resize the writable partition, resize the filesystem on the writable partition13:33
ogra_http://paste.ubuntu.com/12117162/13:33
ogra_:D13:33
* ogra_ is just working on a prototype to do exactly that on first boot13:33
Chipacaogra_: https://code.launchpad.net/~chipaca/snappy/manpage-ftbfs/+merge/268330 if you've got a sec?13:36
Chipaca(not many people with review-ability right now ;) )13:36
ogra_Chipaca, sorry, was dragged away for a moment ... as far as i can judge that code it looks fine :)13:51
Chipacaogra_: evil draginses awayes13:52
ogra_Chipaca, in line 25 ... are you sure /usr is in $BUILDDIR ?13:52
ogra_or was /usr/bin/snappy the whole wrong path anyway ?13:52
Chipacaogra_: snappy is just under obj-yadda/bin/13:53
Chipacaogra_: http://pastebin.ubuntu.com/12118266/ is what i got when running find in debian/rules13:54
ogra_Chipaca, ack ... approving then13:56
ogra_done13:56
* Chipaca gefingercrossen13:57
ogra_haha13:57
ogra_Chipaca, hmm, same error it seems14:25
ogra_can't load package: package launchpad.net/snappy/i18n/xgettext-go14:25
Chipacaogra_: i see a successful build on amd6414:26
ogra_ah, then that was i386 only14:27
ogra_https://launchpadlibrarian.net/214836852/buildlog_ubuntu-wily-i386.ubuntu-snappy_1.5ubuntu1-1%2B632~ubuntu15.10.1_BUILDING.txt.gz14:27
Chipacaarmhf worked too14:31
Chipacai say we drop i386 from supported architectures and move on14:32
ogra_haha14:32
ogra_tell that to the edison people :P14:32
=== chihchun is now known as chihchun_afk
=== ogra_` is now known as ogra_
=== dholbach_ is now known as dholbach
jdstrandstgraber: fyi in case you missed it, I commented on the lxd snap in the store. please see the review comments15:44
longsleepogra_: did you see my script for the resize: https://github.com/longsleep/snappy-odroidc/blob/master/scripts/resize-snappy-writable.sh - any reason you do not use 'growpart' ?15:48
ogra_longsleep, what are the deps and does it support any kind of filesystems ?15:50
ogra_i wanted to use parted since thats our standard tool and gets the most maintainer attention ... but parted has to big deps to ship it inside the initrd15:50
longsleepogra_: growpart is on snappy already15:50
DarwinFI sideloaded an app onto my RPi and whenever I try to start the service I get an error with "... name org.freedesktop.PolicyKit1 not provided..." Is there a way to fix that?15:51
longsleepogra_: (its coming with cloud init i think)15:51
ogra_longsleep, ah, i need it in the initrd ... i'll have to take a look15:53
stgraberjdstrand: thanks. At a conference this week, will check next week.15:53
longsleepogra_: all that cut tr sed stuff from your script looks scary - so maybe growfs can help to avoid that15:53
ogra_longsleep, whats scary about it ?15:54
* ogra_ fids it crystal clear ;)15:54
ogra_*finds15:55
longsleepogra_: :D15:55
longsleepwell i guess i thind multiple sed tr cut pipes scary in general15:55
ogra_well, yeah, its a prototype ... normally i'D merge the tr/cut stuff into one sed line :)15:56
ogra_and it is likely throw away work anyway15:56
longsleepogra_: yeah, it is totally valid to use15:56
ogra_just to get the feature fast ... later it will get re-implemented15:57
longsleepogra_: also i took a different approach to find the partition - i was not using findfs instead i use blkid and go through /sys to find all the stuff15:57
ogra_yeah, findfs is used all across the initrd ...15:58
ogra_which made me pick it ...15:58
longsleepright15:58
longsleepogra_: though i wonder why do you need the sanitizing code, should it not return good values already?15:58
ogra_longsleep, it returns the device node for the partition15:59
ogra_if i use a USB key that will be /dev/sdn116:00
ogra_for mmc you have /dev/mmcblknp116:00
ogra_so you always get the XpX in mmc nodes ...16:00
longsleepogra_: ok, so then i would recommend to use /sys to find whatever else you need, instead to use that case block16:01
longsleep(starting from /sys/class/block/..)16:01
ogra_hos does that help me getting rid of the p ?16:02
ogra_*how16:02
ogra_i need to get from the return value from findfs to the device name ...16:04
jdstrandstgraber: sure, np. just wanted to make sure you saw them16:04
jdstrandstgraber: enjoy :)16:04
longsleepogra_: well i dont know but i think whatever findfs returns should have its entry in /sys/class/block/16:04
ogra_and non mmc'S return the right thing while mmcs do return something with a XpX at the end16:05
longsleepogra_: that folder should contain anything else16:05
longsleepogra_: the name should not matter when you traverse through sys16:06
ogra_hmm16:06
longsleepogra_: you can find the device name by following the symlink of /sys/class/block/whatever16:07
longsleepogra_: then go one level up and read the dev16:07
longsleepfile16:07
longsleepthat will work whatever names the block partitions have16:07
longsleepeg /sys/class/block/sda1 -> ../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda116:08
longsleepfollow the symlink, then ../dev is the name of the device16:08
ogra_not in case of mmc :)16:08
longsleepno?16:09
ogra_no, the content of dev just pĆ¼oints back to the partition16:09
longsleepgo one level up16:09
ogra_(RaspberryPi2)ubuntu@localhost:~$ cat /sys/class/block/mmcblk0p2/dev16:09
ogra_179:216:09
longsleepyes and then follow that symlink again below /dev/block/179:216:10
ogra_/sys/dev/block/179:2/dev is just the same thing16:10
longsleepright, one more level of links to follow16:10
ogra_going one level up wont get me mmcblk016:10
longsleepwhen you have 179:2 open the link of /dev/block/179:216:11
longsleepwill be ../sda or similar16:11
longsleepthen you have it16:11
ogra_(RaspberryPi2)ubuntu@localhost:~$ readlink /sys/dev/block/179:216:11
ogra_../../devices/platform/mmc-bcm2835.0/mmc_host/mmc0/mmc0:0007/block/mmcblk0/mmcblk0p216:11
ogra_ah, i get what you mean16:11
longsleepyou are still one level too deep16:12
ogra_yes, but that actually allows to go up16:12
ogra_i doubt it will be much less code than the case statement (which is way to big anyway, the *) stuff is superfluous )16:13
longsleepit will not be less code, but it will support anything the kernel can come up to. I do not know how many possible partition naming schemes there are16:14
ogra_yeah, indeed16:14
longsleepthats why i wanted to use the kernel provided information to find stuff16:14
ogra_well, i guess i'll re-use some of your resize-snappy lines :)16:17
ogra_looks indeed a bit saner :)16:18
ogra_though i still dont think i'll use growpart, that would introduce a hard dep of initramfs-tools-ubuntu-core on cloud-guest-utils16:19
longsleepogra_: yeah - if you can get the sfdisk stuff working that should be totally fine16:19
ogra_(and i need the size checks ahed of running anything ... we only want to grow if it it actually useful)16:20
ogra_*if it is16:20
longsleepgrofpart just gives you all the gear already and checks if there is something to resize16:20
longsleepgrow*16:20
ogra_i dont see you running fsck ...16:20
longsleepyeah growpart has this --fudge parameter which does that check16:20
longsleepyeah i am not running fsck16:21
longsleepprobably bad :(16:21
ogra_how do you make resizefs work without it ? by default it should refuse any operation if there isnt a fresh fsck16:21
longsleepmhm maybe growpart does that16:21
ogra_yeah16:21
=== alexabreu is now known as alex-abreu
Chipacaogra_: you poked at an image build?16:30
ogra_Chipaca, eeek, sorry !!16:30
* Chipaca scribbles in a little black book, tutting disparagingly16:31
ogra_Chipaca, running16:31
ogra_no little star sticker for me today i guess :/16:31
Chipacaogra_: well, we can't go handing out golden stars just like that now, can we?16:33
longsleepI am going to FrOSCon on the weekend, someone of you folks going too?16:35
longsleepthere is a snappy and an ubuntu phone talk on saturday16:36
ogra_longsleep, i think thats svij's talk :)17:49
svijogra_: longsleep: yep18:19
* davmor2 notices ogra_ is now listed on Santa Naughty list, Man that Chipaca has friends in high places18:25
davmor2hmmmmm wait a minute, you never see Chipaca and Santa in the same room........he writes in a book and.......wait a minute18:26
MikaelaI thought only sudo without being sudoer resulted to that list18:26
=== sarnold is now known as sarnold_
Chipacadavmor2: Mikaela: i was *wondering* why i got everybody's sudo alert mail21:56
Chipacait all makes sense now21:56

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