Closed abmusse closed 9 years ago
Original comment by PHPDave (Bitbucket: PHPDave, GitHub: PHPDave).
Thanks @rangercairns and @aaronbartell I got through the quick example and verified i can compile with GCC! Time to see about compiling PHP7
#!shell
bash-4.3$ cat hello.c
/* hello.c -- The most famous program of them all ..
*/
#include <stdio.h>
int main(void) {
printf("Hello World!\n");
// return 0;
}
bash-4.3$ gcc hello.c
bash-4.3$ ls
a.out hello.c
bash-4.3$ ./a.out
Hello World!
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
Similar to Tony I've created groupings of commands I can use to quickly/iteratively test our work. Here's mine:
5250> CRTUSRPRF USRPRF(E01) PASSWORD(DCVER32R1) INLMNU(*SIGNOFF) USRCLS(*USER) HOMEDIR('/QOpenSys/download/ibmichroot/spaces/e01/./home/E01') LOCALE(*NONE) TEXT('ibmichroot tests')
env_name=e01
usr_name=E01
env_path=/QOpenSys/download/ibmichroot/spaces/$env_name
./chroot_setup.sh chroot_minimal.lst $env_path
mkdir -p $env_path/home/$usr_name
# Copy my `aaron` profile .ssh for password-less ssh login into E01's folder.
cp -R ~/.ssh $env_path/home/$usr_name
# ssh doesn't work unless directories/files have specific permissions
chmod 700 $env_path/home/$usr_name/.ssh
chmod 600 $env_path/home/$usr_name/.ssh/id_rsa
chmod 644 $env_path/home/$usr_name/.ssh/id_rsa.pub
chmod 644 $env_path/home/$usr_name/.ssh/authorized_keys
# Copy in necessary ibmichroot stuff to install packages.
mkdir -p $env_path/home/ibmichroot
cp pkg_setup.sh $env_path/home/ibmichroot
cp pkg_perzl_bash-4.3.lst $env_path/home/ibmichroot
cp pkg_perzl_utils.lst $env_path/home/ibmichroot
cp pkg_perzl_git-1.8.5.4.lst $env_path/home/ibmichroot
cp rpm.rte $env_path/home/ibmichroot
cp wget-1.9.1-1.aix5.1.ppc.rpm $env_path/home/ibmichroot
# I pre-download many `xxxx.rpm` files and copy them all in, and the delete them when done.
cp -R rpm/* $env_path/home/ibmichroot
# Single command to do install of particular pkg_xxxx.lst
chroot $env_path /usr/bin/sh -c 'cd /home/ibmichroot && ./pkg_setup.sh pkg_perzl_utils.lst'
chroot $env_path /usr/bin/sh -c 'cd /home/ibmichroot && ./pkg_setup.sh pkg_perzl_git-1.8.5.4.lst'
chown -Rh $usr_name:0 $env_path
Then to clear it out and try again:
rm -rf /QOpenSys/download/ibmichroot/spaces/e01
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
Understand ...
I use this to destroy (careful) ...
#!shell
rm -R /QOpenSys/ranger
or more safely ...
cd /QOpenSys
rm -R ranger
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
And again yips chroot and pkg
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
Bonkers, still not use to the issues link stuff, try again yips chroot and pkg beta
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
I over hauled documentation at [http://yips.idevcloud.com/wiki/index.php/PASE/OpenSourceBeta]()
Please try this out from scratch and see if you have better results???
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
here is a complete sequence that worked fine for my machine ...
#!shell
============
outside chroot
============
bash-4.3$ cd /QOpenSys/QIBM/ProdData/OPS/GCC (where you downloaded)
bash-4.3$ PATH=/QOpenSys/usr/bin
bash-4.3$ LIBPATH=/QOpenSys/usr/lib
bash-4.3$ echo $PATH
/QOpenSys/usr/bin
bash-4.3$ echo $LIBPATH
/QOpenSys/usr/lib
bash-4.3$ ./chroot_setup.sh chroot_minimal.lst /QOpenSys/ranger3
:
bash-4.3$ ./chroot_setup.sh chroot_OPS_GCC.lst /QOpenSys/ranger3
:
=============
inside chroot
=============
bash-4.3$ chroot /QOpenSys/ranger3 /QOpenSys/usr/bin/bsh
$ cd /QOpenSys/QIBM/ProdData/OPS/GCC
$ ./pkg_setup.sh pkg_perzl_utils.lst
setup rpm.rte ...
setup wget-1.9.1-1.aix5.1.ppc.rpm ...
:
libidn ##################################################
zlib ##################################################
pcre ##################################################
readline ##################################################
openssl ##################################################
libssh2 ##################################################
openldap ##################################################
info ##################################################
bash ##################################################
sed ##################################################
grep ##################################################
nedit ##################################################
bzip2 ##################################################
gzip ##################################################
unzip ##################################################
zip ##################################################
tar ##################################################
$ rpm --version
RPM version 3.0.5
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
we did change the rpm setup in chroot_setup.sh ... so maybe post a little more about the order of events ...
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
Nothing meant to be offensive, just trying to see if we have a script issue or a doicumentation issue.
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
I am also having a lot of difficulty understanding if you are inside/outside your chroot with /pkg_setup.sh???
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
completely confusing ...
#!shell
Do not use PATH=$PATH:/QOpenSys/opt/freeware/lib
instead use ...
PATH=$PATH:/QOpenSys/opt/freeware/bin
LIBPATH=$LIBPATH:/QOpenSys/opt/freeware/lib
Mmm , rpm should sort of always work, but, not sure what to make of anything after watching the PATH/LIBPATH issue.
Original report by PHPDave (Bitbucket: PHPDave, GitHub: PHPDave).
Was wondering if you guys ran into the same issue.
I tried to run
But its having a problem loading librpmbuild.so. librpmbuild.so is a symbolic link to librpm.so.0.0.0 . That file (librpm.so.0.0.0) isn't copied into the chroot directory when you run
I also had to run
to get the librpm.so to be included since the path is only set to /QOpenSys/usr/bin
Full output w/ error
Notes
To find out librpmbuild.so was a symlink
To find out the librpm.so.0.0.0 is missing
RPM binary is found here: /QOpenSys/usr/bin/rpm