Skip to content

Commit

Permalink
build: Drop ssh manifest.json for pybridge install
Browse files Browse the repository at this point in the history
Move the ssh manifest out of pkg/; there is nothing to be esbuilt or
watched, it's just a single configuration file for the cockpit-ssh
program.

We also don't need it with the Python bridge, as that handles remote
hosts internally. Direct remote logins from the login page call
cockpit-ssh directly, not via the manifest. So conditionalize its
installation on the C bridge.
  • Loading branch information
martinpitt authored and allisonkarlitskaya committed Oct 5, 2023
1 parent d5548b5 commit 75c8b25
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
3 changes: 0 additions & 3 deletions pkg/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ EXTRA_DIST += \
pcpmanifestdir = $(datadir)/cockpit/pcp
dist_pcpmanifest_DATA = pkg/pcp/manifest.json

sshmanifestdir = $(datadir)/cockpit/ssh
dist_sshmanifest_DATA = pkg/ssh/manifest.json

# one built file in dist/ which we use as dependency
DIST_STAMP = $(srcdir)/dist/static/manifest.json

Expand Down
8 changes: 8 additions & 0 deletions src/ssh/Makefile-ssh.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ cockpit_ssh_CPPFLAGS = $(libcockpit_ssh_a_CPPFLAGS)
cockpit_ssh_LDADD = $(libcockpit_ssh_a_LIBS)
cockpit_ssh_SOURCES = src/ssh/ssh.c

# -----------------------------------------------------------------------------
# C bridge config; Python bridge handles it internally

if WITH_OLD_BRIDGE
sshmanifestdir = $(datadir)/cockpit/ssh
dist_sshmanifest_DATA = src/ssh/manifest.json
endif

# -----------------------------------------------------------------------------
# mock-ssh

Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion tools/cockpit.spec
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,10 @@ echo '%dir %{_datadir}/cockpit/base1' >> base.list
find %{buildroot}%{_datadir}/cockpit/base1 -type f -o -type l >> base.list
echo '%{_sysconfdir}/cockpit/machines.d' >> base.list
echo %{buildroot}%{_datadir}/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy >> base.list
%if 0%{?enable_old_bridge} && 0%{?build_basic}
echo '%dir %{_datadir}/cockpit/ssh' >> base.list
find %{buildroot}%{_datadir}/cockpit/ssh -type f >> base.list
%endif
echo '%{_libexecdir}/cockpit-ssh' >> base.list

echo '%dir %{_datadir}/cockpit/pcp' > pcp.list
Expand Down Expand Up @@ -273,7 +275,7 @@ find %{buildroot}%{_datadir}/cockpit/static -type f >> static.list

# when not building basic packages, remove their files
%if 0%{?build_basic} == 0
for pkg in base1 branding motd kdump networkmanager selinux shell sosreport ssh static systemd users metrics; do
for pkg in base1 branding motd kdump networkmanager selinux shell sosreport static systemd users metrics; do
rm -r %{buildroot}/%{_datadir}/cockpit/$pkg
rm -f %{buildroot}/%{_datadir}/metainfo/org.cockpit-project.cockpit-${pkg}.metainfo.xml
done
Expand Down
1 change: 0 additions & 1 deletion tools/debian/cockpit-bridge.install
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ usr/lib/cockpit/cockpit-askpass
usr/lib/cockpit/cockpit-ssh
usr/lib/python*
usr/share/cockpit/base1/
usr/share/cockpit/ssh/
usr/share/man/man1/cockpit-bridge.1
usr/share/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy

0 comments on commit 75c8b25

Please sign in to comment.