Imported Debian patch 4.7.2-3

This commit is contained in:
Timo Aaltonen
2019-05-06 08:43:34 +03:00
committed by Mario Fetka
2298 changed files with 1802095 additions and 333181 deletions

141
debian/rules vendored
View File

@@ -3,103 +3,124 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# build server only where nodejs is available
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386 mips mips64el mipsel ppc64 ppc64el s390x))
ONLY_CLIENT=0
else
ONLY_CLIENT=1
endif
# build client only until dogtag works
ONLY_CLIENT=1
DESTDIR=$(CURDIR)/debian/tmp
PLATFORM="SUPPORTED_PLATFORM=debian"
JAVA_STACK_SIZE ?= 8m
export JAVA_STACK_SIZE
export PYTHON=python
confflags = \
--libexecdir=/usr/lib/ \
--with-ipaplatform=debian \
--with-sysconfenvdir=/etc/default \
--disable-pylint \
--without-jslint
ifeq ($(ONLY_CLIENT), 1)
confflags += --disable-server \
--without-ipatests
else
confflags += --enable-server \
--with-ipatests
endif
# For maintainer use only, generate a tarball:
SOURCE = freeipa
gentarball: UV=$(shell dpkg-parsechangelog|awk '/^Version:/ {print $$2}'|sed 's/-.*$$//')
gentarball:
git archive --format=tar upstream --prefix=$(SOURCE)-$(UV)/ | xz --best > ../$(SOURCE)_$(UV).orig.tar.xz
git archive --format=tar upstream-next --prefix=$(SOURCE)-$(UV)/ | \
xz --best \
> ../$(SOURCE)_$(UV).orig.tar.xz
override_dh_auto_clean:
for i in daemons install ipapython ipaserver ipa-client; do \
(cd $$i && [ ! -f Makefile ] || $(MAKE) distclean); \
(cd $$i && rm -f COPYING INSTALL depcomp install-sh missing py-compile config.guess config.sub aclocal.m4 config.h.in version.m4); \
done
find . -name "*.pyo" -o -name "*.pyc" -type f -exec rm -f "{}" \;
find . -name "ltmain.sh" -exec rm -f "{}" \;
find . -name "configure" -exec rm -f "{}" \;
rm -rf daemons/ipa-version.h freeipa.spec freeipa.egg-info ipa-client/ipa-client.spec version.m4
rm -rf ipapython/build RELEASE build
override_dh_autoreconf:
make IPA_VERSION_IS_GIT_SNAPSHOT=no version-update
dh_autoreconf; cd ..
override_dh_auto_configure:
dh_auto_configure -Dipa-client
ifneq ($(ONLY_CLIENT), 1)
dh_auto_configure -Ddaemons -- \
--with-openldap \
--with-systemdsystemunitdir=/lib/systemd/system
dh_auto_configure -Dinstall
endif
override_dh_auto_build:
ifneq ($(ONLY_CLIENT), 1)
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no all
# cd selinux ; make all
gencontrol:
ifeq ($(ONLY_CLIENT), 1)
cat debian/control.stub \
debian/control.common \
> debian/control
else
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client
cat debian/control.stub \
debian/control.server-bdeps \
debian/control.common \
debian/control.server \
> debian/control
endif
override_dh_clean: gencontrol
dh_clean
rm -f po/*.gmo po/Makefile.hack po/POTFILES.in po/ipa.pot po/stamp-po
rm -rf contrib/completion/ipa.bash_completion daemons/ipa-version.h \
install/ui/src/libs/loader.js m4
rm -f ipaplatform/override.py ipapython/version.py ipasetup.py
override_dh_auto_configure: gencontrol
dh_auto_configure -- $(confflags)
# tests would just fail, they need a proper environment with 389 running et al
override_dh_auto_test:
override_dh_auto_install:
dh_auto_install --max-parallel=1
ifneq ($(ONLY_CLIENT), 1)
# Force re-generate of platform support
rm -f ipapython/services.py
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no install DESTDIR=$(DESTDIR)
cd ..
chmod 755 $(DESTDIR)/usr/lib/*/ipa/certmonger/*
mkdir -p $(DESTDIR)/etc/bash_completion.d \
$(DESTDIR)/etc/default \
$(DESTDIR)/usr/share/ipa/html
chmod 755 $(DESTDIR)/usr/lib/ipa/certmonger/*
touch $(DESTDIR)/usr/share/ipa/html/ca.crt
touch $(DESTDIR)/usr/share/ipa/html/configure.jar
touch $(DESTDIR)/usr/share/ipa/html/kerberosauth.xpi
touch $(DESTDIR)/usr/share/ipa/html/krb.con
touch $(DESTDIR)/usr/share/ipa/html/krb.js
touch $(DESTDIR)/usr/share/ipa/html/krb5.ini
touch $(DESTDIR)/usr/share/ipa/html/krbrealm.con
touch $(DESTDIR)/usr/share/ipa/html/preferences.html
install -m 0644 contrib/completion/ipa.bash_completion $(DESTDIR)/etc/bash_completion.d/ipa
install -m 0644 init/ipa_memcached.conf $(DESTDIR)/etc/default/ipa_memcached
install -m 0644 init/systemd/ipa_memcached.service $(DESTDIR)/lib/systemd/system
install -m 0644 init/systemd/ipa.service $(DESTDIR)/lib/systemd/system
install -m 0755 debian/generate-rndc-key.sh $(DESTDIR)/usr/share/ipa
else
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client-install DESTDIR=$(DESTDIR)
endif
mkdir -p $(DESTDIR)/usr/share/bash-completion/completions \
install -m 0644 contrib/completion/ipa.bash_completion \
$(DESTDIR)/usr/share/bash-completion/completions/ipa
rm -rf $(DESTDIR)/etc/bash_completion.d
# purge .la files
find $(CURDIR)/debian/tmp -name "*.la" -type f -exec rm -f "{}" \;
# purge precompiled .pyc/.pyo files
find $(CURDIR)/debian/tmp -name '*.py[c,o]' -exec rm '{}' ';'
# fix permissions
find $(CURDIR)/debian/tmp -name "*.mo" -type f -exec chmod -x "{}" \;
# remove files which are useful only for make uninstall
find $(CURDIR)/debian/tmp -wholename '*/dist-packages/*/install_files.txt' -exec rm '{}' \;
override_dh_install:
dh_install --list-missing
# we still need to use python2
find debian/tmp ! -name '*.pyc' -a ! -name '*.pyo' -a \
-type f -exec grep -qsm1 '^#!.*\bpython' {} \; \
-exec sed -i -e '1 s|^#!.*\bpython[^ ]*|#!/usr/bin/python|' {} \;
override_dh_missing:
dh_missing --fail-missing
ifneq ($(ONLY_CLIENT), 1)
mkdir -m 770 -p $(CURDIR)/debian/freeipa-server/var/cache/bind/data
mkdir -m 700 -p $(CURDIR)/debian/freeipa-server/var/lib/ipa/backup
override_dh_installsystemd:
dh_installsystemd -pfreeipa-server --no-enable ipa.service
dh_installsystemd -pfreeipa-server --no-enable ipa-dnskeysyncd.service
dh_installsystemd -pfreeipa-server --no-enable ipa-custodia.service
dh_installsystemd -pfreeipa-server --no-enable ipa-ods-exporter.service
endif
override_dh_fixperms:
dh_fixperms -X var/cache/bind/data -X var/lib/ipa/backup
dh_fixperms
# check needed to not fail arch-indep build which doesn't run dh_installdirs
if [ -d $(CURDIR)/debian/freeipa-server/etc/ipa/custodia ]; then \
chmod 0700 $(CURDIR)/debian/freeipa-server/etc/ipa/custodia; \
chmod 0700 $(CURDIR)/debian/freeipa-server/var/lib/ipa/backup; \
fi
%:
dh $@ --with autoreconf,python2,systemd
dh $@ --with python2
# --builddirectory=build