LinuxQuestions.org
Visit Jeremy's Blog.
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 11-04-2019, 10:21 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,404
Blog Entries: 1

Rep: Reputation: Disabled
Lightbulb Please provide free language description of what is SBo script


Hi, just as in title. I mean not what purpose serve but how it looks. Components, can we divide script into. It is just what comes to your mind. We do not talk here about bash scripting. Say like cow descripiton: is animal, has four legs, tail, two horns, give milk, beef. Goal is to create scheme like json scheme or xml scheme for proper text human-readable description of a script and then translator (parser) which would produce correct bash script. So starting point is free language description and go into details to finally obtain something which can be directly encoded as scheme.
 
Old 11-04-2019, 10:28 AM   #2
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,546
Blog Entries: 9

Rep: Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969
As Slackbuilds.org provides a template for slackbuild scripts, why not have a look at that and see what it contains?
 
Old 11-04-2019, 10:41 AM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,404

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Nope, it is not a solution I am looking for. Human-readable means that everyone even person with zero knowledge of bash would build its own packages - just provide correct description according to scheme - parse this to bash script with parser. At the end run the script.
 
Old 11-04-2019, 11:15 AM   #4
Qury
Member
 
Registered: Feb 2004
Location: Dublin
Distribution: Slackware
Posts: 181

Rep: Reputation: 163Reputation: 163
So, is this something where you would add in the description, the url and your program would magically create a package for you?

If so,would you also ask he user to pick between build systems? cmake vs autoconf vs any other?
 
Old 11-04-2019, 11:16 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,187

Rep: Reputation: 4181Reputation: 4181Reputation: 4181Reputation: 4181Reputation: 4181Reputation: 4181Reputation: 4181Reputation: 4181Reputation: 4181Reputation: 4181Reputation: 4181
Quote:
Originally Posted by igadoter View Post
Human-readable means that everyone even person with zero knowledge of bash would build its own packages
That is nonsense.
Using slackware requires a lot of knowledge, without [knowing] bash it is simply impossible.

Constructing another format to [be able to] generate bash scripts is just meaningless, most probably you either need to embed real bash code lines or you will be restricted to use only a small part of the language.
If there was another form/syntax you could directly execute that, without converting to bash. But I'm afraid there is no such thing.
 
Old 11-04-2019, 11:31 AM   #6
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,546
Blog Entries: 9

Rep: Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969
So how do programs like flex do it? I understand that they can produce real C code. Well, if C, why not bash?
 
Old 11-04-2019, 12:17 PM   #7
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,404

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
All your remarks are interesting but at least we can try to talk about. Starting point is to provide free-language description what sbo script is. Let ask me what is this?
Quote:
CWD=$(pwd)
if [ "$TMP" = "" ]; then
TMP=/tmp
fi
Essentially there is no need to provide description for the first line - it is once for all time fixed. For if construction the simplest possibility is just omit description of temporary directory if I don't care. If I care then say I would print something like that "temporary directory": foobar, now it is up to parser engine to set value of TMP variable to foobar. And so on, so on. So parsing here rather means provide script plus required by script environment.
 
Old 11-04-2019, 12:19 PM   #8
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,044

Rep: Reputation: Disabled
https://www.tldp.org/LDP/abs/html/
 
Old 11-04-2019, 12:22 PM   #9
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,404

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
Constructing another format to [be able to] generate bash scripts is just meaningless, most probably you either need to embed real bash code lines or you will be restricted to use only a small part of the language.
You are missing the point. Not every bash script but only sbo scripts - they have simple structure as scripts. Describe script in you own words - what they are - this what I am asking for.
 
Old 11-04-2019, 12:24 PM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,504

Rep: Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833Reputation: 1833
https://distro.ibiblio.org/amigolinu...ces/doc/README
 
Old 11-04-2019, 12:28 PM   #11
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,404

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by Skaendo View Post
I think you are posting in wrong thread. Maybe in some other place were people are interesting in learning bash scripting.
 
Old 11-04-2019, 12:29 PM   #12
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,404

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
I can only repeat the same: you are posting in wrong thread.
 
Old 11-04-2019, 12:40 PM   #13
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 14.2
Posts: 513

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
You should go through the templates. Anyway, I'm sure there's plenty of variation (e.g., different build systems, and not all are compiling from source). But in general you're 1) setting some variables (program name, version, work directory, etc); 2) determining architecture; 3) extracting the source files and setting permissions; 4) setting build flags/compiling; 5) clean up, copying extra files and preparing whatever needs to be in the final installable archive (docs, etc); 6) creating the installable archive.
 
Old 11-04-2019, 12:41 PM   #14
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,044

Rep: Reputation: Disabled
SlackBuild = bash script

You cannot know a SlackBuild script without knowing at least some bash scripting.
There is no other answer than to learn bash.

Why should someone explain something over and over when it has already been explained over and over?
 
Old 11-04-2019, 01:29 PM   #15
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,404

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by drgibbon View Post
You should go through the templates. Anyway, I'm sure there's plenty of variation (e.g., different build systems, and not all are compiling from source).
Thanks. Now the point is describe template in own words: what this stands for etc. If there are differences in build systems how they are encoded inside a script? Fixed encoding? Value of parameter. One can put in script descriptio eg. "engin": python etc.
 
  


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
Suitesparse /Cuda SBo, complains about too advanced GCC, although being built with GCC 5 from the same SBo. Lockywolf Slackware 5 04-28-2019 11:17 PM
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 11:44 PM
Questions for Robby, ponce, or anyone from SBo about SBo submission requirements. ReaperX7 Slackware 4 06-07-2015 12:30 PM
Nvidia-driver.SlackBuild from SBo (or: I am a bad and sloppy SBo maintainer) kingbeowulf Slackware 8 08-31-2012 03:41 AM

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

All times are GMT -5. The time now is 09:33 AM.

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