*** tiagogomes [~tiagogome@213.15.255.100] has joined #baserock | 07:33 | |
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock | 07:34 | |
*** franred [~franred@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock | 08:20 | |
*** flatmush [~flatmush@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock | 08:27 | |
straycat | busybox 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 #baserock | 08:29 | |
Kinnison | It will if it's a login shell | 08:31 |
straycat | Right 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 sh | 08:34 |
Kinnison | aah yeah | 08:34 |
Kinnison | you actually need | 08:34 |
Kinnison | cat > /bin/bash | 08:35 |
Kinnison | #!/bin/sh | 08:35 |
Kinnison | erm | 08:35 |
Kinnison | no | 08:35 |
Kinnison | one sec | 08:35 |
straycat | no | 08:35 |
Kinnison | /tools/bin/bash | 08:35 |
Kinnison | #!/tools/bin/sh | 08:35 |
Kinnison | exec /tools/bin/sh "$@" | 08:35 |
Kinnison | or something like that | 08:35 |
Kinnison | I'm pre-caffeination so I could be very wrong | 08:35 |
franred | for gerrit I've removed sh directly and create a link to bash ln -sfn bash /bin/sh and works | 08:36 |
straycat | yes that's what I tried, but then that won't work for -c 'script' because you lose the quoting | 08:36 |
straycat | but I have a work around in mind | 08:37 |
Kinnison | franred: you mean gerrit is full of #!/bin/sh which assumes sh is bash? | 08:38 |
Kinnison | straycat: "$@" should work perfectly | 08:38 |
franred | Kinnison, let me check, I will tell you later | 08:38 |
pedroalvarez | I accidetally joined the #!/bin/sh channel doing a random click in this conversation | 08:39 |
Kinnison | click? Oh dear | 08:39 |
*** violeta [~violeta@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock | 08:40 | |
petefoth | How do you click using a CLI? | 08:40 |
straycat | Kinnison, Perhaps I misunderstand "$@" then, I thought it was a space separated list of the paramters' words | 08:40 |
straycat | petefoth, with gpm | 08:40 |
Kinnison | @ Expands to the positional parameters, starting from one. When the expansion occurs within double-quotes, each positional parameter expands as a | 08:41 |
Kinnison | separate argument. If there are no positional parameters, the expansion of @ generates zero arguments, even when @ is double-quoted. What this | 08:41 |
*** ssam2 [~ssam2@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock | 08: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 |
straycat | so foo -c "which ls" would expand to "-c" "which" "ls" ... which won't work | 08:42 |
petefoth | straycat: ta! Now to find an equivalent for iTerm on Mac OS X | 08:42 |
ssam2 | straycat: surely that'd expand to "-c" "which ls" ? | 08:43 |
Kinnison | straycat: I'm very confused as to what you're on about, ssam2's expansion is correct | 08:43 |
richard_maw | I think he's putting the -c in the #! line | 09:06 |
richard_maw | which doesn't work because Linux's #! parser is rather primitive | 09:06 |
Kinnison | Buh | 09:06 |
Kinnison | Why would you do that? | 09:06 |
richard_maw | there's a bunch of clever hacks I'd be doing with that if it were possible | 09:07 |
ssam2 | are there Debian users who have Ruby installed here ? | 09:08 |
Kinnison | depressingly I do have it on my system | 09:09 |
ssam2 | if 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.1 | 09:09 |
Kinnison | - /home/danielsilverstone/.gem/ruby/1.9.1 | 09:09 |
Kinnison | - /usr/share/rubygems-integration/1.9.1 | 09:09 |
richard_maw | I used to until I rebuilt my vim so I didn't have to link against it | 09:09 |
ssam2 | just noticed that in Baserock we put Gems in /usr/lib/ruby/$VERSION/gems | 09:09 |
ssam2 | but on Fedora they're in /usr/share/gems | 09:09 |
ssam2 | and it seems on Debian they're in /var/lib/gems/$VERSION | 09:09 |
richard_maw | or /usr/share/rubygems-integration/$VERSION | 09:10 |
ssam2 | I think that's a Kinnison-addition :) | 09:10 |
Kinnison | nup | 09:10 |
ssam2 | ah, OK | 09:10 |
ssam2 | anyone 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 uses | 09:10 |
ssam2 | I'm thinking /usr/lib/ruby/gems as the default GEM PATH | 09:11 |
Kinnison | I thought some of our QT systems explicitly had ruby1.8 *and* ruby1.9 | 09:11 |
ssam2 | oh :( | 09:11 |
Kinnison | because of awkward build-deps | 09:11 |
ssam2 | maybe the ugliness must remain, then | 09:11 |
ssam2 | oh well, at least that's less work for me now :) | 09:12 |
ssam2 | even 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 system | 09:12 |
ssam2 | hmm, actually there's probably a clever way to do this in the configure-commands | 09:12 |
ssam2 | yeah, `gem environment home` is way forward. As Kinnison's original notes from June do tell me :) | 09:14 |
ssam2 | +the way forward | 09:14 |
Kinnison | Ruhroh | 09:18 |
straycat | richard_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 #baserock | 09:43 | |
Kinnison | Anyone know how hard/easy it is to set up a one-node distbuild controller+worker+initiator for doing development of distbuild? | 10:43 |
SotK | on your laptop or some vmhost? | 10:45 |
SotK | or on a devboard of some kind? | 10:45 |
radiofree | Kinnison: pretty easy | 10:45 |
radiofree | i used to use a jetson for that | 10:45 |
radiofree | this http://wiki.baserock.org/guides/jetson_distbuild_cluster/ essential documents flashing a board with a devel image | 10:46 |
SotK | its easy to do it in on a VM host, I have never done it on a devboard though | 10:46 |
radiofree | building the distbuild image, and then deploying it | 10:46 |
radiofree | of course the deployment would only need build-controller, with itself as a worker | 10:47 |
Kinnison | Cool | 10:47 |
* Kinnison is pondering if he can improve the feedback for long builds | 10:47 | |
Kinnison | Perhaps I'll wait for richard_maw's rework branch to land first though | 10:48 |
radiofree | the flashing step in that still uses the old method however | 10:49 |
Kinnison | I'm likely to do it as an x86_64 container on my laptop for ease of portability | 10:49 |
radiofree | if 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 |
Kinnison | I don't know what state our self-upgrade stuff is in, but in theory -- yes | 10:51 |
franred | could someone spot something about why chown can not work in this morphology? http://fpaste.org/132723/32848141/ | 10:54 |
franred | everything works but the owner of the gerrit folder is root so I gerrit2 does not have permissions to run its initialization script :/ | 10:55 |
Kinnison | busybox's chown doesn't do foo:bar IIRC | 10:55 |
Kinnison | do a chown and chgrp separately | 10:55 |
ssam2 | Usage: chown [-RhLHPcvf]... OWNER[<.|:>[GROUP]] FILE... | 10:55 |
franred | Kinnison, I did manually | 10:55 |
ssam2 | seems like it does | 10:55 |
Kinnison | hmm | 10:55 |
Kinnison | Put that set of behaviour into a script you install and then in the integration commands do sudo -u gerrit2 /path/to/script | 10:56 |
Kinnison | then you're not fiddling partly as root | 10:56 |
franred | Kinnison, that is what Im trying to avoid - I mean, create the script | 10:57 |
radiofree | franred: does the owner where's the config script /home/gerrit2/gerrit/.gerrit_controller? | 10:57 |
radiofree | does the gerrit2 command create the gerrit/.gerrit_controller folder? | 10:58 |
franred | radiofree, yes it does | 10:58 |
Kinnison | franred: why are you trying to avoid having it done more neatly? | 10:59 |
radiofree | it's creating it as root then? | 10:59 |
franred | radiofree, yes, it is creating it as root, not sure why | 11:00 |
radiofree | sudo -u gerrit2 java -jar /home/gerrit2/gerrit/gerrit-2.9.war init --batch .... -d /home/gerrit2/gerrit/.gerrit_controller --no-auto-start | 11:00 |
franred | ummm, yeah | 11:00 |
* pedroalvarez manages to deploy a generic trove to OpenStack and instantiate it with a simple cloud-init script | 11:01 | |
franred | radiofree, but that does not explain why gerrit folder is owned by root I though | 11:01 |
radiofree | Yeah.. And you're using -u... | 11:01 |
radiofree | No idea sorry | 11:02 |
pedroalvarez | franred: sudo -u gerrit2 mkdir /home/gerrit2/gerrit | 11:02 |
franred | Kinnison, I was told to not use one shot services and use system-integration commands | 11:08 |
franred | so create a script and run it in system-integration only will move what I've done to this part | 11:09 |
franred | so it is unlike | 11: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 #baserock | 11:40 | |
paulsherwood | we had a report from an ubuntu user (!) that baserock-jetson-flash.sh almost worked for him :) | 12:56 |
richard_maw | it did work for him, just with some garbage error messages | 12:56 |
richard_maw | because the script was expecting /bin/sh -> /bin/bash | 12:57 |
paulsherwood | can/should we fix the script? | 12:57 |
richard_maw | yes/yes | 12:57 |
Kinnison | I was intending to do so when I finished the Jetson/GENIVI merge work | 12:57 |
Kinnison | As I said yesterday, but perhaps not here | 12:57 |
paulsherwood | great | 12:57 |
paulsherwood | sorry if i missed it - i was swapping timezones | 12:58 |
Kinnison | :-) | 12:58 |
Kinnison | 21:23 < Kinnison> I am working on getting that integrated into master | 12:58 |
Kinnison | 21:23 < Kinnison> but not right now | 12:58 |
Kinnison | I imagine you had got onto your plane by then | 12:59 |
paulsherwood | my brain had, at least | 13: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 #baserock | 13:18 | |
ssam2 | petefoth: 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-test | 14:17 |
petefoth | ssam2: 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 #baserock | 15:03 | |
franred | richard_maw, when system-integration scripts run, do we expect that /proc should be mounted? can we mount it? | 15:05 |
richard_maw | bah, `morph branch-from-image` was broken by adding /baserock/deployment.meta | 15:05 |
richard_maw | franred: you shouldn't mount it in your system integration scripts | 15:06 |
* franred has discovered that java needs /proc mounted | 15:06 | |
richard_maw | eww | 15:06 |
franred | eww, twice | 15:06 |
richard_maw | /proc should already be mounted | 15:08 |
richard_maw | I'm looking at the code that does it | 15:08 |
pedroalvarez | indeed, it should be mounted | 15:09 |
* franred looks once again to its system to check what is happening | 15:10 | |
*** dabukalam [~danny@82-70-136-246.dsl.in-addr.zen.co.uk] has joined #baserock | 15:20 | |
* pedroalvarez spams baserock-dev | 15:20 | |
franred | confirmed, we have /proc mounted | 15:21 |
* rjek trains the spam filter to smite pedroalvarez | 15:21 | |
* franred he looks to java in anger | 15:21 | |
De|ta | Is there any other way to look at java? :) | 15:24 |
richard_maw | Contempt, 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 | |
straycat | echo "'$(echo "$1" | sed -e "s/'/'\\''/g")'" | 16:35 |
straycat | I don't really see what the escapes are for in the replacement | 16:37 |
franred | straycat, 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 #baserock | 16:45 | |
straycat | Sure, why? | 16:45 |
Kinnison | so it gets through | 16:45 |
straycat | Why do we need to escape the ' | 16:46 |
Kinnison | straycat: given you asked the question with zero context, I can't possibly comment | 16:47 |
richard_maw | it turns a string, such as "foo'bar" into 'foo'\''bar' | 16:47 |
straycat | Isn't it trying to turn "foo'bar" into "'foo'\''bar'" | 16:49 |
richard_maw | though I think it needs to use `printf '%s\n' "$1"` instead of `echo "$1"`, since echo will interpret escape sequences | 16:49 |
straycat | Ahh | 16:50 |
richard_maw | it'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 string | 16:56 |
richard_maw | especially if you have multiple levels of escaping involved | 16:56 |
straycat | What's confusing me is that when I run this I get "'foo'''bar'" | 16:57 |
richard_maw | where are you running it? | 16:58 |
straycat | In a bash shell | 16:58 |
richard_maw | hm, it needs to be \\\\, rather than \\ then | 16:59 |
richard_maw | because both the shell and sed are consuming them | 17:00 |
straycat | benbrown1 suggested \\\ which seems to work | 17: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 | |
straycat | Okay 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 #baserock | 17: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 #baserock | 18: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 #baserock | 20: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 #baserock | 22: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 #baserock | 22:48 | |
*** persia [quassel@2400:8900::f03c:91ff:feae:3452] has quit [Changing host] | 22:48 | |
*** persia [quassel@ubuntu/member/persia] has joined #baserock | 22:48 | |
*** persia_ [quassel@ubuntu/member/persia] has joined #baserock | 22: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.15.3 by Marius Gedminas - find it at mg.pov.lt!