Jira (PUP-1526) Package type should support environment variables

11 views
Skip to first unread message

Corey Osman (JIRA)

unread,
Sep 2, 2015, 8:56:02 PM9/2/15
to puppe...@googlegroups.com
Corey Osman commented on New Feature PUP-1526
 
Re: Package type should support environment variables

Add me to the list as well. I was trying to undo the mess symantec has done with their packaging system and it appears that it requires a response file in order to install the package which can only be supplied via a environment variable, despite that it just copies the response file to /etc dir! I know I can always use an exec but it would be nice to throw and environment variable to override some of the behavior and use the native package type.

I know rpms are not supposed to be like this but they managed to make a single installer for all unix systems with configuration built in.

# get RESPONSE settings (from request script)
if [ "$RESPONSE_FILE" = "" ]; then
  # Try to guess location (i.e. on Solaris SIS_TMPDIR is already in the env)
  [ "$SIS_TMPDIR" ] && RESPONSE_FILE=$SIS_TMPDIR/SYMCcsp.response || \
    RESPONSE_FILE=SYMCcsp.response
fi

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
Atlassian logo

Poil (JIRA)

unread,
Feb 10, 2016, 5:41:02 AM2/10/16
to puppe...@googlegroups.com
Poil commented on New Feature PUP-1526

The exec resource supports "environment =>" why don't add this one on package resource ?

This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Johan Lyheden (JIRA)

unread,
Feb 11, 2016, 5:57:02 AM2/11/16
to puppe...@googlegroups.com
Johan Lyheden commented on New Feature PUP-1526

+1
We have a poorly packaged 3rd party RPM that does conditional logic based on variables set in the environment. It would be great if we could set these in the package type instead of resorting to hacky exec.

Johnson Earls (JIRA)

unread,
Apr 7, 2016, 10:26:03 PM4/7/16
to puppe...@googlegroups.com
Johnson Earls commented on New Feature PUP-1526

Here's a more general use case: Installing packages with the yum provider through a web proxy. There is no command line interface to yum to set the web proxy, it has to be done through the global /etc/yum.conf configuration file or through the environment variable http_proxy. Since modifying the /etc/yum.conf is not practical, especially if you only need the web proxy enabled for certain installation packages or if you need different web proxies for different circumstances, the only real solution to using a proxy with the yum provider would be to have a way to set the http_proxy environment variable.

This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Kylo Ginsberg (JIRA)

unread,
Apr 8, 2016, 2:03:09 PM4/8/16
to puppe...@googlegroups.com
Kylo Ginsberg updated an issue
 
Puppet / New Feature PUP-1526
Change By: Kylo Ginsberg
## h3.  Overview  ##

With the release of Debian Squeeze, a customer mentioned some Debian packages are beginning to use environment variables to override behavior.  For example, the sudo-ldap package will not install if there is no password set on the root account.

    # This is needed for removing the sudo package since it won't uninstall
    # when there is no root password set or $SUDO_FORCE_REMOVE != yes
    exec { '/usr/bin/apt-get --force-yes --assume-yes install sudo-ldap':
        environment => 'SUDO_FORCE_REMOVE=yes',
        unless      => '/usr/bin/dpkg -l sudo-ldap|tail -1|grep "^ii"'
    }

## h3.  Expected Behavior  ##

Like the exec resource type, the package type should support an environment parameter to set arbitrary environment variables when installing packages.

## h3.  Other notes  ##

The customer believes this will only become more prevalent in the future with Debian based systems.  While they have not specifically paid for the feature, a paying customer has requested we file and address this feature request.

I'll be taking a look into it while I'm on their time today.

Kylo Ginsberg (JIRA)

unread,
Apr 8, 2016, 2:04:14 PM4/8/16
to puppe...@googlegroups.com
Kylo Ginsberg updated an issue
h3. Overview


With the release of Debian Squeeze, a customer mentioned some Debian packages are beginning to use environment variables to override behavior.  For example, the sudo-ldap package will not install if there is no password set on the root account.

{code}
    # This is needed for removing the sudo package since it won't uninstall
    # when there is no root password set or $SUDO_FORCE_REMOVE != yes
    exec { '/usr/bin/apt-get --force-yes --assume-yes install sudo-ldap':
        environment => 'SUDO_FORCE_REMOVE=yes',
        unless      => '/usr/bin/dpkg -l sudo-ldap|tail -1|grep "^ii"'
    }
{code}

h3. Expected Behavior


Like the exec resource type, the package type should support an environment parameter to set arbitrary environment variables when installing packages.

h3. Other notes


