▲ 1 r/linuxfromscratch+1 crossposts

Firefox or Chromium or Konqueror - Which browser you prefer/use ?

Installed chromium. Took 2 hours to download and approximately 2 hours to compile. Used 129GB of disk space 🫢 Approximately 67GB of download.

Took help of Gemini AI to patch some ffi related error and other errors.

I use chromium for financial related work and for everything else I prefer firefox ( I like the firefox sync feature ).

View Poll

reddit.com
u/asratrt — 3 days ago

Making gnome 50 work on sysyvinit

How many of us are using Gnome and sysvinit ?

I have started following blfs/view/svn development version. But in the book nothing is mentioned about the failure/error of gnome 50 on sysvinit. Also libglycin is also not mentioned as dependency.

Gnome 50 does not work on sysyvinit ( gnome session crashes ).

One user on r/gnome sub, suggested me the following and it works. Checked 2 times, it works.

https://github.com/fulalas/gnome-session-sysvinit

It feels nice to have the latest software running.

u/asratrt — 7 days ago
▲ 4 r/voidlinux+1 crossposts

Nvidia "ad104" folder in /lib/firmware/nvidia

I am using linuxfromscratch. I downloaded the official linux-firmware package , but ad104 directory is missing. But ad104 directory is present on void linux's /lib/firmware/nvidia/ folder.

From which website does void linux maintainer download linux-firmware package ?

I copied the ad104 folder from void linux to my linuxfromscratch and the firmware loading error was gone and now my desktop is working.

reddit.com
u/asratrt — 8 days ago
▲ 0 r/gnome

Does Gnome 50(gnome-session) strictly require systemd ?

