[apache2] 01/01: Handle openssl transition better

Stefan Fritsch sf at moszumanska.debian.org
Sun Jul 16 21:22:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch master
in repository apache2.

commit a1f58eed7a0a5485b40e022fc9004756be8b5401
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sun Jul 16 23:10:58 2017 +0200

    Handle openssl transition better
    
    * add versioned breaks for broken packages
    * provide new apache2-api-20120211-openssl1.1 virtual package and make
      dh_apache2 generate a dependency on it if there is a build-dep on
      apache2-ssl-dev.
---
 debian/PACKAGING               |  4 +++-
 debian/changelog               | 11 +++++++++++
 debian/control                 |  5 +++--
 debian/debhelper/dh_apache2.in | 38 +++++++++++++++++++++++++++++++++++---
 debian/rules                   |  7 ++++---
 5 files changed, 56 insertions(+), 9 deletions(-)

diff --git a/debian/PACKAGING b/debian/PACKAGING
index 24b80df..6eec260 100644
--- a/debian/PACKAGING
+++ b/debian/PACKAGING
@@ -72,7 +72,9 @@ versions of apache2-threaded-dev did provide apache2-dev.
 A module package that uses openssl specific interfaces in mod_ssl, either by
 using the mod_ssl_openssl.h header, or by using mod_ssl-internal private
 interfaces (don't do that!), must build-depend on apache2-ssl-dev to ensure
-that the correct version of the openssl headers are used.
+that the correct version of the openssl headers are used. In this case,
+dh_apache2 will also create a dependency on a apache2-api-YYYYMMDD-opensslM.M
+virtual package.
 
 The resulting binary package should be called libapache2-mod-<modulename> and
 MUST NOT depend on apache2 or apache2-bin. Instead a module package must depend
diff --git a/debian/changelog b/debian/changelog
index 1947320..78294a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+apache2 (2.4.27-3) experimental; urgency=medium
+
+  * Switch to openssl 1.1. Again closes: #851094
+  * Add versioned breaks for gridsite, libapache2-mod-dacs because of
+    openssl transition.
+  * Provide new apache2-api-20120211-openssl1.1 virtual package and make
+    dh_apache2 generate a dependency on it if there is a build-dep on
+    apache2-ssl-dev.
+
+ -- Stefan Fritsch <sf at debian.org>  Sun, 16 Jul 2017 23:11:07 +0200
+
 apache2 (2.4.27-2) unstable; urgency=medium
 
   * Switch back to openssl 1.0 for now. The transition to 1.1 needs more
diff --git a/debian/control b/debian/control
index f7e875a..e76807a 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Debian Apache Maintainers <debian-apache at lists.debian.org>
 Uploaders: Stefan Fritsch <sf at debian.org>, Arno Töll <arno at debian.org>
 Build-Depends: debhelper (>= 9.20131213~), lsb-release, dpkg-dev (>= 1.16.1~),
  libaprutil1-dev (>= 1.5.0), libapr1-dev (>= 1.5.0), libpcre3-dev, zlib1g-dev,
- libnghttp2-dev, libssl1.0-dev | libssl-dev (<< 1.1), perl,
+ libnghttp2-dev, libssl-dev (>= 1.1), perl,
  liblua5.2-dev, libxml2-dev, autotools-dev, gawk | awk,
  dh-systemd
 Build-Conflicts: autoconf2.13
@@ -51,6 +51,7 @@ Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
 # MODULE_MAGIC_NUMBER_MAJOR from apache2/include/ap_mmn.h
 Provides: ${apache2:API}
+Breaks: gridsite (<< 2.3.2-4~), libapache2-mod-dacs (<< 1.4.38a-2~)
 Suggests: www-browser, apache2-doc, apache2-suexec-pristine | apache2-suexec-custom
 Description: Apache HTTP Server (modules and other binary files)
  The Apache HTTP Server Project's goal is to build a secure, efficient and
@@ -141,7 +142,7 @@ Description: Apache HTTP Server (development headers)
 Package: apache2-ssl-dev
 Architecture: any
 Depends: ${misc:Depends}, apache2-dev (= ${binary:Version}),
- libssl1.0-dev | libssl-dev (<< 1.1)
+ libssl-dev (>= 1.1)
 Description: Apache HTTP Server (mod_ssl development headers)
  The Apache HTTP Server Project's goal is to build a secure, efficient and
  extensible HTTP server as standards-compliant open source software. The
diff --git a/debian/debhelper/dh_apache2.in b/debian/debhelper/dh_apache2.in
index 3652d07..dcb5f59 100755
--- a/debian/debhelper/dh_apache2.in
+++ b/debian/debhelper/dh_apache2.in
@@ -48,20 +48,28 @@ dh_apache2 - register configuration snippets to the Apache web server
 
 # auto-generated do not edit
 our $API = "__API__";
+our $OPENSSL = "__OPENSSL__";
 our $MODULE_DIR = "__MODULE_DIR__";
 our $SERVER_VERSION = "__SERVER_VERSION__";
 
-
-
 sub apache_api_version
 {
 	return "apache2-api-$API";
 }
 
+sub apache_api_ssl_version
+{
+	return "apache2-api-$API-$OPENSSL";
+}
+
 sub apache_depends
 {
 	# TODO XXX this should be determined from ap_mmn.h, too.
-	return apache_api_version() . ", apache2-bin ( >= 2.4.16 )";
+	my $ret = apache_api_version() . ", apache2-bin ( >= 2.4.16 )";
+	if (have_apache2_ssl_dev()) {
+		$ret .= ", " . apache_api_ssl_version();
+	}
+	return $ret;
 }
 
 sub apache_version
@@ -80,6 +88,30 @@ sub apache_conf_installdir
 	return "etc/apache2/${type}-available/"
 }
 
