UPDATER How it works & How to use it.

Technical issues/questions of an intermediate or advanced nature.
Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

UPDATER How it works & How to use it.

Post#1 by Bogomips » 09 May 2016, 12:43

brokenman wrote:For this updater if you copy the wps-office source file into /tmp it will use it and not download it again. To do this you can either download it from the website or sit ready in another terminal while the script downloads it, and when it's done copy it out from /tmp/.wps.$$
Anyone used it yet?
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: UPDATER How it works & How to use it.

Post#2 by Bogomips » 13 May 2016, 00:53

UPDATE-FLASH

Slight white out issue resulting in wipe out. :shock:
Image
  • At start of play

    Code: Select all

    guest@porteus:~$ ls /mnt/live/memory/images/
    000-kernel.xzm/    flashplayer-plugin-11.2.202.577-i386-1alien.xzm/
    001-core.xzm/      geany-1.25-i486-bundle.xzm/
    002-xorg.xzm/      gecko-mediaplayer-1.0.9.i686-pkg-1.xzm/
    003-cinnamon.xzm/  qtl.xzm/
    
  • Update
    • Code: Select all

      root@porteus:/home/guest# set -x
      root@porteus:/home/guest# update-flash
      + update-flash
      [OK] User is root
      [OK] Distro is Porteus
      [OK] Flash is installed
      
      [OK] Internet connection exists
      Downloading live script ...
      Downloading: update-flash-live  DONE
      Verifying archive integrity...  100%   All good.
      Uncompressing Porteus browser updater  100%  
      
      Searching online for latest flash player version ...
      
      Installed version:      11.2.202.577
      Latest version:         11.2.202.621
      
    • Code: Select all

      Removing package /var/log/packages/flashplayer-plugin-11.2.202.577-i386-1alien...
      Removing files:
        --> Deleting symlink /usr/share/pixmaps/flash-player-properties.png
        --> Deleting /usr/bin/flash-player-properties
        --> Deleting /usr/doc/flashplayer-plugin-11.2.202.577/LGPL/LGPL.txt
        --> Deleting /usr/doc/flashplayer-plugin-11.2.202.577/LGPL/notice.txt
        --> Deleting /usr/doc/flashplayer-plugin-11.2.202.577/flashplayer-plugin.SlackBuild
        --> Deleting /usr/doc/flashplayer-plugin-11.2.202.577/readme.txt
        --> Deleting /usr/lib/kde4/kcm_adobe_flash_player.so
        --> Deleting /usr/lib/mozilla/plugins/libflashplayer.so
      WARNING: /usr/share/applications/flash-player-properties.desktop changed after package installation.
        --> Deleting /usr/share/applications/flash-player-properties.desktop
        --> Deleting /usr/share/icons/hicolor/16x16/apps/flash-player-properties.png
        --> Deleting /usr/share/icons/hicolor/22x22/apps/flash-player-properties.png
        --> Deleting /usr/share/icons/hicolor/24x24/apps/flash-player-properties.png
        --> Deleting /usr/share/icons/hicolor/32x32/apps/flash-player-properties.png
        --> Deleting /usr/share/icons/hicolor/48x48/apps/flash-player-properties.png
        --> Deleting /usr/share/kde4/services/kcm_adobe_flash_player.desktop
        --> Deleting empty directory /usr/share/kde4/services/
        --> Deleting empty directory /usr/share/kde4/
        --> Deleting empty directory /usr/lib/kde4/
        --> Deleting empty directory /usr/doc/flashplayer-plugin-11.2.202.577/LGPL/
        --> Deleting empty directory /usr/doc/flashplayer-plugin-11.2.202.577/
      
    • Code: Select all

      Downloading: install_flash_player_11_linux.i386.tar.gz  DONE
      libflashplayer.so
      ...
      install/slack-desc
      install/doinst.sh
      
      Restoring permissions of /tmp/.flash_updater.2277/build to chmod 700
      
      Slackware package /tmp/flashplayer-plugin-11.2.202.621-i586-1.txz created.
      
  • New Files

    Code: Select all

    guest@porteus:~$ sudo mount p10/Por/tmp/flashplayer-plugin-11.2.202.621-i586-1.xzm x
    guest@porteus:~$ ls x
    usr/  var/ 
    guest@porteus:~$ tree x/usr/
    x/usr/
    |-- bin
    |   `-- flash-player-properties
    |-- lib
    |   |-- kde4
    |   |   `-- kcm_adobe_flash_player.so
    |   `-- mozilla [error opening dir]
    `-- share
        |-- applications
        |   `-- flash-player-properties.desktop
        |-- icons
        |   `-- hicolor
        |       |-- 16x16
        |       |   `-- apps
        |       |       `-- flash-player-properties.png
        |       |-- 22x22
        |       |   `-- apps
        |       |       `-- flash-player-properties.png
        |       |-- 24x24
        |       |   `-- apps
        |       |       `-- flash-player-properties.png
        |       |-- 32x32
        |       |   `-- apps
        |       |       `-- flash-player-properties.png
        |       `-- 48x48
        |           `-- apps
        |               `-- flash-player-properties.png
        |-- kde4
        |   `-- services
        |       `-- kcm_adobe_flash_player.desktop
        `-- pixmaps
            `-- flash-player-properties.png -> ../icons/hicolor/48x48/apps/flash-player-properties.png                                                                    
    
    21 directories, 10 files
    
  • Files of Interest

    Code: Select all

    guest@porteus:~$ ls -lh x/usr/bin/flash-player-properties 
    -rwxrwxr-x 1 guest 1000 437K Apr 26 23:18 x/usr/bin/flash-player-properties*
    
    guest@porteus:~$ ls -lh x/usr/lib/kde4/kcm_adobe_flash_player.so 
    -rwxr-xr-x 1 guest 1000 458K Apr 26 23:18 x/usr/lib/kde4/kcm_adobe_flash_player.so*                           
    
    guest@porteus:~$ sudo ls -lh x/usr/lib/mozilla/plugins/libflashplayer.so
    -rwxr-xr-x 1 guest 1000 17M Apr 26 23:18 x/usr/lib/mozilla/plugins/libflashplayer.so
  • Activation of Flash

    Code: Select all

    root@porteus:/home/guest# activate p10/Por/tmp/flashplayer-plugin-11.2.202.621-i586-1.xzm 
    + activate p10/Por/tmp/flashplayer-plugin-11.2.202.621-i586-1.xzm
    xdg-desktop-menu: file '/usr/share/applications/flash-player-properties.desktop' does not exist
    xdg-desktop-menu: file '/usr/share/applications/kcm_adobe_flash_player.desktop' does not exist
    Updating shared library links:  /sbin/ldconfig
    
    uest@porteus:~$ ls /mnt/live/memory/images/
    000-kernel.xzm/
    001-core.xzm/
    002-xorg.xzm/
    003-cinnamon.xzm/
    flashplayer-plugin-11.2.202.577-i386-1alien.xzm/
    flashplayer-plugin-11.2.202.621-i586-1.xzm/
    geany-1.25-i486-bundle.xzm/
    gecko-mediaplayer-1.0.9.i686-pkg-1.xzm/
    qtl.xzm/
  • Files of Interest

    Code: Select all

    guest@porteus:~$ ls -lh /usr/bin/flash-player-properties 
    /bin/ls: cannot access '/usr/bin/flash-player-properties': No such file or directory
    guest@porteus:~$ ls -lh /usr/lib/kde4/kcm_adobe_flash_player.so 
    /bin/ls: cannot access '/usr/lib/kde4/kcm_adobe_flash_player.so': No such file or directory
    guest@porteus:~$ ls -lh /usr/lib/mozilla/plugins/libflashplayer.so
    /bin/ls: cannot access '/usr/lib/mozilla/plugins/libflashplayer.so': Permission denied
    guest@porteus:~$ sudo ls -lh /usr/lib/mozilla/plugins/libflashplayer.so
    ls: cannot access '/usr/lib/mozilla/plugins/libflashplayer.so': No such file or directory
    
    Presumably lost under whiteout.
At the first update attempt, flash was paused while playing a video. After the update flash just played on from where video was paused, which did seem a bit suspicious. Play continued to the end of video without problem. Leaves one to surmise that files of new version only required upon flash activation.

At the second documentary invocation of Update following reboot, flash had not been activated. (Flash is always set to Ask to Activate). To play a video required to click on Allow Activation. After clicking this nothing happened, which was when wipeout discovered.


Remedy is either to reboot or deactivate flash before attempting update. The script could do this by checking for flash activation and then

Code: Select all

read p q < <(ps x | grep libflashplayer.so)
kill $p
followed by deactivation.

Upon reboot with activation of updated flash module, found all plugins wiped out! Despite

Code: Select all

guest@porteus:~$ ls /mnt/live/memory/images/
000-kernel.xzm/    flashplayer-plugin-11.2.202.621-i586-1.xzm/
001-core.xzm/      geany-1.25-i486-bundle.xzm/                                     
002-xorg.xzm/      gecko-mediaplayer-1.0.9.i686-pkg-1.xzm/                         
003-cinnamon.xzm/  qtl.xzm/ 
                                                      
guest@porteus:~$ sudo ls -lh /usr/lib/mozilla/plugins/
total 18M                                                                          
-rwxr-xr-x 1 guest 1000 115K May 27  2014 gecko-mediaplayer-dvx.so                 
-rwxr-xr-x 1 guest 1000 115K May 27  2014 gecko-mediaplayer-qt.so                  
-rwxr-xr-x 1 guest 1000 115K May 27  2014 gecko-mediaplayer-rm.so                  
-rwxr-xr-x 1 guest 1000 115K May 27  2014 gecko-mediaplayer-wmp.so                 
-rwxr-xr-x 1 guest 1000 115K May 27  2014 gecko-mediaplayer.so                     
-rwxr-xr-x 1 guest 1000  17M Apr 26 23:18 libflashplayer.so                        
All plugins lost to browser.

So far not been able to find cause of this. Rebooting with previous flash module remedies the situation.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: UPDATER How it works & How to use it.

Post#3 by brokenman » 13 May 2016, 02:11

Firstly thanks for the way you approach trouble shooting. Everyone should take a look how it's done. It makes my work much easier.

I guess I never thought about fringe user case scenarios such as updating flash mid way through using it. I will look at adding a function to kill it and remove any modules/packages installed before updating. Thanks.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: UPDATER How it works & How to use it.

Post#4 by Ed_P » 13 May 2016, 04:47

Bogomips wrote:[The script could do this by checking for flash activation and then

Code: Select all

read p q < <(ps x | grep libflashplayer.so)
kill $p
followed by deactivation.
:unknown:
How does this script indicate flash is active?? What am I missing?

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# ps x
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:01 init [4]   
    :
    :
    :
 2803 ?        Ss     0:00 gpm -m /dev/mouse -t ps2
 2805 ?        S      0:00 /usr/sbin/avahi-dnsconfd -D
 2817 ?        Ss     0:00 crond -l notice
 2863 ?        Ssl    0:00 /usr/sbin/NetworkManager
 2865 ?        S<     0:00 [ipv6_addrconf]
 2868 ?        Sl     0:00 /usr/libexec/polkitd --no-debug
 2870 ?        Ss     0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
 2877 ?        Sl     0:00 /usr/sbin/ModemManager
 2879 ?        Ss     0:00 /usr/sbin/wpa_supplicant -B -u -f /var/log/wpa_supplican
 2886 ?        S      0:00 /sbin/dhcpcd -B -K -L -G -c /usr/libexec/nm-dhcp-client.
 2906 ?        Sl     0:00 /usr/sbin/console-kit-daemon --no-daemon
 3114 ?        Sl     0:00 /usr/libexec/upowerd
 3269 ?        S      0:00 [kworker/1:1]
 3305 pts/0    S      0:00 bash
 3310 pts/0    R+     0:00 ps x
root@porteus:/home/guest# ps x | grep libflashplayer.so
 3314 pts/0    S+     0:00 grep libflashplayer.so
root@porteus:/home/guest# read p q < <(ps x | grep libflashplayer.so)
root@porteus:/home/guest# echo $p
3317
root@porteus:/home/guest# 
I have the flash module in my modules folder and Firefox is active and displaying a flash module in another tab.
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: UPDATER How it works & How to use it.

Post#5 by brokenman » 13 May 2016, 16:52

ps x | grep libflashplayer.so
You searched the active processes and found libflashplayer.so being used.

root@porteus:/home/guest# echo $p
3317

You got the process ID of the active libflashplayer.so
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: UPDATER How it works & How to use it.

Post#6 by Ed_P » 13 May 2016, 18:48

brokenman wrote:You got the process ID of the active libflashplayer.so
That ID appears to be that of the echo or read commands. Firefox and flash were opened prior to those commands and should have numbers lower than 3300 imo.

Code: Select all

guest@porteus:~$ ps x | grep firefox
 7675 ?        Sl    33:37 /usr/bin/firefox
 9852 pts/0    S+     0:00 grep firefox
guest@porteus:~$ ps x | grep flash
 9854 pts/0    S+     0:00 grep flash
guest@porteus:~$ ps x | grep flash
 9865 ?        Sl     0:02 /usr/lib64/firefox-38esr/plugin-container /usr/lib64/mozilla/plugins/libflashplayer.so -greomni /usr/lib64/firefox-38esr/omni.ja -appomni /usr/lib64/firefox-38esr/browser/omni.ja -appdir /usr/lib64/firefox-38esr/browser 7675 true plugin
 9882 pts/0    S+     0:00 grep flash
guest@porteus:~$ ps x | grep libflashplayer.so
 9865 ?        Sl     0:07 /usr/lib64/firefox-38esr/plugin-container /usr/lib64/mozilla/plugins/libflashplayer.so -greomni /usr/lib64/firefox-38esr/omni.ja -appomni /usr/lib64/firefox-38esr/browser/omni.ja -appdir /usr/lib64/firefox-38esr/browser 7675 true plugin
 9894 pts/0    S+     0:00 grep libflashplayer.so
guest@porteus:~$ read p q < <(ps x | grep libflashplayer.so)
guest@porteus:~$ echo $p
9865
guest@porteus:~$ 
:shock:

I give up.

Thanks brokenman.
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: UPDATER How it works & How to use it.

Post#7 by Bogomips » 13 May 2016, 19:51

^ @ Ed_P

Test if Activated
  • Flash Module

    Code: Select all

    guest@porteus:~$ f=$(ls -1 /mnt/live/memory/images | grep flashplayer-plugin)   
    guest@porteus:~$ echo $f
    flashplayer-plugin-11.2.202.577-i386-1alien.xzm/
    guest@porteus:~$ echo ${f%?}
    flashplayer-plugin-11.2.202.577-i386-1alien.xzm
    
    guest@porteus:~$ if [[ ${f%?} ]]; then echo deavctivate ${f%?}; fi
    deavctivate flashplayer-plugin-11.2.202.577-i386-1alien.xzm
    
  • Program
    • Non-Active

      Code: Select all

      guest@porteus:~$  ps x | grep libflashplayer.so
       1652 pts/1    S+     0:00 grep libflashplayer.so
      guest@porteus:~$ read p q < <(ps x | grep libflashplayer.so)
      guest@porteus:~$ echo $p
      1655
      guest@porteus:~$ echo $q
      pts/1 S+ 0:00 grep libflashplayer.so
      
      # Need following
      
      guest@porteus:~$ read p q < <(ps x | grep libflashplayer.so | grep -v grep)
      guest@porteus:~$ echo $p
      
      guest@porteus:~$ echo $q
      
      guest@porteus:~$ [[ $p ]] && kill $p
      
      Thanks for pointing this out. It appears that the grep process has been started a bit after the ps process, and so gets to be listed by it.
    • Active

      Code: Select all

      guest@porteus:~$ ps x | grep libflashplayer.so 
       1772 ?        Sl    18:58 /opt/palemoon/plugin-container /usr/lib/mozilla/plugins/libflashplayer.so -greomni /opt/palemoon/omni.ja -appomni /opt/palemoon/browser/omni.ja -appdir /opt/palemoon/browser 1451 plugin
       2019 pts/1    S+     0:00 grep libflashplayer.so
      
      # grep process always later than flash process
      # Following then works:
      
      guest@porteus:~$ read p q < <(ps x | grep libflashplayer.so)
      guest@porteus:~$ echo $p
      1772
      guest@porteus:~$ echo $q
      ? Sl 18:53 /opt/palemoon/plugin-container /usr/lib/mozilla/plugins/libflashplayer.so -greomni /opt/palemoon/omni.ja -appomni /opt/palemoon/browser/omni.ja -appdir /opt/palemoon/browser 1451 plugin
      
      # Following should work in any case. (flash program active or not)
      
      guest@porteus:~$ read p q < <(ps x | grep libflashplayer.so | grep -v grep)
      guest@porteus:~$ echo $p
      1772
      guest@porteus:~$ echo $q
      ? Sl 18:46 /opt/palemoon/plugin-container /usr/lib/mozilla/plugins/libflashplayer.so -greomni /opt/palemoon/omni.ja -appomni /opt/palemoon/browser/omni.ja -appdir /opt/palemoon/browser 1451 plugin
      
      guest@porteus:~$ [[ $p ]] && kill $p
      
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: UPDATER How it works & How to use it.

Post#8 by Ed_P » 14 May 2016, 02:10

Wow!! :shock:

You're amazing Bogomips.

So many nuances I've never seen before. Or know what they mean. :D

Thanks for taking the time. :beer:
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: UPDATER How it works & How to use it.

Post#9 by brokenman » 15 May 2016, 17:34

It appears that the grep process has been started a bit after the ps process, and so gets to be listed by it.
pgrep is a much better alternative.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: UPDATER How it works & How to use it.

Post#10 by Ed_P » 15 May 2016, 17:54

BTW How does this work?

Code: Select all

[[ $p ]] 
I suspect it means if $p is not blank to then proceed.

The other nuance that I don't understand deals with removing the / and the end of the file's name. [[ ${f%?} ]] How the heck does that work?
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: UPDATER How it works & How to use it.

Post#11 by Bogomips » 15 May 2016, 18:44

The running pgrep or pkill process will never report itself as a match.
The process name used for matching is limited to the 15 characters present in the output of /proc/pid/stat. Use the −f option to match against the complete command line, /proc/pid/cmdline.

Code: Select all

guest@porteus:~$ pgrep -flu guest libflashplayer.so                                
1603 plugin-containe                                                               
guest@porteus:~$ pgrep -fu guest libflashplayer.so
1603

guest@porteus:~$ p=$(pgrep -fu guest libflashplayer.so)
guest@porteus:~$ echo $p
1603
There are just so many greps, so let's see what we can have:

Code: Select all

guest@porteus:~$ compgen -c | egrep 'grep$' | sort -u
bzgrep
egrep
fgrep
grep
lzegrep
lzfgrep
lzgrep
pcregrep
pgrep
ptargrep
xzegrep
xzfgrep
xzgrep
zegrep
zfgrep
zgrep
zipgrep
Ed_P wrote:BTW How does this work?

Code: Select all

[[ $p ]] 
I suspect it means if $p is not blank to then proceed.
If not null, result is true
Ed_P wrote:The other nuance that I don't understand deals with removing the / and the end of the file's name. [[ ${f%?} ]] How the heck does that work?

Code: Select all

guest@porteus:~$ f=movie.mp4
guest@porteus:~$ echo ${f%???}   # Remove from the right 3 characters
movie.
guest@porteus:~$ echo ${f%???}flv                                    
movie.flv
Last edited by Bogomips on 16 May 2016, 14:50, edited 1 time in total.
Reason: grep sort
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: UPDATER How it works & How to use it.

Post#12 by Ed_P » 16 May 2016, 19:01

Thank you Bogomips.

I have never seen the ${f%?} option before. To remove a character at the end of a string I use ${f: -1}.
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

update-opera issue

Post#13 by Bogomips » 30 Jun 2016, 19:36

  • update-opera

    Code: Select all

    root@porteus:/home/guest# update-opera
     Starting checks ... 
    [OK] User is root.
    [OK] Distro is Porteus
    [OK] ar command found
    [OK] libbfd was found
    [OK] libbfd was found
    [ERROR] opera is not currently installed
    Downloading live script ...
    Downloading: update-opera-live  DONE
    Verifying archive integrity...  100%   All good.
    Uncompressing Porteus browser updater  100%  
     Checking if opera is installed ... 
    
    Please choose a release from the menu.
    Stable is recommended.
    
    1) opera
    2) stable
    3) beta
    4) developer
    #? 1
     opera locale chosen 
    
    Downloading: opera  DONE
    
    The current version is: 12.16.1860
     Would you like to continue? [y/n]
    __________________________________
    
     Choose a language from the list. 
     The others will be removed from the package. 
    
     1) af	    11) en-GB	21) he	    31) lv	41) pt-PT   51) tr
     2) az	    12) en-US	22) hi	    32) me	42) ro	    52) uk
    ...
     en-GB locale chosen 
    
  • Error Messages:

    Code: Select all

    Downloading: opera_12.16.1860_i386.deb  DONE
    x - debian-binary
    x - control.tar.gz
    x - data.tar.lzma
    tar: data.tar.xz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    sed: can't read usr/share/applications/opera.desktop: No such file or directory
    cp: cannot stat 'usr/share/applications/opera.desktop': No such file or directory
    ./update-opera-live: line 165: usr/share/applications/browser.desktop: No such file or directory
    ./update-opera-live: line 166: usr/share/applications/browser.desktop: No such file or directory
    sed: can't read usr/share/applications/browser.desktop: No such file or directory
    chmod: cannot access 'usr/lib/i386-linux-gnu/opera/opera_sandbox': No such file or directory
    ln: failed to create symbolic link 'usr/bin/opera': No such file or directory
    find: `usr': No such file or directory
    find: `usr/': No such file or directory
    find: `/localization': No such file or directory
    
  • Creating erroneous package

    Code: Select all

    Slackware package maker, version 3.141593.
    Searching for symbolic links:
    ...
    ./
    data.tar.lzma
    install/
    install/slack-desc
    install/doinst.sh
    Restoring permissions of /tmp/opera.1969/build to chmod 700
    Slackware package /tmp/opera-12.16.1860-i586-1.txz created.
    
  • Package & Contents

    Code: Select all

    guest@porteus:~$ ls -lh /tmp/opera-12.16.1860-i586-1.txz 
    -rw-r--r-- 1 root root 13M Jun 30 12:50 /tmp/opera-12.16.1860-i586-1.txz
    
    guest@porteus:~$ less /tmp/opera-12.16.1860-i586-1.txz
    drwxr-xr-x root/root         0 2016-06-30 12:50 ./
    -rw-r--r-- root/root  13045684 2016-06-30 12:50 data.tar.lzma
    drwx------ root/root         0 2016-06-30 12:50 install/
    -rw------- root/root       908 2016-06-30 12:50 install/slack-desc
    -rw------- root/root       432 2016-06-30 12:50 install/doinst.sh
    
  • Resultant Module

    Code: Select all

    guest@porteus:~$ txz2xzm /tmp/opera-12.16.1860-i586-1.txz 
    glibtop(c=2126): [DEBUG] open.c:53 glibtop_open_l(): SIZEOF: 40 - 65648 - 248 - 65624 - 224 - 65624
    glibtop(c=2126): [DEBUG] open.c:163 glibtop_open_l(): Calling sysdeps open function.
    glibtop(c=2126): [DEBUG] init.c:229 glibtop_init_s(): init_s with features=0x7ffffff and flags=0
    Verifying package opera-12.16.1860-i586-1.txz.
    Installing package opera-12.16.1860-i586-1.txz:
    PACKAGE DESCRIPTION:
    Executing install script for opera-12.16.1860-i586-1.txz.
    Package opera-12.16.1860-i586-1.txz installed.
    Creating /tmp/opera-12.16.1860-i586-1.xzm
    
    guest@porteus:~$ lsxzm /tmp/opera-12.16.1860-i586-1.xzm 
    Parallel unsquashfs: Using 1 processor
    3 inodes (52 blocks) to write
    /data.tar.lzma
    /var
    /var/log
    /var/log/packages
    /var/log/packages/opera-12.16.1860-i586-1
    /var/log/removed_packages
    /var/log/removed_scripts
    /var/log/scripts
    /var/log/scripts/opera-12.16.1860-i586-1
    /var/log/setup
    /var/log/setup/tmp
    
  • Activation

    Code: Select all

    guest@porteus:~$ activate /tmp/opera-12.16.1860-i586-1.xzm 
    glibtop(c=2734): [DEBUG] open.c:53 glibtop_open_l(): SIZEOF: 40 - 65648 - 248 - 65624 - 224 - 65624
    glibtop(c=2734): [DEBUG] open.c:163 glibtop_open_l(): Calling sysdeps open function.
    glibtop(c=2734): [DEBUG] init.c:229 glibtop_init_s(): init_s with features=0x7ffffff and flags=0
    Updating shared library links:  /sbin/ldconfig
    guest@porteus:~$ ls -sh /data.tar.lzma 
    13M /data.tar.lzma
    guest@porteus:~$ file /data.tar.lzma 
    /data.tar.lzma: LZMA compressed data, streamed
    
  • Deactivation Issue

    Code: Select all

    guest@porteus:~$ deactivate /tmp/opera-12.16.1860-i586-1.xzm 
    glibtop(c=2833): [DEBUG] open.c:53 glibtop_open_l(): SIZEOF: 40 - 65648 - 248 - 65624 - 224 - 65624
    glibtop(c=2833): [DEBUG] open.c:163 glibtop_open_l(): Calling sysdeps open function.
    glibtop(c=2833): [DEBUG] init.c:229 glibtop_init_s(): init_s with features=0x7ffffff and flags=0
    /usr/bin/deactivate: line 89: xdeactivate: command not found
    # Still there!
    guest@porteus:~$ ls -sh /data.tar.lzma 
    13M /data.tar.lzma
    
