summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-06-30 16:33:09 +0200
committerJulian Andres Klode <jak@debian.org>2017-06-30 16:33:09 +0200
commitc6a428e4d17b408c2701def5daa46ca950948980 (patch)
tree57cb3552e76ff32f7b3a7a758dfa17c53db9d911
parent46c31341ef4b09bb3509ebbc49416e34b68e1be4 (diff)
Switch to 'http' as the default https method
The old curl based method is still available as 'curl', 'curl+http', and 'curl+https'.
-rw-r--r--.travis.yml2
-rw-r--r--CMakeLists.txt1
-rw-r--r--debian/NEWS9
-rw-r--r--debian/apt-transport-https.install4
-rw-r--r--debian/control13
-rwxr-xr-xdebian/rules2
-rw-r--r--methods/CMakeLists.txt17
-rw-r--r--methods/curl.cc (renamed from methods/https.cc)2
-rw-r--r--methods/curl.h (renamed from methods/https.h)0
-rw-r--r--po/CMakeLists.txt2
-rwxr-xr-xtest/integration/test-apt-update-failure-propagation2
11 files changed, 39 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml
index b3c4fb806..1f461422b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,8 +5,8 @@ services:
- docker
env:
- USER=travis CMAKE_FLAGS=
- - USER=travis CMAKE_FLAGS="-DWITH_DOC=OFF -DWITH_CURL=OFF"
- USER=root CMAKE_FLAGS=-DWITH_DOC=OFF
+ - USER=travis CMAKE_FLAGS="-DWITH_DOC=OFF -DFORCE_CURL=ON"
install:
- sed -i -e "s#1000#$(id -u)#g" Dockerfile
- docker build --tag=apt-ci .
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc15851ce..8bc52036b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,6 +79,7 @@ endif()
# apt-transport-https dependencies
option(WITH_CURL "Build curl-based methods" ON)
if (WITH_CURL)
+ option(FORCE_CURL "Use curl-based methods" OFF)
find_package(CURL REQUIRED)
if (CURL_FOUND)
set(HAVE_CURL 1)
diff --git a/debian/NEWS b/debian/NEWS
index 5722ca0c5..4afb403ca 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -1,3 +1,12 @@
+apt (1.5~alpha4) UNRELEASED; urgency=medium
+
+ The apt package now installs the http method for https access, the
+ apt-transport-https package is deprecated, and installs a curl method
+ now that can be used as a fallback with curl+https URLs, or by setting
+ Dir::Bin::Methods::https to "curl".
+
+ -- Julian Andres Klode <jak@debian.org> Fri, 30 Jun 2017 15:26:44 +0200
+
apt (1.5~alpha1) experimental; urgency=medium
[ Changes to unauthenticated repositories ]
diff --git a/debian/apt-transport-https.install b/debian/apt-transport-https.install
index 7b14886df..4849f1484 100644
--- a/debian/apt-transport-https.install
+++ b/debian/apt-transport-https.install
@@ -1 +1,3 @@
-usr/lib/apt/methods/https
+usr/lib/apt/methods/curl
+usr/lib/apt/methods/curl+http
+usr/lib/apt/methods/curl+https
diff --git a/debian/control b/debian/control
index 4f9043d22..896f98783 100644
--- a/debian/control
+++ b/debian/control
@@ -36,8 +36,9 @@ Depends: adduser,
${apt:keyring},
${misc:Depends},
${shlibs:Depends}
-Replaces: apt-utils (<< 1.3~exp2~)
-Breaks: apt-utils (<< 1.3~exp2~)
+Replaces: apt-utils (<< 1.3~exp2~), apt-transport-https (<< 1.5~alpha4~)
+Breaks: apt-utils (<< 1.3~exp2~), apt-transport-https (<< 1.5~alpha4~)
+Provides: apt-transport-https (= ${binary:Version})
Recommends: ca-certificates
Suggests: apt-doc,
aptitude | synaptic | wajig,
@@ -148,10 +149,10 @@ Description: package management related utility programs
Package: apt-transport-https
Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}, apt (>= 1.5~alpha4~)
Recommends: ca-certificates
Priority: optional
-Description: https download transport for APT
+Description: Transitional package: curl-https download transport for APT
This package enables the usage of 'deb https://foo distro main' lines
in the /etc/apt/sources.list so that all package managers using the
libapt-pkg library can access metadata and packages available in sources
@@ -159,3 +160,7 @@ Description: https download transport for APT
.
This transport supports server as well as client authentication
with certificates.
+ .
+ This package is no longer needed, https support was integrated into apt,
+ and is only provided as a fallback if some bugs are found in apt's native
+ https support.
diff --git a/debian/rules b/debian/rules
index ede9591d1..d4e9600a2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,7 +22,7 @@ override_dh_install-indep:
override_dh_install-arch:
dh_install -papt-utils -X/dump
- dh_install -papt -Xmethods/https
+ dh_install -papt -Xmethods/curl -Xmethods/curl+https -Xmethods/curl+http
dh_install --remaining --list-missing
install -m 644 debian/apt.conf.autoremove debian/apt/etc/apt/apt.conf.d/01autoremove
install -m 755 debian/apt.auto-removal.sh debian/apt/etc/kernel/postinst.d/apt-auto-removal
diff --git a/methods/CMakeLists.txt b/methods/CMakeLists.txt
index 9f01ec506..3ae3f9963 100644
--- a/methods/CMakeLists.txt
+++ b/methods/CMakeLists.txt
@@ -7,7 +7,7 @@ add_executable(cdrom cdrom.cc)
add_executable(http http.cc http_main.cc rfc2553emu.cc connect.cc basehttp.cc)
add_executable(mirror mirror.cc http.cc rfc2553emu.cc connect.cc basehttp.cc)
if (HAVE_CURL)
- add_executable(https https.cc basehttp.cc)
+ add_executable(curl curl.cc basehttp.cc)
endif()
add_executable(ftp ftp.cc rfc2553emu.cc connect.cc)
add_executable(rred rred.cc)
@@ -16,7 +16,7 @@ add_executable(rsh rsh.cc)
target_compile_definitions(http PRIVATE ${GNUTLS_DEFINITIONS})
target_include_directories(http PRIVATE ${GNUTLS_INCLUDE_DIR})
if (HAVE_CURL)
-target_include_directories(https PRIVATE ${CURL_INCLUDE_DIRS})
+target_include_directories(curl PRIVATE ${CURL_INCLUDE_DIRS})
endif()
# Link the executables against the libraries
@@ -28,7 +28,7 @@ target_link_libraries(cdrom apt-pkg)
target_link_libraries(http apt-pkg ${GNUTLS_LIBRARIES})
target_link_libraries(mirror apt-pkg ${RESOLV_LIBRARIES} ${GNUTLS_LIBRARIES})
if (HAVE_CURL)
- target_link_libraries(https apt-pkg ${CURL_LIBRARIES})
+ target_link_libraries(curl apt-pkg ${CURL_LIBRARIES})
endif()
target_link_libraries(ftp apt-pkg ${GNUTLS_LIBRARIES})
target_link_libraries(rred apt-pkg)
@@ -40,8 +40,15 @@ install(TARGETS file copy store gpgv cdrom http ftp rred rsh mirror
add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods store gzip lzma bzip2 xz)
add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods rsh ssh)
-if (HAVE_CURL)
- install(TARGETS https RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods)
+
+set(curl_slaves curl+https curl+http)
+
+if (FORCE_CURL)
+ set(curl_slaves ${curl_slaves} https)
else()
add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods http https)
endif()
+if (HAVE_CURL)
+ install(TARGETS curl RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods)
+ add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods curl ${curl_slaves})
+endif()
diff --git a/methods/https.cc b/methods/curl.cc
index 80ce048ca..ac3f77ab6 100644
--- a/methods/https.cc
+++ b/methods/curl.cc
@@ -33,7 +33,7 @@
#include <sstream>
-#include "https.h"
+#include "curl.h"
#include <apti18n.h>
/*}}}*/
diff --git a/methods/https.h b/methods/curl.h
index fbbf34501..fbbf34501 100644
--- a/methods/https.h
+++ b/methods/curl.h
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 2630a2f89..743b2f0eb 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -11,7 +11,7 @@ apt_add_translation_domain(
)
if (HAVE_CURL)
- set(curl_methods https)
+ set(curl_methods curl)
else()
set(curl_methods)
endif()
diff --git a/test/integration/test-apt-update-failure-propagation b/test/integration/test-apt-update-failure-propagation
index 9ca6e481f..fb2b92b8c 100755
--- a/test/integration/test-apt-update-failure-propagation
+++ b/test/integration/test-apt-update-failure-propagation
@@ -100,7 +100,7 @@ for FILE in rootdir/etc/apt/sources.list.d/*-stable-* ; do
sed -i -e "s#:${APTHTTPSPORT}/#:666/#" "$FILE"
done
testwarning aptget update -o Dir::Bin::Methods::https="${OLDMETHODS}/https"
-if grep -q WITH_CURL:BOOL=OFF $PROJECT_BINARY_DIR/CMakeCache.txt; then
+if grep -q FORCE_CURL:BOOL=OFF $PROJECT_BINARY_DIR/CMakeCache.txt; then
testequalor2 "W: Failed to fetch https://localhost:666/dists/stable/InRelease Failed to connect to localhost port 666: Connection refused
W: Some index files failed to download. They have been ignored, or old ones used instead." "W: Failed to fetch https://localhost:666/dists/stable/InRelease Could not connect to localhost:666 (127.0.0.1). - connect (111: Connection refused)
W: Some index files failed to download. They have been ignored, or old ones used instead." tail -n 2 rootdir/tmp/testwarning.output