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 scratch-rpm makefile target #91

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

nmeyerhans
Copy link
Contributor

Issue #, if available: n/a

Description of changes:

I've found it convenient when developing this package to be able to quickly generate an rpm based on an unreleased branch. So, this change a scratch-rpm makefile target that does just this.

[ec2-user@ip-10-0-1-138 amazon-ec2-net-utils]$ make scratch-rpm
tar czf ../amazon-ec2-net-utils-2.3.0-5-g3d64d70.tar.gz --exclude=.git --transform 's,^./,./amazon-ec2-net-utils-2.3.0-5-g3d64d70/,' .
rpmbuild -D "_sourcedir /home/ec2-user/amazon-ec2-net-utils/.." -D "_source_version_suffix -5-g3d64d70" \
         -D "_rpm_version_suffix .5.g3d64d70" -bb amazon-ec2-net-utils.spec
...
Wrote: /home/ec2-user/rpmbuild/RPMS/noarch/amazon-ec2-net-utils-2.3.0.5.g3d64d70-1.amzn2023.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.IMmBGI
+ umask 022
+ cd /home/ec2-user/rpmbuild/BUILD
+ cd amazon-ec2-net-utils-2.3.0-5-g3d64d70
+ /usr/bin/rm -rf /home/ec2-user/rpmbuild/BUILDROOT/amazon-ec2-net-utils-2.3.0.5.g3d64d70-1.amzn2023.x86_64
+ RPM_EC=0
++ jobs -p
+ exit 0

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The ability to generate an rpm from a work tree with a single command
is useful during development and testing.
@nmeyerhans nmeyerhans merged commit eb5d784 into amazonlinux:main Sep 21, 2023
3 checks passed
@nmeyerhans nmeyerhans deleted the scratch-rpm-rebuilds branch September 21, 2023 21:56
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