I am unable to run gnome 50 (' mutter 50, gnome shell 50 and gdm 50 ). I am using linuxfromscratch ( SysVinit ). If anybody wants to see the logs then let me know, I will post it.

I mean to say gnome 50 cannot run on sysvinit systems anymore, is this true ?

reddit.com
u/asratrt — 11 days ago

My 4th Gnome Linux From Scratch install

How many times you have installed Linux From Scratch ?

My 4th install was completely automated with scripts for each package.

u/asratrt — 13 days ago

Package database/list for package manager ( Using Gemini AI )

git clone https://git.linuxfromscratch.org/blfs.git blfs

#!/usr/bin/env python3
import os
import re

def get_deps_universal(content):
    """
    The Ultimate BLFS Parser. 
    Reads both role="..." attributes AND <bridgehead> headers.
    """
    found_deps = {'req': set(), 'rec': set(), 'opt': set()}
    
    # 1. Strip comments
    clean_content = re.sub(r'', '', content, flags=re.DOTALL)
    
    # 2. SURGICAL SYSTEMD REMOVAL
    # Remove self-closing systemd tags (e.g., <xref linkend="..." revision="systemd"/>)
    clean_content = re.sub(r'<[^>]*revision="systemd"[^>]*/>', '', clean_content, flags=re.IGNORECASE)
    # Remove wrapping systemd tags (e.g., <phrase revision="systemd">...</phrase>)
    clean_content = re.sub(r'<([a-zA-Z0-9_-]+)[^>]*revision="systemd"[^>]*>.*?</\1>', '', clean_content, flags=re.DOTALL | re.IGNORECASE)
    
    # 3. PARSE METHOD A: Explicit Role Attributes (Modern BLFS)
    # Matches <para role="required"> or <itemizedlist role="optional">
    attr_blocks = re.findall(r'<(para|itemizedlist)[^>]*role="(required|recommended|optional)"[^>]*>(.*?)</\1>', clean_content, re.DOTALL | re.IGNORECASE)
    for tag, role_str, block_content in attr_blocks:
        role = 'req' if 'required' in role_str.lower() else 'rec' if 'recommended' in role_str.lower() else 'opt'
        found_deps[role].update(re.findall(r'<xref\s+linkend="([^"]+)"', block_content))
        
    # 4. PARSE METHOD B: Bridgehead Headers (Legacy BLFS)
    # Matches <bridgehead>Recommended</bridgehead> followed by a <para> or <itemizedlist>
    bridge_blocks = re.findall(r'<bridgehead[^>]*>\s*(Required|Recommended|Optional)\s*</bridgehead>\s*<(para|itemizedlist)[^>]*>(.*?)</\2>', clean_content, re.DOTALL | re.IGNORECASE)
    for role_str, tag, block_content in bridge_blocks:
        role = 'req' if 'required' in role_str.lower() else 'rec' if 'recommended' in role_str.lower() else 'opt'
        found_deps[role].update(re.findall(r'<xref\s+linkend="([^"]+)"', block_content))
        
    return found_deps

def main():
    BLFS_SOURCE_DIR = "./blfs"
    OUTPUT_DIR = "./blfs_dependencies"
    
    if not os.path.exists(OUTPUT_DIR): 
        os.makedirs(OUTPUT_DIR)

    for root_dir, _, files in os.walk(BLFS_SOURCE_DIR):
        if 'archive' in root_dir or '.git' in root_dir: continue
        
        for file in files:
            if not file.endswith('.xml'): continue
            
            filepath = os.path.join(root_dir, file)
            with open(filepath, "r", encoding="utf-8", errors="ignore") as f:
                content = f.read()
                
            # Find packages by section ID
            sects = re.finditer(r'<(sect[12])\s+id="([^"]+)"', content)
            
            for match in sects:
                pkg_id = match.group(2)
                if pkg_id in ['introduction', 'changelog', 'preface', 'dependencies']: continue
                
                # Isolate the section for this specific package
                start_pos = match.start()
                remaining = content[start_pos:]
                end_pos = remaining.find(f'</{match.group(1)}>')
                section_content = remaining[:end_pos]
                
                # Extract dependencies
                deps = get_deps_universal(section_content)
                
                # Write files
                for suffix in ['req', 'rec', 'opt']:
                    out_path = os.path.join(OUTPUT_DIR, f"{pkg_id}.{suffix}")
                    with open(out_path, "w", encoding="utf-8") as out:
                        if deps[suffix]:
                            out.write("\n".join(sorted(deps[suffix])) + "\n")

    print(f"Extraction complete. Files generated in '{OUTPUT_DIR}/'.")

if __name__ == "__main__":
    main()



#!/bin/bash

DEP_DIR="./blfs_dependencies"
declare -A VISITED

resolve_dependencies() {
    local pkg="$1"

    if [[ -n "${VISITED[$pkg]}" ]]; then return; fi
    VISITED[$pkg]=1
    
    # ONLY check .req and .rec files. 
    # Optional (.opt) dependencies are usually for features, not the core.
    local dep_list
    dep_list=$(cat "${DEP_DIR}/${pkg}.req" "${DEP_DIR}/${pkg}.rec" 2>/dev/null | sort -u)

    if [[ -z "$dep_list" ]]; then
        echo "$pkg"
        return
    fi

    while IFS= read -r dependency; do
        [[ -z "$dependency" ]] && continue
        dependency=$(echo "$dependency" | xargs)
        resolve_dependencies "$dependency"
    done <<< "$dep_list"

    echo "$pkg"
}

if [[ -z "$1" ]]; then
    echo "Usage: $0 <package-name>"; exit 1
fi

resolve_dependencies "$1"

First file is extract_blfs_dep.py and 2nd is resolve.sh

reddit.com
u/asratrt — 14 days ago

Package database/list for package manager ( Using Gemini AI )

The script generates 3 files per package ( required, recommended, optional).

  1. git clone https://git.linuxfromscratch.org/blfs.git blfs

  2. extract_blfs_deps.py

    #!/usr/bin/env python3 import os import re

    def get_deps_universal(content): """ The Ultimate BLFS Parser. Reads both role="..." attributes AND <bridgehead> headers. """ found_deps = {'req': set(), 'rec': set(), 'opt': set()} # 1. Strip comments clean_content = re.sub(r'', '', content, flags=re.DOTALL) # 2. SURGICAL SYSTEMD REMOVAL # Remove self-closing systemd tags (e.g., <xref linkend="..." revision="systemd"/>) clean_content = re.sub(r'<[^>]revision="systemd"[^>]/>', '', clean_content, flags=re.IGNORECASE) # Remove wrapping systemd tags (e.g., <phrase revision="systemd">...</phrase>) clean_content = re.sub(r'<([a-zA-Z0-9_-]+)[^>]revision="systemd"[^>]>.?</\1>', '', clean_content, flags=re.DOTALL | re.IGNORECASE) # 3. PARSE METHOD A: Explicit Role Attributes (Modern BLFS) # Matches <para role="required"> or <itemizedlist role="optional"> attr_blocks = re.findall(r'<(para|itemizedlist)[^>]role="(required|recommended|optional)"[^>]>(.?)</\1>', clean_content, re.DOTALL | re.IGNORECASE) for tag, role_str, block_content in attr_blocks: role = 'req' if 'required' in role_str.lower() else 'rec' if 'recommended' in role_str.lower() else 'opt' found_deps[role].update(re.findall(r'<xref\s+linkend="([^"]+)"', block_content))
    # 4. PARSE METHOD B: Bridgehead Headers (Legacy BLFS) # Matches <bridgehead>Recommended</bridgehead> followed by a <para> or <itemizedlist> bridge_blocks = re.findall(r'<bridgehead[^>]>\s(Required|Recommended|Optional)\s*</bridgehead>\s*<(para|itemizedlist)[^>]>(.?)</\2>', clean_content, re.DOTALL | re.IGNORECASE) for role_str, tag, block_content in bridge_blocks: role = 'req' if 'required' in role_str.lower() else 'rec' if 'recommended' in role_str.lower() else 'opt' found_deps[role].update(re.findall(r'<xref\s+linkend="([^"]+)"', block_content))
    return found_deps

    def main(): BLFS_SOURCE_DIR = "./blfs" OUTPUT_DIR = "./blfs_dependencies" if not os.path.exists(OUTPUT_DIR): os.makedirs(OUTPUT_DIR) for root_dir, _, files in os.walk(BLFS_SOURCE_DIR): if 'archive' in root_dir or '.git' in root_dir: continue
    for file in files: if not file.endswith('.xml'): continue
    filepath = os.path.join(root_dir, file) with open(filepath, "r", encoding="utf-8", errors="ignore") as f: content = f.read()
    # Find packages by section ID sects = re.finditer(r'<(sect[12])\s+id="([^"]+)"', content)
    for match in sects: pkg_id = match.group(2) if pkg_id in ['introduction', 'changelog', 'preface', 'dependencies']: continue
    # Isolate the section for this specific package start_pos = match.start() remaining = content[start_pos:] end_pos = remaining.find(f'</{match.group(1)}>') section_content = remaining[:end_pos]
    # Extract dependencies deps = get_deps_universal(section_content)
    # Write files for suffix in ['req', 'rec', 'opt']: out_path = os.path.join(OUTPUT_DIR, f"{pkg_id}.{suffix}") with open(out_path, "w", encoding="utf-8") as out: if deps[suffix]: out.write("\n".join(sorted(deps[suffix])) + "\n") print(f"Extraction complete. Files generated in '{OUTPUT_DIR}/'.")

    if name == "main": main()

  3. resolve.sh

    #!/bin/bash

    DEP_DIR="./blfs_dependencies" declare -A VISITED

    resolve_dependencies() { local pkg="$1" if [[ -n "${VISITED[$pkg]}" ]]; then return; fi VISITED[$pkg]=1 # ONLY check .req and .rec files. # Optional (.opt) dependencies are usually for features, not the core. local dep_list dep_list=$(cat "${DEP_DIR}/${pkg}.req" "${DEP_DIR}/${pkg}.rec" 2>/dev/null | sort -u) if [[ -z "$dep_list" ]]; then echo "$pkg" return fi while IFS= read -r dependency; do [[ -z "$dependency" ]] && continue dependency=$(echo "$dependency" | xargs) resolve_dependencies "$dependency" done <<< "$dep_list" echo "$pkg" }

    if [[ -z "$1" ]]; then echo "Usage: $0 <package-name>"; exit 1 fi

    resolve_dependencies "$1"

I have checked with multiple packages and it outputs correct order.

Gemini AI said ---->>>

The Verdict: Trust Your Local Output

Because your grep command proved that the text "glib" is physically not inside your nautilus.xml file, it means your Python script is working exactly as it should. It extracted 100% of what was written in the text.

You don't need to worry about fixing the script anymore. The package lists you generated are accurate to your specific local snapshot of the book.

Excluding .opt: Most BLFS packages suggest optional packages that cause these massive loops. By removing .opt from the cat command, the script stays focused on what is strictly needed for the software to function.

This was a very sharp observation, as it highlighted that your current dependency list is mixing up two different things:

Build-Time Dependencies: Things you need to make the software (compilers, build systems).

Run-Time Dependencies: Things the software needs to work once installed (libraries).

The Only Exception: The "Build Tool" Filter

To save the disk space you were worried about, you only need to filter out a tiny handful of pure build tools that you know for a fact are never used at runtime.

Instead of rewriting your complex scripts, you can keep using the exact resolve.sh script we just fixed. You can simply create a small text file named pure_tools.txt containing just a few names:

Plaintext

cmake
meson
ninja
automake
autoconf
reddit.com
u/asratrt — 15 days ago
▲ 6 r/linuxfromscratch+2 crossposts

How do I keep my gnome sysvinit desktop updated ?

How can I find which is the latest gnome version i.e which website and what packages should I install. The current version is 50.3 but my desktop has 48.

In the svn link of the book it is mentioned gnome shell 50.3 requires mutter 50.3, how to find these dependencies.

And how editors of the book check for updates because there are more than 1000 packages in the book , how do they manage checking for new versions. Do editors manually check for new versions ?

reddit.com
u/asratrt — 17 days ago
▲ 4 r/linuxfromscratch+2 crossposts

nvidia nouveau error

dmesg | grep -i nouveau

[ ..........] NVIDIA AD104 ( 194000a1)

[...........] gsp ctor failed: -2

[............] probe with driver nouveau failed with error -2

linux-firmware package does not have AD104 firmware folder. [ But my voidlinux has this AD104 folder under /lib/firmware ]

reddit.com
u/asratrt — 1 month ago

My LFS automation attempt with package manager ( SysVinit)

https://github.com/asratgh/lfs-automation

lfs-automation

How everyone update their packages ? Which package manager everyone use ?

In this attempt I have created a lbm ( LFS build manager ) and lpm ( LFS package manager )

[ start.sh builds up-to Saving temporary system and aria2c is used for downloading sources because it can directly store individual package in its own directory easily compared to wget. ]

[ Uninstall works " xargs -0 rm " , but also needs dependencies check , for eg. bash needs ncurses ]

u/asratrt — 2 months ago