The customer believes this will only become more prevalent in the future with Debian based systems.  While they have not specifically paid for the feature, a paying customer has requested we file and address this feature request.

I'll be taking a look into it while I'm on their time today.

Kylo Ginsberg (JIRA)

unread,
Apr 8, 2016, 2:09:42 PM4/8/16
to puppe...@googlegroups.com
Kylo Ginsberg commented on New Feature PUP-1526
 
Re: Package type should support environment variables

For the http_proxy case, I'm aware of two providers (pip and pkgdmg) that added support for using puppet's http_proxy_* settings (as found here https://docs.puppet.com/puppet/latest/reference/configuration.html#httpproxyhost). I wonder if adding that support to yum would be preferable to the approach here (although this enhancement is still interesting). It seems like that might allow a little DRY'ing out of references to the http proxy configuration for a system.

Thoughts?

Johnson Earls (JIRA)

unread,
Apr 8, 2016, 4:07:05 PM4/8/16
to puppe...@googlegroups.com
Johnson Earls commented on New Feature PUP-1526

Using the puppet http_proxy_* settings for a package provider seems to be tying together two completely unrelated use cases:

  1. I might need my puppet agent to talk to the puppet master through a proxy, but not need a proxy to talk to my package repository
  2. I might need an http proxy to talk to my package repository, but not for the agent to talk to the master
  3. I might need different http proxies to talk to different package repositories. obviously, the agent will always be talking to the same master, and so always use the same http proxy.

– Johnson

Kylo Ginsberg (JIRA)

unread,
Apr 8, 2016, 5:27:07 PM4/8/16
to puppe...@googlegroups.com
Kylo Ginsberg commented on New Feature PUP-1526

Yeah, those are good use cases. And actually after I wrote that I remembered that someone put up a PR that removes the http_proxy support for pip in favor of preferring however pip is configured on the system in question: https://github.com/puppetlabs/puppet/pull/4832, which is a step in the "each use defines its own proxies" direction you're proposing. So, back to this ticket.

Seems like a nice enhancement idea.

Johnson Earls (JIRA)

unread,
Apr 9, 2016, 9:23:03 AM4/9/16
to puppe...@googlegroups.com
Johnson Earls commented on New Feature PUP-1526

First cut at a minimal implementation of an :environment parameter and associated :settable_environment feature on the yum provider is at PR#4861.

– Johnson

Johnson Earls (JIRA)

unread,
Apr 9, 2016, 9:27:03 AM4/9/16
to puppe...@googlegroups.com
Johnson Earls updated an issue
 
Change By: Johnson Earls
Comment: First cut at a minimal implementation of an {{:environment}} parameter and associated {{:settable_environment}} feature on the {{yum}} provider is at [PR#4861|https://github.com/puppetlabs/puppet/pull/4861].

-- Johnson

Johnson Earls (JIRA)

unread,
Apr 9, 2016, 9:35:02 AM4/9/16
to puppe...@googlegroups.com
Johnson Earls commented on New Feature PUP-1526
 
Re: Package type should support environment variables

First cut at a minimal implementation of an :environment parameter and associated :settable_environment feature on the yum provider is at PR#4862 (this time with working spec tests).

– Johnson

Branan Riley (JIRA)

unread,
May 3, 2016, 2:05:03 PM5/3/16
to puppe...@googlegroups.com
Branan Riley updated an issue
 
Change By: Branan Riley
Sprint: Client 2016-05-18 (Freeze)

Steve Barlow (JIRA)

unread,
May 4, 2016, 6:42:04 PM5/4/16
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Sprint: Client  2016-05-18 (Freeze)  Triage

David Kramer (JIRA)

unread,
Aug 17, 2016, 12:25:04 PM8/17/16
to puppe...@googlegroups.com
David Kramer commented on New Feature PUP-1526
 
Re: Package type should support environment variables

The PR from PUP-6428 could be a good starting point for implementing this.

David Kramer (JIRA)

unread,
Aug 17, 2016, 12:25:04 PM8/17/16
to puppe...@googlegroups.com

David Kramer (JIRA)

unread,
Aug 17, 2016, 12:26:16 PM8/17/16
to puppe...@googlegroups.com
David Kramer updated an issue
Change By: David Kramer
Sprint: Client  Triage  2016-09-21

Kenn Hussey (JIRA)

unread,
Sep 29, 2016, 2:59:12 PM9/29/16
to puppe...@googlegroups.com
Kenn Hussey updated an issue
Change By: Kenn Hussey
Sprint: Client 2016-09-21
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Eric Thompson (JIRA)

unread,
Oct 7, 2016, 3:33:03 PM10/7/16
to puppe...@googlegroups.com
Eric Thompson updated an issue
Change By: Eric Thompson
Team: Agent & Platform

Matthias Baur (JIRA)

unread,
Dec 16, 2016, 7:02:02 AM12/16/16
to puppe...@googlegroups.com
Matthias Baur commented on New Feature PUP-1526
 
Re: Package type should support environment variables

We desperately need this to install Elasticsearch 5.x within our plattform. We need to set the ES_SKIP_SET_KERNEL_PARAMETERS='false'. Is there any update on this?

Eric Sorenson (JIRA)

unread,
Dec 16, 2016, 7:05:04 PM12/16/16
to puppe...@googlegroups.com
Eric Sorenson updated an issue
 
Change By: Eric Sorenson
Labels: puppethack redmine

Eric Sorenson (JIRA)

unread,
Dec 16, 2016, 7:05:04 PM12/16/16
to puppe...@googlegroups.com
Eric Sorenson updated an issue
Change By: Eric Sorenson
Fix Version/s: PUP 5.0.0

Eric Sorenson (JIRA)

unread,
Dec 16, 2016, 7:07:03 PM12/16/16
to puppe...@googlegroups.com
Eric Sorenson updated an issue
Change By: Eric Sorenson
Fix Version/s: PUP 5.0.0
Fix Version/s: PUP 4.9.0

Eric Sorenson (JIRA)

unread,
Dec 16, 2016, 7:08:04 PM12/16/16
to puppe...@googlegroups.com
Eric Sorenson updated an issue
Change By: Eric Sorenson
Issue Type: New Feature Improvement

Eric Sorenson (JIRA)

unread,
Dec 16, 2016, 7:11:03 PM12/16/16
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Dec 20, 2016, 8:10:12 PM12/20/16
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: AP  Grooming  Holding

Geoff Nichols (JIRA)

unread,
Dec 20, 2016, 8:12:03 PM12/20/16
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: AP  Holding  Grooming

Geoff Nichols (JIRA)

unread,
Dec 21, 2016, 2:00:07 PM12/21/16
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Fix Version/s: PUP 4.9.0
Fix Version/s: PUP 5.0.0

Geoff Nichols (JIRA)

unread,
Dec 21, 2016, 2:03:45 PM12/21/16
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Acceptance Criteria: Package provider can use environment variables to override behavior.

Geoff Nichols (JIRA)

unread,
Dec 21, 2016, 2:04:32 PM12/21/16
to puppe...@googlegroups.com
Geoff Nichols assigned an issue to Unassigned
Change By: Geoff Nichols
Assignee: Eric Sorenson

Geoff Nichols (JIRA)

unread,
Dec 21, 2016, 2:04:42 PM12/21/16
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Acceptance Criteria: Package  provider  type  can use  an '  environment  variables ' parameter  to override behavior.

Geoff Nichols (JIRA)

unread,
Dec 21, 2016, 2:19:24 PM12/21/16
to puppe...@googlegroups.com

Aimon Bustardo (JIRA)

unread,
Jan 28, 2017, 6:42:03 PM1/28/17
to puppe...@googlegroups.com
Aimon Bustardo commented on Improvement PUP-1526
 
Re: Package type should support environment variables

I would really like to see this done in 4.x. This really can't be that much coding to implement.

Henrik Lindberg (JIRA)

unread,
Jan 28, 2017, 7:12:02 PM1/28/17
to puppe...@googlegroups.com

Aimon Bustardo The probably last version in the 4.x series is just about to be released (Puppet 4.9.0). Feature freeze was a couple of weeks ago. Since noone had time to devote to this ticket it is now marked for Puppet 5.0.0.

Sorry, I understand that is not what you would like to hear.

If you look at the Pull Request for this, there has been considerable work and dialog on the work to get this in. A community member has been working on this for some time now, and it looks like this is nearly done (but there seems to be things outstanding on that PR. If you have the opportunity I am sure the author of that PR could do with some help with testing

Geoff Nichols (JIRA)

unread,
Mar 14, 2017, 11:56:03 PM3/14/17
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Mar 14, 2017, 11:57:03 PM3/14/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Agent  Grooming  5 Ready for Engineering

Geoff Nichols (JIRA)

unread,
May 10, 2017, 1:48:08 PM5/10/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Fix Version/s: PUP 5.0.0
Fix Version/s: PUP 5.y

Geoff Nichols (JIRA)

unread,
May 10, 2017, 1:48:10 PM5/10/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Agent  Ready for Engineering  N+1

John Duarte (JIRA)

unread,
May 15, 2017, 4:44:04 PM5/15/17
to puppe...@googlegroups.com
John Duarte updated an issue
Change By: John Duarte
Labels: puppethack redmine  triaged

Moses Mendoza (JIRA)

unread,
May 18, 2017, 2:00:44 PM5/18/17
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
Labels: puppethack redmine  triaged

Josh Cooper (JIRA)

unread,
Jul 18, 2017, 11:27:04 AM7/18/17
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 5.y
Fix Version/s: PUP 5.1.0

Geoff Nichols (JIRA)

unread,
Jul 25, 2017, 11:12:06 AM7/25/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Fix Version/s: PUP 5.1.0
Fix Version/s: PUP 5.y

Maggie Dreyer (JIRA)

unread,
Aug 1, 2017, 6:46:05 PM8/1/17
to puppe...@googlegroups.com
Maggie Dreyer updated an issue
Change By: Maggie Dreyer
Team: Platform  Core  OS

Maggie Dreyer (JIRA)

unread,
Aug 1, 2017, 6:46:05 PM8/1/17
to puppe...@googlegroups.com
Maggie Dreyer updated an issue
Change By: Maggie Dreyer
Sprint: Platform Core 2017-09-05

Maggie Dreyer (JIRA)

unread,
Aug 1, 2017, 6:46:07 PM8/1/17
to puppe...@googlegroups.com
Maggie Dreyer updated an issue
Change By: Maggie Dreyer
Sprint: Platform Core Grooming

Maggie Dreyer (JIRA)

unread,
Aug 1, 2017, 6:47:04 PM8/1/17
to puppe...@googlegroups.com
Maggie Dreyer updated an issue
Change By: Maggie Dreyer
Sprint: Platform  Core  OS  Grooming

Geoff Nichols (JIRA)

unread,
Aug 29, 2017, 11:53:03 AM8/29/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Platform OS  Grooming  Community

Owen Rodabaugh (JIRA)

unread,
Dec 28, 2017, 7:44:04 PM12/28/17
to puppe...@googlegroups.com
Owen Rodabaugh updated an issue
Change By: Owen Rodabaugh
CS Priority: Reviewed
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Geoff Nichols (JIRA)

unread,
May 1, 2018, 10:42:08 PM5/1/18
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Platform OS Community PR
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Branan Riley (JIRA)

unread,
May 9, 2018, 2:49:05 PM5/9/18
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Labels: linux package puppethack redmine triaged type_and_provider

Chris Tessmer (JIRA)

unread,
Mar 14, 2019, 2:55:06 PM3/14/19
to puppe...@googlegroups.com
Chris Tessmer commented on Improvement PUP-1526
 
Re: Package type should support environment variables

The fix in PR #4928 (for Puppet 4.x) seemed close to getting accepted at one point, but it was eventually closed on 24 Oct 2017 due to a lack of activity and bandwidth/time constraints.

Jason Perrin (JIRA)

unread,
Jul 13, 2019, 4:32:03 AM7/13/19
to puppe...@googlegroups.com
Jason Perrin commented on Improvement PUP-1526

This would be really useful to be able to set DEBCONF_ADMIN_EMAIL="" for instance when installing a package to prevent it emailing when setting up config.

Austin Boyd (Jira)

unread,
Sep 21, 2020, 12:39:03 PM9/21/20
to puppe...@googlegroups.com
Austin Boyd updated an issue
 
Change By: Austin Boyd
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 28299
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Austin Boyd (Jira)

unread,
Sep 21, 2020, 12:39:04 PM9/21/20
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 1 2
Zendesk Ticket IDs: 28299 ,36769

Hugh Brown (Jira)

unread,
Jun 7, 2022, 2:32:16 PM6/7/22
to puppe...@googlegroups.com
Hugh Brown commented on Improvement PUP-1526
 
Re: Package type should support environment variables

We ran into a case where we need to use the pip provider to install `pycuda` and needed to set PATH, CUDA_BIN_PATH and NVSDKCOMPUTE_ROOT environment variables for a proper installation.

This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Roy Ledochowski (Jira)

unread,
Jun 23, 2022, 3:10:01 AM6/23/22
to puppe...@googlegroups.com

We too could very much use this.  I just ran into a bug in pip3.6 when installing ansible. The workaround is to set LC_ALL and obviously there is no way currently to set an env var in the package resource.

James Paton-Smith (Jira)

unread,
Apr 14, 2023, 7:32:02 AM4/14/23
to puppe...@googlegroups.com

Another +1 from me. I've just encountered a package which requires the use of environment variables to install properly.

This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Apr 17, 2023, 3:28:01 PM4/17/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Team: Night's Watch Phoenix
Reply all
Reply to author
Forward
0 new messages