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

Add an RPM spec for packaging #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

scj643
Copy link

@scj643 scj643 commented Mar 3, 2021

No description provided.

@t-kataym
Copy link
Contributor

@scj643 I'm so sorry for late response.

Could you explain what this PR is (functionality, usage, documentation for README)?

@mkgrgis
Copy link
Contributor

mkgrgis commented May 15, 2023

Some basic info about rpm.spec I have read on https://rpm-packaging-guide.github.io

@mkgrgis
Copy link
Contributor

mkgrgis commented May 25, 2023

@t-kataym, until @scj643 is inactive I can explain every line of this file. If we try to call rpmbuild -bs rpm.spec in main directory of this repository, we can get Frdora/RHEL source rpm package. In case of rpmbuild -bb rpm.spec we can get binary package rpm for active processor architecture. Hence fdw team can try this rpm on "minimum rpm" virtual machines of any rpm Linux distributive and check if installation process was successfully. Next step can be validating our rpm files during package teams of some Linux distributives.

@t-kataym
Copy link
Contributor

@mkgrgis , Thank you for your comment.
I expect to add a description related to this feature in README by this PR.

@mkgrgis
Copy link
Contributor

mkgrgis commented May 26, 2023

@t-kataym , added in my README.md PR, see mkgrgis@e8deabc

@t-kataym
Copy link
Contributor

@mkgrgis , Thank you for your explanation.
We will confirm rpm.spec and README.md.

@MinhLA1410
Copy link
Contributor

Hello @mkgrgis ,

To create rpm file, we have to define the specification of the source code location firstly.

  • If spec file processed source-code in %prep (download src, from link " Source0") , we don't need prepare source code. (1)
  • If no, we need prepare source code by create "Source code as tar file" and when build RPM file the user need to specify the source code location by -D option like : rpmbuild -bs -D "_sourcedir /PATH/TO/source.tar.bz2" rpm.spec (2)

For (2), User can create RPM file for any revisions of sqlite_fdw if user could only prepare source files.
So I have some comments:

* Version: 1.3.1:
current version is 2.3.0
* Source0: https://github.com/pgspider/sqlite_fdw/archive/v%{version}.tar.gz
We expect that the source code is located in ${HOME}/rpmbuild/SOURCES when executing rpmbuild. Could you fix it?
Please note that for users in README file.
* Missing %clean
* %{_datadir}/pgsql/extension/sqlite_fdw--1.0.sql
missing sqlite_fdw--1.0--1.1.sql
* In %file, please set required permissions and ownerships for files (use %defattr)
* Because spec file was created 3 years ago, please double check (build and install its package) carefully.

@mkgrgis
Copy link
Contributor

mkgrgis commented Jun 20, 2023

Hello, @MinhLA1410!
Thanks for reply. Because this is old PR from inactive @scj643, do you think I should clone this PR to other and fix described problems? Unfortunately I have no rpm environment but can try through debbuild Will this enough?

@MinhLA1410
Copy link
Contributor

@mkgrgis , Thank you for consider it. I also think you should use the latest sqlite_fdw source code to create another PR to fix the problems above.

debbuild is mostly to build debian packages (it's close to the Debian system but not to the Red Hat system).
Could you please try to use Red Had system (ex: centos7) then you just install rpm-build package like:
$ sudo yum install -y rpm-build

@mkgrgis
Copy link
Contributor

mkgrgis commented Jun 26, 2023

Thanks, @MinhLA1410 ! I am studying about Red Hat/CentOS. Before my full tests in proper environment I'll make a new PR with first fixes to contribution of @scj643.

@mkgrgis mkgrgis mentioned this pull request Jul 24, 2023
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

Successfully merging this pull request may close these issues.

4 participants