Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto for build openssl >= 0.9.7
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
kENNy_
n00b
n00b


Joined: 06 Dec 2002
Posts: 45
Location: Hannover/Germany

PostPosted: Wed May 14, 2003 11:26 pm    Post subject: Howto for build openssl >= 0.9.7 Reply with quote

Hi there,

in the ebuild for openssl 0.9.7b is a big warning

8OBIG FAT WARNING!!!8O

You must re-emerge every package that links to openssl after you have
merged openssl 0.9.7 This is becuse packages that links against
openssl 0.9.7 links against the full version. Also, if you don't have the
sources for the packages you need to re-emerge you should download
them with emerge -f prior to the installation of openssl 0.9.7 This is
becuse wget may be linked against openssl 0.9.7 To generate a list of
packages that links against openssl 0.9.7 you can download and run the
script from http://cvs.gentoo.org/~aliz/openssl_update.sh If
you are using binary packages you need to rebuild those against the
new version of openssl 0.9.7.


But after I read this warning, I updated openssl!

OK let's start
Code:
cd /usr/portage/dev-libs/openssl/
emerge -u openssl-0.9.7b.ebuild


After this you have to run the script openssl_update.sh
Code:
sh openssl_update.sh > liste1

Now we have a file with all packages that needs an update after openssl is updated.

After this emerge the biggest problem is to emerge the packages that you have to update in the right order.
For this I coded I small perl script
Code:
#!/usr/bin/perl

open (IN,"<liste1");  # the file where the output from the given script
                      # is. http://cvs.gentoo.org/~aliz/openssl_update.sh
@in = <IN>;
close IN;

@out = sort @in;

for ($i=0;$i<$#out;$i++){
  while ($out[$i] eq $out[$i+1]){
    splice(@out,$i,1);
  }
}

while (@out){
  $output = "$#out packages left to sort.    \n";
  printf $output;
  @first = `emerge -ep =$out[0]`;
  if ($first[4] =~ /have been masked/){
    push @new,$out[0];
    splice (@out,0,1);
  }elsif ($first[4] =~ /there are no masked/){
    print "** Error ** Can't find package: $out[0]\n\n";
    splice (@out,0,1);
  }else{
    splice (@first,-1);  #cut the lines from emerge -ep package at
                                # the end. Should be -1 or -2
    splice (@first,0,4); # same with the first 4 lines
    foreach $i (@first){
      my @tmp = split(/]\ /,$i);
      my $pak = @tmp[1];
      chomp $pak;
      $num = 0;
      foreach $j (@out){
        chomp $j;
        if ($pak =~ $j){
          push @new,$j;
          splice (@out,$num,1);
        }
        $num++;
      }
    }
  }
  printf "^[[1A";  #ESC[1A to move the coursor one line up
}

print "in the following order the packages should go to emerge:\n";
foreach $i (@new){
  print $i."\n";
}

Let's execute the script, and go into the kitchen and get now a cup coffee.

After the script is finished you know in which order you should emerge the packages.
Do this by type for each line
Code:
emerge =name/in_the_list-version

Or write your own small script for it :)

Now you better get down and pray!
Good luck! 8O


Last edited by kENNy_ on Thu May 22, 2003 9:29 am; edited 1 time in total
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Thu May 15, 2003 9:01 am    Post subject: Reply with quote

Reading this I think qpkg should have two extra options; One to sort its output dependency-wise and another to list only the packages. I mean, why an extra script, if qpkg -I -q openssl does nearly the same?


Carlo
Back to top
View user's profile Send private message
kENNy_
n00b
n00b


Joined: 06 Dec 2002
Posts: 45
Location: Hannover/Germany

PostPosted: Thu May 15, 2003 9:50 am    Post subject: Reply with quote

You have to update much more packages than "qpkg -I -q openssl" find.
The script http://cvs.gentoo.org/~aliz/openssl_update.sh find every package that links again openssl.
"qpkg -I -q openssl" only finds the packages what have DEPEND="openssl" in the ebuild.
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Thu May 15, 2003 1:07 pm    Post subject: Reply with quote

