Skip to content

Merge daemon binary into main binary - #292

Closed
cgwalters wants to merge 2 commits into
coreos:masterfrom
cgwalters:merge-daemon-into-main
Closed

cgwalters wants to merge 2 commits into
coreos:masterfrom
cgwalters:merge-daemon-into-main

Conversation

@cgwalters

Copy link
Copy Markdown
Member

The actual problem I am trying to fix with this is fallout from the
introduction of /usr/libexec/rpm-ostreed, which required a SELinux
policy change. Specifically for CentOS, the base policy is rev'd
slowly.

My hope was that by merging the daemon code back into /usr/bin/rpm-ostree
which is labeled install_exec_t, starting via systemd would do
the right thing. It turns out that doesn't happen.

I looked at PackageKit, i.e. /usr/libexec/packagekitd which is
actually labeled as rpm_exec_t (rpm_t at runtime).

So I think we should change SELinux policy to do that.

However - there are still benefits to this change, namely we avoid
more duplicated text (libglnx, internal helpers) between the two
binaries.

@rh-atomic-bot

Copy link
Copy Markdown

☔ The latest upstream changes (presumably e063754) made this pull request unmergeable. Please resolve the merge conflicts.

@cgwalters
cgwalters force-pushed the merge-daemon-into-main branch from 207394c to 308d336 Compare May 29, 2016 16:58
@cgwalters

Copy link
Copy Markdown
Member Author

Rebased 🏄

}


opt_context = g_option_context_new ("rpm-ostreed -- rpm-ostree daemon");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is already set above.

Also, should that string be changed to simply e.g. - rpm-ostree daemon ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I mean, since the executable itself will no longer be called rpm-ostreed. Though I guess the systemd service will still be the same.

@jlebon

jlebon commented May 31, 2016

Copy link
Copy Markdown
Member

Cool, makes sense. I don't see any disadvantages from merging them. @mbarnes, @giuseppe Any thoughts?

BTW, link to log files should work now.
Seems like this will also need some tweaks to the testing harness:

Activating service name='org.projectatomic.rpmostree1'
Activated service 'org.projectatomic.rpmostree1' failed: Failed to execute program org.projectatomic.rpmostree1: No such file or directory
error: Error calling StartServiceByName for org.projectatomic.rpmostree1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program org.projectatomic.rpmostree1: No such file or directory
File 'OUTPUT-status.txt' doesn't match regexp '1\.0\.10'
FAIL: rpm-ostree/test-basic.sh.test (Child process exited with code 1)

@cgwalters cgwalters added the WIP label Jun 1, 2016
@cgwalters

Copy link
Copy Markdown
Member Author

On the other hand it doesn't actually fix anything right now, and I could imagine it makes some things worse. I don't want to close this but let's back burner it for now.

@rh-atomic-bot

Copy link
Copy Markdown

☔ The latest upstream changes (presumably 81cc46d) made this pull request unmergeable. Please resolve the merge conflicts.

@cgwalters
cgwalters force-pushed the merge-daemon-into-main branch from 308d336 to 6a762e1 Compare January 28, 2017 11:55
@cgwalters cgwalters removed the WIP label Jan 28, 2017
@cgwalters

Copy link
Copy Markdown
Member Author

I decided we do want this, it'll make doing multiprocessing easier. The space savings is nice too.

The actual problem I am trying to fix with this is fallout from the
introduction of `/usr/libexec/rpm-ostreed`, which required a SELinux
policy change.  Specifically for CentOS, the base policy is rev'd
slowly.

My hope was that by merging the daemon code back into `/usr/bin/rpm-ostree`
which is labeled `install_exec_t`, starting via systemd would do
the right thing.  It turns out that doesn't happen.

Now later, I'm picking this patch back up because I want to do multprocessing in
the daemon (and in the core), and it makes sense to share code between them,
because multiprocessing will need to go through a re-exec path.

Another benefit is we avoid duplicated text (libglnx, internal helpers) between
the two binaries.
@cgwalters
cgwalters force-pushed the merge-daemon-into-main branch from 6a762e1 to 11a9726 Compare January 28, 2017 12:24
@jlebon

jlebon commented Feb 7, 2017

Copy link
Copy Markdown
Member

Reviewed 🔍 and tested. ✔️

@rh-atomic-bot r+ 36d3c34

@rh-atomic-bot

Copy link
Copy Markdown

⌛ Testing commit 36d3c34 with merge 687567d...

@rh-atomic-bot

Copy link
Copy Markdown

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing 687567d to master...

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 31, 2017
I think this was a conceptual merge conflict from
coreos#292
and
coreos#598

Also I noticed we weren't consistently using `@primaryname@`...
will fix that when we get back to the renaming PR.
rh-atomic-bot pushed a commit that referenced this pull request Apr 4, 2017
I think this was a conceptual merge conflict from
#292
and
#598

Also I noticed we weren't consistently using `@primaryname@`...
will fix that when we get back to the renaming PR.

Closes: #716
Approved by: jlebon
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.

3 participants