1. 18 May, 2022 7 commits
  2. 13 May, 2022 1 commit
  3. 12 May, 2022 2 commits
  4. 11 May, 2022 2 commits
  5. 06 May, 2022 10 commits
  6. 20 Apr, 2021 1 commit
    • Dduvall's avatar
      user: Check for existing user/group before creating · 459234d2
      Dduvall authored
      To support scenarios where the `runs.as` or `lives.as` user/group
      already exists in the base image, pair the calls to `useradd` and
      `groupadd` with `getent` conditionals.
      
      Bug: T268819
      Change-Id: I3aef722ac57b38695c7411e64b41589fad16e95b
      459234d2
  7. 18 Mar, 2021 1 commit
  8. 12 Mar, 2021 1 commit
    • Dduvall's avatar
      apt: Support configuration of http/https proxies · 7bb48691
      Dduvall authored
      Defines a new `apt.proxies` field that allows users to specify
      http/https proxy URLs that apply to one or all APT sources. APT
      configuration for the proxies will be written prior to package
      installation and then removed.
      
      Both a shorthand and longhand configuration are supported.
      
      Example:
      
          apt:
            packages: [foo]
            proxies: [http://proxy.example:8080]
      
      Is a shorthand equivalent of:
      
          apt:
            packages: [foo]
            proxies:
              - url: http://proxy.example:8080
      
      In which case, the following APT config is written before installing
      packages, proxying all http sources via `http://proxy.example:8080`.
      
          Acquire::http::Proxy "http://proxy.example:8080";
      
      Example:
      
          apt:
            packages: [foo]
            proxies:
              - url: https://proxy.example:8081
                source: https://security.debian.org
      
      In which case, the following APT config is written before installing
      packages, proxying only https requests to security.debian.org via
      `https://pr...
      7bb48691
  9. 23 Feb, 2021 1 commit
    • Dduvall's avatar
      copies: Allow copying directly from other images · db3a5397
      Dduvall authored
      To support image compositions that rely on copying files from one or
      more external images, allow `ArtifactsConfig.From` to be any valid image
      reference.
      
      Generalize `baseimage` validator as `imageref` and create a new
      `artifactfrom` validator alias for `imageref|variantref`. Use the new
      validator for `From`.
      
      Additionally, omits non-variant `From` references from the dependency
      graph.
      
      Change-Id: I3b92d815b62856fe5a8df836b37cce0043a74ffa
      db3a5397
  10. 12 Feb, 2021 1 commit
    • BryanDavis's avatar
      python: upgrade pip before installing requirements · 007009ea
      BryanDavis authored
      A `python` config block already triggered installing pip via
      easy_install which is pretty specific to python2 era usage. It then used
      pip to install/update pypi packages for setuptools, wheel, and tox. This
      change adds the pip package to that set of pypi install/update packages.
      This is useful to ensure that the resulting image is capable of
      installing manylinux2014 formatted wheels (pip >= 19.3). Debian Buster's
      python3-pip package is pip 18.1 which is too old to look for
      manylinux2014 wheels when installing packages such as cryptography which
      have stopped publishing wheels with the older manylinux1 and
      manylinux2010 platform tags.
      
      Existing pinning of pip to a version less than 21.0 is preserved for
      those poor, unloved python2 projects that linger in an ever colder and
      darker world hostile to their kind.
      
      Bug: T274435
      Change-Id: I81f0af69dbd4f9202bc9736faf653813c81fc0ad
      007009ea
  11. 04 Feb, 2021 1 commit
    • Dduvall's avatar
      python: Pin pip package to <21 for Python 2 · d91393a4
      Dduvall authored
      Pip 21 has dropped support for Python 2 but is still strangely
      selected for installation when running setuptools with a python2 binary.
      Let's pin pip when a `version` is specified that starts with "python2".
      
      Note this will require python 2 users to explicitly specify `version:
      python2` even if their default `python` binary in the base image is for
      python 2.
      
      Bug: T273793
      Change-Id: Id7d4315e345657ce7ac2efdd0b065d693e47b2f5
      d91393a4
  12. 03 Feb, 2021 1 commit
  13. 02 Feb, 2021 2 commits
  14. 01 Feb, 2021 1 commit
    • Jeena Huneidi's avatar
      apt.go: Add ability to target releases · eb038f2c
      Jeena Huneidi authored
      In order to allow packages from backports to be downloaded, the ability
      to target a release when running apt-get install is required.
      
      apt.packages now takes the previously defined list of string or a map
      of targets and packages to install. When using a map, in order to
      install the packages for the base image, the 'default' key should be
      used:
      
      packages:
        default: ["libfoo", "libbar"]
        buster-backports: ["libbaaz"]
      
      Bug: T272759
      Change-Id: I435c47794ffbc0264e0a440bfbd23e11570645d1
      eb038f2c
  15. 26 Jan, 2021 1 commit
  16. 15 Jan, 2021 1 commit
  17. 18 Dec, 2020 1 commit
    • Dduvall's avatar
      Refactor other builder types to use RequirementsConfig · 18c9968e
      Dduvall authored
      Copying of required files is now a generic operation implemented by
      `config.RequirementsConfig`. Other builder types should re-use this
      implementation.
      
      To support this change, some `RequirementsConfig` implementation around
      source and destination paths was moved to functions of
      `ArtifactsConfig`.
      
      Build macro functions `SortFilesByDir` and `SyncFiles` are no longer
      needed and were removed.
      
      Change-Id: Ieb0cd2a0b1e4f11b05d19c63bea9bdf9d578e3ea
      Follows-up: If813829bdace6851bdba56abcdfcab1cd967df03
      18c9968e
  18. 16 Dec, 2020 1 commit
  19. 15 Dec, 2020 1 commit
  20. 14 Dec, 2020 1 commit
    • BryanDavis's avatar
      requirements: Fix regression in short form handling · f063588e
      BryanDavis authored
      Flip the order of `path.Clean()` and `path.Dir()` in the NewFromShort()
      constructor. The prior order was stripping directory indicators from the
      source path prematurely.
      
      Bug: T263597
      Change-Id: I0d76b4632660a8c32fb1c8a7a90b287546271348
      f063588e
  21. 11 Dec, 2020 1 commit
    • Dduvall's avatar
      Make artifact destination optional · 058c2d54
      Dduvall authored
      Destination is now an optional field, defaulting to the source path
      when omitted.
      
      This makes for less redundancy when defining cross-variant builder
      requirements and copies in cases where the application directories
      are the same between variants.
      
      Change-Id: I44cc3fdff260670b07b6cb3d82d4d7a49ff221f7
      058c2d54
  22. 10 Dec, 2020 1 commit
    • BryanDavis's avatar
      builder: support cross variant copying for builder.requirements · a9a61206
      BryanDavis authored
      Allow `builder.requirements` to use a long form similar to `copies` when
      the user needs to copy files from one variant to another as part of the
      builder stage. This allows multi-stage builds to generate some artifact
      in stage "A" and then copy that artifact into stage "B" in the
      PreInstall phase before running `builder.command`.
      
      Usage example:
      ```
      variants:
        A:
          apt:
            packages:
              - wget
          builder:
            command:
              - /bin/bash
              - -c
              - >-
                wget https://example.org/some_cool_utility.tgz
      
      
                && tar xzvf some_cool_utility.tgz
                && rm some_cool_utility.tgz
        B:
          builder:
            requirements:
              - src
              - from: A
                source: some_cool_utility
                destination: .
            command:
              - some_cool_utility --do-something-cool src/
      ```
      
      Bug: T263597
      Co-authored-by: Dduvall's avatarDan Duvall <dduvall@wikimedia.org>
      Change-Id: If813829bdace6851bdba56abcdfcab1cd967df03
      a9a61206