ksh-community / ksh

ksh93 maintenance and development
Eclipse Public License 1.0
26 stars 11 forks source link

creating an rpm of ksh from repo #15

Open sunchill06 opened 4 years ago

sunchill06 commented 4 years ago

@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.

dannyweldon commented 4 years ago

Hey @sunchill06

Not according to this:

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

sunchill06 commented 4 years ago

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 notifications@github.com 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 .

dannyweldon commented 4 years ago

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.

sunchill06 commented 4 years ago

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 notifications@github.com 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 .

jelmd commented 4 years ago

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.

saper commented 4 years ago

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?