Openssl packet erstellen mit cryptodev geht nicht

Vom einfachen Programm zum fertigen Debian-Paket, Fragen rund um Programmiersprachen, Scripting und Lizenzierung.
Antworten
Mischterx
Beiträge: 6
Registriert: 12.05.2014 20:30:27

Openssl packet erstellen mit cryptodev geht nicht

Beitrag von Mischterx » 17.05.2014 13:55:34

Hi,

ich versuche momentan für eine Qnap Ts-212p den AES Accelerator zum laufen bekommen. Ich habe mich nach dieser Anleitung gerichtet, weil ich sowas vorher noch nie gemacht habe.
http://rouge.eu.org/blog/linux/enabling ... s-212-box/
Das hat soweit ich alle funktioniert und cryptodev wird jetzt unter lsmod angezeigt.
Als nächstes habe ich unter CONFARGS "

Code: Alles auswählen

-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64
" eingefügt und die "eng_cryptodev.c" kopiert.
Wenn ich jetzt aber (als root)

Code: Alles auswählen

debian/rules binaries
ausführe, kommt immer diese ausgabe:

Code: Alles auswählen

dh_testdir
/bin/bash: dh_testdir: Kommando nicht gefunden.
make: *** [build-stamp] Fehler 127
Habe ich vergessen irgentwas zu installieren?

Lg
Philipp

debian/rules

Code: Alles auswählen

#!/usr/bin/make -f
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified
#
# Modified to be a prototype for debmake by Christoph Lameter <clameter@debian.org>
SHELL=/bin/bash

package=openssl

# For generating the manpages
export VERSION=$(shell dpkg-parsechangelog | grep '^Version:' | sed -e 's/^.*://' -e 's/-.*//')

# The binary architeture
DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_MULTIARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

CONFARGS  = --prefix=/usr --openssldir=/usr/lib/ssl --libdir=lib/$(DEB_HOST_MULTIARCH) -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64  no-idea no-mdc2 no-rc5 zlib  enable-tlsext no-ssl2 
OPT_alpha = ev4 ev5
OPT_i386  = i586 i686/cmov
ARCHOPTS  = OPT_$(DEB_HOST_ARCH)
OPTS      = $($(ARCHOPTS))
WANTED_LIBC_VERSION = 2.3.1-10

ifeq ($(DEB_HOST_ARCH_CPU), amd64)
	CONFARGS += enable-ec_nistp_64_gcc_128
endif

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir
#	perl util/ssldir.pl /usr/lib/ssl
#	chmod +x debian/libtool
	./Configure no-shared $(CONFARGS) debian-$(DEB_HOST_ARCH)
	make -f Makefile all
	make test
	mv libcrypto.a libcrypto.static
	mv libssl.a libssl.static
	make -f Makefile clean
	test -z "$(OPTS)" || for opt in $(OPTS); \
	do \
		set -xe; \
		./Configure shared $(CONFARGS) debian-$(DEB_HOST_ARCH)-$$opt; \
		make -f Makefile all; \
		make test; \
		mkdir -p $$opt; \
		mv libcrypto.so* libssl.so* $$opt/; \
		make -f Makefile clean; \
	done
	./Configure shared $(CONFARGS) debian-$(DEB_HOST_ARCH)
	#make -f Makefile depend
	ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
#	make -f Makefile linux-shared
	make -f Makefile all
	make test
#	strip apps/openssl
#	make -f Makefile clean
#	./Configure --prefix=/usr --openssldir=/usr/lib/ssl no-idea no-mdc2 no-rc5 debian-$(DEB_HOST_ARCH)
#	make -f Makefile all
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp
	-./Configure $(CONFARGS) debian-$(DEB_HOST_ARCH)
	[ ! -f Makefile ] || make -f Makefile  clean clean-shared
	#-make -f Makefile  dclean
#	perl util/ssldir.pl /usr/local/ssl
	-rm -f test/.rnd test/testkey.pem test/testreq.pem test/certCA.srl
	-rm -f util/mk1mf.bak Makefile.bak `find . -name Makefile.save` 
	-rm -f crypto/pem/ctx_size
	-rm -f `find . -name "*~"`
	-rm -f `find . -name "*.orig" -o -name "*.rej"`
	-rm -f certs/*.0 certs/*.1
#	-rm -rf debian/tmp debian/files* core `find debian/* -type d`
	-rm -rf core $(OPTS)
	-rm doc/*.pod
	-rm -f libcrypto.* libssl.*
	-cd test && rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bntest ectest  ecdsatest ecdhtest ideatest md2test  md4test md5test hmactest rc2test rc4test rc5test destest shatest sha1test sha256t sha512t mdc2test rmdtest randtest dhtest enginetest bftest casttest ssltest exptest dsatest rsa_test evp_test *.ss *.srl log dummytest newkey.pem igetest
	-rm Makefile apps/CA.pl tools/c_rehash crypto/opensslconf.h crypto/x86_64cpuid.S
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs
	make -f Makefile install INSTALL_PREFIX=`pwd`/debian/tmp

binary-indep:	build install
	dh_testdir
	dh_testroot
	dh_installdirs -i
	dh_installman -plibssl-doc
	dh_installdocs -i
	dh_movefiles -i
	dh_installchangelogs -i CHANGES
	dh_compress -i
	dh_fixperms -i
	dh_gencontrol -i
	dh_installdeb -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch:	build install
	dh_testdir
	dh_testroot
	dh_installdirs -a
	# pic static libraries, nobody should need them
#	mv debian/tmp/usr/lib/libcrypto.a debian/tmp/usr/lib/libcrypto_pic.a
#	mv debian/tmp/usr/lib/libssl.a debian/tmp/usr/lib/libssl_pic.a
	cp -pf libcrypto.static debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libcrypto.a
	cp -pf libssl.static debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libssl.a
	mkdir -p debian/tmp/etc/ssl
	mv debian/tmp/usr/lib/ssl/{certs,openssl.cnf,private} debian/tmp/etc/ssl/
	ln -s /etc/ssl/{certs,openssl.cnf,private} debian/tmp/usr/lib/ssl/
	cp -pf debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libcrypto.so.* debian/libcrypto1.0.0-udeb/usr/lib/
	cp -auv lib*.so* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
	for opt in $(OPTS); do set -xe; mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/$$opt; cp -auv $$opt/lib*.so* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/$$opt/; done
	install debian/copyright debian/libssl1.0.0/usr/share/doc/libssl1.0.0/
	install debian/changelog debian/libssl1.0.0/usr/share/doc/libssl1.0.0/changelog.Debian
	install debian/copyright debian/libssl-dev/usr/share/doc/libssl-dev/
	install debian/changelog debian/libssl-dev/usr/share/doc/libssl-dev/changelog.Debian

	dh_installdocs -a CHANGES.SSLeay README NEWS debian/README.optimization
	dh_installexamples -a
	dh_installchangelogs -a CHANGES
	dh_installman -popenssl
	dh_installdebconf -a
	dh_movefiles -a
	dh_compress -a
	chmod 700 debian/openssl/etc/ssl/private
	dh_fixperms -a -X etc/ssl/private
	dh_strip -a --dbg-package=libssl1.0.0
	dh_perl -a -d
	dpkg-gensymbols -Pdebian/libssl1.0.0/ -plibssl1.0.0 -c4
	dh_makeshlibs -a -V "libssl1.0.0 (>= 1.0.1d)" --add-udeb="libcrypto1.0.0-udeb"
	dh_shlibdeps -a -L libssl1.0.0 -l debian/libssl1.0.0/usr/lib/$(DEB_HOST_MULTIARCH)
	dh_gencontrol -a
	dh_installdeb -a
	dh_md5sums -a
	dh_builddeb -a
	echo -en "\a"

# Below here is fairly generic really

binary:		binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean install

Antworten