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 11-04-2019, 09:21 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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, 09:28 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,616
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460
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, 09:41 AM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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, 10:15 AM   #4
Qury
Member
 
Registered: Feb 2004
Location: Naas,IE
Distribution: Slackware
Posts: 212

Rep: Reputation: 184Reputation: 184
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, 10:16 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
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, 10:31 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,616
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460
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, 11:17 AM   #7
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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, 11:19 AM   #8
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

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

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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, 11:24 AM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
https://distro.ibiblio.org/amigolinu...ces/doc/README
 
Old 11-04-2019, 11:28 AM   #11
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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, 11:29 AM   #12
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Quote:
Originally Posted by Richard Cranium View Post
I can only repeat the same: you are posting in wrong thread.
 
Old 11-04-2019, 11:40 AM   #13
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,221

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
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, 11:41 AM   #14
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

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, 12:29 PM   #15
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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



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 10: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 10:44 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 09:06 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