Browse Source

Merge "Allow extra repositories to be added to images"

tags/2.27.0
Zuul 3 weeks ago
parent
commit
9ef7f73b6a

+ 4
- 0
diskimage_builder/elements/yum-minimal/README.rst View File

@@ -18,3 +18,7 @@ If you wish to build from specific mirrors, set
18 18
 files to use during bootstrap and build.  The repo files should be
19 19
 named with a prefix ``dib-mirror-`` and will be removed from the final
20 20
 image.
21
+
22
+If you wish to include extra repositories, set ``DIB_YUM_MINIMAL_EXTRA_REPOS``
23
+to a directory with the ``.repo`` files. The repo files will not be removed
24
+from the final image.

+ 4
- 0
diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot View File

@@ -128,6 +128,10 @@ function _install_repos {
128 128
             $TARGET_ROOT/etc/yum.repos.d/
129 129
     fi
130 130
 
131
+    if [[ -n ${DIB_YUM_MINIMAL_EXTRA_REPOS:-} ]]; then
132
+        sudo cp ${DIB_YUM_MINIMAL_EXTRA_REPOS}/* \
133
+            $TARGET_ROOT/etc/yum.repos.d/
134
+    fi
131 135
 }
132 136
 
133 137
 # _install_pkg_manager packages...

Loading…
Cancel
Save