Difference between revisions of "FreeBSD Trinity Installation Instructions"

From Trinity Desktop Project Wiki
Jump to navigation Jump to search
(More formatting fixes. WARNING: There was an unfinished sentence @ section Issues. I commented it out for the time being, but please fix it. :-))
(→‎Building the port: Update to build ports integrated into /usr/ports)
 
(9 intermediate revisions by 2 users not shown)
Line 6: Line 6:
   
 
=Prerequisites=
 
=Prerequisites=
===Installing git and core tools===
+
===Installing the latest versions of the FreeBSD base system and Ports Collection===
  +
This could very possibly help with some issues by ensuring you are using the latest ports and base system packages. Follow the next step if you want to mix ports and packages.
We will need to install '''git''' to obtain the files from the Trinity Gitea Workspace. We can also go ahead and get some of the core build dependencies used by the TDE port to avoid building them later:
 
 
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
  +
# portsnap auto && freebsd-update fetch install
# pkg install git libtool gettext findutils gsed bash automake cmake gmake ninja
 
 
</syntaxhighlight>
 
</syntaxhighlight>
   
===Trouble packages===
+
===Ports + packages: Switching to "latest" package branch===
  +
''Make sure you do this if you are going to install anything via pkg beforehand, or are installing TDE in a non-clean environment.''
The following extras can be installed to prevent the build process from being stopped. It's much easier to install the binaries for these miscellaneous dependencies than build them and end up with obscure errors that halt the entire build. This may be updated with more that are known.
 
  +
  +
To avoid building some things that would be much quicker to avoid, we can use pkg to fetch and install core dependencies instead of compiling every dependency as a port. As of 2 May 2022, some package libraries from the "quarterly" branch are older than what some TDE applications are looking for. <tt>devel/icu</tt> is a notable example. Therefore, it is recommended that we use the latest repository which has the same versions as the Ports Collection. If you haven't, you can do this the following way:
   
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
  +
# mkdir -p /usr/local/etc/pkg/repos && cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos
# pkg install gpgme sqlite mysql57-client orc samba binutils libxine texlive-texmf-source
 
 
</syntaxhighlight>
 
</syntaxhighlight>
   
  +
You then need to edit the original <tt>/etc/pkg/FreeBSD.conf</tt> in your favorite text editor (as root) and make sure its disabled by setting <tt>enabled: yes</tt> to <tt>enabled: no</tt>
===Cloning the repo===
 
   
  +
After editing that, edit <tt>/usr/local/etc/pkg/repos/FreeBSD.conf</tt> and change the
Now that we have git, we can go ahead and clone the r14.0.x branch:
 
   
<syntaxhighlight lang="shell-session">
+
<syntaxhighlight>
  +
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
$ git clone --single-branch --branch r14.0.x https://mirror.git.trinitydesktop.org/gitea/TDE/tde-packaging.git
 
 
</syntaxhighlight>
 
</syntaxhighlight>
   
  +
to:
Keep in mind this will install the complete repository, which includes build scripts for Linux. The only directory you need in this repo is the ''freebsd'' one.
 
   
  +
<syntaxhighlight>
=Building the port=
 
  +
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  +
</syntaxhighlight>
   
  +
You can now run <tt>pkg update</tt> which will re-generate the list with the latest branch of packages. If you are in a non-clean environment (i.e you already have another wm/desktop environment and were using quarterly), please run <tt>pkg upgrade</tt> before proceeding with the next step.
To build the complete desktop environment with build prompts along the way do the following:
 
  +
  +
===Installing git and other core dependencies===
 
After making sure we are on the latest branch of packages, we will need to install '''git''' to obtain the files from the Trinity Gitea Workspace as well as some other core dependencies to avoid building them later:
   
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
 
# pkg install git libtool gettext findutils gsed gtar bash automake cmake gmake ninja rsync
$ cd ~/tde-packaging/freebsd && sudo make install clean
 
 
</syntaxhighlight>
 
</syntaxhighlight>
   
  +
To prevent the need to build many other packages that are needed as dependencies, we also recommend installing the following packages:
* <tt>sudo</tt> is used because if this is performed entirely as root then "cd" will go into root's home directory. You could also use <tt>doas</tt> or enter the directory first then switch to root using <tt>su</tt>.
 
* If you are okay with the default build options and don't want to be prompted, you can add <code>NO_DIALOG=yes</code> to the <tt>make</tt> command.
 
   
  +
<syntaxhighlight lang="shell-session">
===Choosing packages manually===
 
  +
# pkg install aspell bison btparse chmlib clamav cups djvulibre doxygen exempi exif exiv2 facile ffmpeg file firebird30-client gamin gpgme gstreamer1-plugins gtk3 htdig html2ps iceauth imlib2 intltool iw-hspell jasper jpeg-turbo lcms2 libgphoto2 libgpod libmng libmtp libofx libotr libqalculate libssh libvisual04 libwmf libxine libxslt meanwhile mysql56-client nas ocaml-num openexr pl-libgadu png poppler postgresql11-client pulseaudio py39-boost-libs py39-rdiff-backup ruby samba413 sane-backends sqlite streamripper subversion torsocks transfig unixODBC upower xf86-video-vesa xmedcon xmodmap xorg-fonts xorg-server xprop xrandr xscreensaver xset xsetroot yaz
Advanced users may not want everything included in the port. You can choose what you want by commenting out sections of a Makefile. As an example, if you don't want Dolphin, you could do the following:
 
  +
</syntaxhighlight>
  +
 
===Cloning the repo===
  +
 
Now that we have git, we can go ahead and clone the r14.1.x branch:
   
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
 
$ git clone --single-branch --branch r14.1.x https://mirror.git.trinitydesktop.org/gitea/TDE/tde-packaging.git
$ ee ~/tde-packaging/freebsd/applications/system/Makefile
 
 
</syntaxhighlight>
 
</syntaxhighlight>
   
 
Keep in mind this will install the complete repository, which includes build scripts for Linux. The only directory you need in this repo is the ''freebsd'' one.
And then comment out (add a '''#''') the entry for Dolphin:
 
   
 
=Building the port=
[[File:2021-11-26_12-33.png]]
 
   
  +
=== Spread ports from GIT folder to /usr/ports===
This can be applied to any of the other Makefiles, but it's best to not touch essentials (i.e anything in the "dependencies" directory") unless absolutely necessary.
 
  +
Starting with TDE R14.1.0, the ports are ready to be integrated into the standard port structure in /usr/ports. For this reason, each TDE port now contains "TDE port map" information in the header, which contains information for synchronization from the GIT source folder to the target folder in /usr/ports. The tde-ports-map script is used to perform synchronization:
   
  +
