View previous topic :: View next topic |
Author |
Message |
mrfree Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Guybrush.gif)
Joined: 15 Mar 2003 Posts: 1303 Location: Europe.Italy.Sulmona
|
Posted: Fri Dec 24, 2004 11:24 am Post subject: Creazione patch per ebuild [RISOLTO] |
|
|
Da premettere che non sono un esperto sulla creazione di ebuild
Ho deciso di modificare un'ebuild per aggiungere una mia micro-patch ma ho qualche problema
La patch l'ho creata nel seguente modo:
Code: | $ diff -aurN gai-temp-0.1.0 gai-temp-0.1.0.mrfree/
diff -aurN gai-temp-0.1.0/readtemp.h gai-temp-0.1.0.mrfree/readtemp.h
--- gai-temp-0.1.0/readtemp.h 2004-09-29 14:08:44.000000000 +0200
+++ gai-temp-0.1.0.mrfree/readtemp.h 2004-12-24 11:36:46.371056504 +0100
@@ -8,7 +8,7 @@
#include <netinet/in.h>
#include <netdb.h>
-#define ACPI_CPU_PATH "/proc/acpi/thermal_zone/THRM/temperature"
+#define ACPI_CPU_PATH "/proc/acpi/thermal_zone/THM0/temperature"
#define DEV_PREFIX_ACPI_CPU "acpi_cpu"
#define DEV_PREFIX_HDDTEMP "hddtemp"
|
NOTA: Ovviamente ho reindirizzato l'output su un file ... mrTHM0.patch
Ho copiato tale file nella directory files dove si trova l'ebuild e ho creato una nuova versione dell'ebuild stessa con il suffisso -r1 aggiungento il codice che segue:
Code: | inherit eutils
src_unpack() {
epatch ${FILESDIR}/mrTHM0.patch
}
|
come indicato nella documentazione per gli sviluppatori gentoo
Emergendo il pacchetto ottengo il seguente errore:
Code: | >>> emerge (1 of 1) x11-plugins/gai-temp-0.1.0-r1 to /
>>> md5 src_uri ;-) gai-temp-0.1.0.tar.gz
>>> Unpacking source...
* Applying mrTHM0.patch ...
* Failed Patch: mrTHM0.patch!
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/gai-temp-0.1.0-r1/temp/mrTHM0.patch-26153.out
!!! ERROR: x11-plugins/gai-temp-0.1.0-r1 failed.
!!! Function epatch, Line 402, Exitcode 0
!!! Failed Patch: mrTHM0.patch!
!!! If you need support, post the topmost build error, NOT this status message. |
Questo è il contenuto del file indicato nel messaggio di errore:
Code: | ***** mrTHM0.patch *****
========================
PATCH COMMAND: patch -p0 -g0 < /usr/local/portage/x11-plugins/gai-temp/files/mrTHM0.patch
========================
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN gai-temp-0.1.0/readtemp.h gai-temp-0.1.0.mrfree/readtemp.h
|--- gai-temp-0.1.0/readtemp.h 2004-09-29 14:08:44.000000000 +0200
|+++ gai-temp-0.1.0.mrfree/readtemp.h 2004-12-24 11:36:46.371056504 +0100
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
========================
PATCH COMMAND: patch -p1 -g0 < /usr/local/portage/x11-plugins/gai-temp/files/mrTHM0.patch
========================
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN gai-temp-0.1.0/readtemp.h gai-temp-0.1.0.mrfree/readtemp.h
|--- gai-temp-0.1.0/readtemp.h 2004-09-29 14:08:44.000000000 +0200
|+++ gai-temp-0.1.0.mrfree/readtemp.h 2004-12-24 11:36:46.371056504 +0100
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
========================
PATCH COMMAND: patch -p2 -g0 < /usr/local/portage/x11-plugins/gai-temp/files/mrTHM0.patch
========================
missing header for unified diff at line 4 of patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN gai-temp-0.1.0/readtemp.h gai-temp-0.1.0.mrfree/readtemp.h
|--- gai-temp-0.1.0/readtemp.h 2004-09-29 14:08:44.000000000 +0200
|+++ gai-temp-0.1.0.mrfree/readtemp.h 2004-12-24 11:36:46.371056504 +0100
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
========================
PATCH COMMAND: patch -p3 -g0 < /usr/local/portage/x11-plugins/gai-temp/files/mrTHM0.patch
========================
missing header for unified diff at line 4 of patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN gai-temp-0.1.0/readtemp.h gai-temp-0.1.0.mrfree/readtemp.h
|--- gai-temp-0.1.0/readtemp.h 2004-09-29 14:08:44.000000000 +0200
|+++ gai-temp-0.1.0.mrfree/readtemp.h 2004-12-24 11:36:46.371056504 +0100
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
========================
PATCH COMMAND: patch -p4 -g0 < /usr/local/portage/x11-plugins/gai-temp/files/mrTHM0.patch
========================
missing header for unified diff at line 4 of patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN gai-temp-0.1.0/readtemp.h gai-temp-0.1.0.mrfree/readtemp.h
|--- gai-temp-0.1.0/readtemp.h 2004-09-29 14:08:44.000000000 +0200
|+++ gai-temp-0.1.0.mrfree/readtemp.h 2004-12-24 11:36:46.371056504 +0100
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
|
In pratica la directory gai-temp-0.1.0 contiene i sorgenti originali mentre gai-temp-0.1.0.mrfree quelli modificati da me, le opzioni che ho usato per diff dovrebbero essere giusto, le ho confrontate con altre patch nel portage e molte usano quest'approccio
Qualche idea? _________________ Please EU, pimp my country!
ICE: /etc/init.d/iptables panic
Last edited by mrfree on Fri Dec 24, 2004 2:04 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
motaboy Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/146642313240262a7185133.png)
Joined: 15 Dec 2003 Posts: 1483
|
Posted: Fri Dec 24, 2004 1:13 pm Post subject: |
|
|
Code: |
inherit eutils
src_unpack() {
epatch ${FILESDIR}/mrTHM0.patch
}
|
Ed il sorgente chi lo scompatta? Devi prima mettere qualcosa tipo
_________________ ... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mrfree Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Guybrush.gif)
Joined: 15 Mar 2003 Posts: 1303 Location: Europe.Italy.Sulmona
|
Posted: Fri Dec 24, 2004 2:04 pm Post subject: |
|
|
Ops...
Adesso funziona, grazie
Ma allora quando la funzione src_unpack() non è presente nell'ebuild emerge decoprime i sorgenti di default? _________________ Please EU, pimp my country!
ICE: /etc/init.d/iptables panic |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
motaboy Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/146642313240262a7185133.png)
Joined: 15 Dec 2003 Posts: 1483
|
Posted: Fri Dec 24, 2004 3:51 pm Post subject: |
|
|
usa le funzioni di default presenti in ebuild.sh _________________ ... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mrfree Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Guybrush.gif)
Joined: 15 Mar 2003 Posts: 1303 Location: Europe.Italy.Sulmona
|
Posted: Fri Dec 24, 2004 4:30 pm Post subject: |
|
|
Ok grazie di nuovo, mi sa che appena ho un po di tempo una bella letta alla documentazione per gli sviluppatori mi ci vorrebbe ![Wink ;)](images/smiles/icon_wink.gif) _________________ Please EU, pimp my country!
ICE: /etc/init.d/iptables panic |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|