+sub have_apache2_ssl_dev
+{
+	open(my $fd, "<", "debian/control") or die "Cannot open debian/control: $!";
+	my $line;
+	my $builddeps = "";
+	while (defined ($line = <$fd>)) {
+		chomp $line;
+		if ($line =~ m{^Build-Depends:}i) {
+			$builddeps .= $line;
+		} elsif ($builddeps) {
+			if ($line =~ m{^\s}) {
+				$builddeps .= $line;
+			} else {
+				last;
+			}
+		}
+	}
+	if ($builddeps =~ m{\bapache2-ssl-dev\b}) {
+		return 1;
+	} else {
+		return;
+	}
+}
+
 =head1 SYNOPSIS
 
 B<dh_apache2> [S<I<debhelper options>>] [S<B<--conditional>>=I<expression>] [B<--error-handler=>I<function>] [B<-n>|B<--noscripts>]
diff --git a/debian/rules b/debian/rules
index 65f5924..ded04c0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,8 @@ SERVER_VERSION := $(shell dpkg-parsechangelog | perl -ne 'print $$1 if m/Version
 DEBIAN_VERSION := $(shell dpkg-parsechangelog | perl -ne 'print $$1 if m/Version:\s*(.+)/')
 BUILD_DATETIME := $(shell date -u --date="`dpkg-parsechangelog -S Date`" +%FT%T)
 MODULE_DIR := /usr/lib/apache2/modules/
-API = $(shell perl -ne 'print $$1 if m/define\s+MODULE_MAGIC_NUMBER_MAJOR\s+?(.*)$$/' < include/ap_mmn.h)
+API := $(shell perl -ne 'print $$1 if m/define\s+MODULE_MAGIC_NUMBER_MAJOR\s+?(.*)$$/' < include/ap_mmn.h)
+OPENSSL := openssl1.1
 AP2_CFLAGS = -pipe $(CFLAGS)
 AP2_LDFLAGS = -Wl,--as-needed $(LDFLAGS)
 AP2_CPPFLAGS = -DPLATFORM='\"$(LSB_RELEASE)\"' -DBUILD_DATETIME='\"$(BUILD_DATETIME)\"' $(CPPFLAGS)
@@ -77,11 +78,11 @@ clean-config-vars:
 	perl ./debian/clean_config_vars '$(AP2_CFLAGS)' '$(AP2_CPPFLAGS)' '$(AP2_LDFLAGS)'
 
 %: %.in
-	sed 's#__SERVER_VERSION__#$(SERVER_VERSION)#; s#__MODULE_DIR__#$(MODULE_DIR)#; s#__API__#$(API)#;' $< > $@
+	sed 's#__SERVER_VERSION__#$(SERVER_VERSION)#; s#__MODULE_DIR__#$(MODULE_DIR)#; s#__API__#$(API)#; s#__OPENSSL__#$(OPENSSL)#;' $< > $@
 	chmod `/usr/bin/stat -c '%a' "$<"` $@
 
 prepare-scripts: debian/a2query debian/debhelper/dh_apache2
-	(grep -s -v apache2:API debian/apache2-bin.substvars; echo apache2:API=apache2-api-$(API)) > debian/apache2-bin.substvars.new
+	(grep -s -v apache2:API debian/apache2-bin.substvars; echo "apache2:API=apache2-api-$(API), apache2-api-$(API)-$(OPENSSL)") > debian/apache2-bin.substvars.new
 	mv debian/apache2-bin.substvars.new debian/apache2-bin.substvars
 
 generate-maintainer-scripts: debian/apache2.preinst

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list