Compiling Debs on AMD vs. Intel and 32bit vs. 64bit

2007-03-15 Thread Michael S. Peek

Hi gurus,

I'm looking to buy or build an install host -- one machine dedicated to 
building and serving a local repository for the purposes of 
installing/upgrading/maintaining other Debian hosts throughout our 
organization.  The problem is, I'm a little clueless when it comes to 
hardware, and I want to make sure that I'm not about to shoot myself in 
the foot.  Some of the packages in my local repository require 
compiling.  Do I need to worry about AMD vs. Intel and/or 32-bit vs. 
64-bit when building my install host?  (A machine that generates *.deb 
files that are only good on *that* one machine is useless to me.)


How do you guys deal with this in your organizations?

Thanks for your input,

Michael Peek


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Custom repository and WARNING: The following packages cannot be authenticated!

2007-02-28 Thread Michael S. Peek

Hello gurus,

I'm hoping someone can give me a hand.

I have been running my own repository for a while now, and with the
release of etch as the new stable just around the corner, I would like
to add my own authentication to my repository.  So I set up an install
host running etch, put a repository on it, and followed the instructions
to set up authentication -- but it's a no-go.  I admit that I have a
problem understanding what I'm doing, since I've never used gnupg or pgp
before.  I'm hoping some kind soul on the list here can take a look at
what I've done and will see what I've got wrong.

Here's what I've done:

1) First, I created a gpg key with the following script, gpg-gen-key.
It relies on the existence of a file named passphrase.txt that holds my
passphrase.  (The whole process is automated on a secure host, so I'm
not worried about users being able to read the file.)  The script follows:

   #!/bin/bash

   set -e
   set -x

   this_dir=$(cd $(dirname ${0})  pwd)
   gpg_home=${this_dir}/.gnupg
   input_file=${this_dir}/input.txt

   test -d ${gpg_home} \
   || mkdir ${gpg_home}
   test -d ${gpg_home} \
chmod 0700 ${gpg_home}

   test -f ${this_dir}/passphrase.txt
   test -f ${this_dir}/input.txt \
   || cat  ${input_file}  EOF
   1
   2048
   0
   y
   Michael Peek
   [EMAIL PROTECTED]

   o

   EOF

   test -f ${gpg_home}/pubring.gpg \
   || gpg \
   --homedir ${gpg_home} \
   --command-file ${this_dir}/input.txt \
   --passphrase-file ${this_dir}/passphrase.txt \
   --gen-key \
   21

   str=$( \
   gpg --homedir ${gpg_home} --list-keys 21 \
   | grep '^pub' \
   | head -1 \
   | awk '{print $2}' \
   | awk -F/ '{print $2}' \
   )

   echo ${str}  tiem.id

   test -f tiem.key \
   || gpg --homedir ${gpg_home} --armor --export ${str}  tiem.key

   # vim:ts=2:shiftwidth=2:filetype=sh:syntax=sh:

This script generates a .gnupg/ directory, and spits out a tiem.key file
containing the key that I give to apt-key on my clients.  An example of
each file:

tiem.key:

   -BEGIN PGP PUBLIC KEY BLOCK-
   Version: GnuPG v1.4.6 (GNU/Linux)

   mQGXX9pq

   ...stuff...

   ...stuff...

   ...stuff...

   D8NXXJqR
   dKKfig==
   =8w/+
   -END PGP PUBLIC KEY BLOCK-

tiem.id:

   666C18A7

2) Next, I use the above keys to sign my Release file, placing the
signature in Release.gpg.  This is done with another script, gpg-sign,
which follows:

   #!/bin/bash

   set -e
   set -x

   this_dir=$(cd $(dirname ${0})  pwd)
   gpg_home=${this_dir}/.gnupg
   test -d ${gpg_home}
   test -f ${this_dir}/passphrase.txt
   gpg --homedir ${gpg_home} --list-keys
   str=$( \
   gpg --homedir ${gpg_home} --list-keys 21 \
   | grep '^pub' \
   | head -1 \
   | awk '{print $2}' \
   | awk -F/ '{print $2}' \
   )

   test ! -f ${2} \
   || rm -f ${2}

   gpg \
   --homedir ${gpg_home} \
   --passphrase-file ${this_dir}/passphrase.txt \
   --default-key ${str} \
   -abs \
   -o ${2} ${1} \
   21

   # vim:ts=2:shiftwidth=2:filetype=sh:syntax=sh:

An example of the Release.gpg file:

   -BEGIN PGP SIGNATURE-
   Version: GnuPG v1.4.6 (GNU/Linux)

   iD8XXA8d
   Z6CXXQw=
   =3twD
   -END PGP SIGNATURE-

3) On the client I add the key generated above in step 1 via apt-key.
The output of apt-key list is as follows:

   /etc/apt/trusted.gpg
   
   pub   1024D/2D230C5F 2006-01-03 [expired: 2007-02-07]
   uid  Debian Archive Automatic Signing Key (2006)
   [EMAIL PROTECTED]

   pub   1024D/6070D3A1 2006-11-20 [expires: 2009-07-01]
   uid  Debian Archive Automatic Signing Key (4.0/etch)
   [EMAIL PROTECTED]

   pub   1024D/1F41B907 1999-10-03
   uid  Christian Marillat [EMAIL PROTECTED]
   uid  Christian Marillat [EMAIL PROTECTED]
   sub   1536g/C28DCC42 1999-10-03
   sub   1024D/5D3877A7 2002-08-26

   pub   1024D/666C18A7 2007-02-27
   uid  Michael Peek [EMAIL PROTECTED]
   sub   2048g/969F8B67 2007-02-27

   pub   1024D/ADB11277 2006-09-17
   uid  Etch Stable Release Key
   debian-release@lists.debian.org

Notice the 666C18A7 key -- that's mine.

4) I run apt-get update, and get:

   Ign http://install1 etch Release.gpg
   Ign http://install1 etch Release
   Ign http://install1 etch/main Packages/DiffIndex
   Ign http://install1 etch/non-free Packages/DiffIndex
   Ign http://install1 etch/contrib Packages/DiffIndex
   Ign http://install1 etch/main Packages
   Ign http://install1 etch/non-free Packages
   Ign http://install1 etch/contrib Packages
   Hit http://install1 etch/main Packages
   Hit http://install1 etch/non-free Packages
   Hit http://install1 etch/contrib Packages
   Get:1 http

Brain dead package management?

2006-09-01 Thread Michael S. Peek
 
information.

.. 0%^M^MReading extended state information  ^M
^MInitializing package states... 0% ^M^MInitializing package states... 
Done^M
^MReading task descriptions... 0%^M^MReading task descriptions... 
2%^M^MReadi

ng task descriptions... Done^M
E: Unable to correct problems, you have held broken packages.
E: Unable to correct dependencies, some packages cannot be installed
E: Unable to resolve some dependencies!
Some packages had unmet dependencies.  This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following packages have unmet dependencies:
  tiem-cups-cfg: PreDepends: cupsys-bsd but it is not installable
ERROR: update-tiem returned non-zero exit code


Notice that lpr_ and cupsys-bsd+ are both in the list.

Now, if I call aptitude with ONLY lpr_ and cupsys-bsd+ on the 
command line, it works:



# aptitude install lpr_ cupsys-bsd+
Reading Package Lists... Done
Building Dependency Tree  
Reading extended state information 
Initializing package states... Done
Reading task descriptions... Done 
The following NEW packages will be automatically installed:

  cupsys-client libcupsys2-gnutls10
The following packages have been kept back:
  portmap
The following NEW packages will be installed:
  cupsys-bsd cupsys-client libcupsys2-gnutls10
The following packages will be REMOVED:
  lpr
0 packages upgraded, 3 newly installed, 1 to remove and 1 not upgraded.
Need to get 234kB of archives. After unpacking 233kB will be used.
Do you want to continue? [Y/n/?] 


What gives?  Does anybody understand why aptitude is behaving this way?

And apt-get does the exact same thing too.

Michael Peek


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Brain dead package management?

2006-09-01 Thread Michael S. Peek

martin f krafft wrote:


also sprach Michael S. Peek [EMAIL PROTECTED] [2006.09.01.1953 +0200]:
 


tiem-cups-cfg: PreDepends: cupsys-bsd but it is not installable
 



There's your problem. APT is made for software packages, not
configuration packages. Use cfengine or puppet for those. Or ucf or
something.

Since you PreDepend on cupsys-bsd, APT tries to pull it in at such
an early stage that it hasn't even looked at the lpr_ yet.

 

Whoo-hoo!  That seems to be the key to the whole problem.  If I make two 
passes, saving the second pass just for my custom tiem-* packages, then 
it works.


Still, not being smart enough to realize that lpr needs to be removed in 
order to satisfy the cupsys-bsd pre-dependency sounds kinda like a bug 
to me.


Thanks,

Michael Peek


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Use of dpkg --set-selections is brain-dead?

2006-08-31 Thread Michael S. Peek

Kevin Buhr wrote:


Michael S. Peek [EMAIL PROTECTED] writes:
 


I've traced my problem down to the use of 'dpkg --set-selections'
command.  As an example, I have a package named tiem-nis-client-cfg
that sets up NIS for generic workstations.  If I understand correctly,
I should be able to do the following:

  echo tiem-nis-client-cfg  install | dpkg --set-selections

And then, when I type 'dpkg --get-selections', I should see
tiem-nis-client-cfg   install one some line in the output.
   



No, dpkg --get-selections without further arguments only lists
packages that are either installed or deinstalled (but still have
their config files on the system), not purged packages or those that
have never been on your system, even if those packages have been
selected for installation.  If you run:

   dpkg --get-selections tiem-nis-client-cfg

that should show that your new package has been selected for
installation.

 


Now I'm getting somewhere:

:~# echo tiem-nis-client-cfg install | dpkg --set-selections ; echo $?
; dpkg --get-selections tiem-nis-client-cfg | grep 'tiem-nis-client-cfg'
; echo $?
0
tiem-nis-client-cfg install
0

This does indeed work -- my tiem-nis-client-cfg package is now shown as
being slated for installation.

Which begs the question: Why doesn't 'apt-get dselect-upgrade' install
the package?

I have also tried 'dselect install', but with no success.  They both
give the same result:

~# dselect update
Hit http://tortoise sarge/main Packages
Ign http://tortoise sarge/main
Release
Hit http://tortoise sarge/non-free
Packages
Ign http://tortoise sarge/non-free
Release
Hit http://tortoise sarge/contrib
Packages
Ign http://tortoise sarge/contrib
Release
Hit http://ftp.us.debian.org sarge/main
Packages
Hit http://ftp.us.debian.org sarge/main
Release
Hit http://ftp.us.debian.org sarge/non-free
Packages
Hit http://ftp.us.debian.org sarge/non-free
Release
Hit http://ftp.us.debian.org sarge/contrib
Packages
Hit http://ftp.us.debian.org sarge/contrib
Release
Hit http://ftp.us.debian.org sarge/main
Sources
Hit http://ftp.us.debian.org sarge/main
Release
Hit http://ftp.us.debian.org sarge/non-free
Sources
Hit http://ftp.us.debian.org sarge/non-free
Release
Hit http://ftp.us.debian.org sarge/contrib
Sources
Hit http://ftp.us.debian.org sarge/contrib
Release
Hit http://ftp.us.debian.org testing/main
Sources
Hit http://ftp.us.debian.org testing/main
Release
Hit http://ftp.us.debian.org testing/non-free
Sources
Hit http://ftp.us.debian.org testing/non-free
Release
Hit http://ftp.us.debian.org testing/contrib
Sources
Hit http://ftp.us.debian.org testing/contrib
Release
Hit http://ftp.us.debian.org unstable/main
Sources
Hit http://ftp.us.debian.org unstable/main
Release
Hit http://mirror.home-dn.net sarge/main
Sources
Hit http://mirror.home-dn.net sarge/main
Release
Hit http://download.videolan.org sarge/main
Sources
Ign http://download.videolan.org sarge/main Release
Hit http://ftp.us.debian.org unstable/non-free Sources
Hit http://security.debian.org sarge/updates/main Packages
Hit http://security.debian.org sarge/updates/main Release
Hit http://ftp.us.debian.org unstable/non-free Release
Hit http://ftp.us.debian.org unstable/contrib Sources
Hit http://ftp.us.debian.org unstable/contrib Release
Hit http://download.videolan.org sid/main Sources
Ign http://download.videolan.org sid/main Release
Hit http://security.debian.org sarge/updates/contrib Packages
Hit http://security.debian.org sarge/updates/contrib Release
Hit http://security.debian.org sarge/updates/non-free Packages
Hit http://security.debian.org sarge/updates/non-free Release
Reading Package Lists... Done
Merging Available information
Replacing available packages info, using /var/cache/apt/available.
Information about 15850 package(s) was updated.

~# dselect install
Reading Package Lists... Done
Building Dependency Tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Do you want to erase any previously downloaded .deb files? [Y/n]
Press enter to continue.

~# apt-get update
Hit http://tortoise sarge/main Packages
Ign http://tortoise sarge/main
Release
Hit http://tortoise sarge/non-free
Packages
Ign http://tortoise sarge/non-free
Release
Hit http://tortoise sarge/contrib
Packages
Ign http://tortoise sarge/contrib
Release
Hit http://ftp.us.debian.org sarge/main
Packages
Hit http://ftp.us.debian.org sarge/main
Release
Hit http://ftp.us.debian.org sarge/non-free
Packages
Hit http://ftp.us.debian.org sarge/non-free
Release
Hit http://ftp.us.debian.org sarge/contrib
Packages
Hit http://ftp.us.debian.org sarge/contrib
Release
Hit http://ftp.us.debian.org sarge/main
Sources
Hit http://ftp.us.debian.org sarge/main
Release
Hit http://ftp.us.debian.org sarge/non-free
Sources
Hit http://ftp.us.debian.org sarge/non-free
Release
Hit http://ftp.us.debian.org sarge/contrib
Sources
Hit http://ftp.us.debian.org sarge/contrib
Release
Hit http://ftp.us.debian.org testing/main
Sources
Hit http

Re: Use of dpkg --set-selections is brain-dead?

2006-08-31 Thread Michael S. Peek

Michael S. Peek wrote:


Kevin Buhr wrote:


Michael S. Peek [EMAIL PROTECTED] writes:
 


I've traced my problem down to the use of 'dpkg --set-selections'
command.  As an example, I have a package named tiem-nis-client-cfg
that sets up NIS for generic workstations.  If I understand correctly,
I should be able to do the following:

  echo tiem-nis-client-cfg  install | dpkg --set-selections

And then, when I type 'dpkg --get-selections', I should see
tiem-nis-client-cfg   install one some line in the output.
  



No, dpkg --get-selections without further arguments only lists
packages that are either installed or deinstalled (but still have
their config files on the system), not purged packages or those that
have never been on your system, even if those packages have been
selected for installation.  If you run:

   dpkg --get-selections tiem-nis-client-cfg

that should show that your new package has been selected for
installation.

 


Now I'm getting somewhere:

:~# echo tiem-nis-client-cfg install | dpkg --set-selections ; echo $?
; dpkg --get-selections tiem-nis-client-cfg | grep 'tiem-nis-client-cfg'
; echo $?
0
tiem-nis-client-cfg install
0

This does indeed work -- my tiem-nis-client-cfg package is now shown as
being slated for installation.

Which begs the question: Why doesn't 'apt-get dselect-upgrade' install
the package?

I have also tried 'dselect install', but with no success.  They both
give the same result:

~# dselect update
Hit http://tortoise sarge/main Packages
Ign http://tortoise sarge/main
Release
Hit http://tortoise sarge/non-free
Packages
Ign http://tortoise sarge/non-free
Release
Hit http://tortoise sarge/contrib
Packages
Ign http://tortoise sarge/contrib
Release
Hit http://ftp.us.debian.org sarge/main
Packages
Hit http://ftp.us.debian.org sarge/main
Release
Hit http://ftp.us.debian.org sarge/non-free
Packages
Hit http://ftp.us.debian.org sarge/non-free
Release
Hit http://ftp.us.debian.org sarge/contrib
Packages
Hit http://ftp.us.debian.org sarge/contrib
Release
Hit http://ftp.us.debian.org sarge/main
Sources
Hit http://ftp.us.debian.org sarge/main
Release
Hit http://ftp.us.debian.org sarge/non-free
Sources
Hit http://ftp.us.debian.org sarge/non-free
Release
Hit http://ftp.us.debian.org sarge/contrib
Sources
Hit http://ftp.us.debian.org sarge/contrib
Release
Hit http://ftp.us.debian.org testing/main
Sources
Hit http://ftp.us.debian.org testing/main
Release
Hit http://ftp.us.debian.org testing/non-free
Sources
Hit http://ftp.us.debian.org testing/non-free
Release
Hit http://ftp.us.debian.org testing/contrib
Sources
Hit http://ftp.us.debian.org testing/contrib
Release
Hit http://ftp.us.debian.org unstable/main
Sources
Hit http://ftp.us.debian.org unstable/main
Release
Hit http://mirror.home-dn.net sarge/main
Sources
Hit http://mirror.home-dn.net sarge/main
Release
Hit http://download.videolan.org sarge/main
Sources
Ign http://download.videolan.org sarge/main Release
Hit http://ftp.us.debian.org unstable/non-free Sources
Hit http://security.debian.org sarge/updates/main Packages
Hit http://security.debian.org sarge/updates/main Release
Hit http://ftp.us.debian.org unstable/non-free Release
Hit http://ftp.us.debian.org unstable/contrib Sources
Hit http://ftp.us.debian.org unstable/contrib Release
Hit http://download.videolan.org sid/main Sources
Ign http://download.videolan.org sid/main Release
Hit http://security.debian.org sarge/updates/contrib Packages
Hit http://security.debian.org sarge/updates/contrib Release
Hit http://security.debian.org sarge/updates/non-free Packages
Hit http://security.debian.org sarge/updates/non-free Release
Reading Package Lists... Done
Merging Available information
Replacing available packages info, using /var/cache/apt/available.
Information about 15850 package(s) was updated.

~# dselect install
Reading Package Lists... Done
Building Dependency Tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Do you want to erase any previously downloaded .deb files? [Y/n]
Press enter to continue.

~# apt-get update
Hit http://tortoise sarge/main Packages
Ign http://tortoise sarge/main
Release
Hit http://tortoise sarge/non-free
Packages
Ign http://tortoise sarge/non-free
Release
Hit http://tortoise sarge/contrib
Packages
Ign http://tortoise sarge/contrib
Release
Hit http://ftp.us.debian.org sarge/main
Packages
Hit http://ftp.us.debian.org sarge/main
Release
Hit http://ftp.us.debian.org sarge/non-free
Packages
Hit http://ftp.us.debian.org sarge/non-free
Release
Hit http://ftp.us.debian.org sarge/contrib
Packages
Hit http://ftp.us.debian.org sarge/contrib
Release
Hit http://ftp.us.debian.org sarge/main
Sources
Hit http://ftp.us.debian.org sarge/main
Release
Hit http://ftp.us.debian.org sarge/non-free
Sources
Hit http://ftp.us.debian.org sarge/non-free
Release
Hit http://ftp.us.debian.org sarge/contrib
Sources
Hit http://ftp.us.debian.org sarge/contrib
Release
Hit http://ftp.us.debian.org testing/main
Sources

Use of dpkg --set-selections is brain-dead?

2006-08-30 Thread Michael S. Peek

Hello gurus,

I thought I would be slick and write a package that contains a script 
that will figure out what should be installed/removed/upgraded/etc. on 
each of the machines where I work.  (Using sarge, btw.)  I had planned 
to do this by listing each of the packages and it's install status in a 
file, then piping that file to 'dpkg --set-selections', and then using 
'apt-get dselect-upgrade' to process the new package selections.


Unfortunately, this doesn't seem to work as I expected.

I've traced my problem down to the use of 'dpkg --set-selections' 
command.  As an example, I have a package named tiem-nis-client-cfg that 
sets up NIS for generic workstations.  If I understand correctly, I 
should be able to do the following:


   echo tiem-nis-client-cfg  install | dpkg --set-selections

And then, when I type 'dpkg --get-selections', I should see 
tiem-nis-client-cfg   install one some line in the output.  
Unfortunately, this doesn't seem to work:


   ~# echo tiem-nis-client-cfg  install | dpkg --set-selections ; 
echo $? ; dpkg --get-selections | grep 'tiem-nis-client-cfg' ; echo $?

   0
   1

The dpkg --set-selections command prints no error, and returns no error 
code, but tiem-nis-client-cfg isn't set for installation.


I know that the package database knows about my tiem-nis-client-cfg, 
because I can do this:


   ~# apt-cache show tiem-nis-client-cfg
   Package: tiem-nis-client-cfg
   ...blah, blah, blah...

And I can install the package by hand:

   ~# apt-get install tiem-nis-client-cfg
   Reading Package Lists... Done
   Building Dependency Tree... Done
   The following extra packages will be installed:
 libslp1 nis
   Suggested packages:
 slpd openslp-doc
   The following NEW packages will be installed:
 libslp1 nis tiem-nis-client-cfg
   0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
   Need to get 291kB of archives.
   After unpacking 1065kB of additional disk space will be used.
   Do you want to continue? [Y/n]
   Get:1 http://ftp.us.debian.org sarge/main libslp1 1.0.11a-2 [47.3kB]
   Get:2 http://tortoise sarge/non-free tiem-nis-client-cfg 1.4 [3780B]
   Get:3 http://ftp.us.debian.org sarge/main nis 3.13-2 [240kB]   
   Fetched 291kB in 0s (293kB/s)

   Preconfiguring packages ...
   Selecting previously deselected package libslp1.
   (Reading database ... 50195 files and directories currently installed.)
   Unpacking libslp1 (from .../libslp1_1.0.11a-2_i386.deb) ...
   Selecting previously deselected package nis.
   Unpacking nis (from .../archives/nis_3.13-2_i386.deb) ...
   Setting up libslp1 (1.0.11a-2) ...
  
   Setting up nis (3.13-2) ...

   Setting NIS domainname to: tiem.utk.edu
   Starting NIS services: ypbind [binding to YP server .. 
backgrounded]
  
   (Reading database ... 50289 files and directories currently installed.)
   Unpacking tiem-nis-client-cfg (from 
.../tiem-nis-client-cfg_1.4_all.deb) ...

   Setting up tiem-nis-client-cfg (1.4) ...
   Setting NIS domainname to: tiem
   Starting NIS services: ypbind


Tell me, oh wise gurus of Debian -- is dpkg just brain-dead?  Is the man 
page horribly wrong/out-of-date?  Or what?


Confused,

Michael Peek


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Broken dpkg.cfg?

2006-08-11 Thread peek

Hi all,

(I posted this to debian-user yesterday but got no bites.  I'm hoping to 
have more luck with the debian-devel group.)


From the Debian FAQ 8.5:

If you'd like to log all your dpkg invokations (even those done using 
frontends like aptitude), you could add


 log /var/log/dpkg.log

to your /etc/dpkg/dpkg.cfg.



But, like, this doesn't work and stuff:


# cat /etc/dpkg/dpkg.cfg
log /var/log/dpkg.log
# dpkg -l
dpkg: configuration error: unknown option log: Success



How is this really supposed to work?  (And why does it say Success 
when it exits with an error?  Success at generating an error?)


Btw, I'm running Sarge.

Thanks for your help,

Michael Peek


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Broken dpkg.cfg?

2006-08-11 Thread peek

martin f krafft wrote:

also sprach peek [EMAIL PROTECTED] [2006.08.11.1210 +0100]:
  
How is this really supposed to work?  (And why does it say Success 
when it exits with an error?  Success at generating an error?)


Btw, I'm running Sarge.



log support was added to dpkg post-sarge

  

D'oh!

Thanks!

Michael Peek


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Silly Packaging Problem

2006-08-10 Thread peek

sean finney wrote:


On Thu, Aug 10, 2006 at 11:01:30AM +0100, martin f krafft wrote:
 


No, at least not for /etc. You could install the file, the overwrite
it, but files installed to /etc by dpkg are conffiles and those must
not be touched programmatically, according to policy.
   



i think a better solution (and one that has been proposed in the past)
would be to have a way of providing dpkg with information about such
dynamically created files.  this would also be helpful for stuff like
logfiles.

a fairly straightforward (says he who has not looked at dpkg's source)
would be to provide a new file in the control section of the deb
which contained a series of globs which could be used to match such
files.  then, if a query through dpkg -S fails to find an owner of
a file it could go through the potentially longer process of searching
through these files, reporting all matches.



sean
 


The idea of a glob makes me nervous.  There's been plenty of times I've
accidentaly gotten extra files listed in a glob to ls or find that I
didn't intend to.

Michael Peek


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Silly Packaging Problem

2006-08-10 Thread peek

Bruce Sass wrote:

An update-package command, run at install time by the maintainer's 
scripts right after file generation succeeds, would head off potential 
problems with synchronization that are outside of the Maintainer's 
control (e.g., DEBIAN/dynfiles containing incorrectly generated paths) 
and would be simpler to implement, specifically, dynfiles 
vs. update-package:
 



Having recently come from a Solaris background (migraiting to Debian),
if I understand what you're saying here, then this is the way Sun
handled the problem.  In their version of debian/postinst you would call
a command and pass it the path of the file you just created, along with
any extra necessary information needed to add an entry to the packaging
database.

As an example:

echo Creating /etc/foo.cfg...
cat  /etc/foo.cfg  EOF
...stuff...
EOF
dpkg-install-file package-name /etc/foo.cfg

After that, when doing the Sun version of a purge, you had a choice:
A) Remove the file yourself, and call a second command that would remove
it's database entry, or
B) Ignore it and let the package manager remove both the file and it's
database entry for you, since it now knows of the file's existence and
it's affiliation with your package.

Having this background writing Solaris packages, and a desire to 'do it
right' as I learn Debian, is what prompted me to ask in the first
place.  It just seems a little cleaner: you could query dpkg for what
package *every* file came from -- no files left out; and you don't
necessarily have to rely on the package maintainer to remember to clean
up after themselves during a purge, so long as they registered their
dynamically-created files right after creation.

Anyway, that answered my question -- Debian doesn't worry about
dynamically-created files.

L8r,

Michael Peek


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Silly Packaging Problem

2006-08-09 Thread Michael S. Peek

martin f krafft wrote:


also sprach Michael S. Peek [EMAIL PROTECTED] [2006.08.08.2239 +0100]:
 


The next time there's an upgrade for courier-authdaemon, won't it
overwrite my version of /etc/courier/authdaemonrc with it's own?
   



No way. Packages must *never* overwrite your files in /etc.

 


Excellent.  Thanks for your help Martin, Mr. Fungi.

I have one more packaging question if you guys happen to know the answer
to it.

It seems that Debian doesn't care about keeping up with files created
dynamically via install scripts.  For instance, I can type 'dpkg -S
/etc/papersize', and I get back 'dpkg: /etc/papersize not found.'

Is this correct, or is there a way to assign package ownership of
dynamically-created files?

I'll go read the Policy manual some more now...

Thanks for your help, it's saved me a lot of bewilderment and hours of
wasted effort.

Michael


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Silly Packaging Problem

2006-08-08 Thread Michael S. Peek

Hello all,

I hope I've got the right list.  If not, I appologize; just point the 
way and I'll take my question to the proper list.



I'm attempting to write a debian package for our site that installs 
configuration files specific to our needs.  I'm not a *complete* n00b -- 
I've written dozens of packages similar to this one and they work 
without a hitch -- but for some reason this one isn't working.


Here's what I've been able to figure out:

My package pre-depends on the package that it configures:  (In this 
case, courier-authdaemon.)


In my preinst script:
1) I check for the presence of a file: /etc/courier/authdaemonrc -- exit 
w/ error if it doesn't exist.

2) I then divert this file.
3) Then I check to see that (a) /etc/courier/authdaemonrc does not 
exist, and (b) that /etc/courier/authdaemonrc.distrib does exist.
4) The script continues by diverting other files that are also to be 
replaced.


After the preinst script exits the files from my package are installed.  
I presume dpkg handles this magically.


Then, in my postinst script:
1) I check for the presence of /etc/courier/authdaemonrc.distrib
2) I check for the presence of /etc/courier/authdaemonrc (from my package)
*** This is where the package installation fails -- 
/etc/courier/authdaemonrc does not exist.


Now, before you say, Hey stupid, make sure your 
etc/courier/authdaemonrc file is actually *in* the package...  I 
already have.  When I extract the contents of the .deb file to a 
directory using 'dpkg-deb -x', here is what I have:



39246344 drwxr-xr-x   5 root root 4096 Aug  8 15:52 .
39246414 drwxr-xr-x   3 root root 4096 Aug  8 15:44 ./etc
39246434 drwxr-xr-x   2 root root 4096 Aug  8 15:45 
./etc/courier
39246454 -rw-r--r--   1 root root  364 Aug  3 14:38 
./etc/courier/imapd.cnf
39246468 -rw-r--r--   1 root root 6139 Aug  3 14:38 
./etc/courier/imapd-ssl
39246474 -rw-r--r--   1 root root 2692 Aug  3 14:38 
./etc/courier/authdaemonrc
3924648   16 -rw-r--r--   1 root root12638 Aug  3 14:38 
./etc/courier/imapd

39246494 drwxr-xr-x   3 root root 4096 Aug  8 15:45 ./usr
39246504 drwxr-xr-x   3 root root 4096 Aug  8 15:45 
./usr/share
39246514 drwxr-xr-x   3 root root 4096 Aug  8 15:45 
./usr/share/doc
39246524 drwxr-xr-x   2 root root 4096 Aug  8 15:45 
./usr/share/doc/tiem-courier-cfg
39246534 -rw-r--r--   1 root root 1055 Aug  3 14:38 
./usr/share/doc/tiem-courier-cfg/copyright
39246544 -rw-r--r--   1 root root  366 Aug  8 15:43 
./usr/share/doc/tiem-courier-cfg/changelog.gz
39246554 drwxr-xr-x   2 root root 4096 Aug  8 15:45 
./DEBIAN
39246564 -rwxr-xr-x   1 root root 1160 Aug  8 15:45 
./DEBIAN/postinst
39246574 -rwxr-xr-x   1 root root 1373 Aug  8 15:45 
./DEBIAN/preinst
39246584 -rwxr-xr-x   1 root root  738 Aug  8 15:45 
./DEBIAN/prerm
39246594 -rwxr-xr-x   1 root root 1019 Aug  8 15:45 
./DEBIAN/postrm
39246604 -rw-r--r--   1 root root   91 Aug  8 15:45 
./DEBIAN/conffiles
39246614 -rw-r--r--   1 root root  376 Aug  8 15:45 
./DEBIAN/md5sums
39246624 -rw-r--r--   1 root root  510 Aug  8 15:45 
./DEBIAN/control



As you can see, etc/courier/authdaemonrc clearly exists in the package file.

The other files in etc/courier/ are installed as expected, but for some 
reason the authdaemonrc file is not installed.


Oh, and it get's better.  After installation, when I do 'dpkg -L', 
etc/courier/authdaemonrc *is* listed as one of the files installed by my 
package.


So...  Uh...  Can anyone enlighten me as to why this is happening?


Anxiously awaiting a clue,

Michael Peek



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Silly Packaging Problem

2006-08-08 Thread Michael S. Peek

Thanks for the help, Martin.

martin f krafft wrote:


also sprach Michael S. Peek [EMAIL PROTECTED] [2006.08.08.2124 +0100]:
 


2) I then divert this file.
   



Diversions of conffiles are not supported. Check that
/etc/courier/authdaemonrc is not a conffile. If it is, you could
easily lose data in my experience.
 



Got it!


I suggest installing your files to /usr/local/share/etc/courier and
then using ucf or just plain cat to modify the file in /etc/courier.
This is how I solved the challenge in a cluster situation. You can
force ucf to replace files by setting $UCF_FORCE_CONFFNEW .
 



Okay, now this raises a question:

Let's say I do this.  I install courier-authdaemon, which installs 
/etc/courier/authdaemonrc.  Then I install my own package, 
tiem-courier-cfg, which installs a replacement authdaemonrc in, say, 
/usr/local/share/etc/courier/, and then uses ucf to copy it to 
/etc/courier/.


The next time there's an upgrade for courier-authdaemon, won't it 
overwrite my version of /etc/courier/authdaemonrc with it's own?  I 
thought that was the whole reason for diversions in the first place, but 
if diversions don't work for conffiles, then what is one to do?  Or does 
ucf work some magic to prevent this?


Is this kind of thing addressed in the Debian Policy Manual (and I just 
missed it)?


Thanks for your help,

Michael Peek



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Using /cdrom/.disk/udeb_(in|ex)clude to load custom udebs instead of d-i's?

2006-02-27 Thread Michael S. Peek


Hi guys,

I'm playing with the latest debian-testing-i386-businesscard.iso.  One of the 
things I want to do is automate the network configuration process in an 
environment where DHCP is not an option.  Actually, what I want is for the 
debian installer to look up the network settings according to the hardware 
addresses it finds.  So what I've done is I've created my own netcfg udeb 
package, which I've named tiem.netcfg, that provides configured-network.  On 
the iso image, I've created a .disk/ directory and placed within the file 
udeb_exclude, which contains the single line:


netcfg

And the file udeb_include, which contains the single line:

tiem.netcfg

If I understand available-hooks.txt right, this should tell the debian 
installer to load my tiem.netcfg udeb instead of the debian installer's netcfg, 
but it doesn't.  It loads netcfg anyway.


As the installer runs and d-i's netconfig sits there waiting for me to type in 
an address I can switch to another terminal and load my udebs by hand using 
udpkg, and my udebs work, they're just not being loaded *instead of* the 
default udeb.


Anyone have an idea what I've done wrong?

Thanks in advance,

Michael Peek


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Apt, custom packages, and package dependencies

2005-09-30 Thread Michael S. Peek

Hello developers, I'm a n00b.

I've got my own little http debian package repository.  It shows up with apt
and dselect.

In this repository I've got a custom package that I'm working on that depends
on a bunch of ldap stuff, and contains configuration files and installation
scripts to install and configure ldap for me.

