Closed abmusse closed 9 years ago
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
I've tested this feature (it works) and took liberty of modifying it a bit to not create tar if it already exists (time saver). The reusable tar is created outside chroot. You can see the changes I made with this commit.
NOTE: I am still a noob with shell scripting so any and all coding critiques are welcome.
I am marking this as resolved.
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
This is not forgotten, but a nasty bit of testing. Any help in various 'tests' will help.
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
I think you are indirectly commenting on my CHOICE to make a chroot_nls.lst. I simply choose to make chroot_nls.lst, because nls takes forever to tar copy the whole thing on my power 5 machine.
You are correct and I now see where you were coming from. POWER5 ug :-P
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
re-assiged to me, as i am making code changes
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
To be clear, :tar_dir can appear in any xxx.lst, along with anything else. Yes, by all means, go ahead and mix, :tar_dir is just another directive.
I think you are indirectly commenting on my CHOICE to make a chroot_nls.lst. I simply choose to make chroot_nls.lst, because nls takes forever to tar copy the whole thing on my power 5 machine.
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
I don't know if it matters if :tar_dir is in its own xxxx.lst (maybe I misunderstood), but what does matter is chroot_setup.sh
can process :tar_dir
. Then people, including us, can do any mix of :cp
, :files
, :tar_dir
as the need requires.
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
Correct example above ...
#!shell
#
# tar list
# ( example: /QOpenSys/lib/nls/loc
# mkdir -p $CHROOT_DIR/QOpenSys/lib/nls/loc
# cd /QOpenSys/lib/nls
# tar -chf $CHROOT_DIR/QOpenSys/lib/nls/loc.tar loc
# cd $CHROOT_DIR/QOpenSys/lib/nls
# tar -xf loc.tar
# )
#
:tar_dir
/QOpenSys/lib/nls/loc
====
example
====
[adc@oc7083008330 ibmichroot]$ ./chroot_setup.sh chroot_nls.lst /QOpenSys/ranger
mkdir -p /QOpenSys/ranger/QOpenSys/lib/nls/loc
cd /QOpenSys/lib/nls
tar -chf /QOpenSys/ranger/QOpenSys/lib/nls/loc.tar loc
cd /QOpenSys/ranger/QOpenSys/lib/nls
tar -xf loc.tar
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
i think we should handle tar version(s) as a different script. To wit, last conversation, PASE geometry rules ("the law"), following seems appropriate.
#!shell
# Command:
# > ./chroot_setup.sh chroot_nls.lst /QOpenSys/root_path
#
# tar list
# ( example based on /QOpenSys/lib/nls(/loc)
# mkdir -p $CHROOT_DIR/QOpenSys/lib/nls/loc
# tar -chf $CHROOT_DIR/QOpenSys/lib/nls/loc.tar /QOpenSys/lib/nls/loc
# cd $CHROOT_DIR/QOpenSys/lib/nls/loc/..
# tar -xf $CHROOT_DIR/QOpenSys/lib/nls/loc.tar
# )
#
:tar_dir
/QOpenSys/lib/nls/loc
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
I say we copy the whole thing to start (to fix CCSID issues) and then as time permits we can hone or make selection granular.
Here's how I (currently) tar
it:
cd /usr/lib
$ tar -cvhf /QOpenSys/ibmichroot/nls_loc.tar nls/loc/
Here's how I (currently) extract:
cd $env_path/usr/lib; tar -xf /QOpenSys/ibmichroot/nls_loc.tar
I put "currently" in parentheses because we need to determine if there is value in doing tar vs. copy. The value I've found with the tar approach is I can save off specific versions of runtimes. For example, I have node-v0.10.29.tar
and node-v0.10.35.tar
. If we take the tar approach, which I think we should, then we'd need to add that feature to both chroot_setup.sh
and pkg_setup.sh
. The xxxxx.lst addition could look like the following:
:tar
$CHROOT_DIR /dir/to/tar/nls_loc.tar
The one issue is should we include features to create a tar (i.e. nls_loc.tar) if it doesn't yet exist. Thoughts?
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
You have the ball. If yu need a new function in chroot_setup.sh for tar-me/move-me/untar-me let me know.
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
I do not know proper subset. Perhaps worse maybe language subset changes depending on language of choice. I just don't know, we may end up chasing our tails endlessly for 638MB. I am thinking we just copy the whole thing? What do you say?
Original report by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
Tried a PowerRuby environment without nls and it bails when accessing a page after the rails server has been started. Errors like:
After copying /usr/lib/nls into the chroot then everything worked as expected. The nls folder is big - about 638MB. So if we could find a way to selectively include files then that would be great. If not, copy everything.