Accepting request 201212 from home:rmilasan:branches:devel:libraries:c_c++
- Use LIBMTP_ERROR instead of LIBMTP_INFO function in mtpz_loaddata (mtpz.c) to dont get junk in the udev rule when generating the rule. add: mtpz-use-LIBMTP_ERROR-instead-of-LIBMTP_INFO.patch OBS-URL: https://build.opensuse.org/request/show/201212 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libmtp?expand=0&rev=61
This commit is contained in:
parent
a74028ea98
commit
108480f16f
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 27 19:54:22 UTC 2013 - rmilasan@suse.com
|
||||
|
||||
- Use LIBMTP_ERROR instead of LIBMTP_INFO function in mtpz_loaddata
|
||||
(mtpz.c) to dont get junk in the udev rule when generating the rule.
|
||||
add: mtpz-use-LIBMTP_ERROR-instead-of-LIBMTP_INFO.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 15 09:28:44 UTC 2013 - meissner@suse.com
|
||||
|
||||
|
@ -30,6 +30,7 @@ Version: 1.1.6
|
||||
Release: 0
|
||||
%define sonum 9
|
||||
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: mtpz-use-LIBMTP_ERROR-instead-of-LIBMTP_INFO.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%define _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d
|
||||
%define _udevdir %(pkg-config --variable=udevdir udev)
|
||||
@ -75,6 +76,7 @@ Transfer Protocol) authored by Microsoft.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure --with-udev=%{_udevdir} --disable-static --enable-doxygen
|
||||
|
80
mtpz-use-LIBMTP_ERROR-instead-of-LIBMTP_INFO.patch
Normal file
80
mtpz-use-LIBMTP_ERROR-instead-of-LIBMTP_INFO.patch
Normal file
@ -0,0 +1,80 @@
|
||||
Index: libmtp-1.1.6/src/mtpz.c
|
||||
===================================================================
|
||||
--- libmtp-1.1.6.orig/src/mtpz.c
|
||||
+++ libmtp-1.1.6/src/mtpz.c
|
||||
@@ -119,7 +119,7 @@ int mtpz_loaddata()
|
||||
char *home = getenv("HOME");
|
||||
if (!home)
|
||||
{
|
||||
- LIBMTP_INFO("Unable to determine user's home directory, MTPZ disabled");
|
||||
+ LIBMTP_ERROR("Unable to determine user's home directory, MTPZ disabled");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ int mtpz_loaddata()
|
||||
FILE *fdata = fopen(path, "r");
|
||||
if (!fdata)
|
||||
{
|
||||
- LIBMTP_INFO("Unable to open ~/.mtpz-data for reading, MTPZ disabled.");
|
||||
+ LIBMTP_ERROR("Unable to open ~/.mtpz-data for reading, MTPZ disabled.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ int mtpz_loaddata()
|
||||
MTPZ_PUBLIC_EXPONENT = (unsigned char *)fgets_strip((char *)malloc(8), 8, fdata);
|
||||
if (!MTPZ_PUBLIC_EXPONENT)
|
||||
{
|
||||
- LIBMTP_INFO("Unable to read MTPZ public exponent from ~/.mtpz-data, MTPZ disabled");
|
||||
+ LIBMTP_ERROR("Unable to read MTPZ public exponent from ~/.mtpz-data, MTPZ disabled");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -146,20 +146,20 @@ int mtpz_loaddata()
|
||||
char *hexenckey = (unsigned char *)fgets_strip((char *)malloc(35), 35, fdata);
|
||||
if (!hexenckey)
|
||||
{
|
||||
- LIBMTP_INFO("Unable to read MTPZ encryption key from ~/.mtpz-data, MTPZ disabled");
|
||||
+ LIBMTP_ERROR("Unable to read MTPZ encryption key from ~/.mtpz-data, MTPZ disabled");
|
||||
return -1;
|
||||
}
|
||||
MTPZ_ENCRYPTION_KEY = hex_to_bytes(hexenckey, strlen(hexenckey));
|
||||
if (!MTPZ_ENCRYPTION_KEY)
|
||||
{
|
||||
- LIBMTP_INFO("Unable to read MTPZ encryption key from ~/.mtpz-data, MTPZ disabled");
|
||||
+ LIBMTP_ERROR("Unable to read MTPZ encryption key from ~/.mtpz-data, MTPZ disabled");
|
||||
}
|
||||
|
||||
// Should only be 256 characters in length, but fgets will encounter a newline and stop.
|
||||
MTPZ_MODULUS = (unsigned char *)fgets_strip((char *)malloc(260), 260, fdata);
|
||||
if (!MTPZ_MODULUS)
|
||||
{
|
||||
- LIBMTP_INFO("Unable to read MTPZ modulus from ~/.mtpz-data, MTPZ disabled");
|
||||
+ LIBMTP_ERROR("Unable to read MTPZ modulus from ~/.mtpz-data, MTPZ disabled");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ int mtpz_loaddata()
|
||||
MTPZ_PRIVATE_KEY = (unsigned char *)fgets_strip((char *)malloc(260), 260, fdata);
|
||||
if (!MTPZ_PRIVATE_KEY)
|
||||
{
|
||||
- LIBMTP_INFO("Unable to read MTPZ private key from ~/.mtpz-data, MTPZ disabled");
|
||||
+ LIBMTP_ERROR("Unable to read MTPZ private key from ~/.mtpz-data, MTPZ disabled");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -175,13 +175,13 @@ int mtpz_loaddata()
|
||||
char *hexcerts = fgets_strip((char *)malloc(1260), 1260, fdata);
|
||||
if (!hexcerts)
|
||||
{
|
||||
- LIBMTP_INFO("Unable to read MTPZ certificates from ~/.mtpz-data, MTPZ disabled");
|
||||
+ LIBMTP_ERROR("Unable to read MTPZ certificates from ~/.mtpz-data, MTPZ disabled");
|
||||
return -1;
|
||||
}
|
||||
MTPZ_CERTIFICATES = hex_to_bytes(hexcerts, strlen(hexcerts));
|
||||
if (!MTPZ_CERTIFICATES)
|
||||
{
|
||||
- LIBMTP_INFO("Unable to parse MTPZ certificates from ~/.mtpz-data, MTPZ disabled");
|
||||
+ LIBMTP_ERROR("Unable to parse MTPZ certificates from ~/.mtpz-data, MTPZ disabled");
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user