OpenJDK and RPB

Place here useful instructions for RPB.

Create Centos chroot in Ubuntu

    mkdir -p /chroot/LDS
    apt-get install rpm yum 
    rpm --rebuilddb --root=/chroot/LDS/
    wget https://repo.arm64.io/centos/dist-linaro7/aarch64/centos-release-7-2.1603.el7.linaro.2.8.1.altarch.aarch64.rpm  
    rpm -i --root=/chroot/LDS --nodeps centos-release-7-2.1603.el7.linaro.2.8.1.altarch.aarch64.rpm
    
    https://ask.fedoraproject.org/en/question/35874/yum-pycurl-error-43/
        vim /usr/lib/python2.7/dist-packages/urlgrabber/grabber.py 
        Change:
            self.curl_obj.setopt(pycurl.SSL_VERIFYHOST, opts.ssl_verify_host)
        To:
            self.curl_obj.setopt(pycurl.SSL_VERIFYHOST, False) 

    apt-get install python-lzma            
    yum --installroot=/chroot/LDS install -y rpm-build yum
    cp /run/resolvconf/resolv.conf /chroot/LDS/etc/resolv.conf
    mount --bind /sys /chroot/LDS/sys
    mount --bind /dev /chroot/LDS/dev
    mount --bind /dev/pts /chroot/LDS/dev/pts
    mount --bind /home /chroot/LDS/home
    mount --bind /etc/shadow /chroot/LDS/etc/shadow
    mount --bind /etc/passwd /chroot/LDS/etc/passwd
    mount --bind /etc/gshadow /chroot/LDS/etc/gshadow
    mount --bind /etc/group /chroot/LDS/etc/group

    sudo chroot --userspec=$USER:$USER /chroot/LDS

To work / build with OpenJDK you'll need:

    sudo yum install which vim git mercurial rpmdevtools
    sudo yum install gcc gcc-c++ make 
    sudo yum install libXtst-devel libXt-devel libXrender-devel cups-devel freetype-devel alsa-lib-devel
    sudo yum install autoconf automake desktop-file-utils giflib-devel gtk2-devel lcms2-devel libjpeg-devel libpng-devel libXinerama-devel nss-devel java-1.8.0-openjdk-devel openssl systemtap-sdt-devel
    rpmdev-setuptree

    git clone https://github.com/linaro-product/rpms-java-1.8.0-openjdk.git
    mv rpms-java-1.8.0-openjdk/.git ~/rpmbuild
    mv rpms-java-1.8.0-openjdk/SPECS/* ~/rpmbuild/SPECS
    mv rpms-java-1.8.0-openjdk/SOURCES/* ~/rpmbuild/SOURCES

You'll need to generate a aarch64-port-jdk8u-aarch64-jdk8u111-b15.tar.xz file to place under SOURCES.

    rpmbuild --nodeps -bb SPECS/java-1.8.0-openjdk.spec

OpenJDKAndRPB (last modified 2016-11-11 10:22:03)