-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Linux installer #2932
Add Linux installer #2932
Conversation
[ "$1" ] | ||
|
||
VERSION="$1" | ||
DIR="$HOME"/.lmms-$VERSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linux users... @Umcaruje @mikobuntu @grejppi what are you opinions on a home-directory install versus system-wide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't get why we couldn't just offer downloads of .deb and .rpm packages. I'm just used to installing software with a .deb or by using a PPA. The home directory install sounds just confusing to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, but .deb
files don't come bundled with dependencies and generally require a package manager to fulfill them which varies between distros so we'll likely find ourselves offering various debs for different Debian-based distros. I'd assume OpenSUSE/SUSE and Fedora/RHEL/Centos suffer the same problems from an .rpm
perspective. I believe this is part of the problem people have with the KXStudio repos (work, but bundle some libraries people already have) although I don't know the specifics, I've just seen people on IRC complaining about the DEBs from there.
I've supported desktop software on Linux before and the .run
files work very well for what we're doing. They're essentially acting just like the dmg
and exe
files do, but for Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the .run idea too, as the Qt standalone installer works: if you run it as a "normal" user it installs in your home directory and if you run it as root it installs in /opt. The best of the two worlds...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@midi-pascal does qt install to ~/.qt
like @jasp00 is proposing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tresf Yep!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tres I'm all for a self contained ~home directory install. This is usually how I will install most software that I build myself. I guess most users will not be running a machine with multiple users, therefore a system wide install is not needed anyway.
This is a great start. I've left some comments in the script for consideration. At a glance I think it could use some commenting to explain what's happening. Some of the DEB stuff isn't clear to me at a glance and could really benefit from some commenting. I also would like some more feedback on the idea of a home-directory install versus something like system-wide |
A home-directory install would be more portable. When I do backups or update/reinstall my system, the first thing I include is my (almost) whole home directory. Including it there would make it easier to move around, if that's something you guys are concerned about :) You may also potentially not even have write permissions to |
Hmm... Projects are already stored with this in mind and they use relative paths for the samples and plugins so as long as the LMMS home directory is set properly. "Moving around" executables with projects isn't a concept I'm familiar with. I personally use LMMS with 5 others and we share samples, projects, presets, SF2s, VSTs on Linux, Mac and PC (mac not having capabilities to play VSTs or SF2s yet of course per #698, #649) and we have no issues. No issues migrating to a new system and no issues migrating to a different OS. Well, at least if we're all running the same version, which is currently a challenge when relying on 3rd party repositories on the various Linux distributions as they tend to be behind.
Nearly every software package on every major Desktop OS requires admin, so AFAIK this can be assumed. There are always exceptions (Putty on Windows, PortableFirefox... DMGs on Apple technically can be installed anywhere because they're portable by design -- they require a drag-and-drop into a folder -- but 99% of the time go to a root-owned location Although in this case we can "have our cake and eat it to". Makeself's can have parameters passed in, so we can absolutely support both.
But if we do support a user-space install, I still vote that it's the non-standard behavior and that a root-style shared installer is priority. This ensures any user of the workstation can share the application and also have his/her P.S. Thanks for feedback. 👍 |
Actually, so as long as we can detect if it's running as root, perhaps we just display a warning if not running as root and support both out of the box. |
21ed554
to
37cc8f1
Compare
System-wide installation is done when running as root. To build the installer, run |
This new version keeps copyright files. This should probably be done with all the installers. |
Can you please explain expand a bit on this requirement? |
See this link. |
I know what fakeroot is, I'm curious as to the specific need. |
I have added a script that fetches the source for bundled libraries in the Linux installer; this takes care of #2937 partly. After building the installer, run
To ease system-wide installation, umask is not restricted on extract. As a side effect, the temporary directory is not restricted and others than root may access it. Root extracts using owner information from the tarball. Therefore, a user that matches the owner could modify the installation files. To prevent this, the tarball is created with root ownership. |
So you've added the complexity of |
Ok I've read up on the owner/ |
The vulnerability could mean arbitrary code run by root. |
Yes, but that umask restriction makes a system-wide installation a bit more complicated, because the files need to get their permissions back. |
You may see that I have disabled the umask restriction. |
Are you sure? I'm still confused. I use |
An installer made with current unreleased |
With the |
Exactly. That's what my other trusty installers do. Let's use that technique instead of |
mv lmms.xml "$MIMEDIR" | ||
if [ "$(which update-mime-database)" ] | ||
then | ||
update-mime-database "$PREFIX"/share/mime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, the update-desktop-database
command will fail to work with makeself unless you temporarily shim in a more permissive umask.
Done. I have added support for |
You may run |
Still no luck. Observations:
Upgrading a bunch of packages, will try again momentarily.
|
Now dangling symlinks are dropped. I guess your |
4906f10
to
da79174
Compare
I thought |
Bundled |
Done. If there are no more comments, I will merge this and start the integration with Travis. |
Great. We already use the Mac-equivalent tool for a similar purpose. Note, I have a 32-bit installer made with Ubuntu 14.04 + Qt5 here: https://github.com/tresf/lmms/releases/download/v1.2.0-makeself/lmms-1.1.90-432a04b-i386-linux-gnu.run I'm going to test this on a few Linux OSs and post my results. |
@jasp00 so I'm doing some portability testing and I'm trying to run the 32-bit installer on a 64-bit OS. I'm not sure if this is recommended or not.
|
Update: I tried the 64-bit installer; It seems to suffer the same launch issues on Fedora Core 22 x64 as the 32-bit installer did. [fedora@localhost ~]$ sudo rm -rf /opt/lmms-1.1.90-432a04b/
[fedora@localhost ~]$ sudo sh lmms-1.1.90-432a04b-x86_64-linux-gnu.run
Verifying archive integrity... All good.
Uncompressing LMMS 100%
Installing to /opt/lmms-1.1.90-432a04b
[fedora@localhost ~]$ /opt/lmms-1.1.90-432a04b/bin/lmms-launcher
This application failed to start because it could not find or load the Qt platform plugin "xcb".
Reinstalling the application may fix this problem.
/opt/lmms-1.1.90-432a04b/bin/lmms-launcher: line 5: 11222 Aborted
(core dumped) "$DIR"/usr/bin/ld.so "$DIR"/usr/bin/lmms "$@"
|
I did that test, it should work. |
I guess Qt 5 is looking under |
I would say this is absolutely worth patching now as AFAIK, the only thing that's broken with Qt5 is VSTs GUI (#2855) so once that issue is resolved, we'd have to patch this anyway (right?) |
I know it's a bit late, but doesn't it make more sense to use AppImage (or maybe flatpak, but that's Wayland only afaik) for this? |
@simonvanderveldt, here's the discussion that preceded this PR: #2556 (comment) |
It will be trivially easy to convert a makeself-based installer to an AppImage. So why not have both. |
Superseded by #3688. If a demand for a dedicated |
@tresf maybe you can try cqtdeployer. this tool can create a exe, run, and zip and deb packages from yur compiled application. |
Thanks for sharing, this tool looks promising. At this time, we've settled upon using |
This allows a Debian-based host to build an installer with
makeself
, runningmake makeself
. It should take up about 29 MiB. This should address #1620 and #2556, in the sense that a Linux binary is provided, not Debian or Ubuntu packages.I have added a script that fetches the source for bundled libraries in the Linux installer; this takes care of #2937 partly. After building the installer, run
make bundled-source
. There is a lot to download.