commit a002fcbcfa1da32a13e855a7d91ca2d11e97080d Author: Mario Fetka Date: Tue Jul 23 19:23:35 2013 +0200 Intial package diff --git a/CLIENT_DATA/client/empty b/CLIENT_DATA/client/empty new file mode 100644 index 0000000..e69de29 diff --git a/CLIENT_DATA/setup.ins b/CLIENT_DATA/setup.ins new file mode 100644 index 0000000..2bca37f --- /dev/null +++ b/CLIENT_DATA/setup.ins @@ -0,0 +1,115 @@ +; 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/credits/ + +[Actions] +; at least 4.11.2, tested with 4.11.3.3 +requiredWinstVersion >= "4.11.3.3" + +DefVar $LogDir$ +DefVar $ProductId$ +DefVar $MinimumSpace$ +DefVar $ExitCode$ +DefVar $INST_SystemType$ +DefVar $INST_architecture$ + +Set $INST_SystemType$ = GetSystemType + +; +; get product properties for options +; +; multi-value values are return as string, seperated by ",", eg. "value1,value2,value3", +; therefore we replace "," by " " (split, compose) +; +DefVar $Options$ +Set $Options$ = composeString( splitString ( GetProductProperty("options",""), "," ), " " ) + +comment "options: " + $Options$ + +Set $LogDir$ = "%SystemDrive%\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 +; therefore please: only lower letters, no umlauts, +; no white space use '-' as a seperator +Set $MinimumSpace$ = "1000 MB" +; ---------------------------------------------------------------- + +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 +endif + +comment "Show product picture" +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ + +comment "installing" +Message "Installing " + $ProductId$ + " ..." + +comment "Start setup program" +;Winbatch_install +Shellbatch_install /winst /sysnative + +; include wsusoffline logfile (last 1000 lines) +includelog "%Systemroot%\wsusofflineupdate.log" "1000" + +; check exit code, reboot is required +Sub_check_exitcode + +[ShellBatch_install] +@rem remove old wsusoffline logfile +del /q "%Systemroot%\wsusofflineupdate.log" +call "%ScriptPath%\client\cmd\DoUpdate.cmd" $Options$ +exit %ERRORLEVEL% + +[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 + if ($ExitCode$ = "3011") + comment "looks good: setup program gives exitcode 3011" + comment "ERROR_SUCCESS: wsusoffline requires reboot and rerun." + ExitWindows /ImmediateReboot + else + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ + isFatalError + endif + endif + endif + endif +endif + diff --git a/OPSI/changelog.txt b/OPSI/changelog.txt new file mode 100644 index 0000000..81ee24e --- /dev/null +++ b/OPSI/changelog.txt @@ -0,0 +1,27 @@ +wsusoffline 20130704.840-9 20130704 Joerg Steffens + * bugfix for 64 bit + * cleanup + +wsusoffline 20130124.800-8 20130124 Joerg Steffens + * uses ShellBatch /sysnative instead of Winbatch. Prevents errors on 64bit? + * includelog for native wsusoffline log file (1000 lines) + +wsusoffline 20121008.741-7 20121008 Joerg Steffens + * uses wsusoffline 7.4.1 RPM + +wsusoffline 20120127.73-7 20120210 Joerg Steffens + * priority: -62, damit die anderen Pakete fuer die es ggf. Updates gibt, vorher installiert werden + +wsusoffline 20120127.73-6 20120205 Joerg Steffens + * exit-wrapper + * removed instnet35 + +wsusoffline 20120127.73-4 20120202 Joerg Steffens + * check exit codes and do reboots + +wsusoffline 20120127.73-3 20120131 Joerg Steffens + * handle ProductProperties Options + +wsusoffline 20120127.73-2 Joerg Steffens + * initial, removed windows media player again, because it requires license check + diff --git a/OPSI/control b/OPSI/control new file mode 100644 index 0000000..f4d1d42 --- /dev/null +++ b/OPSI/control @@ -0,0 +1,31 @@ +[Package] +version: 9 +depends: +incremental: False + +[Product] +type: localboot +id: wsusoffline +name: WSUS offline installer +description: installs patches from microsoft +advice: +version: 20130704.840 +priority: -62 +licenseRequired: False +productClasses: +setupScript: setup.ins +uninstallScript: +updateScript: +alwaysScript: +onceScript: +customScript: +userLoginScript: + +[ProductProperty] +type: unicode +name: options +multivalue: True +editable: False +description: install options for wsusoffline +values: ["/instdotnet4", "/instie8", "/instmsse", "/instpsh", "/instwd", "/nobackup", "/updatecpp", "/updatedx", "/updatercerts", "/updatetsc", "/updatewmp"] + 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..a5b1b27 --- /dev/null +++ b/builder-product.cfg @@ -0,0 +1,22 @@ +############################ +# Setup product information +############################ +VENDOR="wsusoffline.net" +PN="microsoft.wsusoffline" +NAME="WSUS Offline Update" +DESCRIPTION="Update Microsoft Windows and Office without an Internet connection" +VERSION="20130723" +RELEASE="3" +PRIORITY="0" +ADVICE="" + +# TYPE - defines, if the install files are public or restricted. +# Valid value: restricted | public +TYPE="public" + +DL_FILE[0]="wsus.jpg" +DL_SOURCE[0]="http://ostermeier.net/wp-content/uploads/2013/06/wsus.jpg" + +# 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/wsus.jpg.sha1sum b/wsus.jpg.sha1sum new file mode 100644 index 0000000..60d94ce --- /dev/null +++ b/wsus.jpg.sha1sum @@ -0,0 +1 @@ +e28ec16c3a6a7c3e7df14c402e8a52fc1982cc8a /home/mario/.opsi-dist-cache/microsoft.wsusoffline-20130723//wsus.jpg