commit 5c40ab647c499891ecb15bb3385ba79a9e4ddb86 Author: Mario Fetka Date: Sun Feb 24 14:57:24 2013 +0100 inital commit based on uib package diff --git a/CLIENT_DATA/delsub32.ins b/CLIENT_DATA/delsub32.ins new file mode 100644 index 0000000..4a4bfd0 --- /dev/null +++ b/CLIENT_DATA/delsub32.ins @@ -0,0 +1,110 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ +DefStringlist $outlist$ + +Set $UninstallProgram$ = $InstallDir$ + "\gpg4win-uninstall.exe" + +Message "Uninstalling " + $ProductId$ + " ..." + +if FileExists($UninstallProgram$) + comment "Uninstall program found, starting uninstall" + killtask "kleopatra.exe" + killtask "gpg-agent.exe" + killtask "dirmngr.exe" + killtask "dbus-daemon.exe" + killtask "qdbus.exe" + Files_uninstall_special + setLoglevel = 7 + set $outlist$ = getProcessList + DosInAnIcon_kill_tasks winst /32bit + set $outlist$ = getProcessList + Files_uninstall_special + Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 30 + sub_check_exitcode + if not ("" = takefirststringcontaining(getProcessList,"Au_.exe")) + killtask "qdbus.exe" + killtask "kleopatra.exe" + killtask "gpg-agent.exe" + killtask "dirmngr.exe" + killtask "dbus-daemon.exe" + sleepseconds "10" + set $outlist$ = getProcessList + endif + if not ("" = takefirststringcontaining(getProcessList,"Au_.exe")) + killtask "qdbus.exe" + killtask "kleopatra.exe" + killtask "gpg-agent.exe" + killtask "dirmngr.exe" + killtask "dbus-daemon.exe" + sleepseconds "10" + set $outlist$ = getProcessList + endif + if not ("" = takefirststringcontaining(getProcessList,"Au_.exe")) + killtask "qdbus.exe" + killtask "kleopatra.exe" + killtask "gpg-agent.exe" + killtask "dirmngr.exe" + killtask "dbus-daemon.exe" + sleepseconds "10" + set $outlist$ = getProcessList + endif + if not ("" = takefirststringcontaining(getProcessList,"Au_.exe")) + set $outlist$ = getProcessList + LogError("uninstallation failed") + isFatalError + endif + setLoglevel = 6 +endif + +comment "Delete files" +Files_uninstall /32Bit + +[Winbatch_uninstall] +; === Nullsoft Scriptable Install System ================================================================ +"$UninstallProgram$" /S + +[Files_uninstall] +del -sf "$InstallDir$\" + +[Files_uninstall_special] +del -f "$InstallDir$\qdbus.exe" + +[DosInAnIcon_kill_tasks] +taskkill /IM "kleopatra.exe" /F +taskkill /IM "gpg-agent.exe" /F +taskkill /IM "dirmngr.exe" /F +taskkill /IM "dbus-daemon.exe" /F + +[Sub_check_exitcode] +comment "Test for installation success via exit code" +set $ExitCode$ = getLastExitCode +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + Exitwindows /Reboot + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + Exitwindows /Reboot + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins new file mode 100644 index 0000000..2cdebac --- /dev/null +++ b/CLIENT_DATA/setup32.ins @@ -0,0 +1,99 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.2.6" + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ProductId$ +DefVar $MinimumSpace$ +DefVar $InstallDir$ +DefVar $ExitCode$ +DefVar $LicenseRequired$ +DefVar $LicenseKey$ +DefVar $LicensePool$ + +Set $LogDir$ = "%SystemDrive%\opsi.org\tmp" + +; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh +; and adds the following variables: +; from builder-product.cfg : all variables definded by attribute WINST[index] +; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE +; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL +; auto generated winst-variables +; $IconFile$: path to product picture +; +@@BUILDER_VARIABLES@@ + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +;$ProductId$ should be the name of the product in opsi +Set $ProductId$ = "gpg4win.gpg4win" +Set $MinimumSpace$ = "200 MB" +; the path were we find the product after the installation +Set $InstallDir$ = "%ProgramFiles32Dir%\gnu\gnupg" +; ---------------------------------------------------------------- + +if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) + LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ + isFatalError + ; Stop process and set installation status to failed +else + comment "Show product picture" + ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + + if FileExists("%ScriptPath%\delsub32.ins") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub32.ins" + endif + + Message "Installing " + $ProductId$ + " ..." + + + comment "Start setup program" + ChangeDirectory "%SCRIPTPATH%" + Winbatch_install + Sub_check_exitcode + +endif + +[Winbatch_install] +; === Nullsoft Scriptable Install System ================================================================ +"$InstallExe$" /S + +[Sub_check_exitcode] +comment "Test for installation success via exit code" +set $ExitCode$ = getLastExitCode +; informations to exit codes see +; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx +; http://msdn.microsoft.com/en-us/library/aa368542.aspx +if ($ExitCode$ = "0") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ + if ($ExitCode$ = "1605") + comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." + comment "Uninstall of a not installed product failed - no problem" + else + if ($ExitCode$ = "1641") + comment "looks good: setup program gives exitcode 1641" + comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." + Exitwindows /Reboot + else + if ($ExitCode$ = "3010") + comment "looks good: setup program gives exitcode 3010" + comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." + Exitwindows /Reboot + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif +endif + diff --git a/CLIENT_DATA/uninstall32.ins b/CLIENT_DATA/uninstall32.ins new file mode 100644 index 0000000..475d146 --- /dev/null +++ b/CLIENT_DATA/uninstall32.ins @@ -0,0 +1,49 @@ +; Copyright (c) uib gmbh (www.uib.de) +; This sourcecode is owned by uib gmbh +; and published under the Terms of the General Public License. +; credits: http://www.opsi.org/en/credits/ + +[Actions] +requiredWinstVersion >= "4.11.2.6" + +DefVar $MsiId$ +DefVar $UninstallProgram$ +DefVar $LogDir$ +DefVar $ExitCode$ +DefVar $ProductId$ +DefVar $InstallDir$ +DefVar $LicenseRequired$ +DefVar $LicensePool$ + +Set $LogDir$ = "%SystemDrive%\opsi.org\tmp" + +; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh +; and adds the following variables: +; from builder-product.cfg : all variables definded by attribute WINST[index] +; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE +; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL +; auto generated winst-variables +; $IconFile$: path to product picture +; +@@BUILDER_VARIABLES@@ + +; ---------------------------------------------------------------- +; - Please edit the following values - +; ---------------------------------------------------------------- +Set $ProductId$ = "gpg4win.gpg4win" +; the path were we find the product after the installation +Set $InstallDir$ = "%ProgramFiles32Dir%\gnu\gnupg" +; ---------------------------------------------------------------- + + +comment "Show product picture" +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + +Message "Uninstalling " + $ProductId$ + " ..." + +if FileExists("%ScriptPath%\delsub32.ins") + comment "Start uninstall sub section" + Sub "%ScriptPath%\delsub32.ins" +endif + + diff --git a/GnuPG_logo_2006.png.sha1sum b/GnuPG_logo_2006.png.sha1sum new file mode 100644 index 0000000..c9447c3 --- /dev/null +++ b/GnuPG_logo_2006.png.sha1sum @@ -0,0 +1 @@ +96902fd180c2c61cac795e486dff5c5c49663e96 /home/mario/.opsi-dist-cache/gpg4win.gpg4win-2.1.0//GnuPG_logo_2006.png diff --git a/OPSI/changelog.txt b/OPSI/changelog.txt new file mode 100644 index 0000000..bc69317 --- /dev/null +++ b/OPSI/changelog.txt @@ -0,0 +1,2 @@ +Don't add cahngelog entries here! +It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/OPSI/control b/OPSI/control new file mode 100644 index 0000000..0843843 --- /dev/null +++ b/OPSI/control @@ -0,0 +1,76 @@ +[Package] +version: RELEASE +depends: +incremental: False + +[Product] +type: localboot +id: gpg4win.gpg4win +name: gpg4win.gpg4win +description: gnupg windows helper +advice: ADVICE +version: VERSION +priority: PRIORITY +licenseRequired: False +productClasses: +setupScript: setup32.ins +uninstallScript: uninstall32.ins +updateScript: +alwaysScript: +onceScript: +customScript: +userLoginScript: + +[Changelog] +gpg4win (2.1.0-5) stable; urgency=low + + * del qdbus.exe before uninstall + * add qdbus.exe to processes to kill + * retry killing of processes after timeout while Au_.exe is running + + -- detlef oertel Wed, 20 Sep 2012 16:01:53 +0200 + +gpg4win (2.1.0-4) stable; urgency=low + + * add dirmngr.exe to processes to kill + * add kleopatra.exe to processes to kill + * add process list for debugging purpose + + -- detlef oertel Wed, 19 Sep 2012 16:01:53 +0200 + +gpg4win (2.1.0-3) stable; urgency=low + + * fix uninstall.ins + * kill running processes on deinstall + + -- detlef oertel Mon, 10 Sep 2012 16:01:53 +0200 + +gpg4win (2.1.0-2) stable; urgency=low + + * fix uninstall.ins + * kill running processes on deinstall + + -- detlef oertel Mon, 27 Aug 2012 16:01:53 +0200 + + +gpg4win (2.1.0-1) stable; urgency=low + + * initial + + -- detlef oertel Fri, 03 Aug 2012 16:01:53 +0200 + + + + + + + + + + + + + + + + diff --git a/OPSI/postinst b/OPSI/postinst new file mode 100644 index 0000000..a8e33fc --- /dev/null +++ b/OPSI/postinst @@ -0,0 +1,9 @@ +#! /bin/sh +# +# postinst script for softprod +# This script executes after unpacking files from that archive and registering the product at the server. +# +# The following environment variables can be used to obtain information about the current installation: +# PRODUCT_ID: id of the current product +# CLIENT_DATA_DIR: directory which contains the installed client data +# diff --git a/OPSI/preinst b/OPSI/preinst new file mode 100644 index 0000000..15a5320 --- /dev/null +++ b/OPSI/preinst @@ -0,0 +1,9 @@ +#! /bin/sh +# +# preinst script for softprod +# This script executes before that package will be unpacked from its archive file. +# +# The following environment variables can be used to obtain information about the current installation: +# PRODUCT_ID: id of the current product +# CLIENT_DATA_DIR: directory where client data will be installed +# diff --git a/Testing.txt b/Testing.txt new file mode 100644 index 0000000..d6b5e6c --- /dev/null +++ b/Testing.txt @@ -0,0 +1,28 @@ +*** Qualitiymanagement/Testing procedure + +- Product: + - Name: productname + - Version: xxx + - Release: yyyy + +- Environment + - OS: Native windows XP-32Bit installation + - Preinstalled packages: None (also no aio) + - Files used while testing: + File1: http://domain.de/file.ext + +- Testing process: + OPSI-action: + - Installation (without dependencies like AIO/Firefox): ?? + Result: + - File extensions related to program: ?? + - Start menu entry: ?? + - Starting/using program: viewer works, File1 is shown correctly: ?? + + OPSI-action: + - Uninstall + Result: + - File extensions related to program: unrelated: ?? + - Start menu entry: none: ?? + + diff --git a/builder-product.cfg b/builder-product.cfg new file mode 100644 index 0000000..576734d --- /dev/null +++ b/builder-product.cfg @@ -0,0 +1,25 @@ +############################ +# Setup product information +############################ +VENDOR="gpg4win.de" +PN="gpg4win.gpg4win" +VERSION="2.1.0" +RELEASE="3" +PRIORITY="0" +ADVICE="" + +# TYPE - defines, if the install files are public or restricted. +# Valid value: restricted | public +TYPE="public" + + +DL_FILE[0]="GnuPG_logo_2006.png" +DL_SOURCE[0]="http://upload.wikimedia.org/wikipedia/ro/f/f1/GnuPG_logo_2006.png" + +DL_FILE[1]="gpg4win-${VERSION}.exe" +DL_SOURCE[1]="http://files.gpg4win.org/gpg4win-${VERSION}.exe" +DL_ARCH[1]="X86" +DL_WINST_NAME[1]=InstallExe + +# File array index for the image showing while installing the program +ICON_DL_INDEX=0 diff --git a/builder-targets-cb.sh b/builder-targets-cb.sh new file mode 100644 index 0000000..9a3d4a8 --- /dev/null +++ b/builder-targets-cb.sh @@ -0,0 +1,25 @@ +############################################################################## +# This optional file "builder-targets-cb.sh" will be called by builder.sh +# +# The targets will be called from thde opsi-builder using the following +# order: config, prepare, retrieve, create, package, publish, commit, cleanup +# You can overwrite the target functions in builder-targets-cb.sh +# +# You can define callback functions. The functions are called from +# opsi-builder within processing a target +# cb_package_makeproductfile +# +# You can use every variable defined in any configuration file or by +# the defined builder script itself. Also, calling the predefined +# targets builder_ is possible. +# +# Abstract: +# target order: config, prepare, retrieve, create, package, publish, commit, cleanup +# callbacks: +# +############################################################################## + +function cleanup() { + echo "Cleanup" + builder_cleanup +} diff --git a/gpg4win-2.1.0.exe.sha1sum b/gpg4win-2.1.0.exe.sha1sum new file mode 100644 index 0000000..76a1493 --- /dev/null +++ b/gpg4win-2.1.0.exe.sha1sum @@ -0,0 +1 @@ +f619313cb42241d6837d20d24a814b81a1fe7f6d /home/mario/.opsi-dist-cache/gpg4win.gpg4win-2.1.0/X86/gpg4win-2.1.0.exe