Source: libapache2-mod-authn-yubikey Followup-For: Bug #725536 Hello. This also occurs on ppc64el and probably on other architectures that did not need to rebuild (Some are installed for ~1k days, for instance). A solution that I found for this was to import some of the *mk files to the package. This and fixing the Makefile to use those files allowed the package to build. I tested it on ppc64el and amd64 and it built successfully.
The modifications I made are in the patch attached as well as some comments on them. Regards.
diff -Nru libapache2-mod-authn-yubikey-1.0/debian/changelog libapache2-mod-authn-yubikey-1.0/debian/changelog --- libapache2-mod-authn-yubikey-1.0/debian/changelog 2013-07-10 05:58:36.000000000 -0400 +++ libapache2-mod-authn-yubikey-1.0/debian/changelog 2016-04-27 13:50:18.000000000 -0400 @@ -1,3 +1,12 @@ +libapache2-mod-authn-yubikey (1.0-1.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Imported build/rules.mk build/special.mk and build/config_vars.mk from + apache2 to fix ftbfs + * Fixed Makefile to use the right directory + + -- Fernando Seiti Furusato <ferse...@br.ibm.com> Wed, 27 Apr 2016 13:47:49 -0400 + libapache2-mod-authn-yubikey (1.0-1.1) unstable; urgency=low * Non-maintainer upload. diff -Nru libapache2-mod-authn-yubikey-1.0/debian/patches/fix-ftbfs.patch libapache2-mod-authn-yubikey-1.0/debian/patches/fix-ftbfs.patch --- libapache2-mod-authn-yubikey-1.0/debian/patches/fix-ftbfs.patch 1969-12-31 19:00:00.000000000 -0500 +++ libapache2-mod-authn-yubikey-1.0/debian/patches/fix-ftbfs.patch 2016-04-27 13:49:29.000000000 -0400 @@ -0,0 +1,422 @@ +Index: libapache2-mod-authn-yubikey-1.0/Makefile +=================================================================== +--- libapache2-mod-authn-yubikey-1.0.orig/Makefile ++++ libapache2-mod-authn-yubikey-1.0/Makefile +@@ -4,9 +4,9 @@ + ## + + builddir=. +-top_srcdir=../../apache228-install +-top_builddir=../../apache228-install +-include ../../apache228-install/build/special.mk ++top_srcdir=. ++top_builddir=. ++include ./build/special.mk + + # the used tools + APXS=apxs +Index: libapache2-mod-authn-yubikey-1.0/build/rules.mk +=================================================================== +--- /dev/null ++++ libapache2-mod-authn-yubikey-1.0/build/rules.mk +@@ -0,0 +1,245 @@ ++# Licensed to the Apache Software Foundation (ASF) under one or more ++# contributor license agreements. See the NOTICE file distributed with ++# this work for additional information regarding copyright ownership. ++# The ASF licenses this file to You under the Apache License, Version 2.0 ++# (the "License"); you may not use this file except in compliance with ++# the License. You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# ++# ++# The build environment was originally provided by Sascha Schumann. ++ ++include $(top_builddir)/build/config_vars.mk ++ ++# Combine all of the flags together in the proper order so that ++# the user-defined flags can always override the configure ones, if needed. ++# Note that includes are listed after the flags because -I options have ++# left-to-right precedence and CPPFLAGS may include user-defined overrides. ++# The "MOD_" prefixed variable are provided to allow modules to insert their ++# (per-subdirectory) settings through definitions in modules.mk, with highest ++# precedence. ++# ++ALL_CFLAGS = $(MOD_CFLAGS) $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS) ++ALL_CPPFLAGS = $(DEFS) $(INTERNAL_CPPFLAGS) $(MOD_CPPFLAGS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS) ++ALL_CXXFLAGS = $(MOD_CXXFLAGS) $(EXTRA_CXXFLAGS) $(NOTEST_CXXFLAGS) $(CXXFLAGS) ++ALL_LDFLAGS = $(MOD_LDFLAGS) $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS) ++ALL_LIBS = $(MOD_LIBS) $(EXTRA_LIBS) $(NOTEST_LIBS) $(LIBS) ++ALL_INCLUDES = $(MOD_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) ++ ++# Compile commands ++ ++BASE_CC = $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES) ++BASE_CXX = $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES) ++ ++COMPILE = $(BASE_CC) $(PICFLAGS) ++CXX_COMPILE = $(BASE_CXX) $(PICFLAGS) ++ ++SH_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CC) $(SHLTCFLAGS) -c $< && touch $@ ++SH_CXX_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CXX) $(SHLTCFLAGS) -c $< && touch $@ ++ ++LT_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) $(LTCFLAGS) -c $< && touch $@ ++LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) $(LTCFLAGS) -c $< && touch $@ ++ ++# Link-related commands ++ ++LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(PILDFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ ++SH_LINK = $(SH_LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) $(SH_LDFLAGS) $(CORE_IMPLIB) $(SH_LIBS) -o $@ ++MOD_LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) -static $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ ++ ++# Cross compile commands ++ ++# Helper programs ++ ++INSTALL_DATA = $(INSTALL) -m 644 ++INSTALL_PROGRAM = $(INSTALL) -m 755 $(INSTALL_PROG_FLAGS) ++ ++# ++# Standard build rules ++# ++all: all-recursive ++depend: depend-recursive ++clean: clean-recursive ++distclean: distclean-recursive ++extraclean: extraclean-recursive ++install: install-recursive ++shared-build: shared-build-recursive ++ ++all-recursive install-recursive depend-recursive: ++ @otarget=`echo $@|sed s/-recursive//`; \ ++ list=' $(BUILD_SUBDIRS) $(SUBDIRS)'; \ ++ for i in $$list; do \ ++ if test -d "$$i"; then \ ++ target="$$otarget"; \ ++ echo "Making $$target in $$i"; \ ++ if test "$$i" = "."; then \ ++ made_local=yes; \ ++ target="local-$$target"; \ ++ fi; \ ++ (cd $$i && $(MAKE) $$target) || exit 1; \ ++ fi; \ ++ done; \ ++ if test "$$otarget" = "all" && test -z '$(TARGETS)'; then \ ++ made_local=yes; \ ++ fi; \ ++ if test "$$made_local" != "yes"; then \ ++ $(MAKE) "local-$$otarget" || exit 1; \ ++ fi ++ ++clean-recursive distclean-recursive extraclean-recursive: ++ @otarget=`echo $@|sed s/-recursive//`; \ ++ list='$(CLEAN_SUBDIRS) $(SUBDIRS)'; \ ++ for i in $$list; do \ ++ if test -d "$$i"; then \ ++ target="$$otarget"; \ ++ echo "Making $$target in $$i"; \ ++ if test "$$i" = "."; then \ ++ made_local=yes; \ ++ target="local-$$target"; \ ++ fi; \ ++ (cd $$i && $(MAKE) $$target); \ ++ fi; \ ++ done; \ ++ if test "$$otarget" = "all" && test -z '$(TARGETS)'; then \ ++ made_local=yes; \ ++ fi; \ ++ if test "$$made_local" != "yes"; then \ ++ $(MAKE) "local-$$otarget"; \ ++ fi ++ ++shared-build-recursive: ++ @if test `pwd` = "$(top_builddir)"; then \ ++ $(PRE_SHARED_CMDS) ; \ ++ fi; \ ++ list='$(SUBDIRS)'; for i in $$list; do \ ++ target="shared-build"; \ ++ if test "$$i" = "."; then \ ++ made_local=yes; \ ++ target="local-shared-build"; \ ++ fi; \ ++ if test "$$i" != "srclib"; then \ ++ (cd $$i && $(MAKE) $$target) || exit 1; \ ++ fi; \ ++ done; \ ++ if test -f 'modules.mk'; then \ ++ if test -n '$(SHARED_TARGETS)'; then \ ++ echo "Building shared: $(SHARED_TARGETS)"; \ ++ if test "$$made_local" != "yes"; then \ ++ $(MAKE) "local-shared-build" || exit 1; \ ++ fi; \ ++ fi; \ ++ fi; \ ++ if test `pwd` = "$(top_builddir)"; then \ ++ $(POST_SHARED_CMDS) ; \ ++ fi ++ ++local-all: $(TARGETS) ++ ++local-shared-build: $(SHARED_TARGETS) ++ ++local-depend: x-local-depend ++ @if test -n "`ls $(srcdir)/*.c 2> /dev/null`"; then \ ++ rm -f .deps; \ ++ list='$(srcdir)/*.c'; \ ++ for i in $$list; do \ ++ $(MKDEP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) $$i | sed 's/\.o:/.lo:/' >> .deps; \ ++ done; \ ++ sed 's/\.lo:/.slo:/' < .deps > .deps.$$; \ ++ cat .deps.$$ >> .deps; \ ++ rm -f .deps.$$; \ ++ fi ++ ++local-clean: x-local-clean ++ rm -f *.o *.lo *.slo *.obj *.a *.la $(CLEAN_TARGETS) $(TARGETS) ++ rm -rf .libs ++ ++local-distclean: local-clean x-local-distclean ++ rm -f .deps Makefile $(DISTCLEAN_TARGETS) ++ ++local-extraclean: local-distclean x-local-extraclean ++ @if test -n "$(EXTRACLEAN_TARGETS)"; then \ ++ echo "rm -f $(EXTRACLEAN_TARGETS)"; \ ++ rm -f $(EXTRACLEAN_TARGETS) ; \ ++ fi ++ ++program-install: $(TARGETS) $(SHARED_TARGETS) ++ @if test -n '$(bin_PROGRAMS)'; then \ ++ test -d $(DESTDIR)$(bindir) || $(MKINSTALLDIRS) $(DESTDIR)$(bindir); \ ++ list='$(bin_PROGRAMS)'; for i in $$list; do \ ++ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir); \ ++ done; \ ++ fi ++ @if test -n '$(sbin_PROGRAMS)'; then \ ++ test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \ ++ list='$(sbin_PROGRAMS)'; for i in $$list; do \ ++ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir); \ ++ done; \ ++ fi ++ ++local-install: program-install $(INSTALL_TARGETS) ++ ++# to be filled in by the actual Makefile if extra commands are needed ++x-local-depend x-local-clean x-local-distclean x-local-extraclean: ++ ++# ++# Implicit rules for creating outputs from input files ++# ++CXX_SUFFIX = cpp ++SHLIB_SUFFIX = so ++ ++.SUFFIXES: ++.SUFFIXES: .S .c .$(CXX_SUFFIX) .lo .o .s .y .l .slo .def .la ++ ++.c.o: ++ $(COMPILE) -c $< ++ ++.s.o: ++ $(COMPILE) -c $< ++ ++.c.lo: ++ $(LT_COMPILE) ++ ++.s.lo: ++ $(LT_COMPILE) ++ ++.c.slo: ++ $(SH_COMPILE) ++ ++.$(CXX_SUFFIX).lo: ++ $(LT_CXX_COMPILE) ++ ++.$(CXX_SUFFIX).slo: ++ $(SH_CXX_COMPILE) ++ ++.y.c: ++ $(YACC) $(YFLAGS) $< && mv y.tab.c $*.c ++ if test -f y.tab.h; then \ ++ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ ++ else :; fi ++ ++.l.c: ++ $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@ ++ ++# Makes an import library from a def file ++.def.la: ++ $(LIBTOOL) --mode=compile $(MK_IMPLIB) -o $@ $< ++ ++# ++# Dependencies ++# ++include $(builddir)/.deps ++ ++.PHONY: all all-recursive install-recursive local-all $(PHONY_TARGETS) \ ++ shared-build shared-build-recursive local-shared-build \ ++ depend depend-recursive local-depend x-local-depend \ ++ clean clean-recursive local-clean x-local-clean \ ++ distclean distclean-recursive local-distclean x-local-distclean \ ++ extraclean extraclean-recursive local-extraclean x-local-extraclean \ ++ install local-install docs $(INSTALL_TARGETS) ++ +Index: libapache2-mod-authn-yubikey-1.0/build/special.mk +=================================================================== +--- /dev/null ++++ libapache2-mod-authn-yubikey-1.0/build/special.mk +@@ -0,0 +1,36 @@ ++# Licensed to the Apache Software Foundation (ASF) under one or more ++# contributor license agreements. See the NOTICE file distributed with ++# this work for additional information regarding copyright ownership. ++# The ASF licenses this file to You under the Apache License, Version 2.0 ++# (the "License"); you may not use this file except in compliance with ++# the License. You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# ++# ++# The build environment was provided by Sascha Schumann. ++ ++all: all-recursive ++ ++include $(builddir)/modules.mk ++ ++TARGETS = $(static) ++SHARED_TARGETS = $(shared) ++INSTALL_TARGETS = install-modules-$(INSTALL_DSO) ++ ++include $(top_builddir)/build/rules.mk ++ ++install-modules-yes: $(SHARED_TARGETS) ++ @$(MKINSTALLDIRS) $(DESTDIR)$(libexecdir) ++ @list='$(shared)'; for i in $$list; do \ ++ $(top_srcdir)/build/instdso.sh SH_LIBTOOL='$(SH_LIBTOOL)' $$i $(DESTDIR)$(libexecdir); \ ++ done ++ ++install-modules-no: ++ +Index: libapache2-mod-authn-yubikey-1.0/build/config_vars.mk +=================================================================== +--- /dev/null ++++ libapache2-mod-authn-yubikey-1.0/build/config_vars.mk +@@ -0,0 +1,109 @@ ++exp_exec_prefix = /usr ++exp_bindir = /usr/bin ++exp_sbindir = /usr/sbin ++exp_libdir = /usr/lib ++exp_libexecdir = /usr/lib/apache2/modules ++exp_mandir = /usr/share/man ++exp_sysconfdir = /etc/apache2 ++exp_datadir = /usr/share/apache2 ++exp_installbuilddir = /usr/share/apache2/build ++exp_errordir = /usr/share/apache2/error ++exp_iconsdir = /usr/share/apache2/icons ++exp_htdocsdir = /usr/share/apache2/default-site/htdocs ++exp_manualdir = /usr/share/apache2/default-site/htdocs/manual ++exp_cgidir = /usr/lib/cgi-bin ++exp_includedir = /usr/include/apache2 ++exp_localstatedir = /var/lock/apache2 ++exp_runtimedir = /var/run/apache2 ++exp_logfiledir = /var/log/apache2 ++exp_proxycachedir = /var/cache/apache2/proxy ++EGREP = /bin/grep -E ++PCRE_LIBS = -lpcre ++SHLTCFLAGS = -prefer-pic ++LTCFLAGS = -prefer-non-pic -static ++MKINSTALLDIRS = /usr/share/apache2/build/mkdir.sh ++INSTALL = $(LIBTOOL) --mode=install /usr/share/apache2/build/install.sh -c ++MATH_LIBS = -lm ++CRYPT_LIBS = -lcrypt ++DTRACE = true ++PICFLAGS = -fPIE ++PILDFLAGS = -pie ++INSTALL_DSO = yes ++ab_CFLAGS = ++ab_LDFLAGS = -lssl -lcrypto -lnghttp2 ++NONPORTABLE_SUPPORT = checkgid fcgistarter ++ab_CFLAGS = ++ab_LDFLAGS = -lssl -lcrypto -lnghttp2 ++progname = apache2 ++OS = unix ++SHLIBPATH_VAR = LD_LIBRARY_PATH ++AP_BUILD_SRCLIB_DIRS = ++AP_CLEAN_SRCLIB_DIRS = ++HTTPD_VERSION = 2.4.20 ++HTTPD_MMN = 20120211 ++bindir = ${exec_prefix}/bin ++sbindir = ${exec_prefix}/sbin ++cgidir = ${prefix}/usr/lib/cgi-bin ++logfiledir = ${prefix}/var/log/apache2 ++exec_prefix = ${prefix}/usr ++datadir = ${exec_prefix}/share/apache2 ++localstatedir = ${prefix}/var/lock/apache2 ++mandir = ${exec_prefix}/share/man ++libdir = ${exec_prefix}/lib ++libexecdir = ${exec_prefix}/lib/apache2/modules ++htdocsdir = ${prefix}/usr/share/apache2/default-site/htdocs ++manualdir = ${htdocsdir}/manual ++includedir = ${exec_prefix}/include/apache2 ++errordir = ${datadir}/error ++iconsdir = ${datadir}/icons ++sysconfdir = ${prefix}/etc/apache2 ++installbuilddir = ${prefix}/usr/share/apache2/build ++runtimedir = ${prefix}/var/run/apache2 ++proxycachedir = ${prefix}/var/cache/apache2/proxy ++other_targets = suexec ++progname = apache2 ++prefix = ++AWK = gawk ++CC = powerpc64le-linux-gnu-gcc ++CPP = powerpc64le-linux-gnu-gcc -E ++CXX = ++CPPFLAGS = -DBUILD_DATETIME='"2016-04-10T12:03:41"' -Wdate-time -D_FORTIFY_SOURCE=2 ++CFLAGS = -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security ++CXXFLAGS = ++LTFLAGS = --no-silent ++LDFLAGS = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now ++LT_LDFLAGS = ++SH_LDFLAGS = ++LIBS = ++DEFS = ++INCLUDES = ++NOTEST_CPPFLAGS = ++NOTEST_CFLAGS = ++NOTEST_CXXFLAGS = ++NOTEST_LDFLAGS = ++NOTEST_LIBS = ++EXTRA_CPPFLAGS = -DLINUX -D_REENTRANT -D_GNU_SOURCE ++EXTRA_CFLAGS = -pthread ++EXTRA_CXXFLAGS = ++EXTRA_LDFLAGS = ++EXTRA_LIBS = ++EXTRA_INCLUDES = -I$(includedir) -I. -I/usr/include/apr-1.0 -I/usr/include ++INTERNAL_CPPFLAGS = ++LIBTOOL = /usr/share/apr-1.0/build/libtool --no-silent ++SHELL = /bin/bash ++RSYNC = ++SH_LIBS = ++SH_LIBTOOL = $(LIBTOOL) ++MK_IMPLIB = ++MKDEP = $(CC) -MM ++INSTALL_PROG_FLAGS = ++ENABLED_DSO_MODULES = ,authn_file,authn_core,authz_host,authz_groupfile,authz_user,authz_core,access_compat,auth_basic,reqtimeout,filter,mime,env,headers,setenvif,mpm_event,status,autoindex,dir,alias ++LOAD_ALL_MODULES = no ++APR_BINDIR = /usr/bin ++APR_INCLUDEDIR = /usr/include/apr-1.0 ++APR_VERSION = 1.5.2 ++APR_CONFIG = /usr/bin/apr-1-config ++APU_BINDIR = /usr/bin ++APU_INCLUDEDIR = /usr/include/apr-1.0 ++APU_VERSION = 1.5.4 ++APU_CONFIG = /usr/bin/apu-1-config diff -Nru libapache2-mod-authn-yubikey-1.0/debian/patches/series libapache2-mod-authn-yubikey-1.0/debian/patches/series --- libapache2-mod-authn-yubikey-1.0/debian/patches/series 2013-07-09 11:58:02.000000000 -0400 +++ libapache2-mod-authn-yubikey-1.0/debian/patches/series 2016-04-27 13:45:52.000000000 -0400 @@ -1 +1,2 @@ apr-md5-include.patch +fix-ftbfs.patch