sqlite_fdw
sqlite_fdw copied to clipboard
Add an RPM spec for packaging
@scj643 I'm so sorry for late response.
Could you explain what this PR is (functionality, usage, documentation for README)?
Some basic info about rpm.spec
I have read on https://rpm-packaging-guide.github.io
@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.
@mkgrgis , Thank you for your comment. I expect to add a description related to this feature in README by this PR.
@t-kataym , added in my README.md PR, see https://github.com/mkgrgis/sqlite_fdw/commit/e8deabcc2b29e69e5f9abcd633ffe4f2afe6d938
@mkgrgis , Thank you for your explanation.
We will confirm rpm.spec and README.md.
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.
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?
@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
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.