Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Document rpm build process #118

Closed
ldormoy opened this issue Feb 7, 2018 · 5 comments
Closed

Document rpm build process #118

ldormoy opened this issue Feb 7, 2018 · 5 comments

Comments

@ldormoy
Copy link

ldormoy commented Feb 7, 2018

Metadata:

  • Operating System: Ubuntu 16.04
  • Installation method: RPM
  • AWS CLI Version: aws-cli/1.14.34 Python/2.7.12 Linux/4.4.0-1050-aws botocore/1.8.38
    (describe your issue here)

I would like to build my own rpm package from the sources (to avoid modifying the config after installation), but I get this error:
error: Unable to open install_configure_sshd.sh: No such file or directory

Could you give me some details about how your build process? Thanks!

@ldormoy
Copy link
Author

ldormoy commented Feb 7, 2018

I found the rpmbuild command line in #104
It's helpful, I'll give it a try

@michaelwittig
Copy link
Contributor

in the rpmspec, you will find a few lines starting with %include
make sure to replace those placeholders with the contents of the files.

After that, use the command from #104

@ldormoy
Copy link
Author

ldormoy commented Feb 7, 2018

replacing the placeholders with the content of the files also doesn't work as intended, as some variables like SSHD_CONFIG_FILE are not defined.

Anyway, I can now build and will adapt the post-install step to my needs. Thanks for your quick support @michaelwittig .

I will spend some time testing alternative build methods (I also need a debian package), probably using fpm and will give you some feedback if I succeed.

@ldormoy ldormoy closed this as completed Feb 7, 2018
@michaelwittig
Copy link
Contributor

yes, you are right. the variables are also replaced. the solution is not very clean. the goal was to not have duplication in install.sh and the RPM. so I ended up with this hack..

regarding the deb package you can have a look at #109

@ldormoy
Copy link
Author

ldormoy commented Feb 8, 2018

How could I miss #109! I tested it and it works fine. I also like the pkg/ directory to regroup postinst and postrm scripts.

BTW I tested fpm to build the rpm package, it works fine. You just have to replace the "-t deb" by "-t rpm". I will definitely use it to build both package types with jenkins. You could maybe reuse the pkg/ scripts in install.sh, to get rid of the code duplication?

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

No branches or pull requests

2 participants