Giter Site home page Giter Site logo

njaah's Introduction

Njaah - not just another AUR helper

njaah is an AUR helper that uses git submodules to manage and build AUR packages. The advantage of this is it allows easier reviewing of changes to AUR packages as well as allows local customisations and easier contributions.

To get started run njaah --update which pulls down packages from AUR which defaults explicitly installed local packages.

$ njaah --update
=> Loading package info
Initialized empty Git repository in /home/user/aur-build/.git/
=> Updating AUR info for packages: cower, google-chrome, package-query, pacaur, ttf-opensans, b43-firmware, xf86-input-mtrack-git, yaourt, oh-my-zsh-git, tcptraceroute
=> Starting new HTTPS connection (1): aur.archlinux.org
=> "GET /rpc/?v=5&type=info&arg[]=cower&arg[]=google-chrome&arg[]=package-query&arg[]=pacaur&arg[]=ttf-opensans&arg[]=b43-firmware&arg[]=xf86-input-mtrack-git&arg[]=yaourt&arg[]=oh-my-zsh-git&arg[]=tcptraceroute HTTP/1.1" 200 None
=> Updating AUR info for packages: cower, package-query
=> "GET /rpc/?v=5&type=info&arg[]=cower&arg[]=package-query HTTP/1.1" 200 None
=> Downloading b43-firmware
=> Running "git submodule add https://aur.archlinux.org/b43-firmware.git" in /home/user/aur-build
Cloning into 'b43-firmware'...
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 13 (delta 2), reused 11 (delta 0)
Unpacking objects: 100% (13/13), done.
Checking connectivity... done.
=> Updating dependencies for b43-firmware
=> Downloading cower
=> Running "git submodule add https://aur.archlinux.org/cower.git" in /home/user/aur-build
Cloning into 'cower'...
remote: Counting objects: 16, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 16 (delta 4), reused 16 (delta 4)
Unpacking objects: 100% (16/16), done.
Checking connectivity... done.
=> Updating dependencies for cower
=> Downloading google-chrome
=> Running "git submodule add https://aur.archlinux.org/google-chrome.git" in /home/user/aur-build
Cloning into 'google-chrome'...
remote: Counting objects: 178, done.
remote: Compressing objects: 100% (132/132), done.
remote: Total 178 (delta 89), reused 130 (delta 46)
Receiving objects: 100% (178/178), 42.66 KiB | 35.00 KiB/s, done.
Resolving deltas: 100% (89/89), done.
Checking connectivity... done.
=> Updating dependencies for google-chrome
=> Downloading oh-my-zsh-git
=> Running "git submodule add https://aur.archlinux.org/oh-my-zsh-git.git" in /home/user/aur-build
Cloning into 'oh-my-zsh-git'...
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 0), reused 8 (delta 0)
Unpacking objects: 100% (8/8), done.
Checking connectivity... done.
=> Updating dependencies for oh-my-zsh-git

Next you will want to review the packages in ~/aur-build

$ git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

	new file:   .gitmodules
	new file:   b43-firmware
	new file:   cower
	new file:   google-chrome
	new file:   oh-my-zsh-git

You may commit these changes but it's not required

Finally we can build and install the packages with njaah --install

