You are not logged in.

#1 2016-03-09 16:37

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Use q4os installer for .deb file

I would like to package a .deb file and install it using a q4os installer routine, I would need to :-
(I have the deb file(s) already packaged and working via dpkg)

1.)    include the deb file
2.)    install via dpkg
3.)    run apt-get install -f (for dependencies)

I cannot figure out how the installer would do this, or rather, how I should instruct the installer to do it.
I can copy the deb file for local install in Makefile, but cannot figure out how to get it installed on target system. Any help would be appreciated,

Also would it be possible for you to provide one of your installers for me to learn from? preferably with the routines to do what I am trying to achieve here.

Dai

Last edited by Dai_trying (2016-03-09 16:37)

Offline

#2 2016-03-09 17:41

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,222
Website

Re: Use q4os installer for .deb file

You don't need to pre-package your project files into the .deb archive, as 'create_q4app_setup.sh' compiler will take this job and include created .deb into the installer automatically.

If you still want to add a .deb files to be installed together with other project files, create 'extra_debs' subdirectory inside '$TEMPLATES_DIR' and copy desired .deb files into it. Compiler will include them into the installer and it will install them to the target system. Don't forget to set '$SETUP_TYPE' variable.to value "2" for dependencies to be satisfied.

We have attached example Dropbox installer, feel free to compile, modify it and use it as a template.


Attachments:
gz dropbox_installer.tar.gz, Size: 2.2 KiB, Downloads: 1,467

Offline

#3 2016-03-09 17:57

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: Use q4os installer for .deb file

That's great thank you! I hope to create some installers for software not currently available and make them available for everyone and this is just what I need. smile

Offline

#4 2016-03-10 05:36

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

Thanks to Dai_trying, I am now able to build Q4OS Installers.  As a non-programmer "type" I would of never figured out how to do it without Dai's help.

THANK YOU Dai !!!!!!!

You are very appreciated !!

@Q4OS Team - Thank You too !  I appreciate all that you are doing and for creating Q4OS. To me, Q4OS is the Very Best Option for new Linux users and those Windows users who would like to make Jump off of MicroCrap's sinking boat but, who do not want a large learning curve.  We are working to reduce the learning curve for Q4OS and GUI Installs will give Windows Users a "more like Windows" learning environment.


No Longer Using Q4OS

Offline

#5 2016-03-11 08:55

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

First, I want to give many Thanks to both Dai and Q4OS Team for the great help they have given me concerning my odd idea that new users should not have to type commands in  Terminal to use / enjoy Q4OS Linux. I know strange, right ? 

The link below is to a video on my youtube channel showing my custom Q4os "Q4 Automated Installer" (Thanks Dai for helping me get this far !) that installs krecipes-trininty but, you might be thinking "that can be done via the terminal; right ?".  Well, yes and no.  Yes, it can be installed from the terminal and no it does not work on Q4OS as it is missing 2 QTq4 SQLite Plugins. Or the user has to connect to a remote database and most of us (I'm sure) know how much fun that is to setup.

I am by far not an expert at any thing Q4OS so this is all based on my own experience.  With help of course, I learned that (and you will see in the Video) custom images and html webpages can be used in the Q4OS esh installer.  There are so many options in the installer.cfg. I added customer header and splash images and a license html page.

This is just an example of the basic custom changes possible and its not the proper  way to install a deb package that is in the repository as (in this example - krecipes-trinity) won't be updated with newer files from the repository (I was informed this is the case as I don't fully understand package management yet).  As I learn more I will post more.

Once More -- THANK YOU Q4OS TEAM for making this installer available. And, Dai for mods that made it easier to compile images and webpage in to installler (*.esh) file. I could of never got this far without all of your help smile

https://www.youtube.com/watch?v=dOJIewlSLjw

q4-installer.png

Last edited by bobby (2016-03-12 05:10)


No Longer Using Q4OS

Offline

#6 2016-03-11 09:47

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,222
Website

Re: Use q4os installer for .deb file

Great work Bobby.

bobby wrote:

... its not the proper  way to install a deb package that is in the repository as (in this example - krecipes-trinity) won't be updated with newer files from the repository ...

Not correct, it's a proper way, a package will get updates from repositories, as well as other system packages.

We attach an example k3b installer sources we have done for you a few weeks ago, you are welcome to modify it and use it as a template too.


Attachments:
gz k3b-installer.tar.gz, Size: 715 B, Downloads: 1,378

Offline

#7 2016-03-11 16:34

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

