LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-06-2010, 04:56 PM   #1
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Rep: Reputation: 94
Slackbuild adapted from 12.2 to 13 still drops stuff in /usr/lib,,, is this normal?


Hi Forum,

I tried adapting the slackbuild from Python 2.5.2 from Slackware 12.2 to Slackware64 13...

made these channges in bold :

Code:
#!/bin/bash
CWD=`pwd`
TMP=${TMP:-/tmp}
PKG=$TMP/package-python
rm -rf $PKG
mkdir -p $PKG

VERSION=2.5.2
ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-4}

# Location for Python site-packages:
SITEPK=$PKG/usr/lib64/python2.5/site-packages
# same as above without $PKG
TOOLSDIR=/usr/lib64/python2.5/site-packages

# Normally I don't trust -O3, but it is the Python default so
# I'll assume that in this case it has been well tested.
if [ "$ARCH" = "i386" ]; then
  SLKCFLAGS="-O3 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O3 -march=i486 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O3"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O3 -fPIC"
fi

cd $TMP
rm -rf Python-$VERSION
tar xjvf $CWD/Python-$VERSION.tar.bz2 || exit 1

cd Python-$VERSION

# Security patches:
zcat $CWD/patches/CVE-2008-1679-1721.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
zcat $CWD/patches/CVE-2008-3144.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
zcat $CWD/patches/CVE-2008-3142.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
zcat $CWD/patches/CVE-2008-2316.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
zcat $CWD/patches/CVE-2008-2315.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1

# Clean up after the patches:
find . -name "*.orig" -exec rm "{}" \;

chown -R root:root .
find . -type d -exec chmod 755 {} \;
find . -type f -perm 775 -exec chmod 755 {} \;
find . -type f -perm 664 -exec chmod 644 {} \;
find . -type d -name CVS -exec rm -r {} \;

OPT="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib64 \
  --docdir=/usr/doc/python-$VERSION \
  --mandir=/usr/man \
  --with-ncurses \
  --with-threads \
  --enable-ipv6 \
  --enable-shared \
  --build=$ARCH-slackware-linux

make -j4 || exit 1
make install DESTDIR=$PKG

# Install some python-demo files:
mkdir -p $PKG/usr/doc/python-$VERSION
cp -a Demo $PKG/usr/doc/python-$VERSION

# We'll install the python-tools under site-packages:
mkdir -p $SITEPK
( cd Tools ; cp -a * $SITEPK )
mkdir -p $PKG/usr/doc/python-$VERSION
mv $SITEPK/README $PKG/usr/doc/python-$VERSION/README.python-tools
( cd $PKG/usr/doc/python-$VERSION
  ln -sf $TOOLSDIR Tools
)
# Make a few useful symlinks:
mkdir -p $PKG/usr/bin
( cd $PKG/usr/bin
  ln -sf $TOOLSDIR/modulator/modulator.py modulator
  ln -sf $TOOLSDIR/pynche/pynche pynche
  ln -sf $TOOLSDIR/i18n/msgfmt.py .
  ln -sf $TOOLSDIR/i18n/pygettext.py .
)

# Install docs:
mkdir -p $PKG/usr/doc/python-$VERSION
cp -a README $PKG/usr/doc/python-$VERSION
cp -a Misc $PKG/usr/doc/python-$VERSION
( cd $PKG/usr/doc/python-$VERSION ; mkdir html )
( cd $PKG/usr/doc/python-$VERSION/html
  tar xjvf $CWD/html-$VERSION.tar.bz2
  chown -R root:root .
)
( cd $PKG/usr/bin
  rm -f python
  ln -sf python2.5 python
)
( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
gzip -9 $PKG/usr/man/man1/*.?
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
makepkg -l y -c n $TMP/python-$VERSION-$ARCH-$BUILD.tgz

But when I installpkg --warn my-new-python, I find that this package drops stuff to /usr/lib as well as to /usr/lib64...

Is this normal...?

Is this acceptable from the standpoint of system health...? I mean, my Slackware is pure 64, yet when it was freshly installed it already had a /usr/lib...

What do you think of this...?


I ask because I also plan to use scons and this builds with a given version of python, correctly installed...

BRGDS

Alex
 
Old 01-06-2010, 05:20 PM   #2
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
can you post for us the file list contained in the package?
 
1 members found this post helpful.
Old 01-06-2010, 06:01 PM   #3
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
The python.SlackBuild in current contains a patch
Code:
# Install to lib64 instead of lib:
  zcat $CWD/python.x86_64.diff.gz |  patch -p1 --verbose || exit 1
You probably should apply it
Maybe even the other patch is needed as well
Code:
  # Python must report /usr/lib64/python2.6/site-packages as python_lib_dir:
  zcat $CWD/python.pure64.diff.gz |  patch -p1 --verbose || exit 1

Last edited by sahko; 01-06-2010 at 06:09 PM.
 
1 members found this post helpful.
Old 01-06-2010, 06:16 PM   #4
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Daedra

here it is...

attachment

remove txt extention and gzip extract to filelist.txt

This was way too big and I had to "fool" the attachment manager with the txt extention...

As you can see, this will create the symlink in /usr/bin, drop stuff in /usr/lib64 as expected *AND* in /usr/lib....

BRGDS

Alex
Attached Files
File Type: txt filelist.txt.gz.txt (30.4 KB, 10 views)
 
Old 01-06-2010, 06:17 PM   #5
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Did you read my reply above? I edited the message in the meantime
 
1 members found this post helpful.
Old 01-07-2010, 11:17 AM   #6
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Sahko

Thanks, I have read it...

I will try applying the patch from 2.6.2 to 2.5.2, to see what I get...

Will post some news later...

Thkz

BRGDS


Alex
 
Old 01-07-2010, 11:24 AM   #7
Ivshti
Member
 
Registered: Sep 2008
Distribution: Linvo
Posts: 132

Rep: Reputation: 43
Yes, I guess you will need that patch. It may be incompatible since the differences between those versions are quite big.
 
Old 01-07-2010, 03:11 PM   #8
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Well ...

Guess that the patches are incompatible with Py 2.5.2....

I will build the package anyway, explodepkg, merge /usr/lib with /usr/lib64, and hack the doinst.sh about all ocurrences of /usr/lib, compress again and rename it to *.tgz...

Is this a wise move... ? Don't know any other way...

BRGDS


Alex
 
Old 01-07-2010, 03:45 PM   #9
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
So...

I have this directory,

root@iskandhar:/home/alex/explo#

and I have these two folders in it, install and usr, how do I make a package out of this...?

root@iskandhar:/home/alex/explo# ls -la
total 16
drwxr-xr-x 4 root root 4096 2010-01-07 21:40 .
drwx--x--x 39 alex users 4096 2010-01-07 21:40 ..
drwxr-xr-x 2 root root 4096 2010-01-07 21:07 install
drwxr-xr-x 7 root root 4096 2010-01-07 21:20 usr

will makepkg -l y -c n /home/alex/my_new_Python_2.5.2_full64.tgz be enough...?

BRGDS

Alex
 
Old 01-07-2010, 03:57 PM   #10
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Alexvader

I've uploaded the python 2.5.2 files I used in 2008 to build the original python for Slackware64.

Get them here: http://slackware.com/~alien/fixes/python/

Eric
 
1 members found this post helpful.
Old 01-07-2010, 04:08 PM   #11
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Thx a LOT AlienBob

BRGDS

Alex
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/bin/ld: skipping incompatible /usr/lib/libXpm.so when searching for -lXpm sqn Linux - Server 2 05-12-2009 03:53 AM
[SOLVED] No _sqlite3.so in /usr/lib/python2.5/lib-dynload rshepard Slackware 3 11-12-2007 02:59 PM
oops, I stripped /usr/lib and /usr/X11R6/lib ! H_TeXMeX_H Slackware 2 02-08-2007 09:27 PM
audacity unable to locate required lib files present in /usr/lib/ adityavpratap Slackware 4 11-30-2006 06:06 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration