IRC logs for #baserock for Thursday, 2014-09-11

*** tiagogomes [~tiagogome@213.15.255.100] has joined #baserock07:33
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock07:34
*** franred [~franred@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock08:20
*** flatmush [~flatmush@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock08:27
straycatbusybox sh doesn't seem to read to /etc/profile or /root/.profile :/08:28
*** jonathanmaw [~jonathanm@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock08:29
KinnisonIt will if it's a login shell08:31
straycatRight of course, the symlink hack doesn't work because sh is itself a link to busybox I was trying to fix that by defining bash as an alias to busybox sh08:34
Kinnisonaah yeah08:34
Kinnisonyou actually need08:34
Kinnisoncat > /bin/bash08:35
Kinnison#!/bin/sh08:35
Kinnisonerm08:35
Kinnisonno08:35
Kinnisonone sec08:35
straycatno08:35
Kinnison/tools/bin/bash08:35
Kinnison#!/tools/bin/sh08:35
Kinnisonexec /tools/bin/sh "$@"08:35
Kinnisonor something like that08:35
KinnisonI'm pre-caffeination so I could be very wrong08:35
franredfor gerrit I've removed sh directly and create a link to bash ln -sfn bash /bin/sh and works08:36
straycatyes that's what I tried, but then that won't work for -c 'script' because you lose the quoting08:36
straycatbut I have a work around in mind08:37
Kinnisonfranred: you mean gerrit is full of #!/bin/sh which assumes sh is bash?08:38
Kinnisonstraycat: "$@" should work perfectly08:38
franredKinnison, let me check, I will tell you later08:38
pedroalvarezI accidetally joined the #!/bin/sh channel doing a random click in this conversation08:39
Kinnisonclick? Oh dear08:39
*** violeta [~violeta@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock08:40
petefothHow  do you click using a CLI?08:40
straycatKinnison, Perhaps I misunderstand "$@" then, I thought it was a space separated list of the paramters' words08:40
straycatpetefoth, with gpm08:40
Kinnison     @            Expands to the positional parameters, starting from one.  When the expansion occurs within double-quotes, each positional parameter expands as a08:41
Kinnison                  separate argument.  If there are no positional parameters, the expansion of @ generates zero arguments, even when @ is double-quoted.  What this08:41
*** ssam2 [~ssam2@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock08:41
Kinnison                  basically means, for example, is if $1 is “abc” and $2 is “def ghi”, then "$@" expands to the two arguments:08:41
Kinnison                        "abc" "def ghi"08:41
straycatso foo -c "which ls" would expand to "-c" "which" "ls" ... which won't work08:42
petefothstraycat: ta! Now to find an equivalent for iTerm on Mac OS X08:42
ssam2straycat: surely that'd expand to "-c" "which ls" ?08:43
Kinnisonstraycat: I'm very confused as to what you're on about, ssam2's expansion is correct08:43
richard_mawI think he's putting the -c in the #! line09:06
richard_mawwhich doesn't work because Linux's #! parser is rather primitive09:06
KinnisonBuh09:06
KinnisonWhy would you do that?09:06
richard_mawthere's a bunch of clever hacks I'd be doing with that if it were possible09:07
ssam2are there Debian users who have Ruby installed here ?09:08
Kinnisondepressingly I do have it on my system09:09
ssam2if so, could you run 'gem env' and tell me what it lists as GEM PATHS ?09:09
Kinnison  - GEM PATHS:09:09
Kinnison     - /var/lib/gems/1.9.109:09
Kinnison     - /home/danielsilverstone/.gem/ruby/1.9.109:09
Kinnison     - /usr/share/rubygems-integration/1.9.109:09
richard_mawI used to until I rebuilt my vim so I didn't have to link against it09:09
ssam2just noticed that in Baserock we put Gems in /usr/lib/ruby/$VERSION/gems09:09
ssam2but on Fedora they're in /usr/share/gems09:09
ssam2and it seems on Debian they're in /var/lib/gems/$VERSION09:09
richard_mawor /usr/share/rubygems-integration/$VERSION09:10
ssam2I think that's a Kinnison-addition :)09:10
Kinnisonnup09:10
ssam2ah, OK09:10
ssam2anyone have any views on where they should go in Baserock? I want to remove the $VERSION from our path, because I don't think we'll often be wanting two Ruby versions in a Baserock system, and having $VERSION in there means the import tool has to know what version of Ruby a particular Baserock system uses09:10
ssam2I'm thinking /usr/lib/ruby/gems as the default GEM PATH09:11
KinnisonI thought some of our QT systems explicitly had ruby1.8 *and* ruby1.909:11
ssam2oh :(09:11
Kinnison because of awkward build-deps09:11
ssam2maybe the ugliness must remain, then09:11
ssam2oh well, at least that's less work for me now :)09:12
ssam2even if it probably creates more work for other people in the future, when they want to change the version of Ruby in use in their system09:12
ssam2hmm, actually there's probably a clever way to do this in the configure-commands09:12
ssam2yeah, `gem environment home` is way forward. As Kinnison's original notes from June do tell me :)09:14
ssam2+the way forward09:14
KinnisonRuhroh09:18
straycatrichard_maw, It's fine I'm just not very good at shell.09:18
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 240 seconds]09:26
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock09:43
KinnisonAnyone know how hard/easy it is to set up a one-node distbuild controller+worker+initiator for doing development of distbuild?10:43
SotKon your laptop or some vmhost?10:45
SotKor on a devboard of some kind?10:45
radiofreeKinnison: pretty easy10:45
radiofreei used to use a jetson for that10:45
radiofreethis http://wiki.baserock.org/guides/jetson_distbuild_cluster/ essential documents flashing a board with a devel image10:46
SotKits easy to do it in on a VM host, I have never done it on a devboard though10:46
radiofreebuilding the distbuild image, and then deploying it10:46
radiofreeof course the deployment would only need build-controller, with itself as a worker10:47
KinnisonCool10:47
* Kinnison is pondering if he can improve the feedback for long builds10:47
KinnisonPerhaps I'll wait for richard_maw's rework branch to land first though10:48
radiofreethe flashing step in that still uses the old method however10:49
KinnisonI'm likely to do it as an x86_64 container on my laptop for ease of portability10:49
radiofreeif you had a jetson flashed using the baserock-jetson-flash.sh (i.e using u-boot and btrfs) to flash the devel image (as documented in the other jetson guide), could one deploy the upgrade to a distbuild controller/node to itself?10:50
KinnisonI don't know what state our self-upgrade stuff is in, but in theory -- yes10:51
franredcould someone spot something about why chown can not work in this morphology? http://fpaste.org/132723/32848141/10:54
franredeverything works but the owner of the gerrit folder is root so I gerrit2 does not have permissions to run its initialization script :/10:55
Kinnisonbusybox's chown doesn't do foo:bar IIRC10:55
Kinnisondo a chown and chgrp separately10:55
ssam2Usage: chown [-RhLHPcvf]... OWNER[<.|:>[GROUP]] FILE...10:55
franredKinnison, I did manually10:55
ssam2seems like it does10:55
Kinnisonhmm10:55
KinnisonPut that set of behaviour into a script you install and then in the integration commands do sudo -u gerrit2 /path/to/script10:56
Kinnisonthen you're not fiddling partly as root10:56
franredKinnison, that is what Im trying to avoid - I mean, create the script10:57
radiofreefranred: does the owner where's the config script /home/gerrit2/gerrit/.gerrit_controller?10:57
radiofreedoes the gerrit2 command create the gerrit/.gerrit_controller folder?10:58
franredradiofree, yes it does10:58
Kinnisonfranred: why are you trying to avoid having it done more neatly?10:59
radiofreeit's creating it as root then?10:59
franredradiofree, yes, it is creating it as root, not sure why11:00
radiofreesudo -u gerrit2 java -jar /home/gerrit2/gerrit/gerrit-2.9.war init --batch .... -d /home/gerrit2/gerrit/.gerrit_controller --no-auto-start11:00
franredummm, yeah11:00
* pedroalvarez manages to deploy a generic trove to OpenStack and instantiate it with a simple cloud-init script11:01
franredradiofree, but that does not explain why gerrit folder is owned by root I though11:01
radiofreeYeah.. And you're using -u...11:01
radiofreeNo idea sorry11:02
pedroalvarezfranred: sudo -u gerrit2 mkdir /home/gerrit2/gerrit11:02
franredKinnison, I was told to not use one shot services and use system-integration commands11:08
franredso create a script and run it in system-integration only will move what I've done to this part11:09
franredso it is unlike11:09
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 245 seconds]11:23
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock11:40
paulsherwoodwe had a report from an ubuntu user (!) that baserock-jetson-flash.sh almost worked for him :)12:56
richard_mawit did work for him, just with some garbage error messages12:56
richard_mawbecause the script was expecting /bin/sh -> /bin/bash12:57
paulsherwoodcan/should we fix the script?12:57
richard_mawyes/yes12:57
KinnisonI was intending to do so when I finished the Jetson/GENIVI merge work12:57
KinnisonAs I said yesterday, but perhaps not here12:57
paulsherwoodgreat12:57
paulsherwoodsorry if i missed it - i was swapping timezones12:58
Kinnison:-)12:58
Kinnison21:23 < Kinnison> I am working on getting that integrated into master12:58
Kinnison21:23 < Kinnison> but not right now12:58
KinnisonI imagine you had got onto your plane by then12:59
paulsherwoodmy brain had, at least13:02
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 245 seconds]13:02
Kinnison:-)13:11
*** genii [~quassel@ubuntu/member/genii] has quit [Remote host closed the connection]13:15
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock13:18
ssam2petefoth: the script which our CI tool uses for testing is this one, I believe: http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/scripts/release-test14:17
petefothssam2: ta!14:18
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 246 seconds]15:03
*** genii [~quassel@ubuntu/member/genii] has joined #baserock15:03
franredrichard_maw, when system-integration scripts run, do we expect that /proc should be mounted? can we mount it?15:05
richard_mawbah, `morph branch-from-image` was broken by adding /baserock/deployment.meta15:05
richard_mawfranred: you shouldn't mount it in your system integration scripts15:06
* franred has discovered that java needs /proc mounted15:06
richard_maweww15:06
franredeww, twice15:06
richard_maw /proc should already be mounted15:08
richard_mawI'm looking at the code that does it15:08
pedroalvarezindeed, it should be mounted15:09
* franred looks once again to its system to check what is happening15:10
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock15:20
* pedroalvarez spams baserock-dev15:20
franredconfirmed, we have /proc mounted15:21
* rjek trains the spam filter to smite pedroalvarez 15:21
* franred he looks to java in anger15:21
De|taIs there any other way to look at java? :)15:24
richard_mawContempt, if you don't have to use it at that moment.15:26
*** jonathanmaw [~jonathanm@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Quit: Leaving]16:34
straycatecho "'$(echo "$1" | sed -e "s/'/'\\''/g")'"16:35
straycatI don't really see what the escapes are for in the replacement16:37
franredstraycat, I think you are scaping \16:42
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Quit: Leaving]16:45
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock16:45
straycatSure, why?16:45
Kinnisonso it gets through16:45
straycatWhy do we need to escape the '16:46
Kinnisonstraycat: given you asked the question with zero context, I can't possibly comment16:47
richard_mawit turns a string, such as "foo'bar" into 'foo'\''bar'16:47
straycatIsn't it trying to turn "foo'bar" into "'foo'\''bar'"16:49
richard_mawthough I think it needs to use `printf '%s\n' "$1"` instead of `echo "$1"`, since echo will interpret escape sequences16:49
straycatAhh16:50
richard_mawit's one of the easiest ways of doing shell escapes, since you only need to escape the ' character, but it also produces the ugliest escaped string16:56
richard_mawespecially if you have multiple levels of escaping involved16:56
straycatWhat's confusing me is that when I run this I get "'foo'''bar'"16:57
richard_mawwhere are you running it?16:58
straycatIn a bash shell16:58
richard_mawhm, it needs to be \\\\, rather than \\ then16:59
richard_mawbecause both the shell and sed are consuming them17:00
straycatbenbrown1 suggested \\\ which seems to work17:00
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 245 seconds]17:03
*** tiagogomes [~tiagogome@213.15.255.100] has quit [Ping timeout: 264 seconds]17:04
*** violeta [~violeta@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 252 seconds]17:16
straycatOkay this makes sense, I'll fix this function so it escapes as it should.17:18
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock17:19
*** franred [~franred@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Quit: Leaving]17:29
*** ssam2 [~ssam2@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Quit: Leaving]18:05
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 272 seconds]18:37
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock18:52
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 276 seconds]20:08
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock20:23
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 264 seconds]21:49
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock22:05
*** genii [~quassel@ubuntu/member/genii] has quit [Remote host closed the connection]22:07
*** Guest97708 [quassel@2400:8900::f03c:91ff:feae:3452] has quit [K-Lined]22:46
*** persia [quassel@ubuntu/member/persia] has quit [K-Lined]22:46
*** persia [quassel@2400:8900::f03c:91ff:feae:3452] has joined #baserock22:48
*** persia [quassel@2400:8900::f03c:91ff:feae:3452] has quit [Changing host]22:48
*** persia [quassel@ubuntu/member/persia] has joined #baserock22:48
*** persia_ [quassel@ubuntu/member/persia] has joined #baserock22:48
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has quit [Ping timeout: 276 seconds]23:50

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