Skip to content

Commit

Permalink
create-install-iso: use config files for yumdownloader
Browse files Browse the repository at this point in the history
Shares repo definition with create-installimg, as allowed by the
switch away from Mock.
  • Loading branch information
ydirson committed Apr 18, 2023
1 parent 8f719ff commit 03ce297
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README-iso.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ sudo ./scripts/create-installimg.sh \
./scripts/create-install-iso.sh \
--srcurl file://$HOME/mirrors/xcpng/8.2 \
-V "XCP-NG_821_TEST" \
8.2.1 install-8.2.updates-x86_64.img xcp-ng-8.2.1-install.iso
-V "XCP-NG_82U_TEST" \
8.2.updates install-8.2.updates-x86_64.img xcp-ng-8.2.updates-install.iso
```

### testing boot modes in qemu
Expand Down
3 changes: 3 additions & 0 deletions configs/8.2.testing/yumdl.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[main]
plugins=@@ENABLE_PLUGINS@@
basearch=@@RPMARCH@@
3 changes: 3 additions & 0 deletions configs/8.2.testing/yumdl.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
YUMFLAGS+=(
--enablerepo='xcpng-base,xcpng-updates,xcpng-testing'
)
3 changes: 3 additions & 0 deletions configs/8.2.updates/yumdl.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[main]
plugins=@@ENABLE_PLUGINS@@
basearch=@@RPMARCH@@
3 changes: 3 additions & 0 deletions configs/8.2.updates/yumdl.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
YUMFLAGS+=(
--enablerepo='xcpng-base,xcpng-updates'
)
3 changes: 3 additions & 0 deletions configs/8.3.0/yumdl.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[main]
plugins=@@ENABLE_PLUGINS@@
basearch=@@RPMARCH@@
3 changes: 3 additions & 0 deletions configs/8.3.0/yumdl.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
YUMFLAGS+=(
--enablerepo='xcpng-base'
)
3 changes: 3 additions & 0 deletions configs/8.3.testing/yumdl.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[main]
plugins=@@ENABLE_PLUGINS@@
basearch=@@RPMARCH@@
3 changes: 3 additions & 0 deletions configs/8.3.testing/yumdl.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
YUMFLAGS+=(
--enablerepo='xcpng-base,xcpng-updates,xcpng-testing'
)
3 changes: 3 additions & 0 deletions configs/8.3.updates/yumdl.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[main]
plugins=@@ENABLE_PLUGINS@@
basearch=@@RPMARCH@@
3 changes: 3 additions & 0 deletions configs/8.3.updates/yumdl.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
YUMFLAGS+=(
--enablerepo='xcpng-base,xcpng-updates'
)
1 change: 1 addition & 0 deletions iso/8.3.updates
29 changes: 9 additions & 20 deletions scripts/lib/misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,33 +98,22 @@ setup_yum_download() {
enable_plugins=0
fi

# FIXME gpgcheck
cat > "$YUMCONF" <<EOF
[main]
gpgcheck=0
repo_gpgcheck=0
plugins=${enable_plugins}
basearch=$RPMARCH
[xcpng-base]
name=xcpng-base
baseurl=$SRCURL/base/$RPMARCH/
[xcpng-updates]
name=xcpng-updates
baseurl=$SRCURL/updates/$RPMARCH/
[xcpng-testing]
name=xcpng-testing
baseurl=$SRCURL/testing/$RPMARCH/
EOF
confdir="$topdir/configs/$DIST"
cat "$confdir/yumdl.conf.tmpl" "$confdir/yum-repos.conf.tmpl" |
sed \
-e "s,@@SRCURL@@,$SRCURL," \
-e "s,@@RPMARCH@@,$RPMARCH," \
-e "s,@@ENABLE_PLUGINS@@,$enable_plugins," \
> "$YUMCONF"
mkdir ${VERBOSE} "$DUMMYROOT/etc"
YUMFLAGS=(
${VERBOSE}
--config="$YUMCONF"
--releasever="$DIST"
--disablerepo="*"
--installroot="$DUMMYROOT"
#--enablerepo='xcpng-base'
--enablerepo='xcpng-base,xcpng-updates,xcpng-testing'
)
)
. "$confdir/yumdl.flags"
}

get_rpms() {
Expand Down

0 comments on commit 03ce297

Please sign in to comment.