Skip to content

Instantly share code, notes, and snippets.

@fabricionaweb
Last active August 13, 2024 17:50
Show Gist options
  • Select an option

  • Save fabricionaweb/95c84ba87710c781330b8842efafd0b1 to your computer and use it in GitHub Desktop.

Select an option

Save fabricionaweb/95c84ba87710c781330b8842efafd0b1 to your computer and use it in GitHub Desktop.

Revisions

  1. fabricionaweb revised this gist Aug 13, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion python3-unraid.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,8 @@ rsync -rzvh rsync://ftp.slackware.com/slackware/slackware-current/source/d/pytho
    ```
    3.1. (Optional) You can grab Python3.12 source if you want that version. It works too
    ```
    wget https://www.python.org/ftp/python/3.12.5/Python-3.12.5.tar.xz \
    wget -P ~/python3-src \
    https://www.python.org/ftp/python/3.12.5/Python-3.12.5.tar.xz \
    https://www.python.org/ftp/python/3.12.5/Python-3.12.5.tar.xz.asc \
    https://www.python.org/ftp/python/doc/3.12.5/python-3.12.5-docs-text.tar.bz2
    ```
  2. fabricionaweb renamed this gist Aug 13, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. fabricionaweb created this gist Aug 13, 2024.
    47 changes: 47 additions & 0 deletions howto.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    Tested on Unraid 6.12

    ---

    1. Install LXC the plugin, create a Slackware 15.0, start and attach to it

    2. Upgrade security patches (press O to override when asked)
    ```
    slackpkg upgrade-all
    ```
    3. Get the source from -current branch. I use `rsync`
    ```
    slackpkg install rsync lz4 xxHash
    rsync -rzvh rsync://ftp.slackware.com/slackware/slackware-current/source/d/python3/ ~/python3-src
    ```
    3.1. (Optional) You can grab Python3.12 source if you want that version. It works too
    ```
    wget https://www.python.org/ftp/python/3.12.5/Python-3.12.5.tar.xz \
    https://www.python.org/ftp/python/3.12.5/Python-3.12.5.tar.xz.asc \
    https://www.python.org/ftp/python/doc/3.12.5/python-3.12.5-docs-text.tar.bz2
    ```
    4. Static link the `expat` dependency (since its not include on Unraid, it is good to us)
    ```
    sed -i 's/with-system-expat/without-system-expat/' ~/python3-src/python3.SlackBuild
    ```
    5. Include `ensurepip` (optional, I prefer to not)
    ```
    sed -i 's/without-ensurepip/with-ensurepip/' ~/python3-src/python3.SlackBuild
    ```
    5.1. (Optional) If you choose to __not include__ `ensurepip` you can add those lines to `/boot/config/go`
    ```
    # if it has pypthon then upgrade/install pip
    [[ -f /usr/bin/python3 ]] && /usr/bin/python3 -m ensurepip --upgrade
    ```
    6. Install dependencies
    ```
    slackpkg install kernel-headers binutils gcc-11 gc-8 make pkg-config guile flex libffi expat zlib gdbm readline
    ```
    7. Build
    ```
    sh ~/python3-src/python3.SlackBuild
    ```
    8. It should go to `/tmp/python3-*.txz` (something like that) inside the container.

    9. On the Unraid LXC plugin Settings (`/Settings/LXCSettings`) get the "storage path", there will be rootfs for your Slackware container, go `tmp` folder.

    10. You know the rest.