LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-26-2013, 04:21 AM   #1
hegira
Member
 
Registered: Aug 2013
Posts: 59

Rep: Reputation: 0
problem with deb2tgz in slackware64-14


Hi all. I just installed deb2tgz, and it seemed to install fine. I am trying to use it to install astrill-setup-linux64.deb by:

Quote:
# deb2tgz astrill-setup-linux64.deb
It makes a tgz file just fine: astrill-setup-linux64.tgz (can even see it in dolphin). But when I go to install that using pkgtool, and just following prompts, I get:

Quote:
WARNING: Package has not been created with 'makepkg'
Then I try:

Quote:
# makepkg astrill-setup-linux64.tgz
and I get:

Quote:
ERROR: Can't make output package in current directory.
I have been reading threads about using this and they seem to get it done just with using pkgtool. Any suggestions greatly appreciated.

Last edited by hegira; 08-26-2013 at 04:54 AM.
 
Old 08-26-2013, 05:22 AM   #2
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware 14.0 64-bit
Posts: 228

Rep: Reputation: 41
You can try this:

Code:
makepkg /tmp/astrill-setup-linux64.tgz
 
1 members found this post helpful.
Old 08-26-2013, 06:59 AM   #3
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
I presume you are downloading astrill-setup-linux64.deb? If so, wow, what a crappy package.

A quick inspection of the package contents leads me to believe you could probably do the following (as root) to make a "quick and dirty" but usable package:

Code:
# mkdir -p astrill-staging/install
# cd astrill-staging
# ar p ../astrill-setup-linux64.deb data.tar.gz | tar -xz --xform "s,usr/local,opt," --exclude usr/share/doc
# sed -i "s,/usr/local,/opt," usr/share/applications/Astrill.desktop 
# echo "if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications; fi" > install/doinst.sh
# echo "opt/Astrill/asproxy --init" >> install/doinst.sh
# makepkg -l y -c n ../astrill-2.9-amd64-1.tgz
I have not tested if Astrill will actually run and work correctly under Slackware but that should get you the package.

Last edited by ruario; 08-28-2013 at 08:00 AM. Reason: updated my example to add 'asproxy --init' which is needed to run Astrill as a regular user
 
1 members found this post helpful.
Old 08-26-2013, 07:00 AM   #4
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
I'm assuming that astrill-setup-linux64.deb is in the directory where you start executing the above commands.
 
Old 08-26-2013, 07:50 AM   #5
hegira
Member
 
Registered: Aug 2013
Posts: 59

Original Poster
Rep: Reputation: 0
when I double click the tgz which I make with deb2pkg, and executable falls out and it actually runs, so I know its not an issue about 32 vs 64 bit. I will try out ruario's suggestion. Let you know -- thx
 
Old 08-27-2013, 12:54 AM   #6
hegira
Member
 
Registered: Aug 2013
Posts: 59

Original Poster
Rep: Reputation: 0
I finally got astrill installed in root, and it works and everything is fine in root, but when I change to user, astrill is not even there? When I try to install it in user, the exact same way I did in root, it wont work -- neither the desktop or the executable? I would prefer not to have installed it again in the user, but I did that jsu tto see what woul happen. I would really like to just install things as root, and have them all be visible from the user account. Is this possible?
 
Old 08-27-2013, 05:12 AM   #7
hegira
Member
 
Registered: Aug 2013
Posts: 59

Original Poster
Rep: Reputation: 0
Jostber. I just undid my preious install and tried your suggestion. It actually worked. During the install it asked me if I wanted 755 permissions for the directory and I said yes, and it finished installing. But I still cannot run it in user account, it only will run in root.

Last edited by hegira; 08-27-2013 at 08:24 AM.
 
Old 08-28-2013, 07:58 AM   #8
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
Edit: Don't run 'asproxy --init' as it is retarded. I just ran an strace on it and have seen what it does. I'll be back with a better solution in a few moments

Last edited by ruario; 08-28-2013 at 03:01 PM.
 
1 members found this post helpful.
Old 08-28-2013, 03:12 PM   #9
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
Ok, I looked at the post install of the deb package and it runs '/usr/local/Astrill/asproxy --init'. Checking what this does via strace I see that it does three things:

1. It sets up various symlinks to liblsp.so and liblsp64.so in locations where Debian/Ubuntu would expect to find libs (which does not make sense on Slackware).
2. It sets the 'asproxy' setuid root
3. It adds a broken (on Slackware at least) path to /etc/ld.so.preload

Rather than do all that remove the Astrill package you have installed and create a new one with this SlackBuild I just knocked up:

Code:
#!/bin/sh

# Slackware build script for Astrill

# Note: After install create or edit /etc/ld.so.preload and add one of
# the following lines, without the leading '# ' (liblsp.so for 32-Bit 
# systems, liblsp64.so for 64-Bit systems):
#
# /usr/lib/liblsp.so
# /usr/lib64/liblsp64.so