Rectified incomplete Slackware Conversion with Script posted in http://forum.porteus.org/viewtopic.php? ... 237#p36115
  • Conversion to Slackware Package

    Code: Select all

    guest@porteus:~$ sudo chmod a+r /tmp/opr/opera_12.16.1860_i386.deb 
    guest@porteus:~$ ls -lh /tmp/opr
    total 13M
    -rw-r--r-- 2 root root 13M Jun 30 08:36 opera_12.16.1860_i386.deb
    
    guest@porteus:~$ sh deb2txz.sh -nv /tmp/opr/opera_12.16.1860_i386.deb 
    dataname = data.tar.lzma
    Creating Package: /tmp/opr/opera_12.16.1860_i386.tgz
    ->  opera-12.16.1860-i386-_12.16.1860.txz
    <slack-desc>
    opera: 12.16.1860 (opera_12.16.1860_i386.deb)
    
    Slackware package maker, version 3.141593.
    Searching for symbolic links:
    usr/share/opera/defaults/license.txt	../../doc/opera/copyright
    usr/share/opera/locale/en/license.txt	../../../doc/opera/copyright
    usr/share/app-install/desktop/opera.desktop	../../applications/opera-browser.desktop
    
    Making symbolic link creation script:
    ( cd usr/share/opera/defaults ; rm -rf license.txt )
    ( cd usr/share/opera/defaults ; ln -sf ../../doc/opera/copyright license.txt )
    ( cd usr/share/opera/locale/en ; rm -rf license.txt )
    ( cd usr/share/opera/locale/en ; ln -sf ../../../doc/opera/copyright license.txt )
    ( cd usr/share/app-install/desktop ; rm -rf opera.desktop )
    ( cd usr/share/app-install/desktop ; ln -sf ../../applications/opera-browser.desktop opera.desktop )
    ...
    WARNING:  /usr/share/man (with possibly not gzipped man pages) detected
    
    Slackware package /tmp/opr/opera-12.16.1860-i386-_12.16.1860.txz created.
    Installation Files List: /tmp/Thu_16:04/deb_2952.lst
    
  • Verification thru Module Creation & Activation

    Code: Select all

    guest@porteus:~$ txz2xzm /tmp/opr/opera-12.16.1860-i386-_12.16.1860.txz 
    glibtop(c=3096): [DEBUG] open.c:53 glibtop_open_l(): SIZEOF: 40 - 65648 - 248 - 65624 - 224 - 65624
    glibtop(c=3096): [DEBUG] open.c:163 glibtop_open_l(): Calling sysdeps open function.
    glibtop(c=3096): [DEBUG] init.c:229 glibtop_init_s(): init_s with features=0x7ffffff and flags=0
    Verifying package opera-12.16.1860-i386-_12.16.1860.txz.
    Installing package opera-12.16.1860-i386-_12.16.1860.txz:
    PACKAGE DESCRIPTION:
    # 12.16.1860 (opera_12.16.1860_i386.deb)
    #
    Executing install script for opera-12.16.1860-i386-_12.16.1860.txz.
    Package opera-12.16.1860-i386-_12.16.1860.txz installed.
    Creating /tmp/opr/opera-12.16.1860-i386-_12.16.1860.xzm
    
    guest@porteus:~$ activate /tmp/opr/opera-12.16.1860-i386-_12.16.1860.xzm 
    glibtop(c=1965): [DEBUG] open.c:53 glibtop_open_l(): SIZEOF: 40 - 65648 - 248 - 65624 - 224 - 65624
    glibtop(c=1965): [DEBUG] open.c:163 glibtop_open_l(): Calling sysdeps open function.
    glibtop(c=1965): [DEBUG] init.c:229 glibtop_init_s(): init_s with features=0x7ffffff and flags=0
    xdg-desktop-menu: file '/usr/share/applications/opera-browser.desktop' does not exist
    Updating shared library links:  /sbin/ldconfig
    Updating MIME database:  /usr/bin/update-mime-database /usr/share/mime
    Updating CINNAMON menu: update-desktop-database
    
    guest@porteus:~$ file /usr/bin/opera
    /usr/bin/opera: POSIX shell script, ASCII text executable
    guest@porteus:~$ ls -l /usr/bin/opera
    -rwxr-xr-x 1 guest users 89 Jul  3  2013 /usr/bin/opera*
    guest@porteus:~$ cat /usr/bin/opera
    #!/bin/sh
    export OPERA_DIR=${OPERA_DIR:-/usr/share/opera}
    exec /usr/lib/opera/opera "$@"
    guest@porteus:~$ ldd /usr/lib/opera/opera | grep found
    
Not having access to that part of script setting up desktop files, just left with 'running' opera.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: UPDATER How it works & How to use it.

Post#14 by brokenman » 01 Jul 2016, 01:56

Thanks for your hard work Bogomips. I will take a look at these script when I am travelling. File sizes mean I can reupload on very little bandwidth.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Usage

Post#15 by Bogomips » 09 Jul 2016, 14:15

Finally worked it out. 8)
  • Code: Select all

    su
    update-<name>
    
  • Choose Package or Module
  • Resultant Package: /tmp/<Name of Package Made>.txz
    Resultant Module: /tmp/<Name of Module Made>.xzm
  • If strapped for ram, pays to make module in two stages, otherwise notification of low disk space could arise, or worst case scenario, that 0 bytes of space remain! :twisted:
  • After creating a first stage Package, create Module:

    Code: Select all

    txz2xzm  /tmp/<Name of Package Made>.txz
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Post Reply