Skip to content

Conversation

Eeems
Copy link
Member

@Eeems Eeems commented Jul 31, 2023

This does the following:

  • Adds /opt/etc/profile to /etc/profile.d so that it automatically loads the environment variables provided by the entware source
  • Adds terminfo as a dependency of yaft

We may want to add some extra default environment variables to /etc/systemd/system.conf.d in the future as well.

@Eeems Eeems added the packages Add or improve packages of the repository label Jul 31, 2023
@Eeems Eeems linked an issue Jul 31, 2023 that may be closed by this pull request
@Eeems Eeems added this to the 2023-W31 merge window milestone Jul 31, 2023
@kiwiz
Copy link

kiwiz commented Aug 1, 2023

Tested via the following steps:

  • Ran
    ln -sf /opt/etc/profile /etc/profile.d/toltec.sh
    sed -i \
        -e 's|^export TERM=xterm|if \[ -z "$TERM" \];then export TERM=xterm;fi|' \
        /opt/etc/profile
  • Restarted yaft and invoked bash -l
  • Verified that TERMINFO was set and TERM=yaft-256color
  • Ran vim and verified that it rendered correctly

@timower
Copy link

timower commented Aug 4, 2023

Fetching Compiled Descriptions
The ncurses library searches for terminal descriptions in several
places. It uses only the first description found. The library has a
compiled-in list of places to search which can be overridden by envi-
ronment variables. Before starting to search, ncurses eliminates du-
plicates in its search list.

  o   If  the  environment	variable TERMINFO is set, it is	interpreted as
 the pathname	of a directory containing the compiled description you
 are working on.  Only that directory	is searched.

  o   If  TERMINFO	is not set, ncurses will instead look in the directory
 $HOME/.terminfo for a compiled description.

  o   Next, if the	environment variable  TERMINFO_DIRS  is	 set,  ncurses
 will	 interpret  the	 contents of that variable as a	list of	colon-
 separated directories (or database files) to	be searched.

 An empty directory name (i.e., if the variable begins or ends  with
 a  colon, or	contains adjacent colons) is interpreted as the	system
 location /usr/share/misc/terminfo.

  o   Finally, ncurses searches these compiled-in locations:

 o   a list of directories (@TERMINFO_DIRS@),	and

 o   the system terminfo  directory,	/usr/share/misc/terminfo  (the
     compiled-in default).

Should I / we just install the terminfo files to $HOME/.terminfo

@Eeems
Copy link
Member Author

Eeems commented Aug 4, 2023

Should I / we just install the terminfo files to $HOME/.terminfo

Not for toltec/entware packages. They are meant to go under /opt, and we were just missing expected environment variables that the entware side of the install expects.

Copy link

@timower timower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll also add the -l upstream

@Eeems
Copy link
Member Author

Eeems commented Aug 12, 2023

@bkirwi did you happen to test this? I think the only testing was by myself on my rM1

@bkirwi
Copy link

bkirwi commented Aug 15, 2023

Nope! I'm personally comfortable with your and @kiwiz' testing, since this is not one of the areas where I know the RM2 to be different, but I'd completely understand if you want to hold out for an additional test. (Though I personally won't have the chance to do it until probably September.)

@Eeems
Copy link
Member Author

Eeems commented Aug 15, 2023

@kiwiz would you be willing to try installing the ipk to make sure it works as expected?

@kiwiz
Copy link

kiwiz commented Aug 15, 2023

Installed both ipk files and confirmed:

  • TERM=yaft-256color
  • vim runs correctly

@Eeems Eeems merged commit e714122 into testing Aug 15, 2023
@Eeems Eeems deleted the yaft-terminfo branch August 15, 2023 03:57
Eeems added a commit that referenced this pull request Aug 18, 2023
#715)

* Add terminfo dependency to yaft and add /opt/etc/profile to /etc/profile.d

* Don't override TERM if it's already set, and run bash with profile includes from yaft
Eeems added a commit that referenced this pull request Aug 23, 2023
### New Packages
- `reterm` - 0230628.1927-1 (#703)
- `sill` - 0.1.1-alpha (#719)
- `changescrn` - 1.0.0-1 (#571)

### Updated Packages
- `yaft` - 0.0.8-2 (#715 #716)
  - Update to 0.0.8
  - Depend on `terminfo`
  - Add patch to start bash as a login shell
- `toltec-base` - 1.2-2 (#715)
  - Adds `/opt/etc/profile` to `/etc/profile.d` so that it automatically loads the environment variables provided by the entware source
- `linux-mainline` - 6.2.0-1 (#657)

### Tooling
- Update build process to use Python 3.10 (#684)
- Added issue templates to the repository (#711)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Add or improve packages of the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yaft package doesn't use terminfo file(s) in /opt/share/terminfo
4 participants