Hello community,
here is the log from the commit of package obs-service-verify_file for
openSUSE:Factory checked in at 2012-03-27 08:57:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-verify_file (Old)
and /work/SRC/openSUSE:Factory/.obs-service-verify_file.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-verify_file", Maintainer is ""
Changes:
--------
New Changes file:
--- /dev/null 2012-03-17 10:42:43.883537212 +0100
+++
/work/SRC/openSUSE:Factory/.obs-service-verify_file.new/obs-service-verify_file.changes
2012-03-27 08:57:19.000000000 +0200
@@ -0,0 +1,13 @@
+-------------------------------------------------------------------
+Tue Mar 20 10:35:07 UTC 2012 - [email protected]
+
+- Renamed spec/changes file to OBS package name to please factory-auto review
+- Added spec file license header
+- Set license to SDPX style (GPL-2.0+
+
+-------------------------------------------------------------------
+Mon May 17 14:26:35 UTC 2010 - [email protected]
+
+- initial package of version 0.1
+ sha256sum verification only supported atm
+
New:
----
obs-service-verify_file.changes
obs-service-verify_file.spec
verify_file
verify_file.service
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obs-service-verify_file.spec ++++++
#
# spec file for package obs-service-verify_file
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: obs-service-verify_file
Version: 0.1
Release: 0
Url: http://build.opensuse.org
Summary: An OBS source service: file verification
License: GPL-2.0+
Group: Development/Tools/Building
Source: verify_file
Source1: verify_file.service
Requires: coreutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
This is a source service for openSUSE Build Service.
It allows to verify a file with a given sha256sum
%prep
%setup -q -D -T 0 -n .
%build
%install
mkdir -p %{buildroot}%{_prefix}/lib/obs/service
install -m 0755 %{SOURCE0} %{buildroot}%{_prefix}/lib/obs/service
install -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/obs/service
%files
%defattr(-,root,root)
%dir %{_prefix}/lib/obs
%{_prefix}/lib/obs/service
%changelog
++++++ verify_file ++++++
#!/bin/bash
# Verify a given file with given check
# This could get extended with gpg verification for example.
# defaults
MYVERIFIER="sha256"
MYSUM=""
MYFILE=""
while test $# -gt 0; do
case $1 in
*-verifier)
MYVERIFIER="$2"
shift
;;
*-checksum|*-check-sum)
MYSUM="$2"
shift
;;
*-file)
MYFILE="$2"
shift
;;
*-outdir)
MYOUTDIR="$2"
shift
;;
*)
echo Unknown parameter $1.
echo 'Usage: verify_file --verifier sha256 --checksum
e712bbcbc05a707c32eb70fa4a3b0e13b6f0cc11227ff7e4451401e5a49cc729 --outdir $OUT'
echo NOTE: outdir is just a dummy, this service is just for verifing and
fails in error case
exit 1
;;
esac
shift
done
FILE="${PATH##*/}"
if [ -z "$MYSUM" ]; then
echo "ERROR: no checksum given!"
exit 1
fi
if [ -z "$MYFILE" ]; then
echo "ERROR: no file is given via --file parameter!"
exit 1
fi
filesum=`sha256sum "$MYFILE" | cut -f1 -d\ `
exec test "$filesum" = "$MYSUM"
++++++ verify_file.service ++++++
<service name="verify_file">
<summary>Verify a file</summary>
<description>The service verfies a file against a given checksum to detect
file changes.</description>
<parameter name="verifier">
<description>Used Verification</description>
<allowedvalue>sha256</allowedvalue>
<allowedvalue>md5</allowedvalue>
</parameter>
<parameter name="checksum">
<description>Used check sum to compare with</description>
<required/>
</parameter>
</service>
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]