Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED] scrollback's patches problems in st-0.8.4

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
mad-lnx
n00b
n00b
User avatar
Posts: 29
Joined: Fri Apr 17, 2020 7:05 pm
Location: Brazil

[SOLVED] scrollback's patches problems in st-0.8.4

  • Quote

Post by mad-lnx » Sun Jul 12, 2020 7:24 am

Hello, guys. How are y'all, guys?

So, I need your help to understand the problem here. I'm applying two scrollback's patches on st-0.8.4 but doesn't works when I restart the st's process. Look the following code below:

Code: Select all

$ doas emerge --ask --verbose x11-terms/st
doas (ghost@gentoo) password:

 * IMPORTANT: 8 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-terms/st-0.8.4::gentoo  USE="savedconfig" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) x11-terms/st-0.8.4::gentoo
>>> Installing (1 of 1) x11-terms/st-0.8.4::gentoo
>>> Jobs: 1 of 1 complete                           Load avg: 0.71, 1.38, 1.42

 * Messages for package x11-terms/st-0.8.4:

 * Package:    x11-terms/st-0.8.4
 * Repository: gentoo
 * Maintainer: jer@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux savedconfig userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox selinux sesandbox userpriv usersandbox
 * Applying 01-st-scrollback-20200419-72e3f6c.diff ...
 * Applying 02-st-scrollback-mouse-20191024-a2c479c.diff ...
 * User patches applied.
 * Checking existence of "/etc/portage/savedconfig/x11-terms/st-0.8.4" ...
 * Found "/etc/portage/savedconfig/x11-terms/st-0.8.4"
 * Building using saved configfile "/etc/portage/savedconfig/x11-terms/st-0.8.4"
 * Your configuration for x11-terms/st-0.8.4 has been saved in
 * "/etc/portage/savedconfig/x11-terms/st-0.8.4" for your editing pleasure.
 * You can edit these files by hand and remerge this package with
 * USE=savedconfig to customise the configuration.
 * You can rename this file/directory to one of the following for
 * its configuration to apply to multiple versions:
 * ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/
 * [${CTARGET}|${CHOST}|""]/${CATEGORY}/[${PF}|${P}|${PN}]
 * Final size of build directory: 472 KiB
 * Final size of installed tree:  144 KiB
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: config file '/etc/pulse/default.pa' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

 * IMPORTANT: 8 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

As you can see, the patches are applied, but when I use it, doesn't works, simply I don't have scroll on st's terminal. Every single time I hit "Shift+PgUp" for example, I write these two characters: 2~


Ah, I used the first method of subtitle named as "Patching" in this following URL:
https://wiki.gentoo.org/wiki/Dwm

For more information, you can find these patches in the following Gentoo's Wiki URL:
st-scrollback-20200419-72e3f6c.diff -> https://st.suckless.org/patches/scrollb ... e3f6c.diff
st-scrollback-mouse-20191024-a2c479c.diff -> https://st.suckless.org/patches/scrollb ... c479c.diff

Thanks so much!

Best regards,
Marcus V.
Last edited by mad-lnx on Wed Jul 15, 2020 11:27 pm, edited 3 times in total.
Top
mad-lnx
n00b
n00b
User avatar
Posts: 29
Joined: Fri Apr 17, 2020 7:05 pm
Location: Brazil

  • Quote

Post by mad-lnx » Wed Jul 15, 2020 6:10 am

Anyone can help me? Am i doing something wrong?

Best regards,
Marcus Vinicius.
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Wed Jul 15, 2020 8:51 am

Title is wrong, it's st not dwm

Anyway, I see you have savedconfig USE flag enabled, you need to edit that config file , in /etc/portage/savedconfig/x11-terms/st-0.8.4
In first patch you have to add keybindings in order for scrollback to work, add those two lines starting with +

Code: Select all

@@ -188,6 +188,8 @@ static Shortcut shortcuts[] = {
 	{ TERMMOD,              XK_Y,           selpaste,       {.i =  0} },
 	{ ShiftMask,            XK_Insert,      selpaste,       {.i =  0} },
 	{ TERMMOD,              XK_Num_Lock,    numlock,        {.i =  0} },
+	{ ShiftMask,            XK_Page_Up,     kscrollup,      {.i = -1} },
+	{ ShiftMask,            XK_Page_Down,   kscrolldown,    {.i = -1} },
 };
same here with second patch to add mouse scrollback

Code: Select all

