/[smeserver]/builds_bin/build_installer
ViewVC logotype

Annotation of /builds_bin/build_installer

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.30 - (hide annotations) (download)
Sun Jun 14 05:54:37 2020 UTC (4 years, 5 months ago) by jpp
Branch: MAIN
CVS Tags: HEAD
Changes since 1.29: +29 -10 lines
global update of current bins

1 gordonr 1.1 #!/bin/sh
2    
3     distname='SME Server'
4 slords 1.14 distvers=$(basename $(readlink -f $(pwd)))
5 slords 1.10 distrel=${distvers:0:1}
6 slords 1.5 distarch=$(uname -i)
7 gordonr 1.1
8 slords 1.13 exec < /dev/null
9     exec &> build_installer.$distarch
10    
11 slords 1.10 if ! [ -d $distarch ]
12     then
13     echo "No $distarch directory?"
14     exit 1
15     fi
16 jpp 1.30 if [ "$distrel" == "10" ]
17     then
18     echo "do not run for $distrel"
19     exit 1
20     fi
21 slords 1.10
22 slords 1.17 rm -rf $(pwd)/$distarch/{images,isolinux} $(pwd)/$distarch/SME/base/{hdlist*,*.img}
23    
24 slords 1.10 if [ "$distrel" == "7" ]
25     then
26     PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \
27 slords 1.9 --productpath SME \
28 gordonr 1.1 --withnumbers \
29 slords 1.10 $(pwd)/$distarch/
30 gordonr 1.1
31 slords 1.10 PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \
32 slords 1.9 --product SME \
33 slords 1.10 $(pwd)/$distarch \
34 slords 1.11 $distarch > pkgorder.$distarch
35 gordonr 1.1
36 slords 1.27 for PKG in /build/smeserver/repo/$distrel/smeextras/$distarch/RPMS/*.rpm
37 slords 1.10 do
38     PKGFILE=$(basename $PKG)
39     if [ ! -f $(pwd)/$distarch/SME/RPMS/$PKGFILE ]
40     then
41     ln -sf $PKG $(pwd)/$distarch/SME/RPMS/
42     fi
43     done
44 gordonr 1.1
45 slords 1.10 PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \
46 slords 1.7 --product "$distname" \
47 slords 1.19 --version "${distvers/[^0-9.]*/}" \
48 slords 1.7 --release "$distname" \
49 slords 1.9 --prodpath SME \
50 slords 1.11 --pkgorder pkgorder.$distarch \
51 slords 1.10 $(pwd)/$distarch/
52    
53     sed -i 's@1,2,3@1@' $(pwd)/$distarch/.discinfo
54 slords 1.25 elif [ "$distrel" == "8" ]
55     then
56 slords 1.27 for PKG in /build/smeserver/repo/$distrel/smeextras/$distarch/RPMS/*.rpm
57 slords 1.10 do
58     PKGFILE=$(basename $PKG)
59     if [ ! -f $(pwd)/$distarch/SME/$PKGFILE ]
60     then
61     ln -sf $PKG $(pwd)/$distarch/SME/
62     fi
63     done
64    
65 slords 1.23 cp /usr/lib/anaconda-runtime/mk-images* .
66     sed -i -e 's/count=12/count=15/' mk-images.*
67 slords 1.22 sed -e "/installforallkernels/ised -i 's|\\\\(enabled\\\\) = 1|\\\\1 = 0|' \$DEST/etc/yum/pluginconf.d/kmod.conf" \
68     -e 's|^usr/\(.*/libz.*\)|&\n\1|' /usr/lib/anaconda-runtime/upd-instroot > upd-instroot
69 slords 1.23 chmod 644 mk-images.*
70     chmod 755 mk-images upd-instroot
71     sudo chown root:root mk-images* upd-instroot
72 slords 1.12
73 slords 1.10 PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \
74     --product "$distname" \
75 slords 1.19 --version "${distvers/[^0-9.]*/}" \
76 slords 1.10 --release "$distname" \
77     --prodpath SME \
78     --bugurl http://bugs.contribs.org/ \
79     $(pwd)/$distarch/
80 slords 1.21 sed -i 's/ALL/1/' $distarch/.discinfo
81 slords 1.12
82 slords 1.23 sudo rm -rf $distarch/buildinstall.tree.*/ mk-images* upd-instroot
83 slords 1.25 elif [ "$distrel" == "9" ]
84     then
85     sed -e '/anaconda.repos.d/arm -f $DEST/etc/anaconda.repos.d/*' /usr/lib/anaconda-runtime/upd-instroot > upd-instroot
86     chmod 755 upd-instroot
87     sudo chown root:root upd-instroot
88    
89 jpp 1.30 echo "delete repodata repoview and rebuild"
90 slords 1.25 rm -rf $(pwd)/$distarch/{repodata,repoview}/
91     mkdir -p $(pwd)/$distarch/repodata/
92     /bin/cp -af $(pwd)/$distarch/Packages/base/comps.xml $(pwd)/$distarch/repodata/
93    
94 slords 1.26 createrepo --quiet --database --skip-symlinks --simple-md-filenames --groupfile repodata/comps.xml $(pwd)/$distarch/
95 slords 1.25 sync; rm -rf $(pwd)/$distarch/.olddata
96    
97 slords 1.26 # add --final when we have final product
98 jpp 1.30 #PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \
99     # --product "$distname" \
100     # --version "${distvers/[^0-9.]*/}" \
101     # --release "$distname" \
102     # #--brand "centos" \
103     # --final \
104     # --bugurl http://bugs.contribs.org/ \
105     # --output $(pwd)/$distarch/ \
106     # /build/smeserver/repo/testing/$distrel/smeextras/$distarch/ \
107     # $(pwd)/$distarch/
108     echo "Anaconda buildinstall...."
109 slords 1.25 PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \
110 jpp 1.30 --product "$distname" \
111     --version "${distvers/[^0-9.]*/}" \
112     --release "$distname" \
113     --final \
114     --bugurl http://bugs.contribs.org/ \
115     --output $(pwd)/$distarch/ \
116     /build/smeserver/repo/$distrel/smeextras/$distarch/ \
117     $(pwd)/$distarch/
118    
119     echo "sed treeinfo"
120 slords 1.25 /bin/sed -i -e "s|packagedir =.*|packagedir = Packages|" $(pwd)/$distarch/.treeinfo
121    
122 jpp 1.30 echo "upd-instroot"
123 slords 1.25 sudo rm -f awk ../pci.ids *-logos-*.rpm grub-*.rpm upd-instroot
124 slords 1.10 fi
125 gordonr 1.1
126     # Remove previous linked files
127 slords 1.10 find $(pwd)/$distarch/SME/ -type l | xargs rm -f
128 gordonr 1.1
129     # Copy updated isolinux files
130 slords 1.24 sudo cp -f /build/smeserver/stage/extra/isolinux/$distrel/* $(pwd)/$distarch/isolinux/
131 slords 1.6
132 jpp 1.30 find $(pwd)/$distarch -\( -not -user 10007 -o -not -group 10018 -\) -print0 | sudo xargs -r0 chown 10007:10018
133 slords 1.16 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
134 slords 1.8
135 slords 1.24 echo "You now need to run /build/smeserver/stage/bin/build_ISO as non-root"
136 gordonr 1.1
137     # That's it.

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed