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

build: Drop --enable-old-bridge configure option #20213

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am EXTRA_FILES="$$(tr '\n' ' ' < $(srcdir)/.extra_dist) .extra_dist"
sed -i "s/[@]VERSION@/$(VERSION)/" "$(distdir)/src/client/org.cockpit_project.CockpitClient.metainfo.xml"
$(srcdir)/tools/fix-spec $(distdir)/tools/cockpit.spec $(VERSION)
test -z '$(HACK_SPEC_FOR_PYTHON)' || \
sed -i 's/\(define enable_old_bridge\) 1/\1 0/' $(distdir)/tools/cockpit.spec
sed -i "/^pkgver=/ s/0/$(VERSION)/" "$(distdir)/tools/arch/PKGBUILD"
sed -i "1 s/0/$(VERSION)/" "$(distdir)/tools/debian/changelog"
cp -r "$(srcdir)/dist" "$(distdir)"
Expand Down
11 changes: 2 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,8 @@ AC_ARG_ENABLE(ssh, AS_HELP_STRING([--disable-ssh], [Disable cockpit-ssh build an
AM_CONDITIONAL(WITH_COCKPIT_SSH, test "$enable_ssh" != "no")
AC_MSG_RESULT(${enable_ssh:=yes})

# --enable-old-bridge
AC_MSG_CHECKING([whether to install the old C cockpit-bridge])
AC_ARG_ENABLE(old_bridge, AS_HELP_STRING([--enable-old-bridge], [Install old C cockpit-bridge]))
AM_CONDITIONAL(WITH_OLD_BRIDGE, test "$enable_old_bridge" = "yes")
AC_MSG_RESULT(${enable_old_bridge:=no})
# TODO: remove this and clean up the old bridge in src/bridge/
AM_CONDITIONAL(WITH_OLD_BRIDGE, false)

AC_SEARCH_LIBS([argp_parse], [argp])
case "$ac_cv_search_argp_parse" in
Expand Down Expand Up @@ -369,10 +366,6 @@ AC_ARG_ENABLE([cockpit-client],
AC_MSG_RESULT($enable_cockpit_client)
AM_CONDITIONAL([ENABLE_COCKPIT_CLIENT], [test "$enable_cockpit_client" = "yes"])

if test "$enable_cockpit_client" = "yes" && test "$enable_old_bridge" = "yes"; then
AC_MSG_ERROR([--enable-cockpit-client conflicts with --enable-old-bridge])
fi

# Debug

AC_MSG_CHECKING([for debug mode])
Expand Down
7 changes: 0 additions & 7 deletions pkg/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ $(DIST_STAMP): $(srcdir)/package-lock.json $(PKG_INPUTS)

EXTRA_DIST += build.js files.js package.json package-lock.json

# This is how the qunit tests get included. We need to prevent automake from
# seeing them during ./autogen.sh, but need make to find them at compile time.
# We don't run them in the pybridge case since they're part of `pytest`.
if WITH_OLD_BRIDGE
-include $(wildcard pkg/Makefile.qunit*)
endif

INSTALL_DATA_LOCAL_TARGETS += install-bundles
install-bundles:
cd $(srcdir)/dist; find */* -type f -exec install -D -m 644 '{}' '$(abspath $(DESTDIR)$(datadir))/cockpit/{}' \;
Expand Down
2 changes: 0 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pytest-cov: $(BUILT_SOURCES) $(DIST_STAMP) $(MANIFESTS)
$(MAKE) test-server
cd '$(srcdir)' && abs_builddir='$(abs_builddir)' pytest --cov

if !WITH_OLD_BRIDGE
INSTALL_DATA_LOCAL_TARGETS += install-python
install-python:
@# wheel-based installation with .dist-info.
Expand All @@ -40,7 +39,6 @@ uninstall-python:
@# HACK: pip uninstall does not know about --root and --prefix
rm -r $(DESTDIR)$(prefix)/lib/python*/*-packages/cockpit \
$(DESTDIR)$(prefix)/lib/python*/*-packages/cockpit-*.dist-info
endif


# -----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/bridge/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ libcockpit_metrics_a_SOURCES = \
src/bridge/cockpitsamples.h \
$(NULL)

# TODO: remove all of the below
if WITH_OLD_BRIDGE
Comment on lines +42 to 43
Copy link
Member Author

Choose a reason for hiding this comment

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

FTR: I tried with if 0 or if REMOVE_ME etc., but none of that works. There just isn't a multi-line "disable this section" in automake that I know of 😢 I am happy to just remove the block here, but then we should also remove all the files (as this Makefile block is the reference list of which files can go), and then I step too much on Lis'es toes.


# -----------------------------------------------------------------------------
Expand Down
8 changes: 0 additions & 8 deletions src/ssh/Makefile-ssh.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ 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
33 changes: 0 additions & 33 deletions src/ssh/manifest.json

This file was deleted.

29 changes: 0 additions & 29 deletions src/ws/Makefile-ws.am
Original file line number Diff line number Diff line change
Expand Up @@ -132,35 +132,6 @@ test_kerberos_CPPFLAGS = $(libcockpit_ws_a_CPPFLAGS) $(TEST_CPP)
test_kerberos_LDADD = $(libcockpit_ws_a_LIBS) $(TEST_LIBS) $(krb5_LIBS)
test_kerberos_SOURCES = src/ws/test-kerberos.c

if WITH_OLD_BRIDGE

# These are -ws tests but they involve invoking ./cockpit-bridge.

TEST_PROGRAM += test-channelresponse
test_channelresponse_CPPFLAGS = $(libcockpit_ws_a_CPPFLAGS) $(TEST_CPP)
test_channelresponse_LDADD = $(libcockpit_ws_a_LIBS) $(TEST_LIBS)
test_channelresponse_SOURCES = src/ws/test-channelresponse.c

TEST_PROGRAM += test-handlers
test_handlers_CPPFLAGS = $(libcockpit_ws_a_CPPFLAGS) $(TEST_CPP)
test_handlers_LDADD = $(libcockpit_ws_a_LIBS) $(TEST_LIBS)
test_handlers_SOURCES = src/ws/test-handlers.c

TEST_PROGRAM += test-webservice
test_webservice_CPPFLAGS = $(libcockpit_ws_a_CPPFLAGS) $(TEST_CPP)
test_webservice_LDADD = $(libcockpit_ws_a_LIBS) $(TEST_LIBS)
test_webservice_SOURCES = src/ws/test-webservice.c

if WITH_COCKPIT_SSH

TEST_PROGRAM += test-authssh
test_authssh_CPPFLAGS = $(libcockpit_ws_a_CPPFLAGS) $(TEST_CPP)
test_authssh_LDADD = $(libcockpit_ws_a_LIBS) $(TEST_LIBS)
test_authssh_SOURCES = src/ws/test-authssh.c

endif
endif

noinst_PROGRAMS += mock-pam-conv-mod.so
mock_pam_conv_mod_so_SOURCES = src/ws/mock-pam-conv-mod.c
mock_pam_conv_mod_so_CFLAGS = -fPIC $(AM_CFLAGS)
Expand Down