Thinstation / thinstation

A framework for making thin and light Linux based images for x86 based machines and thinclients.
https://www.thinstation.net/
821 stars 188 forks source link

3rd party packages #633

Open JollyDandy2021 opened 3 years ago

JollyDandy2021 commented 3 years ago

I've been trying to rack my brain to figure out how to install 3rd party packages that don't come standard with thinstation but am at a complete loss.

The app I'm trying to get setup is Zoom. I downloaded the other os version from their website and looks at the template package listed in thinstaiton. There are a lot of executable files that I really don't know what to do with? I saw other posts around that mentioned installing it first in the devstation then use scripts in the template??

Any help you could provide would be awesome! :)

Doncuppjr commented 3 years ago

It really depends on the complexity of the package, as to how to approach it. The first port of call is crux.nu, then archlinux.org, then AUR. If you can find a port of the package, you can usually modify it to work with ThinStation. Once you have the port compiling and installing, you can mkrepackage the port, and it will turn into a package.

More complicated 3rd party apps like VMView and Citrix Webspace use a sorta of doghouse to get them integrated. We build a container and let the installer do whatever it wants, then we dissolve the container.

AUR has a zoom port.

JollyDandy2021 commented 3 years ago

Thanks for the advise on AUR. I was able to download the package. I see several things that look simillar to several of the existing packages. I tried to run the .INSTALL file, however it didn't do anything. I also noticed mkrepackage is not a valid command? I'm sorry, I'm pretty new to this stuff.

   

