Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

build/stage1: support local systemd source for offline builds #3746

Merged
merged 1 commit into from Aug 8, 2017
Merged

build/stage1: support local systemd source for offline builds #3746

merged 1 commit into from Aug 8, 2017

Conversation

dm0-
Copy link
Contributor

@dm0- dm0- commented Jul 20, 2017

Local systemd source trees are useful here for packagers to build usr_from_src without requiring network access. This differentiates between local and remote systemd sources by checking if the value from ./configure contains "://". If the string is found, the build will preserve existing behavior. If not, the value is interpreted as a direct specification of the source directory path.

@squeed squeed self-assigned this Jul 24, 2017
@lucab lucab added this to the 1.29.0 milestone Jul 28, 2017
@lucab
Copy link
Member

lucab commented Aug 3, 2017

@fabiokung would you mind a review and perhaps a quick test that it doesn't break your setup?

@fabiokung
Copy link
Contributor

@lucab will do.

Meanwhile, I've been using --with-stage1-systemd-src=file:///path/to/local/clone on a local clone without network access successfully for a while. Is that good enough, or do we really need to support non-git repos locally?

@dm0-
Copy link
Contributor Author

dm0- commented Aug 3, 2017

This is for building RPMs where you'd only have the source archive, so yes, it is best to not require Git.

@fabiokung
Copy link
Contributor

My custom stage1-src flavor build works fine with this. Only two nits:

  • --with-stage1-systemd-revision is a noop when the systemd src dir is not a git repo. Add a few sentences explaining this on ./configure --help (or docs elsewhere)?
  • make clean will wipe your local systemd directory, which bit me a few times as I was pointing to a local source directory I was working on. Consider disabling the rm -rf ${RKT_STAGE1_SYSTEMD_SRC} when it is a local dir, or copy contents elsewhere for the build.

Otherwise LGTM.

Local systemd source trees are useful here for packagers to build
usr_from_src without requiring network access.  This differentiates
between local and remote systemd sources by checking if the value
from ./configure contains "://".  If the string is found, the build
will preserve existing behavior.  If not, the value is interpreted
as the source directory path on the build system.
@dm0-
Copy link
Contributor Author

dm0- commented Aug 7, 2017

I've added a note to the revision option description, and I've changed the Makefile to copy the local directory instead of using it directly. This should handle make clean properly, and it's probably better for using non-temporary systemd source paths anyway, since the build system would write additional files into the source directory.

@fabiokung
Copy link
Contributor

cool, re-tested and LGTM.

I should mention that I didn't have any custom patch files being applied to systemd, so I didn't test that. But glancing at the code applying them, it looks fine to me.

@lucab lucab unassigned squeed Aug 8, 2017
Copy link
Member

@lucab lucab left a comment

Choose a reason for hiding this comment

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

LGTM

@lucab lucab changed the title stage1-usr: Support local systemd source for offline builds build/stage1: support local systemd source for offline builds Aug 8, 2017
@lucab lucab merged commit 142050d into rkt:master Aug 8, 2017
@dm0- dm0- deleted the src branch August 8, 2017 15:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants