Last active
June 22, 2017 17:02
-
-
Save Frodox/8be663604a157ad8edabfe8eaa1a3d27 to your computer and use it in GitHub Desktop.
Quick start for creating custom centos like distro (gist for article ... )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
setenforce 0 | |
LORAX_TMP_DIR=./lorax-raw # тут будут результаты его работы | |
lorax -p Fedora-Generic -v 22 -r 22 \ | |
-s http://mirror.centos.org/centos-7/7/os/x86_64/ \ | |
-s http://mirror.centos.org/centos-7/7/updates/x86_64/ "$LORAX_TMP_DIR" | |
... | |
buildroot=/build/lorax | |
mount -o loop,ro "$LORAX_TMP_DIR/images/boot.iso" "$TMP_MOUNT_DIR" | |
rm -rf "$buildroot" | |
# TODO: добавить опцию, чтобы * раскрывалась в файлы с точки тоже, | |
# и использовать это тут(в этом скрипте). Shopt dotglob ? | |
cp -apr "$TMP_MOUNT_DIR" "$buildroot" | |
cp -a $LORAX_TMP_DIR/.discinfo "$buildroot" | |
cp -a $LORAX_TMP_DIR/.treeinfo "$buildroot" | |
... | |
# Add all needed rpms into `$buildroot/Packages/` manually | |
pushd $buildroot | |
mkdir -p Packages | |
cp ...mypackages/*.rpm Packages/ | |
# rpmsign ... | |
# create repo | |
mkdir repodata | |
cp ../my-centos-comps.xml repodata/comps-$DISTRO_NAME.xml | |
createrepo -d -g "repodata/comps-$DISTRO_NAME.xml" . | |
setenforce 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment