dnbert / prm

PRM Allows you to quickly build package repositories, inspired by Jordan Sissels' FPM
MIT License
250 stars 33 forks source link

Deb repository creation not going so well... #40

Closed mstanislav closed 10 years ago

mstanislav commented 10 years ago

Not sure if PEBKAC or...

root@debian-71-64:/vagrant/Desktop/repositories# prm -t deb -p Ubuntu -c main -r precise -a i386,amd64 -k
Building Path: Ubuntu/dists/precise/main/binary-i386/
Generating Packages: precise : main : binary-i386
Building Path: Ubuntu/dists/precise/main/binary-amd64/
Generating Packages: precise : main : binary-amd64

You need a passphrase to unlock the secret key for
user: "Duo Security Package Signing <dev@duosecurity.com>"
1024-bit DSA key, ID 15D32EFC, created 2013-09-05

Then when I check, I see...

root@debian-71-64:/vagrant/Desktop/repositories# tree Ubuntu/
Ubuntu/
├── dists
│   └── precise
│       ├── main
│       │   ├── binary-amd64
│       │   │   ├── Packages
│       │   │   ├── Packages.gz
│       │   │   └── Release
│       │   └── binary-i386
│       │       ├── Packages
│       │       ├── Packages.gz
│       │       └── Release
│       ├── Release
│       └── Release.gpg
├── duo-unix_1.9.6-0_amd64.deb
├── duo-unix_1.9.6-0_i386.deb
├── duo-unix_1.9.7-0_amd64.deb
└── duo-unix_1.9.7-0_i386.deb

Also, just to confirm...

-rw-r--r-- 1 vagrant vagrant  0 Mar  6 17:32 Ubuntu/dists/precise/main/binary-amd64/Packages
-rw-r--r-- 1 vagrant vagrant 20 Mar  6 17:32 Ubuntu/dists/precise/main/binary-amd64/Packages.gz
-rw-r--r-- 1 vagrant vagrant  0 Mar  6 17:32 Ubuntu/dists/precise/main/binary-amd64/Release
-rw-r--r-- 1 vagrant vagrant  0 Mar  6 17:32 Ubuntu/dists/precise/main/binary-i386/Packages
-rw-r--r-- 1 vagrant vagrant 20 Mar  6 17:32 Ubuntu/dists/precise/main/binary-i386/Packages.gz
-rw-r--r-- 1 vagrant vagrant  0 Mar  6 17:32 Ubuntu/dists/precise/main/binary-i386/Release

Any thoughts what I am mangling with these simple steps? :) Great work, btw, so awesome to see this. Perfect complement to FPM. Cheers!

dnbert commented 10 years ago

Hello,

I'm super sorry for not seeing this earlier, I would've responded much earlier than this! By default prm assigns packages into each of the binary directories, like so:

$ tree Ubuntu/
Ubuntu/
`-- dists
    `-- precise
        |-- Release
        |-- Release.gpg
        `-- main
            |-- binary-amd64
            |   |-- Packages
            |   |-- Packages.gz
            |   |-- Release
            |   |-- md5-results
            |   |   `-- test_0.1_all.deb
            |   `-- test_0.1_all.deb
            `-- binary-i386
                |-- Packages
                |-- Packages.gz
                |-- Release
                |-- md5-results
                |   `-- test_0.1_all.deb
                `-- test_0.1_all.deb

This was ran by the command:

prm -t deb -p Ubuntu -c main -r precise -a i386,amd64 -d test_dir -k

The -d flag can be used to store packages in a specific directory and have PRM move them into their correct location.

I think that was the problem that you were seeing? If not, please let me know I'm more than happy to help

mstanislav commented 10 years ago

Looks like I misinterpreted what that flag was supposed to do. Seems that I have a deb file issue, now.

markstanislav@mstanislav-MBP:~/Desktop % prm -t deb -p Ubuntu -c main -r precise -a i386,amd64 -d ubuntu                                                                   [ 1:21PM]
i386
amd64
Building Path: Ubuntu/dists/precise/main/binary-i386/
Generating Packages: precise : main : binary-i386
ar: control.tar.gz: not found in archive
ar: control.tar.gz: not found in archive
/Users/markstanislav/.rvm/gems/ruby-2.0.0-p195/gems/prm-0.2.9/lib/prm/repo.rb:133:in `read': No such file or directory - tmp/duo-unix_1.9.6-0_i386.deb/control (Errno::ENOENT)
    from /Users/markstanislav/.rvm/gems/ruby-2.0.0-p195/gems/prm-0.2.9/lib/prm/repo.rb:133:in `block (2 levels) in generate_packages_gz'
    from /Users/markstanislav/.rvm/gems/ruby-2.0.0-p195/gems/prm-0.2.9/lib/prm/repo.rb:131:in `synchronize'
    from /Users/markstanislav/.rvm/gems/ruby-2.0.0-p195/gems/prm-0.2.9/lib/prm/repo.rb:131:in `block in generate_packages_gz'
    from /Users/markstanislav/.rvm/gems/ruby-2.0.0-p195/gems/peach-0.5.1/lib/peach.rb:22:in `block (2 levels) in peach'
    from /Users/markstanislav/.rvm/gems/ruby-2.0.0-p195/gems/peach-0.5.1/lib/peach.rb:22:in `each'
    from /Users/markstanislav/.rvm/gems/ruby-2.0.0-p195/gems/peach-0.5.1/lib/peach.rb:22:in `block in peach'
    from /Users/markstanislav/.rvm/gems/ruby-2.0.0-p195/gems/peach-0.5.1/lib/peach.rb:13:in `block (2 levels) in _peach_run'

These files were created with FPM so as per a typical control file I can't speak to that part. Thoughts? Thanks for your help!

dnbert commented 10 years ago

Hello! This sounds like the metadata for package has been messed up somehow. I'd be interested in seeing your FPM command that you ran to build this though!

Can you show me what the contents of package look like when you run ar x $package name?

mstanislav commented 10 years ago

Appears like it may have only been an issue on Mac OS X. All seems well regarding both issues now on a Linux VM. Will open a new issue if anything pops up. Thanks so much for your help, great project!