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

initial RPM spec (#1) #4

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

initial RPM spec (#1) #4

wants to merge 6 commits into from

Conversation

zackse
Copy link

@zackse zackse commented Oct 17, 2018

This adds a new make target rpm. Note: the rpmdevtools package is required for rpmbuild and spectool.

I did not include a systemd unit or crontab (from the SysV install script). Do you have a preference? We can make the systemd unit conditional in the RPM spec if desired.

$ make rpm
mkdir -p /home/zackse/rpmbuild/SOURCES
spectool --get-files --sourcedir memdisk-cloudwatch.spec
Getting https://github.com/AndrianBdn/memdisk-cloudwatch/releases/download/v0.9.2/memdisk-cloudwatch-x86_64.gz to /home/zackse/rpmbuild/SOURCES/memdisk-cloudwatch-x86_64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2314k  100 2314k    0     0  1767k      0  0:00:01  0:00:01 --:--:-- 2227k
rpmbuild -ba  memdisk-cloudwatch.spec
...
Wrote: /home/zackse/rpmbuild/RPMS/x86_64/memdisk-cloudwatch-0.9.2-1.el7.centos.x86_64.rpm

$ rpm -qplv /home/zackse/rpmbuild/RPMS/x86_64/memdisk-cloudwatch-0.9.2-1.el7.centos.x86_64.rpm
-rwxr-xr-x    1 root    root                  4970064 Oct 17 08:33 /usr/bin/memdisk-cloudwatch

@AndrianBdn
Copy link
Owner

Hi! Thank you for the pull request. I don't have any preferences, but rpm package still needs to install the service in the system. This is the expected behavior of virtually any rpm(or deb) package.

So... if this is RPM for CentOS 6, it must add SysV-style init scrips (I don't think that rpm packages ever modify user's crontab). If it is RPM for CentOS 7 is must include systemd scripts. Great if it can be both.

@zackse
Copy link
Author

zackse commented Oct 17, 2018

For now, I added the systemd unit -- my standard build environment is CentOS 7 these days. If we need to support both systemd and SysV init, we'd probably want additional packages in the RPM with suffixes -systemd and/or -sysv for example, as is done in the epel clamav package (https://src.fedoraproject.org/rpms/clamav/blob/master/f/clamav.spec).

I'm not sure if it's worth the effort, though, since systemd seems to be taking over...

Copy link
Owner

@AndrianBdn AndrianBdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Please add a few words about this 'make rpm' target to README.md. Note that it requires systemd. Also I find it a bit strange that we're downloading binary from GitHub release here, can we use a local binary? Thanks.

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.

2 participants