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 02-26-2024, 06:08 PM   #1
viel
Member
 
Registered: Jul 2021
Location: Arcadia
Distribution: Slackware
Posts: 47

Rep: Reputation: Disabled
Some SBo scripts with PRINT_PACKAGE_NAME set fail.


Hi all,

I am checking all the SBo scripts with the var PRINT_PACKAGE_NAME set and there are some scripts that fail because of code between the variables and the if conditional check.

From vi /opt/slackware-repositories/slackbuilds/15.0/system/zookeeper/zookeeper.SlackBuild

Code:
--skipped--
 25 cd $(dirname $0) ; CWD=$(pwd)
 26
 27 PRGNAM=zookeeper
 28 VERSION=${VERSION:-3.4.10}
 29 BUILD=${BUILD:-1}
 30 TAG=${TAG:-_SBo}
 31 PKGTYPE=${PKGTYPE:-tgz}
 32
 33 ZOOKEEPER_USER=${ZOOKEEPER_USER:-zookeeper}
 34 ZOOKEEPER_UID=${ZOOKEEPER_UID:-322}
 35 ZOOKEEPER_GROUP=${ZOOKEEPER_GROUP:-zookeeper}
 36 ZOOKEEPER_GID=${ZOOKEEPER_GID:-322}
 37
 38 if [ -z "$ARCH" ]; then
 39   case "$( uname -m )" in
 40     i?86) ARCH=i586 ;;
 41     arm*) ARCH=arm ;;
 42        *) ARCH=$( uname -m ) ;;
 43   esac
 44 fi
 45
 46 bailout() {
 47   echo "  You must have a $ZOOKEEPER_USER user and $ZOOKEEPER_GROUP group to run this script. "
 48   echo "  Something like this should suffice for most systems: "
 49   echo "    # groupadd -g $ZOOKEEPER_GID $ZOOKEEPER_GROUP "
 50   echo "    # useradd -u $ZOOKEEPER_UID -g $ZOOKEEPER_GID -c \"Zookeeper user\" -d /var/lib/zookeeper -s /bin/sh $ZOOKEEPER_USER "
 51   echo "  Giving /bin/sh as $ZOOKEEPER_USER shell is important as the init script will try tu 'su -' to it."
 52   exit 1
 53 }
 54
 55 # Bail if user and/or group isn't valid on your system
 56 # uid=322 is suggested to avoid conflicts with other SBo packages,
 57 # but it's your call: http://slackbuilds.org/uid_gid.txt
 58 if ! grep -q "^$ZOOKEEPER_USER:" /etc/passwd; then
 59   bailout
 60 elif ! grep -q "^$ZOOKEEPER_GROUP:" /etc/group; then
 61   bailout
 62 fi
 63
 64 # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
 65 # the name of the created package would be, and then exit. This information
 66 # could be useful to other scripts.
 67 if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
 68   echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
 69   exit 0
 70 fi
 71

--skipped--

Code:
[root@arcadia tmp]# PRINT_PACKAGE_NAME=y bash /opt/slackware-repositories/slackbuilds/15.0/system/zookeeper/zookeeper.SlackBuild
  You must have a zookeeper user and zookeeper group to run this script.
  Something like this should suffice for most systems:
    # groupadd -g 322 zookeeper
    # useradd -u 322 -g 322 -c "Zookeeper user" -d /var/lib/zookeeper -s /bin/sh zookeeper
  Giving /bin/sh as zookeeper shell is important as the init script will try tu 'su -' to it.
[root@arcadia tmp]#


Realy i think don't need a telegraf group to check the package name.
Code:
[root@arcadia tmp]# PRINT_PACKAGE_NAME=y bash /opt/slackware-repositories/slackbuilds/15.0/system/telegraf/telegraf.SlackBuild
  You must have the "telegraf" group to run this script.
    # groupadd -g 349 telegraf
[root@arcadia tmp]#

That is all the entire list. Above.

Code:
[root@arcadia tmp]# time for i in $(find /opt/slackware-repositories/slackbuilds/15.0/ -type f -name *.SlackBuild ) ; do PRINT_PACKAGE_NAME=y bash  $i >/dev/null  2>/dev/null || echo $i  ; done
/opt/slackware-repositories/slackbuilds/15.0/academic/amplifx/amplifx.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/audio/rplay/rplay.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/business/stansoft/stansoft.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/development/sonarqube/sonarqube.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/games/smokinguns/smokinguns.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/multimedia/serviio/serviio.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/multimedia/sickchill/sickchill.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/network/coturn/coturn.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/network/ircd-hybrid/ircd-hybrid.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/network/kasp_updater/kasp_updater.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/network/nsd/nsd.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/network/rspamd/rspamd.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/network/yadifa/yadifa.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/chronograf/chronograf.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/colord/colord.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/fcron/fcron.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/influxdb/influxdb.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/kafka/kafka.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/kapacitor/kapacitor.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/netdata/netdata.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/ntopng/ntopng.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/nut/nut.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/prometheus/prometheus.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/rabbitmq-server/rabbitmq-server.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/telegraf/telegraf.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/zookeeper/zookeeper.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/greetd/greetd.SlackBuild
/opt/slackware-repositories/slackbuilds/15.0/system/kbfs/kbfs.SlackBuild

real 1m40.163s
user 1m6.396s
sys 0m36.474s
[root@arcadia tmp]#
Is there some reason I don't see to put a few lines of code between
Code:
 PRGNAM=foo
 VERSION=${VERSION:-1.1.1}
 BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}
 PKGTYPE=${PKGTYPE:-tgz}
and
Code:
 
  if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
    echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
    exit 0
  fi
?

If not. Is there a way to solve that all in one? or I need to contact all the maintainers folks?

Thanks.
 
Old 02-28-2024, 04:50 PM   #2
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 766

Rep: Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867
Quote:
Originally Posted by viel View Post
Hi all,

I am checking all the SBo scripts with the var PRINT_PACKAGE_NAME set and there are some scripts that fail because of code between the variables and the if conditional check.

[...]

Is there a way to solve that all in one? or I need to contact all the maintainers folks?

Thanks.
The problems you discovered are valid and the scripts are broken for the purpose of printing the package name when it bails before that line is reached. It seems an unnecessary requirement to have to add a user and group just to be able to print the package name and exit. This is easily fixed by enforcing that the "print package name" block of code is always immediately after ARCH is determined so its always the first exit from the slackbuild.

However, slackbuilds.org has a documented bug reporting method: https://slackbuilds.org/bugs/ It can be summarised as "check the mailing list" and/or "email the maintainers", if its not already being discussed on the mailing list. I skimmed the Feb archives and didn't seen anything about this issue being discussed.

I'd suggest re-posting this to the mailing list so that all the relevant maintainers can see the problem at once. The email is listed in "bugs" page linked above. If they have any additional questions you can follow up with them from there.

Some of the maintainers do browse these forums. However, I will point out this line in their FAQ:
Quote:
Originally Posted by slackbuilds.org/faq
Do you have a help forum or an IRC channel?

We do not have (nor do we intend to create) a user help forum. However, we do have a Mailing List with archives and an IRC channel on the Libera network at https://libera.chat/ - #slackbuilds - feel free to join and/or stop by!
I'd imagine it gets hard to coordinate the support of all maintainers at once when there are multiple avenues of communication. They're pretty intentional about not providing a support forum and using the mailing list, irc, or emailing maintainers directly to get scripts fixed/updated, so your best bet is to use those routes.

Hope that helps.
 
1 members found this post helpful.
Old 02-29-2024, 04:08 AM   #3
viel
Member
 
Registered: Jul 2021
Location: Arcadia
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: Disabled
Hi,

To update the thread.

Tnx 0XBF that helps now i know I am on the right way.

So i send this morning one mail to all the maintainers in Bcc.

