SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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 07:00 AM.
Reason: updated my example to add 'asproxy --init' which is needed to run Astrill as a regular user
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
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?
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.
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
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 08:08 AM.
Reason: added postscript, corrected tag, simplified script
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:
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?
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.
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:
(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:
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!
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.