Commit d1c947de authored by Anton Midyukov's avatar Anton Midyukov

repo: use/repo/main for vm targets

use/repo/main for vm targets will now create and enable the main repository in /ALTLinux on rootfs.
parent 9795eaf8
use/repo:
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,gnupg)
@$(call xport,ROOTFS_MAIN)
use/repo/main: sub/main use/repo; @:
use/repo/main:: sub/main use/repo; @:
ifeq (vm,$(IMAGE_CLASS))
use/repo/main::
@$(call set,ROOTFS_MAIN,1)
@$(call add,THE_PACKAGES,apt-repo-tools)
endif
use/repo/addon: use/repo/main
@$(call set,MAIN_SUFFIX,addon)
#!/bin/sh -eu
[ -n "$GLOBAL_ROOTFS_MAIN" ] || exit 0
mv /ALTLinux /srv/ALT
PREFIX=/srv/ALT
cd "$PREFIX"
COMPS="$(find -mindepth 1 -maxdepth 1 -type d -name 'RPMS.*' -printf '%f\n' |
sed 's/^RPMS\.//')"
[ -z "$GLOBAL_VERBOSE" ] || echo "** COMPS=$COMPS" >&2
[ -n "$COMPS" ] || exit 1
for comp in $COMPS; do
for f in RPMS.$comp/*rpm; do
[ "$f" = "RPMS.$comp/$(rpm -qp $f).rpm" ] || mv $f RPMS.$comp/$(rpm -qp $f).rpm
done
done
genbasedir \
--topdir="/" \
--no-oldhashfile \
--partial \
--xz \
--bz2 \
--create \
--notautomatic=false \
$PREFIX $COMPS
### drop this when genbasedir is fixed (--no-uncompressed)
for c in $COMPS; do rm -f base/{pkg,src}list.$c; done
#!/bin/sh -efu
# configure package repository of the image (provided by sub/main);
# this script will be run iff both live and repo features are used
[ -n "$GLOBAL_ROOTFS_MAIN" ] || exit 0
DIR=/etc/apt/sources.list.d
mkdir -p $DIR && {
echo "# for real stuff you'll need full repo, see apt-repo"
echo "rpm file:/srv/ ALT main"
} > $DIR/main.list
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment