You are not logged in.

#1 2005-05-06 05:16:03

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

PRIMAL

PRIMAL - Personal Repository Information Manager for ArchLinux

It is an easy way for people to notify you that a package has become stale, and for people to request an update.

For more information, a screenshot, and the location of the code..see HERE

phrakture is trying to use it. Maybe someone else might find it useful.
8)


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#2 2005-05-09 22:36:15

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

updated. Added functionality to work against a remote repository.
I also changed the way the package list is obtained. It used to do a dir listing on the pkg directory, now it just snags the db.tar.gz file and with a little creative piping, gets the list of packages.

ps.

wget -q -O - http://path/to/repo.db.tar.gz | tar -tvz | grep -e "^d" | awk '{print $6}'

"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-05-10 14:39:24

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: PRIMAL

cactus wrote:

ps.

wget -q -O - http://path/to/repo.db.tar.gz | tar -tvz | grep -e "^d" | awk '{print $6}'

nice!

Offline

#4 2005-05-11 00:44:27

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

updated primal.
more goodies for phrakture.  wink

· split configs into a seperate file (ruby mixin)
· removed wget dependency (currently only requires tar, grep, and awk. in the near future, it will only require tar).
· can use ftp or http or local path for repo.db.tar.gz (ftp is untested, but should work)


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#5 2005-05-12 00:59:43

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

more updates
· Removed requirement for grep and awk (thanks phrakture)

Also, phrakture uncovered an issue with ruby 1.6. Apparently uri open is not available in 1.6. I will probably go with using net/* to get the files directly, instead of the wrapper class.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#6 2005-05-12 02:49:16

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: PRIMAL

damn scrubs installing ruby 1.6 on my server! lol

Offline

#7 2005-05-12 03:01:46

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

tell em to upgrade, or there will be pimp slaps for everyone!


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#8 2005-05-12 03:32:22

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: PRIMAL

cactus wrote:

Also, phrakture uncovered an issue with ruby 1.6. Apparently uri open is not available in 1.6. I will probably go with using net/* to get the files directly, instead of the wrapper class.

it's basically replicating what uri open does... however, I saw somewhere that uri open is a bad idea, because it overwrites the main "open" call with something exploitable (according to what I read, php did something like this and it was a big mess...)

anyway, something like this doesn't seem too bad:

uri=URI.parse(REPO_URI)
case uri.scheme
  when 'file'
    #use IO.open
  when 'ftp'
    #use Net::FTP
  when 'http'
    #user Net::HTTP
  else
    print "not a uri"
end

then just constrain the REPO to be a valid uri (file:// for local) and viola

Offline

#9 2005-05-12 05:59:50

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

sounds like a good plan phrak..
I was using uri-open for simplicity sake. Since the input is being parsed from a prespecified file, and not from user input, the possability of it being abused is negligable. If I was parsing user input and trying to open a file based on that input, then indeed, I would not be using it..
Heh...I will probably not be using it anyway.  wink

*goes off to code*


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#10 2005-05-13 09:22:51

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

Due to the fact that ftp transactions can take some time, and web queries in general can be slow to unknown remote sites, I am thinking of breaking primal into two components. One component that updates the repository information backend, handles cleaning up stale settings when packages are updated, etc.
The other portion will just be flagging things stale, and sending the notices (if configured to send notices).

The backend update can be run by hand, or in a cron. At least, that is what I am envisioning. This should speed up the frontend, and reduce the cpu time the script uses up, as well as make it more responsive..

Ideas? Comments?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#11 2005-05-13 15:23:55

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: PRIMAL

sounds like a good idea... cron jobs are always fun

it also makes more sense this way, as personal repos don't change all that often (i'd say mine changes about once a week)... so a daily cron job would handle it perfectly (and one could always force the update too)

One suggestion, if this is going to be done in a background process, it may make sense then to, after the compare, do a quick check of the flagged versions vs the newly grabbed versions, and unflag them:
that is, [if(new_version > old_version) dbclear package_name;]

that way, almost no db management would have to take place, as the cron job would take care of it... (or the manual update)

Offline

#12 2005-05-13 18:55:35

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

that is the plan phrak. the current script does this, and that will be migrating to the other script.
tongue


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#13 2005-05-14 02:54:44

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

pretty much finished the new backend script. It is svn if anyone wants to look at the code..

the frontend (index.rb) shoudn't take too long. The backend came out pretty nice in the end...

EDIT: Frontend code is done now too. It was quicker than I expected. Not a whole lot changed from before, except quite a bit of simplification due to moving functionality to the backend.

The script seems faster too, by a little bit. yay!
Also got http working with net/http, so it should be phrakture compatible. ftp also works. Here is a screenshot I tested using the arch current repo and ftp.  wink IMAGE

EDIT2: Release a version 1.0 tarball. More info


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#14 2007-06-26 21:24:44

wain
Member
From: France
Registered: 2005-05-01
Posts: 289
Website

Re: PRIMAL

Please where can I find a tarball ? Primal looks very cool (better than APRV)  :-)

Offline

#15 2007-06-26 21:39:42

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

hmm.
I will look around for the code.
It should be laying around somewhere on one of my servers...


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#16 2007-06-28 22:08:32

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

wain. I couldn't find the code in my backups.
I was long ago and far away.
Looks like it was lost in a server explosion I had a while back...

I did find somebody running it here: http://www.jiwe.org/primal/
I think that is dibble's site for aeges gis stuff. You might see if he has a source tarball for it still.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#17 2007-06-29 04:45:48

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: PRIMAL

there's nothing wget -r can't achieve tongue

Offline

#18 2007-06-29 12:39:58

jb
Member
From: Florida
Registered: 2006-06-22
Posts: 466

Re: PRIMAL

...but wouldn't that just grab the html aftermath of the scripts?


...

Offline

#19 2007-06-29 19:26:14

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: PRIMAL

apparently not. grabbed all the required php files for.

Offline

#20 2007-06-29 20:14:57

wain
Member
From: France
Registered: 2005-05-01
Posts: 289
Website

Re: PRIMAL

php files are here: ftp://ftp.sunsite.dk/projects/aegis/www/htdocs/primal/
but it's impossible to download ".configs.php" file (550 Prohibited file name). sad

Offline

#21 2007-06-29 20:21:03

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: PRIMAL

http://nagi-fanboi.net/arch/primal.tar.gz

I haven't tested it... so I'm not sure if I grabbed everything right.

Offline

#22 2007-06-29 20:32:36

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

ahh cool.
you don't need the .configs.php file itself. you can extrapolate the config values from the code...

Just do a `grep -Ri "config->get" *` from the top level of the resultant source dir.
The config file was a .ini format file, that had a header at the top that wouldn't allow you to view the contents of it via a browser.

Or..you can wait a few hours, and I can post an extrapolated config based on the source code...
shouldn't be too hard. smile


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#23 2007-06-29 21:08:13

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PRIMAL

This will probably work.

;<?php if (eregi('.configs.php', $PHP_SELF)) { die("You can't access this file directly..."); } ?>

[TEMPLATE]
image = "path/to/image"
pkgbuild_url = "url/path/to/pkgbuilds"
packages_url = "url/path/to/binaries"

[DB]
username = "user"
password = "pass"
host = "localhost"
dbname = "test"
table_prefix = "primal_"

[NOTIFY]
email =

[GENERAL]
homepage = 
viewcvs = 
repo_db_url =

"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#24 2007-06-29 21:49:58

wain
Member
From: France
Registered: 2005-05-01
Posts: 289
Website

Re: PRIMAL

cactus wrote:

This will probably work.

Thanks smile

Offline

Board footer

Powered by FluxBB