PRGNAM=astrill
BUILD=${BUILD:-1}
TAG=${TAG:-ro}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

if [ "$ARCH" = "i486" ]; then
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  LIBDIRSUFFIX="64"
else
  echo "$ARCH is not supported!" >&2
  exit 1
fi

CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

set -e 

rm -rf $PKG
mkdir -p $TMP $PKG/pkg/{install,opt/Astrill,usr/share/applications} $OUTPUT
cd $PKG

if [ -r "$CWD/$PRGNAM-setup-linux$LIBDIRSUFFIX.sh" ]; then
  ln -s $CWD/$PRGNAM-setup-linux$LIBDIRSUFFIX.sh $PRGNAM-setup-linux$LIBDIRSUFFIX.sh
else
  wget https://www.astrill.com/downloads/$PRGNAM-setup-linux$LIBDIRSUFFIX.sh
fi
cd pkg
sed "1,/^__ARCHIVE_BELOW__$/d" ../$PRGNAM-setup-linux$LIBDIRSUFFIX.sh | tar -xjf- -C opt/Astrill

chown -R root:root .
chmod -R 755 .
chmod 4755 opt/Astrill/asproxy
chmod 644 opt/Astrill/{*.desktop,*.ico,*.so,*.txt,prodver}

VERSION=${VERSION:-$(cat opt/Astrill/prodver)}

if [ "$LIBDIRSUFFIX" == "64" ]; then
  mkdir usr/lib64
  ( cd usr/lib64; ln -s ../../opt/Astrill/liblsp64.so liblsp64.so )
fi

mkdir usr/lib
( cd usr/lib; ln -s ../../opt/Astrill/liblsp.so liblsp.so )

mkdir usr/bin
( cd usr/bin; ln -s ../../opt/Astrill/astrill astrill )

sed -i "s,/usr/local,/opt," opt/Astrill/Astrill.desktop 
( cd usr/share/applications; ln -s ../../../opt/Astrill/Astrill.desktop Astrill.desktop )

mkdir -p usr/doc/$PRGNAM-$VERSION
for f in LICENSE.txt README.txt; do
  ( cd usr/doc/$PRGNAM-$VERSION; ln -s ../../../opt/Astrill/$f $f )
done
cat $CWD/$PRGNAM.SlackBuild > usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

cat <<EOF > install/doinst.sh
if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications
fi
EOF

cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (VPN client software)
$PRGNAM:
$PRGNAM: Astrill changes your IP address and encrypts your Internet connection
$PRGNAM: to protect your privacy and identity on the internet and keeps you safe
$PRGNAM: from hackers and eavesdropping.
$PRGNAM:
$PRGNAM: Before using Astrill software, you need to accept Astrill Terms of
$PRGNAM: Service which are published here https://www.astrill.com/tos.php
$PRGNAM:
$PRGNAM:
$PRGNAM: https://www.astrill.com
EOF

/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
Note: you will still need to manually edit /etc/ld.so.preload and add /usr/lib64/liblsp64.so after install. I did not want to attempt to do this in packaging as it is messy. I presume this preload is needed by Astrill so that it can intercept all network connections to ensure they go through the Astrill VPN.

P.S. I have not used Astrill, since I do not have an account. I just thought I would try and help you out with this one. Just a tip for the future, always read the post install scripts of deb or rpm packages you convert to see what they do. If you can it is always better to make a SlackBuild rather than do automatic conversion.

Last edited by ruario; 08-29-2013 at 09:08 AM. Reason: added postscript, corrected tag, simplified script
 
1 members found this post helpful.
Old 08-28-2013, 03:38 PM   #10
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
I just noticed that the above SlackBuild will create a package with a version number of 2.7.0.0, while the astrill.com states that 2.9 is the latest version. I wouldn't worry about this. I read the version from the 'prodver' file within the package, which it would seem that Astrill are simply not updating (I did an md5sum on the main binary in the .sh package and checked it is the same as that in the .deb package [and it is]).

If the incorrect version number really bothers you, run the SlackBuild as:

Code:
VERSION=2.9 ./astrill.SlackBuild
 
1 members found this post helpful.
Old 08-29-2013, 11:29 PM   #11
hegira
Member
 
Registered: Aug 2013
Posts: 59

Original Poster
Rep: Reputation: 0
Just getting back from moving, now I can try this out. Ruario, thx-a-million for that. Now you are really going to think I am a pain -- I cannot figure out what to do with this script. I am reading about slackbuild an it seems I should first make a directory /home/user/build and then go to that directory and that is where I can save the script you gave me as .SlackBuild file? Then put the astrill .tgz file there and run your script? To comment on your p.s., I do have my reasons for sticking with astrill for now, though later I may be able to switch. Once I install linux on any system, installing a vpn is always the immediate next step since in china I can reach few repositories or mirrors without vpn. So I cannot download anything or test slackbuild on anything else until I do have that vpn. Anyway. It seems not too difficult to do this slackbuild thing. Could someone maybe point me to a good source for learning exactly what to do for a slackbuild? Also, how do I need to edit that /etc.ld.so file? And do yo ujust mean I need to add the file liblsp64.so to the directory /usr/lib64?

Last edited by hegira; 08-29-2013 at 11:35 PM.
 
Old 08-30-2013, 12:10 AM   #12
hegira
Member
 
Registered: Aug 2013
Posts: 59

Original Poster
Rep: Reputation: 0
OK. So I unistalled astrill, then put a copy of liblsp64.so in /usr/lib64 and I saved the script that ruario gave me in the directory /home/samarkand/build along with the .tgz. Then I ran the slackbuild script:
Quote:
./astrill.SlackBuild
and it seemed to install fine. Still runs in root and still does not run in user. I should also mention that, after installing this way, I can't find any exe file. I can only find the icon in the applications menu in (gui). When I look in the /tmp directory where the package was installed, I can find the folder package-astrill containing some more folders but no exe files.

Last edited by hegira; 08-30-2013 at 12:36 AM.
 
Old 08-30-2013, 12:34 AM   #13
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
SlackBuilds are scripts for creating packages. They are not packages themselves. Firstly grab the file www.astrill.com/downloads/astrill-setup-linux64.sh. Since it is crucial that you have this package downloaded correctly you might want to double check its md5sum. Run the command 'md5sum astrill-setup-linux64.sh' and it should print back '509e0d5b082b93a69844c43fd357dc4a astrill-setup-linux64.sh'. If you have this file successfully downloaded, put in in the same directory as 'astrill.SlackBuild' on your Slackware machine (this must be done on an Slackware install, not some other Linux install you have). Now open a terminal and switch to the directory that has these two files saves and run ./astrill.SlackBuild as root. When it is done you it should say:

Code:
Slackware package /tmp/astrill-2.7.0.0-x86_64-1ro.tgz created.
Then, still as root install this package:

Code:
upgradepkg --install-new --reinstall /tmp/astrill-2.7.0.0-x86_64-1ro.tgz
(Note: I am using upgradepkg command to ensure to make sure I upgrade any Astrill package you may have forgotten to remove previously)

It should print the following on screen:

Code:
Verifying package astrill-2.7.0.0-x86_64-1ro.tgz.
Installing package astrill-2.7.0.0-x86_64-1ro.tgz:
PACKAGE DESCRIPTION:
# astrill (VPN client software)
#
# Astrill changes your IP address and encrypts your Internet connection
# to protect your privacy and identity on the internet and keeps you safe
# from hackers and eavesdropping.
#
# Before using Astrill software, you need to accept Astrill Terms of
# Service which are published here https://www.astrill.com/tos.php
#
# https://www.astrill.com
Executing install script for astrill-2.7.0.0-x86_64-1ro.tgz.
Package astrill-2.7.0.0-x86_64-1ro.tgz installed.
Once this is done, you need to create the file /etc/ld.so.preload and add the line /usr/lib64/liblsp64.so. You can do this (again as root), like so:

Code:
echo "/usr/lib64/liblsp64.so" >> /etc/ld.so.preload
Do NOT run that command more than once (you need to get it right the first time). If you did this correctly, when you run the command "cat /etc/ld.so.preload" it should echo back:

Code:
/usr/lib64/liblsp64.so
If it says anything else (or the line is duplicated) tell us here.

With this all done you should then be able to run Astrill as a regular user. Good Luck!
 
Old 08-30-2013, 01:05 AM   #14
hegira
Member
 
Registered: Aug 2013
Posts: 59

Original Poster
Rep: Reputation: 0
Hi ruario. I am almost done. I have done everything except create the file /etc/ld.so.preload and adding that line -- everything went as you said it should. I get the impression I should be careful here. I want to be more clear. Can I just save a blank text document there with that name and then add the line with the echo statement? How to create the file?

Last edited by hegira; 08-30-2013 at 01:06 AM.
 
Old 08-30-2013, 01:30 AM   #15
hegira
Member
 
Registered: Aug 2013
Posts: 59

Original Poster
Rep: Reputation: 0
Oh. OK. It seems I can just run that echo command and it does the creating as well...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Problem installing Slackware64 14.0 ferrel Slackware 52 11-07-2012 01:23 AM
problem with slackware64 tinnnysu Slackware 7 10-14-2012 07:17 PM
[SOLVED] googleearth problem in Slackware64-current afreitascs Slackware 6 05-12-2011 09:57 AM
convert deb2tgz... is it possible...? Alexvader Slackware 18 01-17-2010 03:58 PM
[SOLVED] Slackware64-C client wont detect Slackware64-C Samba server slackass Slackware 5 08-08-2009 12:23 AM


All times are GMT -5. The time now is 08:11 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration