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

*** tiagogomes [~tiagogome@] has joined #baserock07:33
*** dabukalam [] has joined #baserock07:34
*** franred [] has joined #baserock08:20
*** flatmush [] has joined #baserock08:27
straycatbusybox sh doesn't seem to read to /etc/profile or /root/.profile :/08:28
*** jonathanmaw [] 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
Kinnisonone sec08: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 [] 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 [] 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
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
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
straycatrichard_maw, It's fine I'm just not very good at shell.09:18
*** dabukalam [] has quit [Ping timeout: 240 seconds]09:26
*** dabukalam [] 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 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
* 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 (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?
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
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 [] has quit [Ping timeout: 245 seconds]11:23
*** dabukalam [] has joined #baserock11:40
paulsherwoodwe had a report from an ubuntu user (!) that 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
KinnisonI was intending to do so when I finished the Jetson/GENIVI merge work12:57
KinnisonAs I said yesterday, but perhaps not here12:57
paulsherwoodsorry if i missed it - i was swapping timezones12: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 [] has quit [Ping timeout: 245 seconds]13:02
*** genii [~quassel@ubuntu/member/genii] has quit [Remote host closed the connection]13:15
*** dabukalam [] has joined #baserock13:18
ssam2petefoth: the script which our CI tool uses for testing is this one, I believe:
petefothssam2: ta!14:18
*** dabukalam [] 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
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 [] 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 [] 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 [] has quit [Quit: Leaving]16:45
*** dabukalam [] 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
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 [] has quit [Ping timeout: 245 seconds]17:03
*** tiagogomes [~tiagogome@] has quit [Ping timeout: 264 seconds]17:04
*** violeta [] 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 [] has joined #baserock17:19
*** franred [] has quit [Quit: Leaving]17:29
*** ssam2 [] has quit [Quit: Leaving]18:05
*** dabukalam [] has quit [Ping timeout: 272 seconds]18:37
*** dabukalam [] has joined #baserock18:52
*** dabukalam [] has quit [Ping timeout: 276 seconds]20:08
*** dabukalam [] has joined #baserock20:23
*** dabukalam [] has quit [Ping timeout: 264 seconds]21:49
*** dabukalam [] 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 [] has quit [Ping timeout: 276 seconds]23:50

Generated by 2.15.3 by Marius Gedminas - find it at!