kENNy_ wrote:
You have to update much more packages than "qpkg -I -q openssl" find.


:oops: I see. Dumb idea.

Another one: The openssl_update.sh script produces only an "empty list" for me... :?:


Carlo
Back to top
View user's profile Send private message
alexbuell
Guru
Guru


Joined: 18 Jul 2002
Posts: 490
Location: "Hemp"shire, UK

PostPosted: Sat May 17, 2003 4:13 pm    Post subject: Reply with quote

Carlo wrote:
kENNy_ wrote:
You have to update much more packages than "qpkg -I -q openssl" find.


:oops: I see. Dumb idea.

Another one: The openssl_update.sh script produces only an "empty list" for me... :?:


Carlo


Same here.. ?!
Back to top
View user's profile Send private message
TheEternalVortex
Apprentice
Apprentice


Joined: 15 Oct 2002
Posts: 207
Location: San Jose, CA

PostPosted: Sat May 17, 2003 7:58 pm    Post subject: Reply with quote

I'm currently running openssl 0.9.7b, and I didn't have to run this script at all. I just reinstalled packages depending on openssl and everything seems to be working. Now granted I've only been doing this for a few days, so problems might arise in the future, but it should be a simple matter to fix them. Just make sure you have the wget sources first, since you'll need that to fetch any other sources.

$ ldd /usr/bin/wget
libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x4002b000)
libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x4005c000)
libdl.so.2 => /lib/libdl.so.2 (0x4015c000)
libc.so.6 => /lib/libc.so.6 (0x4015f000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
_________________
-- Andy
Back to top
View user's profile Send private message
funkmankey
Guru
Guru


Joined: 06 Mar 2003
Posts: 304
Location: CH

PostPosted: Sun May 18, 2003 4:13 am    Post subject: Reply with quote

I'm with the Vortex on this one -- as long as you fetch wget first, you're safe.

Code:
etcat depends openssl

was not too helpful, prolly does similar to the qpkg command listed above.

gnome-vfs failed to rebuild, but gave enough info that rebuilding gconf first fixed that issue. other stuff like ssh, samba, gaim was pretty obvious anyway.

guess we will just have to see what else breaks in the next few days... ;-]
Back to top
View user's profile Send private message
repugnant
Tux's lil' helper
Tux's lil' helper


Joined: 16 Apr 2003
Posts: 86

PostPosted: Sun May 18, 2003 8:32 pm    Post subject: Reply with quote

For people getting an empty list after running openssl_update.sh, you have to run the script *after* you update OpenSSL. I had the same problem at first :) (Be sure to emerge -f wget before emerging OpenSSL!)
Back to top
View user's profile Send private message
GoinBald
n00b
n00b


Joined: 19 Apr 2003
Posts: 39
Location: Canada

PostPosted: Thu May 22, 2003 4:44 pm    Post subject: How long does that script take? Reply with quote

