This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to package with mkinstpkg under Linux because I find hard

Hello all !

I'm trying to create my package for ubuntu (14.04) for my company but I find hard :(

I use the version 9.11.0.4.5 of Sophos Anti-Virus. I have read several times the "Linux startup guide" and the "Linux configuration guide" and followed the instructions but nothing. Here is what my command-lines :

For example when I want to create the package I do !

# cd /opt/sophos-av/update

 # ./mkinstpkg -D

After having accepted the licence, I have :

Do you accept the licence? Yes(Y)/No(N) [N]
> y

Where do you want to install Sophos Anti-Virus? [/opt/sophos-av]
> /opt/sophos-av

Do you want to enable on-access scanning? Yes(Y)/No(N) [Y]
> n

On-access scanning disabled. Use savscan for on-demand scanning.
Updating from your own server.
Website or directory from which to update? []
> /opt/sophos-av/update/cache/Primary                      <-- because I haven't got any update server yet.

Commandline:  --update-cache-path=/opt/sophos-av/update/cache/Primary --instdir=/opt/sophos-av --enableSavProtectOnBoot=True --update-type=o --update-source-path=/opt/sophos-av/update/cache/Primary --acceptlicence=True --enableRMS=false --automatic=True --enableOnAccess=false --update-period-minutes=60
Deb package is '/opt/sophos-av/update/savinstpkg.deb'

This installation package won't run on x86 32-bit systems because it has been created on
an x86_64 system.

You have been granted a license to use the Licensed Products by Sophos for Your Internal
Use only (see the Sophos End User License Agreement for details). Any use by You of the
minipackages created using the Sophos Licensed Products are for use solely within Your
organization.

What I have to do with this command-line ? because if I try to use the package /opt/sophos-av/update/savinstpkg.deb just created, it's not working :

# mv savinstpkg /opt

# cd /opt

# /opt/sophos-av/uninstall.sh --automatic --force

# dpkg -i /opt/savinstpkg.deb

(Reading database ... 232400 files and directories currently installed.)
Preparing to unpack savinstpkg.deb ...
Unpacking savinstpkg (9.8.5) over (9.8.5) ...
Setting up savinstpkg (9.8.5) ...
Can't locate index of /opt/sophos-av/update/cache/Primary
Failed to replicate from /opt/sophos-av/update/cache/Primary
Failed to replicate from all update sources
dpkg: error processing package savinstpkg (--install):
 subprocess installed post-installation script returned error exit status 61
Errors were encountered while processing:
 savinstpkg


If I try to create the package with the command-lines given previously, that's similar :

# /opt/sophos-cid/install.sh /opt/sophos-av --automatic --acceptlicence --enableOnBoot=false --ignore-existing-installation --live-protection=false --update-source-type=n

# cd /opt/sophos-av/update

# ./mkinstpkg -D -o /opt/savinstpkg.deb --extra-options="--update-cache-path=/opt/sophos-av/update/cache/Primary --instdir=/opt/sophos-av --enableSavProtectOnBoot=True --update-type=o --update-source-path=/opt/sophos-av/update/cache/Primary --acceptlicence=True --enableRMS=false --automatic=True --enableOnAccess=false --update-period-minutes=60"


On-access scanning disabled. Use savscan for on-demand scanning.
Updating from your own server.
Extra files updating is disabled. You can change updating settings using /opt/sophos-
av/bin/savsetup.

Commandline:  --update-cache-path=/opt/sophos-av/update/cache/Primary --instdir=/opt/sophos-av --enableSavProtectOnBoot=True --update-type=o --update-source-path=/opt/sophos-av/update/cache/Primary --acceptlicence=True --extrafiles-update-type=n --enableRMS=false --extrafiles-cache-path=/opt/sophos-av/update/cache/ExtraFiles --automatic=True --enableOnAccess=false --update-period-minutes=60
Deb package is '/opt/savintpkg.deb'

This installation package won't run on x86 32-bit systems because it has been created on
an x86_64 system.

You have been granted a license to use the Licensed Products by Sophos for Your Internal
Use only (see the Sophos End User License Agreement for details). Any use by You of the
minipackages created using the Sophos Licensed Products are for use solely within Your
organization.


If I try to create my without update-server, here is the result :

# ./mkinstpkg -D -o /opt/savinstpkg.deb --extra-options="--instdir=/opt/sophos-av --enableSavProtectOnBoot=True --update-type=n --acceptlicence=True --enableRMS=false --automatic=True --enableOnAccess=false"

On-access scanning disabled. Use savscan for on-demand scanning.
Auto-updating is disabled. Your computer will not be fully protected. Enable updating as
soon as possible (using /opt/sophos-av/bin/savsetup).

Extra files updating is disabled. You can change updating settings using /opt/sophos-
av/bin/savsetup.

Commandline:  --update-cache-path=/opt/sophos-av/update/cache/Primary --instdir=/opt/sophos-av --enableSavProtectOnBoot=True --update-type=n --enableRMS=false --extrafiles-update-type=n --acceptlicence=True --extrafiles-cache-path=/opt/sophos-av/update/cache/ExtraFiles --automatic=True --enableOnAccess=false --update-period-minutes=60
Error: Failed to parse installation options.
Package creation aborted

NB : the "-o OUTPUT_FILE" is for the outfile. From the documentation, it should be is "-o=OUTPUT_FILE" but in that case, the argement is not considered...


Please could you indicate me where I have made a mistake ?



