LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 05-10-2016, 07:54 PM   #1
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Rep: Reputation: 55
A thought on BLFS


Hi all,

I realize this isn't the best place to throw out a suggestion for possible improvement (such a thing should be done over a mailing list, right?), but I just wanted to see first if my idea was completely out of wack or not:

LFS is written as a book, with each section neatly organized into chapters. One can follow from beginning to end with a nice flow, and it ends with a working system. Great.

BLFS on the other hand doesn't work like that. In BLFS, the builder picks and chooses what they want, and not necessarily in order written. I have the BLFS book bookmarked, but every time I have to search for the keyword and find the correct link.

Would it make more sense to have it like a database you can search, categorized (not necessarily just one categories but can be multiple categories) sort of like slackbuilds.org?

Also, would be nice to have a "package submission" feature where people can add applications which is not yet in BLFS. This might be trickier for testing, and I'm sure it's not a new concept the maintainers haven't thought of. Just a wish list.
 
Old 05-10-2016, 11:37 PM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
BLFS can be followed as a book, but you end up jumping around resolving lots of dependencies.

You mentioned add-ons... we got you covered...

Community Beyond Linux From Scratch (CBLFS), which is hosted as part of Cross-Linux From Scratch. http://cblfs.clfs.org/ It's a wiki and has a lot of extras not normally covered. However, what I normally do is research Slackware.com and SlackBuilds.org for their slackbuild scripts to get ideas on build techniques, then formulate my own buildscripts partially based off the FAKEROOT approach mentioned in the LFS book.
 
Old 05-11-2016, 02:37 AM   #3
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
I think this is a great idea a search option for packages. I have built packages not in book, but require deps that I will look for in blfs book 1st.
Or some one will mention a package, Google can get you there but it would make sense to just search blfs book
 
Old 05-11-2016, 04:20 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
+1 for what Reaper said, when I'm looking for a new piece of software or the best way to install it, if it's not in BLFS the first place I go is slackbuilds.org, then the the slackware site.
In fact my own package manager will look first on LFS/BLFS and then slackbuilds for package info to include in the package.
 
Old 05-11-2016, 10:33 AM   #5
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Original Poster
Rep: Reputation: 55
Thanks for the replies so far.

Reaper: Thanks for letting me know about CBLFS. It looks like what I had in mind.

All: My current strategy is 1) Search BLFS -> 2) Search Arch Repo (+AUR. For both the build script is available, and the build procedure is very similar to LFS/Slackware) -> 3) Search Slackbuilds (Usually don't get here, since Arch covers most of what I want). This works fine, but the more I can search/find in BLFS, the better. My original suggestion was to make BLFS into database rather than a book. Currently, I use the search function in my browser to find the package in an HTML content. This is somewhat cumbersome because it jumps through the page and can't bookmark the result.

I have a basic build script but it doesn't search for packages on the web or resolve dependencies (just warns me the first layer dependencies if missing).
 
Old 05-11-2016, 10:51 AM   #6
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Creating dependency resolution usually requires more complex layers than I'm comfortable with. I tend to just list dependencies in the script notes or a readme. I use pkgtools as my package manager also. The less I have to fix, repair, keep track of, and resolve a circular chain of packages... the better.

I've rebuilt a lot of my scripts to serve as multi-use tools to packaging. Below is a sample from one of my scripts (my vala package), which is a simple, yet single use script to install and/or upgrade, or remove packages. You will notice off the bat, I use a slightly different method toward my end-goal, which is using LLVM/Clang as my default compiler.

Code:
#!/bin/bash

# Copyright 2016 James Powell Tulare, CA, USA

###############################################################################
#                                                                             #
# Required packages: 	glib                                                  #
# Optional packages: 	dbus, libxslt                                         #
#                                                                             #
###############################################################################

echo "Vala is a new programming language that aims to bring modern programming"
echo "language features to GNOME developers without imposing any additional   "
echo "runtime requirements and without using a different ABI compared to      "
echo "applications and libraries written in C.                                "
echo "                                                                        "
echo "This package requires package 'glib' to be installed as a dependency.   "
echo "                                                                        "
echo "This package optionally uses packages 'dbus' and 'libxslt'.             "
echo "                                                                        "

PKG=vala
VER=0.28.1
JOBS=-5
DESTDIR=$TMP
TMP=/tmp/$PKG-$VER
CFLAGS=clang
CXXFLAGS=clang++
OUTPUT=/tmp
ARCH=x86_64
BUILD=1

while true; do
    read -p "Do you wish to install(i) cancel(c) or remove(r) this package?" icr
    case $icr in
        [Ii]* ) time {
		rm -rf $PKG-$VER $DESTDIR                &&
		tar -xf $PKG-$VER.tar.?x*                &&
		pushd $PKG-$VER                          &&
		CC=$CFLAGS CXX=$CXXFLAGS                 \
		./configure                              \
			    --prefix=/usr                &&
		make $JOBS                               &&
		mkdir -p $TMP                            &&
		make install $DESTDIR                    &&
		popd                                     &&
		mkdir -p $TMP/install                    &&
		cd $TMP                                  &&
		/sbin/makepkg -l y -c n                  \
		$OUTPUT/$PKG-$VER-$ARCH-$BUILD.txz       &&
		if [ -e $OUTPUT/$PKG-$VER-$ARCH-$BUILD.txz ]; then
		  if [ -e /var/log/packages/$PKG-*-$ARCH-$BUILD ]; then
		    echo "Package installed, updating package."
		    upgradepkg $OUTPUT/$PKG-$VER-$ARCH-$BUILD.txz
		  else
		    echo "Installing package."
		    installpkg $OUTPUT/$PKG-$VER-$ARCH-$BUILD.txz
		  fi
		else
		  echo "Package failed to create" &&
		  exit 0
		fi;
		}
        ;;
        [Cc]* ) exit
        ;;
        [Rr]* ) if [ -e /var/log/packages/$PKG-*-$ARCH-$BUILD ]; then
		  removepkg $PKG-*-$ARCH-$BUILD
	        else
	          echo "Package not found in system."
	          exit 0
	        fi
        ;;
        * ) echo "Please type the 'i' 'c' or 'r' from the listed functions.";;
    esac
done

Last edited by ReaperX7; 05-11-2016 at 12:59 PM.
 
  


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
Thought I better say Hi :) 640rider LinuxQuestions.org Member Intro 4 02-09-2013 10:24 PM
Just a thought with OS X replica9000 Other *NIX 7 02-14-2008 04:13 PM
just a thought wounded625 Linux - General 12 07-04-2006 04:35 PM
Thought You'd Like To Know... E.T.Me LinuxQuestions.org Member Success Stories 1 11-16-2004 11:55 AM
just a thought Andy@DP LQ Suggestions & Feedback 3 09-16-2003 06:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 08:19 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