rpms/grip/devel grip-3.2.0-lookup.patch, NONE, 1.1 grip.spec, 1.17, 1.18
Adrian Reber (adrian)
fedora-extras-commits at redhat.com
Mon Sep 3 12:26:23 UTC 2007
Author: adrian
Update of /cvs/extras/rpms/grip/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28622
Modified Files:
grip.spec
Added Files:
grip-3.2.0-lookup.patch
Log Message:
* Mon Sep 03 2007 Adrian Reber <adrian at lisas.de> - 1:3.2.0-17
- search for ripper and encoder executables in path (#249150)
- updated License:
grip-3.2.0-lookup.patch:
--- NEW FILE grip-3.2.0-lookup.patch ---
diff -ur grip-3.2.0/src/gripcfg.c grip-3.2.0.new/src/gripcfg.c
--- grip-3.2.0/src/gripcfg.c 2007-07-23 09:49:12.000000000 +0200
+++ grip-3.2.0.new/src/gripcfg.c 2007-07-23 09:50:46.000000000 +0200
@@ -62,13 +62,6 @@
{"",""}
};
-static CFGEntry encoder_cfg_entries[]={
- {"name",CFG_ENTRY_STRING,256,NULL},
- {"cmdline",CFG_ENTRY_STRING,256,NULL},
- {"exe",CFG_ENTRY_STRING,256,NULL},
- {"extension",CFG_ENTRY_STRING,10,NULL}
-};
-
static void UseProxyChanged(GtkWidget *widget,gpointer data)
{
GripInfo *ginfo;
@@ -781,7 +774,7 @@
};
#ifdef CDPAR
- if(ripcfg==0) return;
+ if(ripcfg==0) return TRUE;
#endif
sprintf(buf,"%s/%s-%s",getenv("HOME"),ginfo->config_filename,
@@ -825,6 +818,9 @@
if(LoadEncoderConfig(ginfo,ginfo->selected_encoder)) {
strcpy(buf,ginfo->mp3exename);
+ /* in addition to searching the path during rip and encode
+ * also do a path lookup of the executable during config switches */
+ FindExeInPath(ginfo->mp3exename, buf, sizeof(buf));
gtk_entry_set_text(GTK_ENTRY(uinfo->mp3exename_entry),buf);
strcpy(buf,ginfo->mp3cmdline);
diff -ur grip-3.2.0/src/rip.c grip-3.2.0.new/src/rip.c
--- grip-3.2.0/src/rip.c 2004-04-15 20:21:15.000000000 +0200
+++ grip-3.2.0.new/src/rip.c 2007-07-23 09:47:34.000000000 +0200
@@ -1100,8 +1100,6 @@
{
static char res[PATH_MAX];
EncodeTrack *enc_track;
- gchar *conv_str,*st;
- gsize rb,wb;
enc_track=(EncodeTrack *)data;
@@ -1250,12 +1248,17 @@
{
GripInfo *ginfo;
gboolean result;
+ char buf[sizeof(ginfo->ripexename) > sizeof(ginfo->mp3exename) ? sizeof(ginfo->ripexename) : sizeof(ginfo->mp3exename)];
ginfo=(GripInfo *)data;
if(widget) ginfo->doencode=FALSE;
else ginfo->doencode=TRUE;
+ /* Let's find the ripper in the path; this changes the config */
+ FindExeInPath(ginfo->ripexename, buf, sizeof(buf));
+ strncpy(ginfo->ripexename, buf, sizeof(ginfo->ripexename));
+
if(!ginfo->using_builtin_cdp&&!FileExists(ginfo->ripexename)) {
DisplayMsg(_("Invalid rip executable\nCheck your rip config"));
@@ -1263,6 +1266,9 @@
return;
}
+ /* the same for mp3exename */
+ FindExeInPath(ginfo->mp3exename, buf, sizeof(buf));
+ strncpy(ginfo->mp3exename, buf, sizeof(ginfo->mp3exename));
if(ginfo->doencode&&!FileExists(ginfo->mp3exename)) {
DisplayMsg(_("Invalid encoder executable\nCheck your encoder config"));
@@ -1504,8 +1510,9 @@
ginfo->rippid=fork();
if(ginfo->rippid==0) {
+ int i;
CloseStuff(ginfo);
- nice(ginfo->ripnice);
+ i=nice(ginfo->ripnice);
execv(ginfo->ripexename,char_args);
LogStatus(ginfo,_("Exec failed\n"));
@@ -1539,6 +1546,7 @@
int paranoia_mode;
int dup_output_fd;
FILE *output_fp;
+ int i;
ginfo=(GripInfo *)arg;
@@ -1559,7 +1567,7 @@
ginfo->rip_smile_level=0;
- nice(ginfo->ripnice);
+ i=nice(ginfo->ripnice);
dup_output_fd=dup(GetStatusWindowPipe(ginfo->gui_info.rip_status_window));
output_fp=fdopen(dup_output_fd,"w");
@@ -1742,9 +1750,10 @@
ginfo->mp3pid[cpu]=fork();
if(ginfo->mp3pid[cpu]==0) {
+ int i;
CloseStuff(ginfo);
setsid();
- nice(ginfo->mp3nice);
+ i=nice(ginfo->mp3nice);
execv(ginfo->mp3exename,char_args);
_exit(0);
}
Index: grip.spec
===================================================================
RCS file: /cvs/extras/rpms/grip/devel/grip.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- grip.spec 17 Mar 2007 11:34:08 -0000 1.17
+++ grip.spec 3 Sep 2007 12:25:50 -0000 1.18
@@ -1,9 +1,9 @@
Summary: Front-end for CD rippers and Ogg Vorbis encoders
Name: grip
Version: 3.2.0
-Release: 16%{?dist}
+Release: 17%{?dist}
Epoch: 1
-License: GPL
+License: GPLv2+
Group: Applications/Multimedia
Source0: http://dl.sf.net/grip/grip-%{version}.tar.gz
Source1: grip.1
@@ -12,6 +12,7 @@
Patch3: grip-3.2.0-id3.c.patch
Patch4: grip.desktop.patch
Patch5: grip-64bit-fix.patch
+Patch6: grip-3.2.0-lookup.patch
URL: http://www.nostatic.org/grip/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: vorbis-tools
@@ -33,6 +34,7 @@
%patch3 -p1 -b .id3
%patch4
%patch5
+%patch6 -p1
%build
%configure
@@ -74,6 +76,10 @@
%{_mandir}/man1/*
%changelog
+* Mon Sep 03 2007 Adrian Reber <adrian at lisas.de> - 1:3.2.0-17
+- search for ripper and encoder executables in path (#249150)
+- updated License:
+
* Wed Jan 17 2007 Adrian Reber <adrian at lisas.de> - 1:3.2.0-16
- fixes for #220777, #222574, #232755
More information about the fedora-extras-commits
mailing list