Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating an rpm of ksh from repo #15

Open
sunchill06 opened this issue Jun 9, 2020 · 6 comments
Open

creating an rpm of ksh from repo #15

sunchill06 opened this issue Jun 9, 2020 · 6 comments

Comments

@sunchill06
Copy link

@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
Copy link
Member

Hey @sunchill06

Not according to this:

ksh/lib/package/package.mk

Lines 1146 to 1147 in e7f2542

.binary.exp .binary.pkg .binary.rpm : .MAKE
error 3 $(style): binary package style not supported yet

@sunchill06
Copy link
Author

sunchill06 commented Jun 9, 2020 via email

@dannyweldon
Copy link
Member

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
Copy link
Author

sunchill06 commented Jun 9, 2020 via email

@jelmd
Copy link
Member

jelmd commented Jun 9, 2020

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
Copy link

saper commented Jun 11, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants