--- builds_bin/build_installer 2009/11/03 22:35:28 1.19 +++ builds_bin/build_installer 2020/06/14 05:54:37 1.30 @@ -13,6 +13,11 @@ then echo "No $distarch directory?" exit 1 fi +if [ "$distrel" == "10" ] +then + echo "do not run for $distrel" + exit 1 +fi rm -rf $(pwd)/$distarch/{images,isolinux} $(pwd)/$distarch/SME/base/{hdlist*,*.img} @@ -28,7 +33,7 @@ then $(pwd)/$distarch \ $distarch > pkgorder.$distarch - for PKG in /releases/$distrel/smeextras/$distarch/RPMS/*.rpm + for PKG in /build/smeserver/repo/$distrel/smeextras/$distarch/RPMS/*.rpm do PKGFILE=$(basename $PKG) if [ ! -f $(pwd)/$distarch/SME/RPMS/$PKGFILE ] @@ -46,8 +51,9 @@ then $(pwd)/$distarch/ sed -i 's@1,2,3@1@' $(pwd)/$distarch/.discinfo -else - for PKG in /releases/testing/$distrel/smeextras/$distarch/RPMS/*.rpm +elif [ "$distrel" == "8" ] +then + for PKG in /build/smeserver/repo/$distrel/smeextras/$distarch/RPMS/*.rpm do PKGFILE=$(basename $PKG) if [ ! -f $(pwd)/$distarch/SME/$PKGFILE ] @@ -56,10 +62,13 @@ else fi done - sed "/installforallkernels/ised -i 's|\\\\(enabled\\\\) = 1|\\\\1 = 0|' \$DEST/etc/yum/pluginconf.d/kmod.conf" \ - /usr/lib/anaconda-runtime/upd-instroot > upd-instroot - chmod 755 upd-instroot - sudo chown root:root upd-instroot + cp /usr/lib/anaconda-runtime/mk-images* . + sed -i -e 's/count=12/count=15/' mk-images.* + sed -e "/installforallkernels/ised -i 's|\\\\(enabled\\\\) = 1|\\\\1 = 0|' \$DEST/etc/yum/pluginconf.d/kmod.conf" \ + -e 's|^usr/\(.*/libz.*\)|&\n\1|' /usr/lib/anaconda-runtime/upd-instroot > upd-instroot + chmod 644 mk-images.* + chmod 755 mk-images upd-instroot + sudo chown root:root mk-images* upd-instroot PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ --product "$distname" \ @@ -68,19 +77,61 @@ else --prodpath SME \ --bugurl http://bugs.contribs.org/ \ $(pwd)/$distarch/ + sed -i 's/ALL/1/' $distarch/.discinfo + + sudo rm -rf $distarch/buildinstall.tree.*/ mk-images* upd-instroot +elif [ "$distrel" == "9" ] +then + sed -e '/anaconda.repos.d/arm -f $DEST/etc/anaconda.repos.d/*' /usr/lib/anaconda-runtime/upd-instroot > upd-instroot + chmod 755 upd-instroot + sudo chown root:root upd-instroot + + echo "delete repodata repoview and rebuild" + rm -rf $(pwd)/$distarch/{repodata,repoview}/ + mkdir -p $(pwd)/$distarch/repodata/ + /bin/cp -af $(pwd)/$distarch/Packages/base/comps.xml $(pwd)/$distarch/repodata/ + + createrepo --quiet --database --skip-symlinks --simple-md-filenames --groupfile repodata/comps.xml $(pwd)/$distarch/ + sync; rm -rf $(pwd)/$distarch/.olddata + + # add --final when we have final product + #PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ + # --product "$distname" \ + # --version "${distvers/[^0-9.]*/}" \ + # --release "$distname" \ + # #--brand "centos" \ + # --final \ + # --bugurl http://bugs.contribs.org/ \ + # --output $(pwd)/$distarch/ \ + # /build/smeserver/repo/testing/$distrel/smeextras/$distarch/ \ + # $(pwd)/$distarch/ + echo "Anaconda buildinstall...." + PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ + --product "$distname" \ + --version "${distvers/[^0-9.]*/}" \ + --release "$distname" \ + --final \ + --bugurl http://bugs.contribs.org/ \ + --output $(pwd)/$distarch/ \ + /build/smeserver/repo/$distrel/smeextras/$distarch/ \ + $(pwd)/$distarch/ + + echo "sed treeinfo" + /bin/sed -i -e "s|packagedir =.*|packagedir = Packages|" $(pwd)/$distarch/.treeinfo - sudo rm upd-instroot + echo "upd-instroot" + sudo rm -f awk ../pci.ids *-logos-*.rpm grub-*.rpm upd-instroot fi # Remove previous linked files find $(pwd)/$distarch/SME/ -type l | xargs rm -f # Copy updated isolinux files -sudo cp -f /stage/extra/isolinux/$distrel/* $(pwd)/$distarch/isolinux/ +sudo cp -f /build/smeserver/stage/extra/isolinux/$distrel/* $(pwd)/$distarch/isolinux/ -find $(pwd)/$distarch -\( -not -user 9000 -o -not -group 9000 -\) -print0 | sudo xargs -r0 chown 9000:9000 +find $(pwd)/$distarch -\( -not -user 10007 -o -not -group 10018 -\) -print0 | sudo xargs -r0 chown 10007:10018 find $(pwd)/$distarch -\( -type f -not -perm -0664 -o -type d -not -perm -0775 -\) -print0 | sudo xargs -r0 chmod u+rwX,g+rwX,o+rX,o-w -echo "You now need to run /stage/bin/build_ISO as non-root" +echo "You now need to run /build/smeserver/stage/bin/build_ISO as non-root" # That's it.