You are not logged in.
I am doing the following::
- I'm created a directory off of my home directory called 'builds'
- I'm populating that '~/builds' directory with directories of software (eg 'dwm', 'mutt', 'irssi', 'urxvt')
- I'm creating a sub-directory of '~/builds/dwm' called 'patchset', then applying a 'git init', 'git add', 'git commit', 'git push origin master' while inside '~/builds' to host this on my github repo.
- In my chrome browser, I'm seeing all the directories fine in my github account under the 'builds' repo.
- Back on my terminal, in those directories of software titles (eg 'dwm', 'mutt', 'irssi', 'urxvt'), I'm hosting a 'PKGBUILD' file in each of those directories.
- There are also some 'foo.install' and 'foo.desktop' files inside the directories of software.
If you look at this series of commands and outputs:
[mike@vbox dwm]$ pwd
/home/mike/builds/dwm
[mike@vbox dwm]$ ll
total 76K
drwxr-xr-x 2 mike users 4.0K Feb 26 01:44 patchset/
-rw-r--r-- 1 mike users 991 Feb 23 20:48 01.Setup.makefiles.patch
-rw-r--r-- 1 mike users 5.5K Feb 23 20:14 02.Base.config.changes.patch
-rw-r--r-- 1 mike users 749 Feb 23 20:14 03.New.master.patch
-rw-r--r-- 1 mike users 7.3K Feb 23 20:14 04.Xft.patch
-rw-r--r-- 1 mike users 9.7K Feb 23 20:14 05.Statuscolours.patch
-rw-r--r-- 1 mike users 2.2K Feb 23 20:14 06.Cycle.patch
-rw-r--r-- 1 mike users 2.6K Feb 23 20:14 07.Push.patch
-rw-r--r-- 1 mike users 2.8K Feb 23 20:14 08.Fibonacci.patch
-rw-r--r-- 1 mike users 1.8K Feb 26 01:35 PKGBUILD
-rw-r--r-- 1 mike users 8.9K Feb 21 18:22 config.h
-rw-r--r-- 1 mike users 103 Feb 21 18:22 dwm.desktop
-rw-r--r-- 1 mike users 173 Feb 21 18:22 dwm.install
[mike@vbox dwm]$ updpkgsums
==> Retrieving sources...
-> Found 01.Setup.makefiles.patch
-> Found config.h
-> Found dwm.desktop
==> Generating checksums for source files...
[mike@vbox dwm]$ makepkg
==> Making package: dwm-git 6.1.2.g3465bed-1 (Fri Feb 26 01:35:51 PST 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating dwm git repo...
Fetching origin
-> Found 01.Setup.makefiles.patch
-> Found config.h
-> Found dwm.desktop
==> Validating source files with md5sums...
dwm ... Skipped
01.Setup.makefiles.patch ... Passed
config.h ... Passed
dwm.desktop ... Passed
==> Extracting sources...
-> Creating working copy of dwm git repo...
Switched to a new branch 'makepkg'
==> Starting pkgver()...
==> Starting prepare()...
patching file config.mk
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED -- saving rejects to file config.mk.rej
==> ERROR: A failure occurred in prepare().
Aborting...
[mike@vbox dwm]$ Why am I getting this error:
Hunk #1 FAILED at 4
1 out of 1 hunk FAILED -- saving rejects to file config.mk.rej
==> ERROR: A failure occurred in prepare().
AbortingHere is the PKGBUILD:
# $Id: PKGBUILD 60970 2011-12-19 21:33:58Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Dag Odenhall <dag.odenhall@gmail.com>
# Contributor: Grigorios Bouzakis <grbzks@gmail.com>
pkgname=dwm-git
_gitname=dwm
pkgver=6.1.2.g3465bed
pkgrel=1
pkgdesc="A dynamic window manager for X"
url="http://dwm.suckless.org"
arch=('i686' 'x86_64')
license=('MIT')
options=(zipman)
depends=('libx11' 'libxinerama')
makedepends=('git')
install=dwm.install
provides=('dwm')
conflicts=('dwm')
source=('git+http://git.suckless.org/dwm'
'01.Setup.makefiles.patch'
'config.h'
'dwm.desktop')
md5sums=('SKIP'
'aafac72d622d4aaa72ce245b0507a101'
'4f2e17e19feb92b89ba0f8893b811e25'
'939f403a71b6e85261d09fc3412269ee')
pkgver() {
cd $_gitname
git describe --always --tags | sed 's|-|.|g'
}
prepare() {
cd $_gitname
cp $srcdir/config.h config.h
patch -p1 < $srcdir/01.Setup.makefiles.patch
patch -p1 < $srcdir/02.Base.config.changes.patch
patch -p1 < $srcdir/03.New.master.patch
patch -p1 < $srcdir/04.Xft.patch
patch -p1 < $srcdir/05.Statuscolours.patch
patch -p1 < $srcdir/06.Cycle.patch
patch -p1 < $srcdir/07.Push.patch
patch -p1 < $srcdir/08.Fibonacci.patch
sed -i 's/CPPFLAGS =/CPPFLAGS +=/g' config.mk
sed -i 's/CFLAGS = -std/CFLAGS += -std/g' config.mk
}
build() {
cd $_gitname
make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}
package() {
cd $_gitname
make PREFIX=/usr DESTDIR=$pkgdir install
install -m644 -D LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
install -m644 -D README $pkgdir/usr/share/doc/$pkgname/README
install -m644 -D $srcdir/dwm.desktop $pkgdir/usr/share/xsessions/dwm.desktop
}
# vim:set ts=2 sw=2 et:Here is the first patch:
diff --git a/config.mk b/config.mk
index 35fd1e3..ef0f5f0 100644
--- a/config.mk
+++ b/config.mk
@@ -4,22 +4,22 @@ VERSION = 6.1
# Customize below to fit your system
# paths
-PREFIX = /usr/local
+PREFIX = /usr
MANPREFIX = ${PREFIX}/share/man
-X11INC = /usr/X11R6/include
-X11LIB = /usr/X11R6/lib
+X11INC=/usr/include/X11
+X11LIB=/usr/lib/X11
# Xinerama, comment if you don't want it
XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA
# includes and libs
-INCS = -I${X11INC}
-LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS}
+INCS = -I${X11INC} -I/usr/include/freetype2
+LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} -lutil -lXext -lXft -lfontconfig
# flags
-CPPFLAGS = -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
+CPPFLAGS += -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}So if I'm on the right track, I'm trying to host some build instructions using PKGBUILD files, along with a 'patchset' folder in the same directory that provide the patches. My plan would be to maintain any patches, and know that my VCS PKGBUILD files would always pull from the source repo to keep the main code up to date. Is that the general way I could keep my source tweaked and up to date?
Last edited by locrian9 (2016-02-26 10:17:21)
Offline
[code]Please! Use code tags![/code]Edit: thx!
Last edited by ugjka (2016-02-26 11:16:15)
Offline
It looks like the patch could not be applied cleanly according to the error message. The problem file was the config.mk when git tried to apply the patch there were conflicts, you need to delete the config.mk.rej file open up the config.mk and manually apply the patch, then use the command git add config.mk , then commit the change git commit and use git push to push the commit to your github
Offline