2.11BSD operating system for microcontrollers
It is currently Tue Jan 18, 2022 6:55 am

All times are UTC

Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Feb 06, 2016 9:37 pm 
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Following up Pito's new sticky post, for those of you still using my packages instead of the newer opkg tool, I've made an update to pkg(1) that those of you who have network connectivity on your LiteBSD machines might like.

TL;DR: If your LiteBSD machine is connected to the Internet, you can do something like
# pkg add nano-2.5.1
and magically it will be downloaded and installed.

pkg(1) now supports installing packages directly off the Internet.
It works like this:
1. Check if the package you want to install is on your local HDD.
2. If it is, install it. Goto 4.
3a. Check for the shell environment variable PKG_PATH. If it does not exist, use my repo in Pito's sticky post. If it does exist, use the repo PKG_PATH points to.
3b. Download the package from the Internet.
3c. Install the package.
4. Success! You can immediately begin using your newly installed package.

@__briancallahan on Twitter

PostPosted: Thu Feb 11, 2016 5:35 am 
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Brian,

I've finally fixed the opkg utility, so now it can install packages from the network. It works perfectly under QEMU:
/root # opkg update
Updated source 'base'.
/root # opkg list
arch - 20151221 - Simple program from OpenBSD that prints the host's CPU architecture.
dhrystone - 2.1 - Dhrystone benchmark program written in C.
dired - 3.05 - Terminal-based directory editor.
fpp - 1.1 - FORTRAN Preprocessor from Sun.
gmake - 4.1 - GNU make program
httpsrv - 1.0 - Minimalist HTTP/1.0 server for static content
ii - 1.7 - Minimalist FIFO and filesystem-based IRC client
linpack - 19960914 - Improved version of the LINPACK benchmark program written in C.
lsx - 0.1 - Utility that lists the executables in a directory tree.
mawk - 1.3.4 - Fast interpreter for the AWK programming language.
sash - 3.8 - A stand-alone shell with many built-in commands.
screen - 3.7.1 - Terminal multiplexer from the GNU project.
sic - 1.3 - Extremely simple IRC client.
whetstone - 1.2 - Updated version of the Whetstone benchmark in C.
/root # opkg install arch lsx whetstone
Installing arch (20151221) on root.
Downloading ...
Installing lsx (0.1) on root.
Downloading ...
Installing whetstone (1.2) on root.
Downloading ...
Installing whetstone (1.2) on root.
Configuring lsx.
Configuring arch.
Configuring whetstone.

Please, try it - does it work for you?
The network driver (or qemu emulation) is not yet quite stable: sometimes the downloading freezes. Fortunately, ^C and restarting opkg command helps. I'm going to figure out and fix this ASAP.

Nevertheless, I want to propose to start using opkg as a main package management tool. It think it makes sense to rename it to pkg, and modify makefiles in Ports repository to build packages in compatible format.

Package repository on the server side has a very simple structure:
mipsel/           -- directory for MIPS architecture
      Packages    -- list of packages, automatically created by dpkg-scanpackages utility
      base/       -- directory for base OS packages, none yet
      ports/      -- existing packagess from

See as an example.

It's easy to add repositories to a search path of opkg utility: edit file /etc/opkg/sources.conf and add more lines.

One of essential benefits of opkg utility is the ability to install and upgrade not only the /usr/local tree, but any component, including base OS utilities (/usr, /bin, /lib, /etc) and eventually a kernel (with appropriate bootloader support). The base/ directory will contain the updated versions of system packages for remote upgrade.

PostPosted: Thu Feb 11, 2016 3:52 pm 
User avatar

Joined: Sun Oct 20, 2013 3:15 am
Posts: 322
Hi Serge --

I say we leave the name as opkg (since that is it's name :) ), make sure that all the current ports in the ports tree have a working opkg .ar that's uploaded to your site (and/or mine), and then remove pkg.

@__briancallahan on Twitter

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission