[SOLVED]How to patch a kernel using PKGBUILD

Hello guys,
Sorry if my question looks stupid but I'm trying to compile my first kernel following this wiki page and I wonder how to apply a patchset...
The patchset to apply is the ck one and I've downloaded the patch file from http://ck.kolivas.org/patches/3.0/3.3/3 … .3-ck1.bz2 and placed the patch itself at the root of my PKGBUILD folder.
At my first attempt to run makepkg, I could see several 'found xxx.patch' (the other patches which were already in the abs tree) but not my ck patch.
After taking a look in my PKGBUILD file I modified the source instruction as follow to include my pach:
source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.3.tar.xz"
        "http://www.kernel.org/pub/linux/kernel/ … pkgver}.xz"
        # the main kernel config files
        'config' 'config.x86_64'
        # standard config files for mkinitcpio ramdisk
        "${pkgname}.preset"
        'fix-acerhdf-1810T-bios.patch'
        'change-default-console-loglevel.patch'
        'i915-fix-ghost-tv-output.patch'
        'ext4-options.patch'
    'patch-3.3-ck1')
Now when I run makepkg, it founds my patch but right after I get  a md5 cheksum error:
-> Found config
-> Found config.x86_64
-> Found linux-custom.preset
-> Found fix-acerhdf-1810T-bios.patch
-> Found change-default-console-loglevel.patch
-> Found i915-fix-ghost-tv-output.patch
-> Found ext4-options.patch
-> Found patch-3.3-ck1
==> ERROR: Integrity checks (md5) differ in size from the source array.
[sclarckone@archLaptop linux]$
I could disable the checksum in makepkg.conf but maybe I'm doing it wrong so I'd like to know the clean way to do it ;-)
Thanks for your help.
Last edited by sclarckone (2012-04-18 19:42:01)

makepkg -g >> PKGBUILD will do this automatically for ya.  FYI, there is a linux-ck package in the AUR you can use as a model if you wish.

Similar Messages

  • [SOLVED]How to patch the kernel? And other questions

    Like the same user who started this thread I'm suffering from hibernation resuming troubles using kernel 2.6.38. In that thread was posted a soluttion that involves patching the kernel.
    The patch to apply is this:
    http://git.kernel.org/?p=linux/kernel/g … e3e9fc8684
    Waiting for the bug to be corrected and a new version supplied is not an option, because this laptop is my main computer and I heavly rely on hibernation.
    Here's my trouble now. I don't know if it is possible to patch without recompiling the whole kernel, or it has to be compiled with that patch applied. I have seen the archlinux's wiki guide about compiling the kernel, but found nothing about applying patches (maybe I didn't searched with enought depth).
    In case there is needed a full compilation, should I use the vanilla kernel, the Arch Linux one or any of the AUR ones (I said AUR because they're the first that came to my mind)? Should i expect a performance gain with this (apart from fixing the hibernation bug)?
    Maybe i'm just doing a bunch of dumb questions, and the only thing I need is to search deeply on the wiki. In that case, please tell me. If not, I rather get some answers around kernel patching and / or compiling questions.
    Edit: In addittion, it is possible that all this questions are just newbie ones, I don't know, but as I am willing to learn from this I will appreciate any info or documentation about it.
    Thank you.
    Last edited by ethail (2011-04-12 06:30:48)

    From the source tree (/usr/src/linux-whatever) execute
    patch -p1 < /path/to/fix.patch
    then recompile kernel from the source tree.
    Basically that consists of executing the following commands from the source tree:
    make menuconfig
    make
    make modules_install
    cp -v System.map /boot/System.map-CUSTOM
    cp -v arch/x86/boot/bzImage /boot/vmlinuz-CUSTOM
    mkinitcpio -k 2.6.38-CUSTOM -g /boot/kernel-CUSTOM.img
    and you need to add menu entry in /boot/grub/menu.lst
    -k 2.6.38-CUSTOM should corespond to /lib/modules/2.6.38-CUSTOM (replace 2.6.38-CUSTOM with the name of your module directory, name depends on the kernel version and suffix that you gave in menuconfig). Regarding kernel configuration in menuconfig - I can't help you, you could use arch stock kernel config (zcat /proc/config.gz > /usr/src/linux-whatever/.config)
    I do these kind of things this way - maybe someone else have a more elegant solution.

  • [SOLVED] How to patch package build (uzbl-git)

    Hello,
    I am experiencing a similar issue while building uzbl-git as reported here in the last few posts https://aur.archlinux.org/packages.php? … 2&detail=1
    When running "makepkg -s", I receive the following error:
    creating /usr/lib/python3.2/site-packages/uzbl
    error: could not create '/usr/lib/python3.2/site-packages/uzbl': Permission denied
    make: *** [install-event-manager] Error 1
    A user on the page posted a patch for this issue:
    PKGBUILD diff:
    ======
    14,15c14,15
    < source=()
    < md5sums=()
    > source=('Makefile.patch')
    > md5sums=('1fb21dc7128e11d9a91351702c5fee53')
    45a46,48
    >
    > # fix python site-packages installation
    > patch -p0 < "$srcdir/Makefile.patch"
    =====
    Makefile.patch:
    =====
    --- Makefile 2012-06-26 15:00:00.017779376 +0000
    +++ Makefile.fixed 2012-06-26 14:54:24.969594488 +0000
    @@ -12,6 +12,7 @@
    PYTHON=python3
    PYTHONV=$(shell $(PYTHON) --version | sed -n /[0-9].[0-9]/p)
    COVERAGE=$(shell which coverage)
    +PYINSTALL_EXTRA=--prefix="${DESTDIR}${PREFIX}"
    # --- configuration ends here ---
    =====
    Could someone enlighten me on how this patch should be applied? I have looked over the patching page on the arch wiki, but am still not sure. Should those lines be added at lines 14,15 and 45,46,48 in the PKGBUILD, respectively, and should I then create the file makefile.patch in the same directory with the second part of the code? It is unclear to me as both source=() and md5sums=() are not anywhere in the PKGBUILD, so I can't remove these lines as the patch suggests if I am reading it correctly (I have no coding experience).
    Someone posted an alternative patch, I am note sure if this is any easier to apply (https://github.com/keis/uzbl/commit/d4c … 6874dda0ea)
    Thank you in advance.
    Last edited by OLSHoya (2012-09-11 19:51:24)

    PKGBUILD
    # Maintainer: Mark Foxwell <[email protected]>
    # Contributor: Dieter Plaetinck <[email protected]>
    # Contributer: Brendan Taylor <[email protected]>
    # Contributer: L42y <[email protected]>
    pkgname=uzbl-git
    pkgver=20120212
    pkgrel=1
    pkgdesc="All uzbl web interface tools: latest from the git master branch"
    arch=('i686' 'x86_64')
    url="http://github.com/Dieterbe/uzbl/"
    license=('GPL3')
    depends=('libwebkit3' 'socat' 'zenity' 'xclip' 'dmenu' 'python2' 'pygtk')
    makedepends=('git' 'pkgconfig' 'libwebkit>=1.2.0')
    source=('Makefile.patch')
    md5sums=('1fb21dc7128e11d9a91351702c5fee53')
    provides=('uzbl-core' 'uzbl-browser' 'uzbl-tabbed')
    conflicts=('uzbl-core' 'uzbl-browser' 'uzbl-tabbed' 'uzbl-experimental-git')
    _gitroot="git://github.com/Dieterbe/uzbl.git"
    _gitname="uzbl"
    build() {
    cd "$srcdir"
    msg "Connecting to GIT server...."
    if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
    else
    git clone $_gitroot $_gitname
    fi
    msg "GIT checkout done or server timeout"
    msg "Starting make..."
    rm -rf "$srcdir/$_gitname-build"
    git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
    cd "$srcdir/$_gitname-build"
    patch -p0 < "$srcdir/Makefile.patch"
    for file in bin/*; do
    sed -i 's_#!/usr/bin/env python$_#!/usr/bin/env python2_' $file
    done
    sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
    -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
    $(find ./ -name '*.py')
    make
    package(){
    cd "$srcdir/$_gitname-build"
    make DESTDIR="$pkgdir" PREFIX=/usr install
    Makefile.patch
    --- Makefile 2012-06-26 15:00:00.017779376 +0000
    +++ Makefile.fixed 2012-06-26 14:54:24.969594488 +0000
    @@ -12,6 +12,7 @@
    PYTHON=python3
    PYTHONV=$(shell $(PYTHON) --version | sed -n /[0-9].[0-9]/p)
    COVERAGE=$(shell which coverage)
    +PYINSTALL_EXTRA=--prefix="${DESTDIR}${PREFIX}"
    Save them both in the same folder and run makepkg. After you save Makefile.patch run "md5sum Makefile.patch" and update the md5sums array in the PKGBUILD if you need to.

  • [Solved] how to patch source file from AUR for gcc46 ?

    In a topic from yesterday, I was seeking help to get AUR package 'insight' installed, but so far no luck, since there seems to be a bug in the source that won't work with the gcc47 compiler.  I'm posting this new topic, since the subject has changed a bit - I'm now trying to compile gcc46 because another user had success with that version in compiling the 'insight' package, and I need to patch the gcc46 source to get it to compile.
    I'm looking for help to fix the problem myself, or if anyone wants to create a new PKGBUILD to handle the problem, that would be nice too
    Originally, I thought I would try to install gcc42 from AUR and use that to run makepkg on the 'insight' app, since one user had success with this version of gcc.  Both gcc42 and gcc46 give me the same errors with an 'unwind' file, and I couldn't get either to compile (errors about unwind.h or linux-unwind.h).
    I found a post with a link to a patch (for gcc46), but I have no idea where to apply or how to apply this patch.  I think I'm supposed to apply it to this file, but again, I'm not sure how to apply a patch:
    /home/briphi/builds/gcc46/src/gcc-4.6.3/gcc/unwind-dw2.c
    , but this c file has includes to other "unwind" header files.  Here is a link to the unwind-dw2.c file at my dropbox folder, if anyone needs to see this file without downloading/compiling gcc46: http://dl.dropbox.com/u/8169867/unwind-dw2.c
    Sticking with gcc46 for the moment (since I found the patch for this version)...
    The post with the link to the patch to gcc46 is here: https://bbs.archlinux.org/viewtopic.php … 0#p1229880
    The patch at pastebin.com is here: http://pastebin.com/VkgE27Pd and looks like this:
    --- a/gcc/config/i386/linux-unwind.h 2011-01-03 20:52:22.000000000 +0000
    +++ b/gcc/config/i386/linux-unwind.h 2012-07-06 12:23:51.562859470 +0100
    @@ -133,9 +133,9 @@
    struct rt_sigframe {
    int sig;
    - struct siginfo *pinfo;
    + siginfo_t *pinfo;
    void *puc;
    - struct siginfo info;
    + siginfo_t info;
    struct ucontext uc;
    } *rt_ = context->cfa;
    /* The void * cast is necessary to avoid an aliasing warning.
    The package that I'm actually trying to install is 'insight', here: https://aur.archlinux.org/packages/insight/
    My error when compiling (running makepkg -s on gcc46) looks like this:
    /home/briphi/builds/gcc46/src/gcc-build/./gcc/xgcc -B/home/briphi/builds/gcc46/src/gcc-build/./gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -g -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -O2 -g -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../.././gcc -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/. -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../include -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
    In file included from /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/unwind-dw2.c:333:0:
    /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/config/i386/linux-unwind.h: In function ‘x86_fallback_frame_state’:
    /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/config/i386/linux-unwind.h:138:17: error: field ‘info’ has incomplete type
    make[3]: *** [unwind-dw2.o] Error 1
    make[3]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build/i686-pc-linux-gnu/libgcc'
    make[2]: *** [all-stage1-target-libgcc] Error 2
    make[2]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build'
    make[1]: *** [stage1-bubble] Error 2
    make[1]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build'
    make: *** [all] Error 2
    ==> ERROR: A failure occurred in build().
    Aborting...
    Last edited by stringchopper (2013-02-15 08:29:39)

    Lone_Wolf wrote:
    @ stringchopper
    The file(s) that need patching are mentioned in the patch, so you don't have to know yourself where they are.
    patch files like these are usually applied from the directory where you build stuff.
    On your system that is probably this folder :   /home/briphi/builds/gcc46/src/gcc-4.6.3/
    for details about the command used to apply the patch, t0m5k1's link above should help.
    Thanks Lone_Wolf for the help.  I'm suffering from information overload at the moment, so (@t0m5k1) even though I found the same results that you found through google, they weren't explicit enough.

  • [SOLVED] How to Patch Base OS WIMs in a non-SCCM Environment?

    My new employer doesn't have SCCM but they're at least using MDT, even if it is 2010.  We (System Engineers for servers; Desktop Engineers for workstations) have historically been using Windows Update to patch the machine in question, but that (a) requires
    a bit of baby sitting, (b) takes ages and (c) is done every time a new server is stood up or new image is built.
    Being one of the new guys, I've been asked if there's a way to automate the installation of OS updates for Windows 7 up to Server 2012 R2.  My process has been to mount the WIM and apply as many updates as I can offline by pointing DISM to a directory
    full of updates.
    However, I've been in situations where updates break the WIM because dependencies weren't in place, namely .NET which can't be installed offline.  And its such a hassle to go through that troubleshooting process narrow it down to the offending update
    - augh!
    Having said all that, I'm in need of some advice for how to handle
    stock WIMs from stock Microsoft ISO's.
    What process do you experts follow for getting that WIM fully up to date?
    I'm talking all the [recommended] updates offered via Windows Update: from updates for Windows, IE, .NET; standard security updates to IE upgrades (e.g. from 9 to 9, 9 to 10, 10 to 11), MSXML updates, Silverlight etc..
    Does update installation order matter?
    Is it safe to point DISM to a directory of cabs for offline updates & let it rip or does it require a bit of structure?
    I'm sort of doing a hybrid: Pulled down over 200 updates from the Microsoft update catalog, extracted the cabs into a centralized location & separated them into two groups, group 2 being updates that
    seem to cause problems when done offline or can't be done offline due to a prerequisite.  (Group 1 is bit more than 200 updates, Group 2 is about a dozen including 2685811, 2685813, 2533552, 2819745)
    Can I assume that for updates like WMF 4.0, UMDF 1.11, KMFD 1.11, MSXML and straight upgrades like .NET 4.5, IE 10/11, you're laying down the OS, installing the pre-requisites, installing the updates - maybe even running Windows Updates, then capturing?
    I'm just really curious as to how far off the mark I am, how I can automate as much of this as possible and of course doing it right! :)
    Thanks

    Although it is possible to install many updates offline, some just must be performed online, as you mention above.
    My recommendation (and that of Niehaus, Arwidmark, Nystrom, Hunter, MCS, et. al.) is to create a MDT deployment share ( called the create share ) with task sequences for each image type. Install the OS, update the machine (via WSUS or Windows Update),
    install your favorite applications, (UPdate again), and then Sysprep and Capture. All done within a Virtual Machine, preferably Hyper-V.
    If you can automate all of your applications, then you can pretty much do the entire process with a single click.
    I have a beefy i7-4771 with 32GB of ram, and *TWO* speedy SSD Drives. Imaging *8* machines in parallel takes about 4 hrs.
    Keith Garner - Principal Consultant [owner] -
    http://DeploymentLive.com
    I need a moment to collect myself after reading your hardware.
    Seriously though, I'm down with doing it with MDT in a VM because its the cleanest it can be at that point.  My only concern were those 'gotchas':
    Is DISM smart enough to know the proper installation order of the updates in that directory?  If not do I have to run DISM multiple times (pointing it to the same collection of CABs) to make sure I got everything?
    Is there a fairly comprehensive list of updates that should be handled with special care/attention?
    Anything else I didn't think of.
    I really appreciate your responses - thank you kindly for putting up with me Keith. :)

  • [Solved]How to patch dwm?

    Sorry for my stupid question
    I just want to patch DWM so I follow this introduction
    PATCHES
    diff generation
    For mercurial users:
    cd dwm-directory
    hg diff > dwm-X.Y-yourpatchname.diff
    patch application
    For mercurial users:
    cd dwm-directory
    hg patch path/to/patch.diff
    I think I got a .diff file and then run "hg diff > dwm-X.Y-yourpatchname.diff" in dwm-directory,right?(I got dwm by download using  'hg clone http://hg.suckless.org/dwm')
    Everything went fine untill I try to do "hg patch path/to/patch.diff" where is exactly "path/to/patch.diff" be?
    If you don't mind can you give me the step-by-step guild? I afraid that I did something wrong:(
    I've try to find the way to solve it by using google and search in this forum but I still can't patch dwm:(
    Last edited by megacyber (2012-03-11 04:28:14)

    Thank you everyone
    I patched it now
    It fails at first because I put .diff in difference directory i should put it in surf directory
    So this's what I do
    1. In ter terminal 'hg clone http://hg.suckless.org/surf' (without ' )
    2. In the terminal 'cd surf' then edit the config.mk file with my favorite editor find the 'PREFIX' , 'X11INC' and 'X11LIB' then edit to
    PREFIX = /usr
    X11INC = /usr/include/X11
    X11LIB = /usr/lib/X11
    3. download .diff file to surf directory I downloaded by command 'wget http://surf.suckless.org/patches/surf-0.3-homepage.diff' but this patch have to add '#define HOMEPAGE "http://google.com" ' to the config.h so I add it to config.def.h because config.haven't existed yet but it will be created from config.def.h
    4. In the terminal 'hg diff > thenameyouwant.diff'
    5. In ther terminal 'hg patch < surf-0.3-homepage.diff'
    6. In the terminal 'sudo make clean install'
    Done;)

  • [SOLVED]How to load the kernel?

    Hi all
    First I should say that I found the same as my question in the internet bot there were no answer can solve my problem too.
    I just installed my Arch on my new laptop and I can say I am new.
    after all installations and reboot I have grub menu but when I want to boot I face with below error
    "error no such device" ad4103....."
    "loading linux core repo kernel"
    "error: no such partition"
    "loading initial ramdisk"
    "error: you need to load the kernel first"
    I have no access to command line but grub command line.
    How can I get rid of this error?
    Last edited by qaderzade (2014-12-12 18:57:28)

    uh...post your fstab as well as your bootloader configuration. I believe your initramfs is loaded from /boot - if you have that on a separate partition you need to make sure that a) it's specified correctly with the correct device name or UUID in fstab and that b) grub picked up the correct location of your initramfs and kernel when running grub-mkconfig (I'm assuming you did run grub-mkconfig before rebooting). Hopefully I'm not too off base here, but your problem lies somewhere in that area.

  • [SOLVED] How much space is REALLY used on my HDD?

    Hi there,
    Today I moved my /home/ dir to its own partition, so that my settings are safe from the system.
    I have a question about the used space:
    When I use "df -h" to see how much space is used, this is the output for home:
    /dev/sda2             184G  465M  175G   1% /home
    So 465 MB should be used. When I right click on home and select properties only 243,5 MB are used!?
    I know about the MB/MiB problem... but that would not be that extreme...
    Any ideas?
    greetings, yodo
    Last edited by yodo (2008-05-30 15:06:49)

    yodo wrote:But for what is that reserved space used actually?
    It is used to store information about the filesystem structure. Inodes, Blocks, etc. Have a look at this c't article: http://www.heise.de/open/Das-Dateisyste … l/104859/0 (German article)

  • [SOLVED] How to install custom kernel from AUR?

    I am trying to install the custom kernel for the Acer Aspire One from AUR. What is the correct way to go about doing this? I pacman -U the .pkg.tar.gz I downloaded and it put a new kernel folder in /usr/src. Do I just copy the old .config file and make?
    Last edited by future stir-fry (2008-12-23 01:26:57)

    zaza224 wrote:
    After installing new kernel with pacman -U you  just need to add a new line to grub menu.lst pointing to it and reboot
    How would you go about doing this in syslinux instead of grub?
    Whoa there, get your shotguns, the zombies are coming!!
    Seriously, welcome to the Arch forums zaza224
    Please familiarize yourself with our forum guidelines, in particular the topic about waking the dead:
    https://wiki.archlinux.org/index.php/Fo … Bumping.22
    Closing.

  • How to patch OMR database using OEMGC

    Hello all,
    i wander about applying CPU patch to Oracle Management Repository database using OEMGC i.e. "Patching thru Deployment Procedures".
    Does anyone have such experience?
    What obstacles are waiting me while doing that?
    Or there is only old worked way applying manually?
    regards,
    Gabit

    For repository database u have to appy manually

  • [SOLVED] How to install aur packages using pacaur

    I'm trying to install dwb-git. It installs with no problem with aura, but pacaur gives me problems. If I run pacaur as regular user it will build but will not install and will say permission denied.
    If I run pacaur with sudo it will say building packages as root is a bad idea and will quit. The only other possibility I see is running it with --asroot flag which is a really bad idea.
    Last edited by bstaletic (2014-06-22 15:02:41)

    No, I get the errors I described above.
    Here are the outputs:
    bstaletic@arch ~ $ pacaur -y dwb-git
    :: resolving dependencies...
    :: no AUR metadata for dwb-git package
    :: looking for inter-conflicts...
    AUR Packages (1):
    Name Old Version New Version
    aur/dwb-git latest
    :: Proceed with installation? [Y/n]
    :: Retrieving package(s)...
    :: View dwb-git PKGBUILD? [Y/n] n
    :: View dwb.install script? [Y/n] n
    ==> Making package: dwb-git 2014.03.04.g5088db1-1 (Sun Jun 22 15:46:30 CEST 2014)
    ==> Retrieving sources...
    -> Cloning dwb git repo...
    Cloning into bare repository '/tmp/pacaurtmp-bstaletic/dwb-git/dwb'...
    remote: Counting objects: 15056, done.
    remote: Compressing objects: 100% (3796/3796), done.
    remote: Total 15056 (delta 11190), reused 14783 (delta 10952)
    Receiving objects: 100% (15056/15056), 2.63 MiB | 88.00 KiB/s, done.
    Resolving deltas: 100% (11190/11190), done.
    Checking connectivity... done.
    ==> Validating source files with md5sums...
    dwb ... Skipped
    ==> Extracting sources...
    -> Creating working copy of dwb git repo...
    Cloning into 'dwb'...
    done.
    ==> Starting pkgver()...
    ==> Updated version: dwb-git 2014.06.14.g9f4bdb9-1
    ==> Sources are ready.
    :: Building dwb-git package(s)...
    ==> Making package: dwb-git 2014.06.14.g9f4bdb9-1 (Sun Jun 22 15:47:05 CEST 2014)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> WARNING: Using existing src/ tree
    ==> Starting build()...
    Build options:
    CC = cc
    CFLAGS = -march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wall -Werror=format-security -pipe --ansi -std=c99 -D_POSIX_C_SOURCE=200112L -O2 -g -D_BSD_SOURCE -D_NETBSD_SOURCE -D__BSD_VISIBLE -pthread -I/usr/include/webkitgtk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/webkitgtk-1.0 -I/usr/include/p11-kit-1 -I/usr/include/json-c -I/usr/include/libsecret-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DWITH_LIBSOUP_2_38=1
    LDFLAGS = -Wl,-O1,--sort-common,--as-needed,-z,relro -lwebkitgtk-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lfontconfig -lfreetype -lsoup-2.4 -ljavascriptcoregtk-1.0 -lgnutls -ljson-c -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lpthread -lm -lX11
    CPPFLAGS = -march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DWITH_LIBSECRET
    make[1]: Entering directory '/tmp/pacaurtmp-bstaletic/dwb-git/src/dwb/src/util'
    cc convert_transport_security.c
    convert_transport_security.c: In function ‘handle_pinsets’:
    convert_transport_security.c:256:9: warning: ‘json_object_object_get’ is deprecated (declared at /usr/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
    if((name_obj = json_object_object_get(pin_list, "name")) == NULL || !json_object_is_type(name_obj, json_type_string))
    ^
    convert_transport_security.c:263:9: warning: ‘json_object_object_get’ is deprecated (declared at /usr/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
    good_hashes = json_object_object_get(pin_list, "static_spki_hashes");
    ^
    convert_transport_security.c:264:9: warning: ‘json_object_object_get’ is deprecated (declared at /usr/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
    bad_hashes = json_object_object_get(pin_list, "bad_static_spki_hashes");
    ^
    convert_transport_security.c: In function ‘handle_entries’:
    convert_transport_security.c:297:9: warning: ‘json_object_object_get’ is deprecated (declared at /usr/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
    if((name_obj = json_object_object_get(entry, "name")) == NULL ||
    ^
    convert_transport_security.c:307:9: warning: ‘json_object_object_get’ is deprecated (declared at /usr/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
    json_object *mode = json_object_object_get(entry, "mode");
    ^
    convert_transport_security.c:315:9: warning: ‘json_object_object_get’ is deprecated (declared at /usr/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
    json_object *include_subdomains = json_object_object_get(entry, "include_subdomains");
    ^
    convert_transport_security.c:327:9: warning: ‘json_object_object_get’ is deprecated (declared at /usr/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
    if((entry_pins = json_object_object_get(entry, "pins")) != NULL)
    ^
    convert_transport_security.c: In function ‘parse_json’:
    convert_transport_security.c:371:5: warning: ‘json_object_object_get’ is deprecated (declared at /usr/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
    if((pinsets = json_object_object_get(json, "pinsets")) == NULL || !json_object_is_type(pinsets, json_type_array) ||
    ^
    convert_transport_security.c:380:5: warning: ‘json_object_object_get’ is deprecated (declared at /usr/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
    if((entries = json_object_object_get(json, "entries")) == NULL || !json_object_is_type(entries, json_type_array) ||
    ^
    gen hsts_preload.h
    /bin/sh: ./convert_transport_security: Permission denied
    Makefile:41: recipe for target '../../src/hsts_preload.h' failed
    make[1]: *** [../../src/hsts_preload.h] Error 126
    make[1]: Leaving directory '/tmp/pacaurtmp-bstaletic/dwb-git/src/dwb/src/util'
    Makefile:22: recipe for target 'src/util.subdir-buildfirst' failed
    make: *** [src/util.subdir-buildfirst] Error 2
    ==> ERROR: A failure occurred in build().
    Aborting...
    :: dwb-git cleaned
    bstaletic@arch ~ $ sudo pacaur -y dwb-git
    :: resolving dependencies...
    :: no AUR metadata for dwb-git package
    :: looking for inter-conflicts...
    AUR Packages (1):
    Name Old Version New Version
    aur/dwb-git latest
    :: Proceed with installation? [Y/n]
    :: Retrieving package(s)...
    :: View dwb-git PKGBUILD? [Y/n] n
    :: View dwb.install script? [Y/n] n
    ==> ERROR: Running makepkg as root is a BAD idea and can cause permanent,
    catastrophic damage to your system. If you wish to run as root, please
    use the --asroot option.
    :: Building dwb-git package(s)...
    ==> ERROR: Running makepkg as root is a BAD idea and can cause permanent,
    catastrophic damage to your system. If you wish to run as root, please
    use the --asroot option.
    :: dwb-git cleaned
    I get the same errors with -Sya and -Sa flags.

  • [SOLVED] How do I patch the kernel?

    EDIT (again): Doesn't seem like the patch is needed anymore. 3.3.1 kernel from the repos seems identical to my custom kernel (also 3.3.1).
    EDIT: The patches are for an older kernel but I was able to apply them manually.
    Hello. I'm trying to patch the kernel using the patch found on this page: http://lists.freedesktop.org/archives/i … 09584.html
    Now, I don't know much about patching but the patch in that post looks more like the program output of several diff commands. How do I format this to create a valid .patch file?
    Last edited by Splooshie123 (2012-04-10 04:52:40)

    To get back to my original question, making a patch out of what was in that mailing list post:
    Does this look ok?
    drivers/gpu/drm/i915/i915_drv.c | 4 ++++
    drivers/gpu/drm/i915/i915_drv.h | 1 +
    drivers/gpu/drm/i915/intel_display.c | 34 +++++++++++++++++++++-------------
    3 files changed, 26 insertions(+), 13 deletions(-)
    diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
    index 004880aa3a948669b8b4e23d9ad73d132cff81d0..1d88f059a27321ecb681e2b7927bb69029fcb49a 100644
    --- a/drivers/gpu/drm/i915/i915_drv.c
    +++ b/drivers/gpu/drm/i915/i915_drv.c
    @@ -49,6 +49,10 @@ module_param_named(powersave, i915_powersave, int, 0600);
    unsigned int i915_lvds_fixed = 1;
    module_param_named(lvds_fixed, i915_lvds_fixed, int, 0600);
    +unsigned int i915_lvds_channels = 0;
    +module_param_named(lvds_channels, i915_lvds_channels, int, 0600);
    +MODULE_PARM_DESC(lvds_channels, "LVDS channels in use: 0=(default) probe hardware 1=single 2=dual");
    +
    unsigned int i915_lvds_downclock = 0;
    module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
    diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
    index 3fa8681459aa596e12e885568e5b48f0c9a60719..a6aab43e5f39f2d5b92a69a284bf8f72a254ea7c 100644
    --- a/drivers/gpu/drm/i915/i915_drv.h
    +++ b/drivers/gpu/drm/i915/i915_drv.h
    @@ -886,6 +886,7 @@ extern int i915_max_ioctl;
    extern unsigned int i915_fbpercrtc;
    extern unsigned int i915_powersave;
    extern unsigned int i915_lvds_fixed;
    +extern unsigned int i915_lvds_channels;
    extern unsigned int i915_lvds_downclock;
    extern unsigned int i915_lvds_24bit;
    diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
    index 09f57f29c30c371c213944be473090a780a287db..4dc91400edd8935be45a229cf91292339bca0ce8 100644
    --- a/drivers/gpu/drm/i915/intel_display.c
    +++ b/drivers/gpu/drm/i915/intel_display.c
    @@ -642,6 +642,20 @@ static const intel_limit_t intel_limits_ironlake_display_port = {
    .find_pll = intel_find_pll_ironlake_dp,
    +static int intel_is_dual_channel_mode(struct drm_crtc *crtc)
    +{
    + struct drm_device *dev = crtc->dev;
    + struct drm_i915_private *dev_priv = dev->dev_private;
    + if (i915_lvds_channels) {
    + /* User has specified desired channel mode */
    + return (i915_lvds_channels == 2);
    + }
    +
    + /* User has not specified mode so let's see
    + what the hardware is doing. */
    + return ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP);
    +}
    +
    static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
    struct drm_device *dev = crtc->dev;
    @@ -653,8 +667,7 @@ static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
    if (dev_priv->lvds_use_ssc && dev_priv->lvds_ssc_freq == 100)
    refclk = 100;
    - if ((I915_READ(PCH_LVDS) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP) {
    + if (intel_is_dual_channel_mode(crtc)) {
    /* LVDS dual channel */
    if (refclk == 100)
    limit = &intel_limits_ironlake_dual_lvds_100m;
    @@ -677,18 +690,16 @@ static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
    static const intel_limit_t *intel_g4x_limit(struct drm_crtc *crtc)
    - struct drm_device *dev = crtc->dev;
    - struct drm_i915_private *dev_priv = dev->dev_private;
    const intel_limit_t *limit;
    if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
    - if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP)
    + if (intel_is_dual_channel_mode(crtc)) {
    /* LVDS with dual channel */
    limit = &intel_limits_g4x_dual_channel_lvds;
    - else
    - /* LVDS with dual channel */
    + } else {
    + /* LVDS with single channel */
    limit = &intel_limits_g4x_single_channel_lvds;
    + }
    } else if (intel_pipe_has_type(crtc, INTEL_OUTPUT_HDMI) ||
    intel_pipe_has_type(crtc, INTEL_OUTPUT_ANALOG)) {
    limit = &intel_limits_g4x_hdmi;
    @@ -821,8 +832,7 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    * reliably set up different single/dual channel state, if we
    * even can.
    - if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP)
    + if (intel_is_dual_channel_mode(crtc))
    clock.p2 = limit->p2.p2_fast;
    else
    clock.p2 = limit->p2.p2_slow;
    @@ -871,7 +881,6 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    int target, int refclk, intel_clock_t *best_clock)
    struct drm_device *dev = crtc->dev;
    - struct drm_i915_private *dev_priv = dev->dev_private;
    intel_clock_t clock;
    int max_n;
    bool found;
    @@ -886,8 +895,7 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    lvds_reg = PCH_LVDS;
    else
    lvds_reg = LVDS;
    - if ((I915_READ(lvds_reg) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP)
    + if (intel_is_dual_channel_mode(crtc))
    clock.p2 = limit->p2.p2_fast;
    else
    clock.p2 = limit->p2.p2_slow;

  • How to implement route cipher using java?

    Hi guys,,,
    I really got a headache solving how to implement route cipher using java lang,,i already got the concept but i really dont get how to implement it using java actually i want to make a presentation of how route cipher works using "adobe flash" but first i will implement it using java coz flash actionscripts are closer to java lang.
    Hope you could post some examples or ideas...i would really appreciate it!
    thank you so much...

    just add an action listener (either keypressed or keytyped) to the frame that you want to record. I did this in NetBeans in about 2 seconds. I can simplify it if you need. As for loging it just write the characters to a file output stream.
    public class test extends javax.swing.JFrame {
        /** Creates new form test */
        public test() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
        private void initComponents() {
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    formKeyTyped(evt);
            pack();
        // </editor-fold>
        private void formKeyTyped(java.awt.event.KeyEvent evt) {
            System.out.println(evt.getKeyChar());
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new test().setVisible(true);
        // Variables declaration - do not modify
        // End of variables declaration
    }

  • How to patch kernel with this...

    How can I patch the kernel with this files?
    https://patchwork.kernel.org/patch/94542/
    Archwiki about kernel compilation is really poor...

    Given your apparent level of expertise, it is not reasonable to expect procedures like this to "just work" without putting some time and effort into them. In this case, I would strongly recommend learning about the patch command first, and then learning about ABS (Arch Build System) and PKGBUILDs. You are throwing yourself in at the deep end by attempting to modify the kernel PKGBUILD - people usually work their way up to that.
    In other news - the 2.6.36 kernel has been released, and it includes this patch. The package is currently in the testing repo, and will soon be available in core. If the recommended learning above is not to your liking, I suggest you be patient until that happens. You could enable the testing repo either - but that's a whole other story.

  • Need help patching a kernel to use new ALSA

    I have a friend who's just starting out with Arch, and I've been getting him started on his install. His system uses a Biostar 6100-939 motherboard and an Athlon64 processor.
    Everything has been working so far except sound. According to documentation, the correct ALSA driver for his nForce4 chipset should be the snd_intel8x0 module. However, loading this module didn't make any soundcards available to alsamixer.
    We started to investigate the problem, and recently found this: http://jrbelvin.freeshell.org/weblog/linux/mcp51-alsa stating that the problem is fixed with the 1.0.11rc3 release of ALSA. We also found this : http://www.nvnews.net/vbulletin/showthread.php?t=60493 covering the same issue. We tried applying the patch listed in that forum to a build of the ArchCK kernel. While we were able to confirm that our patch really did patch the kernel, and that the patched kernel built, the snd_intel8x0 module still didn't work when we loaded our patched kernel.
    So now it seems like we'll have to properly use the 1.0.11rc3 release of ALSA to get sound working on his computer until 1.0.11 is finalized and merged into the kernel. Does anyone have any experience on patching a kernel to use a different release of ALSA? Any help would be appreciated.
    Woogie

    I had the same problem with my new computer (less than a week old) using an ASRock K8NF4G-SATA2 board. For me the problem stopped when I switched to the 2.6.16 kernel then in testing but now in current. If it's not working with that kernel try modprobing snd-intel8x0 by hand and running alsaconf.
    I actually made packages of alsa-lib and alsa-driver 1.0.11rc4 for myself in the process, but I've switched away from those again, so I don't think they should be needed for NF4/MCP51 to work. That said if your problem doesn't go away I'll be happy to post the PKGBUILDs I modified or even send the packages themselves (with absolutely no guarantees).

Maybe you are looking for