Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 18:59:10 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Cc:        "David O'Brien" <obrien@FreeBSD.org>, Kris Kennaway <kris@FreeBSD.org>, Bruce Evans <bde@FreeBSD.org>
Subject:   Re: cvs commit: src/secure/lib/libcrypto Makefile.inc src/secure/lib/libssl Makefile
Message-ID:  <20020920155910.GA69658@sunbay.com>
In-Reply-To: <200209201233.g8KCXKvs056949@freefall.freebsd.org>
References:  <200209201233.g8KCXKvs056949@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 20, 2002 at 05:33:19AM -0700, Ruslan Ermilov wrote:
> ru          2002/09/20 05:33:19 PDT
>=20
>   Modified files:
>     secure/lib/libcrypto Makefile.inc=20
>     secure/lib/libssl    Makefile=20
>   Log:
>   Bandaid for a broken world.  The real fix is somewhat more
>   complicated and will be sent for a review.
>  =20
>   Revision  Changes    Path
>   1.27      +3 -3      src/secure/lib/libcrypto/Makefile.inc
>   1.13      +7 -9      src/secure/lib/libssl/Makefile
>=20
My proposed "real fix" is to unobfuscate these makefiles by not
using the ${.OBJDIR}/openssl, at the cost of losing the ability
to build these libraries in the standalone mode (outside of the
buildworld and if new headers do not match /usr/include/openssl
stuff).  This is IMO not a problem, as most utilities depend on
new headers already be installed to /usr/include.  (Well, the
standalone building is still possible with this patch with the
"make includes; make ..." approarch, and that is the approach
we use during buildworld: "make includes" is the prerequisite
for a successful "make depend/all".)  Please let me know what
do you think.

%%%
Index: libcrypto/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/secure/lib/libcrypto/Makefile,v
retrieving revision 1.48
diff -u -r1.48 Makefile
--- libcrypto/Makefile	30 Jul 2002 14:47:24 -0000	1.48
+++ libcrypto/Makefile	20 Sep 2002 13:06:35 -0000
@@ -30,8 +30,9 @@
 MAINTAINER=3D	kris
=20
 # base sources
-SRCS+=3D	cpt_err.c cryptlib.c cversion.c ebcdic.c ex_data.c mem.c mem_dbg.=
c \
+SRCS=3D	cpt_err.c cryptlib.c cversion.c ebcdic.c ex_data.c mem.c mem_dbg.c=
 \
 	tmdiff.c uid.c
+INCS=3D	crypto.h ebcdic.h opensslv.h symhacks.h tmdiff.h ../e_os.h ../e_os=
2.h
=20
 # asn1
=20
@@ -50,6 +51,7 @@
 	t_spki.c t_x509.c t_x509a.c x_algor.c x_attrib.c x_cinf.c \
 	x_crl.c x_exten.c x_info.c x_name.c x_pkey.c x_pubkey.c \
 	x_req.c x_sig.c x_spki.c x_val.c x_x509.c x_x509a.c
+INCS+=3D	asn1.h asn1_mac.h
=20
 # blowfish
 SRCS+=3D	bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c
@@ -62,11 +64,13 @@
 .else
 SRCS+=3D	bf_enc.c
 .endif
+INCS+=3D	blowfish.h
=20
 # bio
 SRCS+=3D	b_dump.c b_print.c b_sock.c bf_buff.c bf_nbio.c bf_null.c \
 	bio_cb.c bio_err.c bio_lib.c bss_acpt.c bss_bio.c bss_conn.c \
 	bss_fd.c bss_file.c bss_log.c bss_mem.c bss_null.c bss_sock.c
+INCS+=3D	bio.h
=20
 # bn
=20
@@ -79,9 +83,11 @@
 .else
 SRCS+=3D	bn_asm.c
 .endif
+INCS+=3D	bn.h
=20
 # buffer
 SRCS+=3D	buf_err.c buffer.c=20
+INCS+=3D	buffer.h
=20
 # cast
 SRCS+=3D	c_cfb64.c c_ecb.c c_ofb64.c c_skey.c
@@ -90,12 +96,15 @@
 .else
 SRCS+=3D	c_enc.c
 .endif
+INCS+=3D	cast.h
=20
 # comp
 SRCS+=3D	c_rle.c c_zlib.c comp_lib.c