$ njaah --install
=> Loading package info
=> Updating AUR info for packages: package-query, tcptraceroute, pacaur, cower, oh-my-zsh-git, google-chrome, xf86-input-mtrack-git, yaourt, b43-firmware, ttf-opensans
=> Starting new HTTPS connection (1): aur.archlinux.org
=> "GET /rpc/?v=5&type=info&arg[]=package-query&arg[]=tcptraceroute&arg[]=pacaur&arg[]=cower&arg[]=oh-my-zsh-git&arg[]=google-chrome&arg[]=xf86-input-mtrack-git&arg[]=yaourt&arg[]=b43-firmware&arg[]=ttf-opensans HTTP/1.1" 200 None
=> Updating AUR info for packages: package-query, cower
=> "GET /rpc/?v=5&type=info&arg[]=package-query&arg[]=cower HTTP/1.1" 200 None
=> Installing make dependencies for b43-firmware
=> Building b43-firmware
=> Running "makepkg -sf -p .PKGBUILD" in /home/user/aur-build/b43-firmware
==> Making package: b43-firmware 6.30.163.46-1 (Sat Mar 26 16:05:26 AEDT 2016)
[snip]
==> Finished making: b43-firmware 6.30.163.46-1 (Sat Mar 26 16:05:45 AEDT 2016)
=> Reinstalling b43-firmware 6.30.163.46-1
=> Running "makepkg -i -p .PKGBUILD" in /home/user/aur-build/b43-firmware
==> WARNING: A package has already been built, installing existing package...
==> Installing package b43-firmware with pacman -U...
[snip]
==> If you encounter problems with v6.30, try the 'b43-firmware-classic' package (v5.100) instead.
=> Installing make dependencies for cower
=> Building cower
=> Running "makepkg -sf -p .PKGBUILD" in /home/user/aur-build/cower
==> Making package: cower 14-2 (Sat Mar 26 16:05:52 AEDT 2016)
[snip]
=> Installing make dependencies for oh-my-zsh-git
=> Building oh-my-zsh-git
=> Running "makepkg -sf -p .PKGBUILD" in /home/user/aur-build/oh-my-zsh-git
==> Making package: oh-my-zsh-git 3143.4224c2a-1 (Sat Mar 26 16:09:16 AEDT 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning oh-my-zsh-git git repo...
Cloning into bare repository '/home/user/aur-build/oh-my-zsh-git/oh-my-zsh-git'...
remote: Counting objects: 49767, done.
remote: Compressing objects: 100% (710/710), done.
remote: Total 49767 (delta 375), reused 0 (delta 0), pack-reused 49056
Receiving objects: 100% (49767/49767), 12.99 MiB | 620.00 KiB/s, done.
Resolving deltas: 100% (25631/25631), done.
Checking connectivity... done.
==> Validating source files with md5sums...
    oh-my-zsh-git ... Skipped
==> Extracting sources...
  -> Creating working copy of oh-my-zsh git repo...
Cloning into 'oh-my-zsh-git'...
done.
==> Starting pkgver()...
==> Updated version: oh-my-zsh-git 3881.9280f2c-1
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "oh-my-zsh-git"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: oh-my-zsh-git 3881.9280f2c-1 (Sat Mar 26 16:10:32 AEDT 2016)
=> Upgrading oh-my-zsh-git from 2.872d71f-1 to 3143.4224c2a-1
=> Running "makepkg -i -p .PKGBUILD" in /home/user/aur-build/oh-my-zsh-git
==> Making package: oh-my-zsh-git 3881.9280f2c-1 (Sat Mar 26 16:10:32 AEDT 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating oh-my-zsh-git git repo...
Fetching origin
==> Validating source files with md5sums...
    oh-my-zsh-git ... Skipped
==> Extracting sources...
  -> Creating working copy of oh-my-zsh git repo...
Switched to a new branch 'makepkg'
==> Starting pkgver()...
==> Updated version: oh-my-zsh-git 2.872d71f-1
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Starting package()...
install: cannot stat 'MIT-LICENSE.txt': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...
=> Failed to install oh-my-zsh-git: "makepkg -i -p .PKGBUILD" returned 2, wd: /home/user/aur-build/oh-my-zsh-git
=> Installing make dependencies for pacaur
=> Reinstalling cower 14-2
=> Running "makepkg -i -p .PKGBUILD" in /home/user/aur-build/cower
==> WARNING: A package has already been built, installing existing package...
==> Installing package cower with pacman -U...
loading packages...
warning: cower-14-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) cower-14-2

Total Installed Size:  0.23 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                 [#######################################################] 100%
(1/1) checking package integrity                                                               [#######################################################] 100%
(1/1) loading package files                                                                    [#######################################################] 100%
(1/1) checking for file conflicts                                                              [#######################################################] 100%
(1/1) checking available disk space                                                            [#######################################################] 100%
:: Processing package changes...
(1/1) reinstalling cower                                                                       [#######################################################] 100%
=> Building pacaur
=> Running "makepkg -sf -p .PKGBUILD" in /home/user/aur-build/pacaur
==> Making package: pacaur 4.5.6-1 (Sat Mar 26 16:10:42 AEDT 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading 4.5.6.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   122    0   122    0     0    124      0 --:--:-- --:--:-- --:--:--   123
100 55257  100 55257    0     0  20341      0  0:00:02  0:00:02 --:--:-- 34385
==> Validating source files with md5sums...
    4.5.6.tar.gz ... Passed
==> Extracting sources...
  -> Extracting 4.5.6.tar.gz with bsdtar
==> Starting build()...
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "pacaur"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: pacaur 4.5.6-1 (Sat Mar 26 16:10:46 AEDT 2016)
=> Reinstalling cower 14-2
=> Running "makepkg -i -p .PKGBUILD" in /home/user/aur-build/cower
==> WARNING: A package has already been built, installing existing package...
==> Installing package cower with pacman -U...
loading packages...
warning: cower-14-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) cower-14-2

Total Installed Size:  0.23 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                 [#######################################################] 100%
(1/1) checking package integrity                                                               [#######################################################] 100%
(1/1) loading package files                                                                    [#######################################################] 100%
(1/1) checking for file conflicts                                                              [#######################################################] 100%
(1/1) checking available disk space                                                            [#######################################################] 100%
:: Processing package changes...
(1/1) reinstalling cower                                                                       [#######################################################] 100%
=> Reinstalling pacaur 4.5.6-1
=> Running "makepkg -i -p .PKGBUILD" in /home/user/aur-build/pacaur
==> WARNING: A package has already been built, installing existing package...
==> Installing package pacaur with pacman -U...
loading packages...
warning: pacaur-4.5.6-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) pacaur-4.5.6-1

Total Installed Size:  0.37 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                 [#######################################################] 100%
(1/1) checking package integrity                                                               [#######################################################] 100%
(1/1) loading package files                                                                    [#######################################################] 100%
(1/1) checking for file conflicts                                                              [#######################################################] 100%
(1/1) checking available disk space                                                            [#######################################################] 100%
:: Processing package changes...
(1/1) reinstalling pacaur                                                                      [#######################################################] 100%
=> Installing make dependencies for package-query
=> Building package-query
=> Running "makepkg -sf -p .PKGBUILD" in /home/user/aur-build/package-query
==> Making package: package-query 1.8-2 (Sat Mar 26 16:10:54 AEDT 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading package-query-1.8.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0curl: (7) Couldn't connect to server
==> ERROR: Failure while downloading http://mir.archlinux.fr/releases/package-query/package-query-1.8.tar.gz
    Aborting...
=> Failed to install package-query: Failed to build package-query: "makepkg -sf -p .PKGBUILD" returned 1, wd: /home/user/aur-build/package-query

As you can see failures in one package do not affect others unless it's a dependency. We it's also listed the exact commands that it has been running so we can easily just jump in and fix and rerun njaah. The build will run off from where it was before. If we commit this patch in the submodule repo it will be merged in with future updates as updates are just pulled down with git pull. Although of course it's better to submit the patch back to the AUR.

$ cd ~/aur-build/oh-my-zsh-git 
$ git diff
diff --git a/PKGBUILD b/PKGBUILD
index 615e03d..cb884a1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -53,8 +53,8 @@ package() {
   rm -f tools/upgrade.sh tools/uninstall.sh tools/install.sh tools/check_for_upgrade.sh
 
   # The license should be in /usr/share/licenses.
-  install -D -m644 MIT-LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-  rm MIT-LICENSE.txt
+  # License seems not to be included anymore just hack it out
+  # install -D -m644 MIT-LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  # rm MIT-LICENSE.txt
 
   # Copy everything else.
   cp -r . "${pkgdir}/usr/share/oh-my-zsh/"
$ njaah -i            
=> Loading package info
=> Updating AUR info for packages: b43-firmware, yaourt, oh-my-zsh-git, tcptraceroute, pacaur, xf86-input-mtrack-git, package-query, cower, ttf-opensans, google-chrome
=> Starting new HTTPS connection (1): aur.archlinux.org
=> "GET /rpc/?v=5&type=info&arg[]=b43-firmware&arg[]=yaourt&arg[]=oh-my-zsh-git&arg[]=tcptraceroute&arg[]=pacaur&arg[]=xf86-input-mtrack-git&arg[]=package-query&arg[]=cower&arg[]=ttf-opensans&arg[]=google-chrome HTTP/1.1" 200 None
=> Updating AUR info for packages: package-query, cower
=> "GET /rpc/?v=5&type=info&arg[]=package-query&arg[]=cower HTTP/1.1" 200 None
=> Installing make dependencies for oh-my-zsh-git
=> Building oh-my-zsh-git
=> Running "makepkg -sf -p .PKGBUILD" in /home/user/aur-build/oh-my-zsh-git
==> Making package: oh-my-zsh-git 3143.4224c2a-1 (Sat Mar 26 16:21:13 AEDT 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating oh-my-zsh-git git repo...
Fetching origin
==> Validating source files with md5sums...
    oh-my-zsh-git ... Skipped
==> Extracting sources...
  -> Creating working copy of oh-my-zsh git repo...
Switched to and reset branch 'makepkg'
==> Starting pkgver()...
==> Updated version: oh-my-zsh-git 2.872d71f-1
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "oh-my-zsh-git"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: oh-my-zsh-git 2.872d71f-1 (Sat Mar 26 16:21:27 AEDT 2016)
=> Upgrading oh-my-zsh-git from 2.872d71f-1 to 3143.4224c2a-1
=> Running "makepkg -i -p .PKGBUILD" in /home/user/aur-build/oh-my-zsh-git
==> Making package: oh-my-zsh-git 2.872d71f-1 (Sat Mar 26 16:21:28 AEDT 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating oh-my-zsh-git git repo...
Fetching origin
==> Validating source files with md5sums...
    oh-my-zsh-git ... Skipped
==> Extracting sources...
  -> Creating working copy of oh-my-zsh git repo...
Reset branch 'makepkg'
==> Starting pkgver()...
==> WARNING: A package has already been built, installing existing package...
==> Installing package oh-my-zsh-git with pacman -U...
loading packages...
warning: oh-my-zsh-git-2.872d71f-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) oh-my-zsh-git-2.872d71f-1

Total Installed Size:   2.18 MiB
Net Upgrade Size:      -0.01 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                                 [#######################################################] 100%
(1/1) checking package integrity                                                               [#######################################################] 100%
(1/1) loading package files                                                                    [#######################################################] 100%
(1/1) checking for file conflicts                                                              [#######################################################] 100%
(1/1) checking available disk space                                                            [#######################################################] 100%
:: Processing package changes...
(1/1) reinstalling oh-my-zsh-git                                                               [#######################################################] 100%

njaah's People

Contributors

canoon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.