From 6f783a89517b384459114f14b462eb976bc63fda Mon Sep 17 00:00:00 2001 From: DT Netsolution GmbH Date: Thu, 5 Apr 2012 14:08:34 +0200 Subject: [PATCH] converted to new build system --- CLIENT_DATA/custom/Config.txt | 1 - CLIENT_DATA/delsub32.ins | 48 +------ CLIENT_DATA/reg_ndiwswan_bind.vbs | 38 ++++++ CLIENT_DATA/reghack.vbs | 27 ++++ CLIENT_DATA/reghack2.vbs | 37 ++++++ CLIENT_DATA/setup32.ins | 207 +++++++++++------------------- CLIENT_DATA/uninstall32.ins | 41 +++--- CLIENT_DATA/url.ini | 2 + DriverSigning.exe.sha1sum | 1 - Driversigning.exe.sha1sum | 1 + OPSI/changelog.txt | 2 + OPSI/control | 17 ++- Testing.txt | 28 ++++ build.sh | 147 --------------------- builder-product.cfg | 34 +++++ builder-targets-cb.sh | 25 ++++ openvpn-2.2.2-install.exe.sha1sum | 1 - openvpn-logo-150x150.png.sha1sum | 1 - openvpn.png.sha1sum | 1 + openvpn32.exe.sha1sum | 1 + wget.exe.sha1sum | 1 + 21 files changed, 309 insertions(+), 352 deletions(-) delete mode 100644 CLIENT_DATA/custom/Config.txt create mode 100644 CLIENT_DATA/reg_ndiwswan_bind.vbs create mode 100644 CLIENT_DATA/reghack.vbs create mode 100644 CLIENT_DATA/reghack2.vbs create mode 100644 CLIENT_DATA/url.ini delete mode 100644 DriverSigning.exe.sha1sum create mode 100644 Driversigning.exe.sha1sum create mode 100644 Testing.txt delete mode 100644 build.sh create mode 100644 builder-product.cfg create mode 100644 builder-targets-cb.sh delete mode 100644 openvpn-2.2.2-install.exe.sha1sum delete mode 100644 openvpn-logo-150x150.png.sha1sum create mode 100644 openvpn.png.sha1sum create mode 100644 openvpn32.exe.sha1sum create mode 100644 wget.exe.sha1sum diff --git a/CLIENT_DATA/custom/Config.txt b/CLIENT_DATA/custom/Config.txt deleted file mode 100644 index f1a0ee7..0000000 --- a/CLIENT_DATA/custom/Config.txt +++ /dev/null @@ -1 +0,0 @@ -Keep Dir \ No newline at end of file diff --git a/CLIENT_DATA/delsub32.ins b/CLIENT_DATA/delsub32.ins index d8eec33..3ddff6a 100644 --- a/CLIENT_DATA/delsub32.ins +++ b/CLIENT_DATA/delsub32.ins @@ -4,8 +4,7 @@ ; credits: http://www.opsi.org/credits/ -Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' -Set $UninstallProgram$ = $InstallDir$ + "\Uninstall.exe" +Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" Message "Uninstalling " + $ProductId$ + " ..." @@ -14,55 +13,12 @@ if FileExists($UninstallProgram$) Winbatch_uninstall sub_check_exitcode endif -if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /32Bit - -comment "Cleanup registry" -Registry_uninstall /32Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall [Winbatch_uninstall] ; Choose one of the following examples as basis for program uninstall ; ; === Nullsoft Scriptable Install System ================================================================ -"$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart - - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -delete -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ + "$UninstallProgram$" /S [Sub_check_exitcode] comment "Test for installation success via exit code" diff --git a/CLIENT_DATA/reg_ndiwswan_bind.vbs b/CLIENT_DATA/reg_ndiwswan_bind.vbs new file mode 100644 index 0000000..a67de0a --- /dev/null +++ b/CLIENT_DATA/reg_ndiwswan_bind.vbs @@ -0,0 +1,38 @@ +Main() +Sub Main() + const HKEY_LOCAL_MACHINE = &H80000002 + strComputer = "." + + Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") + + strKeyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Linkage" + strValueName = "Bind" + oReg.GetMultiStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, arrValues + + Dim colNewVals + Set colNewVals = CreateObject("Scripting.Dictionary") + + flag = false + For Each strValue In arrValues + If strValue = "\Device\NdisWanIp" Then + colNewVals.Add 0, strValue + flag = true + Exit For + End If + Next + + If flag = false Then + Exit Sub + End If + + i = 1 + For Each strValue In arrValues + If strValue <> "\Device\NdisWanIp" Then + colNewVals.Add i, strValue + i = i + 1 + End If + Next + + oReg.SetMultiStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName,colNewVals.Items + +End Sub \ No newline at end of file diff --git a/CLIENT_DATA/reghack.vbs b/CLIENT_DATA/reghack.vbs new file mode 100644 index 0000000..18fa5af --- /dev/null +++ b/CLIENT_DATA/reghack.vbs @@ -0,0 +1,27 @@ +Const HKEY_LOCAL_MACHINE = &H80000002 + +strComputer = "." + +Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ + strComputer & "\root\default:StdRegProv") + +strKeyPath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}" +oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys + +strValueName = "DriverDesc" +For Each subkey In arrSubKeys + oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName,strValue + if strValue = "TAP-Win32 Adapter V9" Then + strValueName2 = "MTU" + strValue2 = "1400" + oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName2,strValue2 + + strValueName3 = "NetCfgInstanceId" + oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath&"\"&subkey,strValueName3,strValue3 + + strKeyPath2 = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002bE10318}\"&strValue3&"\Connection" + strValueName4 = "Name" + strValue3 = "LAN-Verbindung OpenVPN" + oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath2,strValueName4,strValue3 + end if +Next \ No newline at end of file diff --git a/CLIENT_DATA/reghack2.vbs b/CLIENT_DATA/reghack2.vbs new file mode 100644 index 0000000..9f0693b --- /dev/null +++ b/CLIENT_DATA/reghack2.vbs @@ -0,0 +1,37 @@ +On Error Resume Next + +Const HKEY_LOCAL_MACHINE = &H80000002 +'Const FULL_DNS_REGISTRATION = True +'Const DOMAIN_DNS_REGISTRATION = False + +strComputer = "." + +Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ + strComputer & "\root\default:StdRegProv") + +strKeyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" + +strValueName = "SearchList" + +Set objWMIService = GetObject("winmgmts:" _ + & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") + +Set colNetCards = objWMIService.ExecQuery _ + ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True") + +For Each objNetCard in colNetCards + if objNetCard.Description = "TAP-Win32 Adapter V9" then + objNetCard.SetDynamicDNSRegistration True, _ + False + objNetCard.SetTcpipNetbios 0 + + else + objNetCard.SetDynamicDNSRegistration False, _ + False + objNetCard.SetTcpipNetbios 2 + end if +Next + oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue + if strValue <> "" then + oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,"" + end if \ No newline at end of file diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index 2970647..0e44bf2 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -6,6 +6,11 @@ [Actions] requiredWinstVersion >= "4.10.8.6" +DefVar $wget$ +DefVar $wget_uninst$ +DefVar $Ovpn-Config-Dir$ +DefVar $Konfig-URL$ +DefVar $pw$ DefVar $MsiId$ DefVar $UninstallProgram$ DefVar $LogDir$ @@ -18,6 +23,23 @@ DefVar $LicenseKey$ DefVar $LicensePool$ Set $LogDir$ = "%SystemDrive%\tmp" +;Set $wget$ = "%SystemDrive%\Programme\GnuWin32\bin\wget.exe" +;Set $wget_uninst$ = GetRegistrystringvalue("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wget-1.11.4-1_is1] UninstallString") +;Set $wget_uninst$ = unquote($wget_uninst$,$wget_uninst$) + +;Set $Ovpn-Config-Dir$ = "%SystemDrive%\Programme\OpenVPN\config" +;Set $Konfig-URL$ = GetIni ("%ScriptPath%\url.ini" [Webserver] URL) +;Set $pw$ = GetProductProperty ("apache-pw","values") + +; 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 - @@ -26,7 +48,7 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; therefore please: only lower letters, no umlauts, ; no white space use '-' as a seperator Set $ProductId$ = "openvpn" -Set $MinimumSpace$ = "20 MB" +Set $MinimumSpace$ = "1 MB" ; the path were we find the product after the installation Set $InstallDir$ = "%ProgramFiles32Dir%\OpenVPN" Set $LicenseRequired$ = "false" @@ -40,12 +62,7 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) 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$ + " ..." if $LicenseRequired$ = "true" @@ -57,15 +74,15 @@ else Winbatch_install Sub_check_exitcode - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - - comment "Create shortcuts" - LinkFolder_install - +; comment "Patch Registry" +; Registry_install /32Bit + +; comment "Default-User in Registry" +; Registry_AllUsers /AllNTUserdats + + comment "Shortcuts" + LinkFolder_install + comment "Test for installation success" ; Test if software marked as installed in registry ; if (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] DisplayName") = "") @@ -82,121 +99,53 @@ endif ; You can use $LicenseKey$ var to pass a license key to the installer ; ; === Nullsoft Scriptable Install System ================================================================ -"%ScriptPath%\DriverSigning.exe" -OFF -"%ScriptPath%\X86FILE" /S -"%ScriptPath%\DriverSigning.exe" -ON -[Files_install] -; Example of recursively copying some files into the installation directory: -; -copy -s "%ScriptPath%\custom\*.*" "$InstallDir$\config\" + +"$Driversigning32Exe$" -OFF +"$Install32Exe$" /S +"$Driversigning32Exe$" -OFF +;"$Wget32Exe$" /Silent +;Set $wget_uninst$ = GetRegistrystringvalue("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wget-1.11.4-1_is1] UninstallString") +;Set $wget_uninst$ = unquote($wget_uninst$,$wget_uninst$) +;"%ScriptPath%\reghack.vbs" +;"%ScriptPath%\reghack2.vbs" +;"%ScriptPath%\reg_ndiwswan_bind.vbs" + +;$wget$ -O $Ovpn-Config-Dir$\ca.crt --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/ca.crt +;$wget$ -O $Ovpn-Config-Dir$\client.crt --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.crt +;$wget$ -O $Ovpn-Config-Dir$\client.key --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.key +;$wget$ -O $Ovpn-Config-Dir$\client.ovpn --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/client.ovpn +;$wget$ -O $Ovpn-Config-Dir$\ta.key --http-user=%PCName% --password=$pw$ $Konfig-URL$/%PCName%/ta.key + +;cacls $Ovpn-Config-Dir$ /E /R Benutzer +;cacls $Ovpn-Config-Dir$ /E /R Hauptbenutzer + +;sc config OpenVPNService start= auto +;netsh firewall set opmode mode=disable interface="LAN-Verbindung OpenVPN" + +;$wget_uninst$ /silent [Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd +;openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server] +;set "fDenyTSConnections" = REG_DWORD:0000 + +;openkey [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters] +;set "MaxPacketSize"=reg_dword:01 + +;openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] +;set "GpNetworkStartTimeoutPolicyValue"=reg_dword:60 +;set "GroupPolicyMinTransferRate"=reg_dword:00 + +;openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System] +;set "GpNetworkStartTimeoutPolicyValue"=reg_dword:60 +;set "GroupPolicyMinTransferRate"=reg_dword:00 + +[Registry_AllUsers] +;openkey [SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] +;set "GpNetworkStartTimeoutPolicyValue"=reg_dword:60 +;set "GroupPolicyMinTransferRate"=reg_dword:00 [LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[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." - 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." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - +set_basefolder common_desktopdirectory +set_subfolder "" +delete_element "OpenVPN GUI" diff --git a/CLIENT_DATA/uninstall32.ins b/CLIENT_DATA/uninstall32.ins index c07d457..18f5466 100644 --- a/CLIENT_DATA/uninstall32.ins +++ b/CLIENT_DATA/uninstall32.ins @@ -17,10 +17,20 @@ DefVar $LicensePool$ 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 - ; ---------------------------------------------------------------- -Set $ProductId$ = "openvpn" +Set $ProductId$ = "opsi-template" Set $InstallDir$ = "%ProgramFiles32Dir%\OpenVPN" Set $LicenseRequired$ = "false" Set $LicensePool$ = "p_" + $ProductId$ @@ -43,23 +53,16 @@ if $LicenseRequired$ = "true" endif [Sub_free_license] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to free license used for the product" - DefVar $result$ - Set $result$ = FreeLicense($LicensePool$) - ; If there is an assignment of a license pool to the product, it is possible to use - ; Set $result$ = FreeLicense("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) -else - LogError "Error: licensing required, but license management not enabled" - isFatalError -endif - +comment "License management is enabled and will be used" +comment "Trying to free license used for the product" +DefVar $result$ +Set $result$ = FreeLicense($LicensePool$) +; If there is an assignment of a license pool to the product, it is possible to use +; Set $result$ = FreeLicense("", $ProductId$) +; +; If there is an assignment of a license pool to a windows software id, it is possible to use +; DefVar $WindowsSoftwareId$ +; $WindowsSoftwareId$ = "..." +; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) diff --git a/CLIENT_DATA/url.ini b/CLIENT_DATA/url.ini new file mode 100644 index 0000000..b813302 --- /dev/null +++ b/CLIENT_DATA/url.ini @@ -0,0 +1,2 @@ +[Webserver] +URL = "http://opsi-dev.dtnet.de/opsi/openvpn" \ No newline at end of file diff --git a/DriverSigning.exe.sha1sum b/DriverSigning.exe.sha1sum deleted file mode 100644 index 2639dad..0000000 --- a/DriverSigning.exe.sha1sum +++ /dev/null @@ -1 +0,0 @@ -1bb3179fe21d47071f6b1532419876b5d9f07444 /usr/portage/distfiles/DriverSigning.exe diff --git a/Driversigning.exe.sha1sum b/Driversigning.exe.sha1sum new file mode 100644 index 0000000..8a225e5 --- /dev/null +++ b/Driversigning.exe.sha1sum @@ -0,0 +1 @@ +1bb3179fe21d47071f6b1532419876b5d9f07444 /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2/X86/Driversigning.exe diff --git a/OPSI/changelog.txt b/OPSI/changelog.txt index e69de29..bc69317 100644 --- a/OPSI/changelog.txt +++ 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 index 9b15a1a..fa35f2e 100644 --- a/OPSI/control +++ b/OPSI/control @@ -6,8 +6,8 @@ incremental: False [Product] type: localboot id: openvpn -name: OpenVPN -description: OpenVPN ist ein Programm zum Aufbau eines Virtuellen Privaten Netzwerkes (VPN) über eine verschlüsselte TLS-Verbindung. +name: Openvpn +description: Openvpn Client advice: ADVICE version: VERSION priority: PRIORITY @@ -30,8 +30,11 @@ description: which architecture (32/64 bit) has to be installed values: ["32 only", "64 only", "both", "system specific"] default: ["system specific"] -[ProductDependency] -action: setup -requiredProduct: aio -requiredStatus: installed -requirementType: before +;[ProductProperty] +;type: unicode +;name: apache-pw +;multivalue: False +;editable: True +;description: Passwort fuer Download der Konfigfiles +;values: ["Passwort"] +;default: ["Passwort"] \ No newline at end of file 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/build.sh b/build.sh deleted file mode 100644 index 6595354..0000000 --- a/build.sh +++ /dev/null @@ -1,147 +0,0 @@ -#!/bin/sh -PN="openvpn" -VERSION="2.2.2" -RELEASE="2" -PRIORITY="0" -ADVICE="" -TYPE="testing" -# all downloads should not have any traling parameters like ?downlaodid=1234 .....(should rewrite in python) -ICON="http://www.bitblokes.de/wp-content/uploads/2010/10/openvpn-logo-150x150.png" -X86="http://swupdate.openvpn.org/community/releases/openvpn-2.2.2-install.exe" -X86_1="http://nativeex.boot-land.net/Programs/DriverSigning/DriverSigning.exe" -#AMD64="http://downloads.sourceforge.net/sevenzip/7z920-x64.msi" -ICONFILE=${ICON##*/} -X86FILE=${X86##*/} -X86FILE_1=${X86_1##*/} -#AMD64FILE=${AMD64##*/} - - if [ -e /var/tmp/opsi/upload/$TYPE/${PN}_${VERSION}-${RELEASE}.opsi ] - then - echo "package ${PN}_${VERSION}-${RELEASE}.opsi already generated" - exit 1 - fi - -OUT=$(mktemp -d /tmp/output.XXXXXXXXXX) || { echo "Failed to create temp dir"; exit 1; } -mkdir $OUT/$PN -cp -Rv OPSI CLIENT_DATA $OUT/$PN -unix2dos $OUT/$PN/CLIENT_DATA/* - - if [ -e /usr/portage/distfiles/$ICONFILE ] - then - if [ -e $ICONFILE.sha1sum ] - then - SHA1SUM=`cat $ICONFILE.sha1sum` - CHECKSUM=`sha1sum /usr/portage/distfiles/$ICONFILE` - if [ "$CHECKSUM" = "$SHA1SUM" ] - then - convert -colorspace rgb /usr/portage/distfiles/$ICONFILE -transparent white -background transparent -resize 160x160\> \ - -size 160x160 xc:transparent +swap -gravity center -composite $OUT/$PN/CLIENT_DATA/$PN.png - else - echo "The checksums do not match." - exit 1 - fi - else - echo "You need to create the checksums with: sha1sum /usr/portage/distfiles/$ICONFILE > $ICONFILE.sha1sum" - exit 1 - fi - else - echo "Downloading file" - wget -P /usr/portage/distfiles/ $ICON - exit 1 - fi - - if [ -e /usr/portage/distfiles/$X86FILE ] - then - if [ -e $X86FILE.sha1sum ] - then - SHA1SUM=`cat $X86FILE.sha1sum` - CHECKSUM=`sha1sum /usr/portage/distfiles/$X86FILE` - if [ "$CHECKSUM" = "$SHA1SUM" ] - then - cp /usr/portage/distfiles/$X86FILE $OUT/$PN/CLIENT_DATA - else - echo "The checksums do not match." - exit 1 - fi - else - echo "You need to create the checksums with: sha1sum /usr/portage/distfiles/$X86FILE > $X86FILE.sha1sum" - exit 1 - fi - else - echo "Downloading file" - wget -O /usr/portage/distfiles/$X86FILE $X86 - exit 1 - fi - - if [ -e /usr/portage/distfiles/$X86FILE_1 ] - then - if [ -e $X86FILE_1.sha1sum ] - then - SHA1SUM=`cat $X86FILE_1.sha1sum` - CHECKSUM=`sha1sum /usr/portage/distfiles/$X86FILE_1` - if [ "$CHECKSUM" = "$SHA1SUM" ] - then - cp /usr/portage/distfiles/$X86FILE_1 $OUT/$PN/CLIENT_DATA - #7z e -o$OUT/$PN/CLIENT_DATA /usr/portage/distfiles/$X86FILE_1 - else - echo "The checksums do not match." - exit 1 - fi - else - echo "You need to create the checksums with: sha1sum /usr/portage/distfiles/$X86FILE_1 > $X86FILE_1.sha1sum" - exit 1 - fi - else - echo "Downloading file" - wget -O /usr/portage/distfiles/$X86FILE_1 $X86_1 - exit 1 - fi - -# if [ -e /usr/portage/distfiles/$AMD64FILE ] -# then -# if [ -e $AMD64FILE.sha1sum ] -# then -# SHA1SUM=`cat $AMD64FILE.sha1sum` -# CHECKSUM=`sha1sum /usr/portage/distfiles/$AMD64FILE` -# if [ "$CHECKSUM" = "$SHA1SUM" ] -# then -# cp /usr/portage/distfiles/$AMD64FILE $OUT/$PN/CLIENT_DATA -# else -# echo "The checksums do not match." -# exit 1 -# fi -# else -# echo "You need to create the checksums with: sha1sum /usr/portage/distfiles/$AMD64FILE > $AMD64FILE.sha1sum" -# exit 1 -# fi -# else -# echo "Downloading file" -# wget -P /usr/portage/distfiles/ $AMD64 -# exit 1 -# fi - -sed -e "s!VERSION!$VERSION!g" -e "s!RELEASE!$RELEASE!g" -e "s!PRIORITY!$PRIORITY!g" -e "s!ADVICE!$ADVICE!g" -i $OUT/$PN/OPSI/control -#sed -e "s!X86FILE!$X86FILE!g" -e "s!AMD64FILE!$AMD64FILE!g" -i $OUT/$PN/CLIENT_DATA/setup.ins -sed -e "s!X86FILE!$X86FILE!g" -i $OUT/$PN/CLIENT_DATA/setup32.ins - -if test -d ".git"; then - git log --date-order --date=short | \ - sed -e '/^commit.*$/d' | \ - awk '/^Author/ {sub(/\\$/,""); getline t; print $0 t; next}; 1' | \ - sed -e 's/^Author: //g' | \ - sed -e 's/>Date: \([0-9]*-[0-9]*-[0-9]*\)/>\t\1/g' | \ - sed -e 's/^\(.*\) \(\)\t\(.*\)/\3 \1 \2/g' > $OUT/$PN/OPSI/changelog.txt -else - echo "No git repository present." - exit 1 -fi - -pushd $OUT -opsi-makeproductfile -v $OUT/$PN -popd - -mkdir -p /var/tmp/opsi/upload/$TYPE/ -cp -afv $OUT/*.opsi /var/tmp/opsi/upload/$TYPE/ - -#rm -rf $OUT - diff --git a/builder-product.cfg b/builder-product.cfg new file mode 100644 index 0000000..8623724 --- /dev/null +++ b/builder-product.cfg @@ -0,0 +1,34 @@ +############################ +# Setup product information +############################ +VENDOR="openvpn.org" +PN="openvpn" +VERSION="2.2.2" +RELEASE="1" +PRIORITY="0" +ADVICE="" + +# TYPE - defines, if the install files are public or restricted. +# Valid value: restricted | public +TYPE="public" + +DL_FILE[0]="openvpn.png" +DL_SOURCE[0]="http://www.bitblokes.de/wp-content/uploads/2010/10/openvpn-logo-150x150.png" + +DL_FILE[1]="openvpn32.exe" +DL_SOURCE[1]="http://swupdate.openvpn.org/community/releases/openvpn-2.2.2-install.exe" +DL_ARCH[1]="X86" +DL_WINST_NAME[1]=Install32Exe + +DL_FILE[2]="Driversigning.exe" +DL_SOURCE[2]="http://nativeex.boot-land.net/Programs/DriverSigning/DriverSigning.exe" +DL_ARCH[2]="X86" +DL_WINST_NAME[2]=Driversigning32Exe + +;DL_FILE[3]="wget.exe" +;DL_SOURCE[3]="http://downloads.sourceforge.net/project/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-setup.exe?r=&ts=1333400082&use_mirror=garr" +;DL_ARCH[3]="X86" +;DL_WINST_NAME[3]=Wget32exe + +# 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/openvpn-2.2.2-install.exe.sha1sum b/openvpn-2.2.2-install.exe.sha1sum deleted file mode 100644 index ab91b4c..0000000 --- a/openvpn-2.2.2-install.exe.sha1sum +++ /dev/null @@ -1 +0,0 @@ -395a31bfa3e9991d31d0350842e3a8ff710e20a3 /usr/portage/distfiles/openvpn-2.2.2-install.exe diff --git a/openvpn-logo-150x150.png.sha1sum b/openvpn-logo-150x150.png.sha1sum deleted file mode 100644 index 241105d..0000000 --- a/openvpn-logo-150x150.png.sha1sum +++ /dev/null @@ -1 +0,0 @@ -1e55e6d56fd54b044fedb5863e1693e812b776fe /usr/portage/distfiles/openvpn-logo-150x150.png diff --git a/openvpn.png.sha1sum b/openvpn.png.sha1sum new file mode 100644 index 0000000..017d978 --- /dev/null +++ b/openvpn.png.sha1sum @@ -0,0 +1 @@ +1e55e6d56fd54b044fedb5863e1693e812b776fe /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2//openvpn.png diff --git a/openvpn32.exe.sha1sum b/openvpn32.exe.sha1sum new file mode 100644 index 0000000..5fde650 --- /dev/null +++ b/openvpn32.exe.sha1sum @@ -0,0 +1 @@ +395a31bfa3e9991d31d0350842e3a8ff710e20a3 /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2/X86/openvpn32.exe diff --git a/wget.exe.sha1sum b/wget.exe.sha1sum new file mode 100644 index 0000000..da56593 --- /dev/null +++ b/wget.exe.sha1sum @@ -0,0 +1 @@ +35e3ecc99c5a28745f957e87695b5a18b1f61680 /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2/X86/wget.exe