<syntaxhighlight lang="shell-session">
==Issues==
 
 
$ sudo ~/tde-packaging/freebsd/tde-ports-map
You may run into a snag during the build process. Even if you fix it yourself, it would be great to write a bug report to TGW [https://mirror.git.trinitydesktop.org/gitea/TDE/tde-packaging/issues/new here]. This will help improve the quality of the port by locating and indicating the severity of a bug so it doesn't happen again in the future. This section should cover known issues and ways to bypass them for now.
 
  +
</syntaxhighlight>
   
====imlib error====
 
When <tt>imlib</tt> is compiling, it may stop mid-way due to too many errors. If you have <tt>imlib2</tt> installed on your system (checked by <code>pkg info | grep imlib</code>) then commenting this entry out is sufficient to bypass the snag.
 
   
  +
===Building all ports===
====tdepim stuck on "[29/30] Running tests...."====
 
  +
To build the complete desktop environment with build prompts along the way you, can use meta-port 'tde-meta', which does not contain any software, but depends on all ports that are part of the TDE of the umbrella:
Use <code>Ctrl + C</code> to stop the build process. Don't worry, when you start it again it will start from where you left off. Open the Makefile for <tt>tdepim-trinity</tt> in an editor (such as <tt>ee</tt>):
 
   
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
 
$ cd /usr/ports/x11/tde-meta && sudo make install clean
$ ee ~/tde-packaging/freebsd/core/tdepim/Makefile
 
 
</syntaxhighlight>
 
</syntaxhighlight>
   
 
* <tt>sudo</tt> is used because if this is performed entirely as root then "cd" will go into root's home directory. You could also use <tt>doas</tt> or enter the directory first then switch to root using <tt>su</tt>.
Now scroll to the bottom and comment out the line starting with <code>post-build:</code>. This will disable the CMake check that gets stuck. Return to the master directory and start the build process again.
 
 
* If you are okay with the default build options or have an <tt>/etc/make.conf</tt> file and don't want to be prompted, you can add <code>NO_DIALOG=yes</code> to the <tt>make</tt> command.
   
 
===Choosing packages manually===
====A dependency couldn't be found and stops the process with an error====
 
 
Advanced users may not want everything included in the port. You can choose what you want by commenting out sections of a Makefile. As an example, if you don't want Dolphin, you could do the following:
Usually you can scroll up right before the error and see the package its trying to build. For example, while building <tt>tdepim</tt> it may halt on <tt>gpgme</tt>. You can fix this by installing the binary of <tt>gpgme</tt> via <tt>pkg</tt> like the following:
 
   
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
  +
$ ee /usr/ports/x11/tde-meta/Makefile
# pkg install gpgme
 
 
</syntaxhighlight>
 
</syntaxhighlight>
   
 
And then comment out (add a '''#''') the entry for Dolphin – port x11-fm/dolphin-trinity:
Then restart <tt>make</tt>. <!-- This issue is the main reason for the -->
 
  +
 
[[File:2021-11-26_12-33.png]]
  +
 
This can be applied to any of the other parts of Makefile, but it's best to not touch essentials (i.e anything in the "dependencies" section) unless absolutely necessary.
  +
 
==Issues==
 
You may run into a snag during the build process. Even if you fix it yourself, it would be great to write a bug report to TGW [https://mirror.git.trinitydesktop.org/gitea/TDE/tde-packaging/issues/new here]. This will help improve the quality of the port by locating and indicating the severity of a bug so it doesn't happen again in the future. This section should cover known issues.
  +
  +
As of R14.0.12, the [https://mirror.git.trinitydesktop.org/gitea/TDE/tde-packaging/issues/110 imlib issue (#110)] has been fixed.
   
 
=Post-installation=
 
=Post-installation=
Line 87: Line 107:
 
[[File:2021-11-26_13-30-Fixed.png]]
 
[[File:2021-11-26_13-30-Fixed.png]]
   
Where the yellow cursor is will be the line that will contain <tt>/usr/local/bin/xdm</tt>. You want to replace this line with <tt>/opt/trinity/bin/tdm</tt> like in the image.
+
Where the yellow cursor is will be the line that will contain <tt>/usr/local/bin/xdm</tt>. You want to replace this line with <tt>/opt/trinity/bin/tdm</tt> like in the image and change <tt>off</tt> to <tt>on</tt>.
   
 
'''If all is done correctly, you should be greeted with TDM once you reboot. You can then enter your newly installed Trinity Desktop Environment. Enjoy!'''
 
'''If all is done correctly, you should be greeted with TDM once you reboot. You can then enter your newly installed Trinity Desktop Environment. Enjoy!'''

Latest revision as of 00:54, 1 May 2023

Konqifreebsd.png

This is a step-by-step guide to installing the Trinity Desktop Environment on FreeBSD 13 and onward. This includes tips to make the process as painless as possible.


Prerequisites

Installing the latest versions of the FreeBSD base system and Ports Collection

This could very possibly help with some issues by ensuring you are using the latest ports and base system packages. Follow the next step if you want to mix ports and packages.

# portsnap auto && freebsd-update fetch install

Ports + packages: Switching to "latest" package branch

Make sure you do this if you are going to install anything via pkg beforehand, or are installing TDE in a non-clean environment.

To avoid building some things that would be much quicker to avoid, we can use pkg to fetch and install core dependencies instead of compiling every dependency as a port. As of 2 May 2022, some package libraries from the "quarterly" branch are older than what some TDE applications are looking for. devel/icu is a notable example. Therefore, it is recommended that we use the latest repository which has the same versions as the Ports Collection. If you haven't, you can do this the following way:

# mkdir -p /usr/local/etc/pkg/repos && cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos

You then need to edit the original /etc/pkg/FreeBSD.conf in your favorite text editor (as root) and make sure its disabled by setting enabled: yes to enabled: no

After editing that, edit /usr/local/etc/pkg/repos/FreeBSD.conf and change the

url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",

to:

url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",

You can now run pkg update which will re-generate the list with the latest branch of packages. If you are in a non-clean environment (i.e you already have another wm/desktop environment and were using quarterly), please run pkg upgrade before proceeding with the next step.

Installing git and other core dependencies

After making sure we are on the latest branch of packages, we will need to install git to obtain the files from the Trinity Gitea Workspace as well as some other core dependencies to avoid building them later:

# pkg install git libtool gettext findutils gsed gtar bash automake cmake gmake ninja rsync

To prevent the need to build many other packages that are needed as dependencies, we also recommend installing the following packages:

# pkg install aspell bison btparse chmlib clamav cups djvulibre doxygen exempi exif exiv2 facile ffmpeg file firebird30-client gamin gpgme gstreamer1-plugins gtk3 htdig html2ps iceauth imlib2 intltool iw-hspell jasper jpeg-turbo lcms2 libgphoto2 libgpod libmng libmtp libofx libotr libqalculate libssh libvisual04 libwmf libxine libxslt meanwhile mysql56-client nas ocaml-num openexr pl-libgadu png poppler postgresql11-client pulseaudio py39-boost-libs py39-rdiff-backup ruby samba413 sane-backends sqlite streamripper subversion torsocks transfig unixODBC upower xf86-video-vesa xmedcon xmodmap xorg-fonts xorg-server xprop xrandr xscreensaver xset xsetroot yaz

Cloning the repo

Now that we have git, we can go ahead and clone the r14.1.x branch:

$ git clone --single-branch --branch r14.1.x https://mirror.git.trinitydesktop.org/gitea/TDE/tde-packaging.git

Keep in mind this will install the complete repository, which includes build scripts for Linux. The only directory you need in this repo is the freebsd one.

Building the port

Spread ports from GIT folder to /usr/ports

Starting with TDE R14.1.0, the ports are ready to be integrated into the standard port structure in /usr/ports. For this reason, each TDE port now contains "TDE port map" information in the header, which contains information for synchronization from the GIT source folder to the target folder in /usr/ports. The tde-ports-map script is used to perform synchronization:

$ sudo ~/tde-packaging/freebsd/tde-ports-map


Building all ports

To build the complete desktop environment with build prompts along the way you, can use meta-port 'tde-meta', which does not contain any software, but depends on all ports that are part of the TDE of the umbrella:

$ cd /usr/ports/x11/tde-meta && sudo make install clean
  • sudo is used because if this is performed entirely as root then "cd" will go into root's home directory. You could also use doas or enter the directory first then switch to root using su.
  • If you are okay with the default build options or have an /etc/make.conf file and don't want to be prompted, you can add NO_DIALOG=yes to the make command.

Choosing packages manually

Advanced users may not want everything included in the port. You can choose what you want by commenting out sections of a Makefile. As an example, if you don't want Dolphin, you could do the following:

$ ee /usr/ports/x11/tde-meta/Makefile

And then comment out (add a #) the entry for Dolphin – port x11-fm/dolphin-trinity:

2021-11-26 12-33.png

This can be applied to any of the other parts of Makefile, but it's best to not touch essentials (i.e anything in the "dependencies" section) unless absolutely necessary.

Issues

You may run into a snag during the build process. Even if you fix it yourself, it would be great to write a bug report to TGW here. This will help improve the quality of the port by locating and indicating the severity of a bug so it doesn't happen again in the future. This section should cover known issues.

As of R14.0.12, the imlib issue (#110) has been fixed.

Post-installation

After finishing the build process, you may want to enable Trinity's display manager (TDM). To do this, we will replace the XDM entry with TDM in /etc/ttys:

# ee /etc/ttys

2021-11-26 13-30-Fixed.png

Where the yellow cursor is will be the line that will contain /usr/local/bin/xdm. You want to replace this line with /opt/trinity/bin/tdm like in the image and change off to on.

If all is done correctly, you should be greeted with TDM once you reboot. You can then enter your newly installed Trinity Desktop Environment. Enjoy!