Sent: Sunday, February 21, 2021 at 4:22 PM From: "Donald A. Cupp Jr." notifications@github.com To: "Thinstation/thinstation" thinstation@noreply.github.com Cc: "JollyDandy2021" JollyDandy2021@engineer.com, "Author" author@noreply.github.com Subject: Re: [Thinstation/thinstation] 3rd party packages (#633)

 

It really depends on the complexity of the package, as to how to approach it. The first port of call is crux.nu, then archlinux.org, then AUR. If you can find a port of the package, you can usually modify it to work with ThinStation. Once you have the port compiling and installing, you can mkrepackage the port, and it will turn into a package.

More complicated 3rd party apps like VMView and Citrix Webspace use a sorta of doghouse to get them integrated. We build a container and let the installer do whatever it wants, then we dissolve the container.

AUR has a zoom port.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Doncuppjr commented 3 years ago

I have a video that might help a little.

https://www.youtube.com/watch?v=4socE4i_mUc

UTSBen commented 3 years ago

I actually have been having an issue with installing a package as well, mine has an entry in the ArchLinux AUR portal.

Following your video, The only place I think I'm stuck at is while editing the Pkgfile. It has the following references that I'm not sure how I should adjust to work with ThinStation:

  if [ "$CARCH" == "i686" ]; then
    ARCH="x86"
  elif [ "$CARCH" == "x86_64" ]; then
    ARCH="x64"
  fi

  ARCH+="-ubuntu-1604"

  #echo "Installing DisplayLink Manager $ARCH"
  install -D -m755 $ARCH/DisplayLinkManager $COREDIR/DisplayLinkManager

The package in question is DisplayLink, https://aur.archlinux.org/packages/displaylink/

Thanks!

Doncuppjr commented 3 years ago

Remove the conditional and just leave ARCH=“x64”

UTSBen commented 3 years ago

Hey Don, that worked out for me, but I realized it also requires the evdi package, which appears to be pretty finicky. I was able to get the package to build and install, but when checking modprobe it shows that it's not found.

modprobe: FATAL: Module evdi not found in directory /lib/modules/5.4.98TS

Through a fair amount of research and testing, I've found some patches that are supposed to get it to work on this kernel, however, the patches don't appear to be working.

I just wanted to check with you to see if maybe there was something I'm missing, or if you have any sort of experience with getting DisplayLink / evdi (used for docking stations) working with ThinStation.

Thinstation commented 3 years ago

I pushed a port to git.

On Wed, Feb 24, 2021 at 3:26 PM Donald A. Cupp Jr. notifications@github.com wrote:

Remove the conditional and just leave ARCH=“x64”

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/633#issuecomment-785461096, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47UXM43OCDD2DC6WL2LTAWDKNANCNFSM4X7QU7BA .

UTSBen commented 3 years ago

When updating it states "Could not find an archive." while pulling evdi

Doncuppjr commented 3 years ago

Give it another try.

UTSBen commented 3 years ago

So I see the evdi port getting installed now. However, when I try to re-build my displaylink port (pkgmk -d, pkgmk -i, mkrepackage) it's not showing up in my build/packages nor is it present on the ThinStation after building?

Doncuppjr commented 3 years ago

You kinda glossed over the details there, but I would guess something went wrong with mkrepackage

UTSBen commented 3 years ago

My apologies. I realized yesterday in my tired state I had forgotten the packagename after mkrepackage.

The evdi package is now present, however, it's the evdi-git package, which doesn't work properly with the AUR displaylink port. The regular evdi package builds properly but doesn't actually work with kernel 5.4

I've found this patch https://github.com/DisplayLink/evdi/issues/172#issuecomment-561394805 but using it in the Pkgfile results in several hunk failures and the build ends up failing.

The dock works properly in terms of the ethernet and usb ports, but the display still does not, which from what I understand, is due to evdi.

Any and all help you could provide would be awesome. Thanks!

Doncuppjr commented 3 years ago

You might need me to sign the module. How different is the build process from git?

On Friday, February 26, 2021, 01:05:46 PM PST, UTSBen notifications@github.com wrote:

My apologies. I realized yesterday in my tired state I had forgotten the packagename after mkrepackage.

The evdi package is now present, however, it's the evdi-git package, which doesn't work properly with the AUR displaylink port. The regular evdi package builds properly but doesn't actually work with kernel 5.4

I've found this patch DisplayLink/evdi#172 (comment) but using it in the Pkgfile results in several hunk failures and the build ends up failing.

The dock works properly in terms of the ethernet and usb ports, but the display still does not, which from what I understand, is due to evdi.

Any and all help you could provide would be awesome. Thanks!

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or unsubscribe .

UTSBen commented 3 years ago

It has a fair amount less than the git version.

Non-GIT

build() {
  cd "$name-$version"
  local src
  for src in "${source[@]}"; do
    src="${src%%::*}"
    src="${src##*/}"
    [[ $src = *.patch ]] || continue
    patch -Np1 < "../$src"
  done

# We only need to build the library in this step, dkms will build the module
cd "library"

make

# Predfine some target folders
SRCDIR="$PKG/usr/src/$name-$version"    # This one is needed for dkms
LIBNAME=lib$name

cd ".."

install -D -m 755 library/$LIBNAME.so $PKG/usr/lib/$LIBNAME.so

install -d $SRCDIR
install -D -m 755 module/* $SRCDIR
}

GIT

build() {
  export CFLAGS="$CFLAGS -Wno-error=format-truncation"
  git clone https://github.com/DisplayLink/evdi
  cd "${_SRC}"
  local _src
  for _src in "${source[@]%%::*}"; do
    _src="${_src##*/}"
    if [[ "${_src}" = *.patch ]]; then
      msg2 "Patch ${_src}"
      patch -Np1 -i "../${_src}"
    fi
  done

  # Fix build for kernel 5.4
  #sed -E -e 's:SUBDIRS=([^ ]+) :M=\1 &:g' -i 'module/Makefile'
  # We only need to build the library in this step, dmks will build the module
  #cd "${_SRC}/library"
  # DKMS builds are hard to debug. We build it here and throw it away.
  CFLAGS="${CFLAGS/-fno-plt/}"
for KERNELTYPE in TS; do
  export REPORT_KERNEL=${kver}$KERNELTYPE
  export KBUILD_MODPOST_WARN=1

  make
  install -Dpm755 "library/lib${name%-git}.so"* -t "${PKG}/usr/lib/"
  pushd "${PKG}/usr/lib/" > /dev/null
  local _libs=(*.so.*)
  if [ "${#_libs[@]}" -ne 1 ]; then
    set +u
    echo "Too many libs"
    false
  fi
  _libs="${_libs[0]}"
  local _libase="${_libs%.so*}.so"
  ln -sf "${_libs}" "${_libase}"
  ln -sf "${_libs}" "${_libase}.0" # bad soname
  popd > /dev/null

  for module in module/evdi.ko; do
    /usr/src/kernels/$REPORT_KERNEL/scripts/sign-file \
    sha256 \
    /etc/ssl/keys/kernel.key \
    /etc/ssl/certs/kernel.crt \
    $module
  done

  local _DKMS="${PKG}/usr/src/${name%-git}-${version}"
#  install -Dpm644 module/* -t "${_DKMS}/"
  install -Dpm644 module/*.ko -t $PKG/lib/modules/$REPORT_KERNEL/kernel/extra/
#  make -j1 -C "${_DKMS}" clean
done
}
Doncuppjr commented 3 years ago

We can't use dkms. I need to sign it, or you need to rebuild the kernel with your own key, and you can sign it.

On Friday, February 26, 2021, 02:04:28 PM PST, UTSBen notifications@github.com wrote:

It has a fair amount less than the git version.

Non-GIT build() {   cd "$name-$version"   local src   for src in "${source[@]}"; do     src="${src%%::}"     src="${src##/}"     [[ $src = *.patch ]] || continue     patch -Np1 < "../$src"   done

We only need to build the library in this step, dkms will build the module

cd "library"

make

Predfine some target folders

SRCDIR="$PKG/usr/src/$name-$version"    # This one is needed for dkms LIBNAME=lib$name

cd ".."

install -D -m 755 library/$LIBNAME.so $PKG/usr/lib/$LIBNAME.so

install -d $SRCDIR install -D -m 755 module/* $SRCDIR }

GIT build() {   export CFLAGS="$CFLAGS -Wno-error=format-truncation"   git clone https://github.com/DisplayLink/evdi   cd "${_SRC}"   local _src   for _src in "${source[@]%%::}"; do     _src="${_src##/}"     if [[ "${_src}" = *.patch ]]; then       msg2 "Patch ${_src}"       patch -Np1 -i "../${_src}"     fi   done

  # Fix build for kernel 5.4   #sed -E -e 's:SUBDIRS=([^ ]+) :M=\1 &:g' -i 'module/Makefile'   # We only need to build the library in this step, dmks will build the module   #cd "${_SRC}/library"   # DKMS builds are hard to debug. We build it here and throw it away.   CFLAGS="${CFLAGS/-fno-plt/}" for KERNELTYPE in TS; do   export REPORT_KERNEL=${kver}$KERNELTYPE   export KBUILD_MODPOST_WARN=1

  make   install -Dpm755 "library/lib${name%-git}.so" -t "${PKG}/usr/lib/"   pushd "${PKG}/usr/lib/" > /dev/null   local _libs=(.so.)   if [ "${#_libs[@]}" -ne 1 ]; then     set +u     echo "Too many libs"     false   fi   _libs="${_libs[0]}"   local _libase="${_libs%.so}.so"   ln -sf "${_libs}" "${_libase}"   ln -sf "${_libs}" "${_libase}.0" # bad soname   popd > /dev/null

  for module in module/evdi.ko; do     /usr/src/kernels/$REPORT_KERNEL/scripts/sign-file \     sha256 \     /etc/ssl/keys/kernel.key \     /etc/ssl/certs/kernel.crt \     $module   done

  local _DKMS="${PKG}/usr/src/${name%-git}-${version}"

  install -Dpm644 module/* -t "${_DKMS}/"

  install -Dpm644 module/*.ko -t $PKG/lib/modules/$REPORT_KERNEL/kernel/extra/

  make -j1 -C "${_DKMS}" clean

done }

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or unsubscribe .

UTSBen commented 3 years ago

Rebuilding the Kernel and signing it is definitely out of my realm of knowledge. If you have a good guide I can follow I can try and take a stab at it

Doncuppjr commented 3 years ago

Try the latest push

UTSBen commented 3 years ago

Building the evdi package fails due to a footprint mismatch.

=======> ERROR: Footprint mismatch found:
MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/
MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/
MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/drivers/
MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/drivers/gpu/
MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/drivers/gpu/drm/
MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/drivers/gpu/drm/evdi/
MISSING   -rw-r--r--      root/root       lib/modules/5.4.98TS/kernel/drivers/gpu/drm/evdi/evdi.ko
NEW       drwxr-xr-x      root/root       lib/modules/<kernel-version>/
NEW       drwxr-xr-x      root/root       lib/modules/<kernel-version>/kernel/
NEW       drwxr-xr-x      root/root       lib/modules/<kernel-version>/kernel/drivers/
NEW       drwxr-xr-x      root/root       lib/modules/<kernel-version>/kernel/drivers/gpu/
NEW       drwxr-xr-x      root/root       lib/modules/<kernel-version>/kernel/drivers/gpu/drm/
NEW       drwxr-xr-x      root/root       lib/modules/<kernel-version>/kernel/drivers/gpu/drm/evdi/
NEW       -rw-r--r--      root/root       lib/modules/<kernel-version>/kernel/drivers/gpu/drm/evdi/evdi.ko
=======> ERROR: Building '/ts/ports/kernel-modules/evdi/evdi#1.7.2-1.pkg.tar.xz' failed.

Entire log can be found here: https://pastebin.com/48hGLepQ

Doncuppjr commented 3 years ago

You don't want to rebuild the evdi port. I built the module and signed it.

On Monday, March 1, 2021, 08:05:38 AM PST, UTSBen notifications@github.com wrote:

Building the evdi package fails due to a footprint mismatch. =======> ERROR: Footprint mismatch found: MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/ MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/ MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/drivers/ MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/drivers/gpu/ MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/drivers/gpu/drm/ MISSING   drwxr-xr-x      root/root       lib/modules/5.4.98TS/kernel/drivers/gpu/drm/evdi/ MISSING   -rw-r--r--      root/root       lib/modules/5.4.98TS/kernel/drivers/gpu/drm/evdi/evdi.ko NEW       drwxr-xr-x      root/root       lib/modules// NEW       drwxr-xr-x      root/root       lib/modules//kernel/ NEW       drwxr-xr-x      root/root       lib/modules//kernel/drivers/ NEW       drwxr-xr-x      root/root       lib/modules//kernel/drivers/gpu/ NEW       drwxr-xr-x      root/root       lib/modules//kernel/drivers/gpu/drm/ NEW       drwxr-xr-x      root/root       lib/modules//kernel/drivers/gpu/drm/evdi/ NEW       -rw-r--r--      root/root       lib/modules//kernel/drivers/gpu/drm/evdi/evdi.ko =======> ERROR: Building '/ts/ports/kernel-modules/evdi/evdi#1.7.2-1.pkg.tar.xz' failed.

Entire log can be found here: https://pastebin.com/48hGLepQ

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or unsubscribe .

UTSBen commented 3 years ago

Booting into ThinStation I can see that evdi is running. However, it's still not outputting any video.

I noticed in the Pkgfile the following section is commented out:

  # Fix build for kernel 5.4
  #sed -E -e 's:SUBDIRS=([^ ]+) :M=\1 &:g' -i 'module/Makefile'

Which is where I'd think the issue is.

Doncuppjr commented 3 years ago

Changed and pushed.

On Monday, March 1, 2021, 10:21:49 AM PST, UTSBen notifications@github.com wrote:

Booting into ThinStation I can see that evdi is running. However, it's still not outputting any video.

I noticed in the Pkgfile the following section is commented out:   # Fix build for kernel 5.4   #sed -E -e 's:SUBDIRS=([^ ]+) :M=\1 &:g' -i 'module/Makefile'

Which is where I'd think the issue is.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or unsubscribe .

UTSBen commented 3 years ago

So for whatever reason, it's still not working. At this point I'm not 100% if its the evdi package or if its the displaylink package that's causing the issues, but I am totally stumped.

The only other thing I've noticed is it looks like the displaylink package is supposed to have a tray icon, but currently doesn't. I've tried manually executing the scripts and the executable, as well as stopped and restarting the service.

I don't know if perhaps the issue could be in XORG?

Thank you for everything so far. You've been absolutely awesome!

Doncuppjr commented 3 years ago

Which I could be of more help, but I don't have anything like that to test.

rohrbachger commented 3 years ago

I'm also interested in a zoom package. We are using thinstation already in our video conference rooms. Tools like zoom, avaya spaces, teeams, big blue button, openmeetings work well in the browser, but for more functionality I would prefer a zoom package. If you have a first solution, can you upload it?

With all the home-offices I would like also to get Teamviewer running on thinstation. I spend some time, but gave up for the moment. Currently the guys take he company pc to their home.( with windows). We do have vmware view, so they do not need VPN. But I would like to use thinstation on the PC´s. We made some tests with Lenovo M625p, cost < 290$. The modell 715q was better, but is not anymore available. Horizon View client works well on thinstation, dual screen 24"

That works in general very well, but sometimes it is helpful for analysing remote problems. Internally we already use a while vnc, user has to accept connection. But for external connection this is not possible.

Thinstation commented 3 years ago

I added Teams. A zoom app should be pretty easy to integrate.

hesamkhatami commented 2 years ago

hi How can install RPM packag manager? I can't install it becuase can't create directory in read-only file system. How can change read-only file system?

Doncuppjr commented 2 years ago

Disable fastboot.

hesamkhatami commented 2 years ago

THX but I want install RPM in thinstation server not image.