Kaydet (Commit) 2653156c authored tarafından aliriza's avatar aliriza

/profile added

üst c5c09af7
......@@ -20,9 +20,12 @@ Available Templates: **debian**, **archlinux**, **sulin**, **tearch**, **ubuntu*
├── airootfs
│ └── ...
├── grub.cfg
├── packages
│ └── ...
└── profile.yaml
* airootfs directory store files that will merge with rootfs.
* packages directory store package files that will install into rootfs.
* grub.cfg file is header of grub config. Teaiso scan kernel and automatically merge with this config.
* profile.yaml file is main configuration file. You can configure distribution settings with this file.
......
......@@ -43,6 +43,9 @@ populate_rootfs(){
install_packages(){
run_in_chroot apt update -yq
run_in_chroot apt install -yq -o Dpkg::Options::="--force-confnew" ${packages[@]}
if [[ -f "$rootfs"/profile/packages ]] ; then
run_in_chroot dpkg -i /profile/packages/*.deb
fi
}
make_pkglist() {
......
......@@ -30,6 +30,9 @@ populate_rootfs(){
install_packages(){
run_in_chroot dnf install -y --nogpgcheck ${packages[@]}
if [[ -f "$rootfs"/profile/packages ]] ; then
run_in_chroot rpm -i /profile/packages/*.rpm
fi
}
make_pkglist() {
......
......@@ -16,6 +16,9 @@ populate_rootfs(){
install_packages(){
run_in_chroot inary it -y ${packages[@]}
if [[ -f "$rootfs"/profile/packages ]] ; then
run_in_chroot inary it /profile/packages/*.inary
fi
}
make_pkglist() {
......
......@@ -5,7 +5,7 @@ typeset -r create_rootfs
create_rootfs(){
if [[ "$codename" == "latest" ]] ; then
codename=$(curl https://cdimage.ubuntu.com/daily-live/current/ | grep "desktop-amd64.iso" | head -n 1 | sed "s/.*href=\"//g" | sed "s/-.*//g")
codename=$(wget -O - https://cdimage.ubuntu.com/daily-live/current/ | grep "desktop-amd64.iso" | head -n 1 | sed "s/.*href=\"//g" | sed "s/-.*//g")
fi
if ! run debootstrap --arch=$(get_arch $arch) --no-check-gpg --no-merged-usr --exclude=usrmerge --extractor=ar "$codename" "$rootfs" "$repository" ; then
cat $rootfs/debootstrap/debootstrap.log
......
......@@ -167,6 +167,10 @@ if settings.shared and os.path.isdir(settings.shared):
os.mkdir("{}/teaiso".format(settings.rootfs))
run("mount --bind '{}' '{}/teaiso'".format(settings.shared,settings.rootfs))
# Bind mount profile
os.mkdir("{}/profile".format(settings.rootfs))
run("mount --bind '{}' '{}/profile'".format(settings.profile,settings.rootfs))
if Stage().get() < 2:
distro.populate_rootfs()
if os.path.exists(settings.profile+"/"+common.get("airootfs_directory_pre")) and len(common.get("airootfs_directory_pre")) > 0:
......@@ -237,6 +241,11 @@ if Stage().get() < 7:
if settings.shared and os.path.isdir(settings.shared):
run("umount -lf '{}/teaiso'".format(settings.rootfs))
os.rmdir("{}/teaiso".format(settings.rootfs))
# remove profile binding
run("umount -lf '{}/profile'".format(settings.rootfs))
os.rmdir("{}/profile".format(settings.rootfs))
Mount.unmount(settings.rootfs)
# Set permissions if exists
......
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