Skip to content

Conversation

@dbutenhof
Copy link
Member

Although the Agent spec file efficiently references directories to be packaged hierarchically, the Server spec file has a full list of the individual packaged files. This is unnecessarily awkward to maintain, and error prone.

The challenge here was some experimentation (the documentation is terrible) to figure out the order of precedence across the %attr and %defattr with directories and contained individual files. I added some comments in the spec file to clarify.

Although the Agent spec file efficiently references directories to be
packaged hierarchically, the Server spec file has a full list of the
individual packaged files. This is unnecessarily awkward to maintain,
and error prone.

The challenge here was some experimentation (the documentation
is terrible) to figure out the order of precedence across the %attr and
%defattr with directories and contained individual files. I added some
comments in the spec file to clarify.
@dbutenhof dbutenhof added Server packaging Issues related to software packaging Installation labels Mar 1, 2021
@dbutenhof dbutenhof added this to the v0.71 milestone Mar 1, 2021
@dbutenhof dbutenhof self-assigned this Mar 1, 2021
@dbutenhof
Copy link
Member Author

FYI, it's probably worth mentioning that I ran through several installs on my test VM to verify the behavior; the files are there, and the permissions look right. The RPM is available as 0.71.0-3gcca4629b9 on my dbutenhof/pbench-test on COPR.

Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

Seems good.

You don't want to use the directory-reference approach for the root directory, /%{installdir}/, as well? (Is there some hidden requirement/benefit to listing those files explicitly?) Would doing so allow you to omit listing anything else (except for the /%{installdir}/bin exception, the exception to that exception, and the other exception)?

@dbutenhof
Copy link
Member Author

Seems good.

You don't want to use the directory-reference approach for the root directory, /%{installdir}/, as well? (Is there some hidden requirement/benefit to listing those files explicitly?) Would doing so allow you to omit listing anything else (except for the /%{installdir}/bin exception, the exception to that exception, and the other exception)?

I briefly considered it; it'd mean trying to break in the middle of the assembly process and make sure there's nothing else that we don't want. I also thought that calling out the "installer config" type files explicitly was probably useful documentation.

@webbnh
Copy link
Member

webbnh commented Mar 1, 2021

Works for me.

@riya-17
Copy link
Member

riya-17 commented Mar 3, 2021

@dbutenhof So, how are they fetching files now or how is it working?

@dbutenhof
Copy link
Member Author

@dbutenhof So, how are they fetching files now or how is it working?

The RPM builder has always had the capability to process an entire directory tree with a single line in the %files section; the agent spec file was already using that, but the server for some reason wasn't.

The only tricky part here (requiring several build/install cycles to debug) was working out how to specify a directory tree with one %attr (or %defattr) set while overriding that for a specific file within that tree.

I submitted multiple builds to COPR and installed them on my VM to check the results.

@dbutenhof dbutenhof merged commit a0a3289 into distributed-system-analysis:main Mar 3, 2021
@dbutenhof dbutenhof deleted the spec branch March 3, 2021 12:55
@riya-17
Copy link
Member

riya-17 commented Mar 3, 2021

@dbutenhof So, how are they fetching files now or how is it working?

The RPM builder has always had the capability to process an entire directory tree with a single line in the %files section; the agent spec file was already using that, but the server for some reason wasn't.

The only tricky part here (requiring several build/install cycles to debug) was working out how to specify a directory tree with one %attr (or %defattr) set while overriding that for a specific file within that tree.

I submitted multiple builds to COPR and installed them on my VM to check the results.

Ohh That's how.. Thanks

riya-17 pushed a commit to riya-17/pbench that referenced this pull request Jul 6, 2021
Although the Agent spec file efficiently references directories to be
packaged hierarchically, the Server spec file has a full list of the
individual packaged files. This is unnecessarily awkward to maintain,
and error prone.

The challenge here was some experimentation (the documentation
is terrible) to figure out the order of precedence across the %attr and
%defattr with directories and contained individual files. I added some
comments in the spec file to clarify.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Installation packaging Issues related to software packaging Server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants