ksh icon indicating copy to clipboard operation
ksh copied to clipboard

creating an rpm of ksh from repo

Open sunchill06 opened this issue 4 years ago • 6 comments

@jelmd/All,

Thanks for maintaining this. I wanted to know if there is a way to create an rpm out of this out of the box? or a tar may be?

/bin/package write rpm ? Thanks in advance.

sunchill06 avatar Jun 09 '20 04:06 sunchill06

Hey @sunchill06

Not according to this:

https://github.com/ksh-community/ksh/blob/e7f25423818abe159edf52f5799d66bd3621ab0b/lib/package/package.mk#L1146-L1147

dannyweldon avatar Jun 09 '20 12:06 dannyweldon

Thanks Danny, any other options then? I have to use it as an rpm in my deployment?

On Tue, Jun 9, 2020, 5:40 PM Danny Weldon [email protected] wrote:

Hey @sunchill06 https://github.com/sunchill06

Not according to this:

https://github.com/ksh-community/ksh/blob/e7f25423818abe159edf52f5799d66bd3621ab0b/lib/package/package.mk#L1146-L1147

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ksh-community/ksh/issues/15#issuecomment-641247986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMLPEC7GWUNBU452KFM7EDRVYREHANCNFSM4NZAZLXQ .

sunchill06 avatar Jun 09 '20 13:06 sunchill06

You could generate a tar using the commands that Lefteris posted or some combination of that. I have it in a script but I don't have it handy.

For an rpm, I would search for the RedHat or CentOS ksh SRPM to find out how it is generated and try that. Of course, we could look at incorporating that into package.mk but it would not be high on our agenda, but a PR would be welcome.

dannyweldon avatar Jun 09 '20 13:06 dannyweldon

I actually tried the commamds that lefteris suggested, but it complains that nmake is required for that. See when you get some spare time to look for the script that you talked about.

Meanwhile I will also look for something based in your suggestions .

Thanks again.

On Tue, Jun 9, 2020, 7:10 PM Danny Weldon [email protected] wrote:

You could generate a tar using the commands that Lefteris posted or some combination of that. I have it in a script but I don't have it handy.

For an rpm, I would search for the RedHat or CentOS ksh SRPM to find out how it is generated and try that. Of course, we could look at incorporating that into package.mk but it would not be high on our agenda, but a PR would be welcome.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ksh-community/ksh/issues/15#issuecomment-641304287, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMLPECNSNXXII6MJPTXHILRVY3U3ANCNFSM4NZAZLXQ .

sunchill06 avatar Jun 09 '20 14:06 sunchill06

Well, just google for a ksh.spec file, download and copy it to e.g. /tmp/. Remove all BuildRequires: directives, and if you already have a ksh, set this to use, e.g.

cd $BUILDDIR/ksh
sed -i -e '1 i\%define _buildshell /bin/ksh93' -e '/^BuildRequires:/ d' /tmp/ksh.spec
touch ./skipcheck

Now remove the %prep and %build section form /tmp/ksh.spec as well as all lines in the %install and %files section, which mentions a file you do not have. Finally run:

rpmbuild -bb --buildroot=/tmp/proto --noprep --nocheck -v ksh.spec

and you should get a ~/rpmbuild/RPMS/x86_64/ksh-*.rpm

Anyway, usually one should use the packages from its distro vendor unless it does not satisfy your needs.

jelmd avatar Jun 09 '20 21:06 jelmd

I actually tried the commamds that lefteris suggested, but it complains that nmake is required for that.

What if you build and install nmake first?

saper avatar Jun 11 '20 07:06 saper