Linux package creation

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Answer
gsalin
Messages: 5
Registration: August 10, 2026 - 5:16 PM

August 10, 2026 - 5:49 PM

Hello,
we're currently testing WAPT, thank you for this tool! I'm particularly interested in creating Linux (Ubuntu 24) packages to deploy internal tools.
I've looked through the documentation, but I'm struggling to find what I need. Specifically, on the page https://www.wapt.fr/fr/doc/wapt-create- ... y-packages, there's section 1.3.3 "Packaging simple Linux packages," but it's empty.

For example, I want to deploy a connection script to an RDP server, using xfreerdp3 in /usr/local/bin. I want to copy the associated launcher to the desktop of all existing users (and to /etc/skel for future users) and the launcher icon to /usr/share/icons/.

Do you have any resources or pointers that could help me get started?

PyScripter is specific to Windows, if I understand correctly. Is there a Linux equivalent that would allow testing the different functions of the package (install, uninstall, etc.)?

Thanks in advance for your help,

Gerald.
PS: I installed the console on my Ubuntu 24 machine with the help of the admin who set up the WAPT server (I don't know which OS it's running).
Console 2.6.1.17834
Linux client Ubuntu 24.04
italbot
Messages: 94
Registration: Sep 26, 2023 - 3:50 p.m.

August 11, 2026 - 09:34

Hello,

Yes, it's a shame this section is empty. We'll consider adding sample packages for Linux.

In the meantime, I invite you to consult this page:

https://www.wapt.fr/fr/doc-2.6/wapt-cre ... lpers.html

You'll find the different functions available for the various operating systems there.

If I understand correctly, in your package you simply want to copy files?

Sincerely,

Ingrid
Tranquil IT
gsalin
Messages: 5
Registration: August 10, 2026 - 5:16 PM

August 11, 2026 - 10:36

Hello Ingrid,
Thanks for the link, I'd only found the Windows helpers... I didn't search hard enough ;(
For now, yes, I only want to do copying, but it should evolve into more complex things (installing deb + copying... but according to the helper, it should be fairly easy) ;))
Okay, so all I need to do is modify the setup.py file in the installer, using helpers and pure Python

For example, in my case, my setup.py would look something like this:

Code: Select all

from setuphelpers import *
import glob
import os

def install():
    install_apt("freerdp3-x11") #installe xfreerdp3
    install_apt("yad") #installe yad, utilisé dans le script bash ci-dessous
    filecopyto("xfreeRDP3-VM-Windows.sh","/usr/local/bin") #copie l'exécutable dans bin
    filecopyto("xfreeRDP3-VM-Windows.desktop","/etc/skel") #copie le lanceur dans /etc/skel pour le déployer aux nouveaux utilisateurs du poste
    filecopyto("iconXfreeRDP3-VM-Windows.svg","/usr/share/icons/INRAEUbuntuInstall") #copie l'icone du lanceur dans le répertoire d'icone
    for file in glob.glob("/home/*"): #recherche tous les homes directory existant
        print(file)
        if os.path.isdir(file + '/Bureau'): #si le répertoire Bureau existe dans le home, y copie le lanceur
            filecopyto("xfreeRDP3-VM-Windows.desktop",file + '/Bureau')
        elif os.path.isdir(file + '/Desktop'): #si le répertoire Desktop existe dans le home, y copie le lanceur
            filecopyto("xfreeRDP3-VM-Windows.desktop",file + '/Desktop')

def uninstall():
    remove_file("/usr/local/bin/xfreeRDP3-VM-Windows.sh")
    remove_file("/etc/skel/xfreeRDP3-VM-Windows.desktop")
    remove_tree("/usr/share/icons/INRAEUbuntuInstall")
    for file in glob.glob("/home/*"): #recherche tous les homes directory existant
        print(file)
        if os.path.isdir(file + '/Bureau'): #si le répertoire Bureau existe dans le home, y copie le lanceur
            if os.path.isfile(file + '/Bureau/xfreeRDP3-VM-Windows.desktop'):
                remove_file(file + '/Bureau/xfreeRDP3-VM-Windows.desktop')
        elif os.path.isdir(file + '/Desktop'): #si le répertoire Desktop existe dans le home, y copie le lanceur
            if os.path.isfile(file + '/Desktop/xfreeRDP3-VM-Windows.desktop'):
                remove_file(file + '/Desktop/xfreeRDP3-VM-Windows.desktop')
I'll test that in the next few days
Console 2.6.1.17834
Linux client Ubuntu 24.04
italbot
Messages: 94
Registration: Sep 26, 2023 - 3:50 p.m.

August 11, 2026 - 11:24

Yes, that seems pretty good considering what you need to do.

Normally you can shorten `os.path.isdir()` to `isdir()` to save some code.

Regards,

Ingrid
Tranquil IT
gsalin
Messages: 5
Registration: August 10, 2026 - 5:16 PM

August 11, 2026 - 11:39

Well,
I couldn't resist... I tested it. The installation went smoothly (after a few corrections, of course... but seeing the errors after deployment via the console).

I just discovered that you can test the installation and uninstallation scripts locally under Linux with the command `
sudo wapt-get install myPackage_0-1_ubuntu_PROD-wapt/`.

If there are Python errors in setup.py, they will be detected before deploying the package, which is much smoother ;). It must be the equivalent of PyScripter.

Cool, it's progressing.
Console 2.6.1.17834
Linux client Ubuntu 24.04
gsalin
Messages: 5
Registration: August 10, 2026 - 5:16 PM

August 11, 2026 - 2:01 PM

I'm encountering a permissions issue with a file located in /usr/local/bin. Users don't have execute permissions on this script.
I haven't seen a method in setuhelpers to manage permissions. Can you confirm this?

If so, I'll look into using Python.
Console 2.6.1.17834
Linux client Ubuntu 24.04
gsalin
Messages: 5
Registration: August 10, 2026 - 5:16 PM

August 11, 2026 - 5:09 PM

I used pure Python to change permissions (os.chmod()). In the end,

I created a small document for developing a basic Linux package. I couldn't attach it to this message because the file size limit is 256KB, so here it is as a link (which will expire in 15 days): https://filesender.renater.fr/?s=downlo ... 5ba491b765
I'm open to suggestions for linking this file somewhere (pinned post or otherwise), or better yet, integrating it into the documentation.
If you see any improvements to be made, I'm open to them. ;)
Console 2.6.1.17834
Linux client Ubuntu 24.04
Answer