/srv/irclogs.ubuntu.com/2015/12/10/#snappy.txt

kyrofaelopio, alright thanks :)00:55
=== chihchun is now known as chihchun_afk
liuxghow is "organize" in snapcraft.yaml is used? thanks03:46
=== 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
liuxgdholbach, ping08:14
dholbachliuxg: pong08:15
liuxgdholbach, do you know what the following sentence means in the snapcraft.yaml?  http://paste.ubuntu.com/13886619/ the organize part08:16
dholbachliuxg: no, I'm afraid not - best to ask sergiusens or kyrofa when they are back online08:18
liuxgdholbach, ok. I will do that. the explanation in the document is very weak. https://docs.google.com/document/d/1Rj9nVBttx62BvGlbnkmKOzAlAIEWuLNr1QaSGe3gQDA/edit#heading=h.bx30erj03sx108:19
dholbachah ok, look at this:08:19
dholbach   * `organize` (yaml subsection)08:19
dholbach     A dictionary exposing replacements, the key is the internal name whilst08:19
dholbach     the value the exposed name, filesets will refer to the exposed named08:19
dholbach     applied after organization is applied.08:19
dholbachah, yes - that's the same08:19
liuxgdholbach, what does it exactly mean in the context?08:19
dholbachI don't know - I didn't write it08:19
dholbachI would need to read the code to understand08:19
dholbachare files renamed with the patterns mentioned there?08:20
liuxgdholbach, I am going to have a snapcraft training for some of the people in one week. I am trying to understand more about it.08:20
dholbachI see08:21
liuxgdholbach, it sounds like that the files inside opt/bin will be put into the bin directory?08:21
dholbachI don't know08:22
dholbachhave you tried it?08:22
liuxgdholbach, I have tried the code snippet there, and it does not work at all. http://paste.ubuntu.com/13886619/, it seems there is some error for it.08:22
dholbachif it errors out, that's a bug :/08:23
dholbachor the example needs to be updated08:23
liuxgdholbach, the line does not work at all    - *.h08:23
dholbachcan you file a bug about it?08:24
liuxgdholbach, i will, the "type" null means a null plugin, right?08:24
dholbachyes08:24
liuxgdholbach, there are a few bugs with the code there.08:24
dholbachyes, it needs to be updated08:24
liuxgdholbach, so, it is against snapcraft?08:25
dholbachmaybe the example needs to be updated and then it works?08:25
dholbachthere were some changes in the early versions of snapcraft, like type → plugin08:25
liuxgdholbach, that seems the only document we can refer to. we need a complete tutorial on snapcraft. will anyone push for that?08:26
dholbachliuxg: the document needs to be updated if the example doesn't work08:26
dholbachricmm: ^08:27
dholbachin general I think it does a good job though08:27
liuxgdholbach, this is the project https://github.com/liu-xiao-guo/null08:29
liuxgdholbach, would you please have a try in your place?08:30
dholbachI can't08:30
dholbachI have to go to the dentist now08:30
liuxgdholbach, ok. if you are free, you can do it at your convenience later on.08:30
dholbachbut there are a lot of other folks in here, maybe somebody else can help08:30
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
JamesTaitGood morning all; happy Thursday, and happy Nobel Prize Day! 😃10:03
liuxgzyga, ping10:45
zygaliuxg: hey10:59
liuxgzyga, last time, you told me to try the requirements.txt, I have tried it, and there is a problem for it. I have reported a bug for it at https://bugs.launchpad.net/snapcraft/+bug/152338411:00
ubottuLaunchpad bug 1523384 in Canonical Click Reviewers tools "broken symlinks when snapping a python project using requirements.txt" [Undecided,In progress]11:00
zygaliuxg: thanks for reporting the bug11:01
liuxgzyga, it is ok. by the way, today, I tried another project at https://github.com/liu-xiao-guo/null, I also failed. I did it according to the document "Snappy Ubuntu Core - Application Developer Manual 15.04". I do not where I was wrong for it.11:02
liuxgzyga, I also reported a but for it at https://bugs.launchpad.net/snapcraft/+bug/1524663.11:04
ubottuLaunchpad bug 1524663 in Snapcraft "Issues while validating snapcraft.yaml: None is not of type 'string'" [Undecided,New]11:04
=== 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
=== verterok is now known as verterok-away
dholbachliuxg: I sent a pull request for your example -it should work now12:48
dholbachbut still I feel it's a valid bug because the error messages of snapcraft didn't actually reveal any of the issues12:48
dholbachmaybe you could change the bug description to that12:48
liuxgdholbach, do you mean the null example?12:48
dholbachyes12:48
dholbachhttps://github.com/liu-xiao-guo/null/pull/112:48
liuxgdholbach,  did you do any change?12:49
dholbachsee the pull request12:49
=== chihchun is now known as chihchun_afk
dholbachthere were a number of issues with the example (I updated the doc already)12:49
liuxgdholbach, OK. many thanks, I think document should be updated :). yes, we need to make the example working. the document is accessed by many people.12:50
dholbachliuxg: I already updated the doc12:50
liuxgdholbach, that is cool! by the way, have you figured out "organize" ?12:51
dholbachyes, it's basically a rename12:51
dholbachjust check the contents of the snap in your example and the files in the parts/ directories12:52
liuxgdholbach, do you mean rename the "opt/bin" to "bin"?12:52
dholbachyep12:52
dholbachor in the working example   usr/bin  →  bin/12:53
liuxgdholbach, in my example, it is  opt/bin: bin, so, we change it to "usr/bin to  "bin"?12:54
dholbachhttps://github.com/liu-xiao-guo/null/pull/1/files12:55
dholbachcheck the diff12:55
dholbachthat's what makes the example actually work12:55
liuxgdholbach, yes, I see it. thanks a lot.12:56
dholbachok, cool :)12:56
liuxgdholbach, you are marvelous!13:00
dholbachthanks a lot - this was a useful exercise for me as well :-)13:00
liuxgdholbach, so all of the files in the /usr/bin are gone. the final snap is like http://paste.ubuntu.com/13893283/. the gnupg files are not there.13:03
dholbachhum, that's weird - try:   snapcraft all --force13:03
dholbachfor me it looks like this: http://paste.ubuntu.com/13893318/13:04
liuxgdholbach, I have merged your changes already, now the project is like https://github.com/liu-xiao-guo/null/blob/master/snapcraft.yaml. I pulled everything there13:05
dholbachI'm using xenial, but I'm not sure if that makes a difference13:07
liuxgdholbach, I just used your command "  snapcraft all --force", it seems to be right. I am now doing it again with a normal "snapcraft"13:08
dholbachok13:09
dholbach"all --force" will go through all phases of snapcraft again and through away old results13:09
dholbachthat's useful if previous runs downloaded something else or moved files around or whatever13:09
dholbachSergio said that in version 2.0 snapcraft is going to be cleverer13:09
dholbachbut until then we will have to bear that trick in mind13:10
kyrofadholbach, an even more handy trick is to alter your part's `state` file and set its contents to "pull," then run snapcraft again13:12
kyrofaThat way it will rebuild the part without repulling .debs etc.13:12
kyrofaI find that to be the longest part, depending on the project of course13:13
liuxgdholbach, If I simply use "snapcraft", the result is the same as what I showed you. However, if i use "--force" option is the like yours. I am still confused. Do I need to use "--force" option all the time?13:15
dholbachno13:16
dholbachyou shouldn't have to13:16
dholbachI need to run again... see you later13:16
liuxgdholbach, ok. thanks. I will let you know the result. it is a little strange to me anyway13:17
kyrofaliuxg, the snapcraft behavior is very unintuitive right now regarding how the steps are run after they've already been run once. --force is backwards, and it's all very confusing13:17
dholbachkyrofa can probably help13:17
kyrofaliuxg, we're working on changing that right now :)13:18
kyrofaliuxg, so rest assured, we feel your pain13:18
liuxgkyrofa, thanks for your explanation. so in the future, we will just use snapcraft, right?13:19
elopiokyrofa: today I need to take my motorcycle to the mechanic. I might be late for the stand up, because buses are unpredictable.13:19
elopioI'll ping you when I'm back.13:20
kyrofaelopio, no problem, thanks for the heads up :)13:20
kyrofaliuxg, first of all, before I try to explain anything you're gonna have to take what I say with a grain of salt-- I only started on snapcraft recently :)13:21
liuxgkyrofa, alright, thanks13:21
kyrofaHowever, my understanding is that the snapcraft steps (pull, build, stage, snap, assemble) will remain the same13:22
kyrofaliuxg, I believe running `snapcraft` will continue to run through all steps, but it won't re-run any steps it has already run unless you force it13:23
kyrofaliuxg, similarly, say I run `snapcraft` once and it makes a .snap. If I run `snapcraft pull` again, it won't re-pull because it knows it's already done that. So I'd have to run `snapcraft pull --force`13:24
kyrofasergiusens will know all the details here, so hopefully I'm not leading you astray with where things are going13:24
liuxgkyrofa, I got you. If I run a "snapcraft clean" first, after that, I run "snapcraft", will it run through all of the steps?13:24
kyrofaliuxg, that sounds about right13:26
liuxgkyrofa, in my places, it a little bit not so right. I have my test project at https://github.com/liu-xiao-guo/null. it seems to give me different results when i run it.13:27
kyrofaliuxg, you mean `snapcraft clean` followed by `snapcraft`?13:29
liuxgkyrofa, yes, that is what I did here. I did not see all of the directories before I did another "snapcraft"13:29
kyrofaliuxg, give me a minute, let me pull the project13:30
kyrofaliuxg, I get this after a `snapcraft` run. Same as you? http://pastebin.ubuntu.com/13894019/13:33
liuxgkyrofa, what is the content inside the snap?13:33
kyrofaliuxg, bin/{wget,gpg-zip,gpgsplit,gpg}13:34
liuxgkyrofa, in my case, http://paste.ubuntu.com/13893962/13:35
kyrofaliuxg, alright let me try a clean and another snapcraft13:36
liuxgkyrofa, this is another try with "--force" option http://paste.ubuntu.com/13894098/13:36
kyrofaliuxg, interesting, you're right-- after I've cleaned and run again, I have the same as you13:37
kyrofaliuxg, let me look into this13:37
kyrofaliuxg, hang around, I'll ping you when I learn something13:37
liuxgkyrofa, it is a very confusing to me. running different command gets different results :)13:37
kyrofaliuxg, agreed13:38
kyrofaliuxg, confusing to me too :)13:38
liuxgkyrofa, sounds like a bug somewhere :) next time, I have to use to methods to try them. Still maybe I do not know which one is right.13:38
=== chihchun_afk is now known as chihchun
liuxgkyrofa, daniel seems to have a different result than us http://paste.ubuntu.com/13893318/13:43
kyrofaliuxg, haha, no kidding. I didn't have the lspgpot in there13:46
kyrofaliuxg, I suspect something is weird in the filtering13:46
liuxgkyrofa, I do not have it too :)13:47
liuxgkyrofa, I am using daniel's repository, which is the same as mine. I got different results for the two builds http://paste.ubuntu.com/13894397/13:49
liuxgkyrofa, I have created a bug report for it at https://bugs.launchpad.net/snapcraft/+bug/1524846. if you have any updates about it, could you please update it there? thanks a lot for your helping!13:56
ubottuLaunchpad bug 1524846 in Snapcraft "Different results obtained when building the same project" [Undecided,New]13:56
kyrofaliuxg, no problem :)13:57
=== chihchun is now known as chihchun_afk
=== verterok-away is now known as verterok
kyrofasergiusens, I ran into a terrible problem yesterday14:42
kyrofasergiusens, if the `source` option for a plugin is ".", it causes ./parts/foo/src to be symlinked to ., which results in a circular link. Which makes any automatic src parsing useless14:43
kyrofaelopio, ^^ too14:46
tasdomashi14:46
tasdomashow do I disable the automatic snappy update installation14:46
ogra_tasdomas, the easiest is probably:15:00
ogra_snappy config ubuntu-core >core-config.yaml15:00
ogra_then edit the value of autoupdate from true to false ...15:00
ogra_and run:15:00
ogra_sudo snappy config ubuntu-core core-config.yaml15:00
ogra_that will set the new value15:00
tasdomasogra_, thanks15:06
elopiokyrofa: that happened to me, but when the yaml was not in the root.15:45
elopioin theory we have a condition check that prevents the parts dir to be copied.15:45
kyrofaelopio, but it's a symlink, not a copy15:45
kyrofaelopio, note that I'm talking about the sourcedir, not the builddir15:46
elopiokyrofa: right, the condition is on build, where we copy.15:46
kyrofaelopio, and that makes sense15:46
kyrofaelopio, so perhaps this is only really a problem where we need to interrogate the sourcedir in order to complete the pull()15:46
kyrofaelopio, e.g. the catkin plugin15:46
kyrofaelopio, so I'm simply making the source and source-subdir checks a bit stricter for that plugin15:47
kyrofaelopio, but definitely a dangerous thing to keep in mind, at least15:47
elopioI couldn't add the condition to pull, because of the symlink. So maybe it would be good to copy in pull too.15:47
kyrofaelopio, took me forever to figure out why it was taking so darn long to run15:47
rOger___Hi all15:47
kyrofaelopio, interesting idea, but a bit heavy depending on the project15:47
elopiokyrofa: right, same here. Until it failed because it was copying a path too long.15:47
kyrofaelopio, that may be the best/cleanest solution15:47
elopiorOger___: Hello!15:47
rOger___I'm checking ubuntu snappy as a base system for embedded appliances15:47
rOger___for our requirements we should be able to replace several parts of the boot scripts with a different init "system"15:48
rOger___is there an official way to accomplish this?15:48
ogra_why do you need to replace the init system ?15:49
elopiorOger___: not yet. But the devs are working on splitting the image into snaps. And one of the things they are discussing is where is the bootloader defined, and how to replace it.15:49
rOger___We want to use our python based init scripts where we have more influence on some parts of the system config (like networking)15:50
ogra_well, thats not really how snappy works15:50
morphis_sergiusens, ricmm: does the snappy store group snaps per core image version?15:50
morphis_or do I publish a snap for everything?15:50
ogra_you have a very locked down core (readonly etc) ... that does the system boot ... and ten you have snaps ... a snap can ship services and binaries ... so you can have your application in a snap nad have the service started on boot ...15:52
rOger___@ogra_: so if you call a "firewall" an application; It will be called too late in the boot process; the network interfaces will be setup before the application will be started so during a short time I have a router instead of a firewall15:53
nothalrOger___: No such command!15:53
rOger___\ogra_: so if you call a "firewall" an application; It will be called too late in the boot process; the network interfaces will be setup before the application will be started so during a short time I have a router instead of a firewall15:54
ogra_things like networking are part of the core component though15:55
ogra_snappy offers an interface to configure it etc but you wouldnt easily be able to replace parts in the core15:55
ogra_(your snap could also ship its own network handling and tell snappy to turn off its own handling though ... )15:55
ogra_no, as i said, you can tell snappy to not take over networking15:58
morphis_ogra_: you know that?15:58
ogra_morphis_, well, in 16.04 you will be :)15:58
ogra_not sure Chipaca landed that yet but i know it was discussed :)15:58
ogra_rOger___, jdstrand recently created a ufw snap ... though that integrates with the existing core15:59
morphis_ogra_: so what is the current store targetting?16:00
rOger___ogra_: that sounds interesting; i will check it out16:00
ogra_morphis_, depends ... you can pick when you upload ... most packages should target stable16:00
ogra_but you can pick "edge" as well16:01
ogra_(which would target the rolling release by default)16:01
morphis_ogra_: ah16:03
morphis_ogra_: stable is 15.10?16:03
morphis_ogra_: and that changes with 16.04?16:03
ogra_not sure how it will chane then .... stable is 15.0416:04
ogra_*change16:04
morphis_ok16:04
morphis_ogra_: so I can publish two versions?16:05
morphis_on for edge and stable?16:05
ogra_you should be able to ... havent tried it myself16:05
morphis_ogra_: thanks!16:09
ogra_np ... ask beuno for more details :)16:09
kyrofaelopio, ah! I finally understand this stupid mock library16:25
beunomwenning, yes you can16:51
beunoer16:51
beunomorphis_, ^16:52
morphis_beuno: great16:52
=== sarnold is now known as sarnold_
sergiusenstyhicks, is there a security reason for this https://bugs.launchpad.net/snappy/+bug/1523372 ?19:45
ubottuLaunchpad bug 1523372 in Snappy "Can't specify environment variable in a service start command" [Undecided,New]19:45
sergiusenskyrofa, hey, do you have a sec?19:50
kyrofasergiusens, for you, always19:50
sergiusenskyrofa, hah, let me give you a hangout link :-)19:50
tyhickskyrofa: check the privmsg from me19:52
wililupyHello, I'm trying to build a snap of LISPmob, but it requires some system changes to snappy, like a configuration file in /etc and some changes to the /etc/sysctl file. How do I go about this in my snapcraft.yaml file?23:04

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