-   Slackware (
-   -   problem with deb2tgz in slackware64-14 (

hegira 08-26-2013 03:21 AM

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:


# 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:


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


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


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.

jostber 08-26-2013 04:22 AM

You can try this:


makepkg /tmp/astrill-setup-linux64.tgz

ruario 08-26-2013 05:59 AM

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:


# 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/
# echo "opt/Astrill/asproxy --init" >> install/
# 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.

ruario 08-26-2013 06:00 AM

I'm assuming that astrill-setup-linux64.deb is in the directory where you start executing the above commands.

hegira 08-26-2013 06:50 AM

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

hegira 08-26-2013 11:54 PM

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?

hegira 08-27-2013 04:12 AM

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.

ruario 08-28-2013 06:58 AM

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

ruario 08-28-2013 02:12 PM

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 and 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/

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



# Slackware build script for Astrill

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


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

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


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$" ]; then
  ln -s $CWD/$PRGNAM-setup-linux$ $PRGNAM-setup-linux$
cd pkg
sed "1,/^__ARCHIVE_BELOW__$/d" ../$PRGNAM-setup-linux$ | 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/ )

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

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 )
cat $CWD/$PRGNAM.SlackBuild > usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

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

cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (VPN client software)
$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: Before using Astrill software, you need to accept Astrill Terms of
$PRGNAM: Service which are published here

/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

Note: you will still need to manually edit /etc/ and add /usr/lib64/ 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.

ruario 08-28-2013 02:38 PM

I just noticed that the above SlackBuild will create a package with a version number of, while the 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:


VERSION=2.9 ./astrill.SlackBuild

hegira 08-29-2013 10:29 PM

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 / file? And do yo ujust mean I need to add the file to the directory /usr/lib64?

hegira 08-29-2013 11:10 PM

OK. So I unistalled astrill, then put a copy of 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:

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.

ruario 08-29-2013 11:34 PM

SlackBuilds are scripts for creating packages. They are not packages themselves. Firstly grab the file Since it is crucial that you have this package downloaded correctly you might want to double check its md5sum. Run the command 'md5sum' and it should print back '509e0d5b082b93a69844c43fd357dc4a'. 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:


Slackware package /tmp/astrill- created.
Then, still as root install this package:


upgradepkg --install-new --reinstall /tmp/astrill-
(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:


Verifying package astrill-
Installing package astrill-
# 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
Executing install script for astrill-
Package astrill- installed.

Once this is done, you need to create the file /etc/ and add the line /usr/lib64/ You can do this (again as root), like so:


echo "/usr/lib64/" >> /etc/
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/" it should echo back:


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!

hegira 08-30-2013 12:05 AM

Hi ruario. I am almost done. I have done everything except create the file /etc/ 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?

hegira 08-30-2013 12:30 AM

Oh. OK. It seems I can just run that echo command and it does the creating as well...

All times are GMT -5. The time now is 02:55 AM.