This thread was automatically locked due to age.
Parents
  • Hello AlexAbou Adam,

    the --update-source-path must point to a location from where the endpoint can update - either Sophos, a webserver, or a share. To quote:  
    When prompted for the location from which to update, type the address of the CID as it appears to the other computers. Enter the username and password that are required to access that address, if applicable.
    And cache-path (where the updates are downloaded to) and source-path (where the updates are downloaded from) being the same ... well, doesn't make sense, does it?

    Christian

  • Tank you for you answer. Yes actually I know what means --update-source-path & --update-cache-path but the fact is I can't install SophosAV without been obliged to declare an antiviral base :(

    To tell you all, in my company, we've got an update server :

    For Windows Users : http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/SAVSCFXP/
    For Linux Users : http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/

    When we try to access to the linux share folder, we have a "404 Error - File or directory not found" on some files but it's another problem :

    9/16/2015 1:21 PM 7 savBuildID
    9/16/2015 1:21 PM 8 savBuildRevision
    9/16/2015 1:21 PM 7 savShortVersion
    9/16/2015 1:21 PM 11 savVersion
    10/6/2015 10:20 AM 16 suiteVersion
    12/22/2015 10:17 AM 10 talpaVersion
    9/14/2015 5:30 PM 15 version

    The other ones are accessible (cac.dat, cidsync.upd, vdlmnfst.dat, enginemnfst.dat etc ...). The problem has been submited to our Microsoft Admin.

    Example :

    # /opt/sophos-av/bin/savconfig get PrimaryUpdateSourcePath
    http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux

    # /opt/sophos-av/bin/savconfig get PrimaryUpdateCachePath
    /opt/sophos-av/update/cache/Primary

    # ./sophos-av/update/savupdate.sh Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/cidsync.upd
    383723 bytes downloaded in 0.072467 secs (5.049851 MiB/s)
    Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/savi/sav/vdlmnfst.dat
    16591 bytes downloaded in 0.024006 secs (674.917181 KiB/s)
    Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/savi/engine/32/enginemnfst.dat
    3463 bytes downloaded in 0.021766 secs (155.372789 KiB/s)
    Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/savi/engine/64/enginemnfst.dat
    3463 bytes downloaded in 0.012246 secs (276.155440 KiB/s)
    Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/sav.dat
    65187 bytes downloaded in 0.020277 secs (3.065892 MiB/s)
    Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/talpa.dat
    443060 bytes downloaded in 0.354952 secs (1.190400 MiB/s)
    Removing bad file version
    Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/savi/sav/cidox-aq.ide
    15310 bytes downloaded in 0.029154 secs (512.833228 KiB/s)
    Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/savi/sav/xvdl87.vdb
    560014 bytes downloaded in 0.072922 secs (7.323867 MiB/s)
    Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/talpaVersion
    Downloading http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/talpaVersion
    Failed to download 'http://<sophos-server.mycomany.fr>/SophosUpdate/CIDs/S000/savlinux/talpaVersion': no such file. Please check PrimaryUpdateSourcePath.
    Failed to replicate from all update sources

    So as can see, I can't use our sophos update server, that's why I'm trying to install in offline mode. Could you give the command-line to do it or correct this one ? :

    # cd /opt/sophos-av/update
    # ./mkinstpkg -D -o /opt/savinstpkg.deb --update-type=n --extra-options="--instdir=/opt/sophos-av --enableSavProtectOnBoot=True --extrafiles-update-type=n --acceptlicence=True --enableRMS=false --automatic=True --enableOnAccess=false"

  • Hello AlexAbou Adam,

    first of all, apparently the webserver returns 404 for files without an extension - your Microsoft Admin should be able to change this behaviour,

    install in offline mode
    mkinstpkg does not create a full package for offline install. The package "just" contains the AutoUpdate component with its configuration (including required credentials) as well as other configuration options so that no user input is necessary to perform the installation. AutoUpdate subsequently downloads the actual SAV from the source location and installs it. If no on-site source (HTTP or UNC path) is available you can use Sophos (--sophos must be given as argument when running mkinstpkg, --update-type, BTW, is used to select the supported or free version of savlinux) as source.
    Eventually you'll need a valid --update-source-path anyway.

    --enableRMS=false
    you don't want to centrally manage Sophos on your Linux installations? 

    Christian 

  • Ok so I did not understand the concept of mkinstpkg, it's not usefull for me as I have to create a deb package for ubuntu repositories (i386/x86_64). Do you confirm that one can't create a standalone deb package of sophosAV from the "sources" with mkinstmkg ?

    Of couse we have got a RMS server but I didn't want to use it because my first wish was to package, install and test the installation of SophosAV through a deb package.

    Otherwise, we solved our problem with the update.

Reply
  • Ok so I did not understand the concept of mkinstpkg, it's not usefull for me as I have to create a deb package for ubuntu repositories (i386/x86_64). Do you confirm that one can't create a standalone deb package of sophosAV from the "sources" with mkinstmkg ?

    Of couse we have got a RMS server but I didn't want to use it because my first wish was to package, install and test the installation of SophosAV through a deb package.

    Otherwise, we solved our problem with the update.

Children
  • Hello AlexAbou Adam,

    confirm
    I'm not Sophos, what I say is only to the best of my knowledge. I'm pretty sure though that there isn't a way to include the source in the package (from chapter 3.3.1 of the SEC 5.3 startup guide for Linux : The necessary files are copied from the server and Sophos Anti-Virus is installed).

    test the installation of SophosAV through a deb package
    I fear I don't quite get what you are aiming at and why you want "everything" included? Normally you install only once on a machine, afterwards AutoUpdate takes care of both detection data and software updates (including itself). It doesn't make any difference whether the initial installation of SAV is done from an already populated folder or its contents are downloaded first (in fact, the latter ascertains that both the installation and updating work).

    Christian