safing / portmaster-packaging

Portmaster packages and installers
GNU General Public License v3.0
49 stars 22 forks source link

update and correct PKGBUILD #84

Open oberon-manjaro opened 1 year ago

oberon-manjaro commented 1 year ago

What would you like to add or change?: The current PKGBUILD in the AUR has some issues, attached is the working and proper version we use in Manjaro, including the cleaned up install file.

Why do you and others need this?: Because every user in the Archlinux space wants to install portmaster :)

In the latest version we actually renamed the package to portmaster-stub, as -bin doesn't really make sense, since we are not installing any binary. The attached version still has the name you currently use in the AUR, however. portmaster-stub-bin.zip

dhaavi commented 1 year ago

Hey @oberon-manjaro, thanks a lot for sharing these improvements. I will look into them in the coming weeks.

In the latest version we actually renamed the package to portmaster-stub, as -bin doesn't really make sense, since we are not installing any binary.

Can you elaborate on this? During installation binaries are downloaded and then used. Whether or not they are "installed" heavily depends on your definition. In any case, binaries are downloaded and then executed.

Also, we already have support for arm64 for Linux, but have not yet updated the installers. The only thing needed is to change the path of the binary: use linux_arm64 instead of linux_amd64.

Is there a way to provide both platforms in one PKGBUILD?

oberon-manjaro commented 1 year ago

@yochananmarqos is packaging this for us and will chime in later. I still need some insight in why the old AUR package installed but didn't own these two files and if it is in fact a good idea to now install them directly.

portmaster-stub: /usr/lib/systemd/system/portmaster.service exists in filesystem
portmaster-stub: /usr/share/applications/portmaster.desktop exists in filesystem

We need to make sure both, that everything gets properly removed when the package gets removed and also that there are no conflicts during any internal portmaster updates.

Also, we already have support for arm64 for Linux, but have not yet updated the installers. The only thing needed is to change the path of the binary: use linux_arm64 instead of linux_amd64.

You can simply define multiple architectures in the arch array

arch=('x86_64' 'aarch64')

and then specify dedicated sources to be used if necessary:

source_x86_64=()
source_aarch64=()
yochananmarqos commented 1 year ago

@dhaavi

Can you elaborate on this?

I think @oberon-manjaro may have misunderstood my explanation in our conversation earlier about the -bin suffix.

As you may already know, in the AUR, the -bin suffix is used to differentiate between a package that builds from source vs. a binary release. For instance, ventoy and ventoy-bin. Since the Portmaster stub package uses binary files, naming the AUR package portmaster-stub-bin is fine. See Nonfree applications package guidelines: Package naming.

Packages in the Arch repos never use suffixes like -bin or -git as there will only ever be one package no matter the source. We normally follow the same practice.

The main issue with the way the AUR package is installed is with the install file. Normally the commands run in Debian preinst, postinst, prerm, etc. cannot directly be imported on Arch due to the difference in packaging between the distros. The desktop and service files should be installed in the package() function of the PKGBUILD so they will be tracked by Pacman. As it stands now, they are untracked files and will have to be manually removed if this is corrected. The easiest way is to uninstall and reinstall.

See our portmaster-stub PKGBUILD and install file.