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

Always create archive of sources when building RPM #540

Merged
merged 1 commit into from
Jul 18, 2019
Merged

Always create archive of sources when building RPM #540

merged 1 commit into from
Jul 18, 2019

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Jun 27, 2019

The SCM plugin for mock will create an archive of the sources if either this marker file is present in the root of the project or the write_tar option is specified in mock's configuration.

The way bloom works, we always want to archive the sources, but this isn't the default configuration of the SCM plugin. Writing this marker file means one less configuration is necessary when consuming the
release repo to build the RPMs with mock.

More info: https://fedoraproject.org/wiki/Projects/Mock/Plugin/Scm#Tar_file

@cottsay cottsay requested a review from nuclearsandwich June 27, 2019 00:44
@cottsay cottsay self-assigned this Jun 27, 2019
@nuclearsandwich
Copy link
Contributor

@cottsay it looks like this change still has some CI failures.

@cottsay
Copy link
Member Author

cottsay commented Jul 2, 2019

Yeah, I'm still working on this one.

@cottsay
Copy link
Member Author

cottsay commented Jul 2, 2019

Okay, I fixed it. This is now ready for review like the other two RPM PRs.

@nuclearsandwich
Copy link
Contributor

nuclearsandwich commented Jul 3, 2019

@cottsay this .write_tar file lands outside the templated rpm directory, which is why we can't add this by placing an empty template file?

@cottsay
Copy link
Member Author

cottsay commented Jul 3, 2019

That was my logic, yes.

@nuclearsandwich
Copy link
Contributor

As is this change is going to create a conflict with @lennonwoo's work refactoring the template placement so it isn't platform specific.

I'm not sure whether plain overloading or a hook style system is the right way to go but I think both of you are closer to it than I am.

@lennonwoo
Copy link

Could we put the logic into generate_rpm function there?

The SCM plugin for mock will create an archive of the sources if either
this marker file is present in the root of the project or the
`write_tar` option is specified in mock's configuration.

The way bloom works, we always want to archive the sources, but this
isn't the default configuration of the SCM plugin. Writing this marker
file means one less configuration is necessary when consuming the
release repo to build the RPMs with mock.
@cottsay
Copy link
Member Author

cottsay commented Jul 15, 2019

At first glance I didn't think I could use generate_rpm without some refactoring because the path given to that function is the RPM subdirectory, but after looking more closely, it is given only the subdirectory name and the path to the root of the repo is assumed to be CWD.

So that simplified the change. Good call, @lennonwoo!

@cottsay
Copy link
Member Author

cottsay commented Jul 16, 2019

From what I can tell, we'll still have to perform a merge, but I think this will still mesh with the generator refactor.

@lennonwoo
Copy link

Year, this and #534 should be merged first, then we can do rebase to the generator refactor.

@cottsay cottsay merged commit 07d8f1c into ros-infrastructure:master Jul 18, 2019
@cottsay cottsay deleted the rpm_write_tar branch July 18, 2019 22:35
lennonwoo pushed a commit to lennonwoo/bloom that referenced this pull request Aug 10, 2019
…e#540)

The SCM plugin for mock will create an archive of the sources if either
this marker file is present in the root of the project or the
`write_tar` option is specified in mock's configuration.

The way bloom works, we always want to archive the sources, but this
isn't the default configuration of the SCM plugin. Writing this marker
file means one less configuration is necessary when consuming the
release repo to build the RPMs with mock.

Signed-off-by: Scott K Logan <logans@cottsay.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants