Skip to content

Commit

Permalink
OPSI: limit version to 32 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens authored and Marco van Wieringen committed Feb 17, 2015
1 parent 276d78a commit 1941cbb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions platforms/opsi/winbareos-opsi.spec
Expand Up @@ -40,8 +40,12 @@ Using OPSI, the package can be distributed to Windows systems.
%build
cd platforms

sed -i -e 's/^version: $PackageVersion/version: %{release}/i' \
-e 's/^version: $ProductVersion/version: %{version}/i' opsi/OPSI/control
# OPSI ProductVersion is at most 32 characters long
VERSION32C=$(sed -r -e 's/(.{1,32}).*/\1/' -e 's/\.*$//' <<< %{version})

# set version and release for OPSI
sed -i -e "s/^version: \$PackageVersion/version: %{release}/i" \
-e "s/^version: \$ProductVersion/version: $VERSION32C/i" opsi/OPSI/control

WINBAREOS32=`ls -1 /winbareos-*-32-bit-*.exe`
WINBAREOS64=`ls -1 /winbareos-*-64-bit-*.exe`
Expand All @@ -66,7 +70,7 @@ cp -a platforms/winbareos*.opsi* $RPM_BUILD_ROOT%{opsidest}


%clean
rm -rf $RPM_BUILD_ROOT
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT


%files
Expand Down

0 comments on commit 1941cbb

Please sign in to comment.