static MouseShortcut mshortcuts[] = {
 	/* mask                 button   function        argument       release */
+	{ ShiftMask,            Button4, kscrollup,      {.i = 1} },
+	{ ShiftMask,            Button5, kscrolldown,    {.i = 1} },
 	{ XK_ANY_MOD,           Button2, selpaste,       {.i = 0},      1 },
 	{ XK_ANY_MOD,           Button4, ttysend,        {.s = "\031"} },
 	{ XK_ANY_MOD,           Button5, ttysend,        {.s = "\005"} },
Top
charles17
Advocate
Advocate
Posts: 3686
Joined: Sun Mar 02, 2008 3:20 pm

  • Quote

Post by charles17 » Wed Jul 15, 2020 9:11 am

It's also documented in https://wiki.gentoo.org/wiki/St#Configuration.
Top
mad-lnx
n00b
n00b
User avatar
Posts: 29
Joined: Fri Apr 17, 2020 7:05 pm
Location: Brazil

  • Quote

Post by mad-lnx » Wed Jul 15, 2020 7:32 pm

kajzer wrote:Title is wrong, it's st not dwm

Anyway, I see you have savedconfig USE flag enabled, you need to edit that config file , in /etc/portage/savedconfig/x11-terms/st-0.8.4
In first patch you have to add keybindings in order for scrollback to work, add those two lines starting with +

Code: Select all

@@ -188,6 +188,8 @@ static Shortcut shortcuts[] = {
 	{ TERMMOD,              XK_Y,           selpaste,       {.i =  0} },
 	{ ShiftMask,            XK_Insert,      selpaste,       {.i =  0} },
 	{ TERMMOD,              XK_Num_Lock,    numlock,        {.i =  0} },
+	{ ShiftMask,            XK_Page_Up,     kscrollup,      {.i = -1} },
+	{ ShiftMask,            XK_Page_Down,   kscrolldown,    {.i = -1} },
 };
same here with second patch to add mouse scrollback

Code: Select all

static MouseShortcut mshortcuts[] = {
 	/* mask                 button   function        argument       release */
+	{ ShiftMask,            Button4, kscrollup,      {.i = 1} },
+	{ ShiftMask,            Button5, kscrolldown,    {.i = 1} },
 	{ XK_ANY_MOD,           Button2, selpaste,       {.i = 0},      1 },
 	{ XK_ANY_MOD,           Button4, ttysend,        {.s = "\031"} },
 	{ XK_ANY_MOD,           Button5, ttysend,        {.s = "\005"} },
Ooooh, bro, I'm so sorry. My mistake here. I edit it.

I edit the /etc/portage/savedconfig/x11-terms/st-0.8.4 adding these lines and it works. It seems strange to me, because the patches will applied on-the-fly, right? It is strange, because I think it will apply the difference between the st-0.8.4 configuration file and the patches. It's solved, but I need to know more about it... Why didn't work? Everytime I should do these tweaks?

Thanks so much for the explanation.

Best regards,
Marcus Vinicius.
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Wed Jul 15, 2020 9:00 pm

It patches the configuration file as well but if you enable savedconfig USE flag then it would use config file in /etc/portage/savedconfig...

You see.. the problem is that if you don't enable that USE flag then the patches would patch that config file but other customization (like fonts etc.) would be default.
If you enable that USE flag then your customization would always be the same, but you would have to add manually config patches when you add new patches, like what you did now in this case with scrollback.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Wed Jul 15, 2020 11:13 pm

With this package it's easier to just disable savedconfig entirely, edit the config with an outside-portage git tree and apply that as a regular patch.
Top
mad-lnx
n00b
n00b
User avatar
Posts: 29
Joined: Fri Apr 17, 2020 7:05 pm
Location: Brazil

  • Quote

Post by mad-lnx » Wed Jul 15, 2020 11:22 pm

kajzer wrote: It patches the configuration file as well but if you enable savedconfig USE flag then it would use config file in /etc/portage/savedconfig...

You see.. the problem is that if you don't enable that USE flag then the patches would patch that config file but other customization (like fonts etc.) would be default.
If you enable that USE flag then your customization would always be the same, but you would have to add manually config patches when you add new patches, like what you did now in this case with scrollback.
I look the patch and it differences between config.def.h. Maybe that's the problem too, but I understood you. I can simple patch it manually using "patch < [patch-file]" and enable USE flag savedconfig, or insert the code to savedconfig file, or disable it and patch dinamically, or configure a localrepo and put my st code there with my previous customization and apply the patches.

For me, this thread is solved. Really appreciated every single comment. Thanks, guys.

Best regards,
Marcus Vinicius.
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Thu Jul 16, 2020 9:14 am

It's complicated to explain, hope I was clear.
I use it with 'savedconfig' use flag enabled, it's easier to change font , colors and such.
It's not a problem for me to manually add config.def.h parts from the patches I want to apply.
That's usually just a couple of lines to copy/paste.

The other way would be to disable that use flag and then just add patches from upstream, if there's a need to modify some parameters of the patch that could be done in the patch itself, and for fonts and colors one can make a patch for that
Of course, it could be done with 'git clone & make' but there's no need for that in Gentoo, I mean it's silly :D

btw for dwm I made ebuild with numerous patches which could be enabled/disabled with use flags.
That's a nice solution IMHO
I guess I should make one for st as well, I probably will soon.
Top
vcmota
Guru
Guru
Posts: 428
Joined: Mon Jun 19, 2017 7:06 pm

Re: [SOLVED] scrollback's patches problems in st-0.8.4

  • Quote

Post by vcmota » Sun Jul 26, 2020 2:49 am

mad-lnx wrote:Hello, guys. How are y'all, guys?

So, I need your help to understand the problem here. I'm applying two scrollback's patches on st-0.8.4 but doesn't works when I restart the st's process. Look the following code below:

Code: Select all

$ doas emerge --ask --verbose x11-terms/st
doas (ghost@gentoo) password:

 * IMPORTANT: 8 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-terms/st-0.8.4::gentoo  USE="savedconfig" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) x11-terms/st-0.8.4::gentoo
>>> Installing (1 of 1) x11-terms/st-0.8.4::gentoo
>>> Jobs: 1 of 1 complete                           Load avg: 0.71, 1.38, 1.42

 * Messages for package x11-terms/st-0.8.4:

 * Package:    x11-terms/st-0.8.4
 * Repository: gentoo
 * Maintainer: jer@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux savedconfig userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox selinux sesandbox userpriv usersandbox
 * Applying 01-st-scrollback-20200419-72e3f6c.diff ...
 * Applying 02-st-scrollback-mouse-20191024-a2c479c.diff ...
 * User patches applied.
 * Checking existence of "/etc/portage/savedconfig/x11-terms/st-0.8.4" ...
 * Found "/etc/portage/savedconfig/x11-terms/st-0.8.4"
 * Building using saved configfile "/etc/portage/savedconfig/x11-terms/st-0.8.4"
 * Your configuration for x11-terms/st-0.8.4 has been saved in
 * "/etc/portage/savedconfig/x11-terms/st-0.8.4" for your editing pleasure.
 * You can edit these files by hand and remerge this package with
 * USE=savedconfig to customise the configuration.
 * You can rename this file/directory to one of the following for
 * its configuration to apply to multiple versions:
 * ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/
 * [${CTARGET}|${CHOST}|""]/${CATEGORY}/[${PF}|${P}|${PN}]
 * Final size of build directory: 472 KiB
 * Final size of installed tree:  144 KiB
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: config file '/etc/pulse/default.pa' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

 * IMPORTANT: 8 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

As you can see, the patches are applied, but when I use it, doesn't works, simply I don't have scroll on st's terminal. Every single time I hit "Shift+PgUp" for example, I write these two characters: 2~


Ah, I used the first method of subtitle named as "Patching" in this following URL:
https://wiki.gentoo.org/wiki/Dwm

For more information, you can find these patches in the following Gentoo's Wiki URL:
st-scrollback-20200419-72e3f6c.diff -> https://st.suckless.org/patches/scrollb ... e3f6c.diff
st-scrollback-mouse-20191024-a2c479c.diff -> https://st.suckless.org/patches/scrollb ... c479c.diff

Thanks so much!

Best regards,
Marcus V.

I dont understand something: did the patch worked or not after all?

The reason I am asking is that in my view, honestly, it was not supposed to work. Although documentation is minimal for the suckless tools, one thing that always seemed logical is that a given patch was made to work with a specific version of the main package. So, lets say, scrollback-X.patch is suppose to work with st-X. And in my experience EVERYTIME I compile a suckless package with wrong versions of the patches the compilation fails. And the patch you are applying was surely not made for the st-0.8.4 atom, it was likely made for the st-0.8.3 version since the patch dates back to april but st-0.8.4 was released in june. So, it did work or not?
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Sun Jul 26, 2020 7:52 pm

I've upload today dwm with some of the patches, which could be controlled via USE flags.
I can make a similar thing with st, which would include maybe all patches, since there are fewer patches than in dwm, and they are less complicated.
I don't know when though, I haven't even started, it's not a big problem but still it takes a long time to do it.
Point is, it should make things easier with patches.

https://github.com/kajzersoze/dwm
Top
Post Reply

11 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy