Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 26 Apr 2015, 20:34
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Openssl w/ gost-engine
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
s243a

Joined: 02 Sep 2014
Posts: 140

PostPosted: Fri 10 Apr 2015, 11:51    Post subject:  Openssl w/ gost-engine  

Related to my thread about DNSCrypt, I need onessl compiled with gost-engine for it to work. I'm trying this on my own on the version of puppylinux called "precise" and if successful I will try it on other pups.

So far the issues that I've had are:
- I've tried the classic "configure" then make install
Code:

make install DESTDIR=/tmp/xxx

but this didn't build to the target director. It looks from the primary make file that instead there are two macros you are supposed to set depending on weather you you want want the target to apply recursively or not:
Code:

# BUILD_ONE_CMD is a macro to build a given target in a given
# subdirectory if that subdirectory is part of $(DIRS).  It requires
# exactly the same shell variables as BUILD_CMD.
#
# RECURSIVE_BUILD_CMD is a macro to build a given target in all
# subdirectories defined in $(DIRS).  It requires that the target
# is given through the shell variable `target'.

https://github.com/luvit/openssl/blob/master/openssl/Makefile

Needless to say I decide to try new2dir instead since this takes care of this stuff automatically. I'm not sure which version of new2dir I have.

new2dir worked as far as the compiling and creating a pet package went but looking inside the pet pacakage i found no "gost" shared libraries. I need to figure how to specify which ssl engines to include.

Some relevant parts of the primary make file:
Code:

line#106  ENGINES_ASM_OBJ=
...
line#141  DIRS=   crypto ssl engines apps test tools
line#142  ENGDIRS= ccgost
...
line#208  BUILDENV=...
line#237        ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)'      \
line#276  build_libs: build_crypto build_ssl build_engines
....
line#282  build_engines:
line#283   @dir=engines; target=all; $(BUILD_ONE_CMD)

https://github.com/luvit/openssl/blob/master/openssl/Makefile

Lines#541-614
Code:

install: all install_docs install_sw

install_sw:
   @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
      $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
      $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
      $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
      $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
      $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
      $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
      $(INSTALL_PREFIX)$(OPENSSLDIR)/private
   @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
   do \
   (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
   chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
   done;
   @set -e; target=install; $(RECURSIVE_BUILD_CMD)
   @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
   do \
      if [ -f "$$i" ]; then \
      (       echo installing $$i; \
         cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
         $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
      fi; \
   done;
   @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
      tmp="$(SHARED_LIBS)"; \
      for i in $${tmp:-x}; \
      do \
         if [ -f "$$i" -o -f "$$i.a" ]; then \
         (       echo installing $$i; \
            if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
               c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
               cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
               chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
               cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
               chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
            else \
               cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
               chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
            fi ); \
            if expr $(PLATFORM) : 'mingw' > /dev/null; then \
            (   case $$i in \
                  *crypto*) i=libeay32.dll;; \
                  *ssl*)    i=ssleay32.dll;; \
               esac; \
               echo installing $$i; \
                cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
                chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
                mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
            fi; \
         fi; \
      done; \
      (   here="`pwd`"; \
         cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
         $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
      if [ "$(INSTALLTOP)" != "/usr" ]; then \
         echo 'OpenSSL shared libraries have been installed in:'; \
         echo '  $(INSTALLTOP)'; \
         echo ''; \
         sed -e '1,/^$$/d' doc/openssl-shared.txt; \
      fi; \
   fi
   cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
   chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
   cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
   chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
   cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
   chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc

https://github.com/luvit/openssl/blob/master/openssl/Makefile

In the next level down openss/engines we have:
Code:

line#12  ENGDIRS= ccgost
line#13 
line#14  RECURSIVE_MAKE=   [ -z "$(ENGDIRS)" ] || for i in $(ENGDIRS) ; do \
line#15            (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
line#16            $(MAKE) -e TOP=../.. DIR=$$i $$target ) || exit 1; \
line#17        done;
..
line#73  all:   lib subdirs
..
line#90  subdirs:
line#91     echo $(EDIRS)
line#92     @target=all; $(RECURSIVE_MAKE)

https://github.com/luvit/openssl/blob/master/openssl/engines/Makefile
and the next level down (openssl/engines/ccgost) we have:
https://github.com/luvit/openssl/blob/master/openssl/engines/ccgost/Makefile

which at the moment I won't highlight any of the makefile code.
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 140

PostPosted: Fri 17 Apr 2015, 16:16    Post subject:  

I figured out how to build shared libraries. I did so by adding the "--shared" option as an input to the configure file:
Code:

perl ./ConfigureEcho linux-elf --shared -fPIC -DOPENSSL_PIC -march=pentium -Wa,--noexecstack



I also edited INSTALL_PREFIX in the make file as follows
Code:

Line#28  INSTALL_PREFIX=/tmp/openssl

I should though look for the option in the configure script to do this though because the configure script overwrites the makefile.

Edit: Looks like gost was built as well.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0737s ][ Queries: 11 (0.0092s) ][ GZIP on ]