Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with patching surf.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
SavedElijah
n00b
n00b


Joined: 19 Jun 2024
Posts: 10

PostPosted: Mon Jun 24, 2024 4:24 pm    Post subject: Problem with patching surf. Reply with quote

Theres a problem with patching surf, I need some help.


Code:
patching file config.def.h
Hunk #1 succeeded at 36 with fuzz 2 (offset -7 lines).
patching file surf.c
Hunk #1 succeeded at 50 with fuzz 2.
Hunk #2 FAILED at 79.
Hunk #3 succeeded at 1105 (offset -12 lines).
Hunk #4 succeeded at 1164 (offset -14 lines).
1 out of 4 hunks FAILED -- saving rejects to file surf.c.rej                                                                                                                                         [ !! ]
 * ERROR: www-client/surf-2.1-r3::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff
 *
 * Call stack:
 *               ebuild.sh, line  136:  Called src_prepare
 *             environment, line 1755:  Called default
 *      phase-functions.sh, line  873:  Called default_src_prepare
 *      phase-functions.sh, line  949:  Called __eapi8_src_prepare
 *             environment, line  340:  Called eapply_user
 *             environment, line  651:  Called eapply '/etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff'
 *             environment, line  614:  Called _eapply_patch '/etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff'
 *             environment, line  552:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
 *
 * If you need support, post the output of `emerge --info '=www-client/surf-2.1-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/surf-2.1-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-client/surf-2.1-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/surf-2.1-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/www-client/surf-2.1-r3/work/surf-2.1'
 * S: '/var/tmp/portage/www-client/surf-2.1-r3/work/surf-2.1'

 * Messages for package www-client/surf-2.1-r3:

 * ERROR: www-client/surf-2.1-r3::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff
 *
 * Call stack:
 *               ebuild.sh, line  136:  Called src_prepare
 *             environment, line 1755:  Called default
 *      phase-functions.sh, line  873:  Called default_src_prepare
 *      phase-functions.sh, line  949:  Called __eapi8_src_prepare
 *             environment, line  340:  Called eapply_user
 *             environment, line  651:  Called eapply '/etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff'
 *             environment, line  614:  Called _eapply_patch '/etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff'
 *             environment, line  552:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
 *
 * If you need support, post the output of `emerge --info '=www-client/surf-2.1-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/surf-2.1-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-client/surf-2.1-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/surf-2.1-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/www-client/surf-2.1-r3/work/surf-2.1'
 * S: '/var/tmp/portage/www-client/surf-2.1-r3/work/surf-2.1'
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22740

PostPosted: Mon Jun 24, 2024 4:45 pm    Post subject: Re: Problem with patching surf. Reply with quote

SavedElijah wrote:
Theres a problem with patching surf, I need some help.
Code:
patching file config.def.h
Hunk #1 succeeded at 36 with fuzz 2 (offset -7 lines).
patching file surf.c
Hunk #1 succeeded at 50 with fuzz 2.
Hunk #2 FAILED at 79.
Hunk #3 succeeded at 1105 (offset -12 lines).
Hunk #4 succeeded at 1164 (offset -14 lines).
1 out of 4 hunks FAILED -- saving rejects to file surf.c.rej                                                                                                                                         [ !! ]
 * ERROR: www-client/surf-2.1-r3::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff
Your local administrator configured Portage to use a custom patch, but this patch does not apply. Remove the patch, or update it to be compatible with the surf you are trying to emerge.

If you need help updating the patch, then we need more information. From where did you get it? What does it do?
Back to top
View user's profile Send private message
SavedElijah
n00b
n00b


Joined: 19 Jun 2024
Posts: 10

PostPosted: Mon Jun 24, 2024 4:46 pm    Post subject: Re: Problem with patching surf. Reply with quote

Hu wrote:
SavedElijah wrote:
Theres a problem with patching surf, I need some help.
Code:
patching file config.def.h
Hunk #1 succeeded at 36 with fuzz 2 (offset -7 lines).
patching file surf.c
Hunk #1 succeeded at 50 with fuzz 2.
Hunk #2 FAILED at 79.
Hunk #3 succeeded at 1105 (offset -12 lines).
Hunk #4 succeeded at 1164 (offset -14 lines).
1 out of 4 hunks FAILED -- saving rejects to file surf.c.rej                                                                                                                                         [ !! ]
 * ERROR: www-client/surf-2.1-r3::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff
Your local administrator configured Portage to use a custom patch, but this patch does not apply. Remove the patch, or update it to be compatible with the surf you are trying to emerge.

If you need help updating the patch, then we need more information. From where did you get it? What does it do?



I got it from the suckless website. The patch adds a proxy to surf.

suckless.org/patches
Back to top
View user's profile Send private message
SavedElijah
n00b
n00b


Joined: 19 Jun 2024
Posts: 10

PostPosted: Mon Jun 24, 2024 4:48 pm    Post subject: Re: Problem with patching surf. Reply with quote

Hu wrote:
SavedElijah wrote:
Theres a problem with patching surf, I need some help.
Code:
patching file config.def.h
Hunk #1 succeeded at 36 with fuzz 2 (offset -7 lines).
patching file surf.c
Hunk #1 succeeded at 50 with fuzz 2.
Hunk #2 FAILED at 79.
Hunk #3 succeeded at 1105 (offset -12 lines).
Hunk #4 succeeded at 1164 (offset -14 lines).
1 out of 4 hunks FAILED -- saving rejects to file surf.c.rej                                                                                                                                         [ !! ]
 * ERROR: www-client/surf-2.1-r3::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/www-client/surf-2.1-r3/surf-proxyconfig-20210503-7dcce9e.diff
Your local administrator configured Portage to use a custom patch, but this patch does not apply. Remove the patch, or update it to be compatible with the surf you are trying to emerge.

If you need help updating the patch, then we need more information. From where did you get it? What does it do?



I got it from the suckless website. The patch adds a proxy to surf.

suckless.org/patches
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22740

PostPosted: Mon Jun 24, 2024 5:00 pm    Post subject: Reply with quote

https://suckless.org/patches returns a 404 for me.

Suckless software is infamous for this problem. You probably either need a patch for a different version, a prerequisite patch first, or you are applying some other suckless patch that conflicts with this one.
Back to top
View user's profile Send private message
SavedElijah
n00b
n00b


Joined: 19 Jun 2024
Posts: 10

PostPosted: Mon Jun 24, 2024 5:10 pm    Post subject: Reply with quote

Hu wrote:
https://suckless.org/patches returns a 404 for me.

Suckless software is infamous for this problem. You probably either need a patch for a different version, a prerequisite patch first, or you are applying some other suckless patch that conflicts with this one.


Oops! Sorry, the website should be https://suckless.org/patches/proxyconfig/.
Is there any work around for this? For your information, this is the only version of this patch and no other patches are applied. Thank you!
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 661

PostPosted: Mon Jun 24, 2024 6:05 pm    Post subject: Reply with quote

SavedElijah wrote:
Is there any work around for this?

The only solution is to apply the patch manually, it's only 100 lines or so in 5 chunks total, so it should be fairly easy to do.

You can use the ebuild command to go through "some of the emerge process" then stop, at which point you duplicate and tinker with the code, use diff to make an (potential) updated patch, then check it compiles. The order in which I do these things:
  • run ebuild /var/db/repos/gentoo/category/package/package-version.ebuild prepare
  • navigate to the "work" directory (as indicated by ebuild)
  • duplicate the sources (cp -aux package-version a ; cp -aux package-version b)
  • manually patch/tinker the source in ../work/b/[some stuff]
  • run diff -ur a b > ~/patchtests/package-version-function.patch
  • move the patched source to the "active" directory (rm -rf package-version; cp -aux b package-version)
  • Check it compiles (run ebuild /var/db/repos/gentoo/category/package/package-version.ebuild compile)

Now you should have a patch you can move to the correct location to have portage use. If you mess up you can run ebuild [path to ebuild] clean prepare to start again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum