Closed abmusse closed 6 years ago
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
This is no longer relevant with the introduction of yum. Resolving issue.
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
Oh, i forgot to respond. I am ok with your change for single-line-shell-ninjas. That is, we should debug problems (general), but completely fine to introduce additional advanced functions for script ninjas (if work).
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
Cowards way out here ... we don't know what is going on ... so we invent something to make it never happen. I think we should understand what is happening.
Agreed. I will see if I can get to it next week.
Maybe ... but ... actually, we need something like it works today, aka, when rpm is already downloaded, it will not download again. Yes???
If we added a :wget
section, then yes, I would expect it to check if file already exists in current/local directory. If we add :sh
and someone puts a raw wget
in there then I would expect it to download regardless of whether the rpm already exists.
Or if single-line-shell-ninjas are present they can do this:
if [ ! -e nginx-1.9.4-1.aix5.3.ppc.rpm ]; then wget http://www.oss4aix.org/download/everything/RPMS/nginx-1.9.4-1.aix5.3.ppc.rpm; fi
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
Or, for exceptions like this, we can just put wget in the :sh section:
Maybe ... but ... actually, we need something like it works today, aka, when rpm is already downloaded, it will not download again. Yes???
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
No, but the issue has occurred on three separate machines. I figure we can't change the perzl rpm files so it would be best that we have means of massaging installs.
Cowards way out here ... we don't know what is going on ... so we invent something to make it never happen. I think we should understand what is happening.
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
Part of the :rpm is the "download" from the web. You may have to introduce a new key work :wget perhaps ... argh getting ugly in here
Or, for exceptions like this, we can just put wget
in the :sh
section:
:sh
wget http://www.oss4aix.org/download/everything/RPMS/nginx-1.9.4-1.aix5.3.ppc.rpm
rpm --ignoreos --ignorearch --replacepkgs --nodeps -hUv --noscripts nginx-1.9.4-1.aix5.3.ppc.rpm
Back step ... do you know exactly why the rpm load hung ???
No, but the issue has occurred on three separate machines. I figure we can't change the perzl rpm files so it would be best that we have means of massaging installs.
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
Oh, well, you are not a good test case ...
Part of the :rpm is the "download" from the web. You may have to introduce a new key work :wget perhaps ... argh getting ugly in here
Back step ... do you know exactly why the rpm load hung ???
Original comment by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
1) i don't know what the global effect of hard coding --noscripts for everything.
My (forthcoming) change wouldn't touch existing rpm
code in pkg_setup.sh
...
note pkg_setup.sh doesn't currently support :sh
. Instead it only supports :rpm
and :file
. I am proposing the addition of :sh
. Guessing other chroot_setup.sh
features might follow (i.e. :mkdir
, :ln
) but :sh
is the only one I need right now.
The pkg_perzl-nginx-xxxx.lst file would then look like the following. Note the lack of an :rpm
line for the nginx rpm and instead it is done in :sh
.
:file
pkg_perzl_bash-4.3.lst
:rpm
http://www.oss4aix.org/download/everything/RPMS/bzip2-1.0.5-3.aix5.3.ppc.rpm
. . . extra lines suppressed for brevity . . .
http://www.oss4aix.org/download/everything/RPMS/zlib-1.2.4-2.aix5.1.ppc.rpm
:sh
rpm --ignoreos --ignorearch --replacepkgs --nodeps -hUv --noscripts nginx-1.9.4-1.aix5.3.ppc.rpm
Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).
Go ahead and experiment. If works, push it up.
Hesitation ...
1) i don't know what the global effect of hard coding --noscripts for everything.
2) I thought :sh already worked, so what is changing for :sh?
Original report by Aaron Bartell (Bitbucket: aaronbartell, GitHub: aaronbartell).
tl;dr
By default this is the
rpm
command that's invoked for installing nginx:It was hanging on the install scripts so I added
--noscripts
, as shown below, and now nginx installs and works fine. I haven't determined what the install scripts are failing to accomplish.More details...
Installing the perzl nginx requires a slight modification to the
rpm
command. I documented the process in this article.Below is a proposed
pkg_perzl_nginx-1.9.4-1.lst
(not yet in repo) that works up to the last rpm (the nginx one). Again, details are in aforementioned article.Proposal
I am guessing we will have more situations like this that require custom massaging during install. After thinking about it a bit I believe the most flexible solution will be to allow
:sh
sections to be processed inpkg_perzl_xxxxx.lst
files. This way an customer shell command can be invoked in the order it is found.For example:
I haven't yet drawn up the changes to
pkg_setup.sh
because I wanted to wait for your input.Thoughts?