2

I have a custom package I want to publish via launchpad. In order to build it, I need the USENETWORK option to be enabled (this way build-tools have network access, which is required in my case). On my local machine, I can enable this by adding it to the pbuilderrc file.

But how can this be done for the builds pushed to launchpad? I couldn't find anything related to that on their website.

Felix
  • 6,885
  • 1
  • 29
  • 54

1 Answers1

0

Looking around, I found that it is possible to set the following option to the debuild step. Remember that it is possible to add options to debuild through the pbuilder variable --debbuildopts='--set-env="whatever=0"'.

--preserve-env

Do not clean the environment, except for PATH.

--preserve-envvar=var, -evar

Do not clean the var variable from the environment. If var ends in an asterisk ("*") then all variables with names that match the portion of var before the asterisk will be preserved.

--set-envvar=var=value, -evar=value

Set the environment variable var to value and do not remove it from the environment.

This is taken from the debuild manual.

Community
  • 1
  • 1
Garini
  • 1,088
  • 16
  • 29
  • And how can this help? USENETWORK is not an environment variable, but a configuration – Felix May 04 '18 at 16:12
  • Then I do not understand what you want. An example of how you set this configuration on your machine would help. – Garini May 07 '18 at 16:36
  • I set it in the pbuilderrc file (See http://manpages.ubuntu.com/manpages/xenial/man5/pbuilderrc.5.html). For my case it's the user variant, i.e. `~/.pbuilderrc` - but it behaves the same as the global one from the link. – Felix May 07 '18 at 16:38
  • did you try using `--set-env="USENETWORK=yes"'` ? – Garini May 09 '18 at 14:50