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.
That is asking for flask-bablex. I'm not sure if you'd require flask-bable itself (I don't think so, because flask-bablex states it is API compatible with flask-bable).
It looks like that might require flask-sphinx-themes to be in docs/_themes/ before attempting to compile. If you're just cloning the git, you can do this automatically once in the main source folder by running:
Code:
git submodule init
git submodule update
I don't found two packages flask-paranoid and Flask-Migrate for Slackware. I installed them manually:
For building I use this package postgresql-11.2-x86_64-1_SBo.tgz
Anybody able to build pgAdmin 4 in Slackware-current or probable can provide pgAdmin 4 package for Slackware-current?
Thanks.
Last edited by TurboBlaze; 03-08-2019 at 02:00 PM.
Reason: Update link on pgadmin4.tar.gz
It looks like they switched from autotools (which uses ./configure) to qmake and will likely require a decent amount of modification to the SlackBuild. Just downloading the source and running make told me that I'm missing Flask, which has several dependencies of its own.
If no one else tackles this, I may try and provide an updated SlackBuild and dependency list tomorrow... depending on if I have time and whether or not I remember.
I did build a pgadmin4 version 2.1 Package last year but I reverted to pgadmin3 and I don't recall why ...
According to my log files and the content of my ~/pgadmin4-kjh/pkg/ directory, I was able to build pgadmin4 version 2.1 with the pgadmin4.SlackBuild and the .do-pgadmin4.SlackBuild.sh wrapper script below
It took 5 tries based on the logs: ( note the *~".log files )
Code:
# pwd
/home/dld/slackbuilds/SBo/pgadmin3/pgadmin4-kjh
# ls -la
total 1620
drwxr-xr-x 2 root root 4096 Feb 23 06:00 .
drwxr-xr-x 10 root root 4096 Jan 29 2018 ..
-rwxr-xr-x 1 root root 800 Jan 29 2018 .do-pgadmin4.SlackBuild.sh
-rw-r--r-- 1 root root 1068 Jul 6 2016 README
-rw-r--r-- 1 root root 130 Jul 6 2016 doinst.sh
lrwxrwxrwx 1 root root 35 Jan 29 2018 pgadmin4-2.1.tar.gz -> ../pgadmin4-dld/pgadmin4-2.1.tar.gz
-rwxr-xr-x 1 root root 2472 Jan 29 2018 pgadmin4.SlackBuild
-rw-r--r-- 1 root root 325972 Jan 29 2018 pgadmin4.SlackBuild-2.1.log
-rw-r--r-- 1 root root 388 Jan 29 2018 pgadmin4.info
-rw-r--r-- 1 root root 313003 Jan 29 2018 pgadmin4~01.SlackBuild-2.1.log
-rw-r--r-- 1 root root 325953 Jan 29 2018 pgadmin4~02.SlackBuild-2.1.log
-rw-r--r-- 1 root root 325972 Jan 29 2018 pgadmin4~03.SlackBuild-2.1.log
-rw-r--r-- 1 root root 326012 Jan 29 2018 pgadmin4~04.SlackBuild-2.1.log
-rw-r--r-- 1 root root 908 Jan 29 2018 slack-desc
Anyhow ...
Maybe these will help ?
-- kjh
This is the pgadmin4.SlackBuild I ended up with:
Code:
#!/bin/sh
# Slackware build script for pgAdmin
# Written by Iskar Enev (<iskar.enev[@]gmail.com>)
# Modified by slakmagik <slakmagik@gmail.com>
# Modified by Mario Preksavec <mario@slackware.hr>
PRGNAM=pgadmin4
VERSION=${VERSION:-2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
QMAKE="${QMAKE:-/usr/lib${LIBDIRSUFFIX}/qt/bin/qmake}"
QMAKE_ARGS=''
[ ! -z "QMAKE_DEBUG" ] && QMAKE_ARGS="CONFIG+=debug"
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cd $TMP/$PRGNAM-$VERSION/runtime
$QMAKE $QMAKE_ARGS
make
cd $TMP/$PRGNAM-$VERSION/web
exit 0
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# add the range of pgAdmin3 images - only one can be used in the desktop file
# but the default might not be the one people would want
mkdir -p $PKG/usr/share/pixmaps
cp -a pgadmin/include/images/pgAdmin3* $PKG/usr/share/pixmaps
mkdir -p $PKG/usr/share/applications
sed '/^Icon=/s/pgadmin3/pixmaps/' \
pkg/pgadmin3.desktop > $PKG/usr/share/applications/pgadmin3.desktop
# as with so many packages, --docdir is present but ignored
mkdir -p $PKG/usr/doc
ln -s ../share/pgadmin3/docs $PKG/usr/doc/$PRGNAM-$VERSION
cp -a BUGS CHANGELOG DEVELOPERS INSTALL LICENSE README TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
This is the pgadmin4.info file ( the md5sum matches and I vaguely recall editing the REQUIRES= list )
+ qmake-qt5 PREFIX=/usr LIBPREFIX=/usr/lib64 'QMAKE_CFLAGS=-O2 -fPIC' 'QMAKE_CXXFLAGS=-O2 -fPIC' QT5LIBDIR=/usr/lib64/qt5 L_ETCDIR=/etc
Usage: qmake-qt5 [mode] [options] [files]
QMake has two modes, one mode for generating project files based on
some heuristics, and the other for generating makefiles. Normally you
shouldn't need to specify a mode, as makefile generation is the default
mode for qmake, but you may use this to test qmake on an existing project
Mode:
-project Put qmake into project file generation mode
In this mode qmake interprets files as files to
be built,
defaults to *; *; *; *.ts; *.xlf; *.qrc
Note: The created .pro file probably will
need to be edited. For example add the QT variable to
specify what modules are required.
-makefile Put qmake into makefile generation mode (default)
In this mode qmake interprets files as project files to
be processed, if skipped qmake will try to find a project
file in your current working directory
Warnings Options:
-Wnone Turn off all warnings; specific ones may be re-enabled by
later -W options
-Wall Turn on all warnings
-Wparser Turn on parser warnings
-Wlogic Turn on logic warnings (on by default)
-Wdeprecated Turn on deprecation warnings (on by default)
etc....
root@darkstar:/tmp/pgadmin4#
It seems you need to add "-project" to your qmake-qt5 command for it to get beyond there. Once I did that, it proceeded and I was able to run make, but I ran into a configuration issue afterwards, which is likely (hopefully) just related to me not having all required dependencies (I'm also running this on 14.2).
However, looking at AUR's PKGBUILD, they just run make docs in the main source tree, then cd into runtime/ and then run their qmake command and then make after that. I'm not sure the best way to build this program.
bassmadrigal, thanks for the point "-project". Added to pgadmin4.tar.gz
I think that is't possible to build pgadmin4 for Slackware
Now I stuck on:
Code:
...
pgadmin4-4.2/web/setup.py
pgadmin4-4.2/web/webpack.config.js
pgadmin4-4.2/web/webpack.shim.js
pgadmin4-4.2/web/webpack.test.config.js
pgadmin4-4.2/web/yarn.lock
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
make[1]: Entering directory '/tmp/SBo/pgadmin4-4.2/docs/en_US'
Generating code-snippet.rst for some of the important classes...
Traceback (most recent call last):
File "build_code_snippet.py", line 22, in <module>
from pgadmin.utils import PgAdminModule
File "/tmp/SBo/pgadmin4-4.2/web/pgadmin/__init__.py", line 20, in <module>
from flask_babelex import Babel, gettext
ImportError: No module named flask_babelex
make[1]: [Makefile.sphinx:22: code_snippet] Error 1 (ignored)
sphinx-build -W -b html -d _build/doctrees . _build/html
make[1]: sphinx-build: Command not found
make[1]: *** [Makefile.sphinx:47: html] Error 127
make[1]: Leaving directory '/tmp/SBo/pgadmin4-4.2/docs/en_US'
make: *** [Makefile:90: docs] Error 2
root@darkstar:/tmp/pgadmin4# python
Python 2.7.15 (default, Jun 17 2018, 22:57:51)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import flask_babelex
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named flask_babelex
root@darkstar:/tmp/pgadmin4#
That is asking for flask-bablex. I'm not sure if you'd require flask-bable itself (I don't think so, because flask-bablex states it is API compatible with flask-bable).
It looks like that might require flask-sphinx-themes to be in docs/_themes/ before attempting to compile. If you're just cloning the git, you can do this automatically once in the main source folder by running:
You missed part of my message. The error message from your previous attempt at running your SlackBuild (and the one in the last attempt) was because you were missing flask-bablex. You would need to install that before you rerun your SlackBuild. The flask-sphinx-themes src is required to be in the source of flask-bablex if you want to compile it. However, you might be able to install it with pip, but I don't use that at all (I want everything installed on my system as Slackware packages, so if I needed this, I would create a SlackBuild for it).
Ok, your advice is work.
I fixed Flask-Babel-0.11.1-x86_64-1_SBo.tgz with your suggestion.
Thanks.
I updated link on pgadmin4-build-deps.tar.gz - look at this post.
I don't found two packages flask-paranoid and Flask-Migrate for Slackware
I installed them manually:
#!/bin/sh
# Slackware build script for pgAdmin
# Written by Iskar Enev (<iskar.enev[@]gmail.com>)
# Modified by slakmagik <slakmagik@gmail.com>
# Modified by Mario Preksavec <mario@slackware.hr>
PRGNAM=pgadmin4
VERSION=${VERSION:-4.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -eu
rm -rf $PKG
mkdir -pv $TMP $PKG $OUTPUT
cd $TMP
# rm -rf $PRGNAM-$VERSION
rm -rf $PRGNAM
git clone https://github.com/postgres/pgadmin4.git
cd $PRGNAM
# tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
# cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
qmake-qt5 \
-project \
PREFIX=/usr \
LIBPREFIX=/usr/lib${LIBDIRSUFFIX} \
QMAKE_CFLAGS="$SLKCFLAGS" \
QMAKE_CXXFLAGS="$SLKCFLAGS" \
QT5LIBDIR=/usr/lib${LIBDIRSUFFIX}/qt5 \
L_ETCDIR=/etc \
#sed -i 18,21d /tmp/SBo/pgadmin4-4.3/pkg/pip/build.sh
make
make install INSTALL_ROOT=$PKG DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# add the range of pgAdmin4 images - only one can be used in the desktop file
# but the default might not be the one people would want
# mkdir -p $PKG/usr/share/pixmaps
# cp -a pgadmin/include/images/pgAdmin4* $PKG/usr/share/pixmaps
# mkdir -p $PKG/usr/share/applications
# sed '/^Icon=/s/pgadmin4/pixmaps/' \
# pkg/pgadmin4.desktop > $PKG/usr/share/applications/pgadmin4.desktop
# as with so many packages, --docdir is present but ignored
# mkdir -p $PKG/usr/doc
# ln -s ../share/pgadmin4/docs $PKG/usr/doc/$PRGNAM-$VERSION
# cp -a BUGS CHANGELOG DEVELOPERS INSTALL LICENSE README TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}
and what i got:
Code:
pgadmin4-4.3-docs/_sources/browser.rst.txt
pgadmin4-4.3-docs/_sources/backup_server_dialog.rst.txt
pgadmin4-4.3-docs/_sources/backup_globals_dialog.rst.txt
pgadmin4-4.3-docs/_sources/backup_dialog.rst.txt
pgadmin4-4.3-docs/_sources/backup_and_restore.rst.txt
pgadmin4-4.3-docs/_sources/add_restore_point_dialog.rst.txt
pgadmin4-4.3-docs/add_restore_point_dialog.html
Created tarball dist/pgadmin4-4.3.tar.gz and dist/pgadmin4-4.3-docs.tar.gz
make: *** No rule to make target 'install'. Stop.
root@darkstar:/tmp/pgadmin4#
in /tmp/SBo/pgadmin4/dist/pgadmin4-4.3.tar.gz (active link) and /tmp/SBo/pgadmin4/dist/pgadmin4-4.3-docs.tar.gz (active link)
Screenshot: https://i.imgur.com/UMQET1p.png
Script stuck on 'make install INSTALL_ROOT=$PKG DESTDIR=$PKG', but it does not have a rules to continue.
Anybody knows what I must to do with these two tarballs?
BTW, why I use git of pgadmin 4 and not a source?
If look at source/pkg/pip/build.sh is contain this instruction:
Code:
if [ ! -d .git -a ! -f .git/config ]; then
echo This script must be run from a git checkout of the source tree.
exit 1
fi
this instruction does not allow to continue compiling the source code of pgadmin 4.
Now I am more inclined to the fact that it is impossible to build pgadmin 4 package for Slackware
Last edited by TurboBlaze; 03-06-2019 at 12:44 PM.
My (limited -- meaning possibly wrong) understanding is that qmake is used to specify your options, kinda like the autotools ./configure. Once the configuring is done, you run make to actually compile the software.
Quote:
Originally Posted by TurboBlaze
Script stuck on 'make install INSTALL_ROOT=$PKG DESTDIR=$PKG', but it does not have a rules to continue.
Anybody knows what I must to do with these two tarballs?
The Makefile doesn't have an install target, so it doesn't know what to do when you run that. This means you'd need to manually move the files into the locations you want them to be. Luckily, somebody with Arch has already done the legwork with that, so we can use their PKGBUILD as a guide on what we should move.
NOTE: config_distro.py, config_local.py, and pgadmin4.desktop are files that Arch provides, not something included with pgadmin4 source. You'll need to make the determination on whether these files are needed. You may also need to tweak the /usr/lib/ locations to match whether this is a 32bit or 64bit package.
BTW, why I use git of pgadmin 4 and not a source?
If look at source/pkg/pip/build.sh is contain this instruction:
Code:
if [ ! -d .git -a ! -f .git/config ]; then
echo This script must be run from a git checkout of the source tree.
exit 1
fi
this instruction does not allow to continue compiling the source code of pgadmin 4.
If you want to compile using a tarball instead of git, you could either remove that section of code (or even just remove the exit 1, since it will continue to run if that's removed), or you could just create the .git/ directory and the .git/config file and compilation will work fine.
Quote:
Originally Posted by TurboBlaze
Now I am more inclined to the fact that it is impossible to build pgadmin 4 package for Slackware
Definitely some hurdles, but certainly not impossible. You've been doing great so far!
The Makefile doesn't have an install target, so it doesn't know what to do when you run that. This means you'd need to manually move the files into the locations you want them to be.
If you want to compile using a tarball instead of git, you could either remove that section of code (or even just remove the exit 1, since it will continue to run if that's removed)...
I tried it via
Code:
sed -i 18,21d /tmp/SBo/pgadmin4-4.3/pkg/pip/build.sh
but it give another type of error.
Quote:
Originally Posted by bassmadrigal
Definitely some hurdles, but certainly not impossible. You've been doing great so far!
That right there is what should be in your package, folder structure and all. Where did you get that? Was that after compiling or from the package on nemesis or something else? If this was after compiling, you can create a package from those files and folders. If it is from another package, then the code I provided (with possibly a bit of tweaking) would create the same folder structure and would allow you to create a package. Most of the files there are in the docs/ and web/ folders, which were simply copied over. You should be able to replace the make install with the following code block and have the same result:
sed -i 18,21d /tmp/SBo/pgadmin4-4.3/pkg/pip/build.sh
but it give another type of error.
Without knowing the error, it's hard to guess what's wrong. But you could also try creating the .git/ directory and creating a config file within that directory.
Quote:
Originally Posted by TurboBlaze
Dear guru, any chance to build pgadmin4 package in Slackware-current or not?
It seems like you've already built it. We just need to package it to create the SlackBuild. Hopefully the code above should do that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.