@Q4OS Team,   Thank You for correcting me that  your esh installer method does allow for proper updatef installed package and dependencies. Also, Thank you for creating so many variable settings in installer.cfg file to allow us to customize. 

Would you like me to add any disclaimer and/or at least mention on a finish page that for "to obtain Official Q4OS Linux Support" please visit http://distrowatch.com/table.php?distribution=q4os  (OR ?) Let me know and I will add anything you would like in all of my custom work.


As far as me doing Great work,  Dai's mods and helping me is what made it Great as this is much above my level of coding understanding. 
Thank You for the help Dai !

Bobby


No Longer Using Q4OS

Offline

#8 2016-03-11 17:25

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: Use q4os installer for .deb file

You're welcome Bobby, it's nice to be able to help someone achieve (and learn) something. smile

And I've learned a lot myself too along the way.

Last edited by Dai_trying (2016-03-11 17:27)

Offline

#9 2016-03-11 21:06

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

After 2 hours of building a new install and testing, I am still not able to get krecipes-trinity esh installer to create an uninstall menu entry. It works for k3b and gimp.

Here is what I did to test it. installer.cfg / terminal output below.  Your help is appreciated. Thanks, Bobby

1. Setup New Pure Q4OS Install (Q4OS LiveCD v 1.4.7)

2. sudo apt-get update

3. Downloaded and installed latest Q4os-devpack

4. Download above Q4OS Drop box example esh files
    Ran: dash /program_files/q4os-devpack/bin/create_q4app_setup.sh installer.cfg
    both esh & deb were built.
    AND it work WORKED !

5. Duplicated the good install Drop box example and configured it for gimp - AND it Worked !

6. Duplicated the good install Drop box example and configured it for krecipes-trinity - And it FAILED !

Here is installer.cfg I used for krecipes-trinity

Below is the terminal output with some errors

Could it be the (dash) in the package name ?

#***q4os*setup*config*header*do*not*delete*it***#

TEMPLATES_DIR_0="$TEMPLATESDIR0"
TEMPLATES_DIR="setup_templates"
OUT_DIR="../setup_out"

#CHKINSTALL_COMMAND="cp -r filesystem/* /"
CHKINSTALL_COMMAND="echo"
INSTALL_PREFIX="/"
SETUP_TYPE="2"
#SETUP_DESCRIPTION_FILE="app_desc.htm"
#SETUP_DESCRIPTION_FILE_FINISH="dfinish.htm"
#SETUP_PIC_01_FILE="tvr.png"
Q4VER_MIN="1.0"
Q4VER_MAX="2.9999"
CHK_INET="1"
# PREPACK_SH="1"
PK_NAME="q4os-Krecipes-Trinity"
APPNAME_DESC="Krecipes Trinity"
PK_VERS="1.1"
PK_RELEASE="a1"
PK_DEPENDS="libc6, libc6, libtqt3-mt-sqlite, libtqt3-mt-sqlite3, krecipes-trinity"
# APTKEY1_FILE="app_repo_key.pub"
# APPLNK_ENTRY="0"
# DESKTOP_ENTRY="0"
# MENU_ENTRY="0"
# REG_ENTRY="0"
# UNINSTALL_ENTRY="0"
APP_ICON="krecipes"
APP_LINK="krecipes"
# CUSTOMHOOK_PREAPT_R_SCRIPT="1"
PK_MAINTAINER="bobby@q4os.net"
PK_ARCH="all"

# ------------------------------------------------------------------------

#cat > $CFGFILE_DIR/sourced.prepack <<EOF
# cp app.postrm wkdir/DEBIAN/postrm
# rm \$CFGFILE_DIR/sourced.prepack
#EOF

# ------------------------------------------------------------------------

-----------------------

Terminal Output with errors:

~/MyKrecipes-trinityAll/esh-build$ dash /program_files/q4os-devpack/bin/create_q4app_setup.sh installer.cfg
Config file ... OK
cp: cannot stat 'setup_templates/*': No such file or directory
Sudo password ... OK

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.



*****************************************
**** Debian package creation selected ***
*****************************************

*** Warning: The package name "q4os-Krecipes-Trinity" contains upper case
*** Warning: letters. dpkg might not like that so I changed
*** Warning: them to lower case.

This package will be built according to these values:

0 -  Maintainer: [ bobby@q4os.net ]
1 -  Summary: [ q4os-Krecipes-Trinity for Q4OS ]
2 -  Name:    [ q4os-krecipes-trinity ]
3 -  Version: [ 1.1 ]
4 -  Release: [ a1 ]
5 -  License: [ none ]
6 -  Group:   [ none ]
7 -  Architecture: [ all ]
8 -  Source location: [ none ]
9 -  Alternate source location: [  ]
10 - Requires: [ libc6, libc6, libtqt3-mt-sqlite, libtqt3-mt-sqlite3, krecipes-trinity ]
11 - Provides: [ q4os-krecipes-trinity ]
12 - Conflicts: [ none ]
13 - Replaces: [ none ]