Hello Everyone,
Thanks for the HOWTO Muchos appreciated!
I was wondering how long that script takes.
This could be a cut n' paste issue. So if someone could post a working file to ensure it isn't it would also be appreciated. :)
When I attempt to sort, the output returned is (something like)
65 packages to sort
^[[55 packages left to sort
^[[55 packages left to sort
^[[55 packages left to sort
^[[55 packages left to sort
^[[55 packages left to sort
^[[55 packages left to sort

This continues for a long time :(

TIA,
another Homer look-alike. :)
Back to top
View user's profile Send private message
repugnant
Tux's lil' helper
Tux's lil' helper


Joined: 16 Apr 2003
Posts: 86

PostPosted: Thu May 22, 2003 10:07 pm    Post subject: Reply with quote

I had this problem too. I ended up emerging everything in the list generated by update_openssl. Could be a cut-n-paste problem though.
Back to top
View user's profile Send private message
GoinBald
n00b
n00b


Joined: 19 Apr 2003
Posts: 39
Location: Canada

PostPosted: Fri May 23, 2003 12:31 am    Post subject: Emerging now. Reply with quote

Hello,
I ended up, restoring openssl then running the script.
Then openssl-wget-list :)

Owner of the 3 tooth comb!
(had to put a tag in ;) )
Back to top
View user's profile Send private message
kENNy_
n00b
n00b


Joined: 06 Dec 2002
Posts: 45
Location: Hannover/Germany

PostPosted: Fri May 23, 2003 11:00 am    Post subject: Reply with quote

yes, I have the same now. There are some changes in the new portage I think.

Please do a "emerge -ep something" and count the empty lines after the last package that is listed.
If there are only one line set the number to "-1".
If there are two lines set the number to "-2".

Code:

  }else{
    splice (@first,-1);  #cut the lines from emerge -ep package at
                                # the end. Should be -1 or -2
    splice (@first,0,4); # same with the first 4 lines


kENNy
Back to top
View user's profile Send private message
GoinBald
n00b
n00b


Joined: 19 Apr 2003
Posts: 39
Location: Canada

PostPosted: Fri May 23, 2003 12:04 pm    Post subject: She's completed! Reply with quote

Hello,
Thanks again!
I can't say this enough!
Had to use a few experimental builds though
sasl, libgtkhtml, gal, gnome-vfs, evolution ...
they didn't play nicely with .9.7x
Thanks again,

Heavy holder in Turtle Wax. ;)

P.S. I really liked the update to the xterm subject title!
Back to top
View user's profile Send private message
MaD-DaRiUs
n00b
n00b


Joined: 21 Aug 2002
Posts: 46
Location: BC, Canada

PostPosted: Thu Jun 12, 2003 3:13 pm    Post subject: Reply with quote

hm, is it just me or isn't a little stupid that you have to run the script after you upgrade to find out what you need?

well it seems you can fix this little problem simply by hacking there little script like so.

Code:

#!/bin/bash

#replace this with the currently installed version
openssl_installed="0.9.6"

for i in $(find / -type f -name '*.so*' 2>/dev/null) \
        $(find $(echo $PATH | sed 's/:/ /g') -type f -perm +0111 2>/dev/null); do
                ldd ${i} 2>&1 | grep -e "libcrypto.so.${openssl_installed}" \
                        -e "libssl.so.${openssl_installed}" - >/dev/null \
                        && qpkg -f -nc  -v $i
        done

you basically just have to change these lines to get rid of the "=> not found"
Code:

ldd ${i} 2>&1 | grep -e "libcrypto.so.${openssl_installed} => not found" \
                        -e "libssl.so.${openssl_installed} => not found" - >/dev/null \

which you don't really need because there aren't going to be any apps that rely on libssl and libcrypto that will relink themselves.
elementary actually it's so easy i am surprised no one else has posted this
Back to top
View user's profile Send private message
swimgeek
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2003
Posts: 124
Location: Minneapolis, MN, USA

PostPosted: Thu Aug 14, 2003 2:38 am    Post subject: openssh installation problems after emerge openssl 0.9.7b Reply with quote

Hi,
I emerged openssl-0.9.7b and then tried to re-emerge openssh and here is the error message I got:
Code:

gcc -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect1.o sshconnect2.o -L. -Lopenbsd-compat/  -lssh -lopenbsd-compat -lutil -lz -lnsl -lcrypto
./libssh.a(rsa.o)(.text+0x269): In function `rsa_generate_additional_parameters':
: undefined reference to `BN_mod'
./libssh.a(rsa.o)(.text+0x29b): In function `rsa_generate_additional_parameters':
: undefined reference to `BN_mod'
collect2: ld returned 1 exit status
make: *** [ssh] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: net-misc/openssh-3.6.1_p2 failed.
!!! Function src_compile, Line 92, Exitcode 2
!!! compile problem

Did anyone get the same message? What might be wrong?

thanks!
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Wed Aug 27, 2003 12:09 am    Post subject: Reply with quote

:!: ^ :arrow: https://bugs.gentoo.org/show_bug.cgi?id=13795


Carlo
_________________
Please make sure that you have searched for an answer to a question after reading all the relevant docs.
Back to top
View user's profile Send private message
elfo
n00b
n00b


Joined: 30 Jun 2003
Posts: 12

PostPosted: Wed Sep 24, 2003 5:26 pm    Post subject: Needed to compile openssl-0.7.9 by HAND Reply with quote

emerge openssl just didn't compile the libs, just docs and headers...
instead of compiling it gave me a very very long list of "coloured" errors... like he was doing a "cat" on the configure and/or the Makefile instead of *running* them.

so my problem is BEFORE re-emerging the packages linked to libssl/libcrypto or whatever.

I compiled openssl 0.7.9 by hand (it worked fine.. so i think there are some problems with the ebuild...?)

after i emerged openssl 0.7.9 again... and didn't work at all (same thing as before).. but i had my libssl.so.0.7.9 in /usr/lib from manually installed openssl.

i tried to emerge wget.. and magically it just "compiled" docs and unuseful stuffs but it didn't actually compiled any code.

hope this wont be useful for anybody.
Back to top
View user's profile Send private message
elfo
n00b
n00b


Joined: 30 Jun 2003
Posts: 12

PostPosted: Wed Sep 24, 2003 5:41 pm    Post subject: you know.. i'm getting REALLY angry... Reply with quote

i can emerge (mostly) everything without problems...
why openssl is so different?

i'm wondering what i'm supposed to do with this... send to hell emerge and continue manually? but I think emerge will get angry when i'll use it again....

this is an S.O.S


thank you for all the fish..
Back to top
View user's profile Send private message
Lasker
Guru
Guru


Joined: 17 Jul 2002
Posts: 445

PostPosted: Thu Sep 25, 2003 2:21 am    Post subject: Reply with quote

Is it safe to unmerge openssl?
I really don't want to end up in a white jacket after rebuilding my whole system every 3 days! :evil:
Back to top
View user's profile Send private message
friday
n00b
n00b


Joined: 07 Feb 2003
Posts: 28
Location: Germany

PostPosted: Tue Sep 30, 2003 5:25 pm    Post subject: Reply with quote

Have a look at
Code:
# revdep-rebuild --help


Cheers
Back to top
View user's profile Send private message
JjcampNR
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2003
Posts: 127
Location: Massachusetts, USA

PostPosted: Thu Nov 06, 2003 2:08 am    Post subject: Reply with quote

Fantastic! Thanks, that definitely did the trick. :D

--Josh
_________________
Damn the man, fight the power!

http://www.torquenetworks.com
Back to top
View user's profile Send private message
charstar
n00b
n00b


Joined: 11 Feb 2003
Posts: 30
Location: Vancouver, WA

PostPosted: Thu Nov 06, 2003 2:30 am    Post subject: Reply with quote

all i've got to say is
dude, this sucks
:cry:
Back to top
View user's profile Send private message
tomaw
Guru
Guru


Joined: 26 Mar 2003
Posts: 429
Location: UK

PostPosted: Thu Nov 06, 2003 8:23 am    Post subject: Reply with quote

friday wrote:
Have a look at
Code:
# revdep-rebuild --help


Cheers


This works perfectly for me. After doing a `revdep-rebuild -p` then `revdep-rebuild` everything is working fine. Course I already had the source files downloaded....
_________________
Tom Wesley
Back to top
View user's profile Send private message
joshdr77
Apprentice
Apprentice


Joined: 03 Jan 2003
Posts: 180

PostPosted: Sat Nov 08, 2003 11:50 am    Post subject: Reply with quote

hey

got everything working good but openssh

it cant emerge, and i have read a few post on howto fix it, but it dosnt work

can neone help me
Back to top
View user's profile Send private message
Beekster
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 268
Location: Sydney

PostPosted: Tue Nov 11, 2003 12:15 am    Post subject: Reply with quote

The http://cvs.gentoo.org/~aliz/openssl_update.sh link isn't working for me at the moment, can someone please post the script to this thread?

Thanks in advance...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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