You are not logged in.

#1 2016-04-25 14:13:14

itscience
Member
From: UK Lancashire
Registered: 2015-05-10
Posts: 32

Using a desktop patch on i3wm from the repo?

I found a patch from github and I wanna try it out.
https://github.com/ashinkarov/i3-extras … /README.md
the README.MD says to do this:

Download and unzip the i3 source code (this patch is made for version 4.11, can't say if/when newer versions will break it).
Apply the patch:
$ patch -p1 < /path/to/i3-desktop.patch

I'm not sure how to apply this to the source code. I linked the file downloaded from github and tried the code anyway and only got this message:

$patch -p1 < ~/Downloads/i3-desktop.patch 
patch: **** Only garbage was found in the patch input.

Could anyone give me some advice on what to do and if this code will actually work?
Thanks for reading :-)

Offline

#2 2016-04-25 15:46:36

sesese9
Member
From: California, United States
Registered: 2015-04-01
Posts: 75
Website

Re: Using a desktop patch on i3wm from the repo?

Did you build i3 from source in a directory? I use dwm but patch is the same across both window managers. I have a git clone of dwm and I build it from source.

How it probably should be done:
1. Git clone i3 into a directory (possibly /home/<username>/i3-custom/
2. cd into directory
3. patch according to directory
4. make install


Just trying to figure things out in this world

Offline

#3 2016-04-25 16:02:33

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: Using a desktop patch on i3wm from the repo?

Don't do as above, just modify the PKGBUILD

https://wiki.archlinux.org/index.php/Ge … s_from_SVN
https://wiki.archlinux.org/index.php/Patching_in_ABS

Last edited by Alad (2016-04-25 16:02:56)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#4 2016-04-26 18:59:57

sesese9
Member
From: California, United States
Registered: 2015-04-01
Posts: 75
Website

Re: Using a desktop patch on i3wm from the repo?

Alad's way is the best way. I still need to learn to patch from ABS which does make things easier!


Just trying to figure things out in this world

Offline

#5 2016-04-26 19:00:05

itscience
Member
From: UK Lancashire
Registered: 2015-05-10
Posts: 32

Re: Using a desktop patch on i3wm from the repo?

Hi, Alad. Thanks for the links!

I must of read it 5 times but I think I got the hang of it. However, something odd happened and I hoped you could help me
I type in the following commands:

svn  checkout --depth=empty svn://svn.archlinux.org/community
cd    community
svn  update i3-wm
cd    i3-wm/repos/community-x86_64/
nano PKGBUILD

I edit the PKGBUILD to look like this:

source=("http://i3wm.org/downloads/${_pkgsourcename}-${pkgver}.tar.bz2"
"http://i3wm.org/downloads/${_pkgsourcename}-${pkgver}.tar.bz2.asc"
"https://github.com/ashinkarov/i3-extras/blob/master/i3-desktop-patch/i3-desktop.patch")

prepare() {
  "cd $srcdir/$_pkgsourcename-$pkgver"
  patch -p1 < i3-desktop.patch

next I type updpkgsums and with the next command I get this:

makepkg --skipinteg
==> Making package: i3-wm 4.12-1 (Tue 26 Apr 18:29:25 BST 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found i3-4.12.tar.bz2
  -> Found i3-4.12.tar.bz2.asc
  -> Found i3-desktop.patch
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Extracting i3-4.12.tar.bz2 with bsdtar
==> Starting prepare()...
/home/user/community/i3-wm/repos/community-x86_64/PKGBUILD: line 79: patch i3-desktop.patch: command not found
==> ERROR: A failure occurred in prepare().
    Aborting...

I've tried a few extentions other than -p1 (Np1, p2) and it comes with the same thing.
is it looking in the src/i3-4.12 directory? A link to the file is only in the /src while the original is the directory before that.

I did try changing it to this:

prepare() {
  cd $srcdir
  patch -p1 < i3-desktop.patch
}

But it only says its 'garbage'.
What am I doing wrong?

EDIT:
I put the i3-desktop.patch file manually into the 13-4.12 folder and still did the same.
I tried 4.11 version which the patch said was what it was designed for but same result. If anyone knows what I did wrong, I'd appreciate the help 0:-)
otherwise It must be a bad patch..

Last edited by itscience (2016-04-26 19:18:38)

Offline

#6 2016-04-27 18:01:11

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: Using a desktop patch on i3wm from the repo?

/home/user/community/i3-wm/repos/community-x86_64/PKGBUILD: line 79: patch i3-desktop.patch: command not found

the "command not found" could very well mean patch is not installed on your system.

which patch is a simple way to verify you do have a patch command installed.
If it can't find patch, do a "pacman -Syu base-devel" .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2016-04-28 01:23:57

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Using a desktop patch on i3wm from the repo?

The changes to the PKGBUILD have to look like this to work:

source+=('https://raw.githubusercontent.com/ashinkarov/i3-extras/master/i3-desktop-patch/i3-desktop.patch')
md5sums+=('e31d9393dcd3a9f5e26c819a66acf477')
prepare() {
  cd "$srcdir/$_pkgsourcename-$pkgver"
  patch -p1 < "$srcdir/i3-desktop.patch"
}

This has to be inserted in front of the line where you see "build() {" in the original PKGBUILD.

The bad news is that this patch does not work with i3-wm version 4.12. It is for the previous version. What you could do is go back to the previous version of i3. This is very easy because you have already prepared that SVN stuff.

What you do is, you go into "community/i3-wm/trunk/" inside that SVN structure you have. You can look at old revisions with "svn log --limit=5", and you change to the one you want with "svn update -r143928". That "143928" is the revision I see here for 4.11 in the "svn log" output.

Last edited by Ropid (2016-04-28 01:24:56)

Offline

Board footer

Powered by FluxBB