This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
og:ipabuild:start [2019/01/13 09:48] czokie |
og:ipabuild:start [2019/01/15 01:41] (current) czokie [Main setup] |
||
---|---|---|---|
Line 2: | Line 2: | ||
This document will explain how to systematically scriptable build IOS apps. For the document, I will start with a virtual server running Centos 7.x - with a " | This document will explain how to systematically scriptable build IOS apps. For the document, I will start with a virtual server running Centos 7.x - with a " | ||
- | This is a two step install. The first stage sets some basic security parameters (like disabling selinux enforcing)... which is required in later stages... and creates a build user - so we don't install all of this crap as root. After this stage the server is rebooted. | + | This is a two step install. The first stage sets some basic security parameters (like disabling selinux enforcing)... which is required in later stages... and creates a build user - so we don't install all of this crap as root. After this stage the server is rebooted, if selinux was running. (The reboot is skipped if selinux is not running). |
- | The second stage does the main build under our newly created user. | + | The second stage does the main build under our newly created user, using sudo where required. |
- | ===== Server Build ===== | + | This base server |
- | This server | + | |
- | ==== Setup Process - Stage 1 ==== | + | ===== Setup Process - Stage 1 ===== |
Login as root to your newly created Centos 7 minimal server build, and execute the following command. This will pull the stage 1 script listed below and execute it. | Login as root to your newly created Centos 7 minimal server build, and execute the following command. This will pull the stage 1 script listed below and execute it. | ||
Line 15: | Line 14: | ||
bash <(curl -s https:// | bash <(curl -s https:// | ||
- | ==== Setup Process - Stage 2 ==== | + | ===== Setup Process - Stage 2 ===== |
- | The server will reboot | + | If SeLinux is installed, the server will reboot. Login as the build user when it comes back and continue with this command. If selinux is not installed, the first script will automatically SU to this user. |
bash <(curl -s https:// | bash <(curl -s https:// | ||
- | ==== Setup Scripts ==== | + | ===== Setup Scripts |
+ | ==== Bootstrap ==== | ||
<code bash ipabuildsetup1.sh> | <code bash ipabuildsetup1.sh> | ||
#!/bin/bash | #!/bin/bash | ||
Line 35: | Line 34: | ||
echo " | echo " | ||
if [ -e / | if [ -e / | ||
- | sed -ie " | + | sed -i " |
echo "Run the next step as username: ${USER}" | echo "Run the next step as username: ${USER}" | ||
banner " | banner " | ||
Line 41: | Line 40: | ||
else | else | ||
banner " | banner " | ||
+ | #su -c "bash <(curl -s https:// | ||
su - ${USER} | su - ${USER} | ||
fi | fi | ||
</ | </ | ||
+ | ==== Main setup ==== | ||
+ | |||
<code bash ipabuildsetup2.sh> | <code bash ipabuildsetup2.sh> | ||
Line 60: | Line 62: | ||
make patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ | make patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ | ||
bzip2 autoconf automake libtool bison iconv-devel sqlite-devel which zip unzip openssl file | bzip2 autoconf automake libtool bison iconv-devel sqlite-devel which zip unzip openssl file | ||
+ | |||
+ | sudo pip freeze > / | ||
banner " | banner " | ||
Line 65: | Line 69: | ||
sudo pip install --upgrade pip | sudo pip install --upgrade pip | ||
+ | sudo pip freeze > / | ||
+ | if [ 1 -eq 0 ]; then | ||
banner " | banner " | ||
# The latest construct that is known to work with iSign won't install with pip - We need to get the URL and fetch manually | # The latest construct that is known to work with iSign won't install with pip - We need to get the URL and fetch manually | ||
Line 72: | Line 78: | ||
sudo pip install " | sudo pip install " | ||
- | banner " | + | banner " |
- | # | + | sudo pip install ak-construct==2.5.2 |
- | # Install isign | + | |
- | # | + | |
- | PYOPENSSLVERSION=18.0.0 | + | banner " |
+ | sudo pip install PyOpenSSL==18.0.0 | ||
+ | |||
+ | sudo pip freeze > / | ||
+ | |||
+ | banner " | ||
git clone https:// | git clone https:// | ||
cd isign | cd isign | ||
- | / | + | / |
- | / | + | / |
- | sed -ie " | + | / |
- | # temporarily disabled ... # sudo ./ | + | |
+ | sed -i " | ||
+ | if [ ! -e ~/.isign ]; then mkdir ~/.isign; fi | ||
+ | #sudo ./ | ||
+ | read more | ||
sudo rm -rf build dist isign.egg-info | sudo rm -rf build dist isign.egg-info | ||
cd | cd | ||
+ | fi | ||
+ | # Install newer non-standard GCC package required for insert_dylib | ||
- | # | + | banner " |
- | # Install newer non-standard GCC package and build insert_dylib | + | |
- | # | + | |
sudo yum -y install centos-release-scl | sudo yum -y install centos-release-scl | ||
+ | |||
+ | banner " | ||
sudo yum -y install devtoolset-4-gcc* | sudo yum -y install devtoolset-4-gcc* | ||
+ | banner " | ||
git clone https:// | git clone https:// | ||
cd ~/ | cd ~/ | ||
Line 99: | Line 114: | ||
sudo mv ~/ | sudo mv ~/ | ||
rm -rf ~/ | rm -rf ~/ | ||
- | |||
- | ## | ||
- | ## Get iInject | ||
- | ## | ||
- | # | ||
- | if [ ! -e ~/.isign ]; then mkdir ~/.isign; fi | ||
- | # TODO: Add wget here for our custom iinject.sh file | ||
- | #cd ~ | ||
- | #git clone https:// | ||
- | #sed -ie " | ||
- | #sed -ie " | ||
- | #curl https:// | ||
# | # | ||
Line 117: | Line 120: | ||
# | # | ||
+ | banner install rbenv | ||
cd | cd | ||
git clone git:// | git clone git:// | ||
Line 124: | Line 128: | ||
eval " | eval " | ||
+ | banner install ruby-build | ||
git clone git:// | git clone git:// | ||
echo ' | echo ' | ||
export PATH=" | export PATH=" | ||
+ | banner " | ||
+ | # | ||
+ | # Install a newer ruby version and set it as our global version for now | ||
# | # | ||
# Prevent generation of local documentation for each gem installed (It's slow!) | # Prevent generation of local documentation for each gem installed (It's slow!) | ||
- | # | ||
- | |||
echo "gem: --no-document" | echo "gem: --no-document" | ||
- | |||
- | # | ||
- | # Install a newer ruby version and set it as our global version for now | ||
- | # | ||
VERSION=`curl -s https:// | VERSION=`curl -s https:// | ||
rbenv install -v $VERSION | rbenv install -v $VERSION | ||
rbenv global $VERSION | rbenv global $VERSION | ||
- | # | + | banner install |
- | # Install | + | |
- | # | + | |
gem install fastlane | gem install fastlane | ||
+ | banner install pry | ||
gem install pry | gem install pry | ||
+ | banner install son | ||
gem install json | gem install json | ||
- | # | + | banner install genProvisioningProfile.rb |
- | # Get our ruby script down | + | |
- | # | + | |
wget -O genProvisioningProfile.rb https:// | wget -O genProvisioningProfile.rb https:// | ||
- | sed -ie " | + | sed -i " |
+ | |||
+ | |||
+ | # TODO: Add wget here for our custom iinject.sh file | ||
+ | #cd ~ | ||
+ | #git clone https:// | ||
+ | #sed -i " | ||
+ | #sed -i " | ||
+ | #curl https:// | ||
## | ## |