converted to new build system

This commit is contained in:
DT Netsolution GmbH 2012-04-05 14:08:34 +02:00
parent 6c17ccbecd
commit 6f783a8951
21 changed files with 309 additions and 352 deletions

View File

@ -1 +0,0 @@
Keep Dir

View File

@ -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"

View File

@ -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

27
CLIENT_DATA/reghack.vbs Normal file
View File

@ -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

37
CLIENT_DATA/reghack2.vbs Normal file
View File

@ -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

View File

@ -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: <path to the program>
; 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: <path to the program>
; parameters: <some_param>
; working_dir: $InstallDir$
; icon_file: <path to 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"

View File

@ -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$)

2
CLIENT_DATA/url.ini Normal file
View File

@ -0,0 +1,2 @@
[Webserver]
URL = "http://opsi-dev.dtnet.de/opsi/openvpn"

View File

@ -1 +0,0 @@
1bb3179fe21d47071f6b1532419876b5d9f07444 /usr/portage/distfiles/DriverSigning.exe

View File

@ -0,0 +1 @@
1bb3179fe21d47071f6b1532419876b5d9f07444 /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2/X86/Driversigning.exe

View File

@ -0,0 +1,2 @@
Don't add cahngelog entries here!
It get autogenerated by the opsi-builder.sh

View File

@ -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"]

28
Testing.txt Normal file
View File

@ -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: ??

147
build.sh
View File

@ -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

34
builder-product.cfg Normal file
View File

@ -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

25
builder-targets-cb.sh Normal file
View File

@ -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_<targetname> is possible.
#
# Abstract:
# target order: config, prepare, retrieve, create, package, publish, commit, cleanup
# callbacks: <none>
#
##############################################################################
function cleanup() {
echo "Cleanup"
builder_cleanup
}

View File

@ -1 +0,0 @@
395a31bfa3e9991d31d0350842e3a8ff710e20a3 /usr/portage/distfiles/openvpn-2.2.2-install.exe

View File

@ -1 +0,0 @@
1e55e6d56fd54b044fedb5863e1693e812b776fe /usr/portage/distfiles/openvpn-logo-150x150.png

1
openvpn.png.sha1sum Normal file
View File

@ -0,0 +1 @@
1e55e6d56fd54b044fedb5863e1693e812b776fe /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2//openvpn.png

1
openvpn32.exe.sha1sum Normal file
View File

@ -0,0 +1 @@
395a31bfa3e9991d31d0350842e3a8ff710e20a3 /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2/X86/openvpn32.exe

1
wget.exe.sha1sum Normal file
View File

@ -0,0 +1 @@
35e3ecc99c5a28745f957e87695b5a18b1f61680 /home/dtrinks/.opsi-dist-cache/openvpn.org/openvpn/2.2.2/X86/wget.exe