In this package's control file are the following lines:

  Package: tiem.ldap-server-config
  Architecture: all
  Depends: slapd ldap-utils libnss-ldap libpam-ldap
  Pre-Depends: slapd ldap-utils libnss-ldap libpam-ldap

My problem is, according to dselect, there are no dependencies or
pre-dependencies listed, and apt won't try to install any of the depencies
before installing my package.

Other custom packages that I have built have their dependencies listed in
dselect, but not this one.  And I have both completely erased and rebuilt my
repository on the server and run apt update on the client several times.

I figure the problem is in one of two places.  Either:

a) There's a cache file somewhere that apt isn't updating when I type apt
update, or

b) There's a file that needs to be updated on my repository -- even though
I've totally deleted and rebuilt the repository several times.

Anybody have any idea where I would go about finding out what's wrong?

Thanks for your help,

Michael Peek


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Apt, custom packages, and package dependencies

2005-09-30 Thread Michael S. Peek

I knew I would figure it out as soon as I sent this...  I forgot to put commas
between the package names in Depends and Pre-Depends.

Oops.

Nevermind, but thanks anyway.

Michael

 Hello developers, I'm a n00b.
 
 I've got my own little http debian package repository.  It shows up with apt
 and dselect.
 
 In this repository I've got a custom package that I'm working on that depends
 on a bunch of ldap stuff, and contains configuration files and installation
 scripts to install and configure ldap for me.
 
 In this package's control file are the following lines:
 
   Package: tiem.ldap-server-config
   Architecture: all
   Depends: slapd ldap-utils libnss-ldap libpam-ldap
   Pre-Depends: slapd ldap-utils libnss-ldap libpam-ldap
 
 My problem is, according to dselect, there are no dependencies or
 pre-dependencies listed, and apt won't try to install any of the depencies
 before installing my package.
 
 Other custom packages that I have built have their dependencies listed in
 dselect, but not this one.  And I have both completely erased and rebuilt my
 repository on the server and run apt update on the client several times.
 
 I figure the problem is in one of two places.  Either:
 
 a) There's a cache file somewhere that apt isn't updating when I type apt
 update, or
 
 b) There's a file that needs to be updated on my repository -- even though
 I've totally deleted and rebuilt the repository several times.
 
 Anybody have any idea where I would go about finding out what's wrong?
 
 Thanks for your help,
 
 Michael Peek
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



What does this mean?

2005-09-27 Thread Michael S. Peek

Hello all,

I'm struggling to wrap my feeble intelect around the debian installation
scripts, so I thought I would take a gander at the scripts in
/var/lib/dpkg/info/ and see how other people handle things.  I've come accross
several statements that I don't understand, and that aren't documented
anywhere that I can find.

dpkg --assert-support-predepends
dpkg --assert-working-epoch

The only thing I can find about these options are from dpkg --help:

For internal use: dpkg --assert-support-predepends | --predep-package |
  --assert-working-epoch | --assert-long-filenames | --assert-multi-conrep

What do these mean?

Thanks for your help,

Michael Peek


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Debian Packaging Question

2005-05-31 Thread Michael S. Peek

Hello all,

I hope I have the right list.  If not, just kindly point me in the right
direction.

I am attempting to develop my own .deb packages that customize a debian
installation for our network.  Some of my packages attempt to divert files out
of the way in preinst before unpacking my custom files in their place.  A good
example is autofs.  My autofs configuration package will attempt to divert
/etc/auto.master in preinst, and unpack my own /etc/auto.master in it's place.

But, when I try to have the autofs packages and my autofs configuration
package installed at the same time, I get some errors back from my preinst
script:

| Unpacking autofs (from .../autofs_4.1.3+4.1.4beta2-10_i386.deb) ...
| Selecting previously deselected package libhesiod0.
| Unpacking libhesiod0 (from .../libhesiod0_3.0.2-15.1_i386.deb) ...
| Selecting previously deselected package autofs-hesiod.
| Unpacking autofs-hesiod (from .../autofs-hesiod_4.1.3+4.1.4beta2-10_i386.deb
| ) ...
| Selecting previously deselected package tiem.autofs-config.
| Unpacking tiem.autofs-config (from .../tiem.autofs-config_1.0_all.deb) ...
| tiem.autofs-config::preinst::install (new version)
| *** WARNING: Cannot divert file:
| File: /etc/auto.master
| File does not exist
| *** WARNING: Cannot divert file:
| File: /etc/auto.media
| File does not exist
| dpkg: error processing /var/cache/apt/archives/tiem.autofs-config_1.0_all.de
| b (--unpack):
| trying to overwrite `/etc/auto.master', which is also in package autofs
| tiem.autofs-config::postrm::abort-install (new version)

The error messages are from my preinst script, which checks for the existence
of the files-to-be-diverted before attempting to divert them.

I thought I had this licked, because I made my autofs configuration package
(tiem.autofs-config) Pre-Depend on autofs and autofs-hesiod.  I thought that
doing so would force dpkg to configure autofs and autofs-hesiod *BEFORE*
installing my tiem.autofs-config.

What *should* I be doing instead?

Thanks for your help,

Michael Peek


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]