+INCS+=3D	comp.h
=20
 # conf
 SRCS+=3D	conf_api.c conf_def.c conf_err.c conf_lib.c
+INCS+=3D	conf.h conf_api.h
=20
 # des
 SRCS+=3D	cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c \
@@ -108,20 +117,25 @@
 .else
 SRCS+=3D	des_enc.c fcrypt_b.c
 .endif
+INCS+=3D	des.h
=20
 # dh
 SRCS+=3D	dh_check.c dh_err.c dh_gen.c dh_key.c dh_lib.c
+INCS+=3D	dh.h
=20
 # dsa=20
 SRCS+=3D	dsa_asn1.c dsa_err.c dsa_gen.c dsa_key.c dsa_lib.c dsa_ossl.c \
 	dsa_sign.c dsa_vrf.c
+INCS+=3D	dsa.h
=20
 # dso
 SRCS+=3D	dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c \
 	dso_openssl.c
+INCS+=3D	dso.h
=20
 # err
 SRCS+=3D	err.c err_all.c err_prn.c
+INCS+=3D	err.h
=20
 # evp
 SRCS+=3D	bio_b64.c bio_enc.c bio_md.c bio_ok.c c_all.c c_allc.c c_alld.c \
@@ -134,49 +148,62 @@
=20
 # hmac
 SRCS+=3D	hmac.c
+INCS+=3D	hmac.h
=20
 # idea
 .if defined(MAKE_IDEA) && ${MAKE_IDEA} =3D=3D YES
 SRCS+=3D	i_ecb.c i_cbc.c i_cfb64.c i_ofb64.c i_skey.c
+INCS+=3D	idea.h
 .endif
=20
 # lhash
 SRCS+=3D	lh_stats.c lhash.c
+INCS+=3D	lhash.h
=20
 # md2
 SRCS+=3D	md2_dgst.c md2_one.c
+INCS+=3D	md2.h
=20
 # md4
 SRCS+=3D	md4_dgst.c md4_one.c
+INCS+=3D	md4.h
=20
 # md5
 SRCS+=3D	md5_dgst.c md5_one.c
 .if ${MACHINE_ARCH} =3D=3D "i386"
 SRCS+=3D	md5-586.s
 .endif
+INCS+=3D	md5.h
=20
 # mdc2
 SRCS+=3D	mdc2dgst.c mdc2_one.c
+INCS+=3D	mdc2.h
=20
 # objects
 SRCS+=3D	o_names.c obj_dat.c obj_err.c obj_lib.c
+INCS+=3D	objects.h obj_mac.h
=20
 # pem
 SRCS+=3D	pem_all.c pem_err.c pem_info.c pem_lib.c pem_seal.c pem_sign.c
+INCS+=3D	pem.h pem2.h
=20
 # pkcs7
 SRCS+=3D	pk7_attr.c pk7_doit.c pk7_lib.c pk7_mime.c pk7_smime.c pkcs7err.c=
=20
+INCS+=3D	pkcs7.h
=20
 # pkcs12
 SRCS+=3D	p12_add.c p12_attr.c p12_bags.c p12_crpt.c p12_crt.c p12_decr.c \
 	p12_init.c p12_key.c p12_kiss.c p12_lib.c p12_mac.c p12_mutl.c \
 	p12_npas.c p12_sbag.c p12_utl.c pk12err.c
+INCS+=3D	pkcs12.h
=20
 # rand
 SRCS+=3D	md_rand.c rand_egd.c rand_err.c rand_lib.c rand_win.c randfile.c
+INCS+=3D	rand.h
=20
 # rc2
 SRCS+=3D	rc2_cbc.c rc2cfb64.c rc2_ecb.c rc2ofb64.c rc2_skey.c=20
+INCS+=3D	rc2.h
=20
 # rc4
 SRCS+=3D	rc4_skey.c
@@ -185,6 +212,7 @@
 .else
 SRCS+=3D	rc4_enc.c
 .endif
+INCS+=3D	rc4.h
=20
 # rc5
 SRCS+=3D	rc5cfb64.c rc5_ecb.c rc5ofb64.c rc5_skey.c
@@ -193,41 +221,74 @@
 .else
 SRCS+=3D	rc5_enc.c
 .endif
+INCS+=3D	rc5.h
=20
 # ripemd
 SRCS+=3D	rmd_dgst.c rmd_one.c
 .if ${MACHINE_ARCH} =3D=3D "i386"
 SRCS+=3D	rmd-586.s
 .endif
+INCS+=3D	ripemd.h
=20
 # rsa
 .if defined(WITH_RSA) && ${WITH_RSA} =3D=3D YES
 SRCS+=3D	rsa_chk.c rsa_eay.c rsa_err.c rsa_gen.c rsa_lib.c rsa_none.c \
 	rsa_null.c rsa_oaep.c rsa_pk1.c rsa_saos.c rsa_sign.c rsa_ssl.c
 .endif
+INCS+=3D	rsa.h
=20
 # sha
 SRCS+=3D	sha_dgst.c sha_one.c sha1_one.c sha1dgst.c
 .if ${MACHINE_ARCH} =3D=3D "i386"
 SRCS+=3D	sha1-586.s
 .endif
+INCS+=3D	sha.h
=20
 # stack
 SRCS+=3D	stack.c
+INCS+=3D	safestack.h stack.h
=20
 # txt_db
 SRCS+=3D	txt_db.c
+INCS+=3D	txt_db.h
=20
 # x509
 SRCS+=3D	by_dir.c by_file.c x509_att.c x509_cmp.c x509_d2.c x509_def.c \
 	x509_err.c x509_ext.c x509_lu.c x509_obj.c x509_r2x.c \
 	x509_req.c x509_set.c x509_trs.c x509_txt.c x509_v3.c \
 	x509_vfy.c x509name.c x509rset.c x509spki.c x509type.c x_all.c=20
+INCS+=3D	x509.h x509_vfy.h
 # x509v3
 SRCS+=3D	v3_akey.c v3_alt.c v3_bcons.c v3_bitst.c v3_conf.c v3_cpols.c \
 	v3_crld.c v3_enum.c v3_extku.c v3_genn.c v3_ia5.c v3_info.c \
 	v3_int.c v3_lib.c v3_pku.c v3_prn.c v3_purp.c v3_skey.c \
 	v3_sxnet.c v3_utl.c v3err.c
+INCS+=3D	x509v3.h
+
+SRCS+=3D	buildinf.h
+INCS+=3D	opensslconf.h evp.h
+INCSDIR=3D${INCLUDEDIR}/openssl
+INCSLINKS=3D openssl/des.h ${INCLUDEDIR}/des.h
+
+CLEANFILES+=3D buildinf.h opensslconf.h evp.h
+
+buildinf.h:
+	( echo "#ifndef MK1MF_BUILD"; \
+	echo "  /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */=
"; \
+	echo "  #define CFLAGS \"$(CC)\""; \
+	echo "  #define PLATFORM \"`uname -s`-`uname -m`\""; \
+	echo "  #define DATE \"`LC_ALL=3DC date`\""; \
+	echo "#endif" ) > ${.TARGET}
+
+opensslconf.h: opensslconf-${MACHINE_ARCH}.h
+	cp ${.ALLSRC} ${.TARGET}
+
+evp.h: ${LCRYPTO_SRC}/evp/evp.h
+.if !defined(MAKE_IDEA) || ${MAKE_IDEA} !=3D YES
+	sed '/^#ifndef NO_IDEA$$/,/^#endif$$/d' ${.ALLSRC} > ${.TARGET}
+.else
+	cp ${.ALLSRC} ${.TARGET}
+.endif
=20
 POD1+=3D	apps/CA.pl.pod apps/asn1parse.pod apps/ca.pod \
 	apps/ciphers.pod apps/crl.pod \
@@ -365,10 +426,6 @@
 	des_crypt.3 des_cbc_cksum.3 des_crypt.3 des_quad_cksum.3 \
 	des_crypt.3 des_enc_read.3 des_crypt.3 des_enc_write.3 \
 	des_crypt.3 des_set_odd_parity.3 des_crypt.3 des_is_weak_key.3
-
-INCS=3D		${HDRS} openssl/evp.h openssl/opensslconf.h
-INCSDIR=3D	${INCLUDEDIR}/openssl
-INCSLINKS=3D	openssl/des.h ${INCLUDEDIR}/des.h
=20
 afterinstall:
 .if !defined(NOPIC)
Index: libcrypto/Makefile.inc
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/secure/lib/libcrypto/Makefile.inc,v
retrieving revision 1.27
diff -u -r1.27 Makefile.inc
--- libcrypto/Makefile.inc	20 Sep 2002 12:33:18 -0000	1.27
+++ libcrypto/Makefile.inc	20 Sep 2002 13:06:35 -0000
@@ -13,49 +13,3 @@
 .endif
=20
 WITH_RSA?=3D YES
-
-HDRS+=3D	asn1/asn1.h asn1/asn1_mac.h bio/bio.h bf/blowfish.h bn/bn.h \
-	buffer/buffer.h cast/cast.h comp/comp.h conf/conf.h crypto.h \
-	des/des.h dh/dh.h dsa/dsa.h ../e_os.h ../e_os2.h ebcdic.h \
-	err/err.h hmac/hmac.h lhash/lhash.h md2/md2.h \
-	md5/md5.h mdc2/mdc2.h objects/objects.h opensslv.h pem/pem.h \
-	pem/pem2.h pkcs12/pkcs12.h pkcs7/pkcs7.h rand/rand.h rc2/rc2.h \
-	rc4/rc4.h rc5/rc5.h ripemd/ripemd.h rsa/rsa.h stack/safestack.h \
-	sha/sha.h stack/stack.h tmdiff.h txt_db/txt_db.h x509/x509.h \
-	x509/x509_vfy.h x509v3/x509v3.h symhacks.h objects/obj_mac.h \
-	md4/md4.h dso/dso.h conf/conf_api.h
-
-.if defined(MAKE_IDEA) && ${MAKE_IDEA} =3D=3D YES
-HDRS+=3D idea/idea.h
-.endif
-
-SRCS+=3D		buildinf.h openssl/opensslconf.h openssl/evp.h
-CLEANFILES+=3D	buildinf.h openssl/opensslconf.h openssl/evp.h
-CLEANDIRS+=3D	openssl
-
-buildinf.h:
-	( echo "#ifndef MK1MF_BUILD"; \
-	echo "  /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */=
"; \
-	echo "  #define CFLAGS \"$(CC)\""; \
-	echo "  #define PLATFORM \"`uname -s`-`uname -m`\""; \
-	echo "  #define DATE \"`LC_ALL=3DC date`\""; \
-	echo "#endif" ) > ${.TARGET}
-
-openssl/opensslconf.h:  ../libcrypto/opensslconf-${MACHINE_ARCH}.h
-	mkdir -p openssl
-	cp ${.OODATE} ${.TARGET}
-
-openssl/evp.h: ${LCRYPTO_SRC}/evp/evp.h
-	mkdir -p openssl
-.if !defined(MAKE_IDEA) || ${MAKE_IDEA} !=3D YES
-	sed '/^#ifndef NO_IDEA$$/,/^#endif$$/d' ${.OODATE} > ${.TARGET}
-.else
-	${INSTALL} -C -m 444 ${.OODATE} ${.TARGET}
-.endif
-
-SRCS+=3D	${HDRS:T:S;^;openssl/;}
-.for h in ${HDRS:S/^/${LCRYPTO_SRC}\//}
-openssl/${h:T}: ${h}
-	mkdir -p openssl
-	${INSTALL} -C -m 444 ${h} openssl
-.endfor
Index: libssl/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/secure/lib/libssl/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- libssl/Makefile	20 Sep 2002 12:33:19 -0000	1.13
+++ libssl/Makefile	20 Sep 2002 13:06:36 -0000
@@ -14,7 +14,6 @@
=20
 INCS=3D	ssl.h ssl2.h ssl23.h ssl3.h tls1.h
 INCSDIR=3D${INCLUDEDIR}/openssl
-HDRS=3D	${INCS:S;^;../ssl/;}
=20
 .include "../libcrypto/Makefile.inc"
=20
%%%


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--HcAYCG3uE/tztfnV
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9i0XOUkv4P6juNwoRApM6AJkBO5rgP3t6Xoqc0fFYet/ASv1VqwCfYoNW
70CDWjneFU1R+bV40gIZpB0=
=vaTM
-----END PGP SIGNATURE-----

--HcAYCG3uE/tztfnV--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020920155910.GA69658>