WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Using Pkgsrc to Install Software in Tiny Core  (Read 1633 times)

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 281
Using Pkgsrc to Install Software in Tiny Core
« on: November 01, 2023, 06:52:19 AM »
I've added a guide to setting up Pkgsrc in Tiny Core on my website. In theory this allows automatic compiling and installation of tens of thousands of programs packaged for the Pkgsrc package system from NetBSD.

I actually concluded that it creates as many problems as it solves in general. But it might be useful for quickly installing software that has lots of unsatisfied dependencies on Tiny Core, if you're lucky and everything just works. Personally I haven't used it much since I wrote the guide a few months back.

The page is part of a new Tiny Core section on my website, which might grow over time.

Offline mocore

  • Hero Member
  • *****
  • Posts: 641
  • ~.~
Re: Using Pkgsrc to Install Software in Tiny Core
« Reply #1 on: September 02, 2024, 03:13:29 PM »
Quote
I could only find two sources of Pkgsrc binary packages for Linux on x86_64, for RHEL 7 and for Slackware. Neither work on Tiny Core Linux 14 Pure64 unfortunately, for some reason the binaries aren't compatible. Perhaps an earlier TC version works?

trying to follow the slackware binary link/thread
 only match for pkg and or scr
was @ https://packages.pkgsrc.pub/retrobsd/slackware/2022Q4/x86_64/All/lintpkgsrc-2022.09.29.tgz:/bin/lintpkgsrc

apparently very much NOT the binary's i was looking for  :(

Quote from: lintpkgsrc-2022.09.29.tgz?path=/bin/lintpkgsrc.pl
#!/usr/pkg/bin/perl
# $NetBSD: lintpkgsrc.pl,v 1.130 2023/10/16 22:16:55 rillig Exp $

# Written by David Brownlee <abs@netbsd.org>.
#
# Caveats:
#   The 'Makefile parsing' algorithm used to obtain package versions and
#   DEPENDS information is geared towards speed rather than perfection,
#   though it has gotten somewhat better over time, it only parses the
#   simpler Makefile conditionals.

reading
> it only parses the simpler Makefile conditionals
 has sent me on a tangent  looking for make ebnf grammar  ::)
https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form

any way
any links to the aforementioned non working binary's appreciated  :D

... perhaps the idea in perl make file version parsing could be relevant wrt   
https://forum.tinycorelinux.net/index.php/topic,27205.0.html # Sources and Build Scripts x86/x64

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 281
Re: Using Pkgsrc to Install Software in Tiny Core
« Reply #2 on: September 02, 2024, 07:00:00 PM »
Quote
I could only find two sources of Pkgsrc binary packages for Linux on x86_64, for RHEL 7 and for Slackware. Neither work on Tiny Core Linux 14 Pure64 unfortunately, for some reason the binaries aren't compatible. Perhaps an earlier TC version works?

trying to follow the slackware binary link/thread
 only match for pkg and or scr
was @ https://packages.pkgsrc.pub/retrobsd/slackware/2022Q4/x86_64/All/lintpkgsrc-2022.09.29.tgz:/bin/lintpkgsrc

That's the wrong end of the stick you've got there. :)

By "Pkgsrc binary packages for Linux on x86_64" I meant software binaries that can be installed using the Pkgsrc package management system, not binaries for the package management system itself. Pkgsrc is a package manager that, like most, can install binaries of software downloaded from the internet. Unusually, it can also automatically download the source code for those programs and compile them for the system it's running on.

Pkgsrc is mainly used with BSD, so most repos for binaries are for those OSs. I only found those two Linux package repos (after a lot of hunting around the Web), and the binaries weren't compatible with either the Linux kernel or the Glibc library used by TC 14 (I think they all seg. faulted or something when you tried to run them). So the alternative was using Pkgsrc to build its packaged software from source code automatically in TC, which is what I described.

If you're interested in trying binary packages from other Linux Pkgsrc repos (where???), or with other TC versions (some earlier TC versions than TC 14 might work with the repos I found), see the instructions in the official Pkgsrc documentation.

Pkgsrc is designed so you can also build every package automatically and set up your own binary repo compatible with the OS it's run on (eg. TC 14), which other Pkgsrc installations can download from instead of compiling software themselves. As I mused about at the end of my webpage, Pkgsrc also has much of the info needed to help make tcz extensions for all its software automatically if you wrote some extra scripts to run after the build (CentralWare seems to be taking up this idea now, but based on other package build systems). In practice though, I found the Pkgsrc build process broke so often due to software changes that there's no way I'd want to spend time working out where each package build script went wrong - it's easier just to compile the software I want from source code in TC manually. You could also go down the path of reporting Pkgsrc build failures as bugs and trying to get the Pkgsrc maintainers to fix them - I just haven't got the time/patience for that.

Offline yvs

  • Jr. Member
  • **
  • Posts: 59
Re: Using Pkgsrc to Install Software in Tiny Core
« Reply #3 on: September 02, 2024, 09:18:27 PM »
Quote
I could only find two sources of Pkgsrc binary packages for Linux on x86_64, for RHEL 7 and for Slackware. Neither work on Tiny Core Linux 14 Pure64 unfortunately, for some reason the binaries aren't compatible. Perhaps an earlier TC version works?
trying to follow the slackware binary link/thread
 only match for pkg and or scr
was @ https://packages.pkgsrc.pub/retrobsd/slackware/2022Q4/x86_64/All/lintpkgsrc-2022.09.29.tgz:/bin/lintpkgsrc

apparently very much NOT the binary's i was looking for  :(

if that package is compatible and installable on a target OS, it's supposed to be installed with own (pkg_*)  tools like `pkg_add URL|FILE` to that .tgz

Offline mocore

  • Hero Member
  • *****
  • Posts: 641
  • ~.~
Re: Using Pkgsrc to Install Software in Tiny Core
« Reply #4 on: September 03, 2024, 03:26:11 AM »

That's the wrong end of the stick you've got there. :)

By "Pkgsrc binary packages for Linux on x86_64" I meant software binaries that can be installed using the Pkgsrc package management system, not binaries for the package management system itself.



Ah!  ;D thanks for the clarification , probably not the last time  :-\

- it's easier just to compile the software I want from source code in TC manually.

perhaps
all though currently for me w3m(on 15x x86_64 ftr ) appears to be the exception to that rule ( perhaps ill have more luck on 14x... ???)


if that package is compatible and installable on a target OS, it's supposed to be installed with own (pkg_*)  tools like `pkg_add URL|FILE` to that .tgz

noted! although
in this case it was just perl script , so i guess it should work if environment & dependency expectations are met 
« Last Edit: September 03, 2024, 03:52:43 AM by mocore »