|
Post by Stefan Pendl on Mar 9, 2019 2:50:22 GMT -5
Would it be possible to add a small shell script to check the dependencies of LB5? The final installer will do this, but for the alpha testing it would be handy to just have a way to check dependencies manually. sh ./check_dependencies.sh Can anyone share an example of checking the following packages? - 32-bit support on 64-bit systems
- sqlite support
Thanks in advance.
|
|
|
Post by donnybowers on Mar 9, 2019 6:31:20 GMT -5
I don't know how to check dependencies from a bash script. But here's an easy way to check the architecture on an Ubuntu machine for someone who isn't sure what they've got. At the command line type: arch the result on my machine is: x86_64 And Here is a simple bash file that could be used to install 32 bit compatibility libraries on Ubuntu (64 bit):
32_bit_dep.sh
#!/bin/bash sudo dpkg --add-architecture i386 sudo apt update sudo apt install libc6:i386 libx11-6:i386 zlib1g:i386
This is probably not what you're looking for, but it might help someone just starting out with Linux.
|
|
|
Post by Stefan Pendl on Mar 10, 2019 2:31:14 GMT -5
On my Linux Mint system there was nothing needed to do, so that is really targeted to users migrating from Windows. On my Debian system, I needed to execute the lines above to make things work, so this is the bare minimum to allow the pre-release builds of LB5 to work on any system. Most Linux distributions are now installed automatically as 64-bit O/S, if they detect a 64-bit CPU. To add SQLite support the following would be needed:
sudo apt install libsqlite3-0:i386
So the final shell script would look like:
#!/bin/bash sudo dpkg --add-architecture i386 sudo apt update sudo apt install libc6:i386 libx11-6:i386 zlib1g:i386 libsqlite3-0:i386
|
|
|
Post by Chris Iverson on Mar 18, 2019 14:02:54 GMT -5
If anyone's interested, I've now successfully been able to create .DEB packages out of the LB5 alpha files. It installs to /opt/lb5-alpha, and it places a launcher script, lb5alpha, in /usr/bin.
I've built them successfully for i386 and armhf(RPi), though I still need to test the Pi one.
More importantly, I've also flagged those four libraries as dependencies in the .DEB package, so it will give a warning if you try to install the package with dpkg or apt with missing libraries. If you install it with apt install -f <file>, apt will auto-install the dependencies.
On 64-bit amd64 Ubuntu, you still need to add i386 as an installable architecture, but once you have, running apt install -f on the deb file should take care of all dependencies.
I'm planning on testing it on the Pi today, as I have a few I want to test on. (I mainly did this to make it easy to push updated packages to the different Pis I have.)
|
|
|
Post by metro on Mar 18, 2019 19:55:36 GMT -5
If anyone's interested, I've now successfully been able to create .DEB packages out of the LB5 alpha files. It installs to /opt/lb5-alpha, and it places a launcher script, lb5alpha, in /usr/bin. I've built them successfully for i386 and armhf(RPi), though I still need to test the Pi one. More importantly, I've also flagged those four libraries as dependencies in the .DEB package, so it will give a warning if you try to install the package with dpkg or apt with missing libraries. If you install it with apt install -f <file>, apt will auto-install the dependencies. On 64-bit amd64 Ubuntu, you still need to add i386 as an installable architecture, but once you have, running apt install -f on the deb file should take care of all dependencies. I'm planning on testing it on the Pi today, as I have a few I want to test on. (I mainly did this to make it easy to push updated packages to the different Pis I have.) Hi Chris, I'm keen to look at the.DEB package
thanks
|
|
|
Post by Chris Iverson on Mar 18, 2019 21:37:44 GMT -5
Here we go, packages for both 347 and 348(if you're curious if upgrades work). Packages with armhf in the name are for the Pi, i386 for standard PCs. chrisiverson.net/lb5-alpha/lb5-alpha_0.5.347_armhf.debchrisiverson.net/lb5-alpha/lb5-alpha_0.5.347_i386.debchrisiverson.net/lb5-alpha/lb5-alpha_0.5.348_armhf.debchrisiverson.net/lb5-alpha/lb5-alpha_0.5.348_i386.debDownloading the package and installing it with APT should get everything set up. wget https://chrisiverson.net/lb5-alpha/lb5-alpha_0.5.348_<ARCHITECTURE>.deb sudo apt install ./lb5-alpha_0.5.348_<ARCHITECTURE>.deb The ./ is necessary because it needs to know that you're giving a path to a DEB file, instead of the name of a package to install from the repository. Again, all files get put into /opt/lb5-alpha, with the exception of a launcher script, lb5alpha, that gets put into /usr/bin, so it can be launched from anywhere. If you want to uninstall, the actual package name is "lb5-alpha". sudo apt remove lb5-alpha Also, if any of the dependent libraries were installed by APT as part of installing lb5-alpha(that is, they got installed at the same time when you ran apt install), and if you have nothing else that depends on them, APT may suggest/recommend their removal.
|
|
|
Post by metro on Mar 19, 2019 5:21:48 GMT -5
Thanks Chris.
|
|
|
Post by Chris Iverson on Mar 25, 2019 17:16:50 GMT -5
...And now, just to figure out how repos work, I've created a custom APT repository for it. I've confirmed it works on Ubuntu, and will try it on my Pi later.
If you want to use it, first, add the following line to /etc/apt/sources.list(or add it in a new *.list file in /etc/apt/sources.list.d/):
deb https://chrisiverson.net/lb5-alpha/repo dev main
Next, you'll need to add my GPG key to APT's list of trusted keys.
Get the key from my keybase.io account, and import it to APT:
wget https://keybase.io/iversc/pgp_keys.asc sudo apt-key add pgp_keys.asc
Then, update APT and try to install lb5-alpha.
sudo apt update sudo apt install lb5-alpha
I've got both 347 and 348 listed in the repo, so both will show up and can be chosen between in a manager like aptitude, or by using = to explicitly set a version.
sudo apt install lb5-alpha=0.5.347
This will override the latest version, and install build 347. This will downgrade lb5-alpha if you already have the 348 package installed.
EDIT: And I've now tested it on Pi with success. Additionally, I tested it on a near-clean install of Ubuntu 18.04, without even i386 architecture added to it. The following exact set of commands on Ubuntu 18.04:
sudo dpkg --add-architecture i386 wget -O - https://keybase.io/iversc/pgp_keys.asc | sudo apt-key add - sudo add-apt-repository "deb https://chrisiverson.net/lb5-alpha/repo dev main" sudo apt install lb5-alpha
Successfully downloaded and installed LB5, along with all dependencies.
|
|
|
Post by metro on Mar 26, 2019 3:36:45 GMT -5
Great job Chris, I'll try this out with my Pi in a day or two.
|
|
|
Post by metro on Apr 17, 2019 6:46:26 GMT -5
wget https://chrisiverson.net/lb5-alpha/lb5-alpha_0.5.348_<ARCHITECTURE>.deb sudo apt install ./lb5-alpha_0.5.348_<ARCHITECTURE>.deb If you want to uninstall, the actual package name is "lb5-alpha". sudo apt remove lb5-alpha Also, if any of the dependent libraries were installed by APT as part of installing lb5-alpha(that is, they got installed at the same time when you ran apt install), and if you have nothing else that depends on them, APT may suggest/recommend their removal. Hi Chris, are you still serving these up. I get a 404 error from my Pi B (rev2.1 UK) or is it just the repo I should use
|
|
|
Post by Chris Iverson on Apr 17, 2019 8:15:03 GMT -5
|
|
|
Post by metro on Apr 17, 2019 8:49:01 GMT -5
Thanks Chris It's late down here I'll tackle it tomorrow
|
|
|
Post by Stefan Pendl on Apr 6, 2021 9:24:02 GMT -5
Chris Iverson would you mind changing the repository contents to have the files inside the bas_files folder to be writable by anyone? Currently only the root user and group are allowed to change the files. Also the LB5 INI, callers.db and error.log file need to be writable by anyone.
|
|
|
Post by Chris Iverson on Apr 6, 2021 11:48:41 GMT -5
That's weird, I thought I had done that. Maybe I missed something packaging the last one.
I'll take a look.
|
|
|
Post by Chris Iverson on Apr 6, 2021 22:17:33 GMT -5
Ah, no wait, I didn't make a mistake on the example source code.
I can change the permissions on the INI, callers.db, and error.log file to be world-writable, since they should be, but the demo source code requires a different choice, and possibly rethinking the packaging structure.
The problem is, the demo source code is "upgraded" as part of the package, meaning that, when you run an upgrade, any files there will be overwritten by the corresponding files in the new version.
For example, if you edit bas_files/test_byref.bas, and upgrade, the upgrade's version of test_byref.bas will overwrite the one you made edits to.
EXTRA files won't change, so if you create a new file in bas_files, it won't be affected, UNLESS the new version of the package has a file by the same name. Additionally, when uninstalling the lb5-alpha package, any extra files will be left in place, and the folders up through bas_files will not be deleted.
You actually get a specific warning from APT about that:
chris@shinoko:~$ sudo apt remove lb5-alpha Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: lb5-alpha 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 57.3 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 312040 files and directories currently installed.) Removing lb5-alpha (0.5.352) ... dpkg: warning: while removing lb5-alpha, directory '/opt/lb5-alpha/bas_files' not empty so not removed
You can test this yourself; all previous versions of the alpha are available in the repo, so you can downgrade by specifying a previous version. (Though you can't downgrade the 64-bit version past 351, for obvious reasons.)
sudo apt install lb5-alpha=0.5.351
This will install the previous build.
Once it's installed, go edit one of the example files.
Then, run install again to upgrade.
sudo apt install lb5-alpha
Check the example file you edited, and you'll see it's been reset.
|
|