You are not logged in.

#26 2008-05-25 15:13:08

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: pkgman - a bash script for local package and PKGBUILD management

OK, so I converted your manpage to asciidoc (you might call that unnecesary work smile I added a couple of words about toggling switches at the beginning (since that's what was confusing me smile
Here you go: http://rafb.net/p/UcYZcK16.html

Offline

#27 2008-05-26 13:24:10

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

thanks bender02. i'm using your description now.
about asciidoc: i started writing the manpage with manedit, then i realized that nroff is pretty easy and straightforward (you actually need only 5-7 formatting commands fr writing a manpage). so i use only an editor for that.

Offline

#28 2008-05-26 15:08:17

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: pkgman - a bash script for local package and PKGBUILD management

@donvla: I'd also add a sentence like "Note: this deletes PKGBUILDs (so you better have them backed up, see -b)" to the description of "-f, --flush" (since that's where I burned myself last time) in the manpage.

Offline

#29 2008-05-26 17:59:49

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

bender02 wrote:

@donvla: I'd also add a sentence like "Note: this deletes PKGBUILDs (so you better have them backed up, see -b)" to the description of "-f, --flush" (since that's where I burned myself last time) in the manpage.

that's what the manpage actually says:

 -f, --flush
              Delete src/pkg directories and files in <packagename> directory except source files with bz2, deb, gz, tgz, rar, rpm or zip extension.

i also thought about another delete option that does not remove the PKGBUILD and related file, but "-b" and later "-e -v <version>" does the same and is more versatile. at least, i think so.

vlad

Offline

#30 2008-05-30 03:19:37

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: pkgman - a bash script for local package and PKGBUILD management

It looks like a very promissing script. However, I find the switches ugly, the documentation confusing. Switches should never toggle. I don't remember seeing that anywhere. If you really want to toggle, create --no<switch> or --switch=off or --switch=false. It's extremely confusing.

--repoadd is failing for me. It says it can't find the package in .backup? It's not in .backup, but it's in the directory. Sometimes it does find it. Why does one need to backup the source? 99% of the packages out there keep old versions on their ftp. As for the binary, you most likely use the packages for which you have a local repository. Meaning, there is a backup in /var/cache/pacman/pkg. PKGBUILD, install, etc. can be easily backed up in a far better way. Use mercurial or git. It's very simple. "hg init; hg add PKGBUILD; hg commit -m "message". It's a much better way to keep track of old versions.

Sometimes it overwrites my edited PKGBUILD. It redownloads the tarball. It also tries to rebuild when it has already been built. Like I said, I find it confusing.

pkgman --makepkg foo  -> Make package.
pkgman --repoadd foo -> add package to repo

That's how I want to use it. Toggling, conf files, it's just confusing.

Last edited by SpookyET (2008-05-30 03:30:57)

Offline

#31 2008-05-30 15:48:00

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

Hi all,

SpookyET wrote:

It looks like a very promissing script. However, I find the switches ugly, the documentation confusing. Switches should never toggle. I don't remember seeing that anywhere. If you really want to toggle, create --no<switch> or --switch=off or --switch=false. It's extremely confusing.

Sorry! The documentation is not ready.  It is still the second draft. It needs more work, but i have less time. Contributions are welcome.
I think the problem is semantical. You're right switches is the wrong term for that. It's been already used in another
context. Perhaps I should rename them, smth like optiontoggles, toggleoptions, toggleflags or ... Suggestions?
This toggling stuff is thought to be additional not a replacement for "normal" flags. That's why I called them switches... When you set the four options (BackupTarball,UseMakepkg;UseRepoadd,SwitchToDirectory)=no in your pkgman.conf, they behave like "normal" flags, eg '--makepkg' makes the package, '--backup' backups the source tarball, etc.

--repoadd is failing for me. It says it can't find the package in .backup? It's not in .backup, but it's in the directory. Sometimes it does find it.

In the last versions I tried to integrate makepkg.conf, perhaps something does not fit together. need more input. Do you have PKGDEST or SRCDEST set, have you run '--runmefirst', did you build the package with pkgman?

Why does one need to backup the source? 99% of the packages out there keep old versions on their ftp.

Do they? Why searching when you have all in a local directory? What if you customized some PKGBUILDs or files? What about patches, config.mk,etc. There are many reasons to backup sources. Note, this script tries to manage not only binary packages, but also the (customized) PKGBUILD tarballs.
Actually, that's its first purpose. Keeping track of source tarballs (and then packages) on longer run.

As for the binary, you most likely use the packages for which you have a local repository. Meaning, there is a backup in /var/cache/pacman/pkg.

What does a local repo have to do with pacman's package cache?
How big is your /var/cache/pacman/pkg directory? How many backed up package versions do you have there? /var/cache/pacman/pkg is "unreliable" - you cannot keep track of every package -  and it grows very fast. I doubt you have packages which are older than some months - though you perhaps use only 'pacman -Sc'. After one month of upgrading stuff my /var/cache/pacman/pkg used almost 2gb. I usually run pacman -Scc every 2-3 weeks and clean up everything.
Hmm, that could be an additional feature: check if there is already a package of
given version in  /var/cache/pacman/pkg before building.

PKGBUILD, install, etc. can be easily backed up in a far better way. Use mercurial or git. It's very simple. "hg init; hg add PKGBUILD; hg commit -m "message". It's a much better way to keep track of old versions.

The funny thing is that I actually used git for backing up own submitted PKGBUILDs, but I realized it is faaaar more work than simply running 'makepkg --source' - that's what '--backup' does - and make a simple snapshot of submitted version. And then you have the
ready tarballs which you can simply untar when you need to build the package or directly submit to AUR.
Sure, this script reflects my own workflow. One perhaps thinks using git/mercurial is more convenient.

Sometimes it overwrites my edited PKGBUILD. It redownloads the tarball. It also tries to rebuild when it has already been built. Like I said, I find it confusing.

pkgman --makepkg foo  -> Make package.
pkgman --repoadd foo -> add package to repo

DO'H, is the manual so confusing? I guess I have to completely rewrite it from scratch. I'll do it this weekend or next days.

That's how I want to use it. Toggling, conf files, it's just confusing.

Once again: you *don't have* to use the toggle stuff at all (see above).

vlad

Offline

#32 2008-06-01 00:13:44

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: pkgman - a bash script for local package and PKGBUILD management

I don't know if this is a problem with just my config, but after the update to r26, pkgman is putting the inital src.tar.gz file into my "LocalRepository" folder instead of the SRCDEST I specified in makepkg.conf, so then it fails moving the src.tar.gz from the SRCDEST into my "LocalPackages" .backup folder, and I get an error that no tarballs are available when I try to submit something to the AUR.


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#33 2008-06-02 00:09:32

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

Stythys wrote:

I don't know if this is a problem with just my config, but after the update to r26, pkgman is putting the inital src.tar.gz file into my "LocalRepository" folder instead of the SRCDEST I specified in makepkg.conf, so then it fails moving the src.tar.gz from the SRCDEST into my "LocalPackages" .backup folder, and I get an error that no tarballs are available when I try to submit something to the AUR.

hm, I'm not really sure, but I think makepkg ignores the SRCDEST entry.
Try running 'makepkg --source' in the package directory and look if makepgk puts the src.tar.gz file into the right directory (of course with SRCDEST and PKGDEST set).
Here, though both, PKGDEST and SRCDEST, set, makepkg copies the src.tar.gz file to PKGDEST.
I will use directly the entries in the PKGBUILD in a later version and try to omit 'makepkg --source'.

vlad

ps: http://bugs.archlinux.org/task/10559

Last edited by DonVla (2008-06-02 00:24:24)

Offline

#34 2008-06-02 00:21:18

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: pkgman - a bash script for local package and PKGBUILD management

yeah makepkg --source put it in the wrong directory


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#35 2008-06-02 00:54:01

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

Stythys wrote:

yeah makepkg --source put it in the wrong directory

hi,
Actually makepkg put it into the right directory.
from makepkg.conf:

#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources

SRCDEST is only a cache directory. the src.tar.gz goes to PKGDEST.
I change this right now in pkgman.

thanks,
vlad

Offline

#36 2008-06-02 06:12:30

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: pkgman - a bash script for local package and PKGBUILD management

just something I noticed...it doesn't seem to be affecting anything, but this error scrolls by every time I use pkgman.
find: /var/abs/local/yaourtbuild/pacbuilder-svn/src/auth: Permission denied

If I change the permissions they'll change back pretty quickly.

Last edited by Stythys (2008-06-02 06:13:15)


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#37 2008-06-25 12:18:53

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: pkgman - a bash script for local package and PKGBUILD management

Hello,

my confige files are

[haawda@bertrand abs]$ ls -l /home/haawda/.pkgman
insgesamt 8
-rw-r--r-- 1 haawda users  474 25. Jun 14:10 AUR.conf
-rw-r--r-- 1 haawda users 1326 25. Jun 14:17 pkgman.conf

but I get

[haawda@bertrand abs]$ pkgman

==> ERROR: No configuration file found!
==> NOTE:  To proceed copy pkgman.conf and AUR.conf from /usr/share/pkgman 
       to /home/haawda/.pkgman and edit them correctly.

What am I doing wrong?

Offline

#38 2008-06-25 12:21:07

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: pkgman - a bash script for local package and PKGBUILD management

weird...I have my config files in ~/.config/pkgman/pkgman.conf


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#39 2008-06-25 12:26:46

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

Stefan Husmann wrote:

Hello,

my confige files are

[haawda@bertrand abs]$ ls -l /home/haawda/.pkgman
insgesamt 8
-rw-r--r-- 1 haawda users  474 25. Jun 14:10 AUR.conf
-rw-r--r-- 1 haawda users 1326 25. Jun 14:17 pkgman.conf

but I get

[haawda@bertrand abs]$ pkgman

==> ERROR: No configuration file found!
==> NOTE:  To proceed copy pkgman.conf and AUR.conf from /usr/share/pkgman 
       to /home/haawda/.pkgman and edit them correctly.

What am I doing wrong?

oh, the config directory is ~/.config/pkgman. it seems i forgot to change this in this error notification.
the man page mentions the correct location:

FILES
       $HOME/.config/pkgman/AUR.conf

       $HOME/.config/pkgman/pkgman.conf

Offline

#40 2008-08-09 06:50:17

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

new version:
r39: - when backing up src.tarballs it asks whether to backup the source file or not
       - more detailed "--list" option - also shows if package is installed or not and available ABS/AUR version
       - added prompt to clean up directory after makepkg
       - when checking pkg.tar.gz also possibility to check for conflicts with files of already installed packages
       - use $PAGER instead of less
       - --help directly shows the manpage
       - --shorthelp shows a brief usage overview
       - added a custom prompt when switching to build directory, works only with bash (is somehow experimental - works fine here for me)
       - minor internal changes
       - pkgman also reads ~/.aurvote file for getting aur name and password. if one already uses aurvote then there is no need for the
         ~/.config/pkgman/AUR.conf file.

the custom prompt stuff needs some testing. here it works fine. it does not break anything smile
one might take a look at /usr/share/pkgman/prompt.bash if interested.
i'm still working at the new manpage. volunteers are welcome.

vlad

Last edited by DonVla (2008-08-09 07:12:29)

Offline

#41 2008-08-09 16:38:10

rooloo
Member
Registered: 2008-07-09
Posts: 218

Re: pkgman - a bash script for local package and PKGBUILD management

I never knew this script was even here, now I am gonna have to test it out myself. Thanks for your efforts anyway donvla!

Offline

#42 2008-08-13 13:03:12

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

the building of  src.tar.gzs for AUR or backup is broke due to a minor "makepkg --source" issue. read this:
http://bugs.archlinux.org/task/11149
You'll have to wait until pacman v3.2.1 or apply the patch mentioned on the site above.
thanks
vlad

Offline

#43 2008-10-13 06:25:17

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

moved project to sourceforge.
a complete rewrite of the manual page is available here:
http://sourceforge.net/docman/display_d … _id=242118
there is also a release candidate (r39.5) for r40 on sourceforge:
http://sourceforge.net/project/showfile … _id=294770

Offline

#44 2008-10-15 18:48:10

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

r40:
- new manual page & rewrite of usage function (-h)
- both option "--flush" and "--flushall" were omitted in favor of the more versatile "--cleanup" option
- pkgman <packagename> checks now if <packagename> is owned by user
- backup option after each editing
- added license
- minor internal changes

r40 is smth like a final version; all main user-related options for AUR and local repos are covered now by pkgman.
if there are some bugs please post them here. i'll fix them.

vlad

Offline

#45 2008-10-20 14:56:08

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

r41 is out:
just small bug fixes, nothing crucial.

Last edited by DonVla (2008-10-20 14:56:40)

Offline

#46 2008-10-25 20:46:18

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

new release r42. small bugs fixed.

Offline

#47 2009-01-14 15:48:50

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

r45:
      - new options added:
             --listversions: list local and available versions of installed packages from LocalPackages directory
             --getownpackages: synchronize local own packages with AUR
      - added new variable in pkgman.conf:
              ListOutputInPager: output of, for example, "--list" or "--own" is piped into $PAGER
      - added a new optional dependency "desktop-file-utils" for validating desktop entry files
      - also supports now auto-generation of sha sums not only md5
      - internal fixes due to AUR interface changes:
             use of json interface
             correct parsing of package category
      - added 2 proto files (located under /usr/share/pacman):
             proto.desktop: a template for *.desktop files
             PKGBUILD-lib32.proto: a template for lib32 packages for x86_64
      - some code changes and fixes

Last edited by DonVla (2009-01-14 16:02:44)

Offline

#48 2009-01-19 02:46:49

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

r46: added new option to pkgman.conf (AutoGenerateSums). if AutoGenerateSums=no
         then pkgman asks whether to generate checksums or not.
         if set to yes it behaves like in former versions.

Last edited by DonVla (2009-01-19 02:50:51)

Offline

#49 2009-01-19 06:58:44

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: pkgman - a bash script for local package and PKGBUILD management

I had a short look at the script yesterday (r45). Two questions:

Is there a way to support more than one directory in "LocalPackages"? I have two of them.
Is there a way to stop pkgman to put *.src.taz.gz files into the repo? What is the use of this files?

Offline

#50 2009-01-19 13:35:13

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: pkgman - a bash script for local package and PKGBUILD management

Stefan Husmann wrote:

Is there a way to support more than one directory in "LocalPackages"? I have two of them.

no, not yet. i'll add support for different configuration files in a later release. so you'll have a config file for each "LocalPackages" directory.

Stefan Husmann wrote:

Is there a way to stop pkgman to put *.src.taz.gz files into the repo? What is the use of this files?

set "BackupTarball=no". if you want to backup use the "-b,--backup" option.
pkgman does not move the src.tar.gz to the repo, but "BackupDirectory" ("LocalPackages"/<packagename>/.backup/).
the use: it is a backup of the PKGBUILD and other files (install, etc) created with "makepkg --source" or "makepkg --allsource".
the last also backs up the downloaded source files.

vlad

Offline

Board footer

Powered by FluxBB