zypper behind bars ... well behind proxies
Sometimes, things just go the Murphy’s law way
Consulting often means you can’t do whatever you like in terms of infrasturcture. Here I’m going to talk about my current assignment, the continuous integration platform we need to use, and how upgrading it turned out to be a bit of a puzzle =)
At first, there was joy. We were ditching our old SVN for Git. The first steps were easy, create a repo in the private GitLab, convert the svn repo to a git repo, push it all into gitlab … things were great.
Then, we needed to update our jenkins slave so that it could use git, and things started to get a bit messy :-/
Our predicament pretty much unfolded this way :
- Project Manager : “Good news guys! We’re migrating our VCS to Git!”
- Infrastructure guys : “Well, you need to update your environments on your own. No worries, just explicitly set the proxy through environment variables and you should be good to go”
- Us : “What the heck ?! I’ve set my proxy settings up. How come zypper does not pick it up?”
- … an hour or two of fiddling and asking for help
- “Oh, ok, I get it …”
- The CI we used is provided by our client.
- It sports a whopping SUSE (SLES 11 … but at least it runs a kernel 3.x which is handy to be able to run a decent Git version ;)
- Internet access is provided through an unconfigured proxy
So? What’s the big deal? You configure your environment variables for the proxy and there you go. Right?
Well … not really. It seems that zypper does not give a damn about the
env variables /o\.
You need to “write down” the configuration into 2 separate files :
for the proxy settings, which pretty much means to define the
. If the file has not been edited yet, chances are the lines defining those variables just need uncommenting and editing. At that point, it seems you only need to set them to the URL of the proxy you’re going to go through, credentials setup being done in another file.
for your credentials: You need to specify this in the file
(note that I talk about your
file, but that is because I edited it and ran zypper as
, it might be different if you’re sudo-ing.
Worst part of this is we’ve gone through all this for practically nothing as our SUSE was so old and peculiar we ended up installing special packages directly via RPM. But at least it allowed us to understand a little bit how zypper works (and now we can install packages with that machine ;)