Enter a number to change any of them or press ENTER to continue:

Installing with echo...

========================= Installation results ===========================


======================== Installation successful ==========================
cp: cannot stat '//var/tmp/tmp.gszWNMyolf/newfiles.tmp': No such file or directory

Copying files to the temporary directory...OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list... FAILED!

Building Debian package...OK

NOTE: The package will not be installed

Transferring package to /tmp/tmp.YRaDPDgq5z-installbuilder...OK

Erasing temporary files...OK

Deleting temp dir...OK


**********************************************************************

 Done. The new package has been saved to

 /tmp/tmp.YRaDPDgq5z-installbuilder/q4os-krecipes-trinity_1.1-a1_all.deb
 You can install it in your system anytime using:

      dpkg -i q4os-krecipes-trinity_1.1-a1_all.deb

**********************************************************************

dpkg-deb: error: failed to read archive `q4os-Krecipes-Trinity_1.1-a1_all.deb': No such file or directory
dpkg-deb: error: failed to read archive `q4os-Krecipes-Trinity_1.1-a1_all.deb': No such file or directory
dpkg-deb: error: failed to open package info file `wkdir/DEBIAN/control' for reading: No such file or directory
dpkg-scanpackages: info: Wrote 1 entries to output Packages file.
mv: cannot stat '/tmp/tmp.YRaDPDgq5z-installbuilder/q4os-Krecipes-Trinity_1.1-a1_all.deb': No such file or directory
TQSettings::sync: failed to open '/etc/tqt3/tqt_plugins_3.5rc.tmp' for writing

No Longer Using Q4OS

Offline

#10 2016-03-11 21:42

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: Use q4os installer for .deb file

Capital letter in package name

Offline

#11 2016-03-11 22:44

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

Dai_trying wrote:

Capital letter in package name

[SOLVED]

Thanks Dai for suggestion and I should be using lowercase for APP Name (so that was a problem) but, did it possibly cause apt / dpkg to break ? Because it was broken.

I did resolve this issue as it was a broken package dependency - not being processed and not being removed by sudo apt-get autoremove

I should of know when "sudo apt-get autoremove" stopped working there was apt / dpkg issue. (Now I know)

Just so happens that Q4OS Team posted a few days ago a fix for "update won't work" command here:

http://www.q4os.org/forum/viewtopic.php?pid=2877#p2877

So this is how I resolved it:

sudo sh /usr/share/apps/q4os_system/bin/qapt_fix.sh

sudo apt-get install -f

sudo apt-get remove krecipes-trinity

sudo apt-get autoremove  (now working)

sudo apt-get remove libtqt3-mt-sqlite

sudo apt-get remove libtqt3-mt-sqlite3

Now using only lowercase (as I should) for as Dai suggested: PK_NAME="q4os-krecipes-trinity"

I compiled the krecipes-trinity esh installer with this command:

dash /program_files/q4os-devpack/bin/create_q4app_setup.sh installer.cfg
                                               

Menu Button --> Programs --> Krecipies Trinity --> Uninstall   ----> SUCCESS ! 

My question now is, I will build a Simple One page Utility Zenity dialog that will fixed this error for a user. smile

WHAT SHOULD I NAME THIS UTILITY SCRIPT that will run these above commands ?


No Longer Using Q4OS

Offline

#12 2016-03-11 23:06

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: Use q4os installer for .deb file

What I would be asking is, would this happen if a user didn't use the command line? and if packages are installed correctly this wouldn't arise. Having said that automating the use of the q4os fix could be a good idea, maybe use the first installer I created for you and put the paths to the scripts in it, that way you could group all "fix-it" scripts together.

Offline

#13 2016-03-12 03:15

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

No, it happened because I'm an numskull sad


No Longer Using Q4OS

Offline

#14 2016-03-12 05:16

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

Reason for Update: Fixed link for correct video

Link to micro fix GUI app like this ?  (I used your zenity pulse bar in this. Its a lot better than my first try. I can make it better but, I think it will work)

jw]https://www.youtube.com/watch?v=pnBb-Z4YMAgjw

q4-aru.png

Last edited by bobby (2016-03-12 07:44)


No Longer Using Q4OS

Offline

#15 2016-03-12 09:24

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: Use q4os installer for .deb file

I watched your video bobby, and would like you to add an option for user to have a text file that has caught the terminal output ( use >> logfilename.log ) and when the script finishes maybe offer to either send it to devteam for debugging or just view it. And I don't know if you have any error catching in the script to say it actually worked or just completed?

Offline

#16 2016-03-12 16:59

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

@Dai,

No error catching yet or verification apt is working properly yet (have to figure that out). Just an example that I am getting better with  Bash + Zenity GUI at this time but, the Bash script does run 3 terminal commands that fixed my system as mentioned above. I understand enough to include  the log to file function you suggest for each command like this:

Command_1 >> apt_error.log (Create apt_error.log & add command output)

Command_2 > apt_error.log (add command output)

Command_3 > apt_error.log (add command output)

Command_4  connect to my website via FTP --> User ? Do you want to send Error Report to Q4OS Linux Support Team ? --> Append apt_error.log + time/date stamp to 1 single file --> every 7 days send report to Q4OS Team to email as approved. Then display report to user (if so desired) that was sent using  a Zenity Text Info screen displaying both commands used and terminal output including any errors and verification apt issues were resolved. .

I am months out before having any fully functional and tested solutions like this as I would need others to try them and get valuable feedback just like yours.

Thanks,

Bobby


No Longer Using Q4OS

Offline

#17 2016-03-12 17:12

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: Use q4os installer for .deb file

You have mixed up your > with >> single creates/overwrites the file double appends to file.
Not sure why you would connect to your site at this stage, simply offer the file to the user for either mailing to dev team or examining themselves.

Offline

#18 2016-03-12 17:29

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

Well, i did not want spammers to find out about this and spam Q4OS Team and I get blamed for it. It also allows me to see the results and I may want to manually combine other log files together and email those as well.

We live in an evil world and people do abuse good things. Just trying to prevent any problems.

Yes, I mixed up > and >> (coding is a blur for my mind but, I work out my own deficiencies smile

Thanks,

Bobby


No Longer Using Q4OS

Offline

#19 2016-03-12 17:44

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: Use q4os installer for .deb file

I don't think you should be sending the information anywhere without the users consent, after all it may contain sensitive information! I'm sure even windows users can attach a file to an email. Keep it simple and contained to the users system if you can, I for one would not use your script if it was making erroneous connections to any website. I have a tcp connection monitor section in my conky to notify me of tcp connections made, and any programs making connections will usually be uninstalled and blacklisted by me.

Offline

#20 2016-03-12 23:14

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

cc,

And what wrong impression are you talking about ?

I am only trying to make Q4OS terminal commands easier for Windows users new to Linux. Only people who don't want to run terminal commands will use my GUI scripts.

I have said it here before and told from many people who have used Linux for a long time, "users have no business in the terminal if they don't understand the commands". Well, they don't have to understand commands with my GUI Scripts and that will leave them extra time enjoying Q4OS usability and all its greatness. Or, they can continue on like all of us have in the past and spend literally 1,000s of hours searching for a solution between the flaming wars on most Linux websites.

One of the main reasons Windows users will not switch to Linux "Q4OS" included is its not windows !  its not Click & Install !  Its not Click & Fix ! Well, I'm am trying to fix that problem.

Bobby


No Longer Using Q4OS

Offline

#21 2016-03-13 03:12

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

cc,

Thanks for clarification. I agree with you that a lot of previous windows users are using Q4OS without issues. However, for those who want to step out of that "comfort" and have more to do more to enjoy more to learn more to be more like Windows without using the Terminal "DOS BOX", that's what I am working on to help those who will never use the terminal and consequently "never use Q4OS". I firmly believe that if Q4OS is the only version of Linux that has been bridged (even if its done at the micro level of one problem = needs one solution scripts) where Windows users never have to go in to the Terminal, watch the flood of users switch. And for those who don't believe, watch - lets see - give it a chance - and my real name is on all of my work so its going to be trustworthy.

Bobby


No Longer Using Q4OS

Offline

#22 2016-03-13 03:32

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

cc,

That's great to hear.

Have these business networked all computers with printing as to replace Windows altogether or is it mainly workstation use ?

I was thinking of doing dual boots for some businesses with printing and networked storage devices.  As users change from workstation to workstation they can pick either Windows or Q4OS. Or is this a bad idea ?

Bobby


No Longer Using Q4OS

Offline

#23 2016-03-13 04:53

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Use q4os installer for .deb file

cc,

Thanks for the info.


No Longer Using Q4OS

Offline

Board footer

Powered by FluxBB