Code:
[root@arcadia os-prober-1.79]# time for i in $(find /opt/slackware-repositories/slackbuilds/15.0/ -type f -name *.SlackBuild ) ; do PRINT_PACKAGE_NAME=y bash  $i >/dev/null  2>/dev/null || echo $i  ; done > /tmp/slackbuilds.mails

[root@arcadia os-prober-1.79]# cat /tmp/slackbuilds.mails | sed 's/.SlackBuild$/.info/' | sed 's/^/cat /' | bash | grep EMAIL | sed 's/^EMAIL=//' | tr -d '"'

Seems that 2 mails are not receptive.

Mail Delivery Subsystem <mailer-daemon@googlemail.com>
** No se ha encontrado la dirección ** Tu mensaje no se ha entregado a pessoal@profcavalheiro.com porque no se ha encontrado el dominio profcavalheiro.com. Comprueba que no haya erratas ni espacios innecesarios y vuelve a intentarlo. Encontrarás más información en el siguiente enlace: https://su…
10:42Mail Delivery Subsystem <mailer-daemon@googlemail.com>
** Address not found ** Your message wasn't delivered to darowland@ieee.org because the address couldn't be found, or is unable to receive mail. The response from the remote server was: 550 5.1.1 <darowland@ieee.org>... User unknown



Code:
[root@arcadia tmp]# cat /tmp/slackbuilds.mails | sed -n '6p' | sed 's/.SlackBuild$/.info/' | sed 's/^/cat /' | bash | grep EMAIL | sed 's/^EMAIL=//'
"pessoal@profcavalheiro.com"
[root@arcadia tmp]# cat /tmp/slackbuilds.mails | sed  -n '6p'
/opt/slackware-repositories/slackbuilds/15.0/multimedia/serviio/serviio.SlackBuild
Code:
[root@arcadia tmp]# cat /tmp/slackbuilds.mails | sed -n '2p' | sed 's/.SlackBuild$/.info/' | sed 's/^/cat /' | bash | grep EMAIL | sed 's/^EMAIL=//'
"darowland@ieee.org"
[root@arcadia tmp]# cat /tmp/slackbuilds.mails | sed  -n '2p'
/opt/slackware-repositories/slackbuilds/15.0/audio/rplay/rplay.SlackBuild
Hope my little work helps.

Edited: I will put this as solved, and in a week i will send a post to slacbuilds with all that not respond.

Thanks,

Last edited by viel; 02-29-2024 at 04:18 AM.
 
Old 02-29-2024, 04:28 AM   #4
jloco
Member
 
Registered: Apr 2016
Location: Detroit, MI
Distribution: Slackware
Posts: 180

Rep: Reputation: 148Reputation: 148
I submitted a PR for my script system/greetd, assuming something else hasn't broken the build, it should go live this week.

https://github.com/SlackBuildsOrg/slackbuilds/pull/5256
 
Old 02-29-2024, 04:32 AM   #5
viel
Member
 
Registered: Jul 2021
Location: Arcadia
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jloco View Post
I submitted a PR for my script system/greetd, assuming something else hasn't broken the build, it should go live this week.

https://github.com/SlackBuildsOrg/slackbuilds/pull/5256
Thanks,
 
  


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
nvidia-driver SBo The symbolic link '/usr/lib/libGL.so.1' does not point to 'tmp/SBo/package-nvidia-driver/usr/lib64/libGL.so.1' Gerardo Zamudio Slackware 5 07-30-2017 10:44 PM
[SOLVED] some 14.2 packages in SBo fail to build (autoconf) metageek Slackware 8 07-03-2016 08:14 PM
Questions for Robby, ponce, or anyone from SBo about SBo submission requirements. ReaperX7 Slackware 4 06-07-2015 11:30 AM
Nvidia-driver.SlackBuild from SBo (or: I am a bad and sloppy SBo maintainer) kingbeowulf Slackware 8 08-31-2012 02:41 AM

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

All times are GMT -5. The time now is 06:10 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
Open Source Consulting | Domain Registration