leamas / lpf

lpf - Local Package Factory
MIT License
61 stars 6 forks source link

build process waiting for RPM input #24

Closed 6d61726b760a closed 9 years ago

6d61726b760a commented 10 years ago

Hi,

Had an issue trying to install the spotify client.

It seemed to be doing all the right things, however it wasnt until i checked the logs that i realised yum was waiting for a "y" to proceed with the install..

Log below

$ tail -f /var/lib/lpf/log/spotify-client.log
Loaded plugins: langpacks, refresh-packagekit
Getting requirements for /usr/share/lpf/packages/spotify-client/spotify-client.spec
 --> Already installed : desktop-file-utils-0.22-1.fc20.x86_64
 --> Already installed : python-devel-2.7.5-11.fc20.x86_64
 --> redhat-lsb-core-4.1-21.fc20.x86_64
--> Running transaction check
---> Package redhat-lsb-core.x86_64 0:4.1-21.fc20 will be installed
--> Processing Dependency: redhat-lsb-submod-security(x86-64) = 4.1-21.fc20 for package: redhat-lsb-core-4.1-21.fc20.x86_64
--> Processing Dependency: spax for package: redhat-lsb-core-4.1-21.fc20.x86_64
--> Running transaction check
---> Package redhat-lsb-submod-security.x86_64 0:4.1-21.fc20 will be installed
---> Package spax.x86_64 0:1.5.2-8.fc20 will be installed
--> Finished Dependency Resolution                                                                                                                                                                                                           

Dependencies Resolved                                                                                                                                                                                                                        

================================================================================                                                                                                                                                             
 Package                        Arch       Version            Repository   Size                                                                                                                                                              
================================================================================                                                                                                                                                             
Installing:                                                                                                                                                                                                                                  
 redhat-lsb-core                x86_64     4.1-21.fc20        updates      37 k                                                                                                                                                              
Installing for dependencies:                                                                                                                                                                                                                 
 redhat-lsb-submod-security     x86_64     4.1-21.fc20        updates      15 k                                                                                                                                                              
 spax                           x86_64     1.5.2-8.fc20       fedora      259 k                                                                                                                                                              

Transaction Summary                                                                                                                                                                                                                          
================================================================================                                                                                                                                                             
Install  1 Package (+2 Dependent packages)                                                                                                                                                                                                   

Total download size: 311 k                                                                                                                                                                                                                   
Installed size: 635 k                                                                                                                                                                                                                        
Is this ok [y/d/N]:

it hung here for a little while and at this point that i switched back to the terminal where i was running DISPLAY= lpf update and pressed y and enter after which the install appeared to continue as normal

 Downloading packages:                                                                                                                                                                                                    
--------------------------------------------------------------------------------                                                                                                                                                             
Total                                              184 kB/s | 311 kB  00:01                                                                                                                                                                  
Running transaction check                                                                                                                                                                                                                    
Running transaction test                                                                                                                                                                                                                     
Transaction test succeeded                                                                                                                                                                                                                   
Running transaction
  Installing : spax-1.5.2-8.fc20.x86_64                                     1/3 
  Installing : redhat-lsb-submod-security-4.1-21.fc20.x86_64                2/3 
  Installing : redhat-lsb-core-4.1-21.fc20.x86_64                           3/3 
  Verifying  : redhat-lsb-core-4.1-21.fc20.x86_64                           1/3 
  Verifying  : redhat-lsb-submod-security-4.1-21.fc20.x86_64                2/3 
  Verifying  : spax-1.5.2-8.fc20.x86_64                                     3/3 

Installed:
  redhat-lsb-core.x86_64 0:4.1-21.fc20                                          

Dependency Installed:
  redhat-lsb-submod-security...
leamas commented 10 years ago

Hi!

Thanks for reporting!

This seems to be a missing '-y' option to yum-builddep. CAn't really understand how this has worked for anyone, seems like a bad bug. Could you possibly make a try after applying the following patch?

diff --git a/scripts/lpf-sudo-builddep b/scripts/lpf-sudo-builddep
index cde80ed..403b562 100755
--- a/scripts/lpf-sudo-builddep
+++ b/scripts/lpf-sudo-builddep
@@ -18,7 +18,7 @@ for spec in "$@"; do
     fi
 done

-[ "$good_specs" ] && /usr/bin/yum-builddep $good_specs
+[ "$good_specs" ] && /usr/bin/yum-builddep -y $good_specs

 # vim: set expandtab ts=4 sw=4:
diff --git a/scripts/mockbuild-helper b/scripts/mockbuild-helper
index 2924a47..f00f6a5 100755
--- a/scripts/mockbuild-helper
+++ b/scripts/mockbuild-helper
@@ -58,7 +58,7 @@ for pkgdir in ${pkgdirs[@]}; do
     cp $PKG_DATA_DIR/$pkg/SOURCES/* $(pwd) || :
     echo "$pkg: downloading sources" && spectool -g $spec &&
         echo "$pkg: installing build dependencies" &&
-        yum-builddep $spec &&
+        yum-builddep -y $spec &&
         echo "$pkg: building" && \
         rpmbuild ${rpmbuild_opts:-'-bb'} $spec && \
         echo "$pkg: storing results"  &&
6d61726b760a commented 10 years ago

sorry for my slow reply. unfortunately ive never needed to actually apply a patch file before...

some googling tells me it will something along the lines of

$ patch -p1 < {/path/to/patch/file}

which fails:

[root@trogdora Downloads]# patch -p1 < patch.patch 
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/scripts/lpf-sudo-builddep b/scripts/lpf-sudo-builddep
|index cde80ed..403b562 100755
|--- a/scripts/lpf-sudo-builddep
|+++ b/scripts/lpf-sudo-builddep
--------------------------
File to patch: ^C
[root@trogdora Downloads]#

which file am i pointing it at?

leamas commented 10 years ago

Well, you need to be in the right directory for it to work, in this case /usr/share/lpf. Try that first, something like 'cd /usr/share/lpf; sudo patch -p1 < ~/Downloads/patch.patch'

Otherwise, since the changes are easy, you might as well apply them "by hand" by editing /usr/share/lpf/scripts/ilpf-sudo-builddep and /usr/share/lpf/scripts/mockbuild-helper. Just remove the lines with a '-' and add the corresponding '+' line (the rest is context and should be left as-is).

greenrd commented 9 years ago

I tried this patch and it works for me.

parherman commented 9 years ago

Patch works for me too

leamas commented 9 years ago

This is fixed in devel and current fedora packaging.