Name openssh-server
Description secure shell (SSH) server, for secure access from remote machines
Version 1:10.0p1-7
Package Base openssh
Homepage https://www.openssh.com/
Maintainers ['Debian OpenSSH Maintainers <debian-ssh@lists.debian.org>']
Contributors ['Colin Watson <cjwatson@debian.org>', 'Matthew Vernon <matthew@debian.org>,']
Distro-repo https://salsa.debian.org/ssh-team/openssh
Sources ['https://sources.debian.org/data/main/o/openssh/1:10.0p1-7/debian/watch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/authorized-keys-man-symlink.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/configure-cache-vars.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/debian-banner.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/debian-config.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/dnssec-sshfp.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/doc-hash-tab-completion.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/gnome-ssh-askpass2-icon.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/gssapi.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/keepalive-extensions.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/mention-ssh-keygen-on-keychange.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/no-openssl-version-status.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/openbsd-docs.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/package-versioning.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/pam-avoid-unknown-host.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/regress-conch-dev-zero.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/restore-authorized_keys2.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/restore-tcp-wrappers.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/revert-ipqos-defaults.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/scp-quoting.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/selinux-role.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/series', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/shell-path.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/skip-utimensat-test-on-zfs.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/ssh-agent-setgid.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/ssh-argv0.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/ssh-vulnkey-compat.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/syslog-level-silent.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/systemd-socket-activation.patch', 'https://sources.debian.org/src/openssh/1:10.0p1-7/debian/patches/user-group-modes.patch']
Dependencies ['debconf', 'init-system-helpers', 'libaudit1', 'libc6', 'libcom-err2', 'libcrypt1', 'libgssapi-krb5-2', 'libkrb5-3', 'libpam-modules', 'libpam-runtime', 'libpam0g', 'libselinux1', 'libssl3t64', 'libwrap0', 'libwtmpdb0', 'lsb-base', 'openssh-client', 'openssh-sftp-server', 'procps', 'runit-helper', 'systemd | systemd-standalone-sysusers | systemd-sysusers', 'ucf', 'zlib1g']
Optional-Dependencies ['default-logind', 'libpam-systemd', 'logind', 'molly-guard', 'monkeysphere', 'ncurses-term', 'ssh-askpass', 'ufw', 'xauth']
Build-Dependencies ['debhelper', 'debhelper-compat', 'dh-exec', 'dh-runit', 'dh-sequence-movetousr', 'libaudit-dev [linux-any]', 'libedit-dev', 'libfido2-dev', 'libgtk-3-dev <!pkg.openssh.nognome>', 'libkrb5-dev | heimdal-dev', 'libpam0g-dev | libpam-dev', 'libselinux1-dev [linux-any]', 'libssl-dev', 'libwrap0-dev | libwrap-dev', 'libwtmpdb-dev', 'pkgconf', 'zlib1g-dev']
Provides []
Builddate
Architecture amd64
Distro-Version trixie
Licenses []
Hash 142c0603ed45653050751415444f0b05abf8a258301237ba22a97612f146bc38
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS := hardening=+all

include /usr/share/dpkg/default.mk

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
  RUN_TESTS := yes
else
  RUN_TESTS :=
endif

ifeq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  PARALLEL :=
else
  PARALLEL := \
	-j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
  CC := gcc
  PKG_CONFIG = pkg-config
else
  CC := $(DEB_HOST_GNU_TYPE)-gcc
  PKG_CONFIG = $(DEB_HOST_GNU_TYPE)-pkg-config
  RUN_TESTS :=
endif

# Change the version string to reflect distribution
SSH_EXTRAVERSION := $(DEB_VENDOR)-$(shell echo '$(DEB_VERSION)' | sed -e 's/.*-//; s/+salsaci+.*/+salsaci/')

UBUNTU := $(shell $(call dpkg_vendor_derives_from,Ubuntu))
ifeq ($(UBUNTU),yes)
DEFAULT_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
else
DEFAULT_PATH := /usr/local/bin:/usr/bin:/bin:/usr/games
endif
SUPERUSER_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

ifeq ($(UBUNTU),yes)
server_recommends := ssh-import-id
else
server_recommends :=
endif

# Common path configuration.
confflags += --sysconfdir=/etc/ssh
confflags += --libexecdir=\$${prefix}/lib/openssh

# Common build options.
confflags += --disable-strip
confflags += --with-mantype=doc
confflags += --with-4in6
confflags += --with-privsep-path=/run/sshd
confflags += --with-pid-dir=/run

# The Hurd needs libcrypt for res_query et al.
ifeq ($(DEB_HOST_ARCH_OS),hurd)
confflags += --with-libs=-lcrypt
endif

# Always use the internal mkdtemp; see https://bugs.debian.org/1001186.
confflags += ac_cv_func_mkdtemp=no

# ppc64el doesn't support -fzero-call-used-regs=used, but configure fails to
# detect that.
ifeq ($(DEB_HOST_ARCH),ppc64el)
confflags += ossh_cv_cflag__fzero_call_used_regs_used=no
endif

# passwd isn't otherwise needed and may not be installed at build time.
# Ensure that sshd knows its path.
confflags += PATH_PASSWD_PROG=/usr/bin/passwd

# Everything above here is common to the deb and udeb builds.
confflags_udeb := $(confflags)

# Options specific to the deb build.
confflags += --with-tcp-wrappers
confflags += --with-pam
confflags += --with-libedit
confflags += --with-kerberos5=/usr
confflags += --with-ssl-engine
confflags += --with-wtmpdb
ifeq ($(DEB_HOST_ARCH_OS),linux)
confflags += --with-selinux
confflags += --with-audit=linux
confflags += --with-security-key-builtin
endif

# The deb build wants xauth; the udeb build doesn't.
confflags += --with-xauth=/usr/bin/xauth
confflags_udeb += --without-xauth

# Default paths. The udeb build has /usr/games removed.
confflags += --with-default-path=$(DEFAULT_PATH) --with-superuser-path=$(SUPERUSER_PATH)
confflags_udeb += --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Compiler flags.
cflags := $(CPPFLAGS) $(CFLAGS)
cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\"
cflags_udeb := -Os
cflags_udeb += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\"
confflags += --with-cflags='$(cflags)'
confflags_udeb += --with-cflags='$(cflags_udeb)'

# Linker flags.
confflags += --with-ldflags='$(strip -Wl,--as-needed $(LDFLAGS))'
confflags_udeb += --with-ldflags='-Wl,--as-needed'

ifeq ($(shell dpkg-vendor --is Ubuntu && echo yes) $(DEB_HOST_ARCH), yes i386)
  BUILD_PACKAGES += -Nopenssh-tests
endif

%:
	dh $@ --with=runit $(BUILD_PACKAGES)

override_dh_autoreconf-indep:

override_dh_auto_configure-arch:
	dh_auto_configure -Bdebian/build-deb -- $(confflags)
ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
	dh_auto_configure -Bdebian/build-udeb -- $(confflags_udeb)
	# Avoid libnsl linkage. Ugh.
	perl -pi -e 's/ +-lnsl//' debian/build-udeb/config.status
	cd debian/build-udeb && ./config.status
endif

	# Nothing reads /var/log/btmp any more (see
	# https://bugs.debian.org/1072184).
	perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' debian/build-deb/config.h
ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
	perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' debian/build-udeb/config.h
endif

override_dh_auto_configure-indep:

override_dh_auto_build-arch:
	$(MAKE) -C debian/build-deb $(PARALLEL) ASKPASS_PROGRAM='/usr/bin/ssh-askpass'
	$(MAKE) -C debian/build-deb regress-prep
	$(MAKE) -C debian/build-deb $(PARALLEL) regress-binaries regress-unit-binaries
ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
	$(MAKE) -C debian/build-udeb $(PARALLEL) ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen sshd-auth sshd-session
endif

ifeq ($(filter pkg.openssh.nognome,$(DEB_BUILD_PROFILES)),)
	$(MAKE) -C contrib gnome-ssh-askpass3 CC='$(CC) $(CPPFLAGS) $(CFLAGS) -Wall -Wl,--as-needed $(LDFLAGS)' PKG_CONFIG=$(PKG_CONFIG)
endif

override_dh_auto_build-indep:

override_dh_auto_test-arch:
ifeq ($(RUN_TESTS),yes)
	$(MAKE) -C debian/build-deb unit compat-tests
	$(MAKE) -C debian/keygen-test
	debian/check-ucf-md5sums
endif

override_dh_auto_test-indep:

override_dh_auto_clean:
	rm -rf debian/build-deb debian/build-udeb
ifeq ($(RUN_TESTS),yes)
	$(MAKE) -C debian/keygen-test clean
endif
	$(MAKE) -C contrib clean

override_dh_auto_install-arch:
	$(MAKE) -C debian/build-deb DESTDIR=`pwd`/debian/tmp install-nokeys

override_dh_auto_install-indep:

override_dh_install-arch:
	# Remove version control tags to avoid unnecessary conffile
	# resolution steps for administrators.
	sed -i '/\$$OpenBSD:/d' \
		debian/tmp/etc/ssh/moduli \
		debian/tmp/etc/ssh/ssh_config \
		debian/tmp/etc/ssh/sshd_config

	dh_install -Nopenssh-client-udeb -Nopenssh-server-udeb
ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
	dh_install -popenssh-client-udeb -popenssh-server-udeb \
		--sourcedir=debian/build-udeb
endif

	rm -f debian/openssh-tests/usr/lib/openssh/regress/misc/sk-dummy/*.lo

override_dh_installdocs:
	dh_installdocs -Nopenssh-server -Nopenssh-sftp-server
	dh_installdocs -popenssh-server -popenssh-sftp-server \
		--link-doc=openssh-client
	# Avoid breaking dh_installexamples later.
	mkdir -p debian/openssh-server/usr/share/doc/openssh-client

override_dh_installinit:
	dh_installinit -R --name ssh

# Can be dropped in compat level 14
execute_after_dh_installinit:
	dh_installsysusers

override_dh_installsystemd:
	dh_installsystemd -popenssh-server ssh.service
	dh_installsystemd -popenssh-server --no-enable ssh.socket
	dh_installsystemd -popenssh-server --no-start rescue-ssh.target
	dh_installsystemd -popenssh-server sshd-keygen.service

debian/openssh-server.sshd.pam: debian/openssh-server.sshd.pam.in
ifeq ($(DEB_HOST_ARCH_OS),linux)
	sed 's/^@IF_KEYINIT@//' $< > $@
else
	sed '/^@IF_KEYINIT@/d' $< > $@
endif

override_dh_installpam: debian/openssh-server.sshd.pam
	dh_installpam --name sshd

override_dh_runit:
	dh_runit -popenssh-server

execute_after_dh_fixperms-arch:
	chmod u+s debian/openssh-client/usr/lib/openssh/ssh-keysign

# Work around debhelper/dh-exec bug #1017023.
override_dh_missing:
	dh_missing --list-missing

override_dh_gencontrol:
	dh_gencontrol -- -V'openssh-server:Recommends=$(server_recommends)'