You are not logged in.

#1 2014-07-31 16:59:14

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

asp - Arch Source Package management (git-based ABS alternative)

asp is a tool to manage the source files used to build Arch's packages. It attempts to replace the abs tool, offering more up to date sources (via the svntogit repositories) and a sparse checkout model to conserve diskspace. This probably won't be interesting to users who want a full checkout (for whatever reason that may be).

Getting started, and example usage:

$ cower -d asp-git && cd asp-git && makepkg -si
$ mkdir ~/{asp,localbuilds} && cd ~/localbuilds
$ asp export core/pacman glibc

github: https://github.com/falconindy/asp
aur: https://aur.archlinux.org/packages/asp-git

Depending on popularity, I may or may not make a stable release.

Last edited by falconindy (2014-07-31 17:18:46)

Offline

#2 2014-07-31 17:11:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: asp - Arch Source Package management (git-based ABS alternative)

Hallelujah!

$ cower -d asp-git
:: asp-git downloaded to /home/karol/test
$ makepkg -si
==> ERROR: PKGBUILD does not exist.

;P


Edit: This one seems more serious:

$ mkdir ~/localbuilds && cd ~/localbuilds
$ asp list-repos pacman
/usr/bin/asp: line 381: cd: /home/karol/asp: No such file or directory
error: ASPROOT (/home/karol/asp) does not exist!

Last edited by karol (2014-07-31 17:17:06)

Offline

#3 2014-07-31 17:20:43

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

ok... fixed up the approximate install instructions with ones that actually work verbatim...

Offline

#4 2014-07-31 18:38:44

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Nice! Couple of questions:

1. Is it your intention that 'untracking' a package leaves the copies in the localbuild directory? I was a little confused by that at first.

2. If you have modifications for a PKGBUILD in your localbuilds directory and you want to update the package with asp and pull those changes into the existing localbuild directory, what's the best workflow to do that? I see that 'asp export' won't overwrite an existing package directory in localbuilds.

3. Would a better default location for the ASPROOT be (similar to ABS) /var/asp with 777 or 775 permissions? I guess it doesn't matter that much...I just prefer a clean $HOME smile

Thanks!
Scott

Last edited by firecat53 (2014-07-31 18:39:17)

Offline

#5 2014-07-31 18:53:39

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

firecat53 wrote:

Nice! Couple of questions:

1. Is it your intention that 'untracking' a package leaves the copies in the localbuild directory? I was a little confused by that at first.

WAI. You can run export from any directory, and there's no sense of tracking that newly created directory. The notion of "~/localbuilds" is entirely arbitrary -- it could be anywhere. The ABS analog is making a copy of a dir from /var/abs/$repo/$package. You wouldn't expect this to be touched by abs itself in any way.

firecat52 wrote:

2. If you have modifications for a PKGBUILD in your localbuilds directory and you want to update the package with asp and pull those changes into the existing localbuild directory, what's the best workflow to do that? I see that 'asp export' won't overwrite an existing package directory in localbuilds.

It will, if you pass the -f flag. On my TODO is to add in a "checkout" verb (or similar) that gives you the single package branch in a directory. You'd be able to branch off of this and maintain your own patches, etc, for easier rebasing onto the upstream changes.

firecat52 wrote:

3. Would a better default location for the ASPROOT be (similar to ABS) /var/asp with 777 or 775 permissions? I guess it doesn't matter that much...I just prefer a clean $HOME smile

Yeah, I'll probably move the default before a v1 appears. I'm not convinced that there needs to be a system-wide instance, though. A checkout of a dozen packages is only a few megabytes.

Last edited by falconindy (2014-08-01 00:22:56)

Offline

#6 2014-07-31 21:23:29

smlb
Member
From: /dev/null
Registered: 2013-05-20
Posts: 60
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Seems nice, going to try it. Thanks!

Offline

#7 2014-08-01 01:11:37

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Okay, this was easier than I thought. I added a "checkout" verb to make a mutable git repo for an individual package.

Offline

#8 2014-08-01 03:04:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Nice one.

(Understandable) typo in the man page under checkout:

The new repository will pull from the repository in $ASPROOT and must be updated separately after using abs update.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2014-08-01 04:34:22

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Edit: disregard...problem solved by removing existing tracked package and re-adding after updating asp.

Last edited by firecat53 (2014-08-01 04:36:49)

Offline

#10 2014-08-01 04:37:22

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

This looks awesome! I will have to take a look into this!

All the best,

-HG

Offline

#11 2014-08-05 02:13:05

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: asp - Arch Source Package management (git-based ABS alternative)

This takes the pkgbuild right from the git tree right? So no more delay between the ABS sync and the prebuild updates? Great, I'm in!

Offline

#12 2014-08-05 02:37:44

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: asp - Arch Source Package management (git-based ABS alternative)

falconindy wrote:

It attempts to replace the abs tool, offering more up to date sources (via the svntogit repositories)

See also: https://aur.archlinux.org/packages/gabs-git/

--

I'll definitely try your new software and post a feedback here later.

Last edited by thiagowfx (2014-08-05 02:38:25)

Offline

#13 2014-08-07 16:35:21

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Made a few bug fixes thanks to loyal testers and improved the performance of all operations when multiple packages are involved.

Features requests are welcome -- the only remaining TODO I have is to figure out what to do about split packages (e.g. "asp export clang" will fail because clang is built by the llvm package).

Offline

#14 2014-08-16 06:58:29

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Tab completion would be pretty handy....


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#15 2014-08-16 07:39:56

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

jasonwryan wrote:

Tab completion would be pretty handy....

+1 for zsh completion here!

All the best,

-HG

Offline

#16 2014-08-16 20:16:06

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: asp - Arch Source Package management (git-based ABS alternative)

Very nice.  I've already did:

sudo pacman -Rnsc abs && sudo rm -rf /var/abs

I'll be using asp from now on.

Edit: +1 for tab completion (zsh user here, but having completion for bash would already be sufficient).

Last edited by thiagowfx (2014-08-16 20:17:08)

Offline

#17 2014-08-17 01:48:27

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

bash-completion has been pushed. Writing it reveals that, not shockingly, any completion involving the entirety of the repositories is unacceptably slow for my taste -- I'm working on a fix for this.

I'm not a zsh user, but I'll happily accept a pull request which adds something equivalent to what i've done for bash.

Offline

#18 2014-08-17 02:51:15

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

I'm happy to do the Zsh one.

Slight issue with the PKGBUILD:

(1/1) checking for file conflicts                                                               [--------------------------------------------------------] 100%
error: failed to commit transaction (conflicting files)
asp-git: /usr/bin exists in filesystem
Errors occurred, no packages were upgraded.
==> WARNING: Failed to install built package(s).
==> Cleaning up...

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#19 2014-08-17 03:10:37

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Whoops. Fixed now. I've also adjusted the caching logic so that completions should be a bunch faster.

Offline

#20 2014-08-17 03:11:39

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Sweet! Thanks smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#21 2014-08-17 08:46:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

The Makefile changes seem to have broken man page intallation.
I got it to work again with some ugly hackery (Make remains a complete mystery to me...):

MANPREFIX ?= $(PREFIX)/share/man
...
	install -D -m644 $(MANPAGES) $(DESTDIR)$(MANPREFIX)/man1/asp.1

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#22 2014-08-17 11:56:46

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

Uggh. Embarassing... probably wasn't the best idea to be coding last night after downing cold meds. Should be fixed, for realz, at HEAD.

Offline

#23 2014-08-20 21:21:26

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: asp - Arch Source Package management (git-based ABS alternative)

This is very, very cool. And, very useful. Goodbye ABS.

Offline

#24 2014-09-11 04:37:34

gabrielrcp
Member
Registered: 2012-05-11
Posts: 3

Re: asp - Arch Source Package management (git-based ABS alternative)

Could someone explain to me how to use the "checkout" verb to mantain your local changes? I will explain bellow what I tried to do, sorry in advance for the long post.

I am trying to maintain a patch that I use locally in the ffmpeg package, to add some (nonfree) dependencies. I set it up like this:

$ cd ~/mybuilds
$ asp checkout ffmpeg
$ cd ffmpeg
$ git checkout -b localchanges
... Edited some files...
$ git commit -a -m "My patchset to add some libraries to ffmpeg"

So far so good. Today I noticed that ffmpeg updated, so this was what I tried to do:

$ asp update -> this showed me that ffmpeg was indeed updated, I don't have the exact message anymore
$ cd ~/mybuilds/ffmpeg
$ git checkout packages/packages/ffmpeg
$ git pull
Already up-to-date.

When I go to $ASPROOT and run "git branch -v", it tells me that packages/packages/ffmpeg is behind by 3 commits.
Should this be updated when asp update is run? Am I missing something?

Thanks

Offline

#25 2014-09-11 12:48:17

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: asp - Arch Source Package management (git-based ABS alternative)

gabrielrcp wrote:

Am I missing something?

Nope, it's a bug. The issue is that the checked out repo must point to a local branch. But, this local branch pointer isn't automatically updated on 'asp update'. You can work around this for now by resetting the branch pointer manually:

$ cd "$ASPROOT"
$ git branch -f packages/packages/gcc refs/remotes/packages/packages/gcc

And now pulling in your checked out repo should work...

I'll teach asp to do this automatically.

Offline

Board footer

Powered by FluxBB