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.
This commit is contained in:
parent
9795eaf827
commit
d1c947de31
@ -1,8 +1,15 @@
|
|||||||
use/repo:
|
use/repo:
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(call add,STAGE1_PACKAGES,gnupg)
|
@$(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
|
use/repo/addon: use/repo/main
|
||||||
@$(call set,MAIN_SUFFIX,addon)
|
@$(call set,MAIN_SUFFIX,addon)
|
||||||
|
33
features.in/repo/rootfs/image-scripts.d/01-genbasedir-rootfs
Executable file
33
features.in/repo/rootfs/image-scripts.d/01-genbasedir-rootfs
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/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
|
12
features.in/repo/rootfs/image-scripts.d/80-repo-rootfs-main
Executable file
12
features.in/repo/rootfs/image-scripts.d/80-repo-rootfs-main
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/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
|
Loading…